1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/mosquitto/telegraf-mqtt.conf

33 lines
754 B
Plaintext
Raw Normal View History

2024-01-24 09:57:59 +02:00
#
# See: https://www.influxdata.com/integration/mqtt-telegraf-consumer/
#
[[inputs.mqtt_consumer]]
servers = ["ssl://mqtt.easypi.duckdns.org:8883"]
topics = [
"zigbee2mqtt/+",
]
data_format = "json"
2024-01-24 10:06:11 +02:00
json_string_fields = ["contact", "occupancy", "action"]
2024-01-24 09:57:59 +02:00
username = "telegraf"
password = "telegraf"
[[processors.enum]]
order = 2
[[processors.enum.mapping]]
field = "contact"
[processors.enum.mapping.value_mappings]
false = 0
true = 1
[[processors.enum.mapping]]
field = "occupancy"
[processors.enum.mapping.value_mappings]
false = 0
true = 1
2024-01-24 10:06:11 +02:00
[[processors.enum.mapping]]
field = "action"
[processors.enum.mapping.value_mappings]
single = 1
double = 2
long = 3