cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1424
Views
0
Helpful
1
Replies

Simple EEM Script to monitor a track object

tiago_pisco
Level 1
Level 1

Hello,

I am trying to make a EEM script to monitor a track object, and perform a clear arp, when this object comes up.
But i'm gettig this message when i try to create the policy:


"event manager policy EEM_TCL.tcl username EEM_user persist-time 3600 type user

!!% Embedded Event Manager configuration: failed to retrieve intermediate registration result for policy EEM_TCL.tcl

end"

My script is the following:

:cisco::eem::event_register_track XXX_obect state up

namespace import ::cisco::eem::*

namespace import ::cisco::lib::*

array set arr_einfo [event_reqinfo]

if [catch {cli_open} result] {

    error $result $errorInfo

} else {

    array set cli1 $result

}

if [catch {cli_exec $cli1(fd) "clear arp-cache bundle-Ether xx.xx location 0/0/CPU0"} _cli_result] {

    error $_cli_result $errorInfo

}

catch {cli_close $cli1(fd) $cli1(tty_id)} result

I am not sure, if this script is totally correct. It would be great if someone could help.
Best regards

1 Reply 1

tiago_pisco
Level 1
Level 1

I change this

:cisco::eem::event_register_track XXX_obect state up,
to a corresponding syslog event , and it worked xD
Thank you