oid the same for critical and clear snmp traps

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brudnick
Posts: 37
Joined: Mon Feb 17, 2014 3:17 pm

oid the same for critical and clear snmp traps

Post by brudnick »

Hello all

I am working with our infoblox system and receiving traps from it. Unfortunately the oid for the alert and clear are the same. Is there anyway to make Nagios recognize the clear trap to clear the alert?

Below is an example from /var/log/snmptt/snmptt.log

Mon Jun 20 10:46:05 2016 .1.3.6.1.4.1.7779.3.1.1.1.1.2 Critical "Status Events" snmp.trap.ip.com - This trap is generated whenever a software failure is detected. snmp.trap.ip.com 3 Login 58 A GUI login failure has occurred
Mon Jun 20 10:46:09 2016 .1.3.6.1.4.1.7779.3.1.1.1.1.2 Critical "Status Events" snmp.trap.ip.com - This trap is generated whenever a software failure is detected. snmp.trap.ip.com 3 Login 0 SNMP Trap is cleared. GUI Login
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: oid the same for critical and clear snmp traps

Post by ssax »

You will need to duplicate the trap in /etc/snmp/snmptt.conf and add a MATCH statement to limit it:

Code: Select all

EVENT ibProcessingFailureTrap .1.3.6.1.4.1.7779.3.1.1.1.1.2 "Status Events" Critical
FORMAT This trap is generated whenever a software failure is detected. $*
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "This trap is generated whenever a software failure is detected. $*"
MATCH $5: ! (SNMP Trap is cleared)
SDESC
This trap is generated whenever a software failure is detected.
Variables:
  1: ibNodeName
  2: ibTrapSeverity
  3: ibSubsystemName
  4: ibProbableCause
  5: ibTrapDesc
EDESC

Code: Select all

EVENT ibProcessingFailureTrap .1.3.6.1.4.1.7779.3.1.1.1.1.2 "Status Events" Normal
FORMAT This trap is generated whenever a software failure is detected. $*
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "This trap is generated whenever a software failure is detected. $*"
MATCH $5: (SNMP Trap is cleared)
SDESC
This trap is generated whenever a software failure is detected.
Variables:
  1: ibNodeName
  2: ibTrapSeverity
  3: ibSubsystemName
  4: ibProbableCause
  5: ibTrapDesc
EDESC
Then restart SNMPTT:

Code: Select all

service snmptt restart
Let us know if that works for you.
brudnick
Posts: 37
Joined: Mon Feb 17, 2014 3:17 pm

Re: oid the same for critical and clear snmp traps

Post by brudnick »

I just made the change to the config file. Just waiting for traps to be sent to verify. Will post once I receive some traps.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: oid the same for critical and clear snmp traps

Post by tmcdonald »

Awesome, keep us posted!
Former Nagios employee
Locked