Filippo Giunchedi has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/306442

Change subject: [WIP] base: support for multiple syslog hosts
......................................................................

[WIP] base: support for multiple syslog hosts

Change-Id: I59113d1d4a19218d6c67fd1f38790fd4eee9ca37
---
M modules/base/templates/remote_syslog.conf.erb
1 file changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/306442/1

diff --git a/modules/base/templates/remote_syslog.conf.erb 
b/modules/base/templates/remote_syslog.conf.erb
index 27adc59..3394301 100644
--- a/modules/base/templates/remote_syslog.conf.erb
+++ b/modules/base/templates/remote_syslog.conf.erb
@@ -6,4 +6,16 @@
 # See also: 
http://www.rsyslog.com/sende-messages-with-tags-larger-than-32-characters/
 
 $template LongTagForwardFormat,"<%%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% 
%syslogtag%%msg:::sp-if-no-1st-sp%%msg%"
-*.info;mail.none;authpriv.none;cron.none @<%= @central_host 
%>;LongTagForwardFormat
+
+<%
+    log_hosts = []
+    if @central_host.is_a(Array)
+        log_hosts.push(*@central_host)
+    else
+        log_hosts.push(@central_host)
+    end
+%>
+
+<% @log_hosts.sort.each do |log_host| %>
+*.info;mail.none;authpriv.none;cron.none @<%= @log_host %>;LongTagForwardFormat
+<% end %>

-- 
To view, visit https://gerrit.wikimedia.org/r/306442
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59113d1d4a19218d6c67fd1f38790fd4eee9ca37
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to