Page 2 of 2

Re: SNMP Trap Sender

Posted: Fri Jul 17, 2015 1:48 pm
by r34220
Nagios XI 2014R2.7

Re: SNMP Trap Sender

Posted: Fri Jul 17, 2015 1:51 pm
by ssax
Ok, I noticed from your screenshot that your tcpdump is listening on eth9, is that the proper one?

Have you checked on the destination server at all?

Re: SNMP Trap Sender

Posted: Fri Jul 17, 2015 2:08 pm
by r34220
yes, is correct. If I run snmptrap from command line with nagios user trap is sent even though there are errors about snmpapp.conf.

Code: Select all

[nagios@az84mon11v ~]$ /usr/bin/snmptrap -v 2c -c public 10.48.0.33:1162 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "MYHOST" nSvcDesc s "THISSERVICE" nSvcStateID i 1 nSvcOutput s "HELLO WORLD"
No log handling enabled - turning on stderr logging
Cannot rename /var/lib/net-snmp/snmpapp.conf to /var/lib/net-snmp/snmpapp.0.conf
Cannot unlink /var/lib/net-snmp/snmpapp.conf
read_config_store open failure on /var/lib/net-snmp/snmpapp.conf
read_config_store open failure on /var/lib/net-snmp/snmpapp.conf
read_config_store open failure on /var/lib/net-snmp/snmpapp.conf

Code: Select all

[root@az84mon11v ~]# tcpdump udp dst port 1162
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth9, link-type EN10MB (Ethernet), capture size 65535 bytes
12:04:42.316952 IP az84mon11v.am.freescale.net.35528 > AZ84SOFTEVAL01C.am.freescale.net.health-trap: UDP, length 177

Re: SNMP Trap Sender

Posted: Sun Jul 19, 2015 7:28 pm
by Box293
I ran your test and did not get those errors.

What are the permissions on the file?

Code: Select all

ls -al /var/lib/net-snmp/snmpapp.conf

Re: SNMP Trap Sender

Posted: Sun Jul 19, 2015 8:22 pm
by r34220
Here are the permissions.

Code: Select all

[root@az84mon11v ~]# ls -al /var/lib/net-snmp/snmpapp.conf
-rw------- 1 root root 675 Jul 17 12:22 /var/lib/net-snmp/snmpapp.conf

Re: SNMP Trap Sender

Posted: Mon Jul 20, 2015 12:45 pm
by ssax
I get the same errors when running the snmptrap command as the nagios user and mine works properly. Let me dig into the code to see if we have any additional logging we can look at.

Re: SNMP Trap Sender

Posted: Mon Jul 20, 2015 12:53 pm
by ssax
Post the full output of this command:

Code: Select all

echo "select value from xi_options where name = 'snmptrapsender_component_options';" | psql nagiosxi nagiosxi
You may want to try downloading the snmptrapsender component again:

https://assets.nagios.com/downloads/nag ... sender.zip

Then go to Admin > Manage Components and re-upload the component so that it re-installs and try it again.