How to Write EEM Policies Using the Cisco IOS CLI
Command or Action
Step 6
Repeat Step 2 to ensure that the policy has been removed.
Example:
Device# show event manager policy registered
Examples
In the following example, the show event manager policy registered privileged EXEC command is used to
display the two EEM applets that are currently registered:
Device# show event manager policy registered
No.
1
oid {1.3.6.1.4.1.9.9.42.1.2.9.1.6.4} get-type exact entry-op eq entry-val {1}
exit-op eq exit-val {2} poll-interval 90.000
action 1.0 syslog priority critical msg "Server IPecho Failed: OID=$_snmp_oid_val"
action 1.1 snmp-trap strdata "EEM detected server reachability failure to 10.1.88.9"
action 1.2 publish-event sub-system 88000101 type 1 arg1 "10.1.88.9" arg2 "IPSLAEcho"
arg3 "fail"
action 1.3 counter name _IPSLA1F op inc value 1
2
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 90
action 1.0 syslog priority critical msg Memory exhausted; current available memory is
$_snmp_oid_val bytes
action 2.0 force-switchover
In the following example, the show event manager policy registered privileged EXEC command is used to
show that applet IPSLAping1 has been removed after entering the no event manager policy command:
Device# show event manager policy registered
No.
1
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 90
action 1.0 syslog priority critical msg Memory exhausted; current available memory is
$_snmp_oid_val bytes
action 2.0 force-switchover
Suspending All Embedded Event Manager Policy Execution
Perform this task to immediately suspend the execution of all EEM policies. Suspending policies, instead of
unregistering them might be necessary for reasons of temporary performance or security.
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1704
Class
Type
Event Type
applet
system
snmp
applet
system
snmp
Class
Type
Event Type
applet
system
snmp
Purpose
--
Trap
Time Registered
Off
Fri Aug 12 17:42:52 2005
Off
Thu Sep 15 05:57:16 2005
Trap
Time Registered
Off
Thu Sep 15 05:57:16 2005
Name
IPSLAping1
memory-fail
Name
memory-fail