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

Condition check in applet is failing

Boo
Level 1
Level 1

I have got a cisco 1921 it's running c1900-universalk9-mz.SPA.155-3.M4a.bin"

My goal is to ping the Internet, if it’s working, then I’d like to create an applet that tracks the status of the VPN by pinging the spoke router's LAN IP.

 

Please check my applet and tell me if my logic will work. Also, please help with the highlighted section.

 

event manager applet Internet-Status

 event track 2 state any

 action 001 cli command "if $_track_state eq "up"   --  CISCO IS NOT ACCEPTING THIS

 action 002 cli command "en"

 action 003 cli command "conf t"

 action 004 cli command "event manager applet VPN -Status"

 action 005 cli command "event track 1 state"

 action 006 cli command "if $_track_state eq "down"    --  CISCO IS NOT ACCEPTING THIS

 action 007 cli command "end"

 action 009 cli command "en"

 action 010 cli command "ip sla 99"

 action 011 cli command "ip sla schedule 99 life forever start-time now"

 action 012 cli command "history hours-of-statistics-kept 24"

 action 013 cli command "logging 203.25.185.33"

 action 014 cli command "end"

 action 015 cli command "write memory"

 action 016 cli command "end"

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

You do not need the "cli command" for actions 001 and 006.  "If" is an action of its own.  And, in general, this will not work.  Have a look at How To Introduce Large Delays In EEM Policies  to see what you need to do to add nested EEM policies.  In particular, pay attention to the need to use a character to stand for the nested quotes.

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: