Coder Social home page Coder Social logo

prometheus-huey-exporter's Introduction

prometheus-huey-exporter

build GitHub GitHub tag (latest SemVer) Go Reference

Expose metrics from the huey task queue

Usage

Huey configuration

Create a custom signal handler that catch all the signals and publish on a specific Redis channel

@huey.signal()
def metrics(signal, task, exc=None):
    # conn = djhuey.HUEY.storage.conn
    conn = get_redis_connection()

    data = {
        'event': signal,
        'task_name': task.name,
        'task_id': task.id,
    }

    conn.publish(channel_name, json.dumps(data))

Run the exporter

Start the exporter passing the same channel_name used in the python code

> ./prometheus-huey-exporter -redis.channel <channel_name>

Configuration parameters

Flag Name Environment Variable Name Description
-log.level HUEY_EXPORTER_LOG_LEVEL Log level
-log.format HUEY_EXPORTER_LOG_FORMAT Log format
-redis.address HUEY_EXPORTER_REDIS_ADDR Address of the Redis instance to connect to
-redis.channel HUEY_EXPORTER_REDIS_CHANNEL Redis channel to subscribe to listen for events
-metrics.namespace HUEY_EXPORTER_METRICS_NAMESPACE Namespace for metrics
-web.telemetry-path HUEY_EXPORTER_WEB_PATH Path under which to expose metrics
-web.listen-address HUEY_EXPORTER_WEB_LISTEN_ADDRESS Address to listen on for web interface and telemetry

Other Flags

Flag Name Description
-version Show the version and quit
-h Show the help and quit

prometheus-huey-exporter's People

Contributors

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