From cfb0111d8c5de554f984bf9a215b4a90603a617c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Mon, 10 Jul 2023 00:44:30 +0200 Subject: [PATCH] revert fix on newTimeCollector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- collector/time.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collector/time.go b/collector/time.go index 3343f03d..697f2bbd 100644 --- a/collector/time.go +++ b/collector/time.go @@ -24,13 +24,13 @@ type TimeCollector struct { } func newTimeCollector(logger log.Logger) (Collector, error) { - const subsystem = "time" - logger = log.With(logger, "collector", subsystem) - - if getWindowsVersion(logger) < 100 { + if getWindowsVersion(logger) <= 6.1 { return nil, errors.New("Windows version older than Server 2016 detected. The time collector will not run and should be disabled via CLI flags or configuration file") } + const subsystem = "time" + logger = log.With(logger, "collector", subsystem) + return &TimeCollector{ logger: logger, ClockFrequencyAdjustmentPPBTotal: prometheus.NewDesc(