On Wednesday, August 14, 2013 20:02:19 Dafydd Crosby wrote:
> I'm not wild on using the JSON collector for this. It took 20 minutes just 
to find out how to get stats from MongoDB, and I'd rather not have to have 
downstream users go through the same process. Out of the box, this gets stats 
from MongoDB.

We can certainly ship a config file which shows how to do it with the json 
collector (with a README.md even.)  (We might also find a way to 
overlay/include collector configs so you don't have to copy+modify the stock 
mongo-json.json.)  We would have to modify the json collector to be more 
flexible, but this sort of thing is the reason we have the json collector, so 
it would be nice to use it.

> Output: https://gist.github.com/dafyddcrosby/6237735
> 
> And all metrics don't have to be numbers, though it's certainly a nice-to-
> have. In Graphite, NaNs are simply ignored. If you've got a snappy one-liner
> for only grabbing the integer values out of a nested hash while keeping the
> nesting, I'd love to see it, but frankly it really isn't necessary.

By convention, metrics are numbers so we should stick to that.  We don't want 
user plugins and downstream applications tripping on text output from stock 
collectors.  i.e. Nobody should have to deal with metrics which are not 
quantities.

https://github.com/synthesist/panoptimon/blob/master/lib/panoptimon/collector.rb#L68

Thanks,
Eric