Home

Awesome

JMeter InfluxDB v2.0 listener plugin

<img src="https://badges.frapsoft.com/os/v3/open-source.svg?v=103" width="500">

<p align="left"> <img src="https://img.shields.io/github/license/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic"> <img src ="https://img.shields.io/github/v/release/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic"> <img src="https://img.shields.io/maven-central/v/io.github.mderevyankoaqa/jmeter-plugins-influxdb2-listener?style=plastic"> <img src="https://img.shields.io/github/downloads/mderevyankoaqa/jmeter-influxdb2-listener-plugin/total?style=plastic"> <img src="https://img.shields.io/github/stars/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic&color=gold"> <img src="https://img.shields.io/github/forks/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic"> <br> <img src="https://img.shields.io/github/repo-size/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic"> <img src="https://img.shields.io/github/issues/detail/age/mderevyankoaqa/jmeter-influxdb2-listener-plugin/1?style=plastic&color=purple"> <img src="https://img.shields.io/github/commit-activity/m/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic&color=red"> <img src="https://img.shields.io/github/contributors/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic"> <img src="https://img.shields.io/github/last-commit/mderevyankoaqa/jmeter-influxdb2-listener-plugin?style=plastic"> <img src="https://badgen.net/github/closed-issues/mderevyankoaqa/jmeter-influxdb2-listener-plugin"> </p> <h3> <summary>Support project ❤️ </summary> <details> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H8L62WL5HVD32"> <img src="https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png" alt="Donate with PayPal" /> </a> </details> </h3> <h3> <summary>Like what you see? 😍 </summary> <br> <a href="https://www.buymeacoffee.com/mvderevyanko"> <img alt="Coffee2" src="https://raw.githubusercontent.com/mderevyankoaqa/jmeter-elk/main/img/Coffee2.png" width="150"> </a> </h3>

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:

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. 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 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:

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 The example of the adding plugin to the project with the jmeter-maven:

      <configuration>
            <jmeterExtensions>
              <artifact>io.github.mderevyankoaqa:jmeter-plugins-influxdb2-listener:2.8</artifact>
            </jmeterExtensions>
        </configuration>

Some notes cab be found in the article Adding jar's to the /lib/ext directory.

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 the section 'developers'

developers {
    developer {
    id = 'your github if'
    name = 'your name'
    email = 'email'
    }

Deployment

Note: "fatJar" gradle task should be used to create the package for the JMeter.

Upgrade

InfluxDB configuration

Plugin configuration

Let’s explain the plugin fields:

You can modify the generated string in terms of your purposes.

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/13644

Dashboard helps: