Fix parse fcgi URI path in php-fpm input module

closes #934
This commit is contained in:
Rudenkovk Konstantin
2016-03-30 10:34:48 -06:00
committed by Cameron Sparr
parent 2f41ae24f8
commit e03f684508
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -122,6 +122,11 @@ func (g *phpfpm) gatherServer(addr string, acc telegraf.Accumulator) error {
fcgiIp := socketAddr[0]
fcgiPort, _ := strconv.Atoi(socketAddr[1])
fcgi, err = newFcgiClient(fcgiIp, fcgiPort)
if len(u.Path) > 1 {
statusPath = strings.Trim(u.Path, "/")
} else {
statusPath = "status"
}
} else {
socketAddr := strings.Split(addr, ":")
if len(socketAddr) >= 2 {