supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* What extra logging utilities are needed with s6?
@ 2021-01-20  6:56 Kian Kasad
  2021-01-20  8:21 ` Crest
  0 siblings, 1 reply; 3+ messages in thread
From: Kian Kasad @ 2021-01-20  6:56 UTC (permalink / raw)
  To: supervision

[-- Attachment #1: Type: text/plain, Size: 543 bytes --]

Hi all,

I apologize if this is a "dumb" or seemingly obvious question. Logging
and monitoring are definitely my weak points when it comes to
Linux/UNIX.

In terms of logging, what exactly does s6 handle and what do I need to
handle using external programs?
I know s6 (at least how Artix Linux has it set up) will create a
directory under /var/log for each service that emits log output. Because
of this, do I need a syslog daemon like syslog-ng? And do I need a
logrotate program or does s6 handle that?

--
Kian Kasad
PGP 0x1715EEAA14DAEC14

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What extra logging utilities are needed with s6?
  2021-01-20  6:56 What extra logging utilities are needed with s6? Kian Kasad
@ 2021-01-20  8:21 ` Crest
  2021-01-20  9:15   ` Laurent Bercot
  0 siblings, 1 reply; 3+ messages in thread
From: Crest @ 2021-01-20  8:21 UTC (permalink / raw)
  To: supervision

On 20.01.21 07:56, Kian Kasad wrote:
> Hi all,
>
> I apologize if this is a "dumb" or seemingly obvious question. Logging
> and monitoring are definitely my weak points when it comes to
> Linux/UNIX.
>
> In terms of logging, what exactly does s6 handle and what do I need to
> handle using external programs?
> I know s6 (at least how Artix Linux has it set up) will create a
> directory under /var/log for each service that emits log output. Because
> of this, do I need a syslog daemon like syslog-ng?
If all your services support logging to stdout/stderr you can get away 
without a syslog service. Instead of a single logging service consuming 
logs from all other services s6 is designed to connect each long running 
service with its own tiny dedicated logging service.
> And do I need a logrotate program or does s6 handle that?
You don't need and external log rotation program. The s6-log utility 
includes support for log rotation and post processing and log rotation 
is enabled by default.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What extra logging utilities are needed with s6?
  2021-01-20  8:21 ` Crest
@ 2021-01-20  9:15   ` Laurent Bercot
  0 siblings, 0 replies; 3+ messages in thread
From: Laurent Bercot @ 2021-01-20  9:15 UTC (permalink / raw)
  To: supervision

>If all your services support logging to stdout/stderr you can get away without a syslog service. Instead of a single logging service consuming logs from all other services s6 is designed to connect each long running service with its own tiny dedicated logging service.

  To add to this: it is likely that you *still* need a kind of syslogd,
because chances are that not all daemons on your systems have been
patched/configured/... to write to stderr instead of using syslog().
So, just in case, you should probably have a syslogd running, to
catch everything that still uses syslog() - and potentially help you
reconfigure the relevant daemons to use stderr instead. When there
is nothing left in your syslogd output, you can remove the syslogd
service.

  The stock syslogd from your distribution will do just fine.

  Optional, advanced stuff if you'd rather use something more
s6-idiomatic than your stock syslogd: download socklog.
  http://smarden.org/socklog/

  socklog's documentation says it was made to work with runit, but it
will work with s6 as well. What it does is listen to the /dev/log
socket, convert the syslog priority to text, and just send the log
message to its stdout. So you can process that output via s6-log just
like you would with any other service running under s6, and have it
stored and automatically rotated just like any other service, without
the need for logrotate.

--
  Laurent


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-20  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20  6:56 What extra logging utilities are needed with s6? Kian Kasad
2021-01-20  8:21 ` Crest
2021-01-20  9:15   ` Laurent Bercot

supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/supervision

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 supervision supervision/ http://inbox.vuxu.org/supervision \
		subscribe@list.skarnet.org
	public-inbox-index supervision

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.supervision.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git