From 10e65086eae4c2019a08dd55ecfddcdbe774665a Mon Sep 17 00:00:00 2001 From: Mikhail Salosin Date: Mon, 26 Oct 2015 16:15:53 +0300 Subject: [PATCH] Add NTP protocol version flag --- collector/ntp.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collector/ntp.go b/collector/ntp.go index 65d523db..14029fd4 100644 --- a/collector/ntp.go +++ b/collector/ntp.go @@ -26,7 +26,8 @@ import ( ) var ( - ntpServer = flag.String("collector.ntp.server", "", "NTP server to use for ntp collector.") + ntpServer = flag.String("collector.ntp.server", "", "NTP server to use for ntp collector.") + ntpProtocolVersion = flag.Int("collector.ntp.protocol-version", 4, "NTP protocol version") ) type ntpCollector struct { @@ -34,6 +35,7 @@ type ntpCollector struct { } func init() { + ntp.Version = byte(*ntpProtocolVersion) Factories["ntp"] = NewNtpCollector }