match is one two three
submatch 1 is one
Configuring SNMP Library Extensions
Depending on your release, the SNMP Library Extensions feature allows you to perform the following
configurations.
Prerequisites
To use this feature, you must be running Cisco IOS Release 12.4(22)T or a later release.
SNMP Get and Set Operations
The SNMP Library Extensions feature extends the EEM applet
action info
and Tcl
sys_reqinfo_snmp
commands to include functionality for SNMP get-one, get-next, getid and set-any operations.
SNMP Get Operation
The SNMP event manager performs the SNMP get operation to retrieve one or more variables for the managed
objects. Using the
action info type snmp oid get-type
and
action info type snmp getid
commands, you can
configure the SNMP event manager to send an SNMP get request by specifying the variables to retrieve, and
the IP address of the agent.
For example, if you want to retrieve the variable with the OID value of 1.3.6.1.2.1.1.1, you should specify
the variable value, that is 1.3.6.1.2.1.1.1. If the specified values do not match, a trap will be generated and an
error message will be written to the syslog history.
The
action info type snmp oid get-type
command specifies the type of the get operation to be performed.
To retrieve the exact variable, the get operation type should be specified as
exact
. To retrieve a lexicographical
successor of the specified OID value, the get operation type should be set to
next
.
The table below shows the built-in variables, in which the values retrieved from SNMP get operation are
stored.
Table 161: Built-in Variables for action info type snmp oid Command
Description
Built-in Variable
The SNMP object ID.
_info_snmp_oid
The value string of the associated SNMP data
element.
_info_snmp_value
GetID Operation
The
action info type snmp getid
command retrieves the following variables from the SNMP entity:
•
sysDescr.0
•
sysObjectID.0
•
sysUpTime.0
•
sysContact.0
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1724
How to Write EEM Policies Using the Cisco IOS CLI
Summary of Contents for Catalyst 2960 Series
Page 96: ......
Page 196: ......
Page 250: ......
Page 292: ......
Page 488: ......
Page 589: ...P A R T VI Cisco Flexible NetFlow Configuring NetFlow Lite page 509 ...
Page 590: ......
Page 619: ...P A R T VII QoS Configuring QoS page 539 Configuring Auto QoS page 645 ...
Page 620: ......
Page 750: ......
Page 1604: ......
Page 1740: ......
Page 2105: ...P A R T XII Configuring Cisco IOS IP SLAs Configuring Cisco IP SLAs page 2025 ...
Page 2106: ......
Page 2118: ......
Page 2164: ......