Group Selection Page HELP DOC Controls Group Data Analysis Group ITDM WP76 DET Vacuum XRO EEE WP78 WP74 FXE SCS SPB MID HED SQS SXP Sample Environment Photon Commissioning Team Operation PSPO XO TS
General electronics MicroTCA EEE Electronics Lab EEE Rack Room
  MicroTCA Logbook  Not logged in ELOG logo
Message ID: 90     Entry time: 28 Mar 2014, 09:02
Author: Frank Babies 
Type: Configuration 
Category: exflutcadev 
Subject: syslog-ng configuration changed 

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
 

ELOG V3.1.4-7c3fd00