From 42b807bad0b17d3ce063ae9c4beba514fbf824a6 Mon Sep 17 00:00:00 2001 From: Igor Timoshenko Date: Tue, 5 Apr 2016 16:39:43 +0300 Subject: [PATCH] Added Redis password support --- Check/RedisCollection.php | 2 +- DependencyInjection/Configuration.php | 1 + README.md | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Check/RedisCollection.php b/Check/RedisCollection.php index 94991237..56a711a1 100644 --- a/Check/RedisCollection.php +++ b/Check/RedisCollection.php @@ -15,7 +15,7 @@ class RedisCollection implements CheckCollectionInterface public function __construct(array $configs) { foreach ($configs as $name => $config) { - $check = new Redis($config['host'], $config['port']); + $check = new Redis($config['host'], $config['port'], $config['password']); $check->setLabel(sprintf('Redis "%s"', $name)); $this->checks[sprintf('redis_%s', $name)] = $check; diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index a92c9b90..c09f4e17 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -175,6 +175,7 @@ private function createGroupsNode() ->children() ->scalarNode('host')->defaultValue('localhost')->end() ->integerNode('port')->defaultValue(6379)->end() + ->scalarNode('password')->defaultNull()->end() ->end() ->end() ->end() diff --git a/README.md b/README.md index 09782d16..1fdb0f08 100644 --- a/README.md +++ b/README.md @@ -331,6 +331,7 @@ liip_monitor: name: host: localhost port: 6379 + password: null # Attempt connection to given HTTP host and (optionally) check status code and page content http_service: