<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">Okay, maybe I am not making it clear enough on what it is I am trying to do...</font></div>
<div dir="ltr">&nbsp;</div>
<div dir="ltr">
<div dir="ltr"><font size="2" face="Tahoma">In the older syslong-ng v2.1, this line works perfectly:</font></div>
<div dir="ltr"><font size="2" face="Tahoma"></font>&nbsp;</div>
<div dir="ltr"><font size="2" face="Tahoma">filter M_audit&nbsp;&nbsp; { not match(&quot;Audit daemon rotating log files&quot;); };</font></div>
</div>
<div dir="ltr"><font size="2" face="Tahoma"></font>&nbsp;</div>
<div dir="ltr"><font size="2" face="Tahoma">Under 3.0.8, none of the following are working (if added one line at a time) and the daemon restarted:</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font>&nbsp;</div>
<div dir="ltr"><font size="2" face="tahoma">filter M_audit&nbsp; { not match(&quot;Audit daemon rotating log files&quot; value(&quot;MSGONLY&quot;) flags(ignore-case)); };</font></div>
<div dir="ltr">
<div dir="ltr"><font size="2" face="tahoma">filter M_audit&nbsp; { not match(&quot;MSGONLY&quot; value(&quot;Audit daemon rotating log files&quot;) flags(ignore-case)); };</font></div>
</div>
<div dir="ltr"><font size="2" face="tahoma">
<div dir="ltr"><font size="2" face="tahoma">filter M_audit&nbsp; { not match(&quot;Audit daemon rotating log files&quot; value(MSGONLY)
<font size="2" face="Tahoma">flags(ignore-case)</font>); };</font></div>
<div dir="ltr"><font face="tahoma">
<div dir="ltr"><font size="2" face="tahoma">filter M_audit&nbsp; { not match(&quot;Audit daemon rotating log files&quot; value(MSGONLY)); };</font></div>
<div dir="ltr">
<div dir="ltr"><font size="2" face="tahoma">filter M_audit&nbsp; { not match(&quot;MSGONLY&quot; value(&quot;Audit daemon rotating log files&quot;)); };</font></div>
</div>
</font></div>
<div dir="ltr"><font face="tahoma"></font>&nbsp;</div>
<div dir="ltr"><font face="tahoma">What I am looking to do is if any incoming data has the following &quot;<font size="2" face="Tahoma">Audit daemon rotating log files&quot; message&nbsp;being detected, it should be filtered (i.e. dropped), and then not show up in the actual
 message log file. </font></font></div>
<div dir="ltr"><font face="tahoma"><font size="2" face="Tahoma"></font></font>&nbsp;</div>
<div dir="ltr"><font face="tahoma"><font size="2" face="Tahoma">For example, if I go over on the syslog-ng client and do 'logger daemon':
</font></font></div>
<div dir="ltr"><font face="tahoma"><font size="2" face="Tahoma"><font face="tahoma">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -
</font>The older v2.1 syslog-ng server drops the message. &lt;-- This is correct</font></font></div>
<div dir="ltr"><font face="tahoma"><font size="2" face="Tahoma"><font face="tahoma">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -
</font>On the v3.0.8, the message passes through&nbsp;and found in the&nbsp;data file. &lt;-- This is incorrect</font></font></div>
<div dir="ltr"><font face="tahoma"><font size="2" face="Tahoma"></font></font>&nbsp;</div>
<div dir="ltr"><font face="tahoma"><font size="2" face="Tahoma">Since the above methods aren't working, I am asking here &quot;w</font></font><font face="tahoma"><font size="2" face="Tahoma">hat would be the best way of going about this as it seems my original&nbsp;filtering
 lines from v2.1&nbsp;no longer work&quot;.</font></font></div>
<div dir="ltr"><font face="tahoma"></font>&nbsp;</div>
<div dir="ltr"><font face="tahoma">-- Michael</font></div>
</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font>&nbsp;</div>
<div style="DIRECTION: ltr" id="divRpF623702">
<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> Monday, September 20, 2010 6:52 PM<br>
<b>To:</b> syslog-ng@lists.balabit.hu<br>
<b>Subject:</b> Re: [syslog-ng] Converting filtering from 2.1 to 3.0?<br>
</font><br>
</div>
<div></div>
<font size="2">
<div class="PlainText">Your &quot;value&quot; is wrong. It's a variable name, not a literal string, so you use
<br>
it like this:<br>
<br>
value(MSGONLY) <br>
<br>
or the cleaner version<br>
<br>
value(${MSGONLY})<br>
<br>
It works like a bash variable in this regard<br>
<br>
<br>
<br>
On Tuesday 21 September 2010 00:30:06 Worsham, Michael wrote:<br>
&gt; Well I tried the following two lines and neither one works:<br>
&gt; <br>
&gt; filter M_audit&nbsp; { not match(&quot;Audit daemon rotating log files&quot;<br>
&gt; value(&quot;MSGONLY&quot;) flags(ignore-case)); }; Incoming log entry; line='&lt;13&gt;Sep<br>
&gt; 20 18:26:19 drupal root: daemon' Filter rule evaluation begins;<br>
&gt; filter_rule='M_audit'<br>
&gt; No such value known; value='MSGONLY'<br>
&gt; filter M_audit&nbsp; { not match(&quot;MSGONLY&quot; value(&quot;Audit daemon rotating log<br>
&gt; files&quot;) flags(ignore-case)); }; Incoming log entry; line='&lt;13&gt;Sep 20<br>
&gt; 18:16:15 drupal root: daemon' Filter rule evaluation begins;<br>
&gt; filter_rule='M_audit'<br>
&gt; No such value known; value='Audit daemon rotating log files'<br>
&gt; WTF am I doing wrong and please quit quoting URLs to look at.<br>
&gt; <br>
&gt; -- M<br>
&gt; <br>
&gt; <br>
&gt; ________________________________<br>
&gt; From: syslog-ng-bounces@lists.balabit.hu<br>
&gt; [syslog-ng-bounces@lists.balabit.hu] On Behalf Of Matthew Hall<br>
&gt; [mhall@mhcomputing.net] Sent: Monday, September 20, 2010 6:12 PM<br>
&gt; To: Syslog-ng users' and developers' mailing list<br>
&gt; Subject: Re: [syslog-ng] Converting filtering from 2.1 to 3.0?<br>
&gt; <br>
&gt; On Mon, Sep 20, 2010 at 05:23:28PM -0400, Worsham, Michael wrote:<br>
&gt; &gt; No such value known; value='Audit daemon rotating log files'<br>
&gt; &gt; No such value known; value='last message repeated'<br>
&gt; &gt; No such value known; value='Log statistics'<br>
&gt; <br>
&gt; I believe this output indicates you have the incorrect information in<br>
&gt; the value argument. The value argument is supposed to be used to<br>
&gt; indicate which message macro should be checked for the string or regex<br>
&gt; in question.<br>
&gt; <br>
&gt; So you probably want the value argument to be one of these:<br>
&gt; <br>
&gt; <a href="http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-v3.1-gui" target="_blank">
http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-v3.1-gui</a><br>
&gt; de-admin-en.html/reference_macros.html<br>
&gt; <br>
&gt; Matthew.<br>
&gt; <br>
&gt; The most interesting ones for your application would be the ones below.<br>
&gt; <br>
&gt; Consider using an output template which outputs the value in each macro,<br>
&gt; so you can see which macro you should be matching for each of your<br>
&gt; filter rules.<br>
&gt; <br>
&gt; For example, if you output messages with this template, you would see<br>
&gt; the value in the MSGONLY macro. You could use a longer version of this<br>
&gt; to print out all the macros and figure out which should be used for the<br>
&gt; different matches you are trying to perform.<br>
&gt; <br>
&gt; template t_raw {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; template(&quot;${MSGONLY}\n&quot;);<br>
&gt; };<br>
&gt; <br>
&gt; <br>
&gt; MSG or MESSAGE<br>
&gt; Description: Text contents of the log message without the program name<br>
&gt; and pid. Note that this has changed in syslog-ng version 3.0; in earlier<br>
&gt; versions this macro included the program name and the pid. In syslog-ng<br>
&gt; 3.0, the MSG macro became equivalent with the MSGONLY macro. The program<br>
&gt; name and the pid together are available in the MSGHDR macro.<br>
&gt; <br>
&gt; MSGHDR<br>
&gt; Description: The name and the pid of the program that sent the log<br>
&gt; message in PROGRAM: PID format. Includes a trailing whitespace. Note<br>
&gt; that the macro returns an empty value if both the program and pid fields<br>
&gt; of the message are empty.<br>
&gt; <br>
&gt; MSGONLY<br>
&gt; Description: Message contents without the program name or pid.<br>
&gt; <br>
&gt; PROGRAM<br>
&gt; <br>
&gt; Description: The name of the program sending the message. Note that the<br>
&gt; content of the $PROGRAM variable may not be completely trusted as it is<br>
&gt; provided by the client program that constructed the message.<br>
&gt; <br>
&gt; ___________________________________________________________________________<br>
&gt; ___ Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">
https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
&gt; Documentation:<br>
&gt; <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">
http://www.balabit.com/support/documentation/?product=syslog-ng</a> FAQ:<br>
&gt; <a href="http://www.campin.net/syslog-ng/faq.html" target="_blank">http://www.campin.net/syslog-ng/faq.html</a><br>
&gt; <br>
&gt; <br>
&gt; ________________________________<br>
&gt; CONFIDENTIALITY NOTICE: This email and any attachments are intended solely<br>
&gt; for the use of the named recipient(s). This email may contain confidential<br>
&gt; and/or proprietary information of Scientific Research Corporation. If you<br>
&gt; are not a named recipient, you are prohibited from reviewing, copying,<br>
&gt; using, disclosing or distributing to others the information in this email<br>
&gt; and attachments. If you believe you have received this email in error,<br>
&gt; please notify the sender immediately and permanently delete the email, any<br>
&gt; attachments, and all copies thereof from any drives or storage media and<br>
&gt; destroy any printouts of the email or attachments.<br>
&gt; <br>
&gt; EXPORT COMPLIANCE NOTICE: This email and any attachments may contain<br>
&gt; technical data subject to U.S export restrictions under the International<br>
&gt; Traffic in Arms Regulations (ITAR) or the Export Administration<br>
&gt; Regulations (EAR). Export or transfer of this technical data and/or<br>
&gt; related information to any foreign person(s) or entity(ies), either within<br>
&gt; the U.S. or outside of the U.S., may require advance export authorization<br>
&gt; by the appropriate U.S. Government agency prior to export or transfer. In<br>
&gt; addition, technical data may not be exported or transferred to certain<br>
&gt; countries or specified designated nationals identified by U.S. embargo<br>
&gt; controls without prior export authorization. By accepting this email and<br>
&gt; any attachments, all recipients confirm that they understand and will<br>
&gt; comply with all applicable ITAR, EAR and embargo compliance requirements.<br>
<br>
-- <br>
Alan McKinnon<br>
Systems Engineer^W Technician<br>
Infrastructure Services<br>
Internet Solutions<br>
<br>
&#43;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&#43;Confidentiality&#43;Notice&#43;and&#43;Disclaimer.htm" target="_blank">
http://www.is.co.za/legal/E-mail&#43;Confidentiality&#43;Notice&#43;and&#43;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 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>