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
15
Cisco IOS Release 12.2(25)S
Configuration for the Primary RP and Secondary RP
The following is partial output from the show running-config command on both the primary RP and the 
secondary (redundant) RP:
redundancy
 mode sso
.
.
.
!
event manager applet memory-demo 
 event snmp 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
Embedded Event Manager Watchdog Event Detector Configuration: Example
The following example shows how to configure three EEM applets to demonstrate how the watchdog 
event detector works. 
Watchdog Sample1 Policy
The first policy triggers an applet when the average CPU usage for the process named “IP Input” is 
greater than or equal to 1 percent for 10 seconds:
event manager applet IOSWD_Sample1 
 event ioswdsysmon sub1 cpu-proc taskname “IP Input” op ge val 1 period 10
 action 1 syslog msg “IOSWD_Sample1 Policy Triggered”
Watchdog Sample2 Policy
The second policy triggers an applet when the total amount of memory used by the process named “Net 
Input” is greater than 100 kb:
event manager applet IOSWD_Sample2 
 event ioswdsysmon sub1 mem-proc taskname “Net Input” op gt val 100 is-percent false
 action 1 syslog msg “IOSWD_Sample2 Policy Triggered”
Watchdog Sample3 Policy
The third policy triggers an applet when the total amount of memory used by the process named “IP RIB 
Update” has increased by more than 50 percent over the sample period of 60 seconds:
event manager applet IOSWD_Sample3 
 event ioswdsysmon sub1 mem-proc taskname “IP RIB Update” op gt val 50 is-percent true 
period 60
 action 1 syslog msg “IOSWD_Sample3 Policy Triggered”
The three policies are configured, and then repetitive large pings are made to the networking device from 
several workstations, causing the networking device to register some usage. This will trigger policies 1 
and 2, and the console will display the following messages:
00:42:23: %HA_EM-6-LOG: IOSWD_Sample1: IOSWD_Sample1 Policy Triggered
00:42:47: %HA_EM-6-LOG: IOSWD_Sample2: IOSWD_Sample2 Policy Triggered