Page 1 of 1

No Trap notification or NSTI after upgrade to XI 2014R1.5

Posted: Fri Nov 07, 2014 8:05 am
by vijilants
Hi,

I have upgraded to Nagios XI 2014R1.5 on my Centos 6.4 system but the NSTI has stopped working from the date of the upgrade...also there are no longer any SNMP Trap notifications being generated in Nagios which is far more important because it would appear that the traps are not going beyond entering the system.

I have both XI and NSTI running on the same platform.

When I went to restart snmpttsystem.log what i noticed in the log was an upgrade from v1.3 to v1.4beta

Code: Select all

Fri Nov  7 06:57:59 2014 SNMPTT v1.3 shutdown
Fri Nov  7 06:57:59 2014 Total traps received=278440,Total traps translated=58435,Total traps ignored=0,Total unknown traps=225628
Fri Nov  7 06:58:01 2014 SNMPTT v1.4beta2 started
Fri Nov  7 06:58:01 2014 Loading /etc/snmp/snmptt.conf
Fri Nov  7 06:58:01 2014 Finished loading 693 lines from /etc/snmp/snmptt.conf
Fri Nov  7 06:58:01 2014 Loading /etc/snmp/snmptt.conf.cisco_3
Fri Nov  7 06:58:01 2014 Finished loading 2588 lines from /etc/snmp/snmptt.conf.cisco_3
Fri Nov  7 06:58:01 2014 Loading /etc/snmp/snmptt.conf.adtran
Fri Nov  7 06:58:01 2014 Finished loading 10677 lines from /etc/snmp/snmptt.conf.adtran
Fri Nov  7 06:58:01 2014 Loading /etc/snmp/snmptt.conf.loop
Fri Nov  7 06:58:01 2014 Finished loading 109 lines from /etc/snmp/snmptt.conf.loop
Fri Nov  7 06:58:01 2014 Changing to UID: snmptt (495)
So, I followed this thread ...http://support.nagios.com/forum/viewtop ... 22&t=29569 and got to the point where it says
Let's do a few things.

On NSTI server:
tcpdump port 162
Generate a trap with your software
You should see some additional lines come in saying the IP of the host sending the trap. This means the system is seeing the trap come in.

On NSTI server:
service snmptt stop
Generate a trap
You should see a file generated in /var/spool/snmptt/. This means that trapd is recieving them properly!

On NSTI server:
service snmptt start
tail -f /var/log/snmp/snmptt.log
generate a trap
If that does not show additional output:
tail -f /var/log/snmp/snmptt_unknown.log
generate a trap

This is testing to see if snmptt knows agbout the trap or not. If you see it in snmptt.log, you already have the mib added and handled properly. If not and it shows in unknown, we need to do some additional steps. If you don't see it in either we need to turn on deeper debugging and take a closer look.
When it comes to the first part of the test to traps coming on port 162 with a tcpdump I see them coming in.

However when I stop snmptt and generate a trap I do not see a file generated in /var/spool/snmptt/.

Can you please advise ?

Many Thanks

Re: No Trap notification or NSTI after upgrade to XI 2014R1.

Posted: Fri Nov 07, 2014 1:43 pm
by sreinhardt
WOW! Thanks for following the previous thread and getting to a point where it didn't look right! Thats awesome!

Anyway... Let's take a look at permissions. More than likely the update from 1.3 to 1.4 caused permission changes for the rpm change. Try the following:

ll /var/log/snmptt/
ll -d /var/log/snmptt/
ll /var/spool/snmptt
ll -d /var/spool/snmptt

You can also reset to correct permissions for use with nagios with these:

chown root:nagios /etc/snmp/snmptt.ini /etc/snmp/snmptt.conf /etc/snmp /usr/local/bin/addmib
chmod g+w /etc/snmp/snmptt.ini /etc/snmp
chmod g+x /usr/local/bin/addmib
chown -R snmptt:snmptt /var/spool/snmptt /var/log/snmptt
chmod -R ug+wx /var/spool/snmptt /var/log/snmptt

If you use these, you need to be sure that /etc/snmp/snmptt.ini has the user and group both set to snmptt, as root or empty will just keep breaking it on you.

Re: No Trap notification or NSTI after upgrade to XI 2014R1.

Posted: Mon Nov 10, 2014 4:35 am
by vijilants
Hi Spenser,

Many thanks for your response.

I managed to fix the problem by rerunning the
sh ./NagiosXI-SNMPTrap-setup.sh
script.

Does this mean that I should still change the permissions as you requested ?

Many Thanks

Re: No Trap notification or NSTI after upgrade to XI 2014R1.

Posted: Mon Nov 10, 2014 2:03 pm
by tmcdonald
If the settings you have do not match what Spenser posted, then it might be a good idea to correct them. However if you re-ran the script and everything is working then they should be working alright anyway.

Re: No Trap notification or NSTI after upgrade to XI 2014R1.

Posted: Tue Nov 18, 2014 8:38 am
by vijilants
Thank you