Pages

Monday, March 28, 2011

Embedded Event Manager

Embedded event manager is a very nice feature of the CISCO IOS. This feature will track the event which occur on a router and notify or automatically configure a router for us. EEM uses event detector and actions to provide the notification of those events.

Example of the events of EEM are as followings.

Router(config-applet)#event ?
  application   Application specific event
  cli                     CLI event
  counter             Counter event
  interface           Interface event
  ioswdsysmon    IOS WDSysMon event
  none                 Manually run policy event
  oir                    OIR event
  resource           Resource event
  snmp                SNMP event
  syslog               Syslog event
  timer                Timer event
  track                Tracking object event

Action that EEM provides are as followings.
 - generating syslog messages
 - reload the router
 - generate SNMP traps
 - Executing the Cisco IOS command 
 - etc



Sample Configuration of EEM


event manager applet TEST_EEM
 event none
 action 1.1 cli command "enable"
 action 1.2 cli command "conf t"
 action 1.3 cli command "int f0/1"
 action 1.4 cli command "ip address 192.168.1.1 255.255.255.0"
 action 1.5 cli command "exit"
!

When launching this command. " event manager run TEST_EEM", because the event is NONE, the router will immediately do actions according to the configured actions. 

So the interface f0/1 will be configured the IP address as 192.168.1.1/24.

Result
Router#sh ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down
FastEthernet0/1            192.168.1.1     YES manual administratively down down
Router#

No comments:

Post a Comment