bakins / php-fpm-exporter

Prometheus exporter for php-fpm status.
MIT License
203 stars 46 forks source link

Add support for choosing the endpoint over fcgi #33

Closed Meroje closed 3 years ago

Meroje commented 5 years ago

The recently added support for fcgi socket in #23 is very nice but forcing /status is really not ideal for us, this adds support for choosing the endpoint. With this you can basically keep the old config (assuming your nginx was using the same url as pm.status_path) and add --fastcgi:
$ php-fpm-exporter --addr="127.0.0.1:8080" --endpoint="http://127.0.0.1:9000/-/php-status?text" --fastcgi="tcp://127.0.0.1:9000"

I had to clean the vendor folder as a followup to #29 because it doesn't get populated properly on a non clean environment, it should only exist in the docker build container.

bakins commented 5 years ago

Thanks for the submission! There's a lot going on here, so it may take me a bit to review it. Looks good overall at first glance, though.

bakins commented 5 years ago

@Meroje please take a look at https://github.com/bakins/php-fpm-exporter/pull/35/files which is a different approach but requires fewer changes to code.

I cleaned up the modules in https://github.com/bakins/php-fpm-exporter/pull/34

As no one has volunteered to take over ownership, I'm planning a major reorg of the code, so I don't want to inject more changes than needed right now.

Meroje commented 5 years ago

As no one has volunteered to take over ownership, I'm planning a major reorg of the code, so I don't want to inject more changes than needed right now.

Fine with me, please let me know if there are chores/issues you need help/time with.

Meroje commented 3 years ago

This has gone stale and we switched to another exporter in the meantime, I'm going to close this but feel free to take over.