<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="chsdate"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
/* Page Definitions */
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        layout-grid:15.6pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>
<div class=Section1 style='layout-grid:15.6pt'>
<p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size:
9.0pt;font-family:Arial'>I use the syslog-ng to receive remote log,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size:
9.0pt;font-family:Arial'>The syslog-ng is running under linux ,the remote client
is sending log by syslog,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size:
9.0pt;font-family:Arial'>and the syslog-ng configure fie is as follows: <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=1 face=Arial><span lang=EN-US style='font-size:
9.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face=Verdana><span lang=EN-US
style='font-size:10.0pt;font-family:Verdana;color:black'>options {
use_dns(yes); create_dirs(yes); };<br>
source src { udp(ip(<st1:chsdate IsROCDate="False" IsLunarDate="False" Day="30"
Month="12" Year="1899" w:st="on">0.0.0</st1:chsdate>.0) port(514)); };<br>
filter f_cron { facility(cron); };<br>
filter f_messages { not facility(cron); };<br>
destination messages { file("/home/liuruihong/syslog-ng/log/$HOST/$YEAR/messages-$MONTH");
};<br>
destination cron {
file("/home/liuruihong/syslog-ng/log/$HOST/$YEAR/cron-$MONTH"); };<br>
log { source(src); filter(f_cron); destination(cron); };<br>
log { source(src); filter(f_messages); destination(messages); };<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face=Verdana><span lang=EN-US
style='font-size:10.0pt;font-family:Verdana;color:black'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=black face=Verdana><span lang=EN-US
style='font-size:10.0pt;font-family:Verdana;color:black'>but the log files “messages-$MONTH”
still include the crond information,</span></font><font size=1 face=Arial><span
lang=EN-US style='font-size:9.0pt;font-family:Arial'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-US
style='font-size:10.5pt'>I don’t know why?<o:p></o:p></span></font></p>
</div>
</body>
</html>