How to create PRTG lookups (.ovl) from an SNMP MIB
Status objects in a MIB return numbers such as 1, 2 or 3. A PRTG value lookup turns them into readable text and sensor states (OK, Warning, Error), so a failed fan or an open door actually raises an alarm.
Where the values come from
In the MIB, status objects are INTEGERs with named values. They are declared either inline on the object or in a reusable textual convention:
SensorStatus ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION "Sensor state."
SYNTAX INTEGER { normal(1), warning(2), critical(3), disconnected(4) }
A textual convention used by many objects needs only one lookup. An inline enumeration needs a lookup of its own.
The .ovl file format
A lookup is a small XML file. Each value gets a text and a state:
<?xml version="1.0" encoding="UTF-8"?>
<ValueLookup id="vendor.sensorstatus" desiredValue="1" undefinedState="Warning"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="PaeValueLookup.xsd">
<Lookups>
<SingleInt state="OK" value="1">Normal</SingleInt>
<SingleInt state="Warning" value="2">Warning</SingleInt>
<SingleInt state="Error" value="3">Critical</SingleInt>
<SingleInt state="Error" value="4">Disconnected</SingleInt>
</Lookups>
</ValueLookup>
| Attribute | Meaning |
|---|---|
id | Unique name shown in PRTG. A vendor.typename pattern avoids collisions with built-in lookups. |
desiredValue | The "good" value, used by some sensor views and gauges. |
undefinedState | State for values that are not listed, for example after a firmware update adds a new status. |
state | OK, Warning, Error or None. |
Choosing states
- Error: critical, failure, fault, alarm, down, smoke or leak detected.
- Warning: warning, degraded, minor, unknown, door open.
- OK: normal, ok, up, closed, "no…" values such as noAlarm.
- None: values that are neither good nor bad, such as a mode or a type.
Review the defaults against how you operate the device. An "open" door may be normal in a lab and critical in a data center.
Installing the lookup
- Copy the
.ovlfile toC:\Program Files (x86)\PRTG Network Monitor\lookups\customon the PRTG core server. Files incustomsurvive updates. - In PRTG open Setup › System Administration › Administrative Tools and run Load Lookups and File Lists.
- Add an SNMP Custom Advanced or SNMP Custom Table sensor with the column OID plus the row index (for a scalar, the OID plus
.0). - In the channel settings choose Value lookup as the unit, select your lookup, and enable alerting based on lookups where the sensor offers it.
- Use Scan Now to apply the change immediately.
Finding the index: run an snmpwalk on the column. The number after the column OID is the row index, for example ...4.1.1.1.2.61 means index 61. See how to decode snmpwalk output.
Generating all lookups at once
Large MIBs, such as APC PowerNet, contain hundreds of enumerations. MIB Decoder lists every enumerated type in the loaded MIBs and proposes states from the value names. You can edit texts and states, then download one .ovl or a ZIP with all of them. Each lookup also lists the objects and column OIDs that use it.