In Servcies > Unbound > Advanced > Enable Extended Statistics
Then create this script, hopefully this lasts across a upgrade (need to test this). I did test a reboot, and it does persist.
vi /usr/local/etc/rc.syshook.d/start/99-snmp-unbound-extend.sh
---BEGIN SCRIPT---
mkdir -p /usr/local/share/snmp_extends
echo "#\!/bin/sh" > /usr/local/share/snmp_extends/unbound
echo "/usr/local/sbin/unbound-control -c /var/unbound/unbound.conf stats" >> /usr/local/share/snmp_extends/unbound
chmod +x /usr/local/share/snmp_extends/unbound
if ! grep -q "extend.*unbound" /usr/local/share/snmp/snmpd.conf; then
echo "extend unbound /usr/local/share/snmp_extends/unbound" >> /usr/local/share/snmp/snmpd.conf
fi
service snmpd restart
---END SCRIPT---
chmod +x /usr/local/etc/rc.syshook.d/start/99-snmp-unbound-extend.sh
Run the script and then in LibreNMS enable the Unbound app under the firewall.
Then create this script, hopefully this lasts across a upgrade (need to test this). I did test a reboot, and it does persist.
vi /usr/local/etc/rc.syshook.d/start/99-snmp-unbound-extend.sh
---BEGIN SCRIPT---
mkdir -p /usr/local/share/snmp_extends
echo "#\!/bin/sh" > /usr/local/share/snmp_extends/unbound
echo "/usr/local/sbin/unbound-control -c /var/unbound/unbound.conf stats" >> /usr/local/share/snmp_extends/unbound
chmod +x /usr/local/share/snmp_extends/unbound
if ! grep -q "extend.*unbound" /usr/local/share/snmp/snmpd.conf; then
echo "extend unbound /usr/local/share/snmp_extends/unbound" >> /usr/local/share/snmp/snmpd.conf
fi
service snmpd restart
---END SCRIPT---
chmod +x /usr/local/etc/rc.syshook.d/start/99-snmp-unbound-extend.sh
Run the script and then in LibreNMS enable the Unbound app under the firewall.
"