Skip to content

eta-orionis/php-fpm-exporter

This branch is 5 commits ahead of, 3 commits behind bakins/php-fpm-exporter:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Erion Elmasllari
Dec 25, 2019
a8efd32 · Dec 25, 2019

History

45 Commits
May 1, 2019
Dec 25, 2019
May 1, 2019
Dec 25, 2019
Dec 25, 2019
Oct 2, 2017
Mar 26, 2019
Mar 26, 2019
Feb 16, 2018
May 22, 2017
Mar 26, 2019
Mar 1, 2018
Dec 25, 2019
Dec 25, 2019
Dec 25, 2019
Dec 25, 2019
May 22, 2017

Repository files navigation

php-fpm-exporter

Export php-fpm metrics in Prometheus format.

See Releases for pre-built binaries.

Also availible on Docker Hub bakins/php-fpm-exporter

Build

Requires Go. Tested with Go 1.12.

Clone this repo locally and run build:

mkdir -p $HOME/src
cd $HOME/src
git clone https://github.com/bakins/php-fpm-exporter
cd php-fpm-exporter
./script/build

You should then have two executables: php-fpm-exporter.linux.amd64 and php-fpm-exporter.darwin.amd64

You may want to rename for your local OS, ie mv php-fpm-exporter.darwin.amd64 php-fpm-exporter

Running

./php-fpm-exporter --help
php-fpm metrics exporter

Usage:
  php-fpm-exporter [flags]

Flags:
      --addr string       listen address for metrics handler (default "127.0.0.1:8080")
      --endpoint string   url for php-fpm status (default "http://127.0.0.1:9000/status")
      --fastcgi string    fastcgi url. If this is set, fastcgi will be used instead of HTTP

When running, a simple healthcheck is available on /healthz

To use the HTTP endpoint you must pass through /status in your webserver and configure php-fpm to handle status requests. Example for nginx: https://easyengine.io/tutorials/php/fpm-status-page/

To use Fastcgi, set --fastcgi to a url such as tcp://127.0.0.1:9090/status if php-fpm is listening on a tcp socket or unix:///path/to/php.sock for a unix socket. Note: php-fpm must be configured to use /status if using a unix socket, php-fpm-exporter does not currently support changing this.

Metrics

Metrics will be exposes on /metrics

LICENSE

See LICENSE

loosely based on https://github.com/peakgames/php-fpm-prometheus/ which is MIT.

About

Prometheus exporter for php-fpm status.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 90.1%
  • Shell 7.7%
  • Dockerfile 2.2%