Unallocated shards will not have a location
Fall back on simplejson if json is not available

Fixes #1.
Indexes with no replicas won't straddle failure domains

Presumably, if you have configured an index with zero replicas, you
don't care about redundancy.
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
Fix use-before-assignment bug
Nodes must exist in node_shard_map!

Fixes:

    Unhandled Python exception: KeyError(<__main__.ESNode object at 0x2964fd0>,)

      File "/usr/lib/pymodules/python2.6/nagioscheck.py", line 246, in run
        self.check(opts, args)
      File "/usr/local/sbin/check_elasticsearch", line 466, in check
        my_shards = set(node_shard_map[esid_node_map[myid]])
No setup.py here: document requirements manually