Skip to content

Commit

Permalink
fix log_server array handle
Browse files Browse the repository at this point in the history
converts log_server string to an array and
updates the readme file
  • Loading branch information
sharlander committed Dec 20, 2015
1 parent 24a835a commit 07cd7b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,18 @@ Transport protocol used by rsyslog. Valid values are 'tcp' and 'udp'

log_server
----------
Server to send logs to if remote_logging is true.
String or array of server to send logs to if remote_logging is true.

*Example:*
<pre>
rsyslog::log_server: 'log'
</pre>
_OR_
<pre>
rsyslog::log_server:
- 'log1'
- 'log2'
</pre>

- *Default*: "log.${::domain}"

Expand Down
2 changes: 1 addition & 1 deletion templates/rsyslog.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ $ActionQueueSaveOnShutdown on # save messages to disk on shutdown
$ActionQueueType LinkedList # run asynchronously
$ActionResumeRetryCount -1 # infinite retries if host is down
<% end -%>
<% for server in @log_server_real -%>
<% @log_server_real.each do |server| -%>
<%= @source_facilities %> <% if @transport_protocol == 'tcp' -%>@<% end -%>@<%= server -%>:<%= @log_server_port %>
<% end -%>
<% end -%>
Expand Down

0 comments on commit 07cd7b1

Please sign in to comment.