<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>.EmailQuote {
        BORDER-LEFT: #800000 2px solid; PADDING-LEFT: 4pt; MARGIN-LEFT: 1pt
}
</style><style title="owaParaStyle"><!--P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
--></style>
</head>
<body ocsi="x">
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">One of my co-workers lent a pair of eyes found something rather unique between the two versions I hadn't looked at.
</font><font size="2" face="Tahoma">Right now, the v3.0.8 build, we are using has the following filter configuration modified from the v2.1 build:</font></div>
<div dir="ltr"><font size="2" face="Tahoma"></font> </div>
<div dir="ltr"><font size="2" face="Tahoma">filter M_audit { not message("Audit daemon rotating log files"); };<br>
filter M_repeat { not message("last message repeated"); };<br>
filter M_stats { not message("Log statistics"); };<br>
</font></div>
<div dir="ltr"><font size="2" face="Tahoma">Now, if I were to login to the syslog-ng client server and do the following 'logger last message repeated', the entire message is dropped from actually showing up on the remote syslog-ng server (which it should).
However, if I do 'logger repeated' (a portion cut from the actual full message that is to be filtered), then the remote syslog-ng server will record it.
</font></div>
<div dir="ltr"><font size="2" face="Tahoma"></font> </div>
<div dir="ltr"><font size="2" face="Tahoma">The filters, in the way they are configured, are NOT allowing for portions of the messages to be detected -- it's either the entire message is matched or none of it, not pieces. What do I need to do to allow the pieces
to be detected and filtered out just like the full message?</font></div>
<div dir="ltr"><font size="2" face="Tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">-- M</font></div>
<div dir="ltr"><font size="2" face="Tahoma"></font> </div>
<div style="DIRECTION: ltr" id="divRpF990685"><font size="2" face="Tahoma">
<hr tabindex="-1">
</font><font color="#000000"><font size="2"><font face="Tahoma"><b>From:</b> syslog-ng-bounces@lists.balabit.hu [syslog-ng-bounces@lists.balabit.hu] On Behalf Of Worsham, Michael<br>
<b>Sent:</b> Tuesday, September 21, 2010 10:48 AM<br>
<b>To:</b> Syslog-ng users' and developers' mailing list<br>
<b>Subject:</b> Re: [syslog-ng] [Bug 93] New: filter() functionality between 2.1 to 3.0 not consistent<br>
</font></font></font><br>
</div>
<div></div>
<div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">This is what my current configuration looks like now (disabled TLS to allow for debugging):</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma"><a href="http://www.murpe.com/syslog-ng-v3.conf2.txt" target="_blank">http://www.murpe.com/syslog-ng-v3.conf2.txt</a></font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">-- M</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div style="DIRECTION: ltr" id="divRpF211356">
<hr tabindex="-1">
<font color="#000000" size="2" face="Tahoma"><b>From:</b> syslog-ng-bounces@lists.balabit.hu [syslog-ng-bounces@lists.balabit.hu] On Behalf Of Alan McKinnon [Alan.McKinnon@is.co.za]<br>
<b>Sent:</b> Tuesday, September 21, 2010 10:35 AM<br>
<b>To:</b> syslog-ng@lists.balabit.hu<br>
<b>Subject:</b> Re: [syslog-ng] [Bug 93] New: filter() functionality between 2.1 to 3.0 not consistent<br>
</font><br>
</div>
<div></div>
<font size="2">
<div class="PlainText">I think you are running into the changed definitions of match() between 2.0
<br>
and 3.0<br>
<br>
<a href="http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-v3.1-guide-" target="_blank">http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-v3.1-guide-</a><br>
admin-en.html/reference_filters.html<br>
<br>
especially match() and message()<br>
<br>
Of your samples, the 3rd and 4th should work. What is the full config that <br>
applies to how you use this filter? Are you perhaps applying two filters? Be <br>
careful with that - filters are always ANDed in a log statement, not ORed.<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Tuesday 21 September 2010 16:16:57 bugzilla@bugzilla.balabit.com wrote:<br>
> <a href="https://bugzilla.balabit.com/show_bug.cgi?id=93" target="_blank">https://bugzilla.balabit.com/show_bug.cgi?id=93</a><br>
> <br>
> Summary: filter() functionality between 2.1 to 3.0 not<br>
> consistent Product: syslog-ng<br>
> Version: 3.0.x<br>
> Platform: PC<br>
> OS/Version: Linux<br>
> Status: NEW<br>
> Severity: major<br>
> Priority: unspecified<br>
> Component: syslog-ng<br>
> AssignedTo: bazsi@balabit.hu<br>
> ReportedBy: mworsham@scires.com<br>
> Type of the Report: bug<br>
> Estimated Hours: 0.0<br>
> <br>
> <br>
> In the older syslong-ng v2.1, this line works perfectly:<br>
> <br>
> filter M_audit { not match("Audit daemon rotating log files"); };<br>
> <br>
> Under 3.0.8, none of the following are working (if added one line at a<br>
> time) and the daemon restarted:<br>
> <br>
> filter M_audit { not match("Audit daemon rotating log files"<br>
> value("MSGONLY") flags(ignore-case)); }; filter M_audit { not<br>
> match("MSGONLY" value("Audit daemon rotating log files")<br>
> flags(ignore-case)); }; filter M_audit { not match("Audit daemon rotating<br>
> log files" value(MSGONLY) flags(ignore-case)); }; filter M_audit { not<br>
> match("Audit daemon rotating log files" value(MSGONLY)); }; filter M_audit<br>
> { not match("MSGONLY" value("Audit daemon rotating log files")); };<br>
> <br>
> What I am looking to do is if any incoming data has the following keywords<br>
> (i.e. "Audit daemon rotating log files") being detected, it should be<br>
> filtered (i.e. dropped), and then not show up in the actual message log<br>
> file.<br>
> <br>
> For example, if I go over on the syslog-ng client and do 'logger daemon':<br>
> - The older v2.1 syslog-ng server detects the embedded keyword and<br>
> drops the message. <-- This is correct - On the v3.0.8, the message passes<br>
> through and found in the data file. <-- This is incorrect<br>
> <br>
> Attempted to use the following URLs to correct the formatting, but it still<br>
> not working: -<br>
> <a href="http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-v3.1-gu" target="_blank">
http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-v3.1-gu</a><br>
> ide-admin-en.html/configuring_filters.html -<br>
> <a href="http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-v3.1-gu" target="_blank">
http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-v3.1-gu</a><br>
> ide-admin-en.html/reference_macros.html<br>
<br>
-- <br>
Alan McKinnon<br>
Systems Engineer^W Technician<br>
Infrastructure Services<br>
Internet Solutions<br>
<br>
+27 11 575 7585<br>
<br>
Please note: This email and its content are subject to the disclaimer as displayed at the following link
<a href="http://www.is.co.za/legal/E-mail+Confidentiality+Notice+and+Disclaimer.htm" target="_blank">
http://www.is.co.za/legal/E-mail+Confidentiality+Notice+and+Disclaimer.htm</a>. Should you not have Web access, send a mail to disclaimers@is.co.za and a copy will be emailed to you.<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">
https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">
http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.campin.net/syslog-ng/faq.html" target="_blank">http://www.campin.net/syslog-ng/faq.html</a><br>
<br>
</div>
</font><br>
<hr>
<font color="gray" size="1" face="Arial">CONFIDENTIALITY NOTICE: This email and any attachments are intended solely for the use of the named recipient(s). This email may contain confidential and/or proprietary information of Scientific Research Corporation.
If you are not a named recipient, you are prohibited from reviewing, copying, using, disclosing or distributing to others the information in this email and attachments. If you believe you have received this email in error, please notify the sender immediately
and permanently delete the email, any attachments, and all copies thereof from any drives or storage media and destroy any printouts of the email or attachments.<br>
<br>
EXPORT COMPLIANCE NOTICE: This email and any attachments may contain technical data subject to U.S export restrictions under the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). Export or transfer of this technical
data and/or related information to any foreign person(s) or entity(ies), either within the U.S. or outside of the U.S., may require advance export authorization by the appropriate U.S. Government agency prior to export or transfer. In addition, technical data
may not be exported or transferred to certain countries or specified designated nationals identified by U.S. embargo controls without prior export authorization. By accepting this email and any attachments, all recipients confirm that they understand and will
comply with all applicable ITAR, EAR and embargo compliance requirements.<br>
</font></div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">CONFIDENTIALITY NOTICE: This email and any attachments are intended solely for the use of the named recipient(s). This email may contain confidential and/or proprietary information of Scientific Research Corporation.
If you are not a named recipient, you are prohibited from reviewing, copying, using, disclosing or distributing to others the information in this email and attachments. If you believe you have received this email in error, please notify the sender immediately
and permanently delete the email, any attachments, and all copies thereof from any drives or storage media and destroy any printouts of the email or attachments.<br>
<br>
EXPORT COMPLIANCE NOTICE: This email and any attachments may contain technical data subject to U.S export restrictions under the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). Export or transfer of this technical
data and/or related information to any foreign person(s) or entity(ies), either within the U.S. or outside of the U.S., may require advance export authorization by the appropriate U.S. Government agency prior to export or transfer. In addition, technical data
may not be exported or transferred to certain countries or specified designated nationals identified by U.S. embargo controls without prior export authorization. By accepting this email and any attachments, all recipients confirm that they understand and will
comply with all applicable ITAR, EAR and embargo compliance requirements.<br>
</font>
</body>
</html>