Service manual

173Appendix G Generating Alarm and Syslog
Cyclades-TS Installation & Service Manual
The syslog-ng.conf file need these lines:
# local syslog clients
source src { unix-stream(/dev/log); };
# To filter ALARM message with the string kernel panic:
filter f_kpanic { facility(local2) and level(info) and match(ALARM) and match(kernel panic); };
# To filter ALARM message with the string root login:
filter f_root { facility(local1) and level(info) and match(ALARM) and match(root login); };
# To send e-mail to z@none.com (SMTPs IP address 10.0.0.2)
# from the e-mail address a@none.com with subject TSxK-ALARM.
# The message will carry the current date, the hostname
# of this TS and the message that was received from the source.
destination d_mail1 {
pipe(/dev/cyc_alarm
template(sendmail -t z@none.com -f a@none.com -s \TSxK-ALARM\ \ -m \$FULLDATE $HOST
$MSG\ -h 10.0.0.2"));
};
# Example to send a pager to phone number 123 (Pager server at 10.0.0.1) with message
# carrying the current date, the hostname of this TS and the message that was received from the source:
destination d_pager {
pipe(/dev/cyc_alarm
template(sendsms -d 123 -m \$FULLDATE $HOST $MSG\ 10.0.0.1"););