03-04-2012 11:39 PM - edited 03-04-2019 03:32 PM
Hi!
I have 2 ip sla tests ( icmp-echo operation). I need to write tcl script that will work if tests finish there operations with timeout.
I wrote script for 1 operation and it works:
::cisco::eem::event_register_ipsla operation_id 1
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
array set evtData [event_reqinfo]
set evt_cond $evtData(condition)
set bb "Cleared"
if { $evt_cond == "Cleared" } {
action_syslog msg $bb
exit 0
}
if [catch {cli_open} result] {
puts stderr "CLI OPEN failed ($result)"
exit 0
}
array set cfd $result
action_syslog msg "Ocurred"
cli_exec $cfd(fd) "enable"
cli_exec $cfd(fd) "configure terminal"
cli_exec $cfd(fd) "router bgp 1"
cli_exec $cfd(fd) "neighbor 3.3.3.2 shutdown"
cli_exec $cfd(fd) "end"
catch {cli_close $cfd(fd) $cfd(tty_id)}
exit 0
Help me please. How i can process 2 tests in one script?
Solved! Go to Solution.
03-05-2012 12:30 AM
Hi Maxim ,
I would try to use correlate :
event manager applet name
event tag track-1 track 1 state down
event tag track-2 track 2 state down
trigger
correlate event track-1 and event track-2
action ....
Dan
03-05-2012 12:30 AM
Hi Maxim ,
I would try to use correlate :
event manager applet name
event tag track-1 track 1 state down
event tag track-2 track 2 state down
trigger
correlate event track-1 and event track-2
action ....
Dan
03-05-2012 01:31 AM
Thanks. Do u know, why if i type code to tcl script:
::cisco::eem::event_register_ipsla tag test1 operation_id 1
::cisco::eem::event_register_ipsla tag test2 operation_id 2
::cisco::eem::trigger
::cisco::eem::correlate event test1 and event test2
and try to accept policy i have next:
R1(config)#event manager policy test3.tcl
UpdateStringProc should not be invoked for type
UpdateStringProc should not be invoked for type fg
And it doesn't work
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