02-06-2009 06:58 AM
How about a forum dedicated to Tcl scripting and using Embedded Event Manager?
All useful for testing and debugging.
02-06-2009 11:15 AM
You can ask EEM and Tcl questions in the Network Manager forum. I try to answer all of them. There is also the EEM scripting repository at http://www.cisco.com/go/ciscobeyond which has numerous example policies. I have even posted some tclsh examples as well.
02-18-2009 06:43 AM
Can CiscoWorks LMS be used to deploy and/or manage EEM scipts on Catalyst switches?
02-18-2009 09:54 AM
LMS 3.1 does have some capability to deploy EEM policies on devices via Netconfig. However, this is only phase 1 level integration. A more comprehensive IDE for EEM is available from http://www.nidussoft.com/ , called IDEEM.
12-16-2010 10:04 AM
Hi Joe,
The software you mentioned here, IDEEM, can not to be googled, and the link is redirecting to a weird website, Could you please provide the download link again ?
12-16-2010 10:50 AM
Looks like Nidus has gone out of business. We have a partner, Progrizon, that does EEM consulting and has some tools to facilitate policy creation and deployment.
09-01-2010 08:44 PM
Please advise on how to use MS Visual C++ 6.0 to compile tcl. I already configured the VC ++ directories and included the the tcl's lib.
Thanks
Message was edited by: limjohn23
09-01-2010 08:47 PM
I've never compiled Tcl on Windows. However, you don't need to do this. You can get binaries from http://www.activestate.com/activetcl . You may also be able to find some VC++ instructions from ActiveState as well.
09-03-2010 09:00 AM
Hi,
Thanks a lot and that is very helpful, anyways, I am trying to make a script that will send a customize syslog message priority 3 (Critical) when an interface is down and run the script every 60 seconds. I get stuck on sending the syslog msg. as priority 3. Attached is the script. Hope you can give me some advice.
Many thanks
09-03-2010 11:10 AM
09-06-2010 02:54 PM
Thanks Joe, I greatly appreciate it.
But when I try to run it it gives me an error. I am running it on Router 1800 with IOS 12.4 (20) T, EEM Version 2.4. Is there any configuration I need to do on the device prior running the script. I registered the cron_entry and its value as well as the event_register_syslog and event_register_timer under event manager environment. Is there anything I am missing here. I am running the script through the TFTP.
Thanks you in advance,
John
09-06-2010 05:15 PM
You need to create a directory on flash to hold your EEM policies. Call it policies. Copy your EEM policy into this directory (make sure it ends in .tcl). Then configure the following:
event manager directory user policy flash:/policies
event manager policy gigabitdown.tcl
Once installed, the script will run at 12:01 am.
06-08-2011 03:37 PM
Hi Joe,
How's going,,,Hope that you can guide me on this mini project. Below is the tasks that I would like to accomplish. Many thanks in advance.
1.) Run show command on the switch that will give us a list of the interfaces that are configured as uplinks.
2.) For each line of output from the results in 1, do the following:
a.) Parse the output data to just get the interface name.
b.) Run a show command on the interface name to get the utilization stats for the past 5 min.
c.) If utilization is greater than x, then generate s syslog message with message stating hight utilization on the specific interface on this specific host
d.) continue loop until results of 1 are finished.
On #1, Can I use
set output [run_cli "sh ip interface brief"]
foreach line [
if lsearch $output up = 2 #check every line if status and protocol are both in up state
[split $output "\n"] puts [lindex $line 0]
06-09-2011 12:41 AM
Provided you have my run_cli function defined, the first part will work. Then you want to do something like:
set output [run_cli "show ip int brief | inc up"]
foreach line [split $output "\n"] {
regsub -all {\s+} $line " " line
set ifname [lindex $line 0]
if { [lindex $line end] == "up" && [lindex $line end-1] == "up" } {
# Get utilization
# if utilization > threshold, action_syslog msg ...
}
}
06-09-2011 12:47 PM
Hi, and thanks for the quick response. Can you please take a look the codes below...Will this do a loop for all interfaces that are in up state.
Please take a look the attached file.
Thanks again..
set output [run_cli "show ip int brief | inc up"]
foreach line [split $output "\n"]
{ regsub -all {\s+} $line " " line
set ifname [lindex $line 0]
if { [lindex $line end] == "up" && [lindex $line end-1] == "up" } {
# Get utilization
set utili_val [run_cli "sh int $ifname | inc load"]
#getting the value of txload and rxload
{ [regexp -line -nocase {.*txload ([0-9]+)/255, rxload ([0-9]+)/255}
$utili_val complete_string tx_val rx_val] }
#calculate the txload percentage; if more than 80 send syslog err
if [expr ($tx_val/255 * 100 >= 80.00]
action_syslog priority err "ERROR: $ifname TXLOAD is: $tx_val; more than 80 percent"
#calculate the rxload percentage; if more than 80 send syslog err
if [expr ($rx_val/255 * 100 >= 80.00]
action_syslog priority err "ERROR: $ifname RXLOAD is: $rx_val; more than 80 percent"
}
}
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