-
Notifications
You must be signed in to change notification settings - Fork 12
/
telegraf_example.conf
43 lines (42 loc) · 1.45 KB
/
telegraf_example.conf
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
42
43
# # Read metrics from MQTT topic(s)
[[inputs.mqtt_consumer]]
name_override = "metermon"
# ## MQTT broker URLs to be used. The format should be scheme://host:port,
# ## schema can be tcp, ssl, or ws.
servers = ["tcp://<host>:1883"]
#
# ## MQTT QoS, must be 0, 1, or 2
qos = 0
# ## Connection timeout for initial connection in seconds
connection_timeout = "30s"
#
# ## Topics to subscribe to
topics = [
"metermon/output"
]
#
# # if true, messages that can't be delivered while the subscriber is offline
# # will be delivered when it comes back (such as on service restart).
# # NOTE: if true, client_id MUST be set
# persistent_session = false
# # If empty, a random client ID will be generated.
# client_id = "telegraf"
#
# ## username and password to connect MQTT server.
# # username = "telegraf"
# # password = "metricsmetricsmetricsmetrics"
#
# ## Optional TLS Config
# # tls_ca = "/etc/telegraf/ca.pem"
# # tls_cert = "/etc/telegraf/cert.pem"
# # tls_key = "/etc/telegraf/key.pem"
# ## Use TLS but skip chain & host verification
# # insecure_skip_verify = false
#
# ## Data format to consume.
# ## Each data format has its own unique set of configuration options, read
# ## more about them here:
# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "json"
json_string_fields = ["Type","Unit","Protocol","ID"]
tag_keys = ["Type","Unit","Protocol","ID"]