]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - templates/syslog-ng.conf.erb
Merge branch 'master' of git+ssh://puppet.debian.org/srv/puppet.debian.org/git/dsa...
[dsa-puppet.git] / templates / syslog-ng.conf.erb
index c87596cea68cc50b44b48a0c719be1975a857231..86430df5a19f075a07cbb22ea0ca2fb096fa0fa5 100644 (file)
@@ -1,3 +1,6 @@
+<% 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
@@ -78,6 +81,12 @@ options {
        # we tell the syslog-ng that if a hostname match this regexp than that
        # is not a real hostname.
        bad_hostname("^gconfd$");
+
+<% if hostname == "heininen" -%>
+       # we trust our mutual authenticated syslog clients
+       keep_hostname(yes);
+<%end%>
+
 };
 
 
@@ -93,21 +102,40 @@ source s_all {
         # 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" 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
+<% if syslogversion == "2" -%>
         file("/dev/klog" log_prefix("kernel: "));
+<% else %>
+        file("/dev/klog" program_override("kernel: "));
+<%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)
-<% if hostname == "paganini" -%>
         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.crt")
+                    ca_dir("/etc/exim4/ssl/")
+               )
+       );
+};
+<%end%>
+
 
 ######
 # destinations
@@ -219,6 +247,9 @@ filter f_xconsole {
 # auth,authpriv.*                 /var/log/auth.log
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_auth);
         destination(df_auth);
 };
@@ -226,6 +257,9 @@ log {
 # *.*;auth,authpriv.none          -/var/log/syslog
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_syslog);
         destination(df_syslog);
 };
@@ -241,6 +275,9 @@ log {
 # daemon.*                        -/var/log/daemon.log
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_daemon);
         destination(df_daemon);
 };
@@ -248,6 +285,9 @@ log {
 # kern.*                          -/var/log/kern.log
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_kern);
         destination(df_kern);
 };
@@ -255,6 +295,9 @@ log {
 # lpr.*                           -/var/log/lpr.log
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_lpr);
         destination(df_lpr);
 };
@@ -262,6 +305,9 @@ log {
 # mail.*                          -/var/log/mail.log
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_mail);
         destination(df_mail);
 };
@@ -269,6 +315,9 @@ log {
 # user.*                          -/var/log/user.log
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_user);
         destination(df_user);
 };
@@ -276,6 +325,9 @@ log {
 # uucp.*                          /var/log/uucp.log
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_uucp);
         destination(df_uucp);
 };
@@ -283,6 +335,9 @@ log {
 # 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);
@@ -291,6 +346,9 @@ log {
 # 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);
@@ -299,6 +357,9 @@ log {
 # 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);
@@ -307,6 +368,9 @@ log {
 # 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);
@@ -315,6 +379,9 @@ log {
 # 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);
@@ -323,6 +390,9 @@ log {
 # 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);
@@ -334,6 +404,9 @@ log {
 #         news.none;mail.none     -/var/log/debug
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_debug);
         destination(df_debug);
 };
@@ -345,6 +418,9 @@ log {
 #         mail,news.none          -/var/log/messages
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_messages);
         destination(df_messages);
 };
@@ -352,6 +428,9 @@ log {
 # *.emerg                         *
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_emerg);
         destination(du_all);
 };
@@ -364,7 +443,27 @@ log {
 #         *.=notice;*.=warn       |/dev/xconsole
 log {
         source(s_all);
+<% if hostname == "heininen" -%>
+        source(s_network);
+<% end %>
         filter(f_xconsole);
         destination(dp_xconsole);
 };
 <%end%>
+
+<% if hostname != "heininen" -%>
+ <% if syslogversion == "3" %>
+destination loghost-heininen {
+       tcp6("heininen.debian.org" port (5140)
+               tls( key_file("/etc/ssl/debian/keys/thishost.key")
+                    cert_file("/etc/ssl/debian/certs/thishost.crt")
+                    ca_dir("/etc/ssl/debian/certs/")
+               )
+       )
+};
+log {
+       source(s_all);
+       destination(loghost-heininen);
+};
+ <%end%>
+<%end%>