diff --git a/pkg/metrics/host_test.go b/pkg/metrics/host_test.go index d3468b49b..ae381817a 100644 --- a/pkg/metrics/host_test.go +++ b/pkg/metrics/host_test.go @@ -11,8 +11,8 @@ import ( ) func TestHostSample_CachedNtpOffset(t *testing.T) { - timeout := uint(5000) - interval := uint(15) + timeout := 5000 * time.Millisecond + interval := 15 * time.Minute ntpMonitor := NewNtp([]string{"one"}, timeout, interval) ntpMonitor.ntpQuery = ntpQueryMock([]ntpResp{ { diff --git a/pkg/metrics/ntp.go b/pkg/metrics/ntp.go index 1b76eec85..ef4e0afc9 100644 --- a/pkg/metrics/ntp.go +++ b/pkg/metrics/ntp.go @@ -71,6 +71,8 @@ func guardInterval(interval time.Duration) time.Duration { // Offset returns the Ntp servers offset. func (p *Ntp) Offset() (time.Duration, error) { + syslog.WithField("timeout", p.timeout).Warn("CHECK NTP TIMEOUT") + syslog.WithField("interval", p.interval).Warn("CHECK NTP INTERVAL") if len(p.pool) == 0 { return 0, ErrEmptyNtpHosts }