October 5, 2011 2:11 PM
Monitoring SNMP Traps from ESX hosts in Opsview (Part 2)
aptitude install snmpd2. Edit /etc/snmp/snmpd.conf and uncomment “master agentx”. 3. Edit /etc/default/snmpd (or /etc/snmp/snmptrapd.conf on newer systems):
TRAPDRUN=yes TRAPDOPTS='-t -m ALL -M /usr/share/snmp/mibs:/usr/local/nagios/snmp/load -p /var/run/snmptrapd.pid' SNMPDOPTS='-u nagios -Lsd -Lf /dev/null -p/var/run/snmpd.pid'4. Edit /etc/snmp/snmptrapd.conf and add the following lines:
traphandle default /usr/local/nagios/bin/snmptrap2nagios disableAuthorization yesPlease note that this will make the server listen to and handle any SNMP traps it receives, regardless of source. 5. Restart snmpd and snmptrapd:
/etc/init.d/snmpd restart6. Edit the /etc/sudoers file to allow Opsview to restart snmpd and snmptrapd:
nagios ALL=NOPASSWD:/usr/local/nagios/bin/snmpd reload7. Test the permissions:
su - nagios sudo /usr/local/nagios/bin/snmpd reload8. Exit back to the root user and restart opsview-web:
/etc/init.d/opsview-web restartThat’s all. Opsview should now be able to handle traps sent to it.



