1

I need to setup centralized remote access logging of Auto Scaling Instances. Currently I have Rsyslog / Apache2 logging working just fine, but for the new project Nginx is used and I don't see any possibility to log directly over TCP/UDP. Rsyslog can be configured to send data remotely reading local file, but my goal is to avoid local writes at all.

Can someone share the knowledge on how to configure Nginx to send messages over Network instead of local FS? Or maybe I might need to configure log rotation to scp files?

2 Answers 2

3

Create a FIFO (pipe), tell nginx to log to that, and have your syslog daemon read the FIFO and send those messages to a remote location. Both rsyslog and syslog-ng can do this.

2
  • In this case, why not just let Nginx to log to default file and then use Rsyslog to read and send it remotely? What is the benefit of FIFO? Jun 26, 2012 at 11:24
  • 1
    Because you said you wanted to avoid local writes. A FIFO doesn't write to disk, it's just a small chunk of memory that buffers writes.
    – womble
    Jun 26, 2012 at 11:33
2

You can try the nginx_udplog_module. It looks like it hasn't been updated in a while, but it may still work.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .