prometheus-community / windows_exporter

Prometheus exporter for Windows machines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation: windows_time_computed_time_offset_seconds

cbryant42 opened this issue · comments

I believe the documentation for this metric may be incorrect. It is listed as a Counter in the docs page for the Time collector, but in the code for the Time collector, it appears that it is constructed using a GaugeValue. I could certainly be missing something as I am not too familiar with this exporter's code, but is the documentation wrong?

I came to this because I am visualizing the metric using Grafana, and noticed my value is always >= 0. I wondered why this might be, and the docs listed it as a counter which would explain my findings a bit. However a counter would always be increasing, and my graphs absolutely are not always increasing.

Could anyone please shed some light on this discrepancy, please?

I reread the documentation again today only to realize the metric description says, "Absolute time offset between the system clock and the chosen time source, in seconds". That answers the value >= 0 question. I found in this Github an issue (#532) that mentions this value is a ULong (unsigned 64-bit integer. I am happy with this answer, though I wish Windows would report the ComputedTimeOffset as a signed int.

I still believe documentation needs updated on the Counter/Gauge issue, though this is a very minor problem.