Fix parsing of SHM remotes in ntpq input (#3163)
This commit is contained in:
committed by
Daniel Nelson
parent
58751fa4df
commit
d449833de9
@@ -69,7 +69,7 @@ func (n *NTPQ) Gather(acc telegraf.Accumulator) error {
|
||||
// Due to problems with a parsing, we have to use regexp expression in order
|
||||
// to remove string that starts from '(' and ends with space
|
||||
// see: https://github.com/influxdata/telegraf/issues/2386
|
||||
reg, err := regexp.Compile("\\([\\S]*")
|
||||
reg, err := regexp.Compile("\\s+\\([\\S]*")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user