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

File content search string. Issues with multiple strings in one sensor.

Votes:

0

I have enabled a file content sensor to monitor a alert.txt file. I want 2 search strings to be enabled as AND/OR to trigger the sensor as a warning if it shows up.

I currently have it working perfectly with one string "SRV2006" But i want two strings "SRV2006" and "SRV2008"

I have tried all sorts of regular expressions but i cant seem to get it working.

any idea's?

logs prtg wmi

Created on Feb 21, 2017 5:26:06 AM



7 Replies

Votes:

0

The following regex should do the trick:

(SRV20[0-9][0-9])

Created on Feb 21, 2017 10:32:25 AM by  Stephan Linke [Paessler Support]



Votes:

0

Thanks Stephan,

So make sure my sensor is regular expression and copy and paste that string exactly with all brackets?

Created on Feb 22, 2017 2:42:51 AM



Votes:

0

Exactly :)

Created on Feb 22, 2017 7:35:59 AM by  Stephan Linke [Paessler Support]



Votes:

0

Thanks, Tested and worked. Not that my log files show up other error codes that i know of but what if it shows SRV2007? this regular expression will alarm anything from 0-9 on the last digit correct?

anyway to remove other numbers and only have 6 and 8 as the last digits?

Created on Feb 22, 2017 8:04:49 AM



Votes:

0

It match everything from SRV2000 to 2099 :)

Created on Feb 22, 2017 9:34:05 AM by  Stephan Linke [Paessler Support]

Last change on Feb 22, 2017 9:34:15 AM by  Stephan Linke [Paessler Support]



Votes:

0

Can we make it only match SRV2006 and SRV2008?

Created on Feb 22, 2017 9:35:04 AM



Votes:

0

Sure: SRV(2006|2008)

Created on Feb 22, 2017 9:52:14 AM by  Stephan Linke [Paessler Support]




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.