GithubHelp home page GithubHelp logo

apgsga / huey-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marcoglauser/huey-exporter

0.0 2.0 0.0 44 KB

Huey exporter for Prometheus

License: MIT License

Dockerfile 2.06% Python 97.94%

huey-exporter's Introduction

Huey Prometheus Exporter

This project provides metrics about the huey task queue for prometheus.

Latest Version: 1.0.3


Important
  • If you use huey 1.x then install huey-exporter 0.2.2. Checkout the git tag 0.2.2.
  • If you use huey 2.x then install huey-exporter >= 1.0.

Requirements

Usage

Installation

Installation of the latest release:

pip install git+https://github.com/APGSGA/[email protected]

Installation of the master branch:

pip install git+https://github.com/APGSGA/huey-exporter.git@master

The command huey_exporter will start a webserver (default port 9100) and serves the metrics.

The exporter will explore the Redis instance and therefore find the huey queue names by themself.

Running

Usage: huey_exporter [OPTIONS]

Options:
  -c, --connection-string TEXT  Connection string to redis including database.
                                for example redis://localhost:6379/0
  -p, --port TEXT               Port to expose the metrics on.
  --logging-level               Logging level of the exporter. Default is INFO.
                                DEBUG | INFO | WARNING | ERROR
  --help                        Show this message and exit.

Example:

huey_exporter

The huey_exporter can also be configured by the environment variables REDIS_CONNECTION_STRING, LOGGING_LEVEL and EXPORTER_PORT

Docker

Image on dockerhub

The usage is the same as the non-docker.

Example:

docker run -e REDIS_CONNECTION_STRING=redis://somehost:6379/0 apgsga/huey-exporter

Exposed Metrics

  • hueyx_signals

Labels: 'queue_name', 'task_name', 'signal', 'hueyx_environment'.

  • hueyx_queue_task_count

Labels: 'queue_name', 'task_name'


Internals

huey-exporter consists of two modules which work completely independent of each other.

Signal listener

The signal listener subscribes to the hueyx hueyx.huey2.signaling pubsub. Everytime hueyx receives a huey signal the exporter receives it and increases the according prometheus counter.

Queue length

The second exporter module is the queue_length counter. The counter first tries to find huey queues on redis by watching all redis keys with the pattern huey.redis.*. The key only exists if the queue contains at least one element so it can take some time. The counter reads all tasks then and reports them to prometheus.

huey-exporter's People

Contributors

marcoglauser avatar fae-apg avatar severinalexb avatar

Watchers

James Cloos avatar  avatar

huey-exporter's Issues

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.