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 interpretation (aka Lookups)

Votes:

0

Your Vote:

Up

Down

Hi everybody,

I set up an SNMP custom sensor to monitor an UPS oid. This oid will return different values for different status. For

1  No events
2  High line voltage
3  Brownout
4  Loss of mains power
5  Small temporary power drop
6  Large temporary power drop
7  Small spike
8  Large spike
9  UPS self test
10  Excessive input voltage fluctuation

Would it be possible to interpret this integer values with a description string like above so everybody can know exactly what status 9 means.

Thanks a lot for helping me our.

custom-snmp important lookups oid prtg ups value-interpretation

Created on Aug 1, 2016 3:10:36 AM by  marcoliewerenz (0) 1

Last change on Apr 23, 2018 6:38:36 AM by  Jan Taubmann[Paessler Support]



Best Answer

Accepted Answer

Votes:

1

Your Vote:

Up

Down

Hello Marco,
thank you for the clarification.

In this case, the OID returns a numerical value which you want to map to a Status and String. This is the typical/ideal use-case for Lookups:

Just as intro, the MIB's documentation:

1.3.6.1.4.1.318.1.1.1.3.2.5.0 (ups adv input line fail cause)
The reason for the occurrence of the last transfer to UPS battery power. The variable is set to: - noTransfer(1) -- if there is no transfer yet. - highLineVoltage(2) -- if the transfer to battery is caused by an over voltage greater than the high transfer voltage. - brownout(3) -- if the duration of the outage is greater than five seconds and the line voltage is between 40% of the rated output voltage and the low transfer voltage. - blackout(4) -- if the duration of the outage is greater than five seconds and the line voltage is between 40% of the rated output voltage and ground. - smallMomentarySag(5) -- if the duration of the outage is less than five seconds and the line voltage is between 40% of the rated output voltage and the low transfer voltage. - deepMomentarySag(6) -- if the duration of the outage is less than five seconds and the line voltage is between 40% of the rated output voltage and ground. The variable is set to - smallMomentarySpike(7) -- if the line failure is caused by a rate of change of input voltage less than ten volts per cycle. - largeMomentarySpike(8) -- if the line failure is caused by a rate of change of input voltage greater than ten volts per cycle. - selfTest(9) -- if the UPS was commanded to do a self test. - rateOfVoltageChange(10) -- if the failure is due to the rate of change of the line voltage.

When importing the PowerNet-MIB this lookup will be created automatically by the SNMP Library Sensor during the import. It's also possible to manually create the lookup (for use with the Custom SNMP Sensor(s)) as described below:

1. Head to C:\Program Files (x86)\PRTG Network Monitor\lookups on your Core Server.

2. Copy one of the standard lookups (e.g. prtg.standardlookups.businessprocess.state.ovl) to the \custom\ subfolder, we'll use this file for reference.

3. Rename the file to your liking, e.g. prtg.customlookups.apc.failcause.ovl.

4. Open the copied file (in the \custom folder) with a text editor (the file is XML-like). Modify the id="prtg.standardlookups.businessprocess.state" to match the new file name e.g. id="prtg.customlookups.apc.failcause"

5. Modify the rest of the file to match the error codes and text returned by the APC OID/MIB, complying with the syntax of the original file. The end result should look like the following:

<?xml version="1.0" encoding="UTF-8"?>
  <ValueLookup id="prtg.customlookups.apc.failcause" desiredValue="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PaeValueLookup.xsd" undefinedState="Warning">
    <Lookups>
      <SingleInt state="Ok" value="1">No Events</SingleInt>
      <SingleInt state="Error" value="2">High line voltage</SingleInt>
	  <SingleInt state="Error" value="3">Brownout</SingleInt>
	  <SingleInt state="Error" value="4">Loss of mains power</SingleInt>
	  <SingleInt state="Warning" value="5">Small temporary power drop</SingleInt>
	  <SingleInt state="Error" value="6">Large temporary power drop</SingleInt>
	  <SingleInt state="Warning" value="7">Small spike</SingleInt>
	  <SingleInt state="Error" value="8">Large spike</SingleInt>
	  <SingleInt state="Ok" value="9">UPS self test</SingleInt>
	  <SingleInt state="Error" value="10">Excessive input voltage fluctuation</SingleInt>
    </Lookups>
  </ValueLookup>

This will map different states to different messages ("No Events", "High line voltage", etc) to different sensor states (Ok, Warning, Error). The desiredValue="1" impacts the sensor's averaging for Historic Data, it should be set to the "most common/desired" value for the sensor. The undefinedState="Warning" defines what state the sensor should have if the value doesn't match any of the defined states (e.g. if a value of 11 is received).

6. With the file stored and saved, head to Setup > Administrative Tools and perform a re-load lookups operation to make sure that PRTG has loaded the newly created lookup.

7. Within the Value channel of your newly created SNMP Custom Sensor (for OID 1.3.6.1.4.1.318.1.1.1.3.2.5.0) switch the Value Lookup from none to the newly created lookup (prtg.customlookups.apc.failcause). The sensor will now have it's status updated accordingly to the received value.

For further information regarding lookups:
Other SNMP-related topics:

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Aug 2, 2016 8:01:03 AM by  Luciano Lingnau [Paessler Support]

Last change on Mar 14, 2017 8:52:58 AM by  Luciano Lingnau [Paessler Support]



4 Replies

Votes:

0

Your Vote:

Up

Down

Hello Marco,
thank you for your post.

Just one question before we proceed: Which precise OID are you monitoring? This will allow us to check for the vendor's documentation which will be helpful throughout the case.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Aug 1, 2016 8:56:51 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Luciano

It refers to the OID .1.3.6.1.4.1.318.1.1.1.3.2.5.0 of APC UPS systems.

OID=.1.3.6.1.4.1.318.1.1.1.3.2.5.0, Type=Integer, Value=9

https://www.opsview.com/resources/blog/monitoring-apc-ups-useful-oids

Kind regards, Marco

Created on Aug 1, 2016 11:30:54 PM by  marcoliewerenz (0) 1

Last change on Aug 2, 2016 7:29:55 AM by  Luciano Lingnau [Paessler Support]



Accepted Answer

Votes:

1

Your Vote:

Up

Down

Hello Marco,
thank you for the clarification.

In this case, the OID returns a numerical value which you want to map to a Status and String. This is the typical/ideal use-case for Lookups:

Just as intro, the MIB's documentation:

1.3.6.1.4.1.318.1.1.1.3.2.5.0 (ups adv input line fail cause)
The reason for the occurrence of the last transfer to UPS battery power. The variable is set to: - noTransfer(1) -- if there is no transfer yet. - highLineVoltage(2) -- if the transfer to battery is caused by an over voltage greater than the high transfer voltage. - brownout(3) -- if the duration of the outage is greater than five seconds and the line voltage is between 40% of the rated output voltage and the low transfer voltage. - blackout(4) -- if the duration of the outage is greater than five seconds and the line voltage is between 40% of the rated output voltage and ground. - smallMomentarySag(5) -- if the duration of the outage is less than five seconds and the line voltage is between 40% of the rated output voltage and the low transfer voltage. - deepMomentarySag(6) -- if the duration of the outage is less than five seconds and the line voltage is between 40% of the rated output voltage and ground. The variable is set to - smallMomentarySpike(7) -- if the line failure is caused by a rate of change of input voltage less than ten volts per cycle. - largeMomentarySpike(8) -- if the line failure is caused by a rate of change of input voltage greater than ten volts per cycle. - selfTest(9) -- if the UPS was commanded to do a self test. - rateOfVoltageChange(10) -- if the failure is due to the rate of change of the line voltage.

When importing the PowerNet-MIB this lookup will be created automatically by the SNMP Library Sensor during the import. It's also possible to manually create the lookup (for use with the Custom SNMP Sensor(s)) as described below:

1. Head to C:\Program Files (x86)\PRTG Network Monitor\lookups on your Core Server.

2. Copy one of the standard lookups (e.g. prtg.standardlookups.businessprocess.state.ovl) to the \custom\ subfolder, we'll use this file for reference.

3. Rename the file to your liking, e.g. prtg.customlookups.apc.failcause.ovl.

4. Open the copied file (in the \custom folder) with a text editor (the file is XML-like). Modify the id="prtg.standardlookups.businessprocess.state" to match the new file name e.g. id="prtg.customlookups.apc.failcause"

5. Modify the rest of the file to match the error codes and text returned by the APC OID/MIB, complying with the syntax of the original file. The end result should look like the following:

<?xml version="1.0" encoding="UTF-8"?>
  <ValueLookup id="prtg.customlookups.apc.failcause" desiredValue="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PaeValueLookup.xsd" undefinedState="Warning">
    <Lookups>
      <SingleInt state="Ok" value="1">No Events</SingleInt>
      <SingleInt state="Error" value="2">High line voltage</SingleInt>
	  <SingleInt state="Error" value="3">Brownout</SingleInt>
	  <SingleInt state="Error" value="4">Loss of mains power</SingleInt>
	  <SingleInt state="Warning" value="5">Small temporary power drop</SingleInt>
	  <SingleInt state="Error" value="6">Large temporary power drop</SingleInt>
	  <SingleInt state="Warning" value="7">Small spike</SingleInt>
	  <SingleInt state="Error" value="8">Large spike</SingleInt>
	  <SingleInt state="Ok" value="9">UPS self test</SingleInt>
	  <SingleInt state="Error" value="10">Excessive input voltage fluctuation</SingleInt>
    </Lookups>
  </ValueLookup>

This will map different states to different messages ("No Events", "High line voltage", etc) to different sensor states (Ok, Warning, Error). The desiredValue="1" impacts the sensor's averaging for Historic Data, it should be set to the "most common/desired" value for the sensor. The undefinedState="Warning" defines what state the sensor should have if the value doesn't match any of the defined states (e.g. if a value of 11 is received).

6. With the file stored and saved, head to Setup > Administrative Tools and perform a re-load lookups operation to make sure that PRTG has loaded the newly created lookup.

7. Within the Value channel of your newly created SNMP Custom Sensor (for OID 1.3.6.1.4.1.318.1.1.1.3.2.5.0) switch the Value Lookup from none to the newly created lookup (prtg.customlookups.apc.failcause). The sensor will now have it's status updated accordingly to the received value.

For further information regarding lookups:
Other SNMP-related topics:

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Aug 2, 2016 8:01:03 AM by  Luciano Lingnau [Paessler Support]

Last change on Mar 14, 2017 8:52:58 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks so much for the detailed description of the solution. It worked straight away and it is really handy for other sensors / vendors as well. Great work!

Created on Aug 3, 2016 12:44:51 AM by  marcoliewerenz (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.