Installation de dashboards avec PostgreSQL/timescaledb + grafana

Introduction

locust-plugins enables you to:

The dashboards provide a good overview as well as the ability to drill down, as each request is logged individually. It also logs important run events (number of active users, ramp up finished etc) as well as aggregated results after the test has finished. Because the data is persisted, you can also track any changes in the performance of your system over time.

This aims to be a complete replacement for the reporting/graphing parts of the Locust web UI, so it is often used with Locust in –headless mode.

Because Timescale is queried using regular SQL it is relatively straightforward make your own custom dashboards or edit the existing ones.

You can even calculate your own completely custom metrics (e.g. number of requests above a certain response time threshold).

Installation with docker-compose

LOCUST_TIMESCALE environment variable

  • LOCUST_TIMESCALE

Set up PostgreSQL/Timescale and Grafana

Assuming you already have docker set up, all you need to do is run:

locust-compose up

That will give you:

  • a PostgreSQL/Timescale container (for receiving and storing data)

  • and a Grafana container (for showing nice graphs based on said data)