Cisco IOS Embedded Event Manager (EEM) is a powerful tool integrated with Cisco IOS Software for system management from within the device itself. EEM offers the ability to monitor events and take informational, corrective, or any desired action when the monitored events occur or when a threshold is reached. Capturing the state of the router during such situations can be invaluable in taking immediate recovery actions and gathering information to perform root-cause analysis. Network availability is also improved if automatic recovery actions are performed without the need to fully reboot the routing device.
Ok let try to Prevent someone turning off Loopback Zero! 🙂
event manager applet Lo0 event syslog occurs 2 pattern "Loopback0, changed state to admin" action 1.0 syslog msg "Hey Someone shutdown my loopback0 - Turning it back on" action 1.1 syslog msg "I am a Smart Router, i will turn my lo0 back up again" action 1.2 cli command "enable" action 1.3 cli command "configure ter" action 1.4 cli command "int lo0" action 1.5 cli command "no shut" action 1.6 syslog msg "OK should be back up again"
Thanks to The Cisco Learning Network for this tip!