PHP-FPM
A small shell script that reports the status of PHP-FPM (FastCGI Process Manager).
Install prereqs
apt-get install libfile-slurp-perl libjson-perl libstring-shellquote-perl libmime-base64-perl
pkg install p5-File-Slurp p5-JSON p5-String-ShellQuote p5-MIME-Base64
dnf install perl-JSON perl-File-Slurp perl-String-ShellQuote
Agent or SNMP Extend
-
Copy the shell script, phpfpmsp, to the desired host
wget https://github.com/librenms/librenms-agent/raw/master/snmp/php-fpm -O /etc/snmp/php-fpm -
Make the script executable.
chmod +x /etc/snmp/php-fpm -
Edit your
snmpd.conffile, usually/etc/snmp/snmpd.conf, and add:extend phpfpmsp /etc/snmp/php-fpm -
Create the config file
/usr/local/etc/php-fpm_extend.json. Other locations are specified using the the-fswitch. Akin to like below. For more information, see/etc/snmp/php-fpm --help.{ "pools":{ "thefrog": "https://thefrog/fpm-status", "foobar": "https://foo.bar/fpm-status" } } -
Restart snmpd on the host
sudo systemctl restart snmpdLibreNMS discovers the application automatically, as described at the
top of the page. If the discovery fails, do the steps under the SNMP Extend heading at the top of the page.
If this device has no agent, install the agent and copy the phpfpmsp script to /usr/lib/check_mk_agent/local/