Skip to content

Commit

Permalink
Add ability to define the server port as part of a log_server entry
Browse files Browse the repository at this point in the history
  • Loading branch information
Greig McGill committed Jul 6, 2016
1 parent f7cccb1 commit 55274a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,14 @@ _OR_
<pre>
rsyslog::log_server:
- 'log1'
- 'log2'
- 'log2:1514'
</pre>

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

log_server_port
---------------
Port of the server to send logs to if remote_logging is true.
Default port of the server to send logs to if remote_logging is true. Will not be used if a log_server entry contains a port number.

- *Default*: '514'

Expand Down
3 changes: 3 additions & 0 deletions templates/rsyslog.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ $ActionQueueType LinkedList # run asynchronously
$ActionResumeRetryCount -1 # infinite retries if host is down
<% end -%>
<% @log_server_real.each do |server| -%>
<% if server.include? ":" -%>
<%= @source_facilities %> <% if @transport_protocol == 'tcp' -%>@<% end -%>@<%= server -%>
<% else -%>
<%= @source_facilities %> <% if @transport_protocol == 'tcp' -%>@<% end -%>@<%= server -%>:<%= @log_server_port %>
<% end -%>
<% end -%>
Expand Down

0 comments on commit 55274a7

Please sign in to comment.