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


SNMP CPU Sensor returns "2 Percent" is not a valid integer value

Votes:

0

Your Vote:

Up

Down

Hello,
I am attempting to monitor some IP Cameras via an SNMP Library sensor:

I obtained the MIB file from the manufacturer and used the MIB Importer program to import it into our PRTG system. The creation of the SNMP Library sensor works correctly, but I am having an issue with a few of the sensors created:

They are returning strings such as "2 Percent" or "3.0 GB" and PRTG responds with an error saying that it "is not a valid integer value".

Is there a way to create a custom SNMP sensor to handle these type of values? Is there a way to have PRTG just look at the first 1-3 characters of the return value? Or are there any other fixes for this that I could apply?

Thanks

Jeremy

mib oid oidlib snmp-library snmp-sensor

Created on Jan 8, 2016 5:05:21 PM by  jhallam (140) 1 2

Last change on Jan 11, 2016 8:04:53 AM by  Luciano Lingnau [Paessler Support]



4 Replies

Votes:

0

Your Vote:

Up

Down

Hello Jeremy, we appreciate your contact.

PRTG is able to work-around such doubtful SNMP implementations, for this please check out our SNMP Custom String Sensor as it is able to perform numerical extraction using regular expressions, that way you should be able to extract the numerical values from the SNMP Strings provided by the device.

Best Regards,

Created on Jan 11, 2016 8:03:42 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks for the help. I am reading through the "SNMP Custom String Sensor" information that you linked as well as the Regular Expression and Numerical Extraction parts of the manual, but I am not quite understanding how to extract the number I want. I used the SNMP Tester and the string that is returned is "X PERCENT", where X=the number I want to extract, monitor and graph. You someone possibly provide a screenshot of the SNMP Custom String Sensor settings that would do this? I will keep reading to see if it starts to make sense as well. Thanks

Created on Jan 12, 2016 4:17:13 PM by  jhallam (140) 1 2



Votes:

0

Your Vote:

Up

Down

Hello jhallam,
thank you for your reply.

Since you've mentioned that the String returned by the OID looks like the following:

e.g. 85 Percent

Head to the settings of the SNMP Custom String Sensor, scroll down to Extended Processing, mark the checkbox Extract a numeric value using a regular expression and enter the following Regular Expression, leave the rest of the settings unchanged:

(\d+)

After that, you'll see an additional channel called Extracted Value on the sensor's overview, it will contain the value extracted by the regular expression defined in the sensor's settings. It's possible to click on the small pin next to the channel to set it as Primary sensor's channel.

More details regarding regular expressions are available here:


Best Regards,

Created on Jan 13, 2016 7:59:32 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks. The settings you recommended worked perfect. I appreciate the help.

Created on Jan 15, 2016 4:04:29 PM by  jhallam (140) 1 2



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.