projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move ssl/debian into IgnoreAll
[mirror/dsa-puppet.git]
/
templates
/
syslog-ng.conf.erb
diff --git
a/templates/syslog-ng.conf.erb
b/templates/syslog-ng.conf.erb
index
bb66d30
..
f21ccc5
100644
(file)
--- a/
templates/syslog-ng.conf.erb
+++ b/
templates/syslog-ng.conf.erb
@@
-1,3
+1,11
@@
+<% if syslogversion == "3" -%>
+@version: 3.0
+<%end%>
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
#
# Configuration file for syslog-ng under Debian
#
#
# Configuration file for syslog-ng under Debian
#
@@
-88,19
+96,40
@@
source s_all {
# function to send logs to)
unix-stream("/dev/log");
# messages from the kernel
# function to send logs to)
unix-stream("/dev/log");
# messages from the kernel
+<% if syslogversion == "2" -%>
file("/proc/kmsg" log_prefix("kernel: "));
<% else %>
file("/proc/kmsg" log_prefix("kernel: "));
<% else %>
+ file("/proc/kmsg" program_override("kernel: "));
+<%end%>
+<%else%>
# standard Linux log source (this is the default place for the syslog()
# function to send logs to)
unix-dgram("/var/run/log");
# messages from the kernel
# standard Linux log source (this is the default place for the syslog()
# function to send logs to)
unix-dgram("/var/run/log");
# messages from the kernel
+<% if syslogversion == "2" -%>
file("/dev/klog" log_prefix("kernel: "));
file("/dev/klog" log_prefix("kernel: "));
+<% else %>
+ file("/dev/klog" program_override("kernel: "));
+<%end%>
<%end%>
<%end%>
+<% if hostname == "paganini" -%>
# use the following line if you want to receive remote UDP logging messages
# (this is equivalent to the "-r" syslogd flag)
# use the following line if you want to receive remote UDP logging messages
# (this is equivalent to the "-r" syslogd flag)
- # udp();
+ udp();
+<%end%>
};
};
+<% if hostname == "heininen" -%>
+source s_network {
+ tcp6(port(5140)
+ tls( key_file("/etc/exim4/ssl/thishost.key")
+ cert_file("/etc/exim4/ssl/thishost.cert")
+ ca_dir("/etc/exim4/ssl/")
+ )
+ );
+};
+<%end%>
+
######
# destinations
######
# destinations
@@
-192,6
+221,7
@@
filter f_messages {
# messages with priority emerg
filter f_emerg { level(emerg); };
# messages with priority emerg
filter f_emerg { level(emerg); };
+<% if kernel == 'Linux' %>
# complex filter for messages usually sent to the xconsole
filter f_xconsole {
facility(daemon,mail)
# complex filter for messages usually sent to the xconsole
filter f_xconsole {
facility(daemon,mail)
@@
-200,7
+230,7
@@
filter f_xconsole {
and level(crit,err,notice));
};
and level(crit,err,notice));
};
-
+<% end %>
######
# logs
# order matters if you use "flags(final);" to mark the end of processing in a
######
# logs
# order matters if you use "flags(final);" to mark the end of processing in a
@@
-211,6
+241,9
@@
filter f_xconsole {
# auth,authpriv.* /var/log/auth.log
log {
source(s_all);
# auth,authpriv.* /var/log/auth.log
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_auth);
destination(df_auth);
};
filter(f_auth);
destination(df_auth);
};
@@
-218,6
+251,9
@@
log {
# *.*;auth,authpriv.none -/var/log/syslog
log {
source(s_all);
# *.*;auth,authpriv.none -/var/log/syslog
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_syslog);
destination(df_syslog);
};
filter(f_syslog);
destination(df_syslog);
};
@@
-233,6
+269,9
@@
log {
# daemon.* -/var/log/daemon.log
log {
source(s_all);
# daemon.* -/var/log/daemon.log
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_daemon);
destination(df_daemon);
};
filter(f_daemon);
destination(df_daemon);
};
@@
-240,6
+279,9
@@
log {
# kern.* -/var/log/kern.log
log {
source(s_all);
# kern.* -/var/log/kern.log
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_kern);
destination(df_kern);
};
filter(f_kern);
destination(df_kern);
};
@@
-247,6
+289,9
@@
log {
# lpr.* -/var/log/lpr.log
log {
source(s_all);
# lpr.* -/var/log/lpr.log
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_lpr);
destination(df_lpr);
};
filter(f_lpr);
destination(df_lpr);
};
@@
-254,6
+299,9
@@
log {
# mail.* -/var/log/mail.log
log {
source(s_all);
# mail.* -/var/log/mail.log
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_mail);
destination(df_mail);
};
filter(f_mail);
destination(df_mail);
};
@@
-261,6
+309,9
@@
log {
# user.* -/var/log/user.log
log {
source(s_all);
# user.* -/var/log/user.log
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_user);
destination(df_user);
};
filter(f_user);
destination(df_user);
};
@@
-268,6
+319,9
@@
log {
# uucp.* /var/log/uucp.log
log {
source(s_all);
# uucp.* /var/log/uucp.log
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_uucp);
destination(df_uucp);
};
filter(f_uucp);
destination(df_uucp);
};
@@
-275,6
+329,9
@@
log {
# mail.info -/var/log/mail.info
log {
source(s_all);
# mail.info -/var/log/mail.info
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_mail);
filter(f_at_least_info);
destination(df_mail_info);
filter(f_mail);
filter(f_at_least_info);
destination(df_mail_info);
@@
-283,6
+340,9
@@
log {
# mail.warn -/var/log/mail.warn
log {
source(s_all);
# mail.warn -/var/log/mail.warn
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_mail);
filter(f_at_least_warn);
destination(df_mail_warn);
filter(f_mail);
filter(f_at_least_warn);
destination(df_mail_warn);
@@
-291,6
+351,9
@@
log {
# mail.err /var/log/mail.err
log {
source(s_all);
# mail.err /var/log/mail.err
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_mail);
filter(f_at_least_err);
destination(df_mail_err);
filter(f_mail);
filter(f_at_least_err);
destination(df_mail_err);
@@
-299,6
+362,9
@@
log {
# news.crit /var/log/news/news.crit
log {
source(s_all);
# news.crit /var/log/news/news.crit
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_news);
filter(f_at_least_crit);
destination(df_news_dot_crit);
filter(f_news);
filter(f_at_least_crit);
destination(df_news_dot_crit);
@@
-307,6
+373,9
@@
log {
# news.err /var/log/news/news.err
log {
source(s_all);
# news.err /var/log/news/news.err
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_news);
filter(f_at_least_err);
destination(df_news_dot_err);
filter(f_news);
filter(f_at_least_err);
destination(df_news_dot_err);
@@
-315,6
+384,9
@@
log {
# news.notice /var/log/news/news.notice
log {
source(s_all);
# news.notice /var/log/news/news.notice
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_news);
filter(f_at_least_notice);
destination(df_news_dot_notice);
filter(f_news);
filter(f_at_least_notice);
destination(df_news_dot_notice);
@@
-326,6
+398,9
@@
log {
# news.none;mail.none -/var/log/debug
log {
source(s_all);
# news.none;mail.none -/var/log/debug
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_debug);
destination(df_debug);
};
filter(f_debug);
destination(df_debug);
};
@@
-337,6
+412,9
@@
log {
# mail,news.none -/var/log/messages
log {
source(s_all);
# mail,news.none -/var/log/messages
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_messages);
destination(df_messages);
};
filter(f_messages);
destination(df_messages);
};
@@
-344,18
+422,36
@@
log {
# *.emerg *
log {
source(s_all);
# *.emerg *
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_emerg);
destination(du_all);
};
filter(f_emerg);
destination(du_all);
};
+<% if kernel == 'Linux' %>
# daemon.*;mail.*;\
# news.crit;news.err;news.notice;\
# *.=debug;*.=info;\
# *.=notice;*.=warn |/dev/xconsole
log {
source(s_all);
# daemon.*;mail.*;\
# news.crit;news.err;news.notice;\
# *.=debug;*.=info;\
# *.=notice;*.=warn |/dev/xconsole
log {
source(s_all);
+<% if hostname == "heininen" -%>
+ source(s_network);
+<% end %>
filter(f_xconsole);
destination(dp_xconsole);
};
filter(f_xconsole);
destination(dp_xconsole);
};
+<%end%>
+<% if hostname == "corelli" -%>
+destination loghost-paganini {
+ udp("192.168.2.10",port(514));
+};
+
+log {
+ source(s_all);
+ destination(loghost-paganini);
+};
+<%end%>