testsmith-io / jmeter-influxdb-grafana-docker

Real-time results of JMeter performance test execution.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JMeter InfluxDB Grafana Docker container

This is a container setup that allows you to immediately synchronize JMeter results with InfluxDB and visualize what is happening in realtime.

Grafana Dashboard

Prerequisites

Ensure both docker and docker-compose are installed.

Build JMeter docker image

docker build -t jmeter jmeter-docker

Start InfluxDB and Grafana

docker-compose up -d

Adjust JMeter script

Define 2 variables on the Test Plan component.

Name Value
CLIENTNAME Example
STARTDATETIME ${__time(yy-MM-dd-HH:mm:ss:SSS)}

Add & configure the Backend Listener in Jmeter.

JMeter Backend Listener

Name Value
influxdbMetricsSender org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender
influxdbUrl http://${__P(INFLUXDB_HOST, localhost)}:8086/write?db=jmeter_results
application ${CLIENTNAME}_${STARTDATETIME}
measurement jmeter
summaryOnly false
samplersRegex .*
percentiles 90;95;99
testTitle Test name
eventTags

Run JMeter script

./run-specific-jmeter-script.sh example.jmx

Filter the correct testrun in Grafana

Grafana Filter

It is the concatenation of CLIENTNAME and STARTDATETIME.

Disclaimer

Inspired by https://www.blazemeter.com/blog/make-use-of-docker-with-jmeter-learn-how

About

Real-time results of JMeter performance test execution.


Languages

Language:Dockerfile 44.8%Language:Shell 37.4%Language:Batchfile 17.8%