From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] syslog-ng configs for separating warnings/errors and different types of traffic
Date: Mon, 23 Dec 2013 02:03:42 +0200 [thread overview]
Message-ID: <52B77DDE.5080506@gmail.com> (raw)
In-Reply-To: <52B748E7.5090007@libertytrek.org>
On 22/12/13 22:17, Tanstaafl wrote:
> Hi all,
>
> I'm very interested in what are best practices, and what others do as
> far as separating out different types of messages in their logs.
>
> I've always just sent everything to /var/log/messages, and this is not a
> very heavily loaded box so it hasn't been a big problem, but I'm working
> on a new server and would like to do some separation.
>
> I'd still like everything to go to /var/log/messages, but I'd like to
> also send certain types of messages to different logs to simplify
> troubleshooting, etc - ie, I often peruse the logs with:
>
> egrep '(reject|warning|error|fatal|panic):' /var/log/messages
>
> But I'd like to actually feed all of those messages to a separate log,
> for easier tailing.
syslog-ng comes with extensive documentation and a high-quality sysadmin
manual is available from Balabit's web site.
You need to start there as that spec above is highly bespoke. To do it,
you need to examine the content of the log body using a regex, the usual
way of filtering logs is by the header fields, not the body.
There is no "best practice" as such wrt logging, All that there is, is
whatever you consider you need to have.
--
Alan McKinnon
alan.mckinnon@gmail.com
next prev parent reply other threads:[~2013-12-23 0:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-22 20:17 [gentoo-user] syslog-ng configs for separating warnings/errors and different types of traffic Tanstaafl
2013-12-22 21:52 ` [gentoo-user] " James
2013-12-22 23:35 ` [gentoo-user] " Michael Orlitzky
2013-12-23 0:03 ` Alan McKinnon [this message]
2013-12-23 15:06 ` [gentoo-user] " James
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=52B77DDE.5080506@gmail.com \
--to=alan.mckinnon@gmail.com \
--cc=gentoo-user@lists.gentoo.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