After deploying Oberservium around my home infrastructure, clearly a dull evening. I wondered if it was possible to monitor my vCenter instance, at the end of the day it’s still a linux instance. Logging into the VCSA with ssh and looking around revealed that net-snmp wasn’t installed and obviously this is a requirement for snmp monitoring of a host.
These two rpms need to be downloaded and installed first as a requirement for net-snmp.
2. SLES 11 SP2:
To install net-snmp the correct repository needs adding to YaST2.
3. Post-install configuration:
This file will be installed by default, and ideally should be moved/backed up and replaced with a simple version 2c config containing the following:
rocommunity <community name> syslocation <location> syscontact <contact details>
System startup details:
chkconfing on snmpd /etc/init.d/snmpd start
4. Firewall / Host access
At this point the snmpd daemon will be running and this can be tested by looking at what ports are listening on VCSA host e.g:
netstat -an | grep 161
However nothing external will be able to connect to this host until the tcpwrappers configuration is modified (this took me about 40 minutes of fiddling to notice (who uses tcpwrappers anymore 😐 )). The following line (WARNING: this allows all hosts access) will need adding to /etc/hosts.allow
snmpd: ALL : ALLOW
5. External testing
From another host preferably on the same network/subnet (avoiding any other firewalls in this instance) test access with snmpwalk e.g:
snmpwalk -v 2c -c <community name> <vcsa host address/IP>