Fix unix socket dial arguments in uwsgi input (#6769)

This commit is contained in:
Daniel Nelson 2019-12-09 12:15:27 -08:00 committed by GitHub
parent f0b0295e3c
commit faca80fd00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -91,13 +91,13 @@ func (u *Uwsgi) gatherServer(acc telegraf.Accumulator, url *url.URL) error {
}
s.source = url.Host
case "unix":
r, err = net.DialTimeout(url.Scheme, url.Host, u.Timeout.Duration)
r, err = net.DialTimeout(url.Scheme, url.Path, u.Timeout.Duration)
if err != nil {
return err
}
s.source, err = os.Hostname()
if err != nil {
s.source = url.Host
s.source = ""
}
case "http":
resp, err := u.client.Get(url.String())