Page 1 of 1

NXTI & SNMP Traps (Nagios 5.5.3)

Posted: Thu Dec 20, 2018 8:31 am
by dhatha03
Hello,
I am trying to configure Nagios XI 5.5.3 so that when I receive a linkDown/linkUp trap from a Cisco switch it alerts. I have been successful in generating the trap and viewing it in /var/log/snmptt/snmptt.log. My goal is to create individual services on the host within Nagios to handle the linkDown/linkUp traps for a specific interface. I also want the service to go back to the OK state when a linkUp trap is sent for the specific interface. So far, I have been able to do this by modifying the EXEC line in /etc/snmp/snmptt.conf for linkUp/linkDown to include "Interface: $2" instead of "SNMP Traps."

This seems to work, however I still receive an "Unconfigured Object" from the switch list "SNMP Traps" as the service. I suspect this is coming from snmptt.conf.nxti. Within the GUI, Admin->SNMP Trap Interface->Defined Traps, I find linkUp and linkDown. Within these definitions I modify "Service Description" from the default value to "Interface $2." This does not change the results and no changes are made to snmptt.conf.nxti file. The snmptt.conf.nxti still includes "SNMP Traps." The only way I can get SNMP Traps to stop appearing in the "Unconfiugred Objects" is to manually edit the snmptt.conf.nxti file to include "Interface $2."

I'm I doing something wrong? It was my understanding that I should no longer be using snmptt.conf and should not be manually editing the snmptt.conf.nxti file? The permissions for the files are as follows:

ls -al /etc/
drwxrwxr-x 3 root nagios 4096 Dec 20 13:29 snmp

ls -al /etc/snmp/
-rw------- 1 root root 18861 Mar 22 2017 snmpd.conf
-rw------- 1 root root 68 Dec 19 19:48 snmptrapd.conf
-rw-r--r-- 1 root root 2815 Dec 19 21:20 snmptt.conf
-rw-r--r-- 1 root root 28285 Dec 19 21:09 snmptt.conf.nxti
-rw-rw-r-- 1 apache nagios 26348 Oct 5 17:02 snmptt.ini
-rw-rw-r-- 1 root nagios 28285 Dec 19 21:49 snmptt_nxti.bak

Re: NXTI & SNMP Traps (Nagios 5.5.3)

Posted: Thu Dec 20, 2018 9:05 am
by dhatha03
Update, I am now able to make changes to the service description in the GUI and it now updates snmptt.conf.nxti. I changed the permissions and allowed the nagios group to write to the following files:

WAS:
-rw-r--r-- 1 root root 2815 Dec 19 21:20 snmptt.conf
-rw-r--r-- 1 root root 28285 Dec 19 21:09 snmptt.conf.nxti

NOW:
-rw-rw-r-- 1 root nagios 0 Dec 20 13:50 snmptt.conf
-rw-rw-r-- 1 root nagios 28287 Dec 20 13:56 snmptt.conf.nxti

I also removed all entries in snmptt.conf. I am now experiencing the following issue:
  • linkDown trap received in Nagios and alerted, as expected
  • When bringing the link up I see the "linkUp" entry in /var/log/snmptt/snmptt.log, but it never clears the trap under the host in Nagios
Do I need these entries in snmptt.conf?

Re: NXTI & SNMP Traps (Nagios 5.5.3)

Posted: Thu Dec 20, 2018 9:35 am
by dhatha03
Update #2:
I was able to get this working. When I changed the Severity variable to "Parse Severity Level ($s)," in the GUI for both linkDown and linkUp, it successfully alerted and cleared.

This can be closed.

Re: NXTI & SNMP Traps (Nagios 5.5.3)

Posted: Thu Dec 20, 2018 4:00 pm
by benjaminsmith
@dhatha03,

Glad you got it working, and thanks for the update. Closing.