GithubHelp home page GithubHelp logo

advanced-analytics / resque_exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moznion/resque_exporter

0.0 2.0 0.0 14 KB

An exporter of Prometheus for resque's status.

Makefile 13.35% Shell 6.86% Go 79.79%

resque_exporter's Introduction

resque_exporter

An exporter of Prometheus for resque's status.

Usage

Options:

  -h, --help            display help
  -v, --version         display version and revision
  -p, --port[=5555]     set port number
  -c, --config          set path to config file

e.g.

$ ./resque_exporter --config /path/to/config.yml

Description

This exporter exports following items.

  • Number of remained jobs in queue
  • Number of processed jobs
  • Number of failed jobs
  • Number of total workers
  • Number of active workers
  • Number of idle workers

Configuration

You may write configuration file and pass that through CLI option.
Please refer to sample_config.yml.

Sample Output

# 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
# HELP resque_failed Number of failed jobs
# TYPE resque_failed gauge
resque_failed 123
# HELP resque_processed Number of processed jobs
# TYPE resque_processed gauge
resque_processed 1.234567e+06
# HELP resque_active_workers Number of active workers
# TYPE resque_active_workers gauge
resque_active_workers 2
# HELP resque_idle_workers Number of idle workers
# TYPE resque_idle_workers gauge
resque_idle_workers 8
# HELP resque_total_workers Number of workers
# TYPE resque_total_workers gauge
resque_total_workers 10

Mechanism

This exporter accesses to redis to aggregate 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)
  3. Get number of processed jobs via <namespace>:stat:processed
  4. Get number of failed jobs via <namespace>:stat:failed
  5. Collect name of workers via <namespace>:workers entry (by using SMEMBERS)
  6. Count number of active workers and idle workers by getting for each workers status entry <namespace>:worker:<worker_name>.

Note

This exporter also supports resque compatible job-queue engine (e.g. jesque).

[For developers] How to build to release

Execute make build VERSION=${version} on Docker available environment. Built binaries will be on bin directory.

License

The MIT License (MIT)
Copyright © 2016 moznion, http://moznion.net/ <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

resque_exporter's People

Contributors

moznion avatar mrwacky42 avatar

Watchers

James Cloos avatar Markus Zucker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.