Home > CISCO, EEM Scripts > Cisco EEM Applet – Prevent and alert upon interfaces being shutdown

Cisco EEM Applet – Prevent and alert upon interfaces being shutdown

September 7th, 2013

SYSLOG EVENT DETECTOR:
When an interface has been shutdown, the EEM applet re-enables interface and sends an email alert with logged in users information.

event manager applet interface_Shutdown
event syslog pattern “Interface GigabitEthernet1/0, changed state to administratively down”
action 1.0 cli command “enable”
action 1.5 cli command “config t”
action 2.0 cli command “interface g1/0”
action 2.5 cli command “no shutdown”
action 3.0 cli command “end”
action 3.5 cli command “who”
action 4.0 mail server “192.168.1.1” to “.mailto:person@domain.com.” from “.mailfrom:EEM@domain.com.” subject “.GIG_Interface_g1/0_SHUT.” body “Current users are $_cli_result”

Categories: CISCO, EEM Scripts Tags:
Comments are closed.