Additional EEM Applet Examples

Additional EEM Applet Examples

You can define more applets using the Embedded Event Manager (EEM) and configure granular failover for your primary and backup GRE tunnels.

Primary Tunnel State Down

(confg)#event manager applet IPSLA_PRIMARY_UP
(config-applet)#event track 3 state down
(config-applet)#action 1 wait 3
(config-applet)#action 2 cli command “enable”
(config-applet)#action 3 cli command “config t”
(config-applet)#action 4 cli command "route-map netskope-tunnel"
(config-applet)#action 5 cli command "no set interface Tunnel3 Tunnel4"
(config-applet)#action 6 cli command "set interface Tunnel4"

Primary Tunnel State Up

(confg)#event manager applet IPSLA_PRIMARY_DOWN
(config-applet)#event track 3 state up
(config-applet)#action 1 wait 3
(config-applet)#action 2 cli command “enable”
(config-applet)#action 3 cli command “config t”
(config-applet)#action 4 cli command "route-map netskope-tunnel"
(config-applet)#action 6 cli command "set interface Tunnel3 Tunnel4"

Backup Tunnel State Down

(confg)#event manager applet IPSLA_FAILOVER_DOWN
(config-applet)#event track 4 state down
(config-applet)#action 1 wait 3
(config-applet)#action 2 cli command “enable”
(config-applet)#action 3 cli command “config t”
(config-applet)#action 4 cli command "route-map netskope-tunnel"
(config-applet)#action 5 cli command "no set interface Tunnel3 Tunnel4"
(config-applet)#action 6 cli command "set interface Tunnel3"

Backup Tunnel State Up

(confg)#event manager applet IPSLA_FAILOVER_UP
(config-applet)#event track 4 state up
(config-applet)#action 1 wait 3
(config-applet)#action 2 cli command “enable”
(config-applet)#action 3 cli command “config t”
(config-applet)#action 4 cli command "route-map netskope-tunnel"
(config-applet)#action 5 cli command "no set interface Tunnel3”
(config-applet)#action 6 cli command "set interface Tunnel3 Tunnel4"

Both Tunnels Down (Fail-Open) 

This applet allows you to route all web traffic out of the default gateway or through other routes. 

(confg)#event manager applet BOTH_TUNNELS_DOWN
(config-applet)#event tag 1 track 3 state down
(config-applet)#event tag 2 track 4 state down
(config-applet)#trigger occurs 1
(config-applet)#correlate event 1 and event 2
(config-applet)#action 1 wait 3
(config-applet)#action 2 cli command “enable”
(config-applet)#action 3 cli command “config t”
(config-applet)#action 4 cli command "interface GigabitEthernet2"
(config-applet)#action 5 cli command "no ip policy route-map netskope-tunnel"

Both Tunnels Up

(confg)#event manager applet BOTH_TUNNELS_UP
(config-applet)#event tag 1 track 3 state up
(config-applet)#event tag 2 track 4 state up
(config-applet)#trigger occurs 1
(config-applet)#correlate event 1 and event 2
(config-applet)#action 1 wait 3
(config-applet)#action 2 cli command “enable”
(config-applet)#action 3 cli command “config t”
(config-applet)#action 4 cli command "interface GigabitEthernet2"
(config-applet)#action 5 cli command "ip policy route-map netskope-tunnel"
Share this Doc

Additional EEM Applet Examples

Or copy link

In this topic ...