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

TCL argument problem in event manager

Stefano_WitCom
Level 1
Level 1

Hello, i have created the following applet:

event manager applet test1

event track 2 state down

action 1.0 policy dns.tcl 1 2 3

Router(config-applet)#action 1.0 policy dns.tcl ?

  LINE  The list of arguments for the policy

as describe in help,  "1 2 3" shound be pass as argument of script

when track 2 go down and execute the policy dns.tcl the policy dosn't recive any parameter.

dns.tcl :

puts "The $argv0 script was calles with $argc arguments :"
puts "$argc"

for {set i 0} {$i<[llength $argv]} {incr i} {
  puts " - $i : [lindex $argv $i]"
}

It answer only with the name of the script $arv0

O.S. C180X Software (C180X-ADVIPSERVICESK9-M), Version 12.4(24)T6, RELEASE SOFTWARE (fc2)

Any idea?

Thanks in advance.

event manager applet test1
event track 2 state down
action 1.0 policy dns.tcl 1 2 3
2 Replies 2

Hello!

Cisco "command lookup tool":

   action label policy policy-filename

According to the parameters in the applet is not transmitted.


Joe Clarke
Cisco Employee
Cisco Employee

This will not work as a tclsh script is not an EEM policy.  Why not use EEM Tcl throughout?  If you need help converting an applet to a Tcl policy, use http://www.marcuscom.com/convert_applet/ .

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco