fix(inputs.ntpq): Handle pools with "-" when (#11827)
This commit is contained in:
parent
e5b6e629c4
commit
6236059817
|
|
@ -223,6 +223,10 @@ func (n *NTPQ) gatherServer(acc telegraf.Accumulator, server string) {
|
|||
}
|
||||
fields[col.name] = value
|
||||
case FieldDuration:
|
||||
// Ignore fields only containing a minus
|
||||
if raw == "-" {
|
||||
continue
|
||||
}
|
||||
factor := int64(1)
|
||||
suffix := raw[len(raw)-1:]
|
||||
switch suffix {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
ntpq,remote=0.eu.pool.ntp.o,refid=.POOL.,stratum=16,type=p poll=64i,reach=0i,delay=0.0,offset=0.0,jitter=0.0 0
|
||||
ntpq,remote=195.201.19.162,refid=187.182.182.166,stratum=3,type=u poll=64i,reach=1i,delay=12.692,offset=1.283,jitter=0.0 0
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
remote refid st t when poll reach delay offset jitter
|
||||
==============================================================================
|
||||
0.eu.pool.ntp.o .POOL. 16 p - 64 0 0.000 +0.000 0.000
|
||||
195.201.19.162 187.182.182.166 3 u - 64 1 12.692 +1.283 0.000
|
||||
|
|
@ -0,0 +1 @@
|
|||
[[inputs.ntpq]]
|
||||
Loading…
Reference in New Issue