|
InterMapper can retrieve MIB variables from a device and then test them against thresholds. The section defines the OIDs of MIB variables that are to be retrieved. These values are called probe variables and can then be compared to thresholds to create alarms, warnings, etc.
Each line of the section defines a particular variable to be retrieved. The definition is composed of four comma-separated attributes: the variable's name, its OID, its Type, and an optional Chart legend. Their definitions are:
VariableName is the name used to represent the particular MIB value in this probe. A VariableName consists of letters, digits and an underscore, and must begin with a letter. VariableNames are not case-sensitive. These variable names will be represented in the probe as $VariableName. It is not necessary that a particular VariableName match the corresponding name in the MIB, although that is definitely convenient.
OID is the Object ID for the particular probe variable. Note that a scalar's OID must end in ".0" according to the SNMP specifications. Although it is common to off leave the suffix for scalar values, it is technically correct to include it and InterMapper requires the suffix to construct the proper queries. InterMapper will request the OID and wait for the response. [Technically, InterMapper issues an SNMP Get-Next-Request for the previous OID.] Currently, there is no facility for iterating across all rows of a particular table.
Note: Calculation variables have a slightly different form, as described below.
Type may be one of: Default, Per-second, Per-minute, Total-value, or Hexadecimal.
Default should be used for variables of type Integer and DisplayString. InterMapper will automatically determine the type an display the value properly.
Per-second and Per-minute will force InterMapper to compute a rate for the particular variable by computing the difference between two successive samples and dividing by the elapsed time.
Total-value displays the actual value of a counter or gauge, not a computed rate value.
Hexadecimal displays the data as hex digits.
Calculation sets the variable to the result of the calculation shown in the OID field.
Chart-legend is an optional field that provides a text label to be placed on any strip charts that incorporate this variable. Chart legends may contain embedded variable names in the form $VariableName.
Here is a sample section.
<snmp-device-variables>
--Variable-name OID --- TYPE ---- CHART LEGEND ------
ipForwDatagrams, 1.3.6.1.2.1.4.6.0, PER-SECOND, "Forwarded datagrams"
ipInHdrErrors, 1.3.6.1.2.1.4.4.0, PER-MINUTE, "IP received header err"
tcpCurrEstab, 1.3.6.1.2.1.6.9.0, DEFAULT, "Number of TCP conn's"
sysDescr, 1.3.6.1.2.1.1.1.0, DEFAULT
-- Non-polled values:
-- Calculation variables are computed each poll time
-- TrapVariables are updated when a trap arrives
SineValue, (10*sin(0.01*time())), CALCULATION, "10 * sin(0.01 * time())"
InterMapperTimeStamp, 1.3.6.1.4.1.6306.2.1.1.0,TRAPVARIABLE, "Timestamp"
</snmp-device-variables>
Note: The OIDs above have a trailing ".0" to specify their full OID.
Calculation Variables
A Calculation type variable receives the result of an arithmetic expression. After all variables have been polled, InterMapper calculates the expression, and sets the value of its variable to the result. In the example above:
SineValue, (10*sin(0.01*time())), CALCULATION, "10 * sin(0.01 * time())"`
The variable "SineValue" will be set to the value of the expression (10 * sin(0.01 * time()). This gives a sine wave that makes an attractive chartable value. Use "$SineValue" to refer to the variable elsewhere in the probe.
Macros
InterMapper supports several macros that show information about a variable:
${variablename} or $variablename In a section of a probe file, an occurrence of a variable name (with or without the curly braces ({...}) will be replaced with its value, rounded to the nearest integer. For example, if a calculation variable has the value of 3.14159265, using it in the section will result in the value of "3"; if the variable had the value 4.75 it would be displayed as "5". This value will be chartable, that is, clicking it will make a new strip chart, or dragging it will add it to an existing chart. The ipForwDatagrams variable defined above could be referred to in either of these forms:
${ipForwDatagrams} or $ipForwDatagrams
${chartable: xxx : yyy} In a section of a probe file, the ${chartable: ...} macro controls the number of decimal places. There are two parameters: a formatting string that indicates the number and placement of the digits near the decimal point, and the variable to be formatted. For example, if $var is 3.14159265:
${chartable: #.## : $var } --> 3.14
${chartable: #.####### : $var } --> 3.1415927
${variablename:legend} In a section of a probe file, the ${variablename:legend} is replaced with the legend field defined for that variable in the section. For example: ${ipForwDatagrams:legend} would result in the string "Forwarded datagrams".
|