Administer > Extend NNMi Capabilities > Managing MIBs > Configure MIB Expressions > Use the MIB Expression Editor (Line Graphs)

Use the MIB Expression Editor (Line Graph)

Use the MIB Expression Editor to specify the MIB Variables and any Constant values or arithmetic operators you want to include in your MIB Expression.

For example, disk utilization could be calculated and polled using a MIB Expression similar to the following:

(hrStorageUsed / hrStorageSize)

See the MIB Expression Editor Options table for a description of each of the MIB Expression Editor options.

When using the MIB Expression Editor, note the following:

  • As a general guideline, begin by writing out the MIB Expression. Then in the MIB Expression Editor, begin creating your MIB Expression by selecting your arithmetic operators (+, -, *, or /) from the outermost parenthesis to the innermost parenthesis. Each time you specify an arithmetic operator (+, -, *, or /), NNMi creates a set of parenthesis to specify the ordering of the mathematical calculation.
  • When adding arithmetic operators (+, -, *, or /) to a MIB Expression, first click to select the location in the MIB Expression at which you want to add the arithmetic operator.
  • Click to select the arithmetic operator (for example +) in the MIB Expression, before selecting the MIB variable or Constant value that you want to add, subtract, multiply or divide.

    You can also use the following key bindings to add arithmetic operators:

    • ALT+ (plus button)
    • ALT- (minus button)
    • ALT/ (divide button)
    • ALT* (multiply button)
  • NNMi inserts arithmetic operators, MIB Expressions, and Constant values from the left to right.
  • To replace an arithmetic operator use the (Change Operator) button (see table).
  • To replace a MIB Variable or Constant value, click to select the existing value in the MIB Expression and then select the new MIB variable or enter the new Constant value.

    Note You can replace a MIB Variable with another MIB Variable or with a Constant value. You can replace a Constant value with a MIB Variable or Constant value.

  • You can drag any of the following items to a new location in the MIB Expression:

    • MIB variable
    • Constant value
    • An operation, such as (ifInOctets + ifOutOctets)

MIB Expression Example

To create a MIB Expression that calculates the percentage of available bandwidth on a half-duplex interface, you might create the following MIB Expression:

((((ifInOctets + ifOutOctets) * 8) / ifSpeed) * 100)

The following table describes each of the MIB Expression Editor options.

MIB Expression Editor Options
Attribute Description
MIB Expression

Displays the MIB Expression as it is created.

You can place the cursor in the MIB Expression field to specify where you want to add or replace an entry.

MIB Variable

You must select a MIB Variable using the MIB Tree. Click the icon to access the MIB tree and navigate to the MIB variable of interest.

Note If you do not see a MIB that you recently loaded, wait 1 minute for NNMi to cache the new MIB information, and then open the MIB Tree again.

After you select a MIB Variable, NNMi displays the MIB Variable's name.

If you choose a MIB Variable that has multiple instances, you MUST specify a MIB Filter Variable and MIB Filter. For example, because a node can have multiple interfaces, MIB Variables containing interface information have multiple instances, one for each interface. You are required to provide a MIB Filter value to select the interfaces you want NNMi to poll. If you do not specify a MIB Filter Variable and MIB Filter, NNMi assumes the MIB variable is non-repeating. Click here for more information.

For example, if you want to always gather additional HOST-RESOURCES-MIB status information about COM (communication) port devices, you would define the following:

  • MIB Expression: hrDeviceStatus
  • MIB Filter Variable: hrDeviceDescr
  • MIB Filter: COM*

See Create a Policy for more information about the MIB Filter.

Constant Value A numeric value to be used in the calculation for the MIB Expression. For example, you might want to include 100 as a constant when calculating percentages.
Enter Includes the Constant Value in the MIB Expression.
Adds the results.
Subtracts the results.
Multiplies the results.
Divides the results.

Changes the selected operator (+, -, *, and /) to the operator that appears next in sequence (from left to right) in the MIB Expression Editor. (The example below shows the operator sequence in the MIB Expression Editor.)

For example, if you place your cursor at an add (+) operator in the MIB Expression, the MIB Expression Editor changes the add (+) operator to the minus (-) operator. If you place your cursor at the divide (/) operator in the MIB Expression as shown in the example below, the MIB Expression Editor changes the operator to the add (+) operator.

When using the (Change Operator) button, note the following:

  • You must select an operator in the MIB Expression before using the Change Operator (<>) button.
  • You can replace a MIB Variable with another MIB Variable or with a Constant. You can replace a Constant value with a MIB Variable or Constant.
Delete Deletes the entry that is selected. If no entry is selected, NNMi deletes the last entry in the MIB Expression.
OK Closes the MIB Expression Editor and saves your changes.
Clear Removes any entries in the MIB Expression.
Cancel Closes the MIB Expression Editor without saving your changes.