LibreNMS - snmp extend php-fpm
From Wiki.IT-Arts.net
NginX LibreNMS script
Get the script:
wget https://github.com/librenms/librenms-agent/raw/master/snmp/phpfpmsp -O /etc/snmp/phpfpmsp
Unzip and copy it where you need. Make it executable.
Adapt:
url="http://127.0.0.1/status?full"
sudo Configuration
Adapt your /etc/sudoers with:
Debian-snmp ALL=(ALL) NOPASSWD: /etc/snmp/fail2ban
SNMP Configuration
Adapt your /etc/snmp/snmpd.conf with:
extend fail2ban /usr/bin/sudo /etc/snmp/fail2ban -c -U
Restart the service.
Crontab
Add to the crontab:
*/3 * * * * root /etc/snmp/fail2ban -u
Check Command
Adapt the user and path to your configuration:
sudo -u Debian-snmp /etc/snmp/fail2ban
In case of bug with the Perl @NIC, execute:
cpan JSON
Sources