phpfpm_exporter

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

README

PHP-FPM Exporter for Prometheus Build Status

Docker Repository on Quay Docker Pulls

This repository provides code for a Prometheus metrics exporter for the PHP-FPM status page. This exporter provides several metrics listed below. It extracts these metrics from PHP-FPM by talking to FastCGI over its UNIX socket. The UNIX sockets can be specified by adding a --phpfpm.socket-paths flag for each socket to be monitored. The filename of the socket is added to each metric as a label.

This exporter also provides a way for embedding the output of arbitrary PHP scripts into its metrics page, analogous to the node exporter's textfile collector. Scripts that are specified with the --phpfpm.script-collector-paths flag will be run through PHP-FPM. Any metrics printed by the PHP script will be merged into the metrics provided by this exported. An example use case includes printing metrics for PHP's opcache.

Usage:

./phpfpm_exporter --phpfpm.socket-paths /var/run/php5-fpm_example.sock --phpfpm.script-collector-paths /some/php/script.php

Metrics emitted by PHP-FPM:

php_fpm_accepted_connections_total{socket_path="/var/run/php5-fpm_example.sock"} 300940
php_fpm_active_processes{socket_path="/var/run/php5-fpm_example.sock"} 1
php_fpm_idle_processes{socket_path="/var/run/php5-fpm_example.sock"} 5
php_fpm_listen_queue{socket_path="/var/run/php5-fpm_example.sock"} 0
php_fpm_listen_queue_length{socket_path="/var/run/php5-fpm_example.sock"} 0
php_fpm_max_active_processes{socket_path="/var/run/php5-fpm_example.sock"} 10
php_fpm_max_children_reached{socket_path="/var/run/php5-fpm_example.sock"} 3
php_fpm_max_listen_queue{socket_path="/var/run/php5-fpm_example.sock"} 0
php_fpm_slow_requests{socket_path="/var/run/php5-fpm_example.sock"} 0
php_fpm_start_time_seconds{socket_path="/var/run/php5-fpm_example.sock"} 1.49277445e+09
php_fpm_up{socket_path="/var/run/php5-fpm_example.sock"} 1

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL