Updated vendored ntp package (#681)
The github.com/beevik/ntp package was recently updated with some API changes that broke node_exporter. This commit fetches the latest version of the ntp package and brings node_exporter in line with the latest API.
This commit is contained in:
parent
859a825bb8
commit
b62c7bc0ad
6 changed files with 390 additions and 257 deletions
|
|
@ -152,7 +152,7 @@ func (c *ntpCollector) Update(ch chan<- prometheus.Metric) error {
|
|||
maxerr += time.Second
|
||||
}
|
||||
|
||||
if resp.Validate() && resp.RootDistance <= *ntpMaxDistance && resp.CausalityViolation <= maxerr {
|
||||
if resp.Validate() == nil && resp.RootDistance <= *ntpMaxDistance && resp.MinError <= maxerr {
|
||||
ch <- c.sanity.mustNewConstMetric(1)
|
||||
} else {
|
||||
ch <- c.sanity.mustNewConstMetric(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue