]> git.pld-linux.org Git - packages/syslog-ng.git/blobdiff - syslog-ng.conf
- syntax errors
[packages/syslog-ng.git] / syslog-ng.conf
index e479319ef45bdf4db524587bbfdab72da47ef577..0a5130c82d16e6686f89542151632c0971a5cf6e 100644 (file)
@@ -1,72 +1,80 @@
 #
-# Syslog-ng example configuration for PLD Linux
+# Syslog-ng configuration for PLD Linux
 #
-# Copyright (c) 1999 anonymous
-# Copyright (c) 1999 Balazs Scheidler
-# $Id$
-#
-# Syslog-ng configuration file, compatible with default PLD syslogd
-# installation. 
+# See syslog-ng(8) and syslog-ng.conf(5) for more information.
 #
 
-options { long_hostnames(off); sync(0); };
+options {
+       long_hostnames(off);
+       sync(0);
+       owner(root);
+       group(logs);
+       perm(0640);
+};
 
-source src { pipe("/proc/kmsg"); unix-stream("/dev/log"); internal(); };
+source s_sys   {
+       pipe ("/proc/kmsg" log_prefix("kernel: "));
+       unix-stream("/dev/log" max_connections(1000));
+       internal();
+};
 
-# uncomment below line if you want setup syslog server
-#source net    { udp(); };
+# uncomment the line below if you want to setup syslog server
+#source s_net  { udp(); };
 
-#destination loghost   { udp("loghost" port(999)); };
+#destination loghost   { udp("loghost" port(514)); };
 
 destination kern       { file("/var/log/kernel"); };
 destination messages   { file("/var/log/messages"); };
 destination authlog    { file("/var/log/secure"); };
 destination mail       { file("/var/log/maillog"); };
 destination uucp       { file("/var/log/spooler"); };
-
 destination debug      { file("/var/log/debug"); };
+destination cron       { file("/var/log/cron" owner(root) group(crontab) perm(0660)); };
+destination syslog     { file("/var/log/syslog"); };
+destination daemon     { file("/var/log/daemon"); };
+destination lpr                { file("/var/log/lpr"); };
+destination user       { file("/var/log/user"); };
+destination ppp                { file("/var/log/ppp"); };
+destination ftp                { file("/var/log/xferlog"); };
+destination audit      { file("/var/log/audit"); };
+destination postgres   { file("/var/log/pgsql"); };
+destination freshclam  { file("/var/log/freshclam.log"); };
+
+# Log iptables messages to separate file
+destination iptables   { file("/var/log/iptables"); };
+
 destination console    { usertty("root"); };
 #destination console_all       { file("/dev/tty12"); };
 
 destination xconsole   { pipe("/dev/xconsole"); };
 
-destination mailinfo   { file("/var/log/mail/info"); };
-destination mailwarn   { file("/var/log/mail/warn"); };
-destination mailerr    { file("/var/log/mail/err"); };
-
 destination newscrit   { file("/var/log/news/news.crit" owner(news) group(news)); };
 destination newserr    { file("/var/log/news/news.err" owner(news) group(news)); };
 destination newsnotice { file("/var/log/news/news.notice" owner(news) group(news)); };
 
-destination cron       { file("/var/log/cron"); };
-destination syslog     { file("/var/log/syslog"); };
-destination daemon     { file("/var/log/daemon"); };
-destination lpr                { file("/var/log/lpr"); };
-destination user       { file("/var/log/user"); };
-destination ppp                { file("/var/log/ppp"); };
-
-# Log iptables messages to separate file
-destination iptables   { file("/var/log/iptables"); };
-filter f_syslog                { not facility(authpriv, mail, news)
-                       and not match("IN=[A-Za-z0-9]* OUT=[A-Za-z0-9]*")
-                       and not match("cron") ; };
-filter f_iptables      { facility(kern) and match("IN=[A-Za-z0-9]* OUT=[A-Za-z0-9]*"); };
-filter f_kern          { facility(kern)
-                       and not match("IN=[A-Za-z0-9]* OUT=[A-Za-z0-9]*") ; };
-
-filter f_auth          { facility(auth); };
-filter f_authpriv      { facility(auth, authpriv)
-                       and not match("cron"); };
-filter f_cron          { facility(cron) or match("cron"); };
+# Filters for standard syslog(3) facilities
+#filter f_audit                { facility(audit); };
+filter f_authpriv      { facility(authpriv, auth); };
+filter f_cron          { facility(cron); };
 filter f_daemon                { facility(daemon); };
+filter f_ftp           { facility(ftp); };
+filter f_kern          { facility(kern); };
 filter f_lpr           { facility(lpr); };
 filter f_mail          { facility(mail); };
-filter f_user          { facility(user); };
-filter f_uucp          { facility(cron); };
-filter f_ppp           { facility(daemon) and program(pppd) or program(chat); };
 filter f_news          { facility(news); };
-filter f_messages      { level(info..warn) 
-                       and not facility(auth, authpriv, mail, news, daemon); };
+filter f_syslog                { facility(syslog); };
+filter f_user          { facility(user); };
+filter f_uucp          { facility(uucp); };
+filter f_local0                { facility(local0); };
+filter f_local1                { facility(local1); };
+filter f_local2                { facility(local2); };
+filter f_local3                { facility(local3); };
+filter f_local4                { facility(local4); };
+filter f_local5                { facility(local5); };
+filter f_local6                { facility(local6); };
+filter f_local7                { facility(local7); };
+
+# Filters for standard syslog(3) priorities
 filter p_debug         { level(debug); };
 filter p_info          { level(info); };
 filter p_notice                { level(notice); };
@@ -76,33 +84,43 @@ filter p_alert              { level(alert); };
 filter p_crit          { level(crit); };
 filter p_emergency     { level(emerg); };
 
-
-log { source(src); filter(f_kern);     destination(kern); };
-
-log { source(src); filter(f_authpriv); destination(authlog); };
-log { source(src); filter(f_syslog);   destination(syslog); };
-log { source(src); filter(f_cron);     destination(cron); };
-log { source(src); filter(f_daemon);   destination(daemon); };
-log { source(src); filter(f_lpr);      destination(lpr); };
-log { source(src); filter(f_user);     destination(user); };
-log { source(src); filter(f_uucp);     destination(uucp); };
-log { source(src); filter(f_messages); destination(messages); };
-log { source(src); filter(f_ppp);      destination(ppp); };
-log { source(src); filter(p_debug);    destination(debug); };
-log { source(src); filter(p_emergency);        destination(console); };
-# log { source(src); destination(console_all); };
-
-log { source(src); filter(f_mail);                     destination(mail); };
-#log { source(src); filter(f_mail); filter(p_info);    destination(mailinfo); };
-#log { source(src); filter(f_mail); filter(p_warn);    destination(mailwarn); };
-#log { source(src); filter(f_mail); filter(p_err);     destination(mailerr); };
-
-log { source(src); filter(f_news); filter(p_crit);     destination(uucp); };
-log { source(src); filter(f_news); filter(p_crit);     destination(newscrit); };
-log { source(src); filter(f_news); filter(p_err);      destination(newserr); };
-log { source(src); filter(f_news); filter(p_warn);     destination(newsnotice); };
-log { source(src); filter(f_news); filter(p_notice);   destination(newsnotice); };
-log { source(src); filter(f_news); filter(p_info);     destination(newsnotice); };
-log { source(src); filter(f_news); filter(p_debug);    destination(newsnotice); };
-
-log { source(src); filter(f_iptables); destination(iptables); };
+# Additional filters for specific programs/use
+filter f_freshclam     { program(freshclam); };
+filter f_ppp           { program(pppd) or program(chat); };
+filter f_postgres      { program(postgres); };
+filter f_iptables      { match("IN=[A-Za-z0-9]* OUT=[A-Za-z0-9]*"); };
+
+log { source(s_sys); filter(f_authpriv);       destination(authlog); };
+log { source(s_sys); filter(f_cron);           destination(cron); };
+log { source(s_sys); filter(f_daemon);         destination(daemon); };
+log { source(s_sys); filter(f_ftp);            destination(ftp); };
+log { source(s_sys); filter(f_kern);           destination(kern); };
+log { source(s_sys); filter(f_lpr);            destination(lpr); };
+log { source(s_sys); filter(f_mail);                   destination(mail); };
+log { source(s_sys); filter(f_news); filter(p_crit);   destination(uucp); };
+log { source(s_sys); filter(f_news); filter(p_crit);   destination(newscrit); };
+log { source(s_sys); filter(f_news); filter(p_err);    destination(newserr); };
+log { source(s_sys); filter(f_news); filter(p_warn);   destination(newsnotice); };
+log { source(s_sys); filter(f_news); filter(p_notice); destination(newsnotice); };
+log { source(s_sys); filter(f_news); filter(p_info);   destination(newsnotice); };
+log { source(s_sys); filter(f_news); filter(p_debug);  destination(newsnotice); };
+log { source(s_sys); filter(f_syslog);         destination(syslog); };
+log { source(s_sys); filter(f_user);           destination(user); };
+log { source(s_sys); filter(f_uucp);           destination(uucp); };
+
+log { source(s_sys); filter(p_debug);          destination(debug); };
+
+log { source(s_sys); filter(f_daemon); filter(f_ppp);          destination(ppp); };
+log { source(s_sys); filter(f_local6); filter(f_freshclam);    destination(freshclam); };
+log { source(s_sys); filter(f_local0); filter(f_postgres);     destination(postgres); };
+#log { source(s_sys); filter(f_iptables);      destination(iptables); };
+
+log { source(s_sys); filter(p_emergency);      destination(console); };
+#log { source(s_sys); destination(console_all); };
+
+#  This is a catchall statement, and should catch all messages which were not
+#  accepted any of the previous statements.
+log { source(s_sys); destination(messages); flags(fallback); };
+
+# Network syslogging
+#log { source(s_sys); destination(loghost); };
This page took 0.456838 seconds and 4 git commands to generate.