diff --git a/ntpd_metrics.py b/ntpd_metrics.py index f0dd014..b8476fa 100755 --- a/ntpd_metrics.py +++ b/ntpd_metrics.py @@ -9,13 +9,13 @@ from prometheus_client import CollectorRegistry, Gauge, generate_latest # NTP peers status, with no DNS lookups. -ntpq_cmd = ['ntpq', '-np'] +ntpq_cmd = ['ntpq', '-np', '-W', '255'] ntpq_rv_cmd = ['ntpq', '-c', 'rv 0 offset,sys_jitter,rootdisp,rootdelay'] # Regex to match all of the fields in the output of ntpq -np metrics_fields = [ - r'^(?P.)(?P[\w\.]+)', - r'(?P[\w\.]+)', + r'^(?P.)(?P[\w\.:]+)', + r'(?P[\w\.:]+)', r'(?P\d+)', r'(?P\w)', r'(?P\d+)',