supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Vincent Danen <vdanen@linsec.ca>
Subject: Re: monitoring svlogd-produced logfiles
Date: Wed, 14 Jun 2006 18:10:05 -0600	[thread overview]
Message-ID: <20060615001005.GR898@annvix.org> (raw)
In-Reply-To: <20060614235909.GA20474@home.power>

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

* Alex Efros <powerman@powerman.asdfGroup.com> [2006-06-15 02:59:09 +0300]:

> There a lot of ways to do what you need and I think you overcomplicate.

Very possible... =)

> If you don't need svlogd writing to disc and wish to redirect it output
> to some 'summarize' program, then why not use that program instead of
> svlogd in ./log/run? Main svlogd task is reliable _writing_to_disc_!

No, I do need svlogd to write to disk.  Well, maybe not.  I'm using
socklog for my logging so, for instance, I have /var/log/system/all
which has a config of "*.*".  I can duplicate that to something else,
but svlogd is handling all of the logging from socklog.  So I do need
svlogd to do it's thing (unless I setup another socklog service to read
/dev/log... can I have two socklog processes doing that?)

> But you can configure svlogd to duplicate your logs (optionally filtered)
> to STDERR (in addition to writing to disc). In degenerate case you even
> can configure svlogd to write nothing to disc and send all log lines to
> STDERR, but I don't understand why you need svlogd in this case. :)

No, I need svlogd to write the logs to disk.  In addition to the on-disk
logs, I want something to process those logs in realtime... to make a
summary log and something that I can have sitting open writing matched
entries to STDOUT so I can view it over ssh on my desktop... in
realtime.

> Then, in ./log/run you redirect svlogd's STDERR to some FIFO file:
>     svlogd /var/log/something 2>/var/log/MYFIFO
> (you can configure a lot of different svlogd to output into single FIFO)
> and setup special service which will fetch data from /var/log/MYFIFO,
> summarize it, print colored to /dev/tty12 or everything - ./run example:
>     exec my_cool_summarizer <>/var/log/MYFIFO

What does <> do?  I've never seen that notation before.

> Only one important note about FIFOs - if your 'my_cool_summarizer'
> service will be down and will not read from /var/log/MYFIFO all other
> svlogd which write into FIFO will also stop soon (after they fill kernel
> buffers) and in turn will stop services which they logging.

Right... if there's nothing to empty the buffer, it'll block svlogd.
That's fine... I can make sure, via dependency handling, that the
summarizing service is started first.

Some ideas... =)

BTW, I think I sent the response on the "tail -F" thing to you and not
the list... to summ, I did try "-n 0 -F" and it didn't follow.  Could be
a swatch thing tho... I'll have to try it again and see if it still
doesn't work.  If it doesn't, I still need to find an alternative to it,
so any suggestions are welcome.

-- 
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}
mysql> SELECT * FROM users WHERE clue > 0;
Empty set (0.00sec)
:: Annvix - Secure Linux Server: http://annvix.org/ ::

[-- Attachment #2: Type: application/pgp-signature, Size: 186 bytes --]

  reply	other threads:[~2006-06-15  0:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-14 23:35 Vincent Danen
2006-06-14 23:40 ` Alex Efros
2006-06-16 11:03   ` George Georgalis
2006-06-16 11:08     ` Alex Efros
2006-06-16 13:18       ` George Georgalis
2006-06-16 19:08         ` Vincent Danen
2006-06-18  2:48           ` George Georgalis
2006-06-18  2:57             ` Alex Efros
2006-06-14 23:59 ` Alex Efros
2006-06-15  0:10   ` Vincent Danen [this message]
2006-06-15  0:25     ` Alex Efros
2006-06-15  3:32       ` Vincent Danen
2006-06-15 16:32         ` Vincent Danen

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=20060615001005.GR898@annvix.org \
    --to=vdanen@linsec.ca \
    /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).