sh0rez / promqtt

Generic Prometheus ⟷ MQTT Bridge
18 stars 2 forks source link

Series closing #2

Open sh0rez opened 3 years ago

sh0rez commented 3 years ago

Currently, when an actor stops sending messages to MQTT, promqtt will export the last received value forever.

How shall we deal with this?

  1. Not. Leave as is. This appears to be what the Pushgateway does as well.
  2. Add a timeout (e.g. 5m, etc).
  3. Use special topics to "close" series, which makes promqtt remove them from its output. This could play well with LWT (Last will & testament), so that devices that disconnect from the broker are automatically removed.

I personally like (3), because it could leverage the quite unique MQTT property of LWT.

Thoughts? @RichiH?

RichiH commented 3 years ago

If 3. happens, it should be honored. Pushgateway "solves" this by also exosing the last updated time; having a user-configurable timenout which defaults to "forever" would offer 1 & 2 as well