Cbox FPM Exporter is a lightweight, Go-based Prometheus exporter for PHP-FPM and Laravel applications.
- 📊 PHP-FPM metrics via FastCGI (using fcgx)
- ⚙️ Automatic PHP-FPM pool discovery via
php-fpm -tt - 🧠 Opcache statistics per FPM pool
- 🚦 Laravel queue sizes, app info, cache state
- 🔌 Prometheus
/metricsendpoint + JSON at/json - 🐘 Multi-site Laravel support
📖 Full documentation available at cbox.dk/docs/fpm-exporter
Or browse the docs folder for:
# Install (auto-detects OS/arch)
curl -fsSL https://raw.githubusercontent.com/cboxdk/fpm-exporter/main/install.sh | sh
# Run with auto-discovery
fpm-exporter serve
# With Laravel monitoring (shorthand)
fpm-exporter serve --laravel App:/var/www/html
# With Laravel queues (explicit)
fpm-exporter serve \
--laravel-site name=App \
--laravel-site path=/var/www/html \
--laravel-site queues.redis=default,emails| Variable | Description | Default |
|---|---|---|
CBOX_DEBUG |
Enable debug mode | false |
CBOX_MONITOR_LISTEN_ADDR |
Listen address | :9114 |
CBOX_PHPFPM_ENABLED |
Enable PHP-FPM monitoring | true |
CBOX_PHPFPM_AUTODISCOVER |
Auto-discover pools | true |
debug: false
monitor:
listen_addr: ":9114"
phpfpm:
enabled: true
autodiscover: true
laravel:
- name: App
path: /var/www/html
queues:
redis: ["default", "emails"]See Configuration Reference for all options.
Key metrics exported:
# PHP-FPM
phpfpm_up{pool="www",socket="..."} 1
phpfpm_active_processes{pool="www"} 2
phpfpm_idle_processes{pool="www"} 3
phpfpm_max_children_reached{pool="www"} 0
# Opcache
phpfpm_opcache_hit_rate{pool="www"} 98.5
phpfpm_opcache_used_memory_bytes{pool="www"} 67108864
# Laravel
laravel_queue_size{site="App",connection="redis",queue="default"} 42
laravel_debug_mode{site="App"} 0
See Metrics Reference for the complete list.
# Build for current platform
make build
# Build all platforms
make build-allProduces static binaries (no libc dependencies) for:
fpm-exporter-linux-amd64fpm-exporter-linux-arm64fpm-exporter-darwin-amd64fpm-exporter-darwin-arm64
MIT License — © 2024–2025 Cbox