Raspberry PI
SNMP extend script to get your PI data into your host.
SNMP Extend
-
Download the script onto the desired host
wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/raspberry.sh -O /etc/snmp/raspberry.sh
-
Make the script executable
chmod +x /etc/snmp/raspberry.sh
-
Edit your snmpd.conf file (usually
/etc/snmp/snmpd.conf
) and add:extend raspberry /usr/bin/sudo /bin/sh /etc/snmp/raspberry.sh
-
Edit your sudo users (usually
visudo
) and add at the bottom:snmp ALL=(ALL) NOPASSWD: /bin/sh /etc/snmp/raspberry.sh
Note
If you are using Raspian, the default user is Debian-snmp
. Change snmp
above to Debian-snmp
. You can verify the user snmpd is using with ps aux | grep snmpd
- Restart snmpd on PI host