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

Extract a numeric value using a regular expression

Votes:

0

Hi all, I have a string snmp sensor and I used a REGEX in order to "Extract a numeric value using a regular expression". the value of the SNMP field may be: a string with a number (to be extracted), or empty It works perfect, but when the string is empty (standard behaviour), the sensor goes down. I'd like to transform the "empty" string to a zero value, in order to keep the sensor up. how can I do? (I have last release) many thanks! Gianluca

custom empty regex snmp

Created on Sep 21, 2015 12:21:41 PM



1 Reply

Votes:

0

Hello, we appreciate your contact.

Unfortunately the Regular Expression numerical extraction within PRTG isn't able to match an empty string. We suggest that you create a custom Sensor instead to be able to handle this sort of logic (if null then value = 0).
There's plentiful of examples for custom-scripts in the KB, this being an great example.

Created on Sep 21, 2015 2:35:56 PM 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.