-
-
Save releu/2169237 to your computer and use it in GitHub Desktop.
munin resque
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'resque' | |
require 'resque-cleaner' | |
HOST = ENV['host'] ||= 'db1.kupikupon.ru' | |
PORT = ENV['port'] ||= '6379' | |
Resque.redis = [HOST, PORT].join(':') | |
cleaner = Resque::Plugins::ResqueCleaner.new | |
if ARGV.first == 'config' | |
puts 'graph_title Queues', | |
'graph_vlabel Failed Jobs', | |
'graph_category resque' | |
cleaner.stats_by_class.each do |queue, error| | |
puts "#{queue}.label #{queue}" | |
end | |
exit 0 | |
end | |
cleaner.stats_by_class.each do |queue, error| | |
puts "#{queue}.value #{error}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment