SevOne logo
You must be logged into the NMS to search.

Table of Contents (Start)

SevOne NMS 5.4 Device Certification Guide

SevOne NMS Documentation

All SevOne NMS user documentation is available online from the SevOne Support website.

  1. www.sevone.com/support

  2. Enter email address and password.

  3. Click Login.

  4. Click the Solutions icon.

© Copyright 2015, SevOne Inc. All rights reserved. SevOne, SevOne PAS, SevOne DNC, Deep Flow Inspection, and Rethink Performance are either registered trademarks or trademarks of SevOne Inc. Other brands, product, service and company names mentioned herein are for identification purposes only and may be trademarks of their respective owners.

Device Certification Introduction

SevOne NMS provides an extensive set of MIBs, object types, and indicator types that enable you to gather poll data and to generate reports right out of the box. New technology and the multitude of device manufacturers prevent any MIB database from being comprehensive. This document describes how to certify new MIBs which enables SevOne NMS to monitor SNMP and other poll data from a device who's MIBs are not yet in SevOne NMS.

For the purposes of this document, device certification is the translation of SMNP MIBs and OIDs to SevOne NMS object types and indicator types. SNMP is a standard that provides a means for devices to report statistics. You certify MIBs to enable SNMP data to be polled and monitored from the OIDs in the MIB. MIBs you add to SevOne NMS via the MIB Manager are not necessarily certified. Uncertified MIBs in SevOne NMS can be used for trap event definitions and for SNMP walks that can resolve OIDs to indicator names.

Management Information Bases (MIBs) and Object Identifiers (OIDs)

MIBs are the files that enable the raw machine generated OIDs to display in a way that is more understandable to users. For a good online list of MIBs and MIB definitions, go to www.mibsearch.com.

Caution: Device certification should be done on your lab appliances prior to implementing the changes in a production environment. Duplicate MIBs can result in data loss. MIBs with missing dependencies and invalid OIDs can present erroneous information.

SevOne Support Device Certification

When SevOne Support performs the Device Certification process, there are three phases:

  • Provide Required Information

  • Analysis and Certification

  • Delivery of SevOne SNMP Definitions

Per the SevOne Service Level Agreement, SevOne Support completes the device certification in 10 business days after you file the Device Certification request with the required information.

Provide Required Information

SevOne Support can begin the Analysis and Certification phase as soon as you open a Device Certification support case that provides the following information:

  • Device Manufacturer - examples: Cisco, Alcatel, Juniper, etc.

  • Device Role - examples: Router, Packet Shaper, etc.

  • Requested Objects/Indicators - examples: Memory Used, Free; CPU %kernel, %user, %system, etc. or the specific OID names you want to monitor from the MIBs. Requested objects must include the specific performance indicators from the MIB. If you request all objects, SevOne Support will contact you for further clarification.

  • Any relevant new MIBs associated with that device.

  • The name and IP address of an example device that is in SevOne NMS that has the OIDs you request.

  • An SNMP Walk from the new device.

Perform the following steps to open a Device Certification support case. Start from the SevOne NMS SNMP Walk page. The device does not need to be in SevOne NMS to get an SNMP walk.

  1. Log on to SevOne NMS

  2. From the navigation bar, click the Devices menu and select SNMP Walk.

  3. In the IP Address/Hostname field, enter the device IP address or hostname.

  4. In the SNMP Port field, enter the port on the device for SevOne NMS to use to walk the OID.

  5. Click the SNMP Version drop-down and select the SNMP version.

    • If you select SNMP Version 1 or 2, in the Read Community String field, enter the read only community string SevOne NMS needs if the string on the device is different from what you enter on the Cluster Manager. Leave blank to use entry from the Cluster Manager Cluster Settings tab.

    • If you select Version 3, complete the following fields.

      1. In the Username field, enter the user name SevOne NMS needs to authenticate onto the device.

      2. In the Password field, enter the password SevOne NMS needs to authenticate onto the device.

      3. Click the Authentication Type drop-down.

        • Select None (usmNoAuthProtocol) to not use an authentication method to send or receive messages.

        • Select MD5 (usmHMACMD5AuthProtocol) to use MD5 authentication protocol for messages.

        • Select SHA (usmHMACSHAAuthProtocol) to use SHA authentication protocol for messages.

      4. If you select MD5 or SHA in the previous step, click the Encryption Type drop-down.

      5. Select None to not use encryption to send or receive messages.

      6. Select AES to use the Advanced Encryption Standard encryption method.

      7. Select DES to use the Data Encryption Standard encryption method.

      8. If you select AES or DES in the previous step, in the Encryption Key field, enter the localized key the authentication protocol on the device requires to authenticate messages.

  6. Click the SNMP Command drop-down and select snmpwalk to obtain all indicators from the OIDs you enter in the next field. (If you select snmpget you pull one indicator at a time.)

  7. In the OID field, enter the OID to walk (e.g., sysdescr.0 or .1.3.6. etc.).

  8. Click the Output Format drop-down and select Certification Walk.

  9. If you have a multi-peer SevOne NMS cluster, click the Source Peer drop-down and select the peer to perform the walk.

  10. Click Walk and wait for the walk to complete.

  11. Click Select Result Text to copy the walk text to your clipboard.

  12. From the SevOne NMS navigation bar, click Administration and select About.

  13. Under Helpful Links click SevOne Support to display the Self Service from our Portal page on the SevOne Support website.

  14. In the Email and Phone Support section, click Device Certification to start an email that opens a Device Certification support case.

  15. Paste the walk text from your clipboard into the email.

  16. Add all other required information to the Device Certification email.

    • Device Manufacturer

    • Device Role

    • Requested Objects/Indicators

    • Any relevant new MIBs associated with that device

    • The name and IP address of an example device that is in SevOne NMS

  17. Click Send to send the required information to SevOne Support.

Analysis and Certification

After you provide the certification information, SevOne Support begins the Analysis and Certification phase of the Device Certification process. SevOne Support studies the MIBs and the walk file to determine how to properly interpret the values.
SevOne Support then assembles the OIDs and related metadata into a file that contains the SevOne certified object and indicator definitions for your device.

Delivery of SevOne SNMP Definition

The final step in the process is to import the file into the config database on the cluster master peer in your SevOne NMS cluster. After you import the file and SevOne NMS discovers the device and polls the device for thirty minutes, you can run Performance Metrics reports on the new objects to verify the definitions are correct.

Certify Your Own MIBs

You have a new device. Now you want to certify the MIBs on the new device. Start by using the manufacturer's web site or other Internet resources to get the list of the manufacturer's MIBs. Some useful MIB sites include:

Gather the following relevant information:

  • MIB name

  • Imports/Index table (MIB dependencies)

  • Full enumerated SNMP walk

  • The name of the OIDs you want to monitor

MIB Layout

Each device manufacturer authors MIBs in a different way. Often the author does not include what the Imports (dependencies) are or whether or not the OID is a counter or gauge. This introduces some intelligent guess work when you attempt to certify the MIBs for a new device. This document describes the way a typical MIB could be written.

A full SNMP walk can provide sets of tables that define different objects. The basic MIB table structure includes an OID index which should identify different objects by a unique key (number, string, or variable). A set of OIDs repeats with the same set of OID numbers that increments the last digit for each item in the table based on the number of objects that belong in the table.

The beginning of the MIB contains an Import list. The Import list contains object and data type definitions found in other files upon which the MIB is dependent. Any MIBs on which the current MIB has a dependency display here. If the Import list is not present, you may not be able to translate all of the OIDs in the MIB.

The Object Identifiers (OIDs) typically appear next in the MIB. This section includes the vendor's enterprise ID (the 7th number from the left), a description of the MIB module, some definitions, and then the tables and variables.

Tables and Indexing

The OID tables contain the list of OIDs and the type of data that the OID returns. The data types that are most useful for SevOne NMS reports are counters and gauges. A counter value increments sequentially and a gauge value can go up or down. Each table in the MIB can display the object type definition and indicate the table index.

images/download/attachments/14289783/worddav5c6630bb4bfd78b50fd8fb43592ed400.png
A description of each OID follows the list of OIDs.

images/download/attachments/14289783/worddav6c5ba29e3e871a2f3c3bcd4f6c0b5c65.png

Perform SNMP Walk

Use the SevOne NMS SNMP Walk page. The device does not need to be in SevOne NMS in order for you to get an SNMP walk.

  1. Log on to SevOne NMS

  2. From the navigation bar, click the Devices menu and select SNMP Walk.

  3. In the IP Address/Hostname field, enter the device IP address or hostname.

  4. In the SNMP Port field, enter the port on the device for SevOne NMS to use to walk the OID.

  5. Click the SNMP Version drop-down and select the SNMP version.

    • If you select SNMP Version 1 or 2, in the Read Community String field, enter the read only community string SevOne NMS needs if the string on the device is different from what you enter on the Cluster Manager. Leave blank to use entry from the Cluster Manager Cluster Settings tab.

    • If you select Version 3, complete the following fields.

      1. In the Username field, enter the user name SevOne NMS needs to authenticate onto the device.

      2. In the Password field, enter the password SevOne NMS needs to authenticate onto the device.

      3. Click the Authentication Type drop-down.

        • Select None (usmNoAuthProtocol) to not use an authentication method to send or receive messages.

        • Select MD5 (usmHMACMD5AuthProtocol) to use MD5 authentication protocol for messages.

        • Select SHA (usmHMACSHAAuthProtocol) to use SHA authentication protocol for messages.

      4. If you select MD5 or SHA in the previous step, click the Encryption Type drop-down.

        • Select None to not use encryption to send or receive messages.

        • Select AES to use the Advanced Encryption Standard encryption method.

        • Select DES to use the Data Encryption Standard encryption method.

      5. If you select AES or DES in the previous step, in the Encryption Key field, enter the localized key the authentication protocol on the device requires to authenticate messages.

  6. In the Read Community String field, enter the read community string SevOne NMS needs to gather SNMP data from the device.

  7. Click the SNMP Command drop-down and select snmpwalk to obtain all indicators from the OIDs you enter in the next field. (If you select snmpget you pull one indicator at a time.)

  8. In the OID field, enter the OID to walk (e.g., sysdescr.0 or .1.3.6. etc.).

  9. Click the Output Format drop-down.

    • Select Default to display OIDs in text format (e.g. IF-MIB::ifInErrors.1).

    • Select Default With Numeric Indexes to translate strings to ASCII numeric values.

    • Select Numeric OIDs to translate all OIDs into numeric format (e.g. .1.3.6.1.2.1.2.2.1.14.2).

    • Select Certification Walk to translate all OIDs into a form that SevOne Support can use to perform device certifications.

  10. If you have a multi-peer SevOne NMS cluster, click the Source Peer drop-down and select the peer to perform the walk.

  11. Click the Output Format drop-down and select Certification Walk.

  12. Click Walk and wait for the walk to complete.

  13. Click Select Result Text to copy the walk text to your clipboard.

  14. Paste the text into a format you can use (Word, Notepad, etc.).

SNMP Walk Results

The first set of numbers in the table is usually an index that enables you to uniquely identify different items in the table. In SevOne NMS, an index is your SNMP object type.

.1.3.6.1.2.1.2.2.1.1 = ifIndex

The first instance of an ifIndex is ifIndex.1 with a .1 at the end. The second instance of an ifindex has a .2 at the end and so on.

.1.3.6.1.2.1.2.2.1.1.1
.1.3.6.1.2.1.2.2.1.1.2

or

ifIndex.1
ifIndex.2

images/download/attachments/14289783/worddav9206fd12a1292c7c8c2a89d944c801b9.png

Table with Multiple Objects and Index Key References

The rest of the OIDs in the table use the index key as a reference point for each object. So interface 1 displays its name as ifName.1 and its in octets in as inOctets.1. Interface 2 name is ifName.2 and in octets counter is inOctets.23.

#Date: Fri. 07/06/2012 14:31 EDT

#Command: snmpwalk -M /usr/local/snmp/mibs -v 1 -c 'public' '192.168.55.1:161' 'ifTable' 2>&1

#Run from IP: 192.168.32.155

#Result: 0
RFC1213-MIB::ifIndex.1 = INTEGER: 1
RFC1213-MIB::ifIndex.2 = INTEGER: 2
RFC1213-MIB::ifIndex.3 = INTEGER: 3
RFC1213-MIB::ifIndex.4 = INTEGER: 4
RFC1213-MIB::ifIndex.5 = INTEGER: 5
RFC1213-MIB::ifIndex.6 = INTEGER: 6

Tables can have multiple indexes to reference different objects in the MIB, and indexes can be integers or strings. Strings can be an IP address, text, or hex values.

Add MIBs

The MIB Manager enables you to add MIBs to SevOne NMS and to view MIB details. To access the MIB Manager from the navigation bar, click the Administration menu, select Monitoring Configuration, and then select MIB Manager.
MIBs you add to SevOne NMS via the MIB Manager are not necessarily certified. Uncertified MIBs in SevOne NMS can be used for trap event definitions and for SNMP walks that can resolve OIDs to indicator names.

MIB Details

The MIB list displays the MIBs in SevOne NMS. The Search field enables you to filter the list and to find specific MIBs.

  • Name - Displays the MIB name.

  • Size - Displays the size of the MIB file.

  • Revision - Displays the number of times you upload the MIB to SevOne NMS.

  • Date Added - Displays the date the MIB was added.

  • Date Updated - Displays the date the MIB was most recently edited.

The following controls enable you to manage MIBs.

  • Select the check boxes for the MIBs to manage and click images/download/attachments/14289783/worddav5870683ddeaba89e4c8c62c358feceac.png .

    • Select Download Selected MIBs to open and view the MIB files or to save the MIBs to your computer.

    • Select Delete Selected MIBs to remove the MIBs.

  • Click Add MIBs to display the MIB Uploader pop-up.

    1. Click Select MIB(s) to display the File Upload pop-up.

    2. Navigate to the MIB file to upload and select it. To add multiple MIBs, zip the MIB files into a .zip format file and select the .zip file.

    3. Click Open on the File Upload pop-up.

    4. Click Upload on the MIB Uploader pop-up.

  • Click Download All MIBs to create a .zip file of all MIBs that you can download for email, backup, etc.

  • View images/download/attachments/14289783/worddava61dd1234ff3337728d89ffd1dacbaf6.png - Click to view the MIB details.

Manage SNMP Object Types and Indicator Types

SevOne NMS provides starter set SNMP object types for the SNMP Plugin to poll. SNMP object types are enabled by default. The SNMP plugin goes through all possible object types and generates a list of individual object indexes for each object type. The rules for the object type are applied to each index that the SNMP plugin encounters to generate a unique object per index. The SNMP plugin uses text related to and based on OIDs to create human readable object names and descriptions. OIDs are evaluated as follows: Anything that is not text, a variable, an operator, a normal number, or otherwise special symbol is considered an OID. When an OID is evaluated, it evaluates to the value of the OID on the current device. If the OID is not present on the device, the OID, followed by the default SNMP index, is used instead. If the OID cannot be evaluated, it evaluates to the empty string. This provides the ability to use logical and mathematical expressions to store a resultant value in order to relate OIDs to each other. The SNMP plugin uses this to cross reference OIDs across the device's SNMP tree to gather descriptive information about a particular object.

OIDs are named by a series of numbers that comprise each specific OID.

Example: sysDescr is a simple case with the OID .1.3.6.1.2.1.1.1

Everything that comes after a named OID is referred to as its index. The [INDEX] variable is set to the SNMP index of the current object. This is a vector variable and each index in the vector corresponds with each index key you define for the object type. In the case of sysDescr, there is always only a .0, meaning that there is only one instance of sysDescr. .0 is generally used to mean that there will only ever be one instance of a particular OID. Usually, system-wide information is presented as .0 information. There is no practical limit to the count of numbers that may follow an OID. The goal is to keep that count small and meaningful. Cisco generally uses integer indexes that have a constant amount of numbers that follow each OID. Many server manufacturers use string indexes for maximum readability. A string index represents a piece of text (the string) as a series of characters and each character is then represented as its ASCII value.

Example: ifDescr is indexed by a single number (that is not 0). ifDescr.3 might be the description of an Ethernet card in a server.

Variables are evaluated as OIDs. The SNMP plugin treats variables like variables in any other language that stores a value of an expression. There are two types of variables: scalars and vectors. A scalar is anything that is a single something (e.g., a number or some text). A vector is an array of things. SNMP plugin vectors are different from vectors in normal scripting languages because SNMP plugin vectors are geared toward OIDs broken down into vectors by the . character. When used in an expression, both scalars and vectors are evaluated and inserted "raw" into the expression. This means that they may be treated as OIDs and evaluated as such. Scalars have nothing special done to them when they are evaluated. Variables are basically just a name surrounded by square brackets. Variable names may consist of any number of the following characters: a-z, A-Z, 0-9, and _.

Example: [Variable Name ]

The SNMP plugin evaluates OIDs in the context of a certain SNMP agent at the discovery time for each individual device. Discovery executes statements, in the context of that device, whereby every time an OID is encountered the device is queried for its value. As the SNMP discovery script goes through each possible object type, it generates a list of individual object indexes for that object type. The rules for each object type is applied to each index that it encounters to generate a unique object per index.

The following SNMP object type fields are evaluated in the following sequence for each object.

  • Variables

  • Subtype Expression

  • Assert Expression

  • Name Expression

  • Description Expression

The Object Rules page enables you to define rules to disable polling of objects and the Object Manager enables you to manage the objects on each device. The Object Types page enables you to manage SNMP object types and indicator types.

To access the Object Type Manager from the navigation bar, click the Administration menu, select Monitoring Configuration, and then select Object Type Manager.

images/download/attachments/12322625/objecttypes.png

Click the Filter drop-down and select SNMP Poller to display the object types the SNMP plugin can poll in the Object Types hierarchy on the left.

Manage SNMP Object Types

Perform the following steps to manage SNMP object types.

images/download/attachments/12322625/SNMP-EditObjectType.png

  1. Above the Object Types hierarchy, click Add or click images/download/attachments/12322625/editnew.png to display the Add/Edit SNMP Object Type pop-up.

  2. In the Name field, enter the object type name.

    Each of the following fields has a corresponding check box on the right side to enable you to make changes at this level of the hierarchy and below. The changes you make when you select the right-hand check box override and do not affect the parent object type definition.

  3. Click the Indexed By images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an index OID.

  4. Select the Reverse Engineer check box to have instances of this object type be uniquely identified by evaluating the OID of the SNMP object specified in the Indexed By field, as opposed to its value. How the values encoded within the OID are evaluated is based on the configuration of the Index Keys field. You should leave this check box selected for the vast majority of object types.

  5. The Index Keys fields enable you to select the index keys to use to determine how to treat the remaining octets after the index. In the Possible Values field, select index keys to assign to the object type (use Ctrl or Shift keys to multi-select) then move the index keys to the Index Keys field. Index keys in the Index Keys field are assigned to the object type and they display in the sequence in which they appear listed. Possible values include the following:

    • Integer - A single number that indicates there is a constant amount of numbers following each OID.

    • String - A string prefixed with the string length. This typically appears with double quotes.

    • String (Implied) - A string with no length information. This must only occur as the last index value.

    • Variable - A variable amount of numbers prefixed with the amount of items. This is typically used for IPv4 versus IPv6 indexes.

    • Variable (Implied) - A Variable amount of numbers, but with no length information. This must occur as the last index value. This can be used to "eat up" the remainder of the index.

  6. Click the Name Expression images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID that results in a unique name for all object types on a device.

  7. Click the Description Expression images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID to add additional information about the object type.

  8. Click the Subtype images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID to define a subtype for the object type (used for thresholds and reports). This can generate the following variables:

    • - [TYPE]: The numerical value of the subtype.

    • - [TYPE]: The name of the subtype.

    • - [TYPE]: The description of the subtype.

  9. Click the Assert images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID to use in the assert expression that generates a list of individual object indexes. This is skipped if the object does not pass the assert expression. No variables are generated.

    Example: To match only Ethernet interfaces and ignore everything else, enter the following statement.

    ifType == 6

    This separates memory from disks in the Host Resources MIB; both use hrStorageIndex, but each has a different value for hrStorageType. You should not modify the default Interface definition.

  10. Click the Last-change OID images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID for the SNMP plugin to use to determine if a change was made to the object type since it was last polled. If the object type changed, the SNMP plugin invalidates the current data.

  11. Click the Admin-status images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID for the SNMP plugin to use to determine the administrative status of the object.

  12. Click the Oper-status images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID for the SNMP plugin to use to determine the operational status of the object.

  13. In the Variable field, enter the variables, expressions, and operators to you want the SNMP plugin to evaluate first for use with the other fields.

  14. Click Edit Subtypes to display the Object Subtype Manager where you manage the object subtypes.

  15. Click Save.

  16. In the Object Types hierarchy, click to select the object type to which to associate device types.

  17. In the Device Type section on the right, click Associate to display a pop-up that enables you to associate the SNMP object type with device types on which you want to poll data.

    1. Select the check box for each device type to which to associate the object type.

    2. Click Associate to create the association and to close the pop-up.

Manage SNMP Indicator Types

Indicator types determine what indicators are polled for an object type. The indicator types list displays the indicator types for the object type you select in the Object Types hierarchy. There are two types of indicator types.

  • Atomic indicator types are measured directly by the plugin.

  • Synthetic indicator types are indicators whose value is dependent upon other indicators; atomic and/or synthetic. Synthetic indicators enable you to combine the data from several indicators into one synthetic indicator so that SevOne NMS can properly evaluate indicators such as Percentage Loss, Percent Error, Percent Idle, and other high precision metrics.

Manage Atomic SNMP Indicator Types

Perform the following steps on the Object Types page to manage SNMP atomic indicator types.

images/download/attachments/12322625/SNMP-EditAtomicIndicator.png

  1. Click on an SNMP object type in the hierarchy to display its indicator types on the right.

  2. Click Add Atomic Indicator Type or click images/download/attachments/12322625/editnew.png next to an atomic indicator type to display the Add/Edit SNMP Indicator Type pop-up.

  3. In the Indicator Name field, enter the name of the indicator type.

  4. In the Description field, enter the name to display.

  5. View the Indexed By OID you define for the object type. You cannot edit this field.

  6. For certain 64 bit OIDs, click the OID (high bit) images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID to describe the top 32 bits on the OID. See note below.

  7. Click the OID images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID to describe the object type expression.

  8. Click the Indicator Type drop-down and select a type.

  9. Click the Measured As drop-down and select a data unit.

  10. Click the Display As drop-down and select a display unit.

  11. Click the Max Value Expression images/download/attachments/12322625/browse2.png to display the SNMP OID Browser where you select an OID that is the maximum value for the indicator type.

  12. Click the Measured As drop-down and select a data unit.

  13. Select the Default Allowed for New Devices check box to have the SNMP plugin poll the indicator type by default when the object type is enabled and you enable the SNMP plugin for a device.

  14. Click Save.

OID High Bits - SNMP version 1 specifications allow for 32 bit, unsigned integer counters. A 32 bit counter increments up to around four billion, then wraps back to zero, and continues. SNMP version 2 introduced 64 bit unsigned integer counters that can count much higher. 64 bit counters have twice the bits and twice the physical capacity of 32 bit counters to make them far more powerful and accurate. Manufacturers had two options to incorporate 64 bit counters.

  • Create a new 64 bit OID to represent the same thing as the 32 bit version.

  • Create a second 32 bit OID that represents the high bits of the 64 bit version.

Manage SNMP Synthetic Indicator Types

Synthetic indicator types enable you to perform math on multiple metrics collected from multiple indicators on a single monitored object in order to calculate new KPIs.

Synthetic indicator types behave similar to the Calculation Editor that enables you to create custom calculation objects that perform math on multiple metrics collected from multiple objects and/or multiple synthetic indicators that you poll via the Calculation plugin. These features enable you create your own KPIs even when those KPIs do not exist on a device such as Percentage Loss, Percent Error, and Percent Idle. Synthetic indicators are always gauge type indicators and SevOne NMS evaluates all the indicator values the synthetic indicator uses as if the value is a gauge.

Example: You want to monitor voice gateways to reveal which PRI gets the most or least usage. Typical poll metrics enable you to report on the status of individual bearer channels and not the sum of all channels at any given time. This makes it difficult to monitor and alert on total PRI usage. Synthetic indicators enable you to sum the bearer channel statuses (each channel gets a value of 1 when busy), divide by the total number of bearer channels (23), and then multiply by 100, to collect the desired metric for PRI % usage.

images/download/attachments/12322625/EditSyntheticIndicator.png

  1. Click on an SNMP object type in the hierarchy to display its indicator types on the right. If the object type does not have any indicator types, the Add Synthetic Indicator Type button does not appear.

  2. Click Add Synthetic Indicator Type or click images/download/attachments/12322625/editnew.png next to a synthetic indicator type to display the Add/Edit Synthetic Indicator Type pop-up.

  3. In the Indicator Name field, enter the name of the synthetic indicator type.

  4. In the Description field, enter the name to display.

  5. The Synthetic Indicator Expression field enables you to define the calculation.

    If the border around the field turns red, your calculation is invalid and your graph results will be erroneous.

    1. Click an indicator type in the Available Source Indicators field and drag it to the Synthetic Indicator Expression field. The Available Source Indicators field contains the indicator types associated to the object type you select in the hierarchy.

    2. Enter applicable operators in the Synthetic Indicator Expression field to formulate the calculation. See the Acceptable Operators section below.

    3. Drag additional source indicator types and enter additional mathematical symbols to create the expression in the Synthetic Indicator Expression field.

  6. The Maximum Value Expression field enables you to define the indicator type maximum value calculation.

    1. Click an indicator type in the Available Source Indicators field and drag it to the Maximum Value Expression field.

    2. Enter applicable operators in the Maximum Value Expression field to formulate the calculation. See the Acceptable Operators section below.

    3. Drag additional source indicator types and enter additional mathematical symbols to create the expression in the Maximum Value Expression field.

  7. Click the Measure As drop-down and select the unit of measure to use to measure the data.

  8. Click the Display As drop-down and select the unit of measure in which a display the data.

  9. Select the Default Allowed for New Devices check box to have the plugin poll the indicator type by default when the object type is enabled and you enable the plugin for a device.

  10. Click Save.

Acceptable Operators

Your expression formula can include the following characters:

  • + add

  • - subtract

  • * multiply

  • / device

  • & & logical and

  • || logical or

  • <= less or equal

  • >= greater or equal

  • ! not equal

  • == equal

  • > greater than

  • < less than

  • ^ raise x to the power of y

  • % modulus

  • ?: if then else

If your calculation results in either of the following invalid values, there will be a gap in your graph: Not a Number (NAN) and Infinity (+/-INF). The following is how SevOne NMS attempts to prevent invalid values.
In sequence of processing:

  • Zero divided by zero results in NAN.

  • Any positive value divided by zero results in +INF.

  • Any negative value divided by zero results in -INF.

  • Zero multiplied by +/-INF results in NAN.

  • Any value added to, subtracted from, multiplied by, divided by, or divided from NAN results in NAN.

  • Any value compared to NAN (<, <=, ==, >=, >) results in 0. NAN != NAN.

  • Any value compared to +INF is less than +INF, except that +INF == +INF

  • Any value compared to -INF is greater than -INF, except that -INF == -INF

  • Any value added to or subtracted from +INF results in +INF

  • Any positive value multiplied by +/-INF results in +/-INF

  • Any value divided by +/-INF results in 0

Manage SNMP Object Subtypes

The Object Subtype Manager enables you to manage the object subtypes that group the objects you want the SNMP plugin to poll.

images/download/attachments/12322625/SNMP-ObjectSubtype.png

Perform the following steps to manage SNMP object subtypes.

  1. From the navigation bar, click the Administration menu, select Monitoring Configuration, and then select Object Subtype Manager. You can also access the Object Subtype Manager from the Object Types page.

  2. Click the Plugin drop-down and select SNMP Poller.

  3. Click the Object Type drop-down and select an object type to display its object subtypes in the list.

  4. Click Add Subtype or click images/download/attachments/10652141/editnew.png to display the Object Subtype Editor pop-up.

  5. In the Name field, enter the name of the object subtype.

  6. In the Description field, enter the object subtype description.

  7. Select the Is Common check box to enable the objects associates with the subtype to appear in lists of common objects.

  8. Click Add to add a new line to the Rules list.

  9. In the Identifier field, enter the string to match in order to apply the rule.

  10. Click Update to save the rule.

  11. Repeat the Add steps to define additional rules. Each rule is evaluated and appropriate rules are applied.

  12. Click Save.

Complex MIBs

Different Indices Same Object

The following describes how to create indicators that are indexed differently than the original object but one of the indices matches the index of the original object.

Example:

Atrica 2140

atrConnGen table uses atrConnGenConnID as the single index.

.1.3.6.1.4.1.6110.2.8.1

atrConnPerSla table uses a double integer index

atrConnPerfSlaMeasureConnIteratorIndex (which is 2 for 1 min average and 3 for 5 minute average) and atrConnPerfSlaMeasureConnConnId

atrConnPerfJittterAverage

.1.3.6.1.4.1.6110.2.8.1.2.1.7

Returns the following results

.1.3.6.1.4.1.6110.2.8.1.2.1.7.2.32=1
.1.3.6.1.4.1.6110.2.8.1.2.1.7.2.33=1
.1.3.6.1.4.1.6110.2.8.1.2.1.7.2.34=1
.1.3.6.1.4.1.6110.2.8.1.2.1.7.2.35=1
.1.3.6.1.4.1.6110.2.8.1.2.1.7.2.36=1
.1.3.6.1.4.1.6110.2.8.1.2.1.7.3.32=1
.1.3.6.1.4.1.6110.2.8.1.2.1.7.3.33=1
.1.3.6.1.4.1.6110.2.8.1.2.1.7.3.34=1
.1.3.6.1.4.1.6110.2.8.1.2.1.7.3.35=1
.1.3.6.1.4.1.6110.2.8.1.2.1.7.3.36=1

The second index value is atrConnGenConnID.

Add the value of the first index followed by [INDEX] in the OID field.

.1.3.6.1.4.1.6110.2.8.1.2.1.7.2.[INDEX]

The [INDEX] tells discovery to insert the value of the single index of the object in the OID field name.

SNMP As Seen By SevOne NMS

SevOne SNMP Scripting (S3) is a scripting language developed by SevOne to enable the SNMP plugin to discover complex SNMP objects. The primary purpose of S3 is to describe an SNMP OID in relation to other SNMP OIDs. S3 creates text that relates to and is based on OIDs in order to create SNMP object names and descriptions. S3 also relates OIDs to each other via logical and mathematical expressions to store the resultant value for later use such as to cross reference OIDs across a device SNMP tree and to gather descriptive information about a particular object.

The SNMP plugin uses S3 for the following:

  • Define an object name.

  • Define an object description.

  • Define an object type.

  • Determine which objects to include.

  • Define an indicator.

SNMP Object Naming Process

The SNMP plugin uses the following scoring formula to name a newly discovered object.

Assume that the best score to begin is 0.

  1. Go through all of the objects for the device.

  2. If the existing object’s Object Type is the wrong name, skip.

    • The best possible score is 5.

  3. Assume that the new object description is valid.

    • If the new object description is the same as the Object Type name, then the object description is no good.

    • If two things that the SNMP plugin already found have the object description, then the object description is no good.

  4. Assume that the old description is valid.

    • If the existing object description is the same as the Object Type name, then the object description is no good.

    • If two existing objects already have that object description, then the object description is no good.

      If either object description is no good, then the best possible score is now 4.
      The current score is 0.

  5. If the object names are the same, then increase the current score by 3.

    • Otherwise, if the new object description is good and the existing object name is the same as the new object description, then increase the current score by 1.

  6. If both object descriptions are good and the same, then increase the score by 1.

    • Otherwise, if the existing object description is good and the existing object description is the same as the new object name, then increase the current score by 1.

  7. If the SNMP indexes are the same, then increase the current score by 1.

  8. If the score is at least 2, and the score is better than the best score so far, consider the objects the same.

Human breakdown:

// Scoring analysis.
//
// Possible scores: / Current name matches existing name. [+3]
// 3,1,0 | Current description is good.
// \ Current description matches existing name. [+1]
//
// Possible scores: / Existing description is good.
// 1,0 | Current description is good.
// | Existing description matches current description. [+1]
// \ Existing description matches current name. [+1]
//
// Possible scores: / Current index matches existing index. [+1]
// 1,0 \
//
// So, when are things the same?
// 1. The names are the same.
// 2. The description (if good) matches an existing name AND the descriptions (if good) are the same.
// 3. The description (if good) matches an existing name AND the name is matches an existing description (if good).
// 4. The description (if good) matches an existing name AND the indexes are the same.
// 5. The name is matches an existing description (if good) AND the indexes are the same.

So what does this mean?

SevOne NMS has discovered and polls a router with two network cards with two ports on each.

All objects belong to the Interfaces object type.

Each port is an object.

Object Name

Object Description

SNMP Index

Note

Score

Eth0

Internet Access

1

Existing object with poll data

n/a

Eth1

Interface

2

Existing object with poll data

n/a

Eth2

Site One

3

Existing object with poll data

n/a

Eth3

Back Link

4

Existing object with poll data

n/a

You rename the ports on the router. Upon rediscovery the SNMP Plugin continues to poll the objects with no change or data loss as long as you do not change the object description or the SNMP index.

Object Name

Object Description

SNMP Index

Note

Score

Ethernet0

Internet Access

1

No data lost, polled as if it were still Eth0

x

Ethernet1

Interface

2

No data lost, polled as if it were still Eth1

x

Ethernet2

Site One

3

No data lost, polled as if it were still Eth2

x

Ethernet3

Back Link

4

No data lost, polled as if it were still Eth3

x

You remove the first card from the router. The router automatically renames each port. Upon rediscovery the SNMP plugin continues to polls the objects with no change or data loss as long as you do not change the description or the index.

Object Name

Object Description

SNMP Index

Note

Score

Ethernet0

Internet Access

1

Data stored for the number of Days Until Delete setting in the Cluster Manager

x

Ethernet1

Interface

2

Data stored for the number of Days Until Delete setting in the Cluster Manager

x

Ethernet0

Site One

3

No data lost, polled as if it were still Ethernet2

x

Ethernet1

Back Link

4

No data lost, polled as if it were still Ethernet3

x

You add the card back to the router within the number of Days Until Delete setting in the Cluster Manager. The router automatically changes the object name.

Object Name

Object Description

SNMP Index

Note

Score

Ethernet0

Internet Access

1

Data gap for when the card was removed but otherwise no data lost, polled as if it were still Ethernet0

x

Ethernet1

Interface

2

Data gap for when the card was removed but otherwise no data lost, polled as if it were still Ethernet1

x

Ethernet2

Site One

3

No data lost, polled as if it were still Ethernet0 from previous discovery.

x

Ethernet3

Back Link

4

No data lost, polled as if it were still Ethernet1 from previous discovery.

x

You decide to rename port four and change its description.

Object Name

Object Description

SNMP Index

Note

Score

Ethernet0

Internet Access

1

No data lost, polled as if it were still Ethernet0 from previous discovery.

x

Ethernet1

Interface

2

No data lost, polled as if it were still Ethernet1 from previous discovery.

x

Ethernet2

Site One

3

No data lost, polled as if it were still Ethernet2 from previous discovery.

x

Eth3

Site Three

4

New object created and new poll data collected.

Existing data stored for the number of Days Until Deleted setting in the Cluster Manager.

x

Anatomy of SNMP Data

At an extraordinarily high level, SevOne NMS groups each SNMP object by an SNMP object type. Each object has indicators that are grouped by indicator type. SNMP Objects are composed of OIDs which in turn break down into MIBs.

How OIDs Are Indexed

Device manufacturers name SNMP OIDs by a series of numbers, (e.g., The OID sysDescr is .1.3.6.1.2.1.1.1). Everything that comes after a named OID is the OID index. System wide information is usually denoted as .0 information. The .0 generally means there is only one instance of the OID, (e.g., The sysDescr index is always .0). The OID ifDescr is indexed by a single number that is not 0, (e.g., The description of an Ethernet card in a server might be ifDescr.3). There is no limit to the count of numbers that follow an OID. Some manufacturers use integer indexes that have a constant amount of numbers that follow each OID and some manufacturers use string indexes for readability. A string index represents a piece of text (the string) as a series of characters where each character is represented as its ASCII value. String indexes are sometimes prefixed with the length of the string.

Index Types

Integer - A single number of any size.

A simple integer that could be used for an interface index.

7

String (with length) - A string of text, prefixed with the number of characters and followed by the ASCII value of each character.

The text CPU is the number of characters followed by the ASCII value of each.

3.67.80.85

String (no length) - A string where the length is not prefixed.

The text CPU in ASCII values.

67.80.85

Number (with length) - A string index where the numbers do not have an ASCII meaning.

The IP address with its length before the octets.

4.192.158.0.1

Number (no length) - A string index with no length where the numbers do not have an ASCII meaning.

The IP address with no length information appears as a series of integer indexes. This is useful when there is no guaranteed how many numbers there could be.

192.168.0.1

How S3 Handles SNMP

S3 uses the full numeric OID representation (starting with .1) to remove the dependency on the MIBs and to remove potential ambiguity of the OID. This makes the object definition fully portable to another system because different MIBs can arbitrarily redefine OIDs.

Another S3 feature is that white space characters such as spaces, tabs, and new line characters are optional and exist for readability. All of the following are equivalent:

7+9
7 + 9
7
+9
7
+
9

Scripts

An S3 script is a sequential evaluation of one or many statements. Each statement is executed in sequence. The only logic provided by S3 comes from flavors of the ternary operator which acts like an IF statement. The final result of the script is the result of the final statement in the script.

Example 1:

Statement 1

Example 2:

  1. Statement 1

  2. Statement 2

  3. Statement 3

Statements

A statement is the atomic unit of a script. A statement can assign a value to a variable or a statement can be an expression that evaluates to some value. Each statement evaluates to some value upon execution, (e.g., For a variable assignment, the value of the statement is the value of the variable).

Statements are lists of expressions and expression chains may be very complex and long. All S3 statements must end in a semicolon <;>. The last statement in a script may omit the semicolon.

Simple statement:

Expression ;

List statement where the final value is the concatenation of both expressions:

Expression 1 Expression 2 ;

Expressions

An expression is the atomic unit of a statement. S3 is an OID-evaluation language and a text creation language. Multiple expressions can lie next to each other and their results are concatenated together. This differs from more logical and mathematical languages.

Example: 1 + 2 3 + 4

  • In C there needs to be a joining operation between the 2 and the 3 because they are considered two disjointed expressions which results in a syntax error.

  • In S3 this is seen as two separate expressions next to each other: 1+ 2 and 3 + 4 and the result of the statement is 37. The white space does not matter unless enclosed in quotes.

An expressions is anything that evaluates to a value. This value need not be numeric. A piece of text evaluates to itself. An expression might be the number 7, the word Hello, or a complex mathematical formula. Expressions can be chains of symbols and operators as long as the entire expression evaluates to a single value.

  • Number

7

  • String:

'Hello'

  • Complex Formula:

( ( 1 + 2 ) / 12 + 34 ) * 10

  • Variable or OID that evaluates to a number or string:

[INDEX]
.1.3.6.1.2.1.1.1.0

  • Multiple grouped expressions (enclosed within parentheses) concatenated together:

( 7 'Hello' ( ( 1 + 2 ) / 12 + 34 ) * 10 [INDEX] .1.3.6.1.2.1.1.1.0 )

Variables

Variables are evaluated as OIDs to store the value of an expression. S3 has two types of variables; scalars and vectors.

  • Scalar - Anything that is a single number or some text.

  • Vector - An array of things. Vectors in S3 are different from vectors in normal scripting languages. Vectors in S3 are geared toward OIDs because an individual OID is represented as .<number> and a full OID is a series of .<numbers>s one after another. S3 breaks down variables into vectors by the "." character.

Variables are a name surrounded by square brackets. Variable names consist of the following characters: a-z, A-Z, 0-9, and - .

[Variable Name]

A variable assignment is an expression. The evaluation of the assignment is the new variable value. A variable assignment uses the = operator.

[Variable name] = Expression

S3 uses the following conventions to differentiate SevOne system variables from user variables to prevent user variables from overwriting system variables. There is no rule to enforce this.

  • SevOne system variables use capital letters and underscores for spaces. [MY_VARIABLE]

  • User variables use lowercase letters, a capital letter in the next word, and no underscore for spaces. [myVariable]

S3 can treat and evaluate variables as OIDs. Each variable must be declared before use. There is no special declaration syntax, but a variable must have an assigned value before use in an expression. Both scalar variables and vector variables are evaluated and inserted raw into the expression. S3 does nothing special to scalar variables when scalar variables are evaluated.

When a vector variable is evaluated, each of the vector variable's components is written, separated by "."s. Elements in vector variables are zero-indexed numerically. The first element starts at 0, the second starts at 1, and so on. To access a particular element of a vector variable, surround the element index in curly braces after the variable.

[Variable Name ]{Index number }

A variable cannot be used as an index number. The index number must be an actual number.

Each element in a vector variable is usually a scalar variable. There are exceptions when an element in a vector variable is another vector variable.

Some variables should not be evaluated as an OID. Enclose the variable in back ticks to prevent the variable from being evaluated as an OID. If a variable simply contains a number, the variable is treated as a normal number if not back ticked; however, it is always safe to back tick a variable to prevent improper evaluation. Text evaluates to itself. Text is considered anything enclosed in quotes. Back ticks may be in a single quoted string and that single quote string may be in a back tick quoted string.

  • Single quotes (') - Single quotes are used for raw text. The content of the text is not processed in any way, e.g., 'Anything here'

  • Back Ticks (`) - Back ticks are used for variable interpolation. Any variables present in the text is evaluated, e.g., `Anything here, including variables`

S3 OID Handling

OIDs are evaluated. Anything that is not text, a variable, an operator, a normal number, or otherwise special symbol is considered an OID. When an OID is evaluated, it evaluates to the value of the OID on the current device. If the OID is not present on the device, the OID, followed by the default SNMP index, is used instead. If the OID cannot be evaluated, it evaluates to the empty string.

It is critical to note here that a variable without back ticks around it is treated exactly as it would if the value of the variable were to be placed in its stead. This means that a variable that contains a string representation of an OID is evaluated as that OID when it is encountered.

The following example might not work as expected:

1 [test] = 'test';
2 [test1] = [test] 1;

One might expect the value of "[test1]" to be "test1"; however, since "[test]" is not back ticked, it is treated as if the text "test" were present. As such, S3 tries to get the value of the OID whose name is "test" naturally, there is not one, and it returns the empty string. Thus, the final value is actually "1".

The proper way to do this is:

1 [test] = 'test';
2 [test1] = `[test]` 1;

This example back ticks the variable to prevent it from being evaluated as an OID.

Indexing

When an OID is encountered, S3 tries to evaluate it. If S3 cannot evaluate the OID, then S3 adds the value of the default index to the OID, which for SNMP discovery is [INDEX]. If S3 still cannot evaluate the OID, then the OID evaluates to the empty string. This allows for very human readable and human understandable definitions for objects and indicators. However, at the loss of stringent definitions.

If an OID already has .[INDEX] appended to it, then the OID saves S3 the step.

Symbols

Symbols are special tokens (characters, or collections of characters) that have a special function in S3.

Grouping

Parentheses ( and ) group expressions to define the sequence in which they are to be evaluated. This is commonly used in mathematical applications.

Example:

1 + 2 * 3

(which is 7)

Is not the same as:

( 1 + 2 ) * 3

(which is 9).

Parentheses can change two expressions into one expression.

Example:

( 1 + 2 3 + 4 )

Evaluates to the single value 37, which could be used by further expressions.

Operators

Operators are symbols. Operators are anything that act on an expression. There are three types of operators:

  • Unary operators act on one value only, (e.g., Not).

  • Binary operators act on two values, (e.g., Addition).

  • Ternary operators act on three values, (e.g., ... ? ... : ... is a ternary operator in C).

Math

The common mathematical operators are applied with the usual precedence. Mathematical operators have full floating point support.

Multiplication (Standard multiplication)

Left expression * Right expression

Division (Standard division)

Left expression / Right expression

Addition (Standard addition)

Left expression + Right expression

Subtraction (Standard subtraction)

Left expression - Right expression

Note: Because MIB names can contain a dash -, which is the same as the minus symbol -, all subtraction mathematical operators must have a blank space before and after the minus symbol.

Comparison

Comparison operators compare two expressions that return 1 if the comparison is true or return 0 if the comparison is false.

Equal to, Boolean == returns 1 if the left and right side are equal.

Left expression == Right expression

Not equal to, Boolean != returns 1 if the left and right side are not equal.

Left expression != Right expression

Less than, Boolean < returns 1 if the left side is less than the right side.

Left expression < Right expression

Less than or equal to, Boolean <= returns 1 if the left side is less than or equal to the right side.

Left expression <= Right expression

Greater than, Boolean > returns 1 if the left side is greater than the right side.

Left expression > Right expression

Greater than or equal to, Boolean >= returns 1 if the left side is greater than or equal to the right side.

Left expression >= Right expression

Logic

Logical operators generally perform true/false operations. S3 uses the following logical operators:

Binary

Binary logical operators operate on two expressions.

Logical AND, Boolean && returns 1 if the left and right side evaluate to true or returns 0 otherwise.

Left expression && Right expression

Logical OR, Boolean || returns 1 if the left side evaluates to true, the right side evaluates to true, or both evaluate to true; or returns 0 otherwise.

Left expression || Right expression

Bamboo, ||| is actually a shortcut for a particularly common case of the ?? ternary operator. It returns the value on the left if it is set; otherwise, it returns the value on the right regardless of its value.

Left expression ||| Right expression

This is equivalent to

Left expression ?? Left expression : Right expression

Ternary

Ternary logical operators operate on three expressions and S3 has two ternary operators.

Logical ternary operator, ? evaluates the left expression for a test that is greater than 0 (numerically) or for a string that has length and is not 0. Otherwise, it evaluates the right expression. For this reason, the test is usually a logical Boolean expression that returns 0 or 1, guaranteed.

test ? Left expression : Right expression

Existential ternary operator, ?? evaluates the left expression for a test that has a value that is not the empty string. Otherwise, it evaluates the right expression.

test ?? Left expression : Right expression

Note:

test ?? test : Right expression

Is equivalent to:

test ||| Right expression

Count

The results of a walk, #count walks the specified OID and returns the count of the occurrences of an OID . This does not resolve the OID in the manner that other naked OIDs are resolved to get the OID value. This #count resolves the OID count immediately, unlike the way an OID is resolved via an OID walk.

Example: To count the number of CPUs on a Linux device to determine what the maximum CPU utilization could be: net-snmp returns up to 800% utilization for a box with eight CPUs.

#count OID

Example:

#count .1.3.6.1.2.1.25.3.3.1.2

Can evaluate to 8.

Conversion

Since OIDs may be indexed by numbers, strings, or variably-sized components, S3 uses conversion operators that operate on a single expression.

Conversion from OID

OID-to-ASCII-string (with length), $s converts the expression to an ASCII string.

$s Expression

The expression should be an OID with the following format:

n.ASCII 1.ASCII 2.....ASCII n

Example:

$s '5.72.101.108.108.111'

Evaluates to Hello.

OID-to-ASCII-string (no length), $S converts the expression to an ASCII string.

$S Expression

The expression should be an OID with the following format:

ASCII 1.ASCII 2

Example:

$S '72.101.108.108.111'

Evaluates to Hello.

OID-to-numbers (with length), $v converts the expression to a string.

$v Expression

The expression should be an OID with the following format:

n.Number 1.Number 2.....Number n

Example:

$v '4.192.168.0.1'

Evaluates to 192.168.0.1.

OID-to-numbers (no length), $V Identity operation; the value should be the same as the expression.

$V Expression

This converts the expression to a string. The expression should be an OID with the following format:

Number 1.Number 2.

Example:

$V '192.168.0.1'

Evaluates to 192.168.0.1.

Conversion to OID

String-to-OID (with length), #s converts the expression to an OID with the length prefixed. The expression should be ASCII text.

#s Expression

Example:

#s 'Hello'

Evaluates to 5.72.101.108.108.111.

String-to-OID (no length), $s converts the expression to a string with no length information. The expression should be ASCII text.

#S Expression

Example:

#S 'Hello'

Evaluates to 72.101.108.108.111.

Numbers-to-OID (with length), #v converts the expression to an OID with the length prefixed. The expression should be text consisting of numbers separated by "."s.

#v Expression

Example:

#v '192.168.0.1'

Evaluates to 4.192.168.0.1.

Numbers-to-OID (no length), #V Identity operation; the value should be the same as the expression converts the expression to an OID with no length information. The expression should be text consisting of numbers separated by "."s.

#V Expression

Example:

#V '192.168.0.1'

Evaluates to 192.168.0.1.

Grouping

Parameters to the conversion operators should be enclosed in parentheses to avoid confusion.

To get the OID index representation of the text 37 (which is 2.51.55), you can try:

#s 1 + 2 3 + 4

However, the #s only applies to the 1 which yields 1.49. (49 is ASCII for 1); the value of that is added to 2 (1.49 + 2 = 3.49), which is then concatenated with 7 (to yield 3.497). You must use parentheses:

#s ( 1 + 2 3 + 4 )

Evaluates to 2.51.55 (which, as a string, is 37).

Precedence

The precedence of operators and symbols is as follows. When given the choice (in other words, when parentheses are not used), S3 evaluates operations in the following sequence.
The normal mathematical operator precedence (* / + -) is preserved in this list.

  1. 'text' `text`

  2. ()

  3. #s #S #v #V $s $S $v $V

  4. * /

  5. + -

  6. == != > >= < <=

  7. &&

  8. ||

  9. |||

  10. :

  11. ? ??

  12. =

Variable Assignment Example

The following examples assign the proper values to variables whose name should match their value.

  1. [one] = 1;

  2. [two] = 1 + 1;

  3. [two] = `[one]` + `[one]` - 1 + 1;

  4. [ten] = ( 2 + 1 ) * 3 + 1;

The following example sets all three variables equal to 12.

1 [x] = [y] = [z] = 12;

Logic

The following examples demonstrate Boolean logic.

  1. [bothXandY] = `[x]` && `[y]`;

  2. [eitherXorYorBoth] = `[x]` || `[y]`;

  3. [eitherXorY] = ( `[x]` && (`[y]` ? 0 : 1) ) || ( `[y]` && (`[x]` ? 0 : 1) );

  4. [notX] = `[x]` ? 0 : 1;

The following example selects the value of ifName if it is present, or the value of ifDescr otherwise.

[bamboo] = ifName ||| ifDescr;

The following examples demonstrate the use of the ternary operator.

  1. [sevenOrEight1] = `[x]` ? 7 : 8;

  2. [sevenOrEight2] = `[x]` ? 6 + 1 : 2 * 2 + 4;

Conversion

The following examples convert the text CPU into an OID index. The ASCII value for C=67, P=80, and U=85.

#s 'CPU'

The result of this is "3.67.80.85".

#S 'CPU'

The result of this is 67.80.85 (no length prefix).

The following examples convert the OID indexes specified into strings.

$s '3.67.80.85'

The result of this is CPU.

$S '67.80.85'

The result of this is also CPU.

Full Examples

VACM Entry

The Net-SNMP agent supports the NET-SNMP-VACM-MIB, which provides some information about Net-SNMP's View Access Control Model.

The following is a sample walk of nsVacmAccessEntry (.1.3.6.1.4.1.8072.1.9.1.1):

  1. NET-SNMP-VACM-MIB::nsVacmContextMatch."grpcomm1"."".0.noAuthNoPriv."read"

  2. = INTEGER: prefix(2)

  3. NET-SNMP-VACM-MIB::nsVacmContextMatch."grpcomm1"."".0.noAuthNoPriv."write"

  4. = INTEGER: prefix(2)

  5. NET-SNMP-VACM-MIB::nsVacmContextMatch."grpcomm1"."".0.noAuthNoPriv."notify"

  6. = INTEGER: prefix(2)

  7. NET-SNMP-VACM-MIB::nsVacmContextMatch."grpsnmpUser"."".3.authNoPriv."read"

  8. = INTEGER: prefix(2)

  9. NET-SNMP-VACM-MIB::nsVacmContextMatch."grpsnmpUser"."".3.authNoPriv."write"

  10. = INTEGER: prefix(2)

  11. NET-SNMP-VACM-MIB::nsVacmContextMatch."grpsnmpUser"."".3.authNoPriv."notify"

  12. = INTEGER: prefix(2)

  13. NET-SNMP-VACM-MIB::nsVacmViewName."grpcomm1"."".0.noAuthNoPriv."read"

  14. = STRING: all

  15. NET-SNMP-VACM-MIB::nsVacmViewName."grpcomm1"."".0.noAuthNoPriv."write"

  16. = STRING: none

  17. NET-SNMP-VACM-MIB::nsVacmViewName."grpcomm1"."".0.noAuthNoPriv."notify"

  18. = STRING: none

  19. NET-SNMP-VACM-MIB::nsVacmViewName."grpsnmpUser"."".3.authNoPriv."read"

  20. = STRING: all

  21. NET-SNMP-VACM-MIB::nsVacmViewName."grpsnmpUser"."".3.authNoPriv."write"

  22. = STRING: all

  23. NET-SNMP-VACM-MIB::nsVacmViewName."grpsnmpUser"."".3.authNoPriv."notify"

  24. = STRING: all

  25. NET-SNMP-VACM-MIB::nsVacmStorageType."grpcomm1"."".0.noAuthNoPriv."read"

  26. = INTEGER: permanent(4)

  27. NET-SNMP-VACM-MIB::nsVacmStorageType."grpcomm1"."".0.noAuthNoPriv."write"

  28. = INTEGER: permanent(4)

  29. NET-SNMP-VACM-MIB::nsVacmStorageType."grpcomm1"."".0.noAuthNoPriv."notify"

  30. = INTEGER: permanent(4)

  31. NET-SNMP-VACM-MIB::nsVacmStorageType."grpsnmpUser"."".3.authNoPriv."read"

  32. = INTEGER: permanent(4)

  33. NET-SNMP-VACM-MIB::nsVacmStorageType."grpsnmpUser"."".3.authNoPriv."write"

  34. = INTEGER: permanent(4)

  35. NET-SNMP-VACM-MIB::nsVacmStorageType."grpsnmpUser"."".3.authNoPriv."notify"

  36. = INTEGER: permanent(4)

  37. NET-SNMP-VACM-MIB::nsVacmStatus."grpcomm1"."".0.noAuthNoPriv."read"

  38. = INTEGER: active(1)

  39. NET-SNMP-VACM-MIB::nsVacmStatus."grpcomm1"."".0.noAuthNoPriv."write"

  40. = INTEGER: active(1)

  41. NET-SNMP-VACM-MIB::nsVacmStatus."grpcomm1"."".0.noAuthNoPriv."notify"

  42. = INTEGER: active(1)

  43. NET-SNMP-VACM-MIB::nsVacmStatus."grpsnmpUser"."".3.authNoPriv."read"

  44. = INTEGER: active(1)

  45. NET-SNMP-VACM-MIB::nsVacmStatus."grpsnmpUser"."".3.authNoPriv."write"

  46. = INTEGER: active(1)

  47. NET-SNMP-VACM-MIB::nsVacmStatus."grpsnmpUser"."".3.authNoPriv."notify"

  48. = INTEGER: active(1)

And with numeric OIDs:

  1. .1.3.6.1.4.1.8072.1.9.1.1.2.8.103.114.112.99.111.109.109.49.0.0.1.4.114.101.97.100

  2. = INTEGER: prefix(2)

  3. .1.3.6.1.4.1.8072.1.9.1.1.2.8.103.114.112.99.111.109.109.49.0.0.1.5.119.114.105.116.101

  4. = INTEGER: prefix(2)

  5. .1.3.6.1.4.1.8072.1.9.1.1.2.8.103.114.112.99.111.109.109.49.0.0.1.6.110.111.116.105.102.121

  6. = INTEGER: prefix(2)

  7. .1.3.6.1.4.1.8072.1.9.1.1.2.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.4.114.101.97.100

  8. = INTEGER: prefix(2)

  9. .1.3.6.1.4.1.8072.1.9.1.1.2.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.5.119.114.105.116.101

  10. = INTEGER: prefix(2)

  11. .1.3.6.1.4.1.8072.1.9.1.1.2.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.6.110.111.116.105.102.121

  12. = INTEGER: prefix(2)

  13. .1.3.6.1.4.1.8072.1.9.1.1.3.8.103.114.112.99.111.109.109.49.0.0.1.4.114.101.97.100

  14. = STRING: all

  15. .1.3.6.1.4.1.8072.1.9.1.1.3.8.103.114.112.99.111.109.109.49.0.0.1.5.119.114.105.116.101

  16. = STRING: none

  17. .1.3.6.1.4.1.8072.1.9.1.1.3.8.103.114.112.99.111.109.109.49.0.0.1.6.110.111.116.105.102.121

  18. = STRING: none

  19. .1.3.6.1.4.1.8072.1.9.1.1.3.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.4.114.101.97.100

  20. = STRING: all

  21. .1.3.6.1.4.1.8072.1.9.1.1.3.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.5.119.114.105.116.101

  22. = STRING: all

  23. .1.3.6.1.4.1.8072.1.9.1.1.3.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.6.110.111.116.105.102.121

  24. = STRING: all

  25. .1.3.6.1.4.1.8072.1.9.1.1.4.8.103.114.112.99.111.109.109.49.0.0.1.4.114.101.97.100

  26. = INTEGER: permanent(4)

  27. .1.3.6.1.4.1.8072.1.9.1.1.4.8.103.114.112.99.111.109.109.49.0.0.1.5.119.114.105.116.101

  28. = INTEGER: permanent(4)

  29. .1.3.6.1.4.1.8072.1.9.1.1.4.8.103.114.112.99.111.109.109.49.0.0.1.6.110.111.116.105.102.121

  30. = INTEGER: permanent(4)

  31. .1.3.6.1.4.1.8072.1.9.1.1.4.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.4.114.101.97.100

  32. = INTEGER: permanent(4)

  33. .1.3.6.1.4.1.8072.1.9.1.1.4.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.5.119.114.105.116.101

  34. = INTEGER: permanent(4)

  35. .1.3.6.1.4.1.8072.1.9.1.1.4.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.6.110.111.116.105.102.121

  36. = INTEGER: permanent(4)

  37. .1.3.6.1.4.1.8072.1.9.1.1.5.8.103.114.112.99.111.109.109.49.0.0.1.4.114.101.97.100

  38. = INTEGER: active(1)

  39. .1.3.6.1.4.1.8072.1.9.1.1.5.8.103.114.112.99.111.109.109.49.0.0.1.5.119.114.105.116.101

  40. = INTEGER: active(1)

  41. .1.3.6.1.4.1.8072.1.9.1.1.5.8.103.114.112.99.111.109.109.49.0.0.1.6.110.111.116.105.102.121

  42. = INTEGER: active(1)

  43. .1.3.6.1.4.1.8072.1.9.1.1.5.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.4.114.101.97.100

  44. = INTEGER: active(1)

  45. .1.3.6.1.4.1.8072.1.9.1.1.5.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.5.119.114.105.116.101

  46. = INTEGER: active(1)

  47. .1.3.6.1.4.1.8072.1.9.1.1.5.11.103.114.112.115.110.109.112.85.115.101.114.0.3.2.6.110.111.116.105.102.121

  48. = INTEGER: active(1)

Now, let us pretend that we are concerned with the "nsVacmStatus" OID for each of these entries.

Indexing

S3 has two options to properly index entries.

  1. S3 can choose a variable-length index (with no length prefix). However, this provides S3 no insight as to the components of the index. There are no OIDs available to determine a proper name for any of the entries to enter into the system as objects.

  2. S3 can explicitly define each index component, which allows S3 to reference each component individually to properly name objects.

The index composed of the following types of fields.

Example:

"grpcomm1"."".0.noAuthNoPriv."read"

  • String, (e.g., grpcomm1) - According to the MIB is the name of the group for this entry.

  • String, (e.g., "") - According to the MIB is the prefix that a name must match to gain access rights.

  • Integer, (e.g., 0) - According to the MIB is the security model in use. This roughly corresponds with the SNMP version (where 0 = any).

  • Integer, (e.g., noAuthNoPriv, which is, 1) - According to the MIB is the minimum level of security required to gain access rights.

  • String, (e.g., read) - According to the MIB is the type of processing to which to apply the specified view.

Given that, S3 has the following information:

[INDEX] is 8.103.114.112.99.111.109.109.49.0.0.1.4.114.101.97.100.
[INDEX]{0} is 8.103.114.112.99.111.109.109.49.
[INDEX]{1} is 0.
[INDEX]{2} is 0.
[INDEX]{3} is 1.
[INDEX]{4} is 4.114.101.97.100.

Naming

S3 looks to use the following information to name an object for a VACM entry.

Group group name [ matching prefix ] using {any version|security model }with security level , providing processing

S3, revision 1

The security level is an enumeration. S3 creates a variable with the appropriate textual representation for its value.

Necessary S3:

  1. [securityLevel] = ( `[INDEX]{3}` == 1 ? 'noAuthNoPriv' : ( `[INDEX]{3}` == 2

  2. ? 'authNoPriv' : ( `[INDEX]{3}` == 3 ? 'authPriv' : '(unknown)' ) ) );

Name:

  1. 'Group '( $s `[INDEX]{0}` )( ($s `[INDEX]{1}`) ?? (' matching '($s `[INDEX]{1}`)) : '')

  2. 'using'( `[INDEX]{2}` ? `v[INDEX]{2}` : 'any version' )` with [securityLevel], providing`

  3. ( $s `[INDEX]{4}` )

Evaluates to:

Group grpcomm1 using any version with noAuthNoPriv, providing read

S3, revision 2

The first "Name" S3 is too long and is not very readable. In the second revision S3 assigns various parts of the name to variables and links them all in at the end.

Necessary S3:

  1. [groupName] = ( $s `[INDEX]{0}` );

  2. [matchText] = ( ($s `[INDEX]{1}`) ?? (' matching '($s `[INDEX]{1}`)) : '' );

  3. [versionText] = ( `[INDEX]{2}` ? `v[INDEX]{2}` : 'any version' );

  4. [securityLevel] = ( `[INDEX]{3}` == 1 ? 'noAuthNoPriv' : ( `[INDEX]{3}` == 2 ? 'authNoPriv' :

  5. ( `[INDEX]{3}` == 3 ? 'authPriv' : '(unknown)' ) ) );

  6. [processingText] = ( $s `[INDEX]{4}` );

Name:

`Group [groupName][matchText] using [versionText] with [securityLevel], providing [processingText]`

Evaluates to:

Group grpcomm1 using any version with noAuthNoPriv, providing read

The end result is the same as before, but the name is easier to read and understand. The difference is that each component S3 is broken up into separate variables which allows the name to be a single interpolated string.

Context

S3 evaluates OIDs. Evaluation must take place in the context of a certain SNMP agent.

S3 is used at the SNMP discover time for a particular device. All S3 statements are executed in the context of that device, meaning that every time an OID is encountered, the device is queried for its value, and that value is returned to the S3 statement.

Object context

The main purpose of S3 is to define ways to describe specific objects from a generic set of rules. As the SNMP discover script goes through the possible object types, for each one, it generates a list of individual object indexes for that object type. The rules for that object type are applied to each index that it encounters, generating a unique object per index.

The following SNMP Object Editor fields are evaluated, in order, for each object:

  1. Variables

    • A mini S3 script generates variables for later use.

    • Variables generated:

      • (Any present)

  2. Subtype expression

    • Determines the subtype of the object.

    • Variables generated:

      • [TYPE]: The numerical value of the subtype (if any).

      • [TYPE NAME]: The name of the subtype (if any).

      • [TYPE DESCRIPTION]: The description of the subtype (if any).

  3. Assert expression

    • Skipped if an object does not pass the assert expression.

    • Should not define any variables.

  4. Name expression

    • Uniquely identifies an object across the SNMP plugin for the device in question.

    • Should not define any variables.

  5. Description expression

    • Should provide an informative description of the object. If not set then use the object type.

    • Should not define any variables.

Before any evaluation happens, the "[INDEX]" variable is set to the SNMP index of the current object. This is a vector variable; each index in the vector corresponds with each specific index key defined for this object type. Each of those could also be a vector. Because of the sequence in which the system variables are generated; S3 generates an error if a variable is used before it is generated.

Indicator context

The Expression field in the SNMP Indicator Editor for a particular indicator is also an S3 expression. Indicators should not set variables. The Maximum Value Expression field is also an S3 expression.

An indicator expression and maximum value expression can use any of the variables defined above for the object, including any user-defined variables in the Variables field.

This enables an indicator definition to get around any strange indexing (including out-of-order indexing) by using S3 to assemble the OID to poll as necessary.

Synthetic indicators

Indicator expressions are unique because they are handled in a two pass system. The SNMP poller does not implement S3; it implements a simple mathematical library. Any OIDs present in the data that is passed to the poller must be fully expanded with their index information. To accomplish this, two passes are used on the indicator expression.

The text-conversion functions of S3 does not work in either pass.

First pass

The first pass is an expansion pass. It expands any OID encountered by adding the full index value to the end of it. This is equivalent to having every OID end in ".[INDEX]". The result of this pass is saved (no real values should be generated).

Second pass

The second pass then evaluates (normally) the results of the first pass. If this pass results in a numeric value, then the indicator is presumed to exist. The results of the first pass are stored for use by the poller.

It is important to use standard mathematical expressions (and not the extra S3 operations) to perform indicator expressions. These expressions must conform to normal mathematical rules (for example, you cannot have two expressions next to each other with no joining operator). These expressions may include the following operators:

/ + -

And the following grouping symbols:

( )

Note: It is possible to get around the OID expansion in the first pass. The entire results of the evaluated first pass are passed to the second pass. Any text in the first pass does not have its quotes in the second pass. Thus, an OID may be quoted and used exactly as quoted in the second pass. The whole first pass could be quoted to prevent S3 from taking any intelligent action.

Example

To have every interface report, as an indicator, the total number of interfaces on the device (multiplied by 10), the following indicator expression does not work:

ifNumber.0 * 10

"ifNumber.0" is expanded with the default index, which in this case could be ".2", for example (yielding "ifNumber.0.2", which is not the desired outcome):

ifNumber.0.2 * 10

However, the following tricks the system into accepting the OID:

`ifNumber.0` * 10

This yields:

ifNumber.0 * 10

This is the desired outcome.

Summary of the two-pass system

  1. Pass 1

    1. OIDs are expanded.

    2. Text is unquoted.

  2. Pass 2

    1. Pass 1 is evaluated.

Notes:

  • Do not use text-conversion functions.

ASCII Table

The following lists the first 128 ASCII values and their corresponding character value.

images/download/attachments/14293813/worddavf0e40738eac69caf964fb62ad01b4e21.png