![]() |
Cisco IOS SNMP Support Command Reference
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
action event through rising test threshold
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contents
action (event) through rising (test threshold) action (event)To set an action for an event, use the action command in event configuration mode. To disable the action for an event, use the no form of this command. Usage GuidelinesWhile configuring a set of actions for an event, you can specify the object identifier of the object. You can also configure events to perform activities such as sending notifications or setting a MIB object whenever an event is triggered. If notifications are enabled for an event, the system sends a notification to the SNMP manager whenever the object configured for that event is modified. ExamplesThe following example shows how to enable notifications for an event: Router(config)# snmp mib event owner owner1 name test Router(config-event)# action notification Router(config-event-action-notification)# end Related Commands
add (bulkstat object)To add a MIB object to a bulk statistics object list, use the add command in Bulk Statistics Object List configuration mode. To remove a MIB object from an SNMP bulk statistics object list, use the no form of this command. Syntax Description
Command History
Usage GuidelinesAll the objects in an object list have to be indexed by the same MIB index, but the objects need not belong to the same MIB table. For example, it is possible to group ifInoctets and an Ether MIB object in the same schema because the containing tables are indexed by the ifIndex (in the IF-MIB). Object names are available in the relevant MIB modules. For example, the input byte count of an interface is defined in the Interfaces Group MIB (IF-MIB.my) as ifInoctets. Complete MIB modules can be downloaded from Cisco.com at http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml. ExamplesIn the following example, two bulk statistics object lists are configured: one for IF-MIB objects and one for CISCO-CAR-MIB objects. Because the IF-MIB objects and the CISCO-CAR-MIB objects do not have the same index, they must be defined in separate object lists. Router(config)# snmp mib bulkstat object-list if-Objects Router(config-bulk-objects)# add ifInoctets Router(config-bulk-objects)# add ifOutoctets Router(config-bulk-objects)# add ifInUcastPkts Router(config-bulk-objects)# add ifInDiscards Router(config-bulk-objects)# exit Router(config)# snmp mib bulkstat object-list CAR-Objects Router(config-bulk-objects)# add CcarStatSwitchedPkts Router(config-bulk-objects)# add ccarStatSwitchedBytes Router(config-bulk-objects)# add CcarStatFilteredBytes Router(config-bulk-objects)# exit Router(config)# bandwidth (interface)To set the inherited and received bandwidth values for an interface, use the bandwidth command in interface or virtual network interface config mode. To restore the default values, use the no form of this command. Syntax Description
Command DefaultDefault bandwidth values are set during startup. The bandwidth values can be displayed using the show interfaces or show ipv6 interface command. If the receive keyword is not used, by default, the transmit and receive bandwidths will be assigned the same value. Command History
Usage GuidelinesBandwidth Information The bandwidth command sets an informational parameter to communicate only the current bandwidth to the higher-level protocols; you cannot adjust the actual bandwidth of an interface using this command.
Changing Bandwidth For some media, such as Ethernet, the bandwidth is fixed; for other media, such as serial lines, you can change the actual bandwidth by adjusting the hardware. For both classes of media, you can use the bandwidth command to communicate the current bandwidth to the higher-level protocols. Bandwidth Inheritance Before the introduction of the bandwidth inherit command option, when the bandwidth value was changed on the main interface, the existing subinterfaces did not inherit the bandwidth value. If the subinterface was created before the bandwidth was changed on the main interface, the subinterface would receive the default bandwidth of the main interface, and not the configured bandwidth. Additionally, if the router was subsequently reloaded, the bandwidth of the subinterface would then change to the bandwidth configured on the main interface. The bandwidth inherit command controls how a subinterface inherits the bandwidth of its main interface. This functionality eliminates inconsistencies related to whether the router has been reloaded and what the order was in entering the commands. The no bandwidth inherit command enables all subinterfaces to inherit the default bandwidth of the main interface, regardless of the configured bandwidth. If the bandwidth inherit command is used without configuring a bandwidth on a subinterface, all subinterfaces will inherit the current bandwidth of the main interface. If you configure a new bandwidth on the main interface, all subinterfaces will use this new value. If you do not configure a bandwidth on the subinterface and you configure the bandwidth inherit kbps command on the main interface, the subinterfaces will inherit the specified bandwidth. In all cases, if an explicit bandwidth setting is configured on an interface, the interface will use that setting, regardless of whether the bandwidth inheritance setting is in effect. Bandwidth Receipt Some interfaces (such as Asymmetric Digital Subscriber Line (ADSL), V.35, RS-449, and High-Speed Serial Interface (HSSI)) can operate with different transmit and receive bandwidths. The bandwidth receive command permits this type of asymmetric operation. For example, for ADSL, the lower layer detects the two bandwidth values and configures the Integrated Data Base (IDB) accordingly. Other interface drivers, particularly serial interface cards on low- and midrange-platforms, can operate in this asymmetric bandwidth mode but cannot measure their clock rates. In these cases, administrative configuration is necessary for asymmetric operations. buffer-size (bulkstat)To configure a maximum buffer size for the transfer of bulk statistics files, use the buffer-size command in Bulk Statistics Transfer configuration mode. To remove a previously configured buffer size from the configuration, use the no form of this command. Command History
Usage GuidelinesA configured buffer size limit is available primarily as a safety feature. Normal bulk statistics files should not generally meet or exceed the default value while being transferred. ExamplesIn the following example, the bulk statistics transfer buffer size is set to 3072 bytes: Router(config)# snmp mib bulkstat transfer bulkstat1 Router(config-bulk-tr)# schema ATM2/0-IFMIB Router(config-bulk-tr)# url primary ftp://user:pswrd@host/folder/bulkstat1 Router(config-bulk-tr)# buffer-size 3072 Router(config-bulk-tr)# enable Router(config-bulk-tr)# exit Router(config)# comparisonTo specify the type of Boolean comparison to be performed, use the comparison command in event trigger test boolean configuration mode. To disable the specified comparison value, use the no form of this command. Syntax Description
conditional objectTo define a conditional object when evaluating an expression, use the conditional object command in expression object configuration mode. To disable the configured settings, use the no form of this command. Usage GuidelinesThe object identifier specifies the instance of the object to consider while evaluating an expression. If the object does not have an instance, the value specified for the object identifier will not be used. Conditional objects determine the use of the value specified for the object identifier. ExamplesThe following example shows how to specify a conditional object: Router(config)# snmp mib expression owner owner1 name Expression1 Router(config-expression)# object 32 Router(config-expression-object)# conditional object mib-2.90.1.3.1.1.2.3.112.99.110.4.101.120.112.53 Router(config-expression-object)# end The following example shows how to enable wildcarded search for conditional object identifiers: Router(config-expression-object)# conditional object mib-2.5 wildcard Router(config-expression-object)# end context
To associate a Simple Network Management Protocol (SNMP) context with a particular VPN routing and forwarding (VRF) instance, use the context command in VRF configuration mode. To disassociate an SNMP context from a VPN, use the no form of this command. Command History
Usage GuidelinesBefore you use the context command to associate an SNMP context with a VPN, you must do the following:
SNMP contexts provide VPN users with a secure way of accessing MIB data. When a VPN is associated with a context, MIB data for that VPN exists in that context. Associating a VPN with a context helps service providers to manage networks with multiple VPNs. Creating and associating a context with a VPN enables a provider to prevent the users of one VPN from accessing information about other VPN users on the same networking device. A route distinguisher (RD) is required to configure an SNMP context. An RD creates routing and forwarding tables and specifies the default route distinguisher for a VPN. The RD is added to the beginning of an IPv4 prefix to make it globally unique. An RD is either an autonomous system number (ASN) relative, which means that it is composed of an autonomous system number and an arbitrary number, or an IP address relative and is composed of an IP address and an arbitrary number. ExamplesThe following example shows how to create an SNMP context named context1 and associate the context with the VRF named vrf1: Router(config)# snmp-server context context1 Router(config)# ip vrf vrf1 Router(config-vrf)# rd 100:120 Router(config-vrf)# context context1 Related Commands
context (bulkstat)To associate a Simple Network Management Protocol (SNMP) context with the bulk statistics schema, use the context command in bulk statistics schema configuration mode. To disassociate an SNMP context from the bulk statistics schema, use the no form of this command. Usage GuidelinesUse the snmp mib bulkstat schema command to enter bulk statistics schema configuration mode, and then use the context command to associate an SNMP context with the bulk statistics schema. correlateTo build a single complex event, use the correlate command in trigger applet configuration mode. To disable the complex event, use the no form of this command.
correlate
{event event-tag | track track-object-number}
[andor | and | or]
{event event-tag | track track-object-number}
no correlate
{event event-tag | track track-object-number}
[andor | and | or]
{event event-tag | track track-object-number}
Syntax Description
Command DefaultThe event detector counter is triggered when the specified counter crosses the threshold. Usage GuidelinesAfter you enter the trigger statement, the router enters trigger applet configuration mode. The correlate statement and up to eight attribute statements can be specified in trigger applet configuration mode. These statements are used to create a complex event correlation using the participating event statements to a maximum of eight statements. The correlate statement allows Boolean logic to be used to relate events and tracked objects. When the result of the correlate evaluation is true, the trigger criteria are applied. The correlation occurs from left to right taking into account the attribute statement conditions for the event. ExamplesThe following example, shows how to configure a correlate statement after entering trigger applet configuration mode. This applet will run if the write memory or copy run start command occurs within 60 seconds of CRON specified time.
Router(config)# event manager applet trigger
Router(config-applet)# event tag e1 cli pattern "write mem.*" sync yes
Router(config-applet)# event tag e2 cli pattern "copy run start" sync yes
Router(config-applet)# trigger occurs 1 period-start 0-59/1 0-23/1 * * 0-7 period 60
Router(config-applet-trigger)# correlate event e1 or event e2
Router(config-applet-trigger)# attribute tag e1 occurs 1
Router(config-applet-trigger)# attribute tag e2 occurs 1
Router(config-applet-trigger)# action 1.0 syslog msg "$_cli_msg Command Executed"
Router(config-applet-trigger)# set 2.0 _exit_status 1
In the following example, the applet will run if either the write memory or copy run start command occurs and any syslog message that contains the string "hello" occurs within 60 seconds of any valid CRON specified time. Router(config)# event manager applet trigger Router(config-applet)# event tag e1 cli pattern "write mem.*" sync yes Router(config-applet)# event tag e2 cli pattern "copy run start" sync yes Router(config-applet)# event tag e3 syslog pattern "hello" Router(config-applet)# trigger occurs 1 period-start 0-59/1 0-23/1 * * 0-7 period 60 Router(config-applet-trigger)# correlate event e1 or event e2 and event e3 Router(config-applet-trigger)# attribute tag e1 occurs 1 Router(config-applet-trigger)# attribute tag e2 occurs 1 Router(config-applet-trigger)# attribute tag e3 occurs 1 Router(config-applet-trigger)# action 1.0 syslog msg "$_cli_msg Command Executed" Router(config-applet-trigger)# set 2.0 _exit_status 1 In the following example, the applet will run when the write memory command is entered and the tracked object 10 is set: Router(config)# event manager applet trigger Router(config)# event tag e1 cli pattern "write mem.*" sync yes Router(config)# trigger occurs 1 Router(config-applet-trigger)# correlate event e1 and track 10 Router(config-applet-trigger)# attribute tag e1 occurs 1 Router(config-applet-trigger)# action 1.0 syslog msg "$_cli_msg Command Executed" Router(config-applet-trigger)# set 2.0 _exit_status 1 Related Commands
delta (test threshold)To specify a delta value for the threshold trigger test, use the delta command in event trigger threshold configuration mode. To disable the configured settings, use the no form of this command.
delta
{falling | rising}
{threshold-value | event owner event-owner name event-name}
no
delta
{falling | rising}
Syntax Description
Usage GuidelinesThe delta command sets the delta falling or rising threshold to the specified value when the object sampling method is delta. The delta rising event owner command specifies the event to be invoked when the delta rising threshold is triggered. Similarly, the delta falling event owner specifies the event to be invoked when the delta falling threshold is triggered. delta intervalTo specify an interval for the delta sampling of objects used while evaluating an expression, use the delta interval command in expression configuration mode. To disable the configured settings, use the no form of this command. Usage GuidelinesIf there are no objects configured for the delta sampling method, the delta interval command does not configure the interval. description (event)To describe the function and use of an event, use the description command in event configuration mode. To remove the description, use the no form of this command. Usage GuidelinesThe description command configures a free-text description of the function and use of an event. description (expression)To provide a description of the use of an expression, use the description command in expression configuration mode. To remove the description, use the no form of this command. Usage GuidelinesThe description command configures a free-text description of the function and use of an expression. description (trigger)To provide a description of the function and use of an event trigger, use the description command in the event trigger configuration mode. To remove the description, use the no form of this command. Usage GuidelinesThe description command configures a free-text description of the function and use of an event trigger. discontinuity object (expression)To define the discontinuity properties for an object, use the discontinuity object command in expression object configuration mode. To disable the configuration settings, use the no form of this command.
discontinuity
object
discontinuity-object-id
[wildcard]
[type {timeticks | timestamp | date-and-time}]
no
discontinuity
object
Syntax DescriptionUsage GuidelinesThe discontinuity object command configures discontinuity properties of an object when the object sampling type is delta or changed. ExamplesThe following example shows how to configure discontinuity properties for an object: Router(config)# snmp mib expression owner owner1 name ExpressionA Router(config-expression)# object 43 Router(config-expression-object)# discontinuity object 0.7 Router(config-expression-object)# end The following example shows how to enable wildcarded search for discontinuity object identifiers: Router(config-expression-object)# discontinuity object 0.7 wildcard Router(config-expression-object)# end The following example shows how to specify the type for discontinuity in a counter: Router(config-expression-object)# discontinuity object 0.7 type timeticks Router(config-expression-object)# end enable (bulkstat)To begin the bulk statistics data collection and transfer process for a specific bulk statistics configuration, use the enable command in Bulk Statistics Transfer configuration mode. To disable the bulk statistics data collection and transfer process for a specific bulk statistics configuration, use the no form of this command. Command History
Usage GuidelinesSpecific bulk statistics configurations are identified with a name, as specified in the snmp mib bulkstat transfer command. The enable command (in Bulk Statistics Transfer configuration mode) begins the periodic MIB data collection and transfer process. Collection (and subsequent file transfer) will start only if this command is used. Conversely, the no enablecommand will stop the collection process. Subsequently, issuing the enablecommand will start the operations again. Each time the collection process is started using the enable command, data is collected into a new bulk statistics file. When the no enable command is used, the transfer process for any collected data will immediately begin (in other words, the existing bulk statistics file will be transferred to the specified management station). To successfully enable a bulk statistics configuration, at least one schema with a non-zero number of objects must be configured. ExamplesThe following example shows the bulk statistics transfer configuration named bulkstat1 as enabled: Router(config)# snmp mib bulkstat transfer bulkstat1 Router(config-bulk-tr)# schema ATM2/0-IFMIB Router(config-bulk-tr)# url primary ftp://user:pswrd@host/folder/bulkstat1 Router(config-bulk-tr)# enable Router(config-bulk-tr)# exit enable (event)To enable an event or event trigger, use the enable command in event or event trigger configuration mode, respectively. To disable the event, use the no form of this command. ExamplesThe following example shows how to enable an event: Router(config)# snmp mib event owner owner1 name EventA Router(config-event)# enable Router(config-event)# end The following example shows how to enable an event trigger: Router(config)# snmp mib event trigger owner owner1 name triggerA Router(config-event-trigger)# enable Router(config-event-trigger)# end enable (expression)To enable an expression, use the enable command in expression configuration mode. To disable an expression, use the no form of this command. event ownerTo specify the event owner for an event trigger according to the trigger type and status of the trigger, use the event owner command in event trigger existence or event trigger boolean configuration mode. To disable the configuration and set default parameters, use the no form of this command. Command ModesEvent trigger existence configuration (config-event-trigger-existence) Event trigger boolean configuration (config-event-trigger-boolean) Usage GuidelinesThe event is identified by event-owner and event-name values and is configured by using the snmp mib event command. Events are enabled by using the enable command. ExamplesThe following example shows how to specify an event owner for the existence trigger test: Router(config)# snmp mib event trigger owner owner1 name triggerA Router(config-event-trigger)# test existence Router(config-event-trigger-existence)# event owner owner2 name event2 Router(config-event-trigger-existence)# end The following example shows how to specify an event owner for the Boolean trigger test: Router(config)# snmp mib event trigger owner owner1 name triggerA Router(config-event-trigger)# test boolean Router(config-event-trigger-boolean)# event owner owner2 name event2 Router(config-event-trigger-boolean)# end expressionTo specify an expression for evaluation, use the expression command in expression configuration mode. To disable the configured settings, use the no form of this command. Usage GuidelinesThe expressions are in the ANSI C syntax except for the variable names. Variables are expressed as $ (dollar sign) and integers that correspond to the object number. An example of an expression is ($1-$5)*100. falling (test threshold)To specify a falling threshold value for the threshold trigger test, use the falling command in event trigger threshold configuration mode. To disable the specified threshold, use the no form of this command. Usage GuidelinesThe falling threshold value you specify is verified when the threshold trigger is active. If the sample value is equal to or less than the value you specify and greater than the value at the last sampling interval, a corresponding trigger is generated. The falling event owner command specifies the event to be invoked when the falling threshold is triggered. An event is identified by the owner and name and is configured by using the snmp mib event owner command. format (bulkstat)To specify the format to be used for the bulk statistics data file, use the format command in Bulk Statistics Transfer configuration mode. To disable a previously configured format specification and return to the default, use the no form of this command. Command History
Usage Guidelines
The bulk statistics data file (VFile) contains two types of fields: tags and data. Tags are used to set off data to distinguish fields of the file. All other information is in data fields. For the bulkASCII and bulkBinary formats, periodic polling enables data for a single data group (object list) to be collected more than once in the same VFile. Each such instance of a data group can be treated as a different "table" type. Every object and table tag contains an additional sysUpTime field. Similarly each row tag contains the value of the sysUpTime when the data for that row was collected. The sysUpTime provides a time stamp for the data. For additional information about the structures of the bulk statistics data file formats, see the definitions in the CISCO-DATA-COLLECTION-MIB. ExamplesIn the following example, the bulk statistics data file is set to schemaASCII: Router(config)# snmp mib bulkstat transfer bulkstat1 Router(config-bulk-tr)# schema ATM2/0-IFMIB Router(config-bulk-tr)# url primary ftp://user:pswrd@host/folder/bulkstat1 Router(config-bulk-tr)# format schemaASCII Router(config-bulk-tr)# exit frequency (event trigger)To specify an interval between trigger samples, use the frequency command in event trigger configuration mode. To disable the configured interval, use the no form of this command. Usage GuidelinesThe frequency command configures the waiting time between trigger samples. By default, the frequency of object sampling is 600 seconds. id (expression)instance (MIB)To configure the MIB object instances to be used in a bulk statistics schema, use the instancecommand in Bulk Statistics Schema configuration mode. To remove a Simple Network Management Protocol (SNMP) bulk statistics object list, use the no form of this command. Syntax Description
Command DefaultBy default, MIB object instances to be used in bulk statistics schema are not configured. Command History
Usage GuidelinesThe instance command specifies the instance information for objects in the schema being configured. The specific instances of MIB objects for which data should be collected are determined by appending the value of the instance command to the objects specified in the associated object list. In other words, the schema object-list when combined with the schema instance specifies a complete MIB object identifier. The instance exact command indicates that the specified instance, when appended to the object list, is the complete OID. The instance wild command indicates that all subindices of the specified OID belong to this schema. In other words, the wild keyword allows you to specify a partial, wildcarded instance. Instead of specifying an OID, you can specify a specific interface. The interface interface-id keyword and argument allow you to specify an interface name and number (for example, FastEthernet 0) instead of specifying the ifIndex OID for the interface. The optional sub-if keyword, when added after specifying an interface or controller, includes the ifIndexes for all subinterfaces of the interface you specified. Only one instance command can be configured per schema. ExamplesThe following example shows how to configure the router to collect bulk statistics for the ifInOctets object (from the IF-MIB) for Fast Ethernet interface 3/0. In this example, 3 is the ifIndex instance for Fast Ethernet interface 3/0. The instance (3) when combined with the object list (ifIndex; 1.3.6.1.2.1.2.2.1.1) translates to the OID 1.3.6.1.2.1.2.2.1.1.3. Router# configure terminal Router(config)# snmp mib bulkstat object-list E0InOctets ! The following command specifies the object 1.3.6.1.2.1.2.2.1.1.3 (ifIndex) Router(config-bulk-objects)# add ifIndex Router(config-bulk-objects)# exit Router(config)# snmp mib bulkstat schema E0 Router(config-bulk-sc)# object-list E0InOctets ! The following command is equivalent to "instance exact oid 3". Router(config-bulk-sc)# instance exact interface FastEthernet 3/0 Router(config-bulk-sc)# exit Router(config)# snmp mib bulkstat transfer bulkstat1 Router(config-bulk-tr)# schema E0 Router(config-bulk-tr)# url primary ftp://user:password@host/ftp/user/bulkstat1 Router(config-bulk-tr)# url secondary tftp://user@host/tftp/user/bulkstat1 Router(config-bulk-tr)# format schemaASCII Router(config-bulk-tr)# transfer-interval 30 Router(config-bulk-tr)# retry 5 Router(config-bulk-tr)# enable Router(config-bulk-tr)# exit Router(config)# do copy running-config startup-config instance rangeTo specify the range of instances to collect for a given data group, use the instance rangecommand in Bulk Statistics Schema configuration mode. To delete a previously configured instance range, use the no form of this command. Usage GuidelinesWhen used in conjunction with the snmp mib bulkstat schema command, the instance range command can be used to configure a range of instances on which to collect data. ExamplesThe following example shows the collection of data for all instances starting with instance 1 and ending with instance 2: snmp mib bulkstat object-list ifmib add ifInOctets add ifOutOctets exit ! snmp mib bulkstat schema IFMIB object-list ifmib poll-interval 1 instance range start 1 end 2 exit ! snmp mib bulkstat transfer bulkstat1 schema IFMIB url primary tftp://202.153.144.25/pcn/bulkstat1 format schemaASCII transfer-interval 5 retry 5 buffer-size 1024 retain 30 enable end instance repetitionTo configure data collection to begin at a particular instance of a MIB object and to repeat for a given number of instances, use the instance repetition command in Bulk Statistics Schema configuration mode. To delete a previously configured repetition of instances, use the no form of this command. Usage GuidelinesWhen used in conjunction with the snmp mib bulkstat schema command, the instance repetition command can be used to configure data collection to repeat for a certain number of instances of a MIB object. ExamplesThe following example shows how to start data collection at the first instance and repeat for four instances of the indicated MIB object: snmp mib bulkstat object-list ifmib add ifOutOctets add ifInOctets snmp mib bulkstat schema IFMIB object-list ifmib poll-interval 1 instance repetition 1 max 4 snmp mib bulkstat transfer bulkstat1 schema IFMIB transfer-interval 5 retain 30 retry 5 buffer-size 1024 enable no snmp-serverobject (expression)To specify the objects to be used while evaluating an expression, use the object command in expression configuration mode. To disable the configured settings, use the no form of this command. Usage GuidelinesThe object-number argument associates objects with variables in an expression. The variable corresponding to an object contains $ (dollar sign) and the object number. For example, the object number is 1, and the variable is $1. The object command can be used multiple times to define multiple objects or variables in an expression. object idTo specify the object identifier of an object associated with an event, use the object id command in event object list, event action notification, event action set, or event trigger configuration mode. To disable the configured settings, use the no form of this command. Command ModesEvent object list configuration (config-event-objlist) Event action notification configuration (config-event-action-notification) Event action set configuration (config-event-action-set) Event trigger configuration (config-event-trigger) Usage GuidelinesThe object id command specifies the object identifier of the object associated with an event. If notifications are enabled for an event, the system sends a notification whenever the object is modified. ExamplesThe following example shows how to set the object identifier to 2.2 in event object list configuration mode: Router(config)# snmp mib event owner owner1 name eventA Router(config-event)# snmp mib event object list owner owner1 name objectA 10 Router(config-event-objlist)# object id 2.2 Router(config-event-objlist)# end The following example shows how to set the object identifier to 2.2 in event action notification configuration mode: Router(config)# snmp mib event owner owner1 name eventA Router(config-event)# action notification Router(config-event-action-notification)# object id 2.2 Router(config-event-action-notification)# end The following example shows how to set the object identifier to 2.2 in event action set configuration mode: Router(config)# snmp mib event owner owner1 name eventA Router(config-event)# action set Router(config-event-action-set)# object id 2.2 Router(config-event-action-set)# end The following example shows how to set the object identifier to 2.2 in event trigger configuration mode: Router(config)# snmp mib event trigger owner owner1 name triggerA Router(config-event-trigger)# object id 2.2 Router(config-event-trigger)# end object listTo configure a list of objects during an event, use the object list command in event trigger, event action notification, event trigger existence, event trigger boolean, or event trigger threshold configuration mode. To disable the configured settings, use the no form of this command. Command ModesEvent trigger configuration (config-event-trigger) Event action notification configuration (config-event-action-notification) Event trigger existence configuration (config-event-trigger-existence) Event trigger boolean configuration (config-event-trigger-boolean) Event trigger threshold configuration (config-event-trigger-threshold) ExamplesThe following example shows how to specify the object list for an event trigger: Router(config)# snmp mib event trigger owner owner1 name triggerA Router(config-event-trigger)# object list owner owner1 name objectA Router(config-event-trigger)# end The following example shows how to specify the object list for an action notification: Router(config)# snmp mib event owner owner1 name eventA Router(config-event)# action notification Router(config-event-action-notification)# object list owner owner1 name objectA Router(config-event-action-notification)# end The following example shows how to specify the object list for an existence trigger test: Router(config-event-trigger)# test existence Router(config-event-trigger-existence)# object list owner owner1 name objectA Router(config-event-trigger-existence)# end The following example shows how to specify the object list for a Boolean trigger test: Router(config-event-trigger)# test boolean Router(config-event-trigger-boolean)# object list owner owner1 name objectA Router(config-event-trigger-boolean)# end The following example shows how to specify the object list for a threshold trigger test: Router(config-event-trigger)# test threshold Router(config-event-trigger-threshold)# object list owner owner1 name objectA Router(config-event-trigger-threshold)# end object-listTo specify the bulk statistics object list to be used in the bulk statistics schema, use the object-list command in Bulk Statistics Schema configuration mode. To remove an object list from the schema, use the no form of this command. Command History
Usage GuidelinesThis command associates a bulk statistics object list with the schema being configured. The object list should contain a list of MIB objects to be monitored. Only one object list can be specified for each schema. ExamplesIn the following example, the object list named E0InOctets is associated with the schema named E0: Router(config)# snmp mib bulkstat schema E0 Router(config-bulk-sc)# object-list EOInOctets Router(config-bulk-sc)# instance exact interface FastEthernet 3/0 Router(config-bulk-sc)# exit poll-intervalTo configure the polling interval for a bulk statistics schema, use the poll-intervalcommand in Bulk Statistics Schema configuration mode. To remove a previously configured polling interval, use the no form of this command. Command History
Usage GuidelinesThe poll-interval command sets how often the MIB instances specified by the schema and associated object list are to be polled. Collected data is stored in the local bulk statistics file for later transfer. ExamplesIn the following example, the polling interval for bulk statistics collection is set to once every 3 minutes in the schema called FastEthernet2/1-CAR: Router(config)# snmp mib bulkstat schema FastEthernet2/1-CAR Router(config-bulk-sc)# object-list CAR-mib Router(config-bulk-sc)# poll-interval 3 Router(config-bulk-sc)# instance wildcard oid 3.1 Router(config-bulk-sc)# exit prefix objectTo enable the application to determine the object based on instance indexing, use the prefix objectcommand in the expression object configuration mode. Usage GuidelinesThe prefix objectcommand enables the application to determine an object according to the instance indexing. The instance index is used in expValueTable. The prefix object command eliminates the need to scan expObjectTable to determine a prefix, thereby easing the burden of an application. retainTo configure the retention interval for bulk statistics files, use the retain command in Bulk Statistics Transfer configuration mode. To remove a previously configured retention interval from the configuration, use the no form of this command. Command History
Usage GuidelinesThis command specifies how long the bulk statistics file should be kept in system memory, in minutes, after the completion of the collection interval and a transmission attempt is made. The default value of zero (0) indicates that the file will be deleted immediately from local memory after a successful transfer. If the retry command is used, you should configure a retention interval greater than 0. The interval between retries is the retention interval divided by the retry number. For example, if retain 10 and retry 2 are configured, retries will be attempted once every 5 minutes. Therefore, if the retain command is not configured (retain default is 0), no retries will be attempted. ExamplesIn the following example, the bulk statistics transfer retention interval is set to 10 minutes: Router(config)# snmp mib bulkstat transfer bulkstat1 Router(config-bulk-tr)# schema ATM2/0-IFMIB Router(config-bulk-tr)# url primary ftp://user:pswrd@host/folder/bulkstat1 Router(config-bulk-tr)# retry 2 Router(config-bulk-tr)# retain 10 Router(config-bulk-tr)# exit retry (bulkstat)To configure the number of retries that should be attempted for a bulk statistics file transfer, use the retry command in Bulk Statistics Transfer configuration mode. To return the number of bulk statistics retries to the default, use the no form of this command. Command History
Usage GuidelinesIf an attempt to send the bulk statistics file fails, the system can be configured to attempt to send the file again using the retry command. One retry includes an attempt first to the primary destination and then, if the transmission fails, to the secondary location; for example, if the retry value is 1, an attempt will be made first to the primary URL, then to the secondary URL, then to the primary URL again, and then to the secondary URL again. If the retry command is used, you should also use the retaincommand to configure a retention interval greater than 0. The interval between retries is the retention interval divided by the retry number. For example, if retain 10 and retry 2 are configured, retries will be attempted once every 5 minutes. Therefore, if the retain command is not configured (or the retain 0 command is used) no retries will be attempted. ExamplesIn the following example, the number of retries for the bulk statistics transfer is set to 2: Router(config)# snmp mib bulkstat transfer bulkstat1 Router(config-bulk-tr)# schema ATM2/0-IFMIB Router(config-bulk-tr)# url primary ftp://user:pswrd@host/folder/bulkstat1 Router(config-bulk-tr)# retry 2 Router(config-bulk-tr)# retain 10 Router(config-bulk-tr)# exit rising (test threshold)To specify an event owner for the rising threshold trigger, use the rising event owner command in event trigger threshold configuration mode. To disable the configured settings, use the no form of this command. Usage GuidelinesThe rising command specifies the event to be invoked when the rising threshold is triggered. An event is identified by the owner and name and is configured using the snmp mib event owner command. ExamplesThe following example shows how to specify an event owner for the rising threshold trigger: Router(config)# snmp mib event trigger owner owner1 name triggerA Router(config-event-trigger)# test threshold Router(config-event-trigger-threshold)# rising event owner owner1 name event5 Router(config-event-trigger-threshold)# end © 2012 Cisco Systems, Inc. All rights reserved.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|