[syslog-ng]Re: syslog-ng digest, Vol 1 #250 - 4 msgs

Balazs Scheidler bazsi@balabit.hu
Wed, 30 Aug 2000 12:41:07 +0200


> > > 1. Once my linux box receive a log, how can I redirect this log message to someone's
> > > mail(someone@somewhere.com)?
> > 
> > You could use the program() destination to send messages to a custom script,
> > which may send an email or anything you want to.
> > 
> Can you show me how to use the program() in syslog-ng.conf?
> And how does the program() pass the message to a custom script? using
> system environment?

destination script { program("/usr/local/lib/loganal.sh"); };

the script receives its lines on its standard input, line by line. the
script is executed once, and is restarted on SIGHUPs.

-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
     url: http://www.balabit.hu/pgpkey.txt