cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2072
Views
0
Helpful
2
Replies

IP SLA EEM TCL Script

ieasm0001
Level 1
Level 1

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?

1 Accepted Solution

Accepted Solutions

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

View solution in original post

2 Replies 2

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

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

Review Cisco Networking for a $25 gift card