Howdy, Would someone please shed some light on the correct way to get logs out of apache and into syslog-ng without causing the apache to crash? I'm currently using custom log and sending that via a pipe to logger. Howerver for some reason apache will just stop responding and stop handling requests. To fix this i just restart syslog-ng and it starts working. I posted earlier with my config and someone recommend that i send it all via udp to a central server cause this might be related to the pipe. I have since done this and i did not fix the problem. What i really need is a way to get the logs out of apache wihtout using logger? Thanks, Jason
Jason-- 1] man mkfifo 2] mkfifo /var/log/apache.pipe 3] chmod/chown /var/log/apache.pipe 4] setup httpd.conf to log to /var/log/apache.pipe 5] setup source in syslog-ng: source apache { pipe ("/var/log/apache.pipe"); } On Wed, 30 Mar 2005 21:55:28 -0600, Jason Stafford <jason@dpcomm.net> wrote:
Howdy,
Would someone please shed some light on the correct way to get logs out of apache and into syslog-ng without causing the apache to crash? I'm currently using custom log and sending that via a pipe to logger. Howerver for some reason apache will just stop responding and stop handling requests. To fix this i just restart syslog-ng and it starts working. I posted earlier with my config and someone recommend that i send it all via udp to a central server cause this might be related to the pipe. I have since done this and i did not fix the problem. What i really need is a way to get the logs out of apache wihtout using logger?
Thanks,
Jason
This method of getting the logs out of apache is much faster than using logger, while this was not the problem causing syslog to hang I really appreciate your reply. My system is running much faster now. Thanks, Jason ----- Original Message ----- From: "Dave Johnson" <davejjohnson@gmail.com> To: <syslog-ng@lists.balabit.hu> Sent: Wednesday, March 30, 2005 10:15 PM Subject: Re: [syslog-ng]Apache to syslog-ng
Jason-- 1] man mkfifo 2] mkfifo /var/log/apache.pipe 3] chmod/chown /var/log/apache.pipe 4] setup httpd.conf to log to /var/log/apache.pipe 5] setup source in syslog-ng: source apache { pipe ("/var/log/apache.pipe"); }
On Wed, 30 Mar 2005 21:55:28 -0600, Jason Stafford <jason@dpcomm.net> wrote:
Howdy,
Would someone please shed some light on the correct way to get logs out
of
apache and into syslog-ng without causing the apache to crash? I'm currently using custom log and sending that via a pipe to logger. Howerver for some reason apache will just stop responding and stop handling requests. To fix this i just restart syslog-ng and it starts working. I posted earlier with my config and someone recommend that i send it all via udp to a central server cause this might be related to the pipe. I have since done this and i did not fix the problem. What i really need is a way to get the logs out of apache wihtout using logger?
Thanks,
Jason
syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
On Wed, 2005-03-30 at 21:55 -0600, Jason Stafford wrote:
Howdy,
Would someone please shed some light on the correct way to get logs out of apache and into syslog-ng without causing the apache to crash? I'm currently using custom log and sending that via a pipe to logger. Howerver for some reason apache will just stop responding and stop handling requests. To fix this i just restart syslog-ng and it starts working. I posted earlier with my config and someone recommend that i send it all via udp to a central server cause this might be related to the pipe. I have since done this and i did not fix the problem. What i really need is a way to get the logs out of apache wihtout using logger?
Are you sure syslog-ng is not blocking for a reason? A common problem is that more than a single program reads /proc/kmsg which will block sometimes in this case. Try stracing the syslog-ng process when it does this and see which system call it is in. -- Bazsi
Thanks for the reply. It appears that this was the reason why syslog-ng was hanging. I got a hold of a startup script for syslong-ng that included a line to startup klogd and a config file that also had a line to source klogd, they didn't play well tongether at all. Since I made the recommended changes everything has been running great. Thanks, --Jason ----- Original Message ----- From: "Balazs Scheidler" <bazsi@balabit.hu> To: <syslog-ng@lists.balabit.hu> Sent: Thursday, March 31, 2005 4:37 AM Subject: Re: [syslog-ng]Apache to syslog-ng
On Wed, 2005-03-30 at 21:55 -0600, Jason Stafford wrote:
Howdy,
Would someone please shed some light on the correct way to get logs out of apache and into syslog-ng without causing the apache to crash? I'm currently using custom log and sending that via a pipe to logger. Howerver for some reason apache will just stop responding and stop handling requests. To fix this i just restart syslog-ng and it starts working. I posted earlier with my config and someone recommend that i send it all via udp to a central server cause this might be related to the pipe. I have since done this and i did not fix the problem. What i really need is a way to get the logs out of apache wihtout using logger?
Are you sure syslog-ng is not blocking for a reason? A common problem is that more than a single program reads /proc/kmsg which will block sometimes in this case.
Try stracing the syslog-ng process when it does this and see which system call it is in.
-- Bazsi
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
participants (3)
-
Balazs Scheidler
-
Dave Johnson
-
Jason Stafford