Skip to content

A JMeter plug-in that enables you to send test results to a Kafka server

License

Notifications You must be signed in to change notification settings

gitter-badger/jmeter-backend-listener-kafka

 
 

Repository files navigation

jmeter-backend-listener-kafka

Codacy Badge Build Status

A JMeter plug-in that enables you to send test results to a Kafka server.

Overview

Description

JMeter Backend Listener Kafka is a JMeter plugin enabling you to send test results to a Kafka server. It is meant as an alternative live-monitoring tool to the built-in "InfluxDB" backend listener of JMeter. It is inspired from JMeter ElasticSearch backend listener plug-in.

Features

  • Filters
    • Only send the samples you want, by using Filters! Simply type them as follows in the appropriate field: filter1;filter2;filter3 or sampleLabel_must_contain_this.
  • Specific fields field1;field2;field3
    • Specify fields that you want to send to Kafka (possible fields below):
      • AllThreads
      • BodySize
      • Bytes
      • SentBytes
      • ConnectTime
      • ContentType
      • DataType
      • ErrorCount
      • GrpThreads
      • IdleTime
      • Latency
      • ResponseTime
      • SampleCount
      • SampleLabel
      • ThreadName
      • URL
      • ResponseCode
      • TestStartTime
      • SampleStartTime
      • SampleEndTime
      • Timestamp
      • InjectorHostname
  • Verbose, semi-verbose, error only, and quiet mode:
    • debug : Send request/response information of all samplers (headers, body, etc.)
    • info : Sends all samplers to the Kafka server, but only sends the headers, body info for the failed samplers.
    • quiet : Only sends the response time, bytes, and other metrics
    • error : Only sends the failing samplers to the Kafka server (Along with their headers and body information).
  • Use Logstash or any other tool to consume data from Kafka topic and then ingest it into a Database of your liking.

Maven

<dependency>
  <groupId>io.github.rahulsinghai</groupId>
  <artifactId>jmeter.backendlistener.kafka</artifactId>
  <version>1.0.0-SNAPSHOT</version>
</dependency>

Packaging and testing your newly added code

Execute below mvn command. Make sure JAVA_HOME is set properly

mvn package

Move the resulting JAR to your JMETER_HOME/lib/ext.

Screenshots

Configuration

screnshot1

Sample Grafana dashboard

screnshot1

Sample Grafana dashboard

screnshot1

For more info

For more information, here's a little documentation.

Contributing

Feel free to contribute by branching and making pull requests, or simply by suggesting ideas through the "Issues" tab.

Code Styling

Please find instructions here on how to configure your IntelliJ or Eclipse to format the source code according to Google style. Once configured in IntelliJ, format code as normal with Ctrl + Alt + L.

Further Changes

Adding the XML file alone and auto-formatting the whole document could replace imports with wildcard imports, which isn't always what we want.

  • To stop this from happening, Go to FileSettingsEditorCode StyleJava and select the Imports tab.
  • Set Class Count to use import with '*' and Names count to us static import with '*' to a higher value; anything over 999 should be fine.

You can now reformat code throughout your project without imports being changed to Wildcard imports.

About

A JMeter plug-in that enables you to send test results to a Kafka server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%