Merge pull request #146 from AlphaB/ntp-protocol-version

Add NTP protocol version flag
pull/152/head
Julius Volz 2015-10-26 14:18:27 +01:00
commit abe4f41937
1 changed files with 3 additions and 1 deletions

View File

@ -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
}