SNMP Monitoring and Configuration for Networks and Linux Host Monitoring
Andrew Bolster
Senior R&D Manager (Data Science) at Black Duck Software and Treasurer @ Bsides Belfast and NI OpenGovernment Network
TL:DR: Setting up Observium to perform autodiscovery with dynamic DNS, and sample snmp configs to manage Linux servers
This week I’ve taken a ‘break’ from the academics since I nearly killed myself sorting out some research for TrustCom (Fingers crossed), and I’ve been engrossed in redoing the network here in our University of Liverpool research lab.
Good network and system monitoring tools are hard to come by, especially for free and with decent OSS tendencies.
Observium definitly qualifies on both, with really clear installation instructions that I won’t even pretend to be able to extend.
One thing that is missing however is true auto-discovery of systems in networks; Observium has an extremely powerful SNMP service discovery and polling system that, again, I can’t fault. Host discovery is another matter.
Earlier this week I did battle with Dynamic DNS updates (DHCP telling DNS who appeared so, myrandomhostname.domain.com actually resolves to that device if they’re in the lab and doesn’t if they’re not. I’m not quite done licking my wounds from that particular battle so I’ll maybe write that up some other time.
But, it means that we have and expect to have devices flowing in and out of the lab fairly regularly, and it’d be nice to keep track of things dynamically.
End Goals
- Automated host discovery from nameserver
- Sensible SNMP configuration for linux hosts
(These solution files look like crap on smaller browsers, but they’re cleanly copy/pastable)
Solution 1:
server:/etc/cron.d/observium_discoverer
Solution 2:
Required Packages:
clients:/etc/default/snmpd
clients:/etc/snmp/snmpd.conf
Problems Experienced following other instructions (AKA Google Search Foo)
Lots of these while trying to get the SNMP client to respond sensibly
/etc/snmp/snmpd.conf: line XXX: Error: Unknown payload OID
trigger OID: fileErrorFlag
/etc/snmp/snmpd.conf: line 88: Error: Already have an entry for this process.
duplicate table data attempted to be entered. row exists
Error opening specified endpoint "udp:161"