Avoid false positives on 'client' nodes
Test number of master-eligible nodes

Enable with -m or --master-nodes.

ElasticSearch is particularly vulnerable to split-brain failures.  The
recommended mitigation strategy (discovery.zen.minimum_master_nodes)
does not go far enough to prevent the problem [1].

If you are using Zen discovery, your cluster will eventually split.

Autonomously detecting split-brains can be tricky.  I have opted for the
simplest and most reliable approach:  count the number of
master-eligible nodes in the cluster.  If this number drops, the cluster
MAY have partitioned.  Now, this is not the most accurate approach
(obviously, the number of master-eligible nodes can drop for other
reasons), but no split-brain can possibly go unnoticed.

1: https://github.com/elasticsearch/elasticsearch/issues/2488