Last active
August 29, 2015 14:04
-
-
Save jderrett/9c2a2a11955cea61af2a to your computer and use it in GitHub Desktop.
librato_source_counter.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'librato/metrics' | |
# Estimate the number of sources for each metric | |
Librato::Metrics.authenticate '[email protected]', 'api token' | |
Librato::Metrics.metrics.each do |m| | |
# Grab last 4 hours at hourly resolution | |
puts [m['name'], Librato::Metrics.get_measurements(m['name'], resolution: 3600, count: 4).keys.size] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment