NetXMS Support Forum

English Support => General Support => Topic started by: Luiz A. Camilo on October 03, 2013, 05:53:23 PM

Title: Log Monitoring Parser file help
Post by: Luiz A. Camilo on October 03, 2013, 05:53:23 PM
I'm having problems to create an efficient filter.
This event is logged on my file, and i'm not able to filter it

[INFO ][SERVER] [03/10/2013 10:24:03] Iniciando Programa SIGAADV Thread 2040 (RM,SAO-B15TZ91)

All I want is to match "[INFO ][SERVER]" and send the rest of the line as a parameter (.*)
If someone has some documentation of the sintax and acceptable characters that I can use, that would help me a lot.

I've been using this Fórum post as refference, but i'm not sure about the sintax ..
https://www.netxms.org/forum/configuration/problems-with-logwatch/msg3715/#msg3715 (https://www.netxms.org/forum/configuration/problems-with-logwatch/msg3715/#msg3715)

Thanks in advance.
Title: Re: Log Monitoring Parser file help
Post by: Victor Kirhenshtein on October 03, 2013, 11:55:20 PM
Hi!

Rule should looks like this:


<rule>
   <match>^\[INFO \]\[SERVER\] (.*)</match>
   <event params="1">event code here</event>
</rule>


Best regards,
Victor