parent
b0c721491d
commit
a8b1fe6f00
|
@ -136,7 +136,7 @@ func (n *NTPQ) Gather(acc telegraf.Accumulator) error {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// seconds in an hour
|
// seconds in an hour
|
||||||
mFields[key] = int64(m) * 360
|
mFields[key] = int64(m) * 3600
|
||||||
continue
|
continue
|
||||||
case strings.HasSuffix(when, "d"):
|
case strings.HasSuffix(when, "d"):
|
||||||
m, err := strconv.Atoi(strings.TrimSuffix(fields[index], "d"))
|
m, err := strconv.Atoi(strings.TrimSuffix(fields[index], "d"))
|
||||||
|
|
|
@ -171,7 +171,7 @@ func TestHoursNTPQ(t *testing.T) {
|
||||||
assert.NoError(t, n.Gather(&acc))
|
assert.NoError(t, n.Gather(&acc))
|
||||||
|
|
||||||
fields := map[string]interface{}{
|
fields := map[string]interface{}{
|
||||||
"when": int64(720),
|
"when": int64(7200),
|
||||||
"poll": int64(256),
|
"poll": int64(256),
|
||||||
"reach": int64(37),
|
"reach": int64(37),
|
||||||
"delay": float64(51.016),
|
"delay": float64(51.016),
|
||||||
|
|
Loading…
Reference in New Issue