cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
3702
Views
0
Helpful
23
Replies

EEM Script Modification Help

Hello Community,

David Lin, was the author of the Wan Load Alarm script.

When the alert appears it will appear as follows:

*Mar  1 00:46:31.027: %HA_EM-6-LOG: system:/lib/tcl/eem_scripts_registered/wan_load_alarm.tcl: Interface FastEthernet0/0 average load exceeded 4 percent over 1 seconds.

Is it possible to modify the script so that the text Interface FastEthernet0/0 average load exceeded 4 percent over 1 seconds., appears on separate line?

I need to strip out *Mar  1 00:46:31.027: %HA_EM-6-LOG: system:/lib/tcl/eem_scripts_registered/wan_load_alarm.tcl from the message

Cheers

23 Replies 23

Hi Joesph,

When I attempt to run the script, I'm now getting the error:

'Compile check and registration failed:policy file does not start with event register cmd

Tcl policy execute failed: policy file does not start with event register cmd

Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy wan_load_alarm.tcl: Unknown error 0'

Do you think you could help?

Cheers

Hi Joseph,

For some reason, I'm getting the error message:

R1(config)#even ma p wan_load_alarm.tcl

Compile check and registration failed:policy file does not start with event register cmd

Tcl policy execute failed: policy file does not start with event register cmd

Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy wan_load_alarm.tcl: Unknown error 0

I was getting it before but it somehow managed to fix itself - I'm now getting it again - using the same script you modified above.

I wonder if you could shed some light on it?

Cheers

Check the contents of the file on flash and make sure it looks like a plain ASCII file and starts with a ::cisco::eem::event_register_* line.

Hi Joesph,

Please ignore my previous posts.... I'm being what they call here in London a NUMPTY!

Its working fine.

Once again you're a star.

Cheers mate.

Hi Joseph,

I tried running the script on a 7200 and getting similar error:

R3(config)#event  mana p wan_load_alarm.tcl

EEM Register event failed: Error empty reg spec, policy does not start with EEM registration commands.

EEM configuration: failed to retrieve intermediate registration result for policy wan_load_alarm.tcl

The interesting thing is the policy does have EEM registration commands - at least  I think it does.

Make sure this file is encoded as an ASCII file when you transfer it to the device.  You should be using a plain text editor if you're doing any modifications to this.

Hi Joseph,

Silly question, but can you let me know how to ensure the file is encoded as an ASCII file?

Cheers

Carlton

Make sure any changes done to the file are done so in a plain text editor like TextWrangler, Notepad++, Emacs, Vim, Text Editor, Notepad, etc.  If your editor has a setting for encoding, make sure it's set to US-ASCII.  If not, make sure there aren't any charatcers that fall outside of the 7-bit ASCII range.

No worries Joseph, its all sorted.

Thanks anyway mate