BrightcoveOS/Diamond — pull request #375 by captsens (2013-05-15 08:06:25+00:00)
Title: Elasticsearch collector - don't blow up if CPU, memory or file stats aren't present

On our system (using latest elastic search), stats for CPU, memory and file usage aren't present in the JSON response, so the collector blows up.

This patch adds an _add_metric method to the collector which checks for the existence of each JSON element.