Any idea what that means or what to do about it?
Hello @rwb,
This error means that telegraf did not create any metrics from the MQTT message because it couldn’t parse the message using the configured parser settings.
Can you please share your config?
I also suggest:
- setting
debug = true
in the agent portion of your config - manually inspect the payloads
mosquitto_sub -h <broker_address> -t <topic> -v
- adjust the data format in your mqtt consumer plugin
data_format = "json"
json_string_fields = ["field1", "field2"] # Specify fields if they are strings
As needed to correctly parses the data
You might need to use either:
or
I added debug = true
but it isn’t valid; telegraf
won’t start.
[[inputs.mqtt_consumer]]
alias = "Socket"
debug = true
servers = ["tcp://127.0.0.1:1883"]
topics = [
"zigbee2mqtt/Home/+/Socket",
"zigbee2mqtt/Home/+/Socket/+"
]
data_format = "json_v2"
[inputs.mqtt_consumer.tags]
bucket = "zigbee"
[[inputs.mqtt_consumer.json_v2]]
measurement_name = "power"
[[inputs.mqtt_consumer.topic_parsing]]
topic = "zigbee2mqtt/Home/+/Socket"
tags = "_/_/room/_"
[[inputs.mqtt_consumer.topic_parsing]]
topic = "zigbee2mqtt/Home/+/Socket/+"
tags = "_/_/room/_/position"
[[inputs.mqtt_consumer.json_v2.field]]
path = "power"
type = "int"
optional = true
The power
property isn’t always present, and I need to ignore topics that end with set
.
Simple question for you.
How can I subscribe to zigbee2mqtt/Home/+/Radiator/+
but not zigbee2mqtt/Home/+/Radiator/set
?
As far as I tell this should be done by tagdrop
but it in fact it’s impossible becaue this is broken.