Closed w0rd-driven closed 5 years ago
Thanks for the bug report. I'm still using an older version for my production deployments. I'll take a look at this and also figure out a better way to test so I don't break others in the future. Sorry about that!
Can we get an updated Docker image for this, please? :-)
I opted to expose
/status
and/ping
per the link to easyengine but it looks like no matter what I do, it still tries to connect to fastcgi.I'm using the released version from https://github.com/bakins/php-fpm-exporter/releases/download/v0.4.1/php-fpm-exporter.linux.amd64. I'm not terribly familiar with Go but it looks like the culprit is https://github.com/bakins/php-fpm-exporter/blob/master/collector.go#L147. I'm using the options
--addr 127.0.0.1:9914 --endpoint http://localhost/status
. My gut tells me perhaps https://github.com/bakins/php-fpm-exporter/blob/master/cmd/php-fpm-exporter/main.go#L15 is the culprit if go is like other languages where an empty string pointer or string isn't nil.I'm likely wrong on the specifics but I feel like if I could somehow get line 147 to call
getDataHTTP
instead ofgetDataFastcgi
I'd get the results I'm expecting. I can verify the php-fpm status page is working with the endpoint provided so that shouldn't be the problem unless I've specified something incorrectly.