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 Custom String sensor Extract a part of the message and graph it

Votes:

0

I have an appliance which is providing a string like this for an OID :

FAN 1 : 10800 RPM

How can I use a sensor to graph this value (only the number) ?

I tried with SNMP Custom but message says :

'FAN 1: 10800 RPM' is not a valid integer value

Thanks

custom-sensor oid regex regular-expression snmp snmpcustomstringsensor string value

Created on Mar 23, 2012 10:05:00 AM

Last change on Jun 30, 2015 5:43:28 AM by  Luciano Lingnau [Paessler]



Best Answer

Accepted Answer

Votes:

0

Hello,
Currently it is possible to use Regular Expressions to extract numerical values from a String, that way you can graph and configure limits based on the extracted value.
Once the Regular Expression is configured within the Sensor's Settings an additional channel called "Extracted Value" will show up within the sensor.

For more details on the sintax of the Regular Expressions, see the links below.

Links

Manual - Custom String Sensor

Manual - Regular Expressions

External - regex101.com

Created on May 22, 2015 2:17:04 PM by  Luciano Lingnau [Paessler]

Last change on Oct 9, 2015 11:20:02 AM by  Luciano Lingnau [Paessler]



7 Replies

Votes:

0

I'm afraid that's not currently possible with PRTG. You can read out the string using a SNMP String sensor, but it isn't possible to separate the numeric value and use the same.

Created on Mar 23, 2012 1:23:45 PM by  Patrick Hutter [Paessler Support] (7,225) 3 3



Votes:

0

Thank you for your msg

But can we trigger a notification based on the message content ?

Like if the message is changed to :

FAN 1 : 12000 RPM and above

Thanks

Created on Mar 23, 2012 1:25:43 PM



Votes:

0

SNMP Custom String sensors include the option to search the result for a specific string and include the fields, "Response must include" (if the response does not contain this string, this is considered an error and can trigger a notification) and "Response must not include" (if the response does contain this string, this is considered an error and can trigger a notification). If there is a specific string that should always trigger a notification, respectively trigger a notification if it is not in the response, then you could use this option to do the same. Otherwise, it isn't possible.

Created on Mar 23, 2012 1:33:38 PM by  Patrick Hutter [Paessler Support] (7,225) 3 3



Votes:

0

Thank you,

but with this I will not only be capable to track a fix value like 12000 no ?

If I would like to track from 12000 to above (range 12000 to 20000) ?

Created on Mar 23, 2012 1:35:55 PM



Votes:

0

No, it won't. As mentioned above, it is not possible to extract the value from the string result using PRTG and, as such, it isn't possible to use limits when the counter in case returns a string.

Created on Mar 23, 2012 1:37:33 PM by  Patrick Hutter [Paessler Support] (7,225) 3 3



Votes:

0

Ok thank you,

Any plans in future to have that possible ?

Created on Mar 23, 2012 1:39:13 PM



Accepted Answer

Votes:

0

Hello,
Currently it is possible to use Regular Expressions to extract numerical values from a String, that way you can graph and configure limits based on the extracted value.
Once the Regular Expression is configured within the Sensor's Settings an additional channel called "Extracted Value" will show up within the sensor.

For more details on the sintax of the Regular Expressions, see the links below.

Links

Manual - Custom String Sensor

Manual - Regular Expressions

External - regex101.com

Created on May 22, 2015 2:17:04 PM by  Luciano Lingnau [Paessler]

Last change on Oct 9, 2015 11:20:02 AM by  Luciano Lingnau [Paessler]




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.