prometheus-huey-exporter

command module
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 12 Imported by: 0

README

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

Documentation

Overview

The prometheus-nats-exporter exposes metrics about Huey2 tasks executions

Directories

Path Synopsis
Package exporter provides all the building blocks of the prometheus-nats-exporter application.
Package exporter provides all the building blocks of the prometheus-nats-exporter application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL