SNMPTT does not send NOTIFICATIONS to NAGIOS
Posted: Thu Jan 30, 2014 5:14 am
Hello everybody,
I'm facing a big problem to get snmp traps from my hosts.
I'm using Nagios core 3.4.4 on a FAN distrib.
If I test manually service and host traps, it's working fine:
The command to test the service manually is:
If I shut an interface on any port, I receive the following data in /var/log/snmptt/snmptt.log
and in the /var/log/messages
AS WE CAN SEE, NO EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT is generated following the snmptt translation and THAT'S THE ORIGINE OF THE PROBLEM I THINK.
I modified the snmptt.conf.SW_C2950_IF in order to generate CRITICAL event when a port is shutdowned
Despite all these settings, no notifications is sent from NAGIOS.
What's wrong with my configuration ?
I'm facing a big problem to get snmp traps from my hosts.
I'm using Nagios core 3.4.4 on a FAN distrib.
If I test manually service and host traps, it's working fine:
The command to test the service manually is:
And in the /var/log/messages I get notifications:echo "['date +%s'] PROCESS_SERVICE_CHECK_RESULT;G2K8CATIA;TRAP;1;test" >/var/log/nagios/rw/nagios.cmd
Now if I want to test it from a CISCO switchconfigured like this:Jan 29 17:00:54 GLNXNGIOS nagios: EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;G2K8CATIA;TRAP;1;test
Jan 29 17:00:57 NXNGIOS nagios: PASSIVE SERVICE CHECK: G2K8CATIA;TRAP;1;test
Jan 29 17:00:57 NXNGIOS nagios: SERVICE ALERT: G2K8CATIA;TRAP;WARNING;HARD;1;test
Jan 29 17:00:57 NXNGIOS nagios: SERVICE NOTIFICATION: Nicolas;G2K8CATIA;TRAP;WARNING;notify-service-by-email;test
Jan 29 17:00:57 NXNGIOS nagios: SERVICE NOTIFICATION: Hotline;G2K8CATIA;TRAP;WARNING;notify-service-by-email;test
Code: Select all
snmp-server community public RO
snmp-server enable traps snmp authentication warmstart linkdown linkup coldstart
snmp-server enable traps config
snmp-server enable traps copy-config
snmp-server enable traps syslog
snmp-server enable traps entity
snmp-server enable traps flash insertion removal
snmp-server enable traps bridge
snmp-server enable traps stpx
snmp-server enable traps rtr
snmp-server enable traps c2900
snmp-server enable traps vtp
snmp-server enable traps vlancreate
snmp-server enable traps vlandelete
snmp-server enable traps port-security
snmp-server enable traps MAC-Notification
snmp-server enable traps envmon fan shutdown supply temperature status
snmp-server enable traps hsrp
snmp-server enable traps cluster
snmp-server enable traps vlan-membership
snmp-server host 128.1.xxx.yyy version 2c publicIf I shut an interface on any port, I receive the following data in /var/log/snmptt/snmptt.log
Code: Select all
Wed Jan 29 15:00:27 2014 .1.3.6.1.4.1.9.9.43.2.0.1 Normal "Status Events" sw_arb_114_11 - Notification of a configuration management event as 1 2 3
Wed Jan 29 15:00:27 2014 .1.3.6.1.4.1.9.9.43.2.0.1 Normal "Status Events" sw_arb_114_11 - Notification of a configuration management event as 1 2 3
Wed Jan 29 15:01:05 2014 .1.3.6.1.6.3.1.1.5.3 CRITICAL "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 ethernetCsmacd administratively down
Wed Jan 29 15:01:05 2014 .1.3.6.1.6.3.1.1.5.3 CRITICAL "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 ethernetCsmacd administratively down
Wed Jan 29 15:01:05 2014 .1.3.6.1.6.3.1.1.5.3 CRITICAL "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 ethernetCsmacd administratively down
Wed Jan 29 15:01:05 2014 .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 ethernetCsmacd administratively down
Wed Jan 29 15:01:05 2014 .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 ethernetCsmacd administratively down
Wed Jan 29 15:01:05 2014 .1.3.6.1.6.3.1.1.5.3 CRITICAL "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 6 administratively down
Wed Jan 29 15:01:05 2014 .1.3.6.1.6.3.1.1.5.3 CRITICAL "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 6 administratively down
Wed Jan 29 15:01:05 2014 .1.3.6.1.6.3.1.1.5.3 CRITICAL "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 6 administratively down
Wed Jan 29 15:01:05 2014 .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 6 administratively down
and in the /var/log/messages
Code: Select all
Jan 29 15:01:05 GLNXNGIOS snmptrapd[2814]: 2014-01-29 15:01:05 sw_arb_114_11.mydom.com [UDP: [128.1.xxx.yyy]:54188]: .1.3.6.1.2.1.1.3.0 = Timeticks: (70548266) 8 days, 3:58:02.66 .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.6.3.1.1.5.3 .1.3.6.1.2.1.2.2.1.1.3 = INTEGER: 3 .1.3.6.1.2.1.2.2.1.2.3 = STRING: FastEthernet0/3 .1.3.6.1.2.1.2.2.1.3.3 = INTEGER: ethernetCsmacd(6) .1.3.6.1.4.1.9.2.2.1.1.20.3 = STRING: "administratively down"
Jan 29 15:01:10 GLNXNGIOS snmptt[2786]: .1.3.6.1.6.3.1.1.5.3 CRITICAL "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 ethernetCsmacd administratively down
Jan 29 15:01:10 GLNXNGIOS last message repeated 2 times
Jan 29 15:01:10 GLNXNGIOS snmptt[2786]: .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 ethernetCsmacd administratively down
Jan 29 15:01:10 GLNXNGIOS snmptt[2786]: .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 ethernetCsmacd administratively down
Jan 29 15:01:10 GLNXNGIOS snmptt[2786]: .1.3.6.1.6.3.1.1.5.3 CRITICAL "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 6 administratively down
Jan 29 15:01:10 GLNXNGIOS last message repeated 2 times
Jan 29 15:01:10 GLNXNGIOS snmptt[2786]: .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 6 administratively down
Jan 29 15:01:10 GLNXNGIOS snmptt[2786]: .1.3.6.1.6.3.1.1.5.3 Normal "Status Events" sw_arb_114_11 - A linkDown trap signifies that the SNMP entity, acting in 3 FastEthernet0/3 6 administratively down
AS WE CAN SEE, NO EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT is generated following the snmptt translation and THAT'S THE ORIGINE OF THE PROBLEM I THINK.
I modified the snmptt.conf.SW_C2950_IF in order to generate CRITICAL event when a port is shutdowned
Code: Select all
MIB: IF-MIB (file:/TEMP/IF-MIB.mib) converted on Thu Jan 16 14:40:26 2014 using snmpttconvertmib v1.3
#
#
#
EVENT linkDown .1.3.6.1.6.3.1.1.5.3 "Status Events" CRITICAL
FORMAT A linkDown trap signifies that the SNMP entity, acting in $*
EXEC /usr/local/nagios/libexec/eventhandlers/submit_check_result $r TRAP 1 "A linkDown trap signifies that the SNMP entity, acting in $*"
SDESC
A linkDown trap signifies that the SNMP entity, acting in
an agent role, has detected that the ifOperStatus object for
one of its communication links is about to enter the down
state from some other state (but not from the notPresent
state). This other state is indicated by the included value
of ifOperStatus.
Variables:
1: ifIndex
2: ifAdminStatus
3: ifOperStatus
EDESC
#
Despite all these settings, no notifications is sent from NAGIOS.
What's wrong with my configuration ?