Prometheus Metrics: opendtu_last_update
wraps to 0 at approx. 50 days, while opendtu_uptime
does not
#2225
Labels
bug
Something isn't working
What happened?
Both
opendtu_uptime
andopendtu_last_update
are counters in seconds, relative to the last reboot of the device.But they seem to use different data types, since the
opendtu_last_update
wraps to zero at around 4.2 mio seconds , while theopendtu_uptime
continues to increase beyond that.When this happens, the difference
opendtu_uptime - opendtu_last_update
, which is the "amount of seconds since the last update", is not correct anymore.Assumption:
opendtu_last_update
is millisecs internally, and so the wrap point is 4294967295 milliseconds (max uint32 / 1000).To Reproduce Bug
Expected Behavior
Both counters use the same numeric data type so they overflow at the same time.
Alternative: add a gauge metric that emits the "seconds since last update" directly, so I do not have to compute it.
Install Method
Pre-Compiled binary from GitHub
What git-hash/version of OpenDTU?
v24.5.6
Relevant log/trace output
No response
Anything else?
Side note: Over 50 days without a crash or reboot -- just this minor glitch. Solid software, good job 🚀
Please confirm the following
The text was updated successfully, but these errors were encountered: