Page 1 of 1

SNMP TRAPS notifications stopped working in nagios xi

Posted: Wed May 04, 2016 8:02 pm
by Johnjones
I have a Problem with SNMP Traps notification in Nagios xi. First when I used the below configuration in snmptt.conf file I used to get notifications but those notifications were created on some other host instead of the actual host

Code: Select all

EVENT NotificationServiceAlert .x.x.x.x.xxxxx.xxxxx.xxxx.xx. "Status Events" CRITICAL
FORMAT The  Notification Service generated an Alert Notification Message. $*
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "Notification Service Alert message=$10 "
#MATCH $9:FATAL
SDESC
The Notification Service generated an Alert Notification Message
Variables:
  1: AlertDate
  2: AlertTime
  3: AlertTagField
  4: FacilityName
  5: HostName
  6: ProcessName
  7: AlertID
  8: AlertName
  9: AlertPriority
  10:lertMessage
EDESC
Then I changed the snmptt.conf to this configuration but I stopped getting alerts in Nagios completely

Code: Select all

MIB: NOTIFICATION-SERVICE-ALERT-MIB  converted using snmpttconvertmib v1.3
#
#
EVENT NotificationServiceAlert .x.x.xxx.xxxx.xxx.xxx.xxx "Status Events" Normal
FORMAT The  Notification Service generated an Alert Notification Message. $*
EXEC /usr/local/bin/snmptraphandling.py "$5" "SNMP Traps" "$8" "$@" " " "AlertDateTime: $1. ReportedTime: $2. FacilityName: $3. TollPointName: $4.
HostName: $5. ProcessName: $6. AlertName: $11. AlertMessage: $12"
SDESC
The Notification Service generated an Alert Notification Message.
1. AlertDateTime
2. AlertReportedTime
3. FacilityName
4. TollPointName
5. HostName
6. ProcessName
7. AlertID
8. AlertPriority
9. CommandRequest
10. CommandResponse
11. AlertName
12. AlertMessage
13. AlertTagField
Variables:
  1: ServiceAlertDateTime
  2: AlertReportedTime
  3: FacilityName
  4: TollPointName
  5: HostName
  6: ProcessName
  7: AlertID
  8: AlertPriority
  9. CommandRequest
  10. CommandResponse
  11. AlertName
  12. AlertMessage
  13. AlertTagField
EDESC

Re: SNMP TRAPS notifications stopped working in nagios xi

Posted: Thu May 05, 2016 10:03 am
by ssax
That is because you changed this:

EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "Notification Service Alert message=$10 "

That needs to match the hostname in XI and it is case-sensitive, they may be showing up in Admin > Unconfigured Objects, see if they are.

Re: SNMP TRAPS notifications stopped working in nagios xi

Posted: Thu May 05, 2016 12:15 pm
by Johnjones
Yes that worked thank You very much

Re: SNMP TRAPS notifications stopped working in nagios xi

Posted: Thu May 05, 2016 4:42 pm
by ssax
No problem, are we okay to mark this as resolved and lock the thread?

Re: SNMP TRAPS notifications stopped working in nagios xi

Posted: Mon May 09, 2016 9:45 am
by Johnjones
Yes this is resolved. Please mark it as resolved.