icon how to white

How to work with lookups in PRTG

 

1. What are lookups?

 

PRTG uses lookups for the channels of some sensors to define the status that a sensor shows, just like sensor limits do.

Lookups display object data more human friendly because they map status values that a monitored object returns, usually integers, to more informative expressions in words.

If you monitor a printer, for example, that returns the status value ‘0’, the respective sensor can show the Up status with the message Paper Okay instead of only displaying the status value ‘0’. 

 

Lookups are defined in lookup files that use the XML format and that end with .ovl. You can find
all predefined lookup files in the \lookups subfolder of the PRTG program directory.

There are different types of lookups. You can only use one lookup type per lookup file.

Lookups of the types SingleInt or Range
are visualized as gauges.

Lookups of the type Boolean
are visualized as switches.

                     Lookups of the type Bitfield
                       are visualized as toggles.

Lookups of the types SingleInt or Range are visualized as gauges.
Lookups of the type Boolean are visualized as switches.
Lookups of the type Bitfield are visualized as toggles.
 

2. Set lookups in the channel settings

 

You can set lookups only for sensors with custom channels. Take the following steps:

  1. To change the channel settings, go to a sensor’s Overview tab and click 02 backup channel settings2 below the gauge of the channel that you want to edit.
  2. Under Lookups and Limits, select Enable alerting based on lookups.
  3. Select a suitable lookup file from the dropdown list under Lookup. For a list of all predefined lookup files and the sensors that they apply to, see the PRTG Manual: List of Standard Lookup Files.
 

3. Customize standard lookup files

 

You can also modify standard lookup files to change existing definitions or to include new definitions. The following example shows the lookup file for the paper status of the SNMP HP LaserJet Hardware sensor.

 

<?xml version="1.0" encoding="UTF-8"?>
  <ValueLookup id="oid.paessler.hplaserjet.paperstatus" desiredValue="0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=
  "PaeValueLookup.xsd">
    <Lookups>
       <SingleInt state="Ok" value="0">
        Paper Okay
      </SingleInt>
      <SingleInt state="Error" value="1">
        Out of Paper or No Cassette Loaded
      </SingleInt>
      <SingleInt state="Error" value="2">
        Manual Paper Feed Required
      </SingleInt>
    </Lookups>
  </ValueLookup>

If you do not want the sensor to show the Down status and send an alert if the printer is out of paper, for example, take the following steps:

  1. Find out the name of the standard lookup file in the settings of the channel that you want to edit.
  2. Copy the file paessler.hplaserjet.paperstatus.ovl from the \lookups subfolder of the PRTG program directory to the \lookups\custom subfolder. Make sure that you do not change the file name.
  3. Open the file with an editor.
  4. Replace

    <SingleInt state="Error" value="1">Out of Paper or No Cassette Loaded</SingleInt>


    with

    <SingleInt state="OK" value="1">Out of Paper or No Cassette Loaded</SingleInt>.

  5. Optionally replace the message Out of Paper or No Cassette Loaded with a custom text.
  6. Make sure that you save the file as an .ovl
 
  1. Log in to the PRTG web interface and select Setup | System Administration | Administrative Tools from the main menu.
  2. Click Go! under Load Lookups and File Lists.

PRTG now reloads the lookup files and the gauge of the sensor’s Paper channel displays the new state and the new message.

 

 

4. Create a new lookup

 

It is also possible to create new lookups for any sensor that supports lookups. Use the XML schema provided in the PRTG Manual to create a lookup file from scratch, or copy and edit an existing lookup file and save it under a new name.

Save your custom files in the \lookups\custom subfolder of the PRTG program directory and do not forget to reload the files under Setup | System Administration | Administrative Tools.

 

This how-to guide only scratches the surface?
Get more deep-dive information here!