Search code examples
ntpprometheus-node-exporter

NTP metrics not exposed through node_exporter


I'm looking for a metric to verify NTP time synchronization of a host with remote NTP servers located within the organization through Prometheus node-exporter.

In the below documentation, I see node_ntp_stratum metric can be used to identify the synchronization against the stratum value.
https://github.com/prometheus/node_exporter/blob/master/docs/TIME.md#node_ntp_stratum

But I don't see the NTP related metrics available in the list of metrics exposed through node_exporter in my server.

curl -X GET http://127.0.0.1:19100/metrics | grep -i 'ntp_'

node_exporter Version - 0.17.0

Prometheus Version - 2.10.0


Solution

  • I was able to get NTP related metrics by enabling --collector.ntp as part of node_exporter service script.

    node-exp 26698     1  1 17:00 ?        00:01:21 /usr/local/bin/node_exporter --collector.systemd --collector.ntp --collector.textfile.directory=/var/lib/node_exporter --web.listen-address=0.0.0.0:19100