New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.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


Extract a numeric value using a regular expression

Votes:

0

Your Vote:

Up

Down

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 by  gianluca bona (10) 1



1 Reply

Votes:

0

Your Vote:

Up

Down

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 Support]



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.