Grafana Dashboard with InfluxDB for JMeter Performance Results
Follow the given instructions to configure both JMeter and Grafana dashboards in your local environment.
Execute the following docker-compose
command from Docker
directory to spin and run a set of containers with Grafana
and InfluxDB
as configured
# `-d` flag to detach the process and to run it in background
docker-compose up [-d]
Execute the following command to tail the logs of the containers if the docker-compose
is executed with detach mode
docker-compose logs -f
Once the containers are started successfully, navigate to http://localhost:3000
to access the Grafana Dashboard. Enter the following credentials to log-in to the Grafana Dashboard
- Username:
admin
- Password:
admin
- Hover on the
+
symbol and selectImport
to import an existing Dashboard to the Grafana. - Select the
Upload JSON File
option in the following screen and upload thegrafana-jmeter-dashboard.json
and import
Note: The Grafana is configured with InfluxDB datasource as default. Please follow the
JMeter InfluxDB Configurations
to configure an InfluxDB instance for the JMeter performance results.
Once the Docker services are up and running, execute the following cURL command to create a database named jmeter_influx
to store the performance metrics.
curl --location --request POST 'http://localhost:8086/query' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'q=CREATE DATABASE jmeter_influx'
Once the jmeter_influx
DB is created successfully, sign-in to the Grafana Dashboard and perform the following to configure the jmeter_influx
DB in the Grafana environment.
- Hover the
cogwheel
icon and go toDatasources
Add data source
> selectInfluxDB
and enter the following- Name:
JMeter InfluxDB
- URL:
http://infuxdb:8086
- Database:
jmeter_influx
- User:
admin
- Password:
admin
- Name:
- Click on
Save & Test
Next, configure the JMeter to send the performance metrics to the InfluxDB while performing a load test in your environment. This repo contains a simple sample JMeter script attached.
Perform the following to configure InfluxDB Backend Listener in JMeter
- Add a Backend Listener to the JMeter script
- Select the
Backend Listener Implementation
asorg.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient
- Fill the following information
influxdbMetricsSender
:org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender
influxdbUrl
:http://localhost:8086/write?db=jmeter_influx
application
: Provide an application name (ex:Mock Application
)measurement
:jmeter
summaryOnly
: Boolean value (ex.true
orfalse
)samplersRegex
:.*
percentiles
:90;95;99
testTitle
:Grafana Mock Test Plan
- And save the script and perform a load testing
Once the load test is executed, navigate to the Grafana Dashboard and open our JMeter Dashboard
. Select the ...
JMeter-InfluxDB
as theDatasource
- The Application name
- The Transaction
to view the performance metrics in realtime.
The Grafana Dashboard presented in this repo is an extended version of 13417 including the default JMeter Dashboard metrics.