Fix phpfpm fcgi client panic when URL doesnt exist

closes #1886
This commit is contained in:
Cameron Sparr
2016-10-12 11:58:38 +01:00
parent bccef2856d
commit 974221f0cf
2 changed files with 4 additions and 0 deletions

View File

@@ -122,6 +122,9 @@ func (g *phpfpm) gatherServer(addr string, acc telegraf.Accumulator) error {
fcgiIp := socketAddr[0]
fcgiPort, _ := strconv.Atoi(socketAddr[1])
fcgi, err = newFcgiClient(fcgiIp, fcgiPort)
if err != nil {
return err
}
if len(u.Path) > 1 {
statusPath = strings.Trim(u.Path, "/")
} else {