Add NTP protocol version flag

pull/146/head
Mikhail Salosin 9 years ago
parent 79b4c3fe1d
commit 10e65086ea

@ -26,7 +26,8 @@ import (
) )
var ( 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 { type ntpCollector struct {
@ -34,6 +35,7 @@ type ntpCollector struct {
} }
func init() { func init() {
ntp.Version = byte(*ntpProtocolVersion)
Factories["ntp"] = NewNtpCollector Factories["ntp"] = NewNtpCollector
} }

Loading…
Cancel
Save