SNMP TRAPS notifications stopped working in nagios xi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Johnjones
Posts: 16
Joined: Wed May 04, 2016 7:24 pm

SNMP TRAPS notifications stopped working in nagios xi

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP TRAPS notifications stopped working in nagios xi

Post 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.
Johnjones
Posts: 16
Joined: Wed May 04, 2016 7:24 pm

Re: SNMP TRAPS notifications stopped working in nagios xi

Post by Johnjones »

Yes that worked thank You very much
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP TRAPS notifications stopped working in nagios xi

Post by ssax »

No problem, are we okay to mark this as resolved and lock the thread?
Johnjones
Posts: 16
Joined: Wed May 04, 2016 7:24 pm

Re: SNMP TRAPS notifications stopped working in nagios xi

Post by Johnjones »

Yes this is resolved. Please mark it as resolved.
Locked