Hi list,

it may sound odd to some, but I had the idea (and from that idea a
deep wish embarked) to redirect all logs that arrive
in /var/log/messages to a local fdo-compliant notification daemon. As
rsyslog can be configured to filter the messages, one could even limit
the stuff that is sent to the users desktop, but I opted for all for
now.
Well, easier said than done apparently, as the basic idea is simple,
but how I want it seems hard (right next to impossible without coding
something in C or something). I save me the humiliation to post what I
tried until now in greater detail, but basically what I want is
something like this...

(oh and I am on Debian GNU/Linux and rsyslogd is configured to log to a
named pipe in the example)

<code>
#!/bin/bash
cat /tmp/rsyslog.pipe | while read foo
do
notify-send "Topic" "${foo}"
done
</code>

BUT (and that is the important part) it should not print one line per
notification message but rather in bursts, like the messages from the
last few seconds in ONE notification. The overal design idea is
something like this:

1.) wait until something is logged, if nothing is logged, do
nothing

2.) if something is logged, collect the data for N seconds in a buffer,

                                -- or --

    if something is logged, collect in a buffer, when logging stops for
    $TIME

                               -- then --

    send that buffer via notify-send...

3.) go to 1.)


So, am I the only one who would find something like that really fancy?
As most folks I did ask about that issue did raise an eyebrow and
responded rather disapprovingly. Anyhow, does anyone here have an idea
to realize what I want? Any suggestions?

regards
Michael
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to