anchor/nagios-plugin-elasticsearch — pull request #4 by insyte (2014-02-27 23:44:14+00:00)
Title: Another API update

Looks like there must've been a 1.0.0 API change to the index settings. Mine look like this:

```
"index": {
"number_of_replicas": "1",
"number_of_shards": "5",
"uuid": "lhsjBokSQoO7uSSbZ1vFWQ",
"version": {
"created": "1000099"
}
}
```

Since the plugin asks for `[index.number_of_shards]` instead of `['index']['number_of_shards']`, this throws a KeyError on 1.0.0 servers.

My patch includes a version check so it should work just fine for older servers as well, but I have not actually been able to test it against a pre-1.0.0 server.