SNMP Trap Sender

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: SNMP Trap Sender

Post by r34220 »

Nagios XI 2014R2.7
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP Trap Sender

Post 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?
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: SNMP Trap Sender

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: SNMP Trap Sender

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: SNMP Trap Sender

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP Trap Sender

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP Trap Sender

Post 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.
Locked