<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Yes, because 192.168.180.179 seems not to be a real address of your
server so syslog-ng cannot assign the requested address.<br>
Let's see an example:<br>
addresses of your server are the following (in this example your server
has two network cards):<br>
192.168.20.1 (eth0)<br>
10.30.20.1 (eth1)<br>
127.0.0.1 (loopback)<br>
<br>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">source
apache_access{tcp(ip("192.168.20.1") flags(no-parse));<o:p></o:p></span></p>
<span style="color: rgb(31, 73, 125);">};<br>
<br>
syslog-ng will listen only on eth0:192.168.20.1<br>
<br>
</span>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">source
apache_access{tcp(ip("10.30.20.1") flags(no-parse));<o:p></o:p></span></p>
<span style="color: rgb(31, 73, 125);">};<br>
</span><br>
syslog-ng will listen only on eth1:10.30.20.1<br>
<br>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">source
apache_access{tcp(flags(no-parse));<o:p></o:p></span></p>
<span style="color: rgb(31, 73, 125);">};<br>
</span><br>
syslog-ng will listen on all addresses of your server
(eth0:192.168.20.1, eth1:10.30.20.1, lo:127.0.0.1)<br>
<br>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">source
apache_access{tcp(ip("10.10.0.1") flags(no-parse));<o:p></o:p></span></p>
<span style="color: rgb(31, 73, 125);">};<br>
</span><br>
syslog-ng cannot listen on this address, because it's not an address of
the server, you will receive <span style="color: rgb(31, 73, 125);">"Cannot
assign requested address"</span> error message.<br>
<br>
If you have no specieal reasons to limit it, just don't give "ip()"
option because it is not required (as Patrick wrote)<br>
<br>
2010.07.19. 8:14 keltezéssel, Khaleelah Peerbocus írta:
<blockquote cite="mid:075401cb2709$b555d040$200170c0$@mu" type="cite">
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (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]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@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:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:#0050D0;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:#0050D0;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:#0050D0;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Still if
I wanted to configure a
different source on the syslog-server as below (I will
eventually use filtering if I do not succeed in creating another source)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">source
apache_access{tcp(ip("192.168.180.179") flags(no-parse));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">destination
d_apachemssql {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">pipe("/tmp/apachepipe.pipe"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">template("INSERT
INTO
logapache(datetime,host,program,pid,message)VALUES('$R_DATE','$HOST','$PROGRAM','$PID','$MSGONLY');\n")template-escape(yes)
flags(no-multi-line));<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">log {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">
source(apache_access);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">
destination(d_apachemssql);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">};<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">I get the
following error when
trying to start syslog-ng<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Error
binding socket;
addr='AF_INET(192.168.180.179:3331)', error='Cannot assign requested
address
(99)'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Error
initializing source
driver; source='apache_access', id='apache_access#0'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Error
initializing message
pipeline;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<div>
<div
style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">From:</span></b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif"; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:syslog-ng-bounces@lists.balabit.hu">syslog-ng-bounces@lists.balabit.hu</a>
[<a class="moz-txt-link-freetext" href="mailto:syslog-ng-bounces@lists.balabit.hu">mailto:syslog-ng-bounces@lists.balabit.hu</a>] <b>On Behalf Of </b>Patrick
H.<br>
<b>Sent:</b> Monday, July 19, 2010 9:48 AM<br>
<b>To:</b> Syslog-ng users' and develops' mailing list<br>
<b>Subject:</b> Re: [syslog-ng] configuring different sources on the
syslog-ng
server<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Helvetica","sans-serif";">Firstly
the
"ip()" option of "tcp()" in a "source()" is
not required, it is optional. It specifies the IP address which
syslog-ng will
listen on. If not provided, syslog-ng will listen on all interfaces.<br>
Seconly, you do not need a separate source for every client. You can
use filter
rules to match on the client's hostname if you need to.<br>
<br>
You might want to go through the administrator's guide, it is an
extremely good
documentation source with lots of examples. <a moz-do-not-send="true"
href="http://www.balabit.com/dl/guides/syslog-ng-ose-v3.1-guide-admin-en.pdf">http://www.balabit.com/dl/guides/syslog-ng-ose-v3.1-guide-admin-en.pdf</a><br>
</span><br>
Sent: Sunday, July 18, 2010 11:28:25 PM<br>
From: Khaleelah Peerbocus <a moz-do-not-send="true"
href="mailto:systems2@maccs.mu"><systems2@maccs.mu></a><br>
To: 'Syslog-ng users' and developers' mailing list' <a
moz-do-not-send="true" href="mailto:syslog-ng@lists.balabit.hu"><syslog-ng@lists.balabit.hu></a>
<br>
Subject: [syslog-ng] configuring different sources on the syslog-ng
server <o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">Hello</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">I would like to get some
clarification on the
source tag in both syslog client and server.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">I have different clients hosting
apache /
weblogic</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">My Syslog-ng Server has ip
192.x.x.x</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">Apache (client) has ip 192.x.x.1</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">Weblogic (client) has ip
192.x.x.2</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">In all the clients syslog
configuration files,
i have added </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">destination apacheaccesslog {</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">tcp("192.x.x.x " port(3331));</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">};</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">destination weblogiclog {</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">tcp("192.x.x.x " port(3332));</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">};</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">My issue is in the syslog-ng
server configuration
file, if i add </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">source apache_access
{tcp(ip(192.x.x.x)
port(3331));</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">};</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR">Should the ip be the server ip
or the client
ip (in this example, i have put the syslog-ng server ip). Does the port
number
differentiate the different sources we are receiving the log files ???</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"> </span><o:p></o:p></p>
<p class="MsoNormal"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600"
o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f"
stroked="f">
<v:stroke joinstyle="miter" />
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0" />
<v:f eqn="sum @0 1 0" />
<v:f eqn="sum 0 0 @1" />
<v:f eqn="prod @2 1 2" />
<v:f eqn="prod @3 21600 pixelWidth" />
<v:f eqn="prod @3 21600 pixelHeight" />
<v:f eqn="sum @0 0 1" />
<v:f eqn="prod @6 1 2" />
<v:f eqn="prod @7 21600 pixelWidth" />
<v:f eqn="sum @8 21600 0" />
<v:f eqn="prod @7 21600 pixelHeight" />
<v:f eqn="sum @10 21600 0" />
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
<o:lock v:ext="edit" aspectratio="t" />
</v:shapetype><v:shape id="_x0000_s1026" type="#_x0000_t75" alt="logo-emailsignature.jpg"
style='position:absolute;margin-left:0;margin-top:0;width:60pt;height:75.75pt;
z-index:251658240;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;
mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;
mso-position-horizontal:left;mso-position-horizontal-relative:text;
mso-position-vertical-relative:line' o:allowoverlap="f">
<v:imagedata src="imap://pzolee@212.92.18.33:993/fetch%3EUID%3E.listak.syslog-ng%3E8839?header=quotebody&part=1.1.2&filename=image001.jpg" o:title="part1.08020703.05070607@feystorm" />
<w:wrap type="square"/>
</v:shape><![endif]--><!--[if !vml]--><img
src="cid:part1.06090203.07000109@balabit.hu"
alt="logo-emailsignature.jpg" v:shapes="_x0000_s1026" width="80"
align="left" height="101" hspace="12"><!--[endif]--><span
style="font-size: 9pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);">Khaleelah
Peerbocus
– Systems Analyst</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 8pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);">Mauritius
Cargo Community Services</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 7pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);">Business
Registration No.: C08077158</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 7pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);">VAT
Registration No.: VAT20427044</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 7pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);">1<sup>st</sup>
Floor, Trade and Marketing Centre, Mer Rouge</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 7pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);"
lang="FR">Port-Louis, Mauritius</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 7pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);"
lang="FR">Tel: +230 206 2970 - Cell: +230 498 7897 Fax: +230 216 8858</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 7pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);">Email:
</span><span style="color: rgb(31, 73, 125);"><a
moz-do-not-send="true" href="mailto:HDagent6@maccs.mu"><span
style="font-size: 7pt; font-family: "Verdana","sans-serif";">systems2@maccs.mu</span></a></span><span
style="font-size: 7pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);">
-
Website: </span><span style="color: rgb(31, 73, 125);"><a
moz-do-not-send="true" href="http://www.maccs.mu/"><span
style="font-size: 7pt; font-family: "Verdana","sans-serif";">http://www.maccs.mu</span></a></span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 7pt; font-family: "Verdana","sans-serif"; color: rgb(31, 73, 125);"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="FR"> </span><o:p></o:p></p>
<pre><o:p> </o:p></pre>
<pre style="text-align: center;">
<hr width="90%" align="center" size="4">
</pre>
<pre><o:p> </o:p></pre>
<pre>______________________________________________________________________________<o:p></o:p></pre>
<pre>Member info: <a moz-do-not-send="true"
href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><o:p></o:p></pre>
<pre>Documentation: <a moz-do-not-send="true"
href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a><o:p></o:p></pre>
<pre>FAQ: <a moz-do-not-send="true"
href="http://www.campin.net/syslog-ng/faq.html">http://www.campin.net/syslog-ng/faq.html</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> <o:p></o:p></pre>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
______________________________________________________________________________
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>
<div class="moz-signature">-- <br>
pzolee</div>
</body>
</html>