Browse Source

Do not use flag before flag.Parse() was called

pull/161/head
Mikhail Salosin 9 years ago
parent
commit
e7359706d4
  1. 2
      collector/ntp.go

2
collector/ntp.go

@ -35,7 +35,6 @@ type ntpCollector struct {
}
func init() {
ntp.Version = byte(*ntpProtocolVersion)
Factories["ntp"] = NewNtpCollector
}
@ -45,6 +44,7 @@ func NewNtpCollector() (Collector, error) {
if *ntpServer == "" {
return nil, fmt.Errorf("no NTP server specifies, see --ntpServer")
}
ntp.Version = byte(*ntpProtocolVersion)
return &ntpCollector{
drift: prometheus.NewGauge(prometheus.GaugeOpts{

Loading…
Cancel
Save