Fix unix socket dial arguments in uwsgi input (#6769)
This commit is contained in:
parent
f0b0295e3c
commit
faca80fd00
|
@ -91,13 +91,13 @@ func (u *Uwsgi) gatherServer(acc telegraf.Accumulator, url *url.URL) error {
|
||||||
}
|
}
|
||||||
s.source = url.Host
|
s.source = url.Host
|
||||||
case "unix":
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
s.source, err = os.Hostname()
|
s.source, err = os.Hostname()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.source = url.Host
|
s.source = ""
|
||||||
}
|
}
|
||||||
case "http":
|
case "http":
|
||||||
resp, err := u.client.Get(url.String())
|
resp, err := u.client.Get(url.String())
|
||||||
|
|
Loading…
Reference in New Issue