Software release: net-snmp-systemd-services-status
Puppeteers is proud to release the first version of net-snmp-systemd-services-status. It is a net-snmp pass_persist script written in Python that queries the status of all systemd services on a system, dynamically generating OIDs based on the systemd service names. This gives the services a predictable name. Querying all services on a typical Linux VM takes less than 0.2 seconds. The information is presented to snmpd in a way that both get (snmpget) and getnext (snmpwalk) work.
Extending snmpd with custom scripts
Traditional network monitoring systems tend to get their monitoring data via SNMP. In case of Linux snmpd is usually the system application that’s responsible for providing that data. The data consists mostly, but not entirely, of metrics. For example, the data contains strings such as operating system version, administrative contacts and network interface names.
It is possible to make snmpd run custom scripts and programs to gather more data from the system. The options are described in snmpd.conf man page, but here are the most important ones for this use-case:
Using snmpwalk to debug SNMPv3 issues
Our puppet-snmpd module support SNMPv3 very well across a wide range of operating systems. Because o that SNMPv3 is what we use across the board in multiple environments. However, in the rare cases when I have to debug SNMP problems I can never remember the exact snmpwalk command-lines to use. So, here is the usual way to run snmpwalk to figure out if SNMP is providing data:
$Â snmpwalk -Os -v 3 -u monitor -l authPriv -a sha -A <auth-pass> -x AES -X <encryption-pass> hostname
Run from the monitoring server (e.g. LibreNMS configured with puppet-librenms) to make sure basic connectivity and access controls are correct as well. Or against localhost if you’re interested in the data and not connectivity.