Cisco Cisco IOS Software Release 12.2(25)S

Page de 68
      Embedded Event Manager 2.0
Configuration Examples for Embedded Event Manager 2.0
13
Cisco IOS Release 12.2(25)S
 action 1.0 syslog priority critical msg Memory exhausted; current available memory is 
$_snmp_oid_val bytes 
 action 2.0 force-switchover 
2    applet  syslog              Wed Jul16 00:05:17 2004 intf-down
 pattern {.*UPDOWN.*Ethernet1/0.*}
 action 1.0 cns-event msg Interface state change: $_syslog_msg
Use this command with the name-ordered keyword to display information about currently registered 
policies sorted by name, for example:
Router# show event manager policy registered name-ordered
No.  Type    Event Type          Time Registered          Name 
1    applet  syslog              Wed Jul16  00:05:17 2004 intf-down
 pattern {.*UPDOWN.*Ethernet1/0.*}
 action 1.0 cns-event msg Interface state change: $_syslog_msg
2    applet  snmp                Thu May30 05:57:16 2004   memory-fail 
 oid {1.3.6.1.4.1.9.9.48.1.1.1.6.1} get-type exact entry-op lt entry-val {5120000} 
poll-interval 10 
 action 1.0 syslog priority critical msg Memory exhausted; current available memory is 
$_snmp_oid_val bytes 
 action 2.0 force-switchover
Use this command with the event-type keyword to display information about currently registered 
policies for the event type specified in the event-name argument, for example:
Router# show event manager policy registered event-type syslog
No.  Type    Event Type          Time Registered           Name 
1    applet  syslog              Wed Jul16  00:05:17 2004 intf-down
 pattern {.*UPDOWN.*Ethernet1/0.*}
 action 1.0 cns-event msg Interface state change: $_syslog_msg
Configuration Examples for Embedded Event Manager 2.0
This section contains the following configuration examples:
Embedded Event Manager Applet Configuration: Example
The following example shows how to configure an EEM applet that causes a switch to the secondary 
(redundant) Route Processor (RP) when the primary RP runs low on memory.
This example illustrates a method for taking preventative action against a software fault that causes a 
memory leak. The action taken here is designed to reduce downtime by switching over to a redundant 
RP when a possible memory leak is detected.
 shows a dual RP router that is running an EEM image. An EEM applet has been registered 
through the CLI using the event manager applet command. The applet will run when the available 
memory on the primary RP falls below the specified threshold of 5,120,000 bytes. The applet actions 
are to write a message to syslog that indicates the number of bytes of memory available and to switch to 
the secondary RP.