forked from jpmens/mqtt2graphite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
map
42 lines (31 loc) · 1.26 KB
/
map
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#(@)mqtt2graphite map file
# Each line has two OR three values in it. Values MUST no contain white
# space.
# First value:
# n payload contains a number (int or float) use that
# j payload is JSON. Extract all keys with numeric values
# Second value:
# Subscribe to this channel. MQTT wildcards (#) are allowed.
# Third (optional) value:
# The MQTT topic is to be mapped to this key in Carbon (Graphite)
# Use periods as separators, just like Carbon expects them. If
# this value is not specified, the MQTT topic name will be used,
# with slashes (/) converted to dots (.)
n test/mosquitto/messages/load/received
n test/mosquitto/messages/load/#
n test/jp/j1
n $SYS/broker/load/messages/received/1min test.mosquitto.messages.load.received
n $SYS/broker/load/messages/sent/1min test.mosquitto.messages.load.sent
j test/jp/j2
j test/jp/j3 test.jp.json
# The last line above means, subscribe to the MQTT topic of "test/jp/jp3",
# extract JSON, and translate the topic to a the "test.jp.json.___" key.
# Submitting an MQTT message payload of
#
# { "size":69,"temp": 89.3, "gas": " 88", "name": "JP Mens" }
#
# will produce the following Carbon entries:
#
# test.jp.json.gas 88.000000 1363169729
# test.jp.json.temp 89.300000 1363169729
# test.jp.json.size 69.000000 1363169729