仓库指标
- Star
- (9,892 star)
- PR 合并指标
- (平均合并 2天 12小时) (30 天内合并 136 个 PR)
描述
Feature Request
Opening a feature request kicks off a discussion.
Proposal:
If the internet connection dies, our device will remember the unsent messages, and when the internet connection comes back send all of them.
Since Telegraf is adding the timestamp, all of those messages would get wrong timestamps once they reach the server.
Instead, we want to use a user-property “time”, which is the time when we measured our actual sensor. Once they reach Telegraf, we want Telegraf to use that timestamp for the InfluxDB insert.
Current behaviour:
Telegraf does not support reading data from user-properties within a MQTT payload.
Desired behavior:
Provide the ability to parse user-property data. Similar to how we parse topics.
Use case:
we want to use a user-property “time”, which is the time when we measured our actual sensor. Once they reach Telegraf, we want Telegraf to use that timestamp for the InfluxDB insert.
The alternative is to use json_v2/timestamp_key. It seems Telegraf is using paho.mqtt.golang, there is this fork which supports mqtt 5, but it seems to be a bit different GitHub - eclipse/paho.golang: Go libraries, for example there is no ClientOptions. Therefore it is not a drop-in replacement.
Community link: https://community.influxdata.com/t/handling-mqtt-5-properties-in-telegraf/25255/2