AlterPath ACS Command Reference Guide
185
Administration
Example 3 - Write all messages with levels info, notice or warning and
received from syslog clients (local and remote) to
/var/log/
messages file :
Insert
the lines below at the END of the file
syslog-ng.conf
file, keeping all lines
above commented.
Example 4 - Send e-mail if message received from local syslog client has the
string "kernel panic".
Insert the lines below at the END of the file
syslog-ng.conf
file,
keeping all lines above commented.
Example 5 - Send e-mail and pager if message received from local syslog client
has the string "root login".
Insert the lines below at the END of the file
syslog-ng.conf
file, keeping all lines above commented.
source sysl {unix-stream("/dev/log");};
source s_udp { udp(ip(<ip client>) port(<udp port>)); };
filter f_messages { level(info..warn);};
destination d_message { file("/var/log/messages"); };
log { source(sysl); source(s_udp); filter(f_messages); destination(d_messages);};
File Description 5.17: part of the /etc/syslog-ng/syslog-ng.conf file
source sysl {unix-stream("/dev/log");};
filter f_kpanic{facility(local1) and level(info) and match("ALARM") and match("kernel panic");};
destination d_mail1 {
pipe("/dev/cyc_alarm"
template("sendmail -t [email protected] -f [email protected] -s \"ALARM\" \\
-m \"$FULLDATE $HOST $MSG\" -h 10.0.0.2"));
};
log { source(sysl); filter(f_kpanic); destination(d_mail1); };
File Description 5.18: part of the /etc/syslog-ng/syslog-ng.conf file
source sysl {unix-stream("/dev/log");};
filter f_root {facility(local1) and level(info) and match("ALARM") and match("root login");};
destination d_mail1 {
pipe("/dev/cyc_alarm"
template("sendmail -t [email protected] -f [email protected] -s \"ALARM\" \\
-m \"$FULLDATE $HOST $MSG\" -h 10.0.0.2"));
};
destination d_pager {
pipe("/dev/cyc_alarm"
template("sendsms -d 123 -m \"$FULLDATE $HOST $MSG\" 10.0.0.1"));
};
log { source(sysl); filter(f_root); destination(d_mail1); destination(d_pager); };
File Description 5.19: part of the /etc/syslog-ng/syslog-ng.conf file
Summary of Contents for AlterPath ACS
Page 16: ...xvi Table of Contents...
Page 29: ...13 This page has been left intentionally blank...
Page 30: ...14 Preface...
Page 68: ...52 Device Access...
Page 86: ...70 Authentication Step 5 Saving changes To save the configuration run the command saveconf...
Page 96: ...80 Authentication Save the configuration to flash 2 cli config savetoflash...
Page 114: ...98 Authentication...
Page 204: ...188 Administration To exit the CLI mode and return to ACS s shell issue the command cli quit...
Page 268: ...252 Power Management with AlterPath PM Integration...
Page 304: ...288 PCMCIA Cards Integration...
Page 338: ...322 Profile Configuration...
Page 364: ...348 Additional Features and Applications...
Page 376: ...360 Appendix A New User Background Information...
Page 406: ...390 Appendix C Cabling and Hardware Information This page has been left intentionally blank...
Page 418: ...402 List of Tables...
Page 420: ...404 List of Figures...