174
Administration
log { source(sysl); destination(d_console);};
2) To send only messages with level alert and received from local syslog clients
to all logged root user:
log { source(sysl); filter(f_alert); destination(d_userroot); };
3) To write all messages with levels info, notice, or warning and received from
syslog clients (local and remote) to /var/log/messages file:
log { source(sysl); source(s_udp); filter(f_messages);
destination(d_messages); };
4) To send e-mail if message received from local syslog client has the string
“kernel panic”:
log { source(sysl); filter(f_kpanic); destination(d_mail1); };
5) To send e-mail and pager if message received from local syslog client has
the string “root login”:
log { source(sysl); filter(f_root); destination(d_mail1); destination(d_pager);
};
6) To send messages with facility kernel and received from syslog clients (local
and remote) to remote syslogd:
log { source(sysl); source(s_udp); filter(f_kern); destination(d-udp1);
};
Syslog-ng configuration to use with Syslog
buffering feature
This configuration example uses the syslog buffering feature, and sends
messages to the remote syslogd (10.0.0.1).
VI Method
1. Configure /etc/portslave/pslave.conf file parameters.
In the pslave.conf file the parameters of the syslog buffering feature are configured as:
conf.DB_facility 1
all.syslog_buffering 100
File Description 5.11: portslave.conf necessary configuration