summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteffen Zieger <me@saz.sh>2012-07-02 06:28:09 -0700
committerSteffen Zieger <me@saz.sh>2012-07-02 06:28:09 -0700
commit47694bb8be3e98c903fee1200760c42f0f5eda0a (patch)
treec4136a4ff41a0d1ed04473af0b870e4a5ccad3d8
parent31b02647837955911253725ef789ec263c517e9e (diff)
parent6a440ec8c15d6e2c8bc0bc9cd6b85cc1c131d75d (diff)
Merge pull request #6 from antonlindstrom/master
Add server port in rsyslog::client
-rw-r--r--README.md1
-rw-r--r--manifests/client.pp3
-rw-r--r--templates/client.conf.erb4
3 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md
index 741d93f..077735c 100644
--- a/README.md
+++ b/README.md
@@ -26,6 +26,7 @@ Manage rsyslog client and server via Puppet
log_auth_local => false,
custom_config => undef,
server => 'log',
+ port => '514',
}
```
diff --git a/manifests/client.pp b/manifests/client.pp
index ce882b5..ba8ebf4 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -4,7 +4,8 @@ class rsyslog::client (
$log_local = false,
$log_auth_local = false,
$custom_config = undef,
- $server = 'log'
+ $server = 'log',
+ $port = '514'
) inherits rsyslog {
file { $rsyslog::params::client_conf:
diff --git a/templates/client.conf.erb b/templates/client.conf.erb
index 1effeaa..67f8274 100644
--- a/templates/client.conf.erb
+++ b/templates/client.conf.erb
@@ -11,9 +11,9 @@ $ActionResumeRetryCount -1 # infinety retries if host is down
<% if scope.lookupvar('rsyslog::client::log_remote') -%>
# Log to remote syslog server using <%= scope.lookupvar('rsyslog::client::remote_type') %>
<% if scope.lookupvar('rsyslog::client::remote_type') == 'tcp' -%>
-*.* @@<%= scope.lookupvar('rsyslog::client::server') -%>:514;RSYSLOG_ForwardFormat
+*.* @@<%= scope.lookupvar('rsyslog::client::server') -%>:<%= scope.lookupvar('rsyslog::client::port') -%>;RSYSLOG_ForwardFormat
<% else -%>
-*.* @<%= scope.lookupvar('rsyslog::client::server') -%>:514;RSYSLOG_ForwardFormat
+*.* @<%= scope.lookupvar('rsyslog::client::server') -%>:<%= scope.lookupvar('rsyslog::client::port') -%>;RSYSLOG_ForwardFormat
<% end -%>
<% end -%>