BrightcoveOS/Diamond — pull request #714 by rtoma (2014-08-20 09:44:03+00:00)
Title: Added multi-instance support to Elasticsearch collector, minor unittest fixes

When using heavy servers you want to run multiple ES instances, as the optimal heap size of ES is 32GB.
The current collector does not support this, so I added multi-instance support, like already builtin other collectors.

100% backwards compatible.
Only when you set the 'instances' parameter the multi-instance feature kicks in. It will iterate over the configured instances and include the alias into the metricpath.

The optional cluster-health and index-stats collection parts have been moved to separate methods. This fixes 2 bugs which triggered a return from the collect method before the metrics were published.

When adding the unittest I found out that some cases were not consuming all specified fixtures, because of the optional cluster-state collector. So I have corrected this and added a assert on the consumption count.