<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:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.E-MailFormatvorlage19
        {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:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D">Are you starting the foreground syslog-ng with the syslog user or maybe as root? Maybe it’s just a little permission problem.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu]
<b>Im Auftrag von </b>Hardcastle, Iain (CBC - Hamilton)<br>
<b>Gesendet:</b> Montag, 17. März 2014 15:24<br>
<b>An:</b> syslog-ng@lists.balabit.hu<br>
<b>Betreff:</b> [syslog-ng] Background/foreground problem<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Odd one I’ve come across, cant find any clues on the web so figured I’d post here.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Trying to get syslog-ng integrated into the Observium NMS package. Not sure whether the problem lies with syslog-ng, PHP or the sucking of data into Observium. Let me explain:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With syslog-ng started in foreground mode ‘syslog-ng -Fevd’ everything works as expected. I see syslog packets coming in via tcpdump, I see the log flash up on the terminal and it correctly routes into the right part of the Observium front
end. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With syslog-ng started as a daemon (from boot - the desired config setup - or with ‘service syslog-ng start’), nothing gets to Observium. I can still see the syslog packets in tcpdump obviously but I’m blind as to what happens to the messages
after that.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">One thing I have noticed is that when running syslog-ng in foreground mode, I see “Starting destination program; cmdline='/opt/observium/syslog.php'” in the startup messages and a corresponding process in the ‘ps –lax’ output “php /opt/observium/syslog.php”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With syslog-ng started as a daemon, I do not see this php process in the ps output..<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Bit stuck as to where to look next. Has anyone seen this behavior before?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Centos6.5 and standard packages and configs. System works great otherwise. Syslog-ng config file in its entirety below:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:solid windowtext 1.0pt;padding:1.0pt 4.0pt 1.0pt 4.0pt">
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New"">options {
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> chain_hostnames(0);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> flush_lines (0);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> time_reopen (10);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> log_fifo_size (1000);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> long_hostnames (off);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> use_dns (no);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> use_fqdn (no);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> create_dirs (no);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> keep_hostname (1);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New"">source s_net {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> udp();<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New"">destination d_observium {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> program("/opt/observium/syslog.php" template ("$HOST||$FACILITY||$PRIORITY||$LEVEL||$TAG||$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC||$MS<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New"">G||$PROGRAM\n") template-escape(yes));<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New"">};<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New"">log {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> source(s_net);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New""> destination(d_observium);<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:8.0pt;font-family:"Courier New"">};<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any ideas?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">iain<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New""> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:5.0pt;line-height:12.0pt"><i><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:EN-US">Deloitte refers to one or more of Deloitte Touche Tohmatsu Limited, a UK
private company limited by guarantee, and its network of member firms, each of which is a legally separate and independent entity. Please see </span></i><i><span lang="EN-US" style="color:black;mso-fareast-language:EN-US"><a href="http://www.deloitte.com/about"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:blue;text-decoration:none">www.deloitte.com/about</span></a></span></i><i><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:black;mso-fareast-language:EN-US">
for a detailed description of the legal structure of Deloitte Touche Tohmatsu Limited and its member firms.</span></i><i><span lang="EN-US" style="color:black;mso-fareast-language:EN-US"><o:p></o:p></span></i></p>
</div>
</div>
</div>
</body>
</html>