On Wednesday, 20 May 2020 05:48:28 UTC+1, Yagyansh S. Kumar wrote:
>
> Thanks for the response Brian.
>
> I have already enabled the NTP collector in all all my servers, but still 
> cannot see the *node_ntp_drift_seconds* metrics giving the output.
>

Looking through git history (git log -p), it was renamed to 
"node_ntp_offset_seconds":

# HELP node_ntp_offset_seconds ClockOffset between NTP and local clock.
# TYPE node_ntp_offset_seconds gauge
node_ntp_offset_seconds -0.015156364

The change was made in in c169b4b1c 
<https://github.com/prometheus/node_exporter/commit/c169b4b1c5108f8e56c9680e7f7b592accdc0dbd>
 
(Sep 19 2017) when the ntp collector was updated with more metrics.

The old ntp_drift was calculated here:

-       driftSeconds := resp.ClockOffset.Seconds()
-       log.Debugf("Set ntp_drift_seconds: %f", driftSeconds)
-       ch <- c.drift.mustNewConstMetric(driftSeconds)

and the corresponding code in current node_exporter is:

                offset: typedDesc{prometheus.NewDesc(
                        prometheus.BuildFQName(namespace, ntpSubsystem, 
"offset_seconds"),
                        "ClockOffset between NTP and local clock.",
                        nil, nil,
                ), prometheus.GaugeValue},
...
        ch <- c.offset.mustNewConstMetric(resp.ClockOffset.Seconds())

There is documentation about the ntp and timex metrics here:
https://github.com/prometheus/node_exporter/blob/master/docs/TIME.md

Maybe these answer your other questions - or you can look at the source to 
see where each metric is collected from.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/967bf6ea-c8b2-451c-8731-0732b39a20e1%40googlegroups.com.

Reply via email to