GithubHelp home page GithubHelp logo

denfm / php-fpm-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bakins/php-fpm-exporter

0.0 0.0 0.0 1.88 MB

Prometheus exporter for php-fpm status.

License: MIT License

Go 88.43% Shell 9.02% Dockerfile 2.55%

php-fpm-exporter's Introduction

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.

php-fpm-exporter's People

Contributors

andrewhowdencom avatar bakins avatar dbaklikov avatar j5lx avatar mikn avatar rthornton128 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.