Skip to main content

Faktory metrics exporter for Prometheus, written in Python

Project description

faktory-prometheus-exporter

PyPI - Version PyPI - Python Version pre-commit.ci status

A Faktory Exporter written in Python for Prometheus.


In a nutshell

The faktory_exporter is a simple server that scrapes a configured Faktory instance for stats by issuing the "INFO" command and exports them via string message for Prometheus consumption.

Usage

The URL used to scrape info from faktory is by default tcp://:@localhost:7419, but can be overwritten by using the --faktory_url arg or by specifying a FAKTORY_URL environment variable.

Install with pip

Fastest way is simply running (preferably in a python env):

pip install faktory-prometheus-exporter
faktory-prometheus-exporter [--faktory_url='tcp://:[password]@localhost:7419']

Develop using uv or pip-compile

The requirements format are the ones defined by pip-compile, from pip-tools. You may also equally use uv pip compile from uv.

uv pip compile requirements.in -o requirements.txt
uv pip compile requirements-dev.in -o requirements-dev.txt

Then you can either install locally to use the CLI or to run the python function:

uv pip install -e .
faktory-prometheus-exporter [--faktory_url='tcp://:[password]@localhost:7419']
python faktory_prometheus_exporter.py

Build and use as docker container

You may use the Dockerfile and run something like the following. Make sure that the exporter is in the same network than faktory, i.e. with docker-compose.

docker build -t faktory-prometheus-exporter:latest .
docker run -d [--rm] faktory-prometheus-exporter:latest [--faktory_url='tcp://:[password]@localhost:7419']

Inspiration / prior work

Inspired by this Faktory Exporter written in go, but only partially maintained and not working out of the box when we needed it, so we built our own one.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faktory_prometheus_exporter-0.1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file faktory_prometheus_exporter-0.1.1.tar.gz.

File metadata

File hashes

Hashes for faktory_prometheus_exporter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fb159a825d29fa8cef7c58c98043b72cbbdd9392c058e87764454b6dc8920e52
MD5 7262ec89ae833391462d787838654b76
BLAKE2b-256 475d991c08bfbb2dcc21f6e74e5f90103aefabdd79b1f0ea679e3b98eda5d192

See more details on using hashes here.

File details

Details for the file faktory_prometheus_exporter-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for faktory_prometheus_exporter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6694e7a24ef9f4bf588a8eeba2668747f0dd6ea9d11268fdc9f010a9b20b76fb
MD5 cce7b92c575f6c2a51df56f54e56bb93
BLAKE2b-256 f749d7a7c0eaf4c50f24179884c1cf59413da88cb2a370bec84945b515a0995b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page