ā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-08-2013 09:08 AM
I found a few bugs in this script. I think this version should work better.
ā07-07-2013 09:20 PM
Whenever action_syslog is called, just add a "\n" at the start of the msg argument. For example:
acton_syslog msg "\nThis appears on a new line"
ā07-08-2013 01:52 AM
Hi Joseph,
Thanks for getting back to me mate.
I will try your suggestion shortly.
In the meantime can you please tell me if the following line will work:
event manager environment wan_load_history_outfile tftp:wan_load_history_outfile.dat
Cheers mate
ā07-08-2013 09:00 AM
This can work, but it will slow the script down a bit. It is recommended to use a local file.
ā07-08-2013 02:55 AM
Hi Joseph,
For some reason the wan_load-alarm.tcl isn't working.
I applied it last night and it worked fine. I've reapplied it to another device and its not working.
I wonder if you could take a quick glance at the configs and let me know if I've missed something?
Cheers
ā07-08-2013 03:31 AM
Joseph,
You will notice that I decreased the thresholds and duration to speed up the results....
ā07-08-2013 03:40 AM
Joseph,
Below is debug of tcl:
*Mar 1 02:11:58.831: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : CTL : cli_open called.
*Mar 1 02:11:59.067: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT :
*Mar 1 02:11:59.067: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT : R2>
*Mar 1 02:11:59.071: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : IN : R2>enable
*Mar 1 02:11:59.279: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT :
*Mar 1 02:11:59.279: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT : R2#
*Mar 1 02:11:59.283: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : IN : R2#enable
*Mar 1 02:11:59.483: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT :
*Mar 1 02:11:59.483: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT : R2#
*Mar 1 02:11:59.483: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : IN : R2#show int Ethernet1/0 | inc txload
*Mar 1 02:11:59.695: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT : reliability 255/255, txload 143/255, rxload 142/255
*Mar 1 02:11:59.695: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT : R2#
*Mar 1 02:11:59.727: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : IN : R2#more flash:wan_load_history_outfile.dat
*Mar 1 02:11:59.935: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT : reliability 255/255, txload 143/255, rxload 142/255
*Mar 1 02:11:59.935: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT : R2#
*Mar 1 02:11:59.935: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT :
*Mar 1 02:11:59.935: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : OUT : R2#
*Mar 1 02:11:59.959: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : CTL : cli_close called.
*Mar 1 02:11:59.959: %HA_EM-6-LOG: wan_load_alarm.tcl : DEBUG(cli_lib) : IN : R2#exit
As you can see, threshold have been breached...
ā07-08-2013 04:46 AM
Joseph,
Could you show me how to remove
wan_load_history_outfile.dat
Cheers mate
ā07-08-2013 05:03 AM
Hi Joseph,
Sorry for bombarding you with messages,
I'm also getting the following error message
*Mar 1 00:43:37.207: %HA_EM-7-FMS_POLICY_MAX_ENTRIES: fh_schedule_policy: Maximum number of script publish entries exceeded; some events have been discarded
*Mar 1 00:43:39.211: %HA_EM-7-FMS_POLICY_MAX_ENTRIES: fh_schedule_policy: Maximum number of script publish entries exceeded; some events have been discarded
Is there a reason for this?
Cheers
ā07-08-2013 09:11 AM
This means that too many policies are being executed at one time, and the EEM server queue is filling up. You might have some EEM policies stuck in the queue, or you've descreased the interval too low.
ā07-08-2013 09:08 AM
ā07-08-2013 10:50 AM
How Joseph, thanks for getting back to me. I haven't had a chance to test the new script. Does it exclude the logging to flash? If not can you please show me how stop the logging. I tried myself but I failed miserably.
Appreciate it.
Sent from Cisco Technical Support iPad App
ā07-09-2013 08:14 AM
The "logging" needs to be done to track the multiple samples. However, when the samples have been collected, the file will be deleted by the script. That part of the script looked okay to me.
ā07-08-2013 01:00 PM
Hi Joseph,
I've tested the new script and it appears to working fine.
As I mentioned, would you be kind enough to show me how remove the out file,
'wan_load_history_outfile.dat' ?
Would really appreciate it mate.
Cheers
Carlton
ā07-09-2013 12:42 AM
Hi Joesph,
I presume you're too busy to help me with this any further ;-(
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