[syslog-ng] loop caused by syslog-ng filter

Luigi Augello luigi.augello at unipa.it
Sat Jul 5 18:14:50 CEST 2008


Hi Joe
I understand what you say, but it is sometimes that in not usesyslog-ng:
what I would know where and how I should use this script, maybe astemplate 
into syslog-ng.conf? And if is true how I should use? 
sorry for this banal question 
tanks in advance
Luigi

Fegan, Joe ha scritto:
Use this template for your script. Modify it to send email $MSG to you, 
instead of sending it to /tmp/schrott. That should solve your problem.

#!/bin/bash
while
read MSG
do
# Process the message $MSG. Do whatever you like with it.
# Email it to someone. Whatever. Here we put it in a file.

echo $MSG >> /tmp/schrott

# We're finished with this message, wait for the next one.
done
# Read returned eof. This means "no more messages". Exit.
exit 0




More information about the syslog-ng mailing list