NetXMS Support Forum

English Support => General Support => Topic started by: Stardust on September 09, 2015, 01:38:19 PM

Title: Parser questions
Post by: Stardust on September 09, 2015, 01:38:19 PM
Hi,

When I try to use <match invert="1"> it desappear when I save.
Invert="1" desappears and all the line <match ...> remains, is it a bug?

In fact I would like to match a string in a message and not matching another string in the same message, I don't know if i'm being clear but if I am is that possible?

To be clear:
match "abc" but not match if "xyz" is in the message.



Regards.
Title: Re: Parser questions
Post by: Victor Kirhenshtein on September 10, 2015, 07:06:49 PM
Hi,

I suppose you are talking about server side syslog parser. Seems like a bug, I'll check.
But anyway, I don't see how invert will help you - I suppose you'll need two rules anyway: first rule will match "xyz" and stop processing, and second rule will match "abc" and do what is needed.

Best regards,
Victor
Title: Re: Parser questions
Post by: Stardust on September 12, 2015, 08:57:41 PM
Yes it's on Syslog server side and you're right, I misunderstood the fonction of invert="1", that's not what I need.

When I match in a rule, I send an email (for ex <Match>(.*)Error(.*)</match)->event->EPP->mail contains syslog message).
But there is messages that contains "Error" and reveals useless (like error user connection or something...)

Maybe it's not possible to do that but there is what I want:
if ("abc" && NOT "XYZ") => Match (I mean send email)
if ("abc" && "XYZ") => don't Match (don't send mail)

Of course the test will apply on the same message text, in fact, I would like to seprate "Error connection ... person1" and "Error connection... person2"



Thanks a lot.