From 3e949d5255d581056951304b179ece9be1390269 Mon Sep 17 00:00:00 2001 From: Keith Feldman Date: Fri, 13 Jun 2014 11:44:23 -0600 Subject: [PATCH] Modified check for replica shards to include the RELOCATING state has a green state, otherwise the check is returning a bad state even though the cluster is green --- check_elasticsearch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_elasticsearch b/check_elasticsearch index c46fa93..7cc605a 100755 --- a/check_elasticsearch +++ b/check_elasticsearch @@ -435,7 +435,7 @@ class ElasticSearchCheck(NagiosCheck): "shard %d" % (idx_name, shard_no)) for replica in primary_replica_map[primary]: - if replica.state != SHARD_STATE['STARTED']: + if replica.state not in ( SHARD_STATE['STARTED'], SHARD_STATE['RELOCATING'] ): downgraded |= self.downgrade_health(YELLOW) detail.append("Index '%s' replica down on " "shard %d" % (idx_name, shard_no))