<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Replace $HOST_syslog.log to $HOST-syslog.log and it will work.&nbsp;
Syslog-ng seems to be handling wrong if underscore character is after
macroname.<br>
Report a bug about it, please (<a class="moz-txt-link-freetext" href="https://bugzilla.balabit.com/">https://bugzilla.balabit.com/</a>)<br>
<br>
<br>
abhay singh wrote:
<blockquote
 cite="mid:i2y7eb4b7181004200315le9c6e0caha7ab22dd45553978@mail.gmail.com"
 type="cite">I have made that changes and restarted syslog services
even though its not working///<br>
Now its like this<br>
  <br>
options { <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long_hostnames(off); <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sync(0); <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; perm(0640); <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stats(3600); <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keep_hostname(yes);<br>
};<br>
source s_external {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp(port(514));<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #udp(ip("192.168.114.129") port(514));<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #udp(ip("0.0.0.0") port(514));<br>
};&nbsp; # Specific<br>
source s_stunnel {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp(ip("127.0.0.1")<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; port(514)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; max-connections(1));<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
destination d_external { file("/data/extract/syslogs/$HOST_syslog.log" \<br>
&nbsp;&nbsp;&nbsp; owner(cubot) group(users) perm(0600) dir_perm(0700) create_dirs(yes)<br>
&nbsp;&nbsp;&nbsp; template("$DATE $FULLHOST $PROGRAM $TAG [$FACILITY.$LEVEL] $MESSAGE
\n") );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
  <br>
destination d_stunnel{
file("/data/extract/syslogs/$HOST/$HOST_syslog.log" \<br>
&nbsp;&nbsp;&nbsp; owner(cubot) group(users) perm(0600) dir_perm(0700) create_dirs(yes)<br>
&nbsp;&nbsp;&nbsp; template("$DATE $FULLHOST $PROGRAM $TAG [$FACILITY.$LEVEL] $MESSAGE
\n") );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
  <br>
log { source(s_external); destination(d_external); };<br>
log { source(s_stunnel); destination(d_stunnel); };<br>
  <br>
  <br>
  <br>
  <div class="gmail_quote">On Tue, Apr 20, 2010 at 1:55 PM, Alan
McKinnon <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:Alan.McKinnon@is.co.za">Alan.McKinnon@is.co.za</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div class="im">On Tuesday 20 April 2010 08:38:51 abhay singh wrote:<br>
&gt; Hi All,<br>
&gt;<br>
&gt; I have made changes in syslog-ng.conf to redirect logs coming from
other<br>
&gt; server to some specified log file and in some format<br>
&gt;<br>
&gt; source s_external {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; udp(port(514));<br>
&gt; };<br>
&gt; source s_stunnel {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;tcp(ip(127.0.0.1) port(514));<br>
&gt; };<br>
&gt;<br>
&gt; destination s_external { file("/mydir/syslogs/$HOST_syslog.log" \<br>
&gt; &nbsp; &nbsp; owner(user) group(group) perm(0600) dir_perm(0700)
create_dirs(yes));<br>
&gt; };<br>
&gt;<br>
&gt; destination s_stunnel { file("/mydir/syslogs/$HOST/syslog.log" \<br>
&gt; &nbsp; &nbsp; owner(user) group(group) perm(0600) dir_perm(0700)
create_dirs(yes));<br>
&gt; };<br>
&gt;<br>
&gt; log { source(s_external); destination(s_external); };<br>
&gt; log { source(s_stunnel); destination(s_stunnel); };<br>
&gt;<br>
&gt; But my log file is being created with name "syslog.log" and not as<br>
&gt; "&lt;hostnmae/ip&gt;_syslog.log" neither $HOST directory made,
what may be the<br>
&gt; issue?<br>
&gt;<br>
&gt; Globle options are<br>
&gt;<br>
&gt; option{<br>
&gt;<br>
&gt; long_hostname(off);<br>
&gt; sync(0);<br>
&gt; }<br>
    <br>
    <br>
    </div>
Your sources and destinations have the same name. That is not allowed.<br>
    <br>
Rename the destinations to d_&lt;something&gt;<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 moz-do-not-send="true"
 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 <a
 moz-do-not-send="true" href="mailto:disclaimers@is.co.za">disclaimers@is.co.za</a>
and a copy will be emailed to you.<br>
______________________________________________________________________________<br>
Member info: <a moz-do-not-send="true"
 href="https://lists.balabit.hu/mailman/listinfo/syslog-ng"
 target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a moz-do-not-send="true"
 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 moz-do-not-send="true"
 href="http://www.campin.net/syslog-ng/faq.html" target="_blank">http://www.campin.net/syslog-ng/faq.html</a><br>
    <br>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Regards..<br>
Abhay Singh..<br>
91-98804-55587<br>
Sr. Software Engineer.<br>
Robust Designs India Pvt Ltd.<br>
Bangalore<br>
  <pre wrap="">
<hr size="4" width="90%">
______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a>

  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
pzolee
</pre>
</body>
</html>