Skip to content

ollytheninja/locust_exporter

 
 

Repository files navigation

Prometheus Metrics Exporter for Locust

A locust exporter for prometheus, forked from mbolek/locust_exporter

This is a simple exporter for http://locust.io metrics. You get all the necessary details about current tests and the state of the locust.

Errors and requests stats are added with the method and path labels - BE CAREFUL - if you have a lot of endpoints. It is probably better to group the endpoints in your locustfile (please see: http://docs.locust.io/en/latest/writing-a-locustfile.html#grouping-requests-to-urls-with-dynamic-parameters).

Container Quickstart

This project is available as a pre-built container image.

docker pull ghcr.io/ollytheninja/locust_exporter

Setup

This project uses UV.

  • Install uv
  • run uv sync
  • You can now uv run locust_exporter.py <listen_port> <locust_host:port>

Usage

Run the exporter with:

./locust_exporter.py

Configuration

Environment Variable Description Default
LOCUST_URI The locust address to connect to http://localhost:8089
LISTEN_PORT The port the exporter will listen on 8088

example metrics response

Acknowledgements

This project is forked from mbolek/locust_exporter

Includes cherry-picked contributions to the original project:

About

A locust exporter for prometheus

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 89.1%
  • Dockerfile 10.0%
  • Shell 0.9%