The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This document describes how to periodically transfer selected MIB data from your router to a specified Network Management System (NMS). The periodic MIB data collection and transfer feature is also known as bulk statistics.
Release |
Modification |
---|---|
Release 4.2.0 |
The periodic MIB data collection and transfer feature was introduced and supported the IF-MIB only. |
Release 4.2.1 |
Additional MIBs were supported. |
This module contains the following topics:
To use periodic MIB data collection and transfer, you should be familiar with the Simple Network Management Protocol (SNMP) model of management information. You should also know what MIB information you want to monitor on your network devices, and the OIDs or object names for the MIB objects to be monitored.
Information About Periodic MIB Data Collection and Transfer
A type (or class) of SNMP management information is called an object. A specific instance from a type of management information is called an object instance (or SNMP variable). To configure a bulk statistics collection, you must specify the object types to be monitored using a bulk statistics object list and the specific instances of those objects to be collected using a bulk statistics schema.
MIBs, MIB tables, MIB objects, and object indices can all be specified using a series of numbers called an object identifier (OID). OIDs are used in configuring a bulk statistics collection in both the bulk statistics object lists (for general objects) and in the bulk statistics schemas (for specific object instances).
To group the MIB objects to be polled, you need to create one or more object lists. A bulk statistics object list is a user-specified set of MIB objects that share the same MIB index. Object lists are identified using a name that you specify. Named bulk statistics object lists allow the same configuration to be reused in different bulk statistics schemas.
All the objects in an object list must share the same MIB index. However, the objects do not need to be in the same MIB and do not need to belong to the same MIB table. For example, it is possible to group ifInOctets and a CISCO-IF-EXTENSION-MIB object in the same schema, because the containing tables for both objects are indexed by the ifIndex.
Data selection for the Periodic MIB Data Collection and Transfer Mechanism requires the definition of a schema with the following information:
Name of an object list.
Instance (specific instance or series of instances defined using a wild card) that needs to be retrieved for objects in the specified object list.
How often the specified instances need to be sampled (polling interval). The default polling interval is 5 minutes.
A bulk statistics schema is also identified using a name that you specify. This name is used when configuring the transfer options.
After configuring the data to be collected, a single virtual file (VFile or bulk statistics file) with all collected data is created. This file can be transferred to a network management station using FTP or TFTP. You can specify how often this file should be transferred. The default transfer interval is once every 30 minutes. You can also configure a secondary destination for the file to be used if, for whatever reason, the file cannot be transferred to the primary network management station.
The value of the transfer interval is also the collection period (collection interval) for the local bulk statistics file. After the collection period ends, the bulk statistics file is frozen, and a new local bulk statistics file is created for storing data. The frozen bulk statistics file is then transferred to the specified destination.
By default, the local bulk statistics file is deleted after successful transfer to an network management station.
Periodic MIB data collection and transfer (bulk statistics feature) allows many of the same functions as the bulk file MIB (CISCO-BULK-FILE-MIB.my), but offers some key advantages. The main advantage is that this feature can be configured through the CLI and does not require an external monitoring application.
Periodic MIB data collection and transfer is mainly targeted for medium to high-end platforms that have sufficient local storage (volatile or permanent) to store bulk statistics files. Locally storing bulk statistics files helps minimize loss of data during temporary network outages.
This feature also has more powerful data selection features than the bulk file MIB; it allows grouping of MIB objects from different tables into data groups (object lists). It also incorporates a more flexible instance selection mechanism, where the application is not restricted to fetching an entire MIB table.
How to Configure Periodic MIB Data Collection and Transfer
The first step in configuring the Periodic MIB Data Collection and Transfer Mechanism is to configure one or more object lists.
1.
configure
2.
snmp-server mib bulkstat object-list list-name
3.
add {oid | object-name}
4.
commit
Configure a bulk statistics schema.
The second step in configuring periodic MIB data collection and transfer is to configure one or more schemas.
The bulk statistics object list to be used in the schema must be defined.
1.
configure
2.
snmp-server mib bulkstat schema schema-name
3.
object-list list-name
4.
Do one of the following:
5.
poll-interval minutes
6.
commit
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
configure
| |||
Step 2 | snmp-server mib bulkstat schema schema-name Example: RP/0/RP0/CPU0:router(config)# snmp-server mib bulkstat schema intE0 RP/0/RP0/CPU0:router(config-bulk-sc)# |
Names the bulk statistics schema and enters bulk statistics schema mode. | ||
Step 3 | object-list list-name Example: RP/0/RP0/CPU0:router(config-bulk-sc)# object-list
ifMib
| Specifies the bulk statistics object list to be included in this schema. Specify only one object list per schema. If multiple object-list commands are executed, the earlier ones are overwritten by newer commands. | ||
Step 4 | Do one of the following:
Example: RP/0/RP0/CPU0:router(config-bulk-sc)# instance
wild oid 1
orRP/0/RP0/CPU0:router(config-bulk-sc)# instance
exact interface FastEthernet 0/1.25
orRP/0/RP0/CPU0:router(config-bulk-sc)# instance
range start 1 end 2
orRP/0/RP0/CPU0:router(config-bulk-sc)# instance
repetition 1 max 4
| Specifies the instance information for objects in this schema:
| ||
Step 5 | poll-interval minutes Example: RP/0/RP0/CPU0:router(config-bulk-sc)# poll-interval 10
| Sets how often data should be collected from the object instances specified in this schema, in minutes. The default is once every 5 minutes. The valid range is from 1 to 20000. | ||
Step 6 |
commit
|
Configure the bulk statistics transfer options.
The final step in configuring periodic MIB data collection and transfer is to configure the transfer options. The collected MIB data are kept in a local file-like entity called a VFile (virtual file, referred to as a bulk statistics file in this document). This file can be transferred to a remote network management station at intervals you specify.
The bulk statistics object lists and bulk statistics schemas must be defined before configuring the bulk statistics transfer options.
1.
configure
2.
snmp-server mib bulkstat transfer-id transfer-id
3.
buffer-size bytes
4.
format {bulkBinary | bulkASCII | schemaASCII}
5.
schema schema-name
6.
transfer-interval minutes
7.
url primary url
8.
url secondary url
9.
retry number
10.
retain minutes
11.
enable
12.
commit
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
configure
| |||
Step 2 |
snmp-server mib bulkstat transfer-id transfer-id Example: RP/0/RP0/CPU0:router(config)# snmp-server mib
bulkstat transfer bulkstat1
|
Identifies the transfer configuration with a name (transfer-id argument) and enters bulk statistics transfer configuration mode. | ||
Step 3 | buffer-size bytes Example: RP/0/RP0/CPU0:router(config-bulk-tr)# buffersize 3072
| (Optional) Specifies the maximum size for the bulk statistics data file, in bytes. The valid range is from 1024 to 2147483647 bytes. The default buffer size is 2048 bytes.
| ||
Step 4 | format {bulkBinary | bulkASCII | schemaASCII} Example: RP/0/RP0/CPU0:router(config-bulk-tr)# format schemaASCII
| (Optional) Specifies the format of the bulk statistics data file (VFile). The default is schemaASCII.
| ||
Step 5 | schema schema-name Example: RP/0/RP0/CPU0:router(config-bulk-tr)# schema ATM2/0-IFMIB RP/0/RP0/CPU0:router(config-bulk-tr)# schema ATM2/0-CAR RP/0/RP0/CPU0:router(config-bulk-tr)# schema Ethernet2/1-IFMIB | Specifies the bulk statistics schema to be transferred. Repeat this command as desired. Multiple schemas can be associated with a single transfer configuration; all collected data are placed in a single bulk data file (VFile). | ||
Step 6 | transfer-interval minutes Example:RP/0/RP0/CPU0:router RP/0/RP0/CPU0:router(config-bulk-tr)# transfer-interval 20
| (Optional) Specifies how often the bulk statistics file are transferred, in minutes. The default value is once every 30 minutes. The transfer interval is the same as the collection interval. | ||
Step 7 | url primary url Example: RP/0/RP0/CPU0:router(config-bulk-tr)# url primary
ftp://user:password@host/folder/bulkstat1
| Specifies the network management system (host) that the bulk statistics data file is transferred to, and the protocol to use for transfer. The destination is specified as a Uniform Resource Locator (URL). FTP or TFTP can be used for the bulk statistics file transfer. | ||
Step 8 | url secondary url Example: RP/0/RP0/CPU0:router(config-bulk-tr)# url secondary
tftp://10.1.0.1/tftpboot/user/bulkstat1
| (Optional) Specifies a backup transfer destination and protocol for use in the event that transfer to the primary location fails. FTP or TFTP can be used for the bulk statistics file transfer. | ||
Step 9 | retry number Example: RP/0/RP0/CPU0:router(config-bulk-tr)# retry 1
| (Optional) Specifies the number of transmission retries. The default value is 0 (in other words, no retries). If an attempt to send the bulk statistics file fails, the system can be configured to attempt to send the file again using this command. One retry includes an attempt first to the primary destination then, if the transmission fails, to the secondary location. For example, if the retry value is 1, an attempt is made first to the primary URL, then to the secondary URL, then to the primary URL again, then to the secondary URL again. The valid range is from 0 to 100. If all retries fail, the next normal transfer occurs after the configured transfer-interval time. | ||
Step 10 | retain minutes Example: RP/0/RP0/CPU0:router(config-bulk-tr)# retain 60
| (Optional) 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 is 0. Zero (0) indicates that the file is deleted immediately after the transfer is attempted. The valid range is from 0 to 20000.
| ||
Step 11 | enable Example: RP/0/RP0/CPU0:router(config-bulk-tr)# enable
| Begins the bulk statistics data collection and transfer process for this configuration.
| ||
Step 12 |
commit
|
Note | If the maximum buffer size for a bulk statistics file is reached before the transfer interval time expires, the transfer operation is still initiated, but any bulk statistics data received after the file was full, and before it was transferred, are deleted. To correct this behavior, you can decrease the polling frequency, or increase the size of the bulk statistics buffer. If retain 0 is configured, no retries are attempted. This is because the interval between retries is the retain value divided by the retry value. For example, if retain 10 and retry 2 are configured, retries are attempted once every 5 minutes. Therefore, if you configure the retry command, you should also configure an appropriate value for the retain command. |
1.
show snmp mib bulkstat transfer transfer-name
Command or Action | Purpose | |
---|---|---|
Step 1 | show snmp mib bulkstat transfer transfer-name
|
(Optional) The show command for this feature lists all bulk statistics virtual files (VFiles) on the system that have finished collecting data. (Data files that are not complete are not displayed.) The output lists all of the completed local bulk statistics files, the remaining time left before the bulk statistics file is deleted (remaining retention period), and the state of the bulk statistics file. The “STATE” of the bulk statistics file is one of the following:
To display only the status of a named transfer (as opposed to all configured transfers), specify the name of the transfer in the transfer-name argument. |
RP/0/RP0/CPU0:router# show snmp mib bulkstat transfer
Transfer Name : ifmib
Retained files
File Name : Time Left (in seconds) :STATE
---------------------------------------------------------------------
ifmib_Router_020421_100554683 : 173 : Retry (2 Retry attempt(s) Left)
This example shows how to configure periodic MIB data collection and transfer:
snmp-server mib bulkstat object-list cempo add cempMemPoolName add cempMemPoolType ! snmp-server mib bulkstat schema cempWild object-list cempo instance wild oid 8695772 poll-interval 1 ! snmp-server mib bulkstat schema cempRepeat object-list cempo instance repetition 8695772.1 max 4294967295 poll-interval 1 ! snmp-server mib bulkstat transfer-id cempt1 enable url primary tftp://223.255.254.254/auto/tftp-sjc-users3/dseeniva/dumpdcm schema cempWild schema cempRepeat transfer-interval 2 !
This example shows sample bulk statistics file content:
Schema-def cempt1.cempWild "%u, %s, %s, %d" Epochtime instanceoid 1.3.6.1.4.1.9.9.221.1.1.1.1.3 1.3.6.1.4.1.9.9.221.1.1.1.1.2 cempt1.cempWild: 1339491515, 8695772.1, processor, 2 cempt1.cempWild: 1339491515, 8695772.2, reserved, 11 cempt1.cempWild: 1339491515, 8695772.3, image, 12 cempt1.cempWild: 1339491575, 8695772.1, processor, 2 cempt1.cempWild: 1339491575, 8695772.2, reserved, 11 cempt1.cempWild: 1339491575, 8695772.3, image, 12 Schema-def cempt1.cempRepeat "%u, %s, %s, %d" Epochtime instanceoid 1.3.6.1.4.1.9.9.221.1.1.1.1.3 1.3.6.1.4.1.9.9.221.1.1.1.1.2 cempt1.cempRepeat: 1339491515, 8695772.1, processor, 2 cempt1.cempRepeat: 1339491515, 8695772.2, reserved, 11 cempt1.cempRepeat: 1339491515, 8695772.3, image, 12 cempt1.cempRepeat: 1339491515, 26932192.1, processor, 2 cempt1.cempRepeat: 1339491515, 26932192.2, reserved, 11 cempt1.cempRepeat: 1339491515, 26932192.3, image, 12 cempt1.cempRepeat: 1339491515, 35271015.1, processor, 2 cempt1.cempRepeat: 1339491515, 35271015.2, reserved, 11 cempt1.cempRepeat: 1339491515, 35271015.3, image, 12 cempt1.cempRepeat: 1339491515, 36631989.1, processor, 2 cempt1.cempRepeat: 1339491515, 36631989.2, reserved, 11 cempt1.cempRepeat: 1339491515, 36631989.3, image, 12 cempt1.cempRepeat: 1339491515, 52690955.1, processor, 2 cempt1.cempRepeat: 1339491515, 52690955.2, reserved, 11 cempt1.cempRepeat: 1339491515, 52690955.3, image, 12