cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1461
Views
0
Helpful
4
Replies

EEM event_register_interface detector issue

fernando.vs
Level 1
Level 1

hi,

Im working on a EEM policy for some of my routers using TCL, this policy checks for the txload value of an interface and reports the value with a syslog message, this policy is already in the eem scriptiong community so as least im sure that im in the right direction.

This is my policy right now for testing, as you can see its pretty simple:


::cisco::eem::event_register_interface name serial1/0 parameter txload poll_interval 5 entry_op ge entry_val 192 entry_val_is_increment FALSE entry_type value

action_syslog msg "event triggered"

However it doesn't works, i have tried this code on 2811 and 7200 routerswith 12.4 ios image and i cant get it working, i have been using other kind of detectors (counters, timers, cli, etc) and they are working fine.

thanks all for your replies.

2 Accepted Solutions

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

This wouldn't work as written since action_syslog would be undefined.  Additionally, depending on exact IOS version, a poll_interval of 5 will not be possible.  Try this policy:

::cisco::eem::event_register_interface name serial1/0 parameter txload poll_interval 60 entry_op ge entry_val 192 entry_val_is_increment FALSE

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

action_syslog msg "Event triggered"

This assumes a device running 12.4 mainline.  After registering this policy, check "show event manager policy registered" to make sure it took properly, and use "debug event manager detector interface" to see how it executes.

View solution in original post

The interface name is case-sensitive.  It must be specified exactly how it shows up in the running config.  Use Serial0/2/0.

View solution in original post

4 Replies 4

Joe Clarke
Cisco Employee
Cisco Employee

This wouldn't work as written since action_syslog would be undefined.  Additionally, depending on exact IOS version, a poll_interval of 5 will not be possible.  Try this policy:

::cisco::eem::event_register_interface name serial1/0 parameter txload poll_interval 60 entry_op ge entry_val 192 entry_val_is_increment FALSE

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

action_syslog msg "Event triggered"

This assumes a device running 12.4 mainline.  After registering this policy, check "show event manager policy registered" to make sure it took properly, and use "debug event manager detector interface" to see how it executes.

Thanks joseph for your reply,

I applied the policy as you said, however it didn't work, I tested the policy on a 2801 router in a lab enviroment. I have included some output from the router. I have implemented another policy with a timer detector as a workaround, meanwhile I get some other IOS image for testing and production enviroment.

R1#sh event manager policy registered
No.  Class   Type    Event Type          Trap  Time Registered           Name
1    script  user    interface           Off   Sun Apr 17 11:54:26 2011  ifreporter.tcl
name {serial0/2/0} parameter {txload} entry_op ge entry_val 192 entry_val_is_increment FALSE poll_interval 70.000
nice 0 queue-priority normal maxrun 20.000


R1#sh ver
Cisco IOS Software, 2801 Software (C2801-ADVIPSERVICESK9-M), Version 12.4(19), RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Fri 29-Feb-08 20:54 by prod_rel_team

ROM: System Bootstrap, Version 12.3(8r)T9, RELEASE SOFTWARE (fc1)

R1 uptime is 48 minutes
System returned to ROM by reload at 11:48:07 cst Sun Apr 17 2011
System image file is "flash:c2801-advipservicesk9-mz.124-19.bin"

The interface name is case-sensitive.  It must be specified exactly how it shows up in the running config.  Use Serial0/2/0.

it worked, thanks a lot for your help joseph.