From 513f9ac591900273ae10e7b0b9d4dbc19436dc2f Mon Sep 17 00:00:00 2001 From: Rudenkovk Konstantin Date: Fri, 25 Mar 2016 19:24:46 +0400 Subject: [PATCH] Fix parse fcgi URI path in php-fpm input module --- plugins/inputs/phpfpm/phpfpm.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/inputs/phpfpm/phpfpm.go b/plugins/inputs/phpfpm/phpfpm.go index 199b0005b..169fe2194 100644 --- a/plugins/inputs/phpfpm/phpfpm.go +++ b/plugins/inputs/phpfpm/phpfpm.go @@ -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 {