Syslog-ng?

Rafał Radecki radecki.rafal at gmail.com
Tue Nov 27 13:39:38 UTC 2012


Why is logging to fifo a bad idea?

Best regards,
Rafal.

2012/11/27 Anton Yuzhaninov <citrin at citrin.ru>

> On 11/27/12 16:57, Rafał Radecki wrote:
>
>> I am currently deploying an evnironment with nginx webservers. I would
>> like to
>> store logs centrally with syslog-ng. I would like to make it as efficient
>> as it
>> can be, I've found two "howtos":
>> http://pastebin.com/PCYtve9s
>> http://grokbase.com/t/centos/**centos/113ryagfqe/remote-**
>> logging-nginx-or-other-non-**syslog-enabled-stuff<http://grokbase.com/t/centos/centos/113ryagfqe/remote-logging-nginx-or-other-non-syslog-enabled-stuff>(Ilyas's
>> responses)
>> which use fifos.
>>
>> What do you think about using fifos? Is it more efficient than logging
>> to/through a file? What about sockets? Are there any other alternatives?
>> What
>> are your experiences?
>>
>
> Writing logs from nginx to fifo is bad idea.
>
> If you need efficient logging on loaded server write log to file.
>
> 1. file can be rotated as often as need, and moved to dir accessible by
> rsync.
> 2. files from this dir can be rsync-ed to central server.
>
> If your need near-real time logs on central server (several minutes lag is
> not acceptable) try add something like this to syslog-nd config:
>
> source nginx_access { program("tail -F -n0 /var/log/nginx/access.log"); };
>
> But it will be less efficient and less reliable - some messages can be
> lost at syslog-ng restarts, central log server reboot e. t. c.
>
> --
>  Anton Yuzhaninov
>
> ______________________________**_________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/**mailman/listinfo/nginx<http://mailman.nginx.org/mailman/listinfo/nginx>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121127/f69fc016/attachment.html>


More information about the nginx mailing list