Skip to content

Commit

Permalink
Skip invalid urls in nginx input
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson committed Oct 3, 2017
1 parent 79f66dc commit b610276
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/inputs/nginx/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions plugins/inputs/nginx_plus/nginx_plus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b610276

Please sign in to comment.