Git Product home page Git Product logo

beanstalkd_exporter's Introduction

Go Report Card Code Climate Build Status

Beanstalkd Exporter for Prometheus

This is a simple server that scrapes beanstalkd stats and exports them via HTTP for Prometheus consumption.

Getting Started

To run it:

$ ./beanstalkd_exporter [flags]

Help on flags:

$ ./beanstalkd_exporter --help

For more information check the source code documentation.

Usage

Specify the address of the beanstalkd instance using the --beanstalkd.address flag. For example,

$ ./beanstalkd_exporter --beanstalkd.address=127.0.0.1:11300

The default address is localhost:11300.

Example With Beanstalkd

Start a beanstalkd instance with the following docker command.

$ docker run -d -p 11300:11300 --name beanstalkd dtannock/beanstalkd:latest

Run beanstalkd_exporter. The default flag values should be able to connect to the running beanstalkd instance.

$ ./beanstalkd_exporter

Fetch the metrics for Prometheus.

$ curl http://localhost:8080/metrics

Failed Scrapes

Of the failed scraping strategies described here, the up variable is used.

You can see this in practice by starting/stopping the docker container, and fetching the metrics, then find the beanstalkd_up value.

$ docker stop beanstalkd
$ curl http://localhost:8080/metrics
$ docker start beanstalkd
$ curl http://localhost:8080/metrics

Metrics

Without passing any flags, only the system-level stats will be collected from beanstalkd (i.e. tube-level stats will not be collected).

To collect tube-level stats, you must set one or more tube names with the --beanstalkd.tubes flag,

$ ./beanstalkd_exporter --beanstalkd.tubes=default,anotherTube

The metrics collected from beanstalkd can be filtered using the --beanstalkd.systemMetrics and --beanstalkd.tubeMetrics flags. For example,

$ ./beanstalkd_exporter \
    --beanstalkd.systemMetrics=current_jobs_urgent_count,current_jobs_ready_count \
    --beanstalkd.tubes=default \
    --beanstalkd.tubeMetrics=tube_current_jobs_ready_count

Will fetch only 2 system-level metrics, and 1 metric labelled for the default tube.

The full list of metrics is available on this page.

Development

Building

$ make build

Testing

$ make test

License

Apache License 2.0, see LICENSE.

beanstalkd_exporter's People

Contributors

ivdavidtannock avatar

Watchers

 avatar  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.