user1561528
user1561528

Reputation:

Create a custom backend listener for jmeter for sending test variables and other data to Influxdb

I have a requirement to send custom parameters, variables and properties to InfluxDB as a part of my Jmeter tests so that we can analyze test data based on the functionality of the application. As of now I can use backend listener for influxdb but it only has limited fields which would not be helpful in my case since I want to send more relevant data based on the application functionality. Can someone point/help with right resources to develop a custom backend listener to send custom data to InfluxDB from jmeter and not depend on the existing listener. I want a flexible option to send data as per our application and not restrict to only fields in listener.

Currently I am using a View Results in table to save this custom data to CSV files. The sample is shown in below snapshot. enter image description here

To do this I have modified our user.properties files and specify the sample_variables, like below: sample_variables=employee_code,user_id,transName,transType,transVer,deptID,deptType,deptName

But instead of using an additional listener, I would like to send these variables for EACH HIT (for every sample) to the influxDB. How do I achieve it? Any further help would be appreciated.

Upvotes: 0

Views: 2660

Answers (1)

Dmitri T
Dmitri T

Reputation: 168147

The easiest option is just using normal HTTP Request sampler to send the metrics you want via InfluxDB API.


If you still want to implement a custom listener you can first of all take a look at the existing Backend Listener code

Then get familiarized with the following materials:

and maybe see a reference project like jmeter-backend-azure

Upvotes: 0

Related Questions