paperlesspost/graphiti — pull request #83 by cmenguy (2013-11-08 03:58:21+00:00)
Title: Fetch index.json from multiple caches in distributed environment and merge the resulting metrics

The index.json only contains the metrics in a given Graphite cache, so in case Graphite metrics are sharded across multiple caches, the current method will only get all the metrics on a given cache, but none from the remaining caches.

In this pull request, I am introducing a new parameters `graphite_caches` which is an array of caches that need to be queries for the index.json and then merge the resulting metrics into `@metrics`. If there is no element in this new parameter, use the usual `graphite_base_url` to fetch the index.json