We are creating custom metrics in JMeter using beanshell scripting and saving them to a file.Our requirement is to send this metrics to InfluxDB. We tried using Backend Listener with Graphite and InfluxDB implementation client but couldn't send the custom values. Only the default Jmeter metrics are being passed.
Has anyone done this before, can you guide us to resolve this issues.
We are using Jmeter 3.3 and influxdb-1.4.2-1
Thanks,
BB
Two words: line protocol.
Another two words: custom listener (Beanshell/JSR223 with Groovy).
Marry them, and you'll have what you want.
I did that work once, and it didn't take long.
There may be other options (like, take this result file and feed it to script that shapes it to the same line protocol, but post-execution, not live) - but the one I suggest is the simplest.
To do it you can use /write endpoint as it described in influxdb.com
Image below shows how it can be done in Jmeter using "HTTP Request" sampler.
How to send custom data to influxDB:
In a DB it will looks like on image below:
Related
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.
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.
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:
How to write a plugin for JMeter
How to write your own JMeter listener. A guide
and maybe see a reference project like jmeter-backend-azure
I am having trouble figuring out how the datadog forward encodes/encrypts its messages from the datadog forwarder. We are utilizing the forwarder on datadog using the following documentation: https://docs.datadoghq.com/serverless/forwarder/ . On that page there, Datadog has an option to send the same event to another lambda that it invokes via the AdditionalTargetLambdaARNs flag. We are doing this and having the other lambda invoke but the event input that we are getting is long string that looks like it is base64 encoded but when I put it into a base64 decoder, I get gibberish back. I was wondering if anyone knew how datadog is compressing/encoding/encrypting their data/logs that they send so that I can read the logs in my lambda and be able to preform actions off of the data being forwarded? I have been searching google and the datadog site for documentation on this but I can't find any.
It looks like Datadog uses zstd compression in order to compress its data before sending it: https://github.com/DataDog/datadog-agent/blob/972c4caf3e6bc7fa877c4a761122aef88e748b48/pkg/util/compression/zlib.go
I am new to jmeter .Could someone provide me some idea how I can push a json payload using jmeter to my mqtt .
Added mqtt plugin and able to connect to my mqtt server and there is only option for string ,HexString or RandomString .
Also want to know the latency ,throughput for each message,any plugin please suggest ,I am using perfmon for cpu ,memory tracking now .
Just replace your `hi this is Chintamani" with your JSON payload like:
{"hi":"this is Chintamani"}
as JSON is nothing more than a structured string so String type should be just fine.
If you're using xmeter mqtt plugin - it does measure latency
Throughput is being measured by JMeter itself and according to JMeter Glossary it's just a number of requests which JMeter executed for the duration of the test.
You might be interested in Testing the MQTT Messaging Broker for IoT - A Guide article which sheds some light on the specifics of the MQTT load testing using JMeter
I want to perform load test on a Tibco JMS endpoint using JMeter. The endpoint is a JMS Queue Receiver that will reply to the JMS Message to end the sessions. I have done a lot of googling regarding what parameters to fill in each field of the JMS Point-to-Point sampler with no success. Attached is a screen shot of the Jmeter window. I am not sure whether this is the right sampler to use or if I should use Publisher. Either way, I do not know what to fill in each of these fields. I am currently stuck at the JNDI name Request queue field. When I put my queue name for the JMS on Tibco, I get an error that that name is not found. Leaving the field blank is also problematic. What should I fill in this field to make the request work?
We don't know your topic/queue names so we cannot help, you can ask around, see the application you're trying to simulate configuration or use Graphical Administration Tool for TIBCO® EMS to explore the endpoint and identify the proper queues for messages sending/receiving. For sending the messages you might need to set JMS_TIBCO_SENDER JNDI property
You might also be interested in Building a JMS Testing Plan - Apache JMeter article
I am trying to write a program which suppose to send requests to a server using websocket technology, I am using jmeter in order to do that and I am using WebSocket sampler. I am trying to send audio file using this technology anyone can help how to maintain this kind of test using this sampler?
thanks!
I'm not sure what your question is. Do want (a) to write a program to send these websocket requests, or do you want (b) to perform a load test with JMeter?
If (a) you might want to take a look here: https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/74e30c17bdf4cb90a9a22e3eca7ef581106a01a7/src/main/java/eu/luminis/websocket/?at=master
You could use the WebSocketClient class to setup a websocket connection and use its sendBinaryFrame method to send an audio file.
If (b) install the plugin https://bitbucket.org/pjtr/jmeter-websocket-samplers, see the readme for how to use it.