comment in: udp();
put in the follow Lines:
destination d_email_notification { program("/usr/local/bin/logalarm-mail.sh"); };
filter f_exflutca_1 { match("Failed"); };
filter f_exflutca_2 { match("failed"); };
filter f_exflutca_3 { match("ERROR"); };
filter f_exflutca_4 { match("Error"); };
filter f_exflutca_5 { match("error"); };
log { source(s_all); filter(f_exflutca_1); destination(d_email_notification); };
log { source(s_all); filter(f_exflutca_2); destination(d_email_notification); };
log { source(s_all); filter(f_exflutca_3); destination(d_email_notification); };
log { source(s_all); filter(f_exflutca_4); destination(d_email_notification); };
log { source(s_all); filter(f_exflutca_5); destination(d_email_notification); };
cat of logalarm-mail.sh shows:
#!/bin/bash
subject="SYSLOG ALARM from exflutcadev"
email="frank.babies@xfel.eu"
while read event;
do
echo ${event} | mail -s "${subject}" ${email}
done
|