[syslog-ng]destination { program(); } failures...
A.L.Lambert
max@xjack.org
Tue, 5 Jun 2001 11:06:13 -0500 (CDT)
> destination { program(/usr/bin/notify); };
>
> This works better, but only seems to work when it starts up, but not
> thereafter. /usr/bin/notify is a /bin/sh script.
>
> Does this just not work in v1.4.10?? It's getting rather frustrating.
>
> I'm running in Red Hat Linux 6.2 without all the bells and whistles
> (like X). I'd *REALLY* like to get this to work - it's one of the big
> draws to syslog-ng for me.
I would guess that the shell script should look like this:
--cut--
#!/bin/sh
while read line ; do
# stuff to do, presumably pager, or email or some such.
done
--cut--
Syslog-ng (IIRC), will open up a pipe to the script/program in
question, and feed it stuff on STDIN. I don't think it re-executes the
program with each message. I may be totally wrong, your mileage may vary,
etc. Cheers!
-- A.L.Lambert
------------------------------------------------------------------------
The problems that exist in the world today cannot be solved by the level
of thinking that created them...
-Einstein
------------------------------------------------------------------------