From fad39d3624b234709c215d897c49e3c1045334cd Mon Sep 17 00:00:00 2001 From: Daniel Meiburg Date: Wed, 3 Jul 2024 00:52:59 +0200 Subject: [PATCH] grafana-influx: attempt to fix mqtt parsing with telegraf --- grafana-influx/telegraf.conf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/grafana-influx/telegraf.conf b/grafana-influx/telegraf.conf index e56ef9a..052dafe 100644 --- a/grafana-influx/telegraf.conf +++ b/grafana-influx/telegraf.conf @@ -8,8 +8,11 @@ topics = [ "climate/#" ] data_format = "value" data_type = "float" + topic_tag = "" [[inputs.mqtt_consumer.topic_parsing]] - topic = "+/+/+" measurement = "climate" - tags = "_/device/_" - fields= "_/_/field" + tags = "_/device/field" + + [[processors.pivot]] + tag_key = "field" + value_key = "value"