syslog-ng: define fastly destination on all log hosts, not just lully
[mirror/dsa-puppet.git] / modules / syslog_ng / templates / syslog-ng.conf.erb
index 89c77ed..614ef81 100644 (file)
@@ -119,9 +119,12 @@ source s_local {
 <%- else -%>
        system();
 <%- end -%>
+<%- if has_variable?("haproxy") && @haproxy -%>
+       unix-stream("/var/lib/haproxy/dev/log");
+<%- end -%>
 };
 
-<%- if (@hostname == "lotti") || (@hostname == "lully") || (@hostname == "loghost-grnet-01") -%>
+<%- if (@hostname == "lotti") || (@hostname == "lully") || (@hostname == "loghost-grnet-01") || (@hostname == "loghost-osuosl-01") -%>
 source s_network {
        tcp6(port(5140) max-connections(400)
                tls( key_file("/etc/exim4/ssl/thishost.key")
@@ -130,9 +133,7 @@ source s_network {
                )
        );
 };
-<%- end -%>
 
-<%- if (@hostname == "lully") -%>
 source s_network_fastly {
        tcp6(port(5141) max-connections(100)
                tls( key_file("/etc/exim4/ssl/thishost.key")
@@ -437,6 +438,16 @@ destination loghost-loghost-grnet-01 {
                     ca_dir("/etc/ssl/debian/certs/")
                )
        );
+};
+ <%- end -%>
+  <%- if @hostname != "loghost-osuosl-01" -%>
+destination loghost-loghost-osuosl-01 {
+       tcp("loghost-osuosl-01.debian.org" port (5140)
+               tls( key_file("/etc/ssl/private/thishost.key")
+                    cert_file("/etc/ssl/debian/certs/thishost.crt")
+                    ca_dir("/etc/ssl/debian/certs/")
+               )
+       );
 };
  <%- end -%>
 
@@ -451,11 +462,14 @@ log {
  <%- if @hostname != "loghost-grnet-01" -%>
        destination(loghost-loghost-grnet-01);
  <%- end -%>
+ <%- if @hostname != "loghost-osuosl-01" -%>
+       destination(loghost-loghost-osuosl-01);
+ <%- end -%>
 };
 
 
 
-<%- if (@hostname == "lotti") || (@hostname == "lully") || (@hostname == "loghost-grnet-01") -%>
+<%- if (@hostname == "lotti") || (@hostname == "lully") || (@hostname == "loghost-grnet-01") || (@hostname == "loghost-osuosl-01") -%>
 ###############################################################################
 ########## ON LOG HOST ########################################################
 ###############################################################################
@@ -566,10 +580,9 @@ log { source(s_local);
 log { source(s_local);
       source(s_network);
       filter(f_syslog); destination(df_ALL_syslog); };
-<%- end -%>
 
-<%- if (@hostname == "lully") -%>
-destination fastly { file("/var/log/fastly.log" };
+## syslog endpoint for fastly services:
+destination fastly { file("/var/log/fastly.log"); };
 
 log { source(s_network_fastly);
       destination(fastly); };