supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Carl Winbäck" <c@tunnel53.net>
To: supervision@list.skarnet.org
Subject: Logging in a web server context
Date: Sat, 13 Jun 2020 10:41:24 +0200	[thread overview]
Message-ID: <CACsCw1MhwhCcq=_VJn5N+On0=5B5oWFV6nK0FuvfUFSEKxGoJg@mail.gmail.com> (raw)

Hi folks!

Is it possible when using s6-svscan/s6-supervise to somehow arrange so
that a daemon’s stdout is sent to one logdir and stderr to another
logdir?

Or must I use s6-rc in order to achieve this?

My premises are the following:

I want to run nginx under s6, on a mainstream Linux distro such as
Debian/Ubuntu/CentOS. My plan is currently to use s6 only for nginx
and not any other daemons.

I want to collect the web server access logs in order to generate
visitor statistics[1].

One tricky aspect of logging that is specific to web servers is that
they emit two different categories of messages:

a) Errors and warnings

b) Info about page requests[2]

For many other kinds of daemons, one only needs to arrange for logging
stderr and then call it a day. With web servers it’s not quite so
simple.

I am very interested to hear from others on the list what your
thoughts are about this scenario.

The reason I’m weary about s6-rc is that I think it might not play so
well with the distros I mentioned earlier. If this concern is not
correct, please let me know.



[1] An alternative to collecting access logs could be to use Google
Analytics instead, but I want to avoid that since I don’t feel
comfortable about handing over my visitors’ personal data over to
Google.

[2] I.e. lines like this '10.131.214.101 - - [20/Nov/2017:18:52:17
+0000] "GET / HTTP/1.1" 401 188 "-" "Mozilla/5.0 (X11; Ubuntu; Linux
x86_64; rv:47.0) Gecko/20100101 Firefox/47.0"'

             reply	other threads:[~2020-06-13  8:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13  8:41 Carl Winbäck [this message]
2020-06-13 10:04 ` Casper Ti. Vector
2020-06-13 10:50   ` Carl Winbäck
2020-06-13 11:32     ` Casper Ti. Vector
2020-06-13 12:40       ` Carl Winbäck
2020-06-13 10:59 ` Jan Braun
2020-06-13 11:17   ` Carl Winbäck
2020-06-13 12:42   ` Laurent Bercot
2020-06-13 12:53     ` Laurent Bercot
2020-06-14 12:06       ` Carl Winbäck
2020-06-14 12:02     ` Carl Winbäck
     [not found] ` <20200613100522.jvixsd6fnokz3fh2@bstg>
2020-06-13 12:17   ` Carl Winbäck
2020-06-13 12:30     ` Carl Winbäck
2020-06-13 18:51 ` Steve Litt
2020-06-13 19:29   ` yianiris
2020-06-15  4:19 ` Colin Booth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACsCw1MhwhCcq=_VJn5N+On0=5B5oWFV6nK0FuvfUFSEKxGoJg@mail.gmail.com' \
    --to=c@tunnel53.net \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).