<html xmlns:v="urn:schemas-microsoft-com:vml" 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)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>What happens if you set use_dns (off);
does your hosts file get read then? What OS is this? How is the system
nsswitch.conf setup for resolution?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Also maybe double check your resolv.conf
what is the domain listing and search order listed in there?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] <b><span
style='font-weight:bold'>On Behalf Of </span></b>mrgenius<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, July 14, 2005
12:53 AM<br>
<b><span style='font-weight:bold'>To:</span></b> Ken Garland<br>
<b><span style='font-weight:bold'>Cc:</span></b> <st1:PersonName w:st="on">Syslog-ng
users' and developers' mailing list</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [syslog-ng] Problem
with hostnames!</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Yes here is the portion of my syslog-ng.cong<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>#####################################<o:p></o:p></span></font></p>
</div>
<div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>options {
sync (0);<br>
time_reopen (10);<br>
log_fifo_size (1000);<br>
long_hostnames (yes);<br>
use_dns (yes);<br>
use_fqdn (yes);<br>
create_dirs (no);<br>
keep_hostname (no); <br>
};<o:p></o:p></span></font></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>source
sys { unix-stream ("/dev/log");
internal(); };<br>
source net { <br>
udp(ip(<a href="http://0.0.0.0"><U>0.0.0.0</U></a>) port(514) );<br>
};<o:p></o:p></span></font></p>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><br>
destination d_mysql {<br>
pipe("/tmp/mysql.pipe"<br>
template("INSERT INTO logs<br>
(host, facility, priority, level, tag, datetime, program, msg)<br>
VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL', '$TAG', '$YEAR-$MONTH-$DAY
$HOUR:$MIN:$SEC', <br>
'$PROGRAM', '$MSG' );\n") template-escape(yes));<br>
};<br>
log { source(net); destination(d_mysql);<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>##############################################<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>But if you say that syslog-ng first queries DNS Server ... then
why it is resolving names for all public Ips which i defined in /etc/hosts and
those public Ips have no entries in my defined DNS Servers.<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>i am quite confused how this thing is actually working??<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Regards,<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>-Geni<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
<o:p></o:p></span></font></p>
</div>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 7/14/05, <b><span style='font-weight:bold'>Ken
Garland</span></b> <<a href="mailto:ken.garland@rotech.com"><U>ken.garland@rotech.com</U></a>>
wrote:</span></font></span> <o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>paste the relevant parts of your .conf file.<br>
<br>
mrgenius wrote:<br>
<br>
><br>
> Hi All!<br>
><br>
> I am using Syslog-ng with php-syslog-ng. to give names of my choices<br>
> to different hosts IP what i did was to define hostnames against each<br>
> IP of host in /etc/hosts file.<br>
><br>
> It was working fine with Public IP adresses.. But I have some hosts on <br>
> local network too with 192.168 IPs . The pRoblem i am now facing is<br>
> that its not storing logs with HOSTNAMES of private IPs. Where as its<br>
> working fine and giving names of Public IPs.<br>
><br>
> For example In My /etc/hosts file i have these 2 entries <br>
><br>
> <a href="http://202.164.1.1"><U>202.164.1.1</U></a> <<a
href="http://202.164.1.1"><U>http://202.164.1.1</U></a>>
broadband-router<br>
> <a href="http://192.168.77.1"><U>192.168.77.1</U></a> <<a
href="http://192.168.77.1"><U> http://192.168.77.1</U></a>>
primary-router<br>
><br>
> For 1st entry Logs in database will come with name broadband-router,<br>
> which is what i want<br>
> For 2nd Entry Logs in database will come with name <a
href="http://192.168.77.1"><U>192.168.77.1</U></a><br>
> <<a href="http://192.168.77.1"><U>http://192.168.77.1</U></a>>, which is
what i Don't want<br>
><br>
><br>
> Any body has any idea?? any thing to do in configuration of syslog-ng?? <br>
><br>
> Regards,<br>
><br>
> -Geni<br>
><br>
>------------------------------------------------------------------------<br>
><br>
>_______________________________________________<br>
>syslog-ng maillist - <a
href="mailto:syslog-ng@lists.balabit.hu"><U>syslog-ng@lists.balabit.hu</U></a><br>
><a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng"><U>https://lists.balabit.hu/mailman/listinfo/syslog-ng</U></a><br>
>Frequently asked questions at <a
href="http://www.campin.net/syslog-ng/faq.html"><U>http://www.campin.net/syslog-ng/faq.html</U></a><br>
><br>
><br>
><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>