fuegas / phppoolstat

An exec input for Telegraf which tallies PHP-FPM pool workers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phppoolstat (a Telegraf exec)

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.

Example usage in Telegraf

[[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

Measurements

For each pool the number of running workers is shown as an integer:

phppoolstat.count value=12

Package building

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

About

An exec input for Telegraf which tallies PHP-FPM pool workers

License:MIT License


Languages

Language:Go 65.5%Language:Makefile 34.5%