Sha256: b4b1181a27c7d2ffac8cad190af778b66a1d13cf8892dde7e116e58f9b9a176d

Contents?: true

Size: 437 Bytes

Versions: 6

Compression:

Stored size: 437 Bytes

Contents

require "resque"

redis_server = Rubber.instances.for_role('redis_slave').first.full_name rescue nil
redis_server ||= 'localhost' if Rubber.env == 'development'
Resque.redis = "#{redis_server}:6379"

queue_sizes = {}
Resque.redis.smembers("queues").each do |queue_name|
  queue_size = Resque.redis.llen("queue:#{queue_name}")

  puts "PUTVAL #{HOSTNAME}/resque_worker/gauge-#{queue_name}_queued interval=#{INTERVAL} N:#{queue_size}"
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubber-2.0.0.pre6 templates/collectd/script/collectd/role/resque_worker/global_worker_stats.rb
rubber-2.0.0.pre5 templates/collectd/script/collectd/role/resque_worker/global_worker_stats.rb
rubber-2.0.0.pre4 templates/collectd/script/collectd/role/resque_worker/global_worker_stats.rb
rubber-2.0.0.pre3 templates/collectd/script/collectd/role/resque_worker/global_worker_stats.rb
rubber-2.0.0.pre2 templates/collectd/script/collectd/role/resque_worker/global_worker_stats.rb
rubber-2.0.0.pre1 templates/collectd/script/collectd/role/resque_worker/global_worker_stats.rb