cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3152
Views
0
Helpful
5
Replies

IOS-XR EEM Scripting

frankieng
Level 1
Level 1

I would like to use the EEM script to do some automation in router.

My scripting want to monitor the te0/1/0/0, Output Data Rate has amount of bps, then open the cli for some interface configuration.

after apply the testing.tcl file, commit the ASR 9006 router return:

!! SEMANTIC ERRORS: This configuration was rejected by

!! the system due to semantic errors. The individual

!! errors with each failed configuration command can be

!! found below.

event manager policy testing.tcl username col persist-time 3600 type user

!!% Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy testing.tcl

What is problem? attached the TCL file

RP/0/RSP1/CPU0:Har3-C9K#show event manager environment

No.  Name                          Value

1    _config_cmd1                  interface Te0/1/0/1.10

2    _config_cmd2                  description testing_interface

5 Replies 5

Joe Clarke
Cisco Employee
Cisco Employee

I think you're missing the modifier keywords in your event registration line:

::cisco::eem::event_register_stat name ifstats-datarate modifier_1 Te0/1/0/0 modifier_2 OutputDataRate entry_op gt 3600000 exit_comb and exit op ne 3600000 exit_time_sec 1800

Thank you for your information.

Change the scripting, but still failure

Do the TCL file require store other location?

or require user library for

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

C9K#show event manager directory user library

not configured

C9K#show event manager directory user policy

disk0:/

I noticed some other problems with the line.  Try this one:

::cisco::eem::event_register_stat name ifstats-datarate modifier_1 Te0/1/0/0 modifier_2 OutputDataRate entry_op gt entry_val 3600000 exit_comb and exit_op ne exit_val 3600000 exit_time_sec 1800

Tried but result failure

Try this script.