This is a plugin for JMeter that allows writing load test data on-the-fly to the InfluxDB database (time-series database) or the Grafana Loki database (multi-tenant log aggregation system). Below is the list of use cases for using this plugin:
- Send all sampler metrics to InfluxDB and use Grafana to visualize and analyze a performance test result
- Send all sampler response data to Loki and use that data to analyze a performance test result
If you are interested in this project, please drop a ⭐!
- Send all Sampler metrics to InfluxDB
- Send all response data to Grafana Loki
- Allow users to add external labels when sending data to Loki
Please make sure the following software is installed on your machine so you can build and test the project:
- Java 11 or later
- Gradle 6.7 or later
Check out the project to the directory on your local machine and run:
gradle check
To build the plugin from source code
gradle releasePlugin
To build the plugin and copy it to JMeter plugin for the
JMETER_HOME=/path/to/jmeterfolder gradle releaseHotDebug
Step 1: Build the plugin from source code or download the latest version from jmeter-backend-listener
Parameter | Description | Required | Type |
---|---|---|---|
testName | the influxdb field value | x | String |
nodeName. | the influxdb tag value | x | String |
influxDBProtocol | the protocol that is used to connect InfluxDB http or https | x | String |
influxDBHost | InfluxDB host name | x | String |
influxDBPort | InfluxDB port | x | Number |
influxDBUser | username to authenticate InfluxDB | String | |
influxDBPassword | password to authenticate InfluxDB | String | |
influxDBDatabase | database to store metrics values | x | String |
retentionPolicy | retention policy that applied for metrics values | x | String |
samplersList | Regex pattern to filter the samplers | String | |
useRegexForSamplerList | enabled filter samplers by regex pattern | Boolean | |
recordSubSamples | enabled record sub samplers | x | Boolean |
Parameter | Description | Required | Type |
---|---|---|---|
lokiProtocol | the protocol that is used to connect Loki http or https | x | String |
lokiHost | Loki host name | x | String |
lokiPort | Loki port | x | Number |
lokiApiEndPoint | API Endpoint to send the logs | x | String |
lokiBatchSize | The total of logs data that are contained in each request send to Loki | x | Number |
lokiLabels | External labels that are included in the Loki logs. This will be useful when users need to analyze and query response logs by test plan | x | String |
lokiSendBatchIntervalTime | Interval time to send the response data to Loki | x | String |
lokiLogResponseBodyFailedSamplerOnly | Only send the response body of a failed test. This will reduce the request body size when running a performance test with a large number of VUs | x | Boolean |
lokiBatchTimeout | Timeout for expiring unused threads after 10 batch intervals, the value is milliseconds | x | Number |
lokiConnectionTimeout | Timeout for connecting to Loki, the value is milliseconds | x | Number |
lokiRequestTimeout | imeout for process request to Loki, the value is milliseconds | x | Number |