I'm currently trying to set up some sensors for printers that I work on in PRTG that will display a message based on the value that the OID returns.
For example, I have the printers front cover OID that can return the following values based on the state that it's in:
other(1), coverOpen(3), coverClosed(4), interlockOpen(5), interlockClosed(6)
What I'd like to do is have the sensor display the message "GOOD" when the OID returns the value of '4', or "COVER OPENED" when it returns the value of '3' as well as going into the warning state.
I've tried using the "limit" function in the sensors, however it muddles up the message with the specifics. I'd rather it just display the simple messages so that our techs can look at it at a glance and know immediately what state it's in.
Article Comments
Hello,
This can be done by creating a Custom Lookups. After you have created such a lookup, you can associate it to a channel in the channel settings of the corresponding sensor channel.
For a detailed explanation, please refer to this question:
The lookup in your example would probably end up looking somewhat like this:
<?xml version="1.0" encoding="UTF-8"?>
<ValueLookup id="prtg.customlookups.printercover" desiredValue="4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PaeValueLookup.xsd" undefinedState="Warning">
<Lookups>
<SingleInt state="Warning" value="3">COVER OPENED</SingleInt>
<SingleInt state="Ok" value="4">GOOD</SingleInt>
</Lookups>
</ValueLookup>
In your case, the values 1, 5 and 6 are also possible. If this value is returned the sensor will go into warning because it will considered an undefined state by the lookup (undefinedState="Warning").
Cheers!
Sep, 2021 - Permalink
Hello,
This can be done by creating a Custom Lookups. After you have created such a lookup, you can associate it to a channel in the channel settings of the corresponding sensor channel.
For a detailed explanation, please refer to this question:
The lookup in your example would probably end up looking somewhat like this:
In your case, the values 1, 5 and 6 are also possible. If this value is returned the sensor will go into warning because it will considered an undefined state by the lookup (undefinedState="Warning").
Cheers!
Sep, 2021 - Permalink