03-05-2013 09:56 AM
I want my script to generate a snmp trap instead of a syslog. How do I do that? He is the command I use to genearate the syslog
action_syslog msg "EEM - Check for Layer 2 Loop completed."
03-05-2013 10:13 AM
action_snmp_trap strdata "EEM - Check for Layer 2 Loop completed."
03-05-2013 10:40 AM
It does not seem to work. Does this work in XR software?
03-05-2013 10:45 AM
Sorry, I missed the ASR9000 in the subject. No, unfortunately, there is no trap support on XR at the moment. Syslog is the only recourse.
03-05-2013 11:14 AM
I found these two commands. Do you know what they do? It looks like you can build a custom snmp trap bindings.
sys_reqinfo_snmp_trapvar
sys_reqinfo_snmp_trap
03-05-2013 11:24 AM
Yes, you can. I always forget that those commands are supported on XR as well as IOS. I wrote a doc on using them at
03-06-2013 05:43 AM
It does not seem to work. Is this supported in 4.1.1 version of XR software? Here is what I configured and error I got:
sys_reqinfo_snmp_trapvar var vbinds oid 1.3.6.1.4.1.33333.2.0 string "send_custom_trap.tcl"
sys_reqinfo_snmp_trapvar var vbinds oid 1.3.6.1.4.1.33333.3.0 string "This is a custom trap"
sys_reqinfo_snmp_trap enterprise_oid 1.3.6.1.4.1.33333.1 generic_trapnum 6 specific_trapnum 1 trap_oid 1.3.6.1.4.1.33333.1.0.1 trap_var vbinds
RP/0/RSP0/CPU0:Mar 5 14:54:08.103 : syslog_dev[93]: noscan: No trap variable "vbinds"
RP/0/RSP0/CPU0:Mar 5 14:54:08.103 : syslog_dev[93]: noscan: while executing
RP/0/RSP0/CPU0:Mar 5 14:54:08.103 : syslog_dev[93]: noscan: "sys_reqinfo_snmp_trap enterprise_oid 1.3.6.1.4.1.33333.1 generic_trapnum 6 specific_trapnum 1 trap_oid 1.3.6.1.4.1.33333.1.0.1 trap_var vbinds
RP/0/RSP0/CPU0:Mar 5 14:54:08.103 : syslog_dev[93]: noscan: "
RP/0/RSP0/CPU0:Mar 5 14:54:08.104 : syslog_dev[93]: noscan: (file "/dev/rdsfs/etc/eem_rdsfs/eem_counter_lookup_v1_0.tcl" line 100)
03-06-2013 01:14 PM
From what I can tell this should work. However, I don't have an XR device with which to test. Can you enable "debug event manager tcl commands" reproduce the issue, and post the output?
03-06-2013 01:53 PM
03-06-2013 01:57 PM
I'm seeing some strange double-quotes inserted on these lines, and I'm not sure why. Can you post the script file?
03-06-2013 02:01 PM
Nevermind. I just confirmed, custom trap support was added to XR 4.2 and higher. While the commands are there, it will not work in 4.1. This is bug CSCue21891.
03-06-2013 02:08 PM
Ok, that makes sense. We are upgrading the lab nodes to 4.3.1 soon, so I will find out. Thank you for your help!
03-14-2013 08:30 AM
Joseph, That is an internal bug. When I opened a case with TAC on the same in January, the reply I received was:
In summary, feature you are trying to do is available from 4.2.0 as
internal bug mentions, and documentation feedback will be submitted today.
TAC was going to submit a request to have the 4.1 documentation updated to reflect the SNMP trap being unavailable.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: