Skip to content

Instantly share code, notes, and snippets.

@mmrobins
Created October 21, 2013 18:56
Show Gist options
  • Save mmrobins/7089011 to your computer and use it in GitHub Desktop.
Save mmrobins/7089011 to your computer and use it in GitHub Desktop.
Finding graphite stats abuse
% curl http://graphite.livingsocial.net/metrics/index.json > graphite_stats_names.json
% irb
1.9.3-p448 :001 > require 'json'
=> true
1.9.3-p448 :002 > pp JSON.parse(File.read("graphite_stats_names.json")).group_by {|g| g.match(/[^\.]+\.[^\.]+\.[^\.]+/).to_s}.map {|k, v| [k, v.size]}.sort_by {|s| s[1]}[-30..-1]
[["stats.timers.browse", 714],
["stats.pipeline.mark_live", 804],
["stats_counts.pipeline.mark_live", 804],
["livingsocial.mailing.pmta", 837],
["stats.timers.canopy", 897],
["stats.mail.transactional", 1010],
["stats_counts.mail.transactional", 1010],
["stats_service.useracq.roadblock", 1132],
["stats.timers.photo_manager", 1134],
["livingsocial.haproxy.b3", 1201],
["livingsocial.haproxy.b2", 1201],
["livingsocial.varnish.b18", 1218],
["livingsocial.varnish.b19", 1315],
["stats.timers.deals-service", 1323],
["livingsocial.haproxy.fe-edge01", 1454],
["livingsocial.haproxy.fe-edge02", 1454],
["stats.timers.circular", 2121],
["livingsocial.elasticsearch.clusters", 2127],
["stats.timers.pipeline", 2331],
["stats.timers.mail", 2478],
["stats_counts.cupcake.web_traffic", 2929],
["stats.cupcake.web_traffic", 2929],
["stats.timers.merchant_center", 3291],
["stats.timers.varnish", 3633],
["stats_counts.mail.syringe", 4886],
["stats.mail.syringe", 4886],
["stats.timers.accounts", 12873],
["stats_counts.browse.ls-browse-service", 20627],
["stats.browse.ls-browse-service", 20637],
["stats.timers.branson", 21918]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment