All Projects → Lusitaniae → Phpfpm_exporter

Lusitaniae / Phpfpm_exporter

Licence: apache-2.0
Prometheus exporter for PHP-FPM.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Phpfpm exporter

Statsd exporter
StatsD to Prometheus metrics exporter
Stars: ✭ 608 (+1092.16%)
Mutual labels:  prometheus, prometheus-exporter
Promcord
📊 Analyze your entire discord guild in grafana using prometheus. Message, User, Game and Voice statistics...
Stars: ✭ 39 (-23.53%)
Mutual labels:  prometheus, prometheus-exporter
Snmp exporter
SNMP Exporter for Prometheus
Stars: ✭ 705 (+1282.35%)
Mutual labels:  prometheus, prometheus-exporter
Statping
Status Page for monitoring your websites and applications with beautiful graphs, analytics, and plugins. Run on any type of environment.
Stars: ✭ 5,806 (+11284.31%)
Mutual labels:  prometheus, prometheus-exporter
Zk Exporter
Exposes monitoring metrics for Apache Zookeeper to Prometheus
Stars: ✭ 27 (-47.06%)
Mutual labels:  prometheus, prometheus-exporter
Nexclipper
Metrics Pipeline for interoperability and Enterprise Prometheus
Stars: ✭ 533 (+945.1%)
Mutual labels:  prometheus, prometheus-exporter
Postgresql exporter
A Prometheus exporter for some postgresql metrics
Stars: ✭ 26 (-49.02%)
Mutual labels:  prometheus, prometheus-exporter
Consul exporter
Exporter for Consul metrics
Stars: ✭ 323 (+533.33%)
Mutual labels:  prometheus, prometheus-exporter
Kafka exporter
Kafka exporter for Prometheus
Stars: ✭ 996 (+1852.94%)
Mutual labels:  prometheus, prometheus-exporter
Prometheus Tor exporter
Prometheus exporter for the TOR daemon
Stars: ✭ 20 (-60.78%)
Mutual labels:  prometheus, prometheus-exporter
Nginx Vts Exporter
(NOT MAINTAINED) Simple server that scrapes Nginx vts stats and exports them via HTTP for Prometheus consumption
Stars: ✭ 477 (+835.29%)
Mutual labels:  prometheus, prometheus-exporter
Iperf3 exporter
Simple server that probes iPerf3 endpoints and exports results via HTTP for Prometheus consumption
Stars: ✭ 30 (-41.18%)
Mutual labels:  prometheus, prometheus-exporter
Haproxy exporter
Simple server that scrapes HAProxy stats and exports them via HTTP for Prometheus consumption
Stars: ✭ 465 (+811.76%)
Mutual labels:  prometheus, prometheus-exporter
Mongodb exporter
A Prometheus exporter for MongoDB including sharding, replication and storage engines
Stars: ✭ 602 (+1080.39%)
Mutual labels:  prometheus, prometheus-exporter
Pihole Exporter
A Prometheus exporter for PI-Hole's Raspberry PI ad blocker
Stars: ✭ 352 (+590.2%)
Mutual labels:  prometheus, prometheus-exporter
Ebpf exporter
Prometheus exporter for custom eBPF metrics
Stars: ✭ 829 (+1525.49%)
Mutual labels:  prometheus, prometheus-exporter
Kube State Metrics
Add-on agent to generate and expose cluster-level metrics.
Stars: ✭ 3,433 (+6631.37%)
Mutual labels:  prometheus, prometheus-exporter
Kminion
KMinion is a feature-rich Prometheus exporter for Apache Kafka written in Go. It is lightweight and highly configurable so that it will meet your requirements.
Stars: ✭ 274 (+437.25%)
Mutual labels:  prometheus, prometheus-exporter
Json Exporter
Prometheus exporter which fetches JSON from a URL and exports one of the values as gauge metrics
Stars: ✭ 26 (-49.02%)
Mutual labels:  prometheus, prometheus-exporter
Unifiedmetrics
Fully-featured metrics collection agent for Minecraft servers. Supports Prometheus and InfluxDB. Dashboard included out-of-box.
Stars: ✭ 29 (-43.14%)
Mutual labels:  prometheus, prometheus-exporter

PHP-FPM Exporter for Prometheus Build Status

GitHub release GitHub Downloads Docker Repository on Quay Docker Pulls

Prometheus Exporter for the PHP-FPM status page.

Metrics are scrapped via unix socket and made available on port 9253.

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:

Run the exporter

./phpfpm_exporter --phpfpm.socket-paths /var/run/phpfpm.sock

Include additional metrics from a PHP script

E.g. export OPcache metrics (using contrib/php_opcache_exporter.php)

Bear in mind these metrics are global, all FPM pools share the same cache.

./phpfpm_exporter --phpfpm.socket-paths /var/run/phpfpm.sock \
--phpfpm.script-collector-paths /usr/local/bin/php_exporter/phpfpm_opcache_exporter.php

Run with Docker

SOCK="/run/php/php7.2-fpm.sock"; \
docker run -d -p 9253:9253 -v $SOCK:$SOCK  \
lusotycoon/phpfpm-exporter \
--phpfpm.socket-paths=$SOCK

Help on flags

./phpfpm_exporter -h
usage: phpfpm_exporter [<flags>]

Flags:
  -h, --help     Show context-sensitive help (also try --help-long and --help-man).
      --web.listen-address=":9253"
                 Address to listen on for web interface and telemetry.
      --web.telemetry-path="/metrics"
                 Path under which to expose metrics.
      --phpfpm.socket-paths=PHPFPM.SOCKET-PATHS ...
                 Path(s) of the PHP-FPM sockets.
      --phpfpm.socket-directories=PHPFPM.SOCKET-DIRECTORIES ...
                 Path(s) of the directory where PHP-FPM sockets are located.
      --phpfpm.status-path="/status"
                 Path which has been configured in PHP-FPM to show status page.
      --version  Print version information.
      --phpfpm.script-collector-paths=PHPFPM.SCRIPT-COLLECTOR-PATHS ...
                 Paths of the PHP file whose output needs to be collected.

When using --phpfpm.socket-directories make sure to use dedicated directories for PHP-FPM sockets to avoid timeouts.

Metrics emitted by PHP-FPM:

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

Requirements

The FPM status page must be enabled in every pool you'd like to monitor by defining pm.status_path = /status.

Grafana Dashboards

There's multiple grafana dashboards available for this exporter, find them at the urls below or in contrib/.

Basic: for analyzing a single fpm pool in detail.

Multi Pool: for analyzing a cluster of fpm pools.

Basic: basic

Multi Pool: multi pool

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].