LibreNMS - snmp extend php-fpm

From wiki.1001solutions.net
Revision as of 13:08, 1 May 2020 by Z (talk | contribs)



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/phpfpmsp


SNMP Configuration

Adapt your /etc/snmp/snmpd.conf with:

extend phpfpmsp /usr/bin/sudo /etc/snmp/phpfpmsp

Restart the service.


Check Command

Adapt the user and path to your configuration:

sudo -u Debian-snmp /etc/snmp/phpfpmsp


Sources