BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/168182
Change subject: logstash: Add support for redis password
......................................................................
logstash: Add support for redis password
Support providing a password for connecting to the redis server.
Change-Id: I6b2c594b646cd12ebee7f443ae8e21256b1e3f42
---
M manifests/role/logstash.pp
M modules/logstash/manifests/input/redis.pp
M modules/logstash/templates/input/redis.erb
3 files changed, 14 insertions(+), 7 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/82/168182/1
diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp
index 530238c..706533b 100644
--- a/manifests/role/logstash.pp
+++ b/manifests/role/logstash.pp
@@ -65,8 +65,9 @@
}
logstash::input::redis { 'redis':
- host => '127.0.0.1',
- key => 'logstash',
+ host => '127.0.0.1',
+ key => 'logstash',
+ password => $passwords::logstash::redis,
}
logstash::input::gelf { 'gelf':
diff --git a/modules/logstash/manifests/input/redis.pp
b/modules/logstash/manifests/input/redis.pp
index 2a15103..00a3e93 100644
--- a/modules/logstash/manifests/input/redis.pp
+++ b/modules/logstash/manifests/input/redis.pp
@@ -5,12 +5,14 @@
# Configure logstash to collect input from a Redis server
#
# == Parameters:
-# - $host: Redis server to contact
-# - $port: Redis server port
-# - $data_type: Type of communication: 'list', 'channel', 'pattern_channel'
-# - $key: Name of a redis list or channel
-# - $priority: Configuration loading priority. Default '10'.
# - $ensure: Whether the config should exist.
+# - $host: Redis server to contact. Default 127.0.0.1
+# - $port: Redis server port. Default 6379
+# - $data_type: Type of communication: 'list', 'channel', 'pattern_channel'.
+# Default 'list'
+# - $key: Name of a redis list or channel. Default 'logstash'
+# - $password: Password to authenticate with. Default undef.
+# - $priority: Configuration loading priority. Default '10'.
#
# == Sample usage:
#
@@ -25,6 +27,7 @@
$port = 6379,
$data_type = 'list',
$key = 'logstash',
+ $password = undef,
$priority = 10,
) {
logstash::conf { "input-redis-${title}":
diff --git a/modules/logstash/templates/input/redis.erb
b/modules/logstash/templates/input/redis.erb
index 7bdac24..cb33907 100644
--- a/modules/logstash/templates/input/redis.erb
+++ b/modules/logstash/templates/input/redis.erb
@@ -4,5 +4,8 @@
port => <%= @port %>
data_type => "<%= @data_type %>"
key => "<%= @key %>"
+<%- if @password -%>
+ password => "<%= @password %>"
+<%- end -%>
}
}
--
To view, visit https://gerrit.wikimedia.org/r/168182
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b2c594b646cd12ebee7f443ae8e21256b1e3f42
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits