Skip to content

Commit 3e949d5

Browse files
author
Keith Feldman
committed
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
1 parent bd31d46 commit 3e949d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

check_elasticsearch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ class ElasticSearchCheck(NagiosCheck):
435435
"shard %d" % (idx_name, shard_no))
436436

437437
for replica in primary_replica_map[primary]:
438-
if replica.state != SHARD_STATE['STARTED']:
438+
if replica.state not in ( SHARD_STATE['STARTED'], SHARD_STATE['RELOCATING'] ):
439439
downgraded |= self.downgrade_health(YELLOW)
440440
detail.append("Index '%s' replica down on "
441441
"shard %d" % (idx_name, shard_no))

0 commit comments

Comments
 (0)