While going through my Tshoot materials I came across EEM or Cisco’s Embedded Event Management feature. Its one of those features that made me think “Whoa! this is awesome!”, what it does is you can automate monitoring and perform task triggered by events in your network.
It supports 20 event detectors where you can create network policies that when triggered, actions will take place in response to a network event. You can create applets using the command-line interface or via a scripting language called Tool Command Language (TCL).
I created a simple EEM applet wherein if Interface fa0/1 goes down, IOS commands will be executed to bring the interface up again.