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

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

Votes:

0

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

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



4 Replies

Votes:

0

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]



Votes:

0

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



Votes:

0

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]



Votes:

0

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

Created on Jan 15, 2016 4:04:29 PM




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.