SNMP Traps not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mzoumboulakis
Posts: 2
Joined: Thu Jul 25, 2013 9:53 am

SNMP Traps not working

Post by mzoumboulakis »

Hello,

I'm in the process of evaluating Nagios XI (2012R2.2 running on CentOS 6.4 i686) and I'm having trouble integrating the SNMP Traps functionality.
I've followed this document http://assets.nagios.com/downloads/nagi ... ith_XI.pdf and the Nagios XI server receives traps, SNMPTT does its bit (the traps are processed according to /var/log/snmptt/snmptt.log), the hostname matches exactly the hostname of the monitored hosts in NagiosXI, BUT, the service status in Nagios XI is always "Waiting for traps..."

I have some familiarity with processing (successfully) traps in Nagios Core - in Nagios XI, the documentation seems to be missing what program should be executed when a trap is received i.e. the EXEC part of snmptt.conf. In Nagios Core we used to execute /usr/local/nagios/libexec/eventhandlers/submit_check_result but this doesn't exist in Nagios XI.
Can you please tell me if I'm missing something obvious?

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SNMP Traps not working

Post by scottwilkerson »

If you installed the rpm from the document it should have put in a script /usr/local/bin/snmptraphandling.py

Code: Select all

EXEC /usr/local/bin/snmptraphandling.py ...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mzoumboulakis
Posts: 2
Joined: Thu Jul 25, 2013 9:53 am

Re: SNMP Traps not working

Post by mzoumboulakis »

Thanks for that, it's all working now. The system had its own snmptt and I didn't read the doc carefully enough to note that Nagios supplied a different one.

IMHO, the document can be improved by adding a couple of lines to say that you need to translate your MIBs with a command such as:

Code: Select all

snmpttconvertmib --in=/usr/share/snmp/mibs/cpqhlth.mib --out=/etc/snmp/compaq.conf --exec='/usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*"'
And then adding the contents of the .conf file to /etc/snmp/snmptt.conf.

And you need to configure your snmptrapd by adding the -On option in /etc/init.d/snmptrapd.

Thanks
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SNMP Traps not working

Post by lmiltchev »

I'm glad it's working now. Thanks for the tips on improving our docs!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked