Skip to content

basecamp/resque-exporter

 
 

Repository files navigation

Resque Exporter

Prometheus exporter for Resque metrics. Forked from upstream to maintain and package ourselves for our monitoring v2.

Usage

./resque-exporter

By default, the resque exporter collects metrics from redis://localhost:6379. You can change it using the --redis.url flag.

./resque-exporter --redis.url redis://redis.example.com:6379/1

If REDIS_URL environment variable is given, it takes precedence over the --redis.url flag.

REDIS_URL=unix:///var/run/redis.sock ./resque-exporter

If your Resque is using a non-default namespace (default is resque) to prefix its Redis keys, specify the namespace using the --redis.namespace flag.

./resque-exporter --redis.namespace app

Flags

$ ./resque-exporter --help
Usage of ./resque-exporter:
  -redis.namespace string
        Namespace used by Resque to prefix all its Redis keys. (default "resque")
  -redis.url string
        URL to the Redis backing the Resque. (default "redis://localhost:6379")
  -version
        Print version information.
  -web.listen-address string
        Address to listen on for web interface and telemetry. (default ":9447")
  -web.telemetry-path string
        Path under which to expose metrics. (default "/metrics")

Docker

You can deploy the resque exporter using the zappi/resque-exporter Docker image.

docker run -d -p 9447:9447 zappi/resque-exporter --redis.url redis://redis.example.com:6379

Metrics

Name Help Labels
resque_failed_job_executions_total Total number of failed job executions.
resque_failed_scrapes_total Total number of failed scrapes.
resque_job_executions_total Total number of job executions.
resque_jobs_in_failed_queue Number of jobs in a failed queue. queue
resque_jobs_in_queue Number of jobs in a queue. queue
resque_processing_ratio Ratio of queued jobs to workers processing those queues. queue
resque_scrape_duration_seconds Time this scrape of resque metrics took.
resque_scrapes_total Total number of scrapes.
resque_up Whether this scrape of resque metrics was successful.
resque_workers Number of workers.
resque_workers_per_queue Number of workers handling a specific queue. queue
resque_working_workers Number of working workers.

Building

Tested is only building directly via go build. Make sure you have a running go environment.

go mod init github.com/basecamp/resque-exporter/v2
go mod tidy
go get github.com/basecamp/resque-exporter/v2
go build

Building the docker image:

docker build -t resque-exporter:0.3.0 .

About

Prometheus exporter for Resque metrics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.5%
  • Dockerfile 3.5%