Page 3 of 4

Re: SNMP Waiting for traps

Posted: Fri Mar 04, 2016 8:38 am
by gwijnant
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.

Re: SNMP Waiting for traps

Posted: Fri Mar 04, 2016 2:25 pm
by tgriep
Can you create this file

Code: Select all

/etc/snmp/snmp.conf
Add the following line to it

Code: Select all

mibs +ALL
Save it and run the snmptranslate to see if it works.

Re: SNMP Waiting for traps

Posted: Mon Mar 07, 2016 11:05 am
by gwijnant
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

Re: SNMP Waiting for traps

Posted: Mon Mar 07, 2016 6:00 pm
by tmcdonald
Our SNMP experts are out of the office today, but I'll make sure they take a look at this again tomorrow!

Re: SNMP Waiting for traps

Posted: Tue Mar 08, 2016 9:30 am
by tgriep
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.

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
Then restart the snmptt daemon,

Code: Select all

service snmptt restart
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.

Code: Select all

addmib <mibfile>

Re: SNMP Waiting for traps

Posted: Tue Mar 15, 2016 8:48 am
by gwijnant
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

Re: SNMP Waiting for traps

Posted: Tue Mar 15, 2016 3:13 pm
by tgriep
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?

Code: Select all

ps -ef |grep snmp
Thanks.

Re: SNMP Waiting for traps

Posted: Wed Mar 16, 2016 7:16 am
by gwijnant
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

Re: SNMP Waiting for traps

Posted: Wed Mar 16, 2016 11:55 am
by tgriep
In your EXEC line for that trap

Code: Select all

EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Dying Gasp" "$s" "$@" "$-*" "A system shutdown notification is generated $*"
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.

Re: SNMP Waiting for traps

Posted: Thu Mar 17, 2016 5:11 am
by gwijnant
Hi tgriep

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 $*"
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: