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

How should I write a Regular Expression to recognize a multiple line string for the log check sensor

Votes:

0

I've been trying to configure a log check sensor to find a text as the following example: DC = "1" In site = "2" Right found: "SecurityPrividege"

Following the recomendation from your help document, i went to www.regexpal.com to try an expression and i got this to work:

( DC = "1"\n In site = "2"\n Right found: "SecurityPrividege")

(Note i use the \n as a eol)

PRTG didn't find the string. Could you point me at some examples to follow to get this working?

Thanks

expression log regexp regular string

Created on Feb 3, 2012 2:24:42 PM



2 Replies

Votes:

0

Hi Miquel,

My favorite tool for building Regular Expressions is Expresso from Ultrapico

Using this tool to find your text:

DC = "1"
In site = "2"
Right found: "SecurityPrividege"

I come up with:

DC\s=\s"1"\r\nIn\ssite\s=\s"2"\r\nRight\sfound:\s"SecurityPrividege"

Regards,

Created on Feb 4, 2012 4:43:13 PM



Votes:

0

Thanks for you sugesttion. I tried it, and even tested it before with "Expresso" (great tool by the way) and it didn't work. PRTG seems to be unable to find the junp of lines (\r\n). Anybody had got something like this working? Paessler support, do you have limitations on how you can use RegExp on PRTG? Many thanks.

Created on Feb 7, 2012 12:14:56 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.