Phppoolstat tallies the PHP-FPM pool workers per pool. The output of phppoolstat can be fed into Telegraf as influx format.
This tool is build for speed and a low impact on the host machine. So data is
gathered from /proc/*/cmdline
only. In the cmdline
of a process is stated
for which PHP-FPM pool the process is. More detailed explanation of the output
can be found below at measurements.
[[inputs.exec]]
commands = ["/usr/bin/phppoolstat --tag env=production"]
data_format = "influx"
The above configuration would result in output like:
> phppoolstat,env=production,pool=prd_pool count=12i 1562471764000000000
> phppoolstat,env=production,pool=acc_pool count=6i 1562471764000000000
> phppoolstat,env=production,pool=_all_ count=18i 1562471764000000000
For each pool the number of running workers is shown as an integer:
phppoolstat.count value=12
To build a package, the tool fpm is used, please follow the installation guide to be able to build a package.
The following OSes are supported:
- Debian, Ubuntu:
make deb
- CentOS, RHEL:
make rpm