Collect out of band stats from ntp

Uses output from ntpdate:

$ ntpdate -q pool.ntp.org
server, stratum 2, offset -0.000277, delay 0.02878
server, stratum 1, offset -0.000128, delay 0.02896
server, stratum 2, offset 0.000613, delay 0.02870
server, stratum 2, offset -0.000351, delay 0.02864
31 Apr 12:00:00 ntpdate[12]: adjust time server offset -0.000128 sec


* /usr/sbin/ntpdate
* subprocess


Setting Default Description Type
bin /usr/sbin/ntpdate Path to ntpdate binary str
byte_unit byte Default numeric output(s) str
enabled False Enable collecting these metrics bool
measure_collector_time False Collect the collector run time in ms bool
metrics_blacklist None Regex to match metrics to block. Mutually exclusive with metrics_whitelist NoneType
metrics_whitelist None Regex to match metrics to transmit. Mutually exclusive with metrics_blacklist NoneType
ntp_pool pool.ntp.org NTP Pool address str
precision 0 Number of decimal places to report to int
sudo_cmd /usr/bin/sudo Path to sudo str
time_scale milliseconds Time unit to report offset in str
use_sudo False Use sudo? bool

Example Output

servers.hostname.ntp.offset.milliseconds 0
servers.hostname.ntp.server.count 4