Configuration Snmp Library Extensions Examples - Cisco Catalyst 2960 series Configuration Manual

Consolidated platform configuration guide, ios release 15.2(4)e
Hide thumbs Also See for Catalyst 2960 series:
Table of Contents

Advertisement

To view the policies that are registered, use the show event manager policy registered command:
Device# show event manager policy registered
No.
Class
1
applet
sub1 cpu_util {taskname {IP Input} op ge val 1 period 10.000 }
action 1.0 syslog msg "IOSWD_Sample1 Policy Triggered"
2
applet
sub1 mem_used {taskname {Net Input} op gt val 100 is_percent FALSE}
action 1.0 syslog msg "IOSWD_Sample2 Policy Triggered"
3
applet
sub1 mem_used {taskname {IP RIB Update} op gt val 50 is_percent TRUE period 60.000 }
action 1.0 syslog msg "IOSWD_Sample3 Policy Triggered"

Configuration SNMP Library Extensions Examples

SNMP Get Operations Examples
The following example shows how to send a get request to the local host.
Device(config)# event manager applet snmp
Device(config-applet)# event snmp oid
1.3.6.1.2.1.1.1.0 get-type exact entry-op
lt entry-val
5120000 poll-interval
90
Device(config-applet)# action 1.3 info type snmp oid
1.3.6.1.2.1.1.1.0 get-type exact
community
public
Device(config-applet)# action 1.3 info type snmp oid
1.3.6.1.2.1.1.4.0 get-type next community
public
The following log message will be written to the SNMP event manager log:
1d03h:%HA_EM-6-LOG: lg: 1.3.6.1.2.1.1.1.0
1d04h:%HA_EM-6-LOG: lgn: 1.3.6.1.2.1.1.5.0
The following example shows how to send a get request to a remote host.
Device(config)# event manager applet snmp
Device(config-applet)# event snmp oid
1.3.6.1.2.1.1.1.0 get-type exact entry-op
lt entry-val
5120000 poll-interval
90
Device(config-applet)# action 1.3 info type snmp oid
1.3.6.1.2.1.1.4.0 get-type next community
public ipaddr
172.17.16.69
Device(config-applet)# action 1.3 info type snmp getid
1.3.6.1.2.1.1.1.0 community
public ipaddr
172.17.16.69
The following log message is written to the SNMP event manager log:
1d03h:%HA_EM-6-LOG: lg: 1.3.6.1.2.1.1.1.0
1d04h:%HA_EM-6-LOG: lgn: 1.3.6.1.2.1.1.5.0
Configuration Examples for Writing Embedded Event Manager Policies Using Tcl
Type
Event Type
system
ioswdsysmon
system
ioswdsysmon
system
ioswdsysmon
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
Trap
Time Registered
Off
Fri Jul 23 02:27:28 2004
Off
Fri Jul 23 02:23:52 2004
Off
Fri Jul 23 03:07:38 2004
Name
IOSWD_Sample1
IOSWD_Sample2
IOSWD_Sample3
1751

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents