Closed zoic21 closed 1 hour ago
This could also be an alternative resolution to #68
hello @zoic21,
I am glad it useful to you :) Looking into it.
hello @bo0tzz, got it.
what about having a timestamp metric associated to the metric:
mqtt_temperature{sensor="zigbee2mqtt_kitchen"} 19.32
mqtt_temperature_ts{sensor="zigbee2mqtt_kitchen"} 1.731969306e+09
The second metric is updated only when receiving a new message in MQTT for this metric.
Code is in this branch for now: https://github.com/kpetremann/mqtt-exporter/tree/timestamp
If it is ok for you, I'll add an option to enable (disabled by default because it doubles the number of metrics).
@zoic21 @bo0tzz does PR #87 work for you?
It feels a bit hacky (not your fault) but should do the job I think
Hello Sorry for delay, yes I can used that just and manage alert with this timestamp
Closing this issue: PR merged, the new feature is available in the latest version. Feel free to reopen the issue if needed. Cheers
Hello
Thanks for the exporter it’s very usefull !!!!! CAN you add a timeout on value, for exemple I send temperture on mqtt each minute but if I stop the send mqtt exporter continue to expose my sensor temperature.
What I want it’s a paramètre to define lifetime of value. With that it’s will be mark as no data in grafana and I can get an alert.
Thanks in advance.