mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-07 21:46:37 +00:00
Merge pull request #689 from breed808/time_doc
Document version requirement for time collector
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
package collector
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/common/log"
|
||||
)
|
||||
@@ -22,6 +24,10 @@ type TimeCollector struct {
|
||||
}
|
||||
|
||||
func newTimeCollector() (Collector, error) {
|
||||
if getWindowsVersion() <= 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"
|
||||
|
||||
return &TimeCollector{
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
The time collector exposes the Windows Time Service metrics. Note that the Windows Time Service must be running, else metric collection will fail.
|
||||
If the Windows Time Service is stopped after collection has started, collector metric values will reset to 0.
|
||||
|
||||
Please note the Time Service perflib counters are only available on [Windows Server 2016 or newer](https://docs.microsoft.com/en-us/windows-server/networking/windows-time-service/windows-server-2016-improvements).
|
||||
|
||||
|||
|
||||
-|-
|
||||
Metric name prefix | `time`
|
||||
|
||||
Reference in New Issue
Block a user