windows_exporter icon indicating copy to clipboard operation
windows_exporter copied to clipboard

Documentation: windows_time_computed_time_offset_seconds

Open cbryant42 opened this issue 10 months ago • 2 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?

cbryant42 avatar Apr 03 '24 11:04 cbryant42

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 (https://github.com/prometheus-community/windows_exporter/issues/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.

cbryant42 avatar Apr 08 '24 14:04 cbryant42

@cbryant42 are you open for an PR to solve this?

jkroepke avatar May 18 '24 18:05 jkroepke

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

github-actions[bot] avatar Aug 17 '24 02:08 github-actions[bot]