News for hackers. Stuff that matters.
Re:NGINX syslog-ing without breaking the bank or patching th... by bashtoni on Tuesday November 26, 2013 @02:52PM (#6803700)
Nice work!

We write the logs to disk and then use rsyslogs imfile feature to read from there. Your approach has the advantage of not requiring disk writes.

BTW, we're not in Toronto, but we're hiring and happy to accept remote workers from that timezone :)

http://www.bashton.com/jobs/

Re:NGINX syslog-ing without breaking the bank or patching th... by blibble on Tuesday November 26, 2013 @03:01PM (#6803771)
put your logs in /dev/shm

oh and don't remember to rotate them!

Re:NGINX syslog-ing without breaking the bank or patching th... by otterley on Tuesday November 26, 2013 @03:05PM (#6803801)
If you need guaranteed log delivery, I wouldn't do that. Unread logs won't survive a power failure or system crash.
Re:NGINX syslog-ing without breaking the bank or patching th... by res0nat0r on Tuesday November 26, 2013 @03:41PM (#6804053)
Aren't you also not ensuring delivery when using remote syslogging in default mode? I believe this is all logged via UDP, so if the network or syslog host is overloaded your syslog messages will be silently dropped.
Re:NGINX syslog-ing without breaking the bank or patching th... by otterley on Tuesday November 26, 2013 @04:34PM (#6804399)
In default mode, sure. But modern syslog daemons also support TCP transports. And both rsyslog and syslog-ng have commercial versions that buffer logs to disk (though double-buffering isn't necessary here where the source is a log file already on disk).
Re:NGINX syslog-ing without breaking the bank or patching th... by bashtoni on Tuesday November 26, 2013 @04:27PM (#6804349)
That's correct. rsyslog also supports TCP though.
Re:NGINX syslog-ing without breaking the bank or patching th... by teraflop on Tuesday November 26, 2013 @08:10PM (#6805529)
Writing to /var/log doesn't get you guaranteed delivery either, unless you're calling fsync() after every write.