-
Notifications
You must be signed in to change notification settings - Fork 6
/
telegraf_example.conf
42 lines (42 loc) · 1.54 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
# # Read metrics from MQTT topic(s) with json formatting
[[inputs.mqtt_consumer]]
# ## MQTT broker URLs to be used. The format should be scheme://host:port,
# ## schema can be tcp, ssl, or ws.
servers = ["tcp://<host>:<port>"]
#
# ## 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 = ["torque/formatted"]
#
# # 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_time_key = "time"
json_time_format = "unix_ms"
json_name_key = "appID_userEntered"
json_string_fields = ["session","appVersion","appID_MD5"]
tag_keys = ["session","appVersion","appID_MD5"]