php-fpm-exporter

Prometheus exporter for php-fpm status.

  • Owner: bakins/php-fpm-exporter
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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.

Main metrics

Overview
Name With Ownerbakins/php-fpm-exporter
Primary LanguageGo
Program languageGo (Language Count: 3)
Platform
License:MIT License
所有者活动
Created At2017-05-22 18:26:41
Pushed At2023-08-17 12:31:22
Last Commit At2023-03-07 13:18:05
Release Count10
Last Release Namev0.6.1 (Posted on )
First Release Namev0.1.0 (Posted on )
用户参与
Stargazers Count207
Watchers Count6
Fork Count49
Commits Count43
Has Issues Enabled
Issues Count21
Issue Open Count12
Pull Requests Count18
Pull Requests Open Count6
Pull Requests Close Count4
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private