Skip invalid urls in nginx input

This commit is contained in:
Daniel Nelson 2017-10-03 10:54:31 -07:00
parent 79f66dc5b3
commit b610276485
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
2 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,7 @@ func (n *Nginx) Gather(acc telegraf.Accumulator) error {
addr, err := url.Parse(u)
if err != nil {
acc.AddError(fmt.Errorf("Unable to parse address '%s': %s", u, err))
continue
}
wg.Add(1)

View File

@ -59,6 +59,7 @@ func (n *NginxPlus) Gather(acc telegraf.Accumulator) error {
addr, err := url.Parse(u)
if err != nil {
acc.AddError(fmt.Errorf("Unable to parse address '%s': %s", u, err))
continue
}
wg.Add(1)