Page 2 of 2
Re: SNMP trap sender not working on 162/UDP port,
Posted: Tue Jun 28, 2016 3:45 pm
by tgriep
The settings in the Postgress database look good, so lets try this to see if this fixes it.
Go in to the SNMPTrapsender component and disable it and Apply the Settings.
Then login to the XI server as root and run the following commands to restart the nagios process.
Code: Select all
service nagios stop
service httpd stop
killall -9 nagios
service httpd start
service nagios start
Login to the XI GUI and re-enable the SNMPTrapsender component, not selecting TCP or a port.
Apply the Settings and see if it works.
Re: SNMP trap sender not working on 162/UDP port,
Posted: Tue Jun 28, 2016 4:38 pm
by tgriep
One more thing to try, run the following command on the XI server as root in a shell
Code: Select all
tail -f /usr/local/nagiosxi/var/eventman.log
Either generate an error to force a SNMPTrap to be sent, or you can wait until one happens, then when you see the snmptrap command in the shell window, post the output so we can view it.
Re: SNMP trap sender not working on 162/UDP port,
Posted: Wed Jun 29, 2016 9:45 am
by srikgali
Thank you, SNMP Trap sender is working partially now after reconfiguring the component. But it is not sending all events to the snmp manager server. I see email notification to my inbox but not sending SNMP traps for some servers. I have selected all hosts in snmp trap sender.
Re: SNMP trap sender not working on 162/UDP port,
Posted: Wed Jun 29, 2016 11:45 am
by tgriep
Did you select all Hosts, Services and Both state types?
Also, the Trap Sender is an Event Handler, if the hosts and services have that disabled, that would stop the sending of the traps for those hosts / services.
Re: SNMP trap sender not working on 162/UDP port,
Posted: Wed Jun 29, 2016 12:06 pm
by srikgali
YEs, So it will send traps when ever service or host status changes, but not every time it check. for example some service changed to critical status, it will just send 1st time, and wont send any notifications or trap till service status will be changed.
Re: SNMP trap sender not working on 162/UDP port,
Posted: Wed Jun 29, 2016 12:31 pm
by tgriep
Take a look at this link that describes when Event Handlers are ran.
https://assets.nagios.com/downloads/nag ... dlers.html