PHPackages                             vntrungld/prometheus-exporter-php-fpm-collector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. vntrungld/prometheus-exporter-php-fpm-collector

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

vntrungld/prometheus-exporter-php-fpm-collector
===============================================

Php-fpm Collector for Prometheus Exporter

v1.2.0(3mo ago)03.0k↓50%MITPHPPHP ^7.2|^8.0CI passing

Since Aug 14Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/vntrungld/prometheus-exporter-php-fpm-collector)[ Packagist](https://packagist.org/packages/vntrungld/prometheus-exporter-php-fpm-collector)[ Docs](https://github.com/vntrungld/prometheus-exporter-php-fpm-collector)[ RSS](/packages/vntrungld-prometheus-exporter-php-fpm-collector/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (8)Used By (0)

Prometheus Exporter PHP-FPM Collector
=====================================

[](#prometheus-exporter-php-fpm-collector)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6571b8725e6866cd75244d17fefe072c9121825ada3734f988ef5e9c31d446e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766e7472756e676c642f70726f6d6574686575732d6578706f727465722d7068702d66706d2d636f6c6c6563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vntrungld/prometheus-exporter-php-fpm-collector)[![Total Downloads](https://camo.githubusercontent.com/e7de9813718c9d86e58d3fce868221d55a867e096345f6e8dee5af0b664bb5b9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766e7472756e676c642f70726f6d6574686575732d6578706f727465722d7068702d66706d2d636f6c6c6563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vntrungld/prometheus-exporter-php-fpm-collector)[![Tests](https://github.com/vntrungld/prometheus-exporter-php-fpm-collector/actions/workflows/tests.yml/badge.svg)](https://github.com/vntrungld/prometheus-exporter-php-fpm-collector/actions/workflows/tests.yml)[![License](https://camo.githubusercontent.com/c3bdd5b380f4e38119fd864acda693dccbc7b3de5af27429e9f894ca0a5015e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f766e7472756e676c642f70726f6d6574686575732d6578706f727465722d7068702d66706d2d636f6c6c6563746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vntrungld/prometheus-exporter-php-fpm-collector)

A PHP-FPM metrics collector for [Prometheus Exporter](https://github.com/vntrungld/prometheus-exporter) in Laravel applications. This package collects PHP-FPM pool status and process-level metrics and exposes them in Prometheus format.

Requirements
------------

[](#requirements)

LaravelPHPPackage6.x7.2 - 8.01.x7.x7.2 - 8.01.x8.x7.3 - 8.11.x9.x8.0 - 8.21.x10.x8.1 - 8.31.x11.x8.2 - 8.41.x12.x8.2 - 8.41.xInstallation
------------

[](#installation)

Install via Composer:

```
composer require vntrungld/prometheus-exporter-php-fpm-collector
```

The package uses Laravel's auto-discovery, so the service provider will be automatically registered.

Configuration
-------------

[](#configuration)

Add the collector set to your `prometheus-exporter` configuration file (`config/prometheus-exporter.php`):

```
return [
    // ... other config options

    'collector_sets' => [
        \Vntrungld\PrometheusExporterPhpFpmCollector\PhpFpmCollectorSet::class,
        // ... other collector sets
    ],
];
```

Available Metrics
-----------------

[](#available-metrics)

### Pool-Level Metrics

[](#pool-level-metrics)

Metric NameTypeDescriptionLabels`fpm_up`GaugePHP-FPM pool availability (1=up, 0=down)`pool``fpm_accepted_connections`GaugeTotal number of accepted connections`pool``fpm_active_processes`GaugeNumber of active processes`pool``fpm_idle_processes`GaugeNumber of idle processes`pool``fpm_listen_queue`GaugeCurrent listen queue size`pool``fpm_listen_queue_length`GaugeMaximum listen queue length`pool``fpm_max_active_processes`GaugeMaximum active processes reached`pool``fpm_max_children_reached`GaugeTimes max children limit was reached`pool``fpm_max_listen_queue`GaugeMaximum listen queue reached`pool``fpm_slow_requests`GaugeNumber of slow requests`pool``fpm_start_since`GaugeSeconds since FPM started`pool``fpm_total_processes`GaugeTotal number of processes in pool`pool`### Process-Level Metrics

[](#process-level-metrics)

Metric NameTypeDescriptionLabels`fpm_process_last_request_cpu`GaugeCPU usage for last request`pool`, `child``fpm_process_last_request_memory`GaugeMemory usage for last request`pool`, `child``fpm_process_request_duration`GaugeRequest duration`pool`, `child``fpm_process_request_length`GaugeRequest content length`pool`, `child``fpm_process_requests`GaugeTotal requests served by process`pool`, `child``fpm_process_state`GaugeProcess state indicator`pool`, `child`, `state`### Process States

[](#process-states)

The `fpm_process_state` metric uses the following state labels:

- `Idle` - Process is idle
- `Getting request informations` - Process is getting request info
- `Reading headers` - Process is reading request headers
- `Running` - Process is executing
- `Ending` - Process is ending request
- `Finishing` - Process is finishing

Example Output
--------------

[](#example-output)

```
# HELP fpm_up PHP-FPM pool availability
# TYPE fpm_up gauge
fpm_up{pool="www"} 1

# HELP fpm_active_processes The number of active processes
# TYPE fpm_active_processes gauge
fpm_active_processes{pool="www"} 3

# HELP fpm_idle_processes The number of idle processes
# TYPE fpm_idle_processes gauge
fpm_idle_processes{pool="www"} 2

# HELP fpm_process_state Process state indicator
# TYPE fpm_process_state gauge
fpm_process_state{pool="www",child="0",state="Idle"} 1
fpm_process_state{pool="www",child="0",state="Running"} 0
fpm_process_state{pool="www",child="1",state="Idle"} 0
fpm_process_state{pool="www",child="1",state="Running"} 1

```

PHP-FPM Configuration
---------------------

[](#php-fpm-configuration)

For this collector to work, PHP-FPM must be configured to expose status. Ensure your PHP-FPM pool configuration has:

```
pm.status_path = /status
```

The collector uses PHP's built-in `fpm_get_status()` function which is available when running under PHP-FPM.

Testing
-------

[](#testing)

Run the test suite:

```
composer test
```

Or with PHPUnit directly:

```
vendor/bin/phpunit
```

Changelog
---------

[](#changelog)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [vntrungld](https://github.com/vntrungld)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance81

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~89 days

Recently: every ~105 days

Total

7

Last Release

99d ago

Major Versions

v0.0.2 → v1.0.02024-12-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/39490e25f48deaf067db160681117abc2bdcf818fdce03a30eebc1ee25b784a0?d=identicon)[vntrungld](/maintainers/vntrungld)

---

Top Contributors

[![vntrungld](https://avatars.githubusercontent.com/u/19848743?v=4)](https://github.com/vntrungld "vntrungld (10 commits)")

---

Tags

laravelPrometheus ExporterPhp-fpm Collector

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vntrungld-prometheus-exporter-php-fpm-collector/health.svg)

```
[![Health](https://phpackages.com/badges/vntrungld-prometheus-exporter-php-fpm-collector/health.svg)](https://phpackages.com/packages/vntrungld-prometheus-exporter-php-fpm-collector)
```

###  Alternatives

[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k45.4M309](/packages/spatie-laravel-activitylog)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299549.3k1](/packages/larabug-larabug)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
