[syslog-ng] Mail Alert
John Duraisw
john.duraiswamy at gmail.com
Tue Mar 11 15:28:13 CET 2008
Hello,
I am doing the following intercept stuff, and everything seems to be working
fine. What I want to do is, in the subject line I want to parse the
hostname. Could you guys help me with this.
Thanks,
-john
destination mail-alert { program("/usr/local/bin/syslog-mail.sh"); };
filter f_config_alert {
(
(
host("host1") or
host("host2") or
host("host3") or
host("host4")
) and
match("Configured from console")
);
};
# Send alert when some Genius configure something
log {
source(s_net);
source(s_system);
filter(f_config_alert);
destination(mail-alert);
};
[root at central-logger ~]# more /usr/local/bin/syslog-mail.sh
#!/bin/sh
RECIPIENTS"john at abc.com"
while read line; do
echo $line | /bin/mail -s "Config Change notification for $1"
$RECIPIENTS
done
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/syslog-ng/attachments/20080311/cb428d5b/attachment.htm
More information about the syslog-ng
mailing list