ā07-07-2013 03:27 PM
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
Solved! Go to Solution.
ā07-09-2013 01:12 AM
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
ā07-21-2013 03:07 AM
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
ā07-21-2013 07:44 AM
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.
ā07-09-2013 01:36 AM
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.
ā07-21-2013 07:44 AM
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.
ā07-21-2013 08:06 AM
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.
ā07-21-2013 02:39 PM
Hi Joseph,
Silly question, but can you let me know how to ensure the file is encoded as an ASCII file?
Cheers
Carlton
ā07-21-2013 02:44 PM
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.
ā07-21-2013 02:45 PM
No worries Joseph, its all sorted.
Thanks anyway mate
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide