Closed heinrichnak closed 5 years ago
[[inputs.mqtt_consumer]] servers = ["tcp://localhost:1883"] topics = [ "events/central_heating/otmonitor/flame", ] data_format = "json" data_type = "boolean" name_override = "flame" name_prefix = "otgw_" json_string_fields = [ "value", ] interval = "10s"
Telegraf version 1.12.1 on Ubuntu 18.04.3 LTS
Store boolean in influxdb:
> select * from otgw_flame name: otgw_flame time host timestamp topic value ---- ---- --------- ----- ----- 1568614387211376524 ubuntu 1568611817541 events/central_heating/otmonitor/flame true
Only the timestamp is stored, not the boolean value:
> select * from otgw_flame name: otgw_flame time host timestamp topic ---- ---- --------- ----- 1568614387211376524 ubuntu 1568611817541 events/central_heating/otmonitor/flame
This used to work until version 1.12.0, so it seems that something introduced in 1.12.0 broke this.
This is the message from MQTT perspective:
# mosquitto_sub -t events/central_heating/otmonitor/flame {"name": "on", "type": "boolean", "value": false, "timestamp": 1568611817541}
It appears this functionality was removed in 41176dd
Thanks! Works fine again.
Relevant telegraf.conf:
System info:
Telegraf version 1.12.1 on Ubuntu 18.04.3 LTS
Steps to reproduce:
Expected behavior:
Store boolean in influxdb:
Actual behavior:
Only the timestamp is stored, not the boolean value:
Additional info:
This used to work until version 1.12.0, so it seems that something introduced in 1.12.0 broke this.
This is the message from MQTT perspective: