Está en la página 1de 2

EEM comandos.

event manager applet <identificador_de_applet>


Registra el applet con EEM
event syslog pattern <patrn>
configura el detector de evento de syslog para que reconozca el patrn del mensaje
deseado. Recuerde que es posible usar expresiones regulares.
action label syslog msg <msg-text>
Especifica la accin cuando se activa un applet EEM.
configure terminal
event manager applet manual-policy
event none
action 1.0 cli command "enable"
action 2.0 cli command "configure terminal"
action 3.0 cli command "interface GigabitEthernet0/1"
action 4.0 cli command "no ip address 122.11.101.97 255.255.255.252"
action 5.0 cli command "exit"
action 6.0 cli command "interface GigabitEthernet0/1.161"
action 7.0 cli command "encapsulation dot1q 161"
action 8.0 cli command "ip address 112.81.101.23 255.255.255.252"
action 9.0 cli command "exit"
action 10.0 cli command "end"
!
end
Ahora ejecutamos manualmente el EEM.
cisco#event manager run manual-policy
Ahora, como sabemos si se ha ejcutado el EEM como esperbamos?
cisco#show event manager policy pending
Este comando nos dice que politicas EEM estn pendiente de ejecucin.

Para cambiar rutas:


event manager applet RouteOruro
event tag 1.0 timer watchdog time 900
action 001 set contador 1
action 004 cli command "ping 192.168.154.129"
action 005 regexp "" "$_cli_result"
action 006 if $_regexp_result eq 1
action 007 cli command show run
action 008 regexp "172.20.20.1 200" "$_cli_result"
if $_regexp_result ne 1
cli command "conf t"

cli
cli
cli
cli

command
command
command
command

else
cli command "conf t"
cli command
cli command
cli command
cli command
end
action 011 end
!
end

ip
ip
ip
ip

route
route
route
route

192.168.154.0 255.255.255.0
192.168.154.0 255.255.255.0
172.17.17.8 255.255.255.252
172.17.17.8 255.255.255.252

172.20.20.1 200
172.19.19.2
172.19.19.2
172.20.20.1 200

ip
ip
ip
ip

route
route
route
route

192.168.154.0 255.255.255.0
192.168.154.0 255.255.255.0
172.17.17.8 255.255.255.252
172.17.17.8 255.255.255.252

172.20.20.1
172.19.19.2 200
172.19.19.2 200
172.20.20.1

También podría gustarte