Commit 571cc5f7 authored by Tim Smith's avatar Tim Smith
Browse files

Merge branch 'udp-bind-address' of https://github.com/jperville/rsyslog into...

Merge branch 'udp-bind-address' of https://github.com/jperville/rsyslog into jperville-udp-bind-address
parents b22bde3e 03a54a98
......@@ -27,7 +27,9 @@ See `attributes/default.rb` for default values.
* `node['rsyslog']['server']` - Determined automatically and set to true on the server.
* `node['rsyslog']['server_ip']` - If not defined then search will be used to determine rsyslog server. Default is `nil`. This can be a string or an array.
* `node['rsyslog']['server_search']` - Specify the criteria for the server search operation. Default is `role:loghost`.
<<<<<<< HEAD
* `node['rsyslog']['protocol']` - Specify whether to use `udp` or `tcp` for remote loghost. Default is `tcp`. To use both specify both in a string e.g. 'udptcp'.
* `node['rsyslog']['bind']` - Specify the address to which the server should be listening; only use with `node['rsyslog']['protocol'] = 'udp'` because the feature does not work with the `tcp` protocol ([more info](http://www.rsyslog.com/doc/master/configuration/modules/imtcp.html#caveats-known-bugs)).
* `node['rsyslog']['port']` - Specify the port which rsyslog should connect to a remote loghost.
* `node['rsyslog']['remote_logs']` - Specify wether to send all logs to a remote server (client option). Default is `true`.
* `node['rsyslog']['per_host_dir']` - "PerHost" directories for template statements in `35-server-per-host.conf`. Default value is the previous cookbook version's value, to preserve compatibility. See __server__ recipe below.
......
......@@ -24,6 +24,7 @@ default['rsyslog']['server'] = false
default['rsyslog']['use_relp'] = false
default['rsyslog']['relp_port'] = 20_514
default['rsyslog']['protocol'] = 'tcp'
default['rsyslog']['bind'] = '*'
default['rsyslog']['port'] = 514
default['rsyslog']['server_ip'] = nil
default['rsyslog']['server_search'] = 'role:loghost'
......
......@@ -36,6 +36,7 @@ $InputTCPServerStreamDriverAuthMode <%= node['rsyslog']['tls_auth_mode'] || 'ano
$InputTCPServerRun <%= node['rsyslog']['port'] %>
# Provide <%= node['rsyslog']['protocol'].upcase %> log reception
<% else -%>
<<<<<<< HEAD
<% if node['rsyslog']['protocol'] =~ /tcp/ %>
$ModLoad imtcp
$InputTCPServerRun <%= node['rsyslog']['port'] %>
......@@ -43,6 +44,16 @@ $InputTCPServerRun <%= node['rsyslog']['port'] %>
<% if node['rsyslog']['protocol'] =~ /udp/ %>
$ModLoad imudp
$UDPServerRun <%= node['rsyslog']['port'] %>
=======
<% case node['rsyslog']['protocol'] -%>
<% when "tcp" -%>
$ModLoad imtcp
$InputTCPServerRun <%= node['rsyslog']['port'] %>
<% when "udp" -%>
$ModLoad imudp
$UDPServerAddress <%= node['rsyslog']['bind'] %>
$UDPServerRun <%= node['rsyslog']['port'] %>
>>>>>>> 03a54a9893fc72293ff7dbd9880d012080a2d00e
<% end -%>
<% end -%>
<% end -%>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment