New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Value lookups in oidlib

Votes:

0

Your Vote:

Up

Down

Is it possible to set the value lookup in the custom oidlib rather than after creating the sensor and set the lookups in its channel settings?

I played with some <lookups> tags in the oidlib, but without success.

regards Stefan

channel lookups oidlib

Created on Apr 10, 2013 8:26:57 AM by  stefanr (0) 1



Best Answer

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Here is an example that might help clarify.

I created a lookup file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<ValueLookup id="oid.paessler.dellpowerconnectfanstatus" desiredValue="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PaeValueLookup.xsd">
	<Lookups>
		<SingleInt state="Warning" value="0">Fan Not Working 1</SingleInt>
		<SingleInt state="Ok" value="1">Fan Working 1</SingleInt>
	</Lookups>
</ValueLookup>

This lookup file (*.ovl) is primarily for PRTG itself and defining the primary channel and what values are acceptable as well as what should trigger Error States

Some more information about customizing these lookups can be found here: Define Lookups.

Once this lookup is created, you can define the sensor to use this with a particular OID by using the code

<lookupname>oid.paessler.dellpowerconnectfanstatus</lookupname>

But you must also define these parameters in the oidlib itself. I put the following code in the oidlib for this example:

<lookups>
	<oid.paessler.dellpowerconnectfanstatus>
		<cell row="0" col="0">0</cell>
		<cell row="0" col="1">fan not running</cell>
		<cell row="1" col="0">1</cell>
		<cell row="1" col="1">fan running</cell>
	</oid.paessler.dellpowerconnectfanstatus>
</lookups>

This is what will guide the sensor to use the correct language in the sensor as well as which lookup should be used.

Here is the complete oidlib

<?xml version="1.0" encoding="UTF-8"?>
<oidlist>
	<system>
		<version>2</version>
	</system>
	<list>
		<entry>
			<name>Dell-Vendor-MIB|env mon fan status: #[1.3.6.1.4.1.674.10895.3000.1.2.110.7.1.1.1]|env mon fan state</name>
			<lookupname>oid.paessler.dellpowerconnectfanstatus</lookupname>
			<oid>1.3.6.1.4.1.674.10895.3000.1.2.110.7.1.1.3</oid>
			<type>vmAbsolute</type>
			<kind>mkTable</kind>
			<unittype>sutCustom</unittype>
			<units>#</units>
			<indicator>env mon fan state</indicator>
			<scale>1</scale>
			<multiply>no</multiply>
			<max>0</max>
			<usegetnext>no</usegetnext>
			<is64bit>no</is64bit>
			<isunsigned>no</isunsigned>
			<isfloat>no</isfloat>
			<description>The mandatory  state of the fan being instrumented.</description>
		</entry>
	</list>
	<lookups>
		<oid.paessler.dellpowerconnectfanstatus>
			<cell row="0" col="0">0</cell>
			<cell row="0" col="1">fan not running</cell>
			<cell row="1" col="0">1</cell>
			<cell row="1" col="1">fan running</cell>
		</oid.paessler.dellpowerconnectfanstatus>
	</lookups>
</oidlist> 

Now, when you add this new sensor from the SNMP sensor library, you should see the values you want, the states can be used to trigger events and the lookup will automatically associate with the sensor.

Created on Apr 12, 2013 8:14:50 AM by  Greg Campion [Paessler Support]

Last change on Jul 5, 2018 5:32:15 AM by  Luciano Lingnau [Paessler Support]



4 Replies

Votes:

0

Your Vote:

Up

Down

There are a few ways that you could have the oidlib automatically associate values. The first would be to create your oidlib with the MIB Importer, then create the lookup. Once both of these are created, you can then open the oidlib with a text editior and look for the <lookupname/> tag. Once you have found that, you could change this to something like

<lookupname>oid.paessler.hplaserjet.tonerstatus - this would be the name of your custom lookup</lookupname>

Once you replace that text, the lookup would automatically be set for that SNMP Library Sensor.

If you had created any of these sensors before, you would need to use Multi-Edit to update those since they will not be updated retroactively.

Also, you could change the MIB itself to include values, but that would be a bit more complicated.

Created on Apr 10, 2013 2:59:07 PM by  Greg Campion [Paessler Support]

Last change on Jul 5, 2018 5:32:32 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

That's exactly what I tried.

I created an oidlib, placed it into snmplibs. created a lookup placed into lookups\custom and then changed the <lookupname> tag in the oidlib. After this I performed a "Load Lookups" in the system settings. However, if I create a new sensor there's "None" for the value lookup in the channel settings.

Created on Apr 12, 2013 6:54:56 AM by  stefanr (0) 1



Accepted Answer

Votes:

0

Your Vote:

Up

Down

Here is an example that might help clarify.

I created a lookup file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<ValueLookup id="oid.paessler.dellpowerconnectfanstatus" desiredValue="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PaeValueLookup.xsd">
	<Lookups>
		<SingleInt state="Warning" value="0">Fan Not Working 1</SingleInt>
		<SingleInt state="Ok" value="1">Fan Working 1</SingleInt>
	</Lookups>
</ValueLookup>

This lookup file (*.ovl) is primarily for PRTG itself and defining the primary channel and what values are acceptable as well as what should trigger Error States

Some more information about customizing these lookups can be found here: Define Lookups.

Once this lookup is created, you can define the sensor to use this with a particular OID by using the code

<lookupname>oid.paessler.dellpowerconnectfanstatus</lookupname>

But you must also define these parameters in the oidlib itself. I put the following code in the oidlib for this example:

<lookups>
	<oid.paessler.dellpowerconnectfanstatus>
		<cell row="0" col="0">0</cell>
		<cell row="0" col="1">fan not running</cell>
		<cell row="1" col="0">1</cell>
		<cell row="1" col="1">fan running</cell>
	</oid.paessler.dellpowerconnectfanstatus>
</lookups>

This is what will guide the sensor to use the correct language in the sensor as well as which lookup should be used.

Here is the complete oidlib

<?xml version="1.0" encoding="UTF-8"?>
<oidlist>
	<system>
		<version>2</version>
	</system>
	<list>
		<entry>
			<name>Dell-Vendor-MIB|env mon fan status: #[1.3.6.1.4.1.674.10895.3000.1.2.110.7.1.1.1]|env mon fan state</name>
			<lookupname>oid.paessler.dellpowerconnectfanstatus</lookupname>
			<oid>1.3.6.1.4.1.674.10895.3000.1.2.110.7.1.1.3</oid>
			<type>vmAbsolute</type>
			<kind>mkTable</kind>
			<unittype>sutCustom</unittype>
			<units>#</units>
			<indicator>env mon fan state</indicator>
			<scale>1</scale>
			<multiply>no</multiply>
			<max>0</max>
			<usegetnext>no</usegetnext>
			<is64bit>no</is64bit>
			<isunsigned>no</isunsigned>
			<isfloat>no</isfloat>
			<description>The mandatory  state of the fan being instrumented.</description>
		</entry>
	</list>
	<lookups>
		<oid.paessler.dellpowerconnectfanstatus>
			<cell row="0" col="0">0</cell>
			<cell row="0" col="1">fan not running</cell>
			<cell row="1" col="0">1</cell>
			<cell row="1" col="1">fan running</cell>
		</oid.paessler.dellpowerconnectfanstatus>
	</lookups>
</oidlist> 

Now, when you add this new sensor from the SNMP sensor library, you should see the values you want, the states can be used to trigger events and the lookup will automatically associate with the sensor.

Created on Apr 12, 2013 8:14:50 AM by  Greg Campion [Paessler Support]

Last change on Jul 5, 2018 5:32:15 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

The lookup part in the end of the oidlib was missing.

Thank you.

Created on Apr 12, 2013 9:23:58 AM by  stefanr (0) 1



Please log in or register to enter your reply.


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.