moznion's tech blog

moznion's technical memo

resque_exporter is out

This is an exporter of Prometheus for resque's queue status *1.
It aggregates and provides number of remained jobs for each queues.

Aggregation mechanism is simple. This exporter accesses to redis to aggregate queue status.

  1. Collect name of queues via <namespace>:queues entry (by using SMEMBERS)
  2. Get number of remained jobs for each queue via <namespace>:queue:<queue_name> entry (by using LLEN)

Exporter outputs metrics through HTTP, like so:

# HELP resque_jobs_in_queue Number of remained jobs in queue
# TYPE resque_jobs_in_queue gauge
resque_jobs_in_queue{queue_name="image_converting"} 0
resque_jobs_in_queue{queue_name="log_compression"} 0

It is useful to monitor and visualise status of queues by using prometheus.

*1:it also supports resque compatible job queue system; e.g. jesque