SNMP Waiting for traps
Re: SNMP Waiting for traps
Hi tgriep,
I moved the file and still the same output:
[root@localhost ~]# snmptranslate -Td 1.3.6.1.4.1.9.9.305.1.3.5.0.2
SNMPv2-SMI::enterprises.9.9.305.1.3.5.0.2
enterprises OBJECT-TYPE
-- FROM SNMPv2-SMI, RFC1155-SMI
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) 9 9 305 1 3 5 0 2 }
[root@localhost ~]#
I deleted the file for 2nd test and still same outcome.
Ofcourse after moving and deleting the file and before testing I restarted the snmptrapd and the snmptt service.
I moved the file and still the same output:
[root@localhost ~]# snmptranslate -Td 1.3.6.1.4.1.9.9.305.1.3.5.0.2
SNMPv2-SMI::enterprises.9.9.305.1.3.5.0.2
enterprises OBJECT-TYPE
-- FROM SNMPv2-SMI, RFC1155-SMI
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) 9 9 305 1 3 5 0 2 }
[root@localhost ~]#
I deleted the file for 2nd test and still same outcome.
Ofcourse after moving and deleting the file and before testing I restarted the snmptrapd and the snmptt service.
Re: SNMP Waiting for traps
Can you create this file
Add the following line to it
Save it and run the snmptranslate to see if it works.
Code: Select all
/etc/snmp/snmp.confCode: Select all
mibs +ALLBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: SNMP Waiting for traps
Hi tgriep,
Hope you had a good weekend :d
This gives me following output:
Mon Mar 7 16:44:26 2016: Unknown trap (Dying Gasp - Shutdown due to power loss) received from 10.1.254.253 at:
Value 0: 10.1.254.253
Value 1: 10.1.254.253
Value 2: CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
Value 3: Dying Gasp - Shutdown due to power loss
Value 4: 10.1.254.253
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
[root@localhost ~]# snmptranslate -Td 1.3.6.1.4.1.9.9.305.1.3.5.0.2
CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
cseShutDownNotify NOTIFICATION-TYPE
-- FROM CISCO-SYSTEM-EXT-MIB
OBJECTS { cseHaShutDownReason }
DESCRIPTION "A system shutdown notification is generated
whenever a system is going to shut down. The
cseHaShutDownReason, describes the reason as to
why the system is going to go down."
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) cisco(9) ciscoMgmt(9) ciscoSystemExtMIB(305) ciscoSystemExtMIBObjects(1) ciscoHaGroup(3) cseHaNotification(5) cseHaNotificationPrefix(0) 2 }
[root@localhost ~]#
In the snmpttunknown.log I see this output:
Mon Mar 7 16:44:26 2016: Unknown trap (Dying Gasp - Shutdown due to power loss) received from 10.1.254.253 at:
Value 0: 10.1.254.253
Value 1: 10.1.254.253
Value 2: CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
Value 3: Dying Gasp - Shutdown due to power loss
Value 4: 10.1.254.253
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
Betst Regards,
Guy
Hope you had a good weekend :d
This gives me following output:
Mon Mar 7 16:44:26 2016: Unknown trap (Dying Gasp - Shutdown due to power loss) received from 10.1.254.253 at:
Value 0: 10.1.254.253
Value 1: 10.1.254.253
Value 2: CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
Value 3: Dying Gasp - Shutdown due to power loss
Value 4: 10.1.254.253
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
[root@localhost ~]# snmptranslate -Td 1.3.6.1.4.1.9.9.305.1.3.5.0.2
CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
cseShutDownNotify NOTIFICATION-TYPE
-- FROM CISCO-SYSTEM-EXT-MIB
OBJECTS { cseHaShutDownReason }
DESCRIPTION "A system shutdown notification is generated
whenever a system is going to shut down. The
cseHaShutDownReason, describes the reason as to
why the system is going to go down."
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) cisco(9) ciscoMgmt(9) ciscoSystemExtMIB(305) ciscoSystemExtMIBObjects(1) ciscoHaGroup(3) cseHaNotification(5) cseHaNotificationPrefix(0) 2 }
[root@localhost ~]#
In the snmpttunknown.log I see this output:
Mon Mar 7 16:44:26 2016: Unknown trap (Dying Gasp - Shutdown due to power loss) received from 10.1.254.253 at:
Value 0: 10.1.254.253
Value 1: 10.1.254.253
Value 2: CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
Value 3: Dying Gasp - Shutdown due to power loss
Value 4: 10.1.254.253
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
Betst Regards,
Guy
Re: SNMP Waiting for traps
Our SNMP experts are out of the office today, but I'll make sure they take a look at this again tomorrow!
Former Nagios employee
Re: SNMP Waiting for traps
The settings for that trap are not in the /etc/snmp/snmptt.conf file, that us why they are showing up in the unknown log.
If you add the following to that file.
Then restart the snmptt daemon,
Those traps will show up in Nagios XI under Admin > Unconfigured Objects the first time they are received so they can be configured.
There is an application you can use to add the OID's to the /etc/snmp/snmptt.conf file, it is called addmib.
Just run it like below to add the traps from a MIB file to the snmptt.conf file. Restart the snmptt daemon and the system will start to receive the traps in that MIB file.
If you add the following to that file.
Code: Select all
EVENT cseShutDownNotify .1.3.6.1.4.1.9.9.305.1.3.5.0.2 "Status Events" Normal
FORMAT A system shutdown notification is generated $*
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "A system shutdown notification is generated $*"
SDESC
A system shutdown notification is generated
whenever a system is going to shut down. The
cseHaShutDownReason, describes the reason as to
why the system is going to go down.
Variables:
1: cseHaShutDownReason
EDESC
Code: Select all
service snmptt restartThere is an application you can use to add the OID's to the /etc/snmp/snmptt.conf file, it is called addmib.
Just run it like below to add the traps from a MIB file to the snmptt.conf file. Restart the snmptt daemon and the system will start to receive the traps in that MIB file.
Code: Select all
addmib <mibfile>Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: SNMP Waiting for traps
Hi tgriep,
I still get the trap in the unknown logfile:
Tue Mar 15 14:35:41 2016: Unknown trap (Dying Gasp - Shutdown due to power loss) received from 10.1.254.253 at:
Value 0: 10.1.254.253
Value 1: 10.1.254.253
Value 2: CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
Value 3: Dying Gasp - Shutdown due to power loss
Value 4: 10.1.254.253
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
I dont seen anything in the nagios Unconfigured Object page.
Best Regards
I still get the trap in the unknown logfile:
Tue Mar 15 14:35:41 2016: Unknown trap (Dying Gasp - Shutdown due to power loss) received from 10.1.254.253 at:
Value 0: 10.1.254.253
Value 1: 10.1.254.253
Value 2: CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
Value 3: Dying Gasp - Shutdown due to power loss
Value 4: 10.1.254.253
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
I dont seen anything in the nagios Unconfigured Object page.
Best Regards
Re: SNMP Waiting for traps
Can you post your latest /etc/snmp/snmptt.conf file and the /etc/snmp/snmpt.ini files?
Can you run the following command and post the output here?
Thanks.
Can you run the following command and post the output here?
Code: Select all
ps -ef |grep snmpBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: SNMP Waiting for traps
Hi tgriep,
In attachment the 2 files.
[root@localhost ~]# ps -ef |grep snmp
root 12697 1 0 13:02 ? 00:00:00 /usr/sbin/snmptrapd -Lsd -p /var/run/snmptrapd.pid
root 14304 1 0 13:03 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
snmptt 14306 14304 0 13:03 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
root 14348 16165 0 13:03 pts/0 00:00:00 grep snmp
Best regards
In attachment the 2 files.
[root@localhost ~]# ps -ef |grep snmp
root 12697 1 0 13:02 ? 00:00:00 /usr/sbin/snmptrapd -Lsd -p /var/run/snmptrapd.pid
root 14304 1 0 13:03 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
snmptt 14306 14304 0 13:03 ? 00:00:00 /usr/bin/perl /usr/sbin/snmptt --daemon
root 14348 16165 0 13:03 pts/0 00:00:00 grep snmp
Best regards
You do not have the required permissions to view the files attached to this post.
Re: SNMP Waiting for traps
In your EXEC line for that trap
The second option is the name of the service that the trap will be received to in XI. If they do not match, It may not receive it.
Do you have a service defined as "SNMP Dying Gasp" in XI?
If not, you should define it.
Code: Select all
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Dying Gasp" "$s" "$@" "$-*" "A system shutdown notification is generated $*"Do you have a service defined as "SNMP Dying Gasp" in XI?
If not, you should define it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: SNMP Waiting for traps
Hi tgriep
I changed the EXEC line to the following:
Still trap is showing up in the smpttunknown.log file and nothing is in the Unconfigured Objects list.
[root@lcoalhost ~]# tailf /var/log/snmptt/snmpttunknown.log
Thu Mar 17 10:59:21 2016: Unknown trap (Dying Gasp - Shutdown due to power loss) received from 10.1.254.253 at:
Value 0: 10.1.254.253
Value 1: 10.1.254.253
Value 2: CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
Value 3: Dying Gasp - Shutdown due to power loss
Value 4: 10.1.254.253
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
I changed the EXEC line to the following:
Code: Select all
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "$-*" "A system shutdown notification is generated $*"[root@lcoalhost ~]# tailf /var/log/snmptt/snmpttunknown.log
Thu Mar 17 10:59:21 2016: Unknown trap (Dying Gasp - Shutdown due to power loss) received from 10.1.254.253 at:
Value 0: 10.1.254.253
Value 1: 10.1.254.253
Value 2: CISCO-SYSTEM-EXT-MIB::cseShutDownNotify
Value 3: Dying Gasp - Shutdown due to power loss
Value 4: 10.1.254.253
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10: