Live data from Hacker News

Nginx 1.7.1 adds syslog support

nginx.org

21–30 of 45 posts

Re: Nginx 1.7.1 adds syslog support

#21
post #4

Why is logging to syslog as opposed to a separate file an important use case? Genuinely curious.

I think one reason people wanted it was to reduce/eliminate disk IO.

Yeah, and then you can also optimise the logging server's secondary storage setup for mostly appending writes. Or so I hear.

Re: Nginx 1.7.1 adds syslog support

#23
post #12

Any systemd experts know if there would there be any benefit to supporting journald directly, rather than through the syslog API, on Linux hosts?

Have a look at this[0] blogpost. Also, I'm just guessing, once kdbus is in the kernel using direct calls to journald will (or could potentially) be more efficient.

[0] http://0pointer.de/blog/projects/journal-submit.html

Re: Nginx 1.7.1 adds syslog support

#24
post #16

What does Nginx do if the log message is longer than the 1KB limit imposed by the syslog protocol?

That's an implementation defined limit in practice. rsyslog for example defaults to 2K (apparently to be compatible with upcoming RFCs), but it's configurable to higher values. If you want to be compatible with other software though, it may need to stay at 1K.

Re: Nginx 1.7.1 adds syslog support

#25
post #7
post #4

Why is logging to syslog as opposed to a separate file an important use case? Genuinely curious.

It's useful if you want to log to a centralized logging server. This helps to have all your logs in one place and also keeps the logs safe, if someone breaks into your server.

That's a pretty weak argument considering that syslog is entirely UDP and is bound to drop log data, sometimes en masse, most likely even silently. Not a good idea.

Why not use something like multilog or svlogd and wire up a tiny processor for it to kick logging data over someplace using something like rsync?

To boot, syslog is annoying to tune, depending on your particular implementation. rsyslog has a default buffer limit of 2k, whereas other syslog implementations (IIRC, syslog-ng and Solaris syslog at the very least) have default buffer limits of 1k, and this might not be obvious until you're running up against that and make the shocking discovery that you're losing data.

On an nginx server that services 2TB/mo worth of transit (which is distinctly possible since I've got infrastructure in production that does this), there's a good chance that you'll be stretching some of these limits a bit.

Re: Nginx 1.7.1 adds syslog support

#26
post #7
post #4

Why is logging to syslog as opposed to a separate file an important use case? Genuinely curious.

It's useful if you want to log to a centralized logging server. This helps to have all your logs in one place and also keeps the logs safe, if someone breaks into your server.

Also allows you to correlate them with backend services, Web App Firewalls etc to see if there is an current attacks or threats.

Re: Nginx 1.7.1 adds syslog support

#27
post #25
post #7

Earlier quoted context omitted.

It's useful if you want to log to a centralized logging server. This helps to have all your logs in one place and also keeps the logs safe, if someone breaks into your server.

That's a pretty weak argument considering that syslog is entirely UDP and is bound to drop log data, sometimes en masse, most likely even silently. Not a good idea. Why not use something like multilog or svlogd and wire up a tiny processor for it to kick logging data over someplace using something like rsync? To boot, syslog is annoying to tune, depending on your particular implementation. rsyslog has a default buffe…

Just FYI rsyslog (available in RHEL/CentOS 6.x) has tcp support.

Re: Nginx 1.7.1 adds syslog support

#29
post #4

Why is logging to syslog as opposed to a separate file an important use case? Genuinely curious.

The use case is people with:

- A large enough deployment to want centralized logging

but are:

- Cheap enough not to buy nginx (for good reason or not)

and

- Too lazy to maintain a patcheset against distro packages

and

- Too bad at linux administration to use the file pipe trick to log to syslog anyway

So, yeah syslog is nice but this change does have quite a narrow use case. What it did have were vocal complainers that knew the right places to complain online to be noticed.

Post reply on HN