<div dir="ltr"><div>Hi,</div><div><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="#0563C1" vlink="#954F72" lang="EN-US"><div class="m_3487290152040573303WordSection1">
<p class="MsoNormal">I have syslog-ng 3.14 and I am trying to filter DNS logs.  I have this working in a very old 2.0.9 version of syslog-ng.  But it does not seem to want to work in the 3.14 environment.  Can anyone help me out as I am pretty new to administering
 syslog-ng.</p>
</div></div></blockquote><div><br></div><div>Could you elaborate, please? What do you mean by "not seem to want to work"?</div><div><br></div><div>Does syslog-ng receive messages from s_net? You can verify it by starting syslog-ng in debug mode from the command line:</div><div><br></div><div>$ sbin/syslog-ng -Fdev</div><div><br></div><div>Please share the output of this command.<br></div><div><br></div><div>If so, do your logs appear under /var/log2/gns-dmz/bluecat/?</div><div>If not, something is wrong with your filters or with file permissions.</div><div><br></div><div><br></div><div>I'm not familiar with syslog-ng 2.0, but I've tested your configuration with syslog-ng 3.16. Let me share my tips:</div></div><div class="gmail_quote"><br></div><div class="gmail_quote">1. It might be possible that the /var/log2/gns-dmz/bluecat/ directory does not exist, so I added <font color="rgb(192, 197, 206)">create-dirs(yes) to the configuration.</font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)">2. I assume that the hostname ".*ddi-edns.*" is part of the message received from s_net, so I added <font color="rgb(192, 197, 206)">keep-hostname(yes) to the config. If my assumption is incorrect, you should set <font color="rgb(192, 197, 206)"><font color="rgb(192, 197, 206)">keep-hostname(no) and adjust</font></font> use-dns() and use-fqdn() <span id="inbox-inbox-result_box" class="inbox-inbox-short_text" lang="en"><span class="inbox-inbox-">according to your needs</span></span>. </font><br></font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)">3. Make sure s_net is configured correctly, for example, if you want to receive old BSD-style messages, use the network() driver, otherwise use the syslog() driver for framed IETF-syslog messages.<br></font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)"><br></font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)">For example:</font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)"><br></font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)"><span style="font-family:monospace"><font color="rgb(192, 197, 206)">@version: 3.16<br>@include "scl.conf"<br><br>options {<br>    create-dirs(yes);<br>    keep-hostname(yes);<br>};<br><br>source s_net {<br>    network(port(4444));<br>};<br></font></span></font></div><div class="gmail_quote"><br><font color="rgb(192, 197, 206)"><span style="font-family:monospace"></span></font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)"><span style="font-family:monospace"><font color="rgb(192, 197, 206)">// insert your previous config snippet here</font></span><br></font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)"><br></font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)"><br></font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)">My test input was "</font><font color="rgb(192, 197, 206)"><133>Feb 24 14:04:04 test.ddi-edns.test dhcpd message".</font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)"><br></font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)">--</font></div><div class="gmail_quote"><font color="rgb(192, 197, 206)">László Várady<br></font></div></div></div>