Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin
Influx DB v2.0 listener plugin for Apache JMeter. Provides the possibility to see the online dashboard (aggregation table, errors, the response body of failures).
https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin
grafana influxdb jmeter-plugin performance
Last synced: 5 days ago
JSON representation
Influx DB v2.0 listener plugin for Apache JMeter. Provides the possibility to see the online dashboard (aggregation table, errors, the response body of failures).
- Host: GitHub
- URL: https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin
- Owner: mderevyankoaqa
- License: apache-2.0
- Created: 2020-12-06T09:40:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-11T10:06:22.000Z (about 1 year ago)
- Last Synced: 2024-01-25T07:09:44.539Z (10 months ago)
- Topics: grafana, influxdb, jmeter-plugin, performance
- Language: Java
- Homepage:
- Size: 3.73 MB
- Stars: 103
- Watchers: 8
- Forks: 34
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jmeter - jmeter-influxdb2-listener-plugin - InfluxDB v2.0 listener plugin for Apache JMeter. (Results Processing / Reporting & Visualization)
README
# JMeter InfluxDB v2.0 listener plugin
![](img/logo2.png)
Like what you see? 😍
## Description
The goal of the project is to make a quite similar online dashboard in the same way as JMeter generates. Supported the latest InfluxDB v2.0 and created appropriate dashboard ("Flux" language has been used to create the queries - now there are a lot fo capacities to build amazing charts, tables with a lot of math function).
So that it would be possible to build the monitor hardware solution on the latest InfluxDB v2.0 and telegraf (agent to send the hardware metrics to InfluxDB) as well.The plugin sends metrics to InfluxDB and provides the possibility to visualize the charts in Grafana, have the Aggregate report as JMeter creates. Added the possibly to save the following extra fields in the database:
* Response code;
* Error message;
* Response body of the failed requests (can be configured);
* Connect time;
* Latency;
* The response time (uses from the SampleResult.class, needs to make aggregate report).Notes: if you need to save the errors you got wile the test to csv like file and then share to the dev team you can use the [jmeter-csv-listener-plugin](https://github.com/mderevyankoaqa/jmeter-csv-listener-plugin).
This plugin can be used while the functional testing and load tests as well.## Important notes
🚨 The plugin allows 5 errors happened one by one, then plugin will stop importing the results after that! See details in the logs.
Counter will be refreshed at least you have 4 fails. This is protection to avoid OOM error.
The option can be configured in the settings (the key name is `influxDBThresholdError` see the [Plugin configuration](https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/tree/main#plugin-configuration) for the details). You need to be careful with that option and know the hardware resources to store data in the memory.Pleas monitor the elapsed time of the data importing (see logs) to avoid issues with requests sending from JMeter.
Pay attention on "Sending metrics performance tuning" chapter, see below.## Compatibility
The supported versions:
* 🚨 Java 11 - make sure that you have it (its minimum version); otherwise errors will occur while plugin loading.
* InfluxDB v2.x, see release notes: https://docs.influxdata.com/influxdb/v2.0/reference/release-notes/influxdb/ (1.8 is not supported)
* JMeter 5.6.3 only.* The current board and plugin were tested on Grafana 11.1.3 and InfluxDB 2.7.8, JAVA 21.0.1.
## Maven Support
Please see the latest release here https://search.maven.org/artifact/io.github.mderevyankoaqa/jmeter-plugins-influxdb2-listener.## CI/CD Support
The CI/CD can be done using [jmeter-maven-plugin](https://github.com/jmeter-maven-plugin/jmeter-maven-plugin)
The example of the adding plugin to the project with the jmeter-maven:
io.github.mderevyankoaqa:jmeter-plugins-influxdb2-listener:2.8
Some notes cab be found in the article [Adding jar's to the /lib/ext directory](https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Adding-Excluding-libraries-to-from-the-classpath).## Development and branching strategy
Hello all contributors! Welcome to the project, I'm happy to see you here. Just to avoid the mess and have a nice history, let's keep the simple rules:
1. Code should pass standard static code analysis in IntelliJ IDEA.
2. Comments should be for the new code to have clear java docs.
3. All new development lets - in the "development" branch. So the steps:
a. make a branch for the feature you want to develop from "development" (source branch -> "main"). There will be a mirror of the latest release + can be a merge of the new features.
b. all pull requests from your feature branch -> "development" branch only.
c. once we decide to make the new release after testing, we will merge "development" -> "main" with push to maven central.While the first pull request please add your self to the [build.gradle](https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/blob/main/build.gradle) the section 'developers'
developers {
developer {
id = 'your github if'
name = 'your name'
email = 'email'
}## Deployment
* Put '`jmeter-plugin-influxdb2-listener-.jar`' file from [Releases](https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/releases) to `~ Listener -> Backend Listener.![](img/deploy2.png)
* Go to Backend Listener
![](img/testPlan.png)
* Select from the dropdown item with the name '`io.github.mderevyankoaqa.influxdb2.visualizer.JMeterInfluxDBBackendListenerClient`'.
![](img/deploy3.png)
## Upgrade
* Close JMeter if its started.
* Remove old jar.
* Put '`jmeter-plugin-influxdb2-listener-.jar`' file from [Releases](https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/releases) to `~Something`', like on the see screen below.
The regex `^(Home Page|Login|Search)(-success|-failure)?$` can be used to save only samplers names. The regex can be generated from JMeter menu.![](img/deploy4.png)
You can modify the generated string in terms of your purposes.
![](img/deploy5.png)
* `useRegexForSamplerList` - allows to use the regexps if set to 'true'.
* `recordSubSamples` - allows to save the JMeter sub samples if set to 'true'.
* `saveResponseBodyOfFailures` - allows to save the response body of the failures.
* `responseBodyLength` - allows saving the response body, not more than the set specified length.## Sending metrics performance tuning
The plugin imports batch with JMeter results each 4 seconds (by default settings). In the logs you will see records like this:
`INFO o.m.j.i.v.InfluxDatabaseBackendListenerClient: Data has been imported successfully, batch size --> 68, elapsed time is --> 14 ms` (the elapsed time is the response time of the batch importing.)
So you can control the flush interval depends on the load you have and adjust `influxDBFlushInterval` setting. Is not recommended having less 1 second.
Max batch protection -> send data when batch max size is occurred. For example, when batch size is 2000 items (it's the default setting of `influxDBMaxBatchSize`) plugin imports that batch, even when flush interval was not occurred.
Using both options you can tune data importing and have optimal performance.Make sure you have enough ram to aggregate huge batch and optimal flush period.
Notes: when test has been interrupted from UI; the processes may not be finished properly, restart JMeter.
## Grafana dashboard capabilities
See deployment instructions here https://grafana.com/grafana/dashboards/13644Dashboard helps:
* Filter the results by Run Id or Type (can be requests or transactions).![](img/filterById.png)
![](img/filterByType.png)* Monitor throughput with active users.
![](img/grafana1.png)* Overview and analise the response time, distribution as well. Added the filters to see requests with status "pass", "fail".
![](img/grafana2.png)
![](img/grafana3.png)* See aggregate report.
The table rendering may take an extra time. The table has hardware resources consuming queries from Influxdb side. If you have low hardware on the Influxdb server - recommended make the clone of the original dashboard and remove aggregate report.
So the idea - it's to have one 'fast' dashboard for the online monitoring (has no aggregate report) to see the results while the test, the second (original with aggregate report) to see the final results.
![](img/grafana4.0.png)Now added the possibility to see the aggregate report for requests with status "pass" only.
![](img/grafana4.1.png)* Investigate errors. The table is interactive, it's possible to filter data in the columns and see details for the specific error. Added the paging.
![](img/grafana5.png)* See network statistics, latency, processing time.
![](img/grafana6.0.png)
![](img/grafana6.1.png)
![](img/grafana6.2.png)* Check individual request details.
![](img/grafana7.png)