What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Monitor and "lookup" an SNMP string value

Votes:

0

Hi,

I am using an OID that returns the string values "complete", "in-progress", and "pending".

I have tried to play with the SNMP Custom String sensor but I cannot make it run.

Can someone please help me with this ? In the end, I would like this sensor to show a gauge with 3 states.

Thx in advance Cyril

custom-lookup custom-string-sensor lookup prtg snmp

Created on Sep 5, 2016 1:57:57 PM

Last change on Dec 3, 2020 12:50:58 PM by  Brandy Greger [Paessler Support]



3 Replies

Accepted Answer

Votes:

0

Hello Cyril and thank you for your KB post.

The "correct" sensor for this case is the SNMP Custom String Lookup sensor. As you mentioned, these are the "possible" outputs of the OID that you are monitoring:

complete
in-progress
pending

First of all, we need to tell PRTG what the possible outputs are. For this, we need to create a slightly different lookup that will look like this:

<?xml version="1.0" encoding="UTF-8"?>
<ValueLookup id="prtg.custom.string.progress" desiredValue="0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PaeValueLookup.xsd">
	<Lookups>
		<SingleInt state="Ok" value="0">complete</SingleInt>
		<SingleInt state="Warning" value="1">in-progress</SingleInt>
		<SingleInt state="Error" value="2">pending</SingleInt>
	</Lookups>
</ValueLookup>

Once you have created and stored the lookup, go to Setup | System Administration | Administrative Tools in the PRTG web interface and click Load Lookups and File Lists. Then go back to the device in PRTG and deploy the SNMP Custom String Lookup sensor. When adding the sensor, select the previously created lookup from the list.

The sensor will show a gauge to which it will map the 3 possible states via the lookup. If there are more possible states, they have to be added within the <Lookups> tag in the .ovl lookup file.

More

Further information regarding lookups:
Other SNMP-related topics:

Best regards,
Luciano Lingnau [Paessler Support]

Created on Sep 6, 2016 6:12:31 AM by  Luciano Lingnau [Paessler]

Last change on Sep 12, 2019 4:59:16 AM by  Maike Guba [Paessler Support]



Votes:

0

Hi,

Would this script work if the vallue is actually a string, not just one numeric vallue? What I'm trying to achieve is to read the firmware version of a given device that returns a string: 10.28. build 7676. Can I build a lookup where I know all my possible firmware versions and have PRTG show them in the channel?

Thanks, Attila

Created on Mar 23, 2022 8:51:42 AM



Votes:

0

Hello There
Unfurtunately this will not be possible, PRTG requires a numerical value for this to work. There is another KB article that explains this feature in detail, please have a look.

https://kb.paessler.com/en/topic/73062-can-i-graph-text-values

Created on Mar 30, 2022 8:42:18 PM by  Luis Quesada (Paessler Technical Support)




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.