Overview:
In this article, I will explain how we could get real time performance test results using JMeter + InfluxDB + Grafana.
Please do note that this topic is too huge to cover everything in one article. So, I have tried to provide links to other articles of TestAutomationGuru which could be related to this article. Please check everything if possible.
Problem Statement:
When I used to run my JMeter test many years ago, I was unable to understand the performance of the application during the test execution. I always had to wait for the test to complete. It was little bit annoying – especially during long running tests. Sometimes, I might have to run the soak test for 2/3 days continuously.
At some point, JMeter had enabled the summariser output from its version 2.11 in Non-GUI mode. You could see below output when you run your JMeter test.
It was little bit helpful & above summary gives decent amount of information you would need while the test is running. It shows the minimum, maximum, average responses times, throughput, error count, no of active users for every 30 seconds (summary interval can be changed in jmeter.properties).
But when the test runs for hours & when you have huge amount of summariser output in the console for every 30 seconds, It might be a bit difficult to understand the results. For ex, If I would like to know the active user count at which the rate drops, I need to go through the summariser output line by line very carefully! I can not share the results with the development team/application architect as the results are not in a very user friendly format. To create a nice graph, I needed to wait for the JMeter test to finish.
So, Instead of writing this summariser output in a console, I modified the JMeter’s summariser class to send the results to a database – So that I could create a nice chart by querying the DB. It was extremely helpful for our team to analyze the performance test results in real time. JMeter also added a separate listener from its version 2.13 which sends the data to a database which could help us in getting real time results.
I would be covering both JMeter’s approach and my approach. You could follow either of these. NOT Both!!
Solution 1:
Backend Listener – JMeter implementation:
JMeter v2.13 has introduced a new listener to send the results to a time-series database (influxdb/graphite) while the test is running. By configuring Grafana (an open source metrics dashboard) to connect to the influxdb/graphite, We can create nice graphs which will help us getting the real time metrics while the JMeter is running the test!!
Time-Series Database: time series is the sequence of data taken over time. Time-series database is a software application which handles the time-series data. Imagine it like a sql-table in which time is the primary key!
We would be using InfluxDB as our database in this post. Check here for more information.
Few Terminologies you might want to know:
- Measurement -> This is equivalent to RDBMS Table
- Series -> Each and every record of Measurement. It is like Rows of the table.
- Tags -> Optional column of the table. It is indexed column for faster search.
- Tag key -> name of the indexed column
- Tag value -> indexed value
- Field -> This is the column which stores the actual data you want to measure. Like response time of a page.
JMeter & InfluxDB Integration:
InfluxDB Setup:
- Download InfluxDB.
- Check this link for InfluxDB setup. [Note: at this time of writing this post, v1.3 is latest influxDB version. If this link does not work, Please check the influxdb site for more information.]
- Locate the config file of influxdb
- either here: /opt/influxdb/shared/config.toml
- or here : /usr/local/etc/influxdb.conf
- If you are unable to locate the config file, You can make influxdb display the default config. Execute below command.
influxd config
- The command will display all the default values. Copy the values and create a config file yourself.
- JMeter uses graphite protocol to write the values into InfluxDB. So, locate graphite protocol section in the InfluxDB config file and enable it as shown here.
[[graphite]]
enabled = true
bind-address = ":2003"
database = "jmeter"
retention-policy = ""
protocol = "tcp"
batch-size = 5000
batch-pending = 10
batch-timeout = "1s"
consistency-level = "one"
separator = "."
udp-read-buffer = 0
- Once it is modified, restart the influxdb server with below command to make the changes effective.
influxd -config /path/to/config/file
- Check the InfluxDB log for any error. At this point, InfluxDB should be up and running fine.
Once InfluxDB is up and running, then the next step is to create a JMeter test which sends the data to InfluxDB.
JMeter Setup:
- Ensure that you have Java version 8 or above.
- Download JMeter version 3.3 or above
- Launch JMeter. Create a simple test.
- Add Backend Listener.
- Update the InfluxDB server IP, port details as shown above
- Run the test. Wait for few seconds
- Check the JMeter log if there is any connection error related to sending data to InfluxDB. You should not see any error! if there is any, Check here for the steps to troubleshoot. Then come back and continue from here!
InfluxDB – Shell commands:
- Execute below commands in the machine where InfluxDB is running.
influx
Connected to http://localhost:8086 version 1.3.6
InfluxDB shell version: 1.3.6
- Execute the below command to see the list of databases.
SHOW DATABASES
name: databases
name
----
_internal
jmeter
- Execute below command to use JMeter DB.
USE jmeter
Using database jmeter
- Execute below command to see the list of tables or measurements under JMeter DB.
show measurements
name: measurements
name
----
jmeter.all.ok.count
jmeter.all.h.count
jmeter.all.ok.min
jmeter.all.ok.max
jmeter.all.ok.avg
...........
- At this point, you would see a bunch of measurements created in InfluxDB. JMeter has created those measurements in the ‘jmeter‘ database.
Hope you are able to send the test results to InfluxDB successfully!!! Congrats. Now it is time for us to setup Grafana server to create charts from the test results.
Grafana-InfluxDB Integration:
- Download Grafana
- Start the Grafana server. (In my windows, I have the exe here -> GRAFANA_HOME/bin/grafana-server.exe)
- Launch browser with this URL http://localhost:3000 to access the Grafana home page.
- Update Grafana data source to point to the InfluxDB instance.
- Click on the Test connection to ensure that Grafana can connect to the InfluxDB.
- Create a new dashboard.
- Lets add a Graph panel
- Once added, Click on the panel title to edit and add query to display the metric you are interested in. Check this video to create a chart on min value metric.
Hopefully you got the idea now!! You can go from here to create different metrics as you want!!
I have created decent looking dashboards for my applications. You can continue reading this article, download and use them!
Problem with JMeter’s Backend Listener:
JMeter’s Backend Listener really helps us in getting the real time performance test results. However, It creates a tons of measurements. The ‘min’, ‘max’ values might match with your aggregate report. But you can not expect the percentiles, throughput, avg to match with your aggregate report!! Because This listener calculates these values for every given interval (like every 1 second). You basically get throughput, avg over time. Not for the whole duration of the test. So, It does not match.
My custom approach helped me to get the results the way I wanted.
Solution 2:
Custom Listener [TestAutomationGuru Implemenation]:
Due to the above mentioned limitation of the JMeter’s Backend Listener & in order to meet my goals, I just wanted to go with my own implementation – by updating the Apache Core library which has the summariser (it is responsible the writing the above mentioned aggregate info in the console) – So whenever it writes the info in the console and it can also update the data in the InfluxDB. Not creating a separate listener for this purpose seems to be ok to me as adding more listeners to the test will consume memory and might affect my test. Performance wise – this approach performs better than the adding new backend listener because I do not have to add any additional logic for the calculation.
InfluxDB Setup:
- Enable HTTP API in the InfluxDB config file for writing the results in InfluxDB. Restart InfluxDB.
[http]
# Determines whether HTTP endpoint is enabled.
enabled = true
# The bind address used by the HTTP service.
bind-address = ":8086"
InfluxDB – Shell commands:
- Execute below commands in the machine where InfluxDB is running.
influx
Connected to http://localhost:8086 version 1.3.6
InfluxDB shell version: 1.3.6
- Execute the below command to create a new DB – jmeter (if it is not there already)
CREATE DATABASE jmeter
JMeter Setup:
- You DO NOT need to add any listener to your test!
- Download the modified Apache JMeter’s core library – Replace the existing one in the lib/ext folder. Better to have a backup for the old one before replacing. You should use JMeter version 3.3.
TAG-Influx-Grafana.zip (15440 downloads)
- It will expect below properties. Update user.properties file / pass below properties to the test using commandline / ant etc.
# True to send data to influx db
summariser.influx.out.enabled=true
# True to send write the info it sends to influx db - enable only for debugging purpose
# summariser.influx.out.enabled=false
# Influx host, port, db details details
summariser.influx.url=http://localhost:8086/write?db=jmeter
# use below format if there is any username & password for influxdb
# http://localhost:8086/write?db=jmeter&u=myusername&p=mypassword
# Name of your application - Useful for querying the results when you use this framework for multiple applications
# Do not add any space or dot or any other special chars
summariser.influx.application=myApp
# Perofrmance test strategy - Useful for querying the results when you use this framework for multiple strategies
# Do not add any space or dot or any other special chars
summariser.influx.application.suite=stress-test
# timeouts
summariser.influx.connection.timeout=5000
summariser.influx.socket.timeout=5000
summariser.influx.request.timeout=5000
- Run any JMeter test for sometime in the NON-GUI mode enabling summariser. It should send the data to InfluxDB.
InfluxDB – Shell commands:
- Execute the below command to see the list of databases.
SHOW DATABASES
name: databases
name
----
_internal
jmeter
- Execute below command to use JMeter DB.
USE jmeter
Using database jmeter
- Execute below command to see the list of tables or measurements under JMeter DB.
show measurements
name: measurements
name
----
delta
samples
total
Note:
- If you use testautomationguru’s modified apache_core jar, then you do NOT need ‘Backend Listener‘. The jar itself will take care of sending the results.
- If the apache core library could not reach InfluxDB within the timeout – It will never retry to post the data for the test. This is as per my design! The server could be down or it could be a firewall issue. I do not want to keep trying as it could affect the test performance. Make sure it is reachable.
- This plugin has been designed to post the data only in the Non-GUI mode testing. Running the test in GUI mode is never recommended!
If you are still facing issues in sending the data to InfluxDB - Check this post to troubleshoot.
Grafana Dashboard:
The downloaded zip file should also contain the Grafana dashboards (in JSON format). Import those dashboard files in Grafana (You can find the Import feature under Home as shown below) – Please install Grafana pie chart plugin before importing these dashboards – check here.
Once it successfully imports, It will create dashboards as shown below. It takes the data from delta and total measurements to show the appropriate metrics. (Make sure that your Grafana has the datasource set correctly. It should point to the InfluxDB instance where we post the data).
Aggregate Dashboard:
Samples Dashboard:
This dashboard will retrieve the data from Samples measurement. You can filter further based on specific page, their status etc. Sometimes, when the request fails (say some auth error), the response time might be very less – so throughput will be huge. This is not right. This is why I have the status filter to get the success only throughput.
By adjusting the ‘Summarize’ drop down, Let grafana calculate the throughput for different intervals.
Summary:
Using JMeter’s Backend listener / Custom listener + InfluxDB + Grafana – we can create stunning charts which will give us the real time metrics of the test which is being run by JMeter. If you have a long running tests, You do not need to wait for the test to finish to access the results. Just share the Grafana dashboard URL – so that anyone with link can see what is going on!
Please check below articles as well which are related to this.
Having Issues?
Note: Make sure that the system time of the Influx server is in sync with the machine which runs JMeter. This is very important. Because when you query Influxdb – by default it shows the records which has the time as <= system time. If the JMeter machine’s time is, say 4:50 PM. InfluxDB server system time is 4:45PM. When you run JMeter test, It will be able to post the records to InfluxDB. However when you query influxdb, It will not show these records. You need to wait for 5 mins to see the records inserted.
Even after following all the steps, It does not work as expected? No problem; Check here for the steps to troubleshoot.
Happy Testing & Subscribe 🙂
How to create dashboard in Grafana for jmeter?????????
Once the data is posted in InfluxDB, update the datasource for Grafana. It should point to InfluxDB.
http://docs.grafana.org/guides/gettingstarted/
how to setup influxdb +grafana in windows machine?
I run influxdb in my linux machine. I see that there is an installable for Windows as well. Grafana is installed in one of my windows machine. You just the follow the steps in the site as it seemed to be clear in the site & I did not want to give the same steps here related to installation of these softwares.
If any specific issues, please post it here.
Thanks for your feedback.
I followed the setup specified above but did not see test result statistics being posted on influx db. I noticed following error in jmeter.log –
2015/11/11 14:20:45 ERROR – jmeter.visualizers.backend.graphite.TextGraphiteMetricsSender: Error writing to Graphite:Connection refused
influx db is up and running on http://localhost:8083/ and I can list the “jmeter” db using query – SHOW DATABASES
So why do I get connection refused error?
I should have mentioned that all of my setup is local that is JMeter, influx db
I assume you have updated the config file & port is open! How do you start the influxdb? Influxdb should read the config file if you had enabled graphite.
influxd -config /usr/local/etc/influxd.config
one more thing, following command does not return me any o/p hence seems nothing is being listened on port 2003
netstat -a | grep 2003
I restarted influxdb multiple times but was of no avail.
Did you make sure that influxdb reads the config file you updated?
How can I make so ?
How u created the summary dash board.
kindly share grafana query?
Ragesh,
If you refer to my summary dashboard – each & every stat is a separate query. Also I am not using Backend listener. I modified few classes of JMeter to get the stats I wanted. But we can do something similar with backend listener as well.
For ex:
If you need throughput which is number of requests processed per unit time – you can query “jmeter.all.a.count” – group by 1 sec, 1 min as you want.
select sum(value) from “jmeter.all.a.count”
Group by field – enter 1s or 60s
Is it possible to set up summary dashboard with out backend listener ?kindly share more details please?
kindly share further details of “With new backend listener, We do not need to wait for the jmeter test to finish to get the results”
Ragesh, I thought the above article explains how!
If you do not use the backend listener, except from the summary in the console – there is no way to get the results in the Non-GUI mode. You need to wait for the test to complete & access the jtl, create the charts you want.
But with this listener & by using InfluxDB + Grafana – you can create charts while the Jmeter is running the test.
I was trying this last evening. The config file for me is located at “/etc/opt/influxdb/influxdb.conf”. When I enable graphite, the DB does not start.
Interesting… hope you did not mess up with the config file!
Are you sure you stopped influxdb & restarted?
If JMeter is only sending the 90, 95 and 99th percentiles to InfluxDB as summaries, how are you working out the Average response time for your graphs? Or is there another way to send the actual response times rather than a grouped summary of percentiles that I haven’t seen?
I am not using Backend Listener. I send the summary info – while logging the information in console, it also sends the data to InfluxDB. I had to modify few classes of JMeter to achieve this.
“I modified few classes of JMeter to get the stats I wanted.” – are you going to contribute those changes back into JMeter & Grafana?
I will try to do that Sir.
Please check the post again for the new sections I have added which might clarify your question.
Custom Listener
Download
Grafana Dashboard
Can you please share JSON for summary dashboard ?
Ajay,
You would not need that as I am not using backend listener. My influxdb table/measurements details are different.
Thanks for the configuration document. However I am not able to see any information in Grapahana.
I added all required information. When I run the query select * from “jmeter.all.a.count” , I can see influx db shows results. It means from Jmeter, results are getting into DB.
I added data source in Grapahna. Make sure Test connection works properly. Even if I added wrong settings in edit data source form, grafana still shows data source is working.
I added required configuration as mentioned in above post, but I don’t see any graphs getting plots in dashboard.
Not sure what is missing at my end. Would you be able to share your dashboard Jason file?
I do not mind sharing the dashboard json. But it might not work you.
Did you change the grafana time interval as per the date&time of the data?
Niraj,
Please check the post again for the new sections I have added which might clarify your question.
Custom Listener
Download
Grafana Dashboard
i can see “jmeter.xxxx.a.count” when i do “show measurements “.
But select * from “jmeter.SMTP.a.count” returns nothing. Am I missing something?
If the data is present, it should appear. I am sorry that I have not faced anything like that – so unable to find the answer for you.
I would request you to ask this in StackOverFlow.com as someone else could answer this.
Sorry for the very later reply.
i am using backend listener and getting “Metrics” in influxdb as mentioned on “http://jmeter.apache.org/usermanual/realtime-results.html” link. is it possible to generate summary dashboard using these metrices?
i generated some real time graphs in grafana but not sure about query for all graphs like agv response time, req/sec….
It depends on the data you have. ‘avg response time’ you might not have as jmeter does not post the info. But you have median, 90% line, min, max etc.
For throughput, you already have the ‘count’ which gives the no of requests processed / sec.
I have installed InfluxDB on Windows. I am able to create database through its web interface and command line. However I am not able to locate the config file. The installation folder contains only two executable files and user directory contains few temporary binary files. The Jmeter Backend listener is not able to push data to InfluxDB, so I would like to check the config file. Any help?
When i was trying to install few months ago I got a weird error. But if you were able to get that installed successfully, You should be able to use InfluxDB CLI option to find/modify the config.
https://influxdb.com/docs/v0.9/administration/config.html
Would it possible for you to open source your approach of not using Backend Listener. I encountered bad throughout when using Backend listener for load and would like to try your approach.
I noticed that. It keeps sending tons of requests to influxdB when we use backend listener. So It might the jmeter performance itself.
I did my above approach for my project by hardcoding certain places. I am not sure if i can share the code, but I will share the approach as a separate post.
That would be great
Hi there,
was curious to check if you had time to make your approach public?
Tarun,
Working on it. I am also working on a post on how I have implemented.
Tarun,
Please check the post again for the new sections I have added which might clarify your question.
Custom Listener
Download
Grafana Dashboard
Hi there,
Thanks for sharing the download. Is it possible to share the source code with description of change in classes/method/etc done. This would help others to build on the awesome work you have done.
Great Article, appreciate your time in writing and sharing ..
Is that possible for you to come up with an article on JMeter, Jenkins setup (like step by step) and share the report to email id’s after the load test (and also with distributed mode in Jenkins).
Thanks in advance
Sure! 🙂
Hello All,
I want to config ans show info “response time” of jmeter to InfluxDB and Grafana .
Can you help me .
It is not possible with backend listener. I was able to show the info by modifying jmeter source code. Whenever it logs the console summary, I log that info in the influxdb as well.
I am planning to create a separate listener. Will let you know once done.
I have done everything you have mentioned above. When I select ‘Show Measurements’ nothing is displayed which means jmeter does not connect with influxdb. I exactly followed the steps given by you and did nothing extra. Kindly assist me to get the data displayed in influxdb. Also clarify what I need to do that is menitioned in 3rd point ‘Update the influxdb server ip, port details as given below’.
Are you sure that influxdb is up and running?
You need to provide the machine ip, port details, where influxdb is running, in the backend listener.
JMeter generates a table in influxdb, but no data
JMeter generated in the influxdb table but there is no data in the table
Please check the post again for the new sections I have added which might clarify your question.
Custom Listener
Download
Grafana Dashboard
If you are getting frustrated with the built-in Backend Listener in JMeter…it’s quite easy to roll-your-own with a JSR223 Listener …using Groovy or Java, just create an AsyncHTTPBuilder …use a string builder to create the string for InfluxDB writing and let it run!
I’ll write up a blog post about this.
Hi,
I could’t find config file of influxdb in this location: /opt/influxdb/shared/config.toml or /usr/local/etc/influxdb.conf.
I’m using UBUNTU12 version OS
If you are unable to locate the file, you can still generate a config with default values and modify.
Check this:
https://docs.influxdata.com/influxdb/v0.9/administration/config/
Installed on my windows machine due to which i am not able to find the path /opt/influxdb/shared/config.toml or /usr/local/etc/influxdb.conf
to edit the config file and add the jmeter text.
Could you please let me know how to overcome the above issue or provide the windows installer where the jmeter text is added to the config file.
Can you provide the link for InfluxDB – windows installable? I could not locate 🙁
Please find the InfluxDB Windows installable.
https://s3.amazonaws.com/influxdb/influxdb_0.9.4.2_amd64.msi
If you are unable to locate the config file, You can make influxdb display the default config.
For ex: influxd.exe config
This command displays all the default values. So create a config file with default values and modify as you need.
Then restart influxdb with below command to make the changes effective.
influxd.exe -config /path/to/config/file
Could you please let me know how to create the config file or provide a link which helps me in writing the config file
Please see the updated post in creating the config file.
—————————————–
If you are unable to locate the config file, You can make influxdb display the default config.
For ex: influxd.exe config
This command displays all the default values. So create a config file with default values and modify as you need.
Then restart influxdb with below command to make the changes effective.
influxd.exe -config /path/to/config/file
Please let me know the steps to create the config file and add the text
Dear Friend, I do not understand your question. You already paste the whole config file in the comment section (which i deleted). You need to modify it and restart influxdb by pointing it to the modified config file you want use.
If you are looking for any immediate assitance, I would request you to raise your issue in stackoverflow.com.
Hi,
I think i confused you, let me make it clear by the steps i followed
Opened the command prompt
typed the command C:\Program Files (x86)\InfluxDB>influx config
it displayed the config file contents
now the question was how to edit the file to add the below text to the config file.
[[graphite]]
enabled = true
bind-address =”:2003″
database =”jmeter”
# protocol =”tcp”
# consistency-level =”one”
# name-separator =”.”
after browsing i found a way i.e download the config file by the below command
influxd config > C:\Users\*****\Downloads\influx.conf.
eidt the file and update the config with jmeter text to get the jmeter reulsts.
later i pointed the new config file as below.
influxd -config/influxd config > C:\Users\*****\Downloads\influx.conf
and then started the influxdb.exe
to check if the jmeter text is updated i typed the below command
influxd config but i couldn’t see the updated text.
could you please let me know if anything else missed did i point the updated config file correctly?
Note: I am installing it on the windows machine.
Hello,
Sorry for my bad description.
It’s possible to export your Dashboard configuration from grafana and give us to download.
In aime to have the same Dashoboard and Metric from JMeter tests like the screen your show at the end of the article.
Thank you
Please check the post again for the new sections I have added which might clarify your question.
Custom Listener
Download
Grafana Dashboard
hi There,
i have done all your steps mentioned by youand get connect with influxdb,also created database “jmeter”.
when i am fetching records through influxdb by following commands
SHOW MEASUREMENTS
result: measurements
name
httpd
runtime
shard
subscriber
write
for select query mention in your steps
select * from “jmeter.all.a.count”
result: Success! (no results to display)
ERROR: when i am running my script in jmeter its thrwing error
ERROR – jmeter.visualizers.backend.graphite.TextGraphiteMetricsSender: Error writing to Graphite:Connection refused.
Also clarify what I need to do that is menitioned in 3rd point ‘Update the influxdb server ip, port details as given below.i have given my machine ip for same
Looks like jmeter is not able to post the data to influxdb. Make sure that firewall and ports are open.
Hi vlns,
I really liked this blog and appreciate your help.. One quick question i have though, what is the query you used to capture the following metrics
1. Active Users
2. Total Request
3. Failed Requests, Failed%
Please check the post again for the new sections I have added which might clarify your question.
Custom Listener
Download
Grafana Dashboard
earlier …I missed the new section.
This is Awesome great stuff! works like a charm
Thank you a lot for the Grafana Dashboard !
I am following this post regularly and you have updated the content as expected, May I ask you one more … How to get the Hardware and individual transaction name metrics ?
I am working on it.
But what do you mean by hardware metrics?
May be i will rephrase the question, is there a way to get jp@gc perfmon metric listener data to influxdb and then to grafana ?
Dowloaded the jar file and updated the user.properties file. Opened the jmeter.bat file but the metrics delta & total are not displayed in the influx db
Could you please explain the below
It will expect below properties. Update user.properties file / pass below properties to the test using commandline / ant etc.
i have updated the user.properties file but didnt understand what next how to pass the properties file using the commnadline?
Great article !
At first I must say that this is brilliant tutorial that made my pareformance monitoring on the higher level :3 <3 Thanks a lot !
I am very interesting with your custom backend listener.
I tried to use it, but my InfluxDB says that POST request to the DB is incorrect and it response error code 400 like it is mentioned here https://github.com/influxdata/influxdb-php/issues/24 .
My question is, which version of InfluxDB do you use and operating system ?
This is something that i really want to use in my project and I'm going to be glad for any further help 🙂
Thanks.
I feel that it could be due to some space or any spl characters in the project name or suite name. I need to fix it. Can you try as shown in the example and let me know?
Can you send the your test’s log file it to me?
I didn’t expected such a fast response 🙂
Today I tried it with the same setting that you have in example, with sampler name HTTP_Sampler and still have got the same problem both with InfluxDB 0.9.3 on Windows and 0.9.4 and 0.10.1 on Linux . You mean logs from jmeter or from InfluxDB ?
Jmeter log will be helpful – there I log the string to be posted in InfluxDB. I would like to see if anything wrong with the data I post.
Here you have jmeter.log
http://pastebin.com/QfM5NNKu
And part of log form InfluxDB where the error is catched
[http] 2016/03/16 23:25:30 127.0.0.1 – – [16/Mar/2016:23:25:30 +0100] POST /write?db=jmeter HTTP/1.1 400 171 – – fd9c4622-ebc5-11e5-8002-000000000000 0
[http] 2016/03/16 23:25:30 127.0.0.1 – – [16/Mar/2016:23:25:30 +0100] POST /write?db=jmeter HTTP/1.1 400 173 – – fd9cbb54-ebc5-11e5-8003-000000000000 0
user.properties config set to
summariser.influx.db=jmeter
summariser.influx.project=jmeterproject
summariser.influx.project.suite=jmeterprojectsuite
Do you change the number format somewhere? If you see 0.6 is shown as 0,6
‘,’ is not allowed in influxdb and should be escaped properly.
2016/03/16 23:25:03 INFO - jmeter.reporters.Summariser: summary + 1 in 2s = 0,6/s Avg: 1155 Min: 1155 Max: 1155 Err: 0 (0,00%) Active: 1 Started: 1 Finished: 0
2016/03/16 23:25:03 INFO - jmeter.reporters.InfluxMetricSender: project=jmeterproject,suite=jmeterprojectsuite ath=1,sth=1,eth=0,count=1,min=1155,avg=1155,max=1155,err=0,errpct=0,00,rate=0,59
I don’t even know where in JMeter is place to change number format , could it be related with my regional setting in Windows, because in my counter comma ‘,’ is used in float representation ?
Yeah, I am right 🙂 It is related to OS Regional settings.
In my country (Poland) comma ” , ” is used in float number represantation instead of dot. After change everything is correctly sending to InfluxDB.
https://en.wikipedia.org/wiki/Decimal_mark
How can I now select results from different samplers ? Now I don’t have samplername field in DB.
Again huge thanks for help here 🙂 Great job for QA community
Truely a very good article on how to handle the future technology. After reading your post,thanks for taking the time to discuss this, I feel happy about and I love learning more about this topic.keep sharing your information regularly for my future reference. If anyone wants to QTP training means please visit below website.
Hi,
I have a working Influxdb,grafana setup. Jmeter graphite listener is working with localhost and 8086 port. All of my setup(jmeter/influxdb/grafana) is in the same server.
But your instructions are not working for me. I have uploaded new Apache Core library and updated user propertise file with correct parameters. But I still don’t see “delta” “total” metrics in my influxdb.
I have tried the command prompt syntax also like below but still don’t see the metrics in the database.
jmeter -n -t JDBC_LOAD_TEST.jmx -Jsummariser.influx.out.enabled=true -Jsummariser.influx.ip=localhost -Jsummariser.influx.port=8086 -Jsummariser.influx.db=jmeter
For some reason my Jmeter is trying to connect to “X.X.X.X”. Do you have this IP in your code?
Any help to make this work will be apprecated.
Thanks,
Satish
Oh…! Can you try it with summariser.influx.ip=127.0.0.1?
I will fix it.
Both of these didn’t work.
jmeter -n -t JDBC_LOAD_TEST.jmx -Jsummariser.influx.out.enabled=true -Jsummariser.influx.ip=127.0.0.1 -Jsummariser.influx.port=8086 -Jsummariser.influx.db=metrics
jmeter -n -t JDBC_LOAD_TEST.jmx -Jsummariser.influx.out.enabled=true -Jsummariser.influx.ip=localhost -Jsummariser.influx.port=8086 -Jsummariser.influx.db=metrics
I case see below messages in influxdb log but not measurements in influxdb.
[http] 2016/04/07 18:11:00 127.0.0.1 – – [07/Apr/2016:18:11:00 -0400] POST /write?db=metrics HTTP/1.1 204 0 – – 9c7a9056-fd0d-11e5-8001-000000000000 739.9µs
[http] 2016/04/07 18:11:05 127.0.0.1 – – [07/Apr/2016:18:11:05 -0400] POST /write?db=metrics HTTP/1.1 204 0 – – 9f87d19c-fd0d-11e5-8002-000000000000 1.1582ms
[http] 2016/04/07 18:11:30 127.0.0.1 – – [07/Apr/2016:18:11:30 -0400] POST /write?db=metrics HTTP/1.1 204 0 – – ae5455ea-fd0d-11e5-8003-000000000000 1.1709ms
[http] 2016/04/07 18:11:44 127.0.0.1 – – [07/Apr/2016:18:11:44 -0400] POST /write?db=metrics HTTP/1.1 204 0 – – b66f0a16-fd0d-11e5-8004-000000000000 1.2452ms
My http settings in influx config:
[http]
enabled = true
bind-address = “:8086”
auth-enabled = false
log-enabled = true
write-tracing = false
pprof-enabled = false
https-enabled = false
https-certificate = “/etc/ssl/influxdb.pem”
Please help!!
Can you give me the jmeter log?
I am having same issue with ‘curl’ as your script. Load is successful but no measurements in influxdb. To resolve the ‘Curl’ issue I have to add below parameter to my curl command. After adding this to curl I can see the data in influxdb.
-H ‘Content-Type:text/plain’
Do you use curl in your code? Is there any way you can update the code with ‘Content-Type:text/plain’ in your build?
Please help I am struck now with this.
Thanks,
Satish.
Can you please share the jmeter.log?
I replace the JMeter_core.jar with the download and update the user.properties,but the delta and total measurements don’t be created,this is why?
Do you run your test in non-GUI mode?
Can you share the jmeter.log?
No,I run my test in non-GUI mode again,It’s ok now,thank you vlns.
Thanks very much for this – with your jar file, dashboard, and description I was able to implement this using InfluxDB 0.11 and Grafana 2.6. I’ve set the summariser.interval=10 and this seems to be functioning well. If you have any thoughts on the tradeoff of using a longer interval (more data to be computed via JMeter versus writing more frequently to InfluxDB) I’d be interested to hear them. I had used the backend.listener without much problem, I’m curious to know what volume of data folks were trying to push into InfluxDB when they experienced poor performance – I’m using both the backend.listener and the summariser presently. I’ve also set up a quick test via Taurus and found that worked as expected once the user.properties values were included and the summariser.name was set (Taurus disables it as it isn’t needed). Thanks again, this is a valuable contribution!
Hi,
I have the same issue, I replaced the ApacheJMeter_core.jar and updated the user.properties,But there are no delta and total measurements.
I’m running in non-GUI mode.
I see no difference in measurements after replacing lib ApacheJMeter_core.jar and user.properties.
Can you help me?
Do you see any error in the log? Can you share that info?
Hi Sir, Great post! Thank you. I tried with your approach and got the result. But I am not getting the desired graphs after I imported your json. Could you please update what could be reason? With the same query I am able to get the graphs though. Not able to figure out whats wrong in the configuration with your json.
I had the similar issue when the Grafana datasource was not configured properly – but it tried to import the json.
Thanks for this excellent article, I must say its very well articulated and detailed for anyone with minimum knowledge. I have a question though – Whats the difference between delta and total table? When I should query from delta instead of total table?
Total table gives the aggregate information for the test. Usually you would want only ‘last’ record from this table. I use this to show the single stat in Grafana. Like Total requests sent so far!
Delta table gives the aggregate information for every 30 seconds. (it is configurable). This is what is used to plot the graph. Like, no of requests processed every 30 seconds.
Hi Sir,
With you sample projects I am able to run it successfully as well. In jmeter.log file i could see the Influxdbmetric sender details are getting printed. But unfortunately I am not able to see the delta and total in the influxdb. Fyi, It is happening only in my office PC and with the same configuration I am getting proper result in my home PC. I tried with firewall off and anti virus off but no success. Could you please suggest.
I would follow the steps mentioned here
Please, I need how to install InfluxDB on Windows machine. Can somebody help on this please?
Follow the steps here – http://stackoverflow.com/questions/26116711/how-to-install-influxdb-in-windows
I’ve managed to install influxdb on windows but I need information on how to create Grafana dashboard from scratch? How do I create metrics on Grafana dashboard? Is there any source provides proper information on the same please.
This is awesome work.
It would be helpful if you could give some details about the code changes for your approach. If you could give the classes/functions to change that would be helpful
Thanks muuch for your work.
My question is how to get per sampler stats, using summarizer instead of backend listener ? Is it possible ?
What is the real performance impact of using backend listener ?
Updated with changes for JMeter 3.0 and Sending sampler level metrics.
Please check the updated content in Download & Grafana Dashboard sections.
I am tried replacing the ApacheJMeter_core.jar on Jmeter version 2.13 everything worked fine as you posted. When I try the same thing on Jmeter version 2.16 its not working. How to get it working on Jmeter Version 2.16 if you have one for 2.16 can you please share that with me?
JMeter 2.16? You mean JMeter 3.0? I am yet to work on that and update it. I will post it soon.
Updated with changes for JMeter 3.0 and Sending sampler level metrics.
Please check the updated content in Download & Grafana Dashboard sections.
Really great article.
Yet now we have JMeter 3.0 available and unfortunately custom core files are incompatible with that version. Could you please provide necessary code changes and share it with us?
I would also appreciate any details or comments on the classes/functions changes in core files, as regarded couple times above in comments. This would be quite an essential information, as far as code customization is sometimes required.
Another point is to create a separate listener. Its not always necessary to write all the data in the database, yet there is no such option while modifying core files.
The last one thing to mention: is it possible to add tags to a back-end listener? Yes, we can change prefix before each test, though it would be better to keep all the data from different tests in one table with some tags.
I am trying to modify it for JMeter 3.0. Will update you soon on this.
Updated with changes for JMeter 3.0 and Sending sampler level metrics.
Please check the updated content in Download & Grafana Dashboard sections.
Thanks for the updates. I really appreciate your hard work.
Any thoughts on creating separate sampler/listener in order to use GUI instead of switching core files?
Adding a backend listener/any custom listener affects the overall performance of the JMeter. It does have to create a separate thread for the listener to constantly monitor and update the results. So I have to modify the core files to avoid a separate thread/redundant calculation of the metrics etc. I also try to find the best approach to do it via GUI.
Thank you for a great job. I use new library and properties file is configured. In my database there is new measurement – “samples” and it contains data, but delta and total is missing. Any ideas would be appreciated. I use non-GUI. I can post from postman with no problems, jmeter.log contains no errors, influxdb console no errors.
Ah..the issue you are reporting is completely looking weird to me. Is it still happening? What version of JMeter are you using? Do you the summary output in the console?
Hi!
I am very interested with you post here and actually I am working with Grafana + InfluxDb.
As Jmeter 3.0 released, we could find the information related to hits per second sent to InfluxDb by Backend Listener, but we also need to have :
– Avg, min, max response time(I would like to have min,max and pct90 so Backend Listener works fine for me)
– Throughput(must to have)
– Active users(Is it test.minAT? It is also sent by Backend Listener)
– Total request processed
– Failed Requests(optional because we could know via jmeter.*.ko.count,since all my requests are grouped up inside Transaction Controller)
I really like your approach since I could get throughput value, but actually your properties file does not save the information related to username and password of user who could access to the database. Could you make a change to cover that and share with us? I am waiting it with impatience,
Many thanks and happy testing.
Throughput is nothing but the number of requests processed per unit time. you should be able to get those info from the jmeter.*.ok.count table.
@vlns : So as you said, throughput is the value of request processed per unit time, then in case where all request are failed, then throughput = 0 ?
JMeter does not check if the processed requests are successful or failures. So throughput would not be 0 in your case. But if you want to filter only the success requests, then number of requests processed by the server becomes 0. So yeah, throughput will be 0 in this case.
Hello again.
To send sampler level metrics with summarizer was a great idea. That makes data aggregation quite easier.
Got a couple more questions for you.
1. Is there a way to override tag values (e.g. ‘summariser.influx.project’ property) within the Jmeter script? For ex.: with a beanshell sampler we can put new value to the property, but the output to a database would contain old tag value. We can certainly set properties with a batch file, but the trick works only at startup.
2. A custom core library is not designed to retry to post the data. Yet network issues can sometimes cause connection loss, Is there any chance to to add ‘reconnect n-times’ option to the custom class? Default ‘0’ value would act the way it behaves now.
Conducted couple tests to assess the overhead brought by backend listener/custom library. There was no significant difference (less than 5%) in results. The point is: maybe it makes sense to create a separate listener? Just asking.
Hats of to the clarity and detail of this article!! I was able to successfully get the jmeter+influxdb+grafana only and only because of you. After importing the json, I am getting zero values though, I will try to figure it out. If you have any suggestion please let me know.
Sorry for the late response. Were you able to figure out?
Thanks for the post & sharing, nice to have alternatives for real time load test stats handling.
Would be nice if you or someone looked into doing the same thing for the summarizer but integrating with graphite rather than influxdb. Or does it already work for writing directly to graphite? From your post, it sounded specific to influxdb.
I never tried graphite. I liked InfluxDB, so I just did it for InfluxDB – Yes, it would be nice if it can support both graphite and influxDB.
Btw, you’ve shared the customized summarizer component (as JAR) for others to try and use, would you be able to share the modifications as source code (say on Github, etc.)? That way, others can further build upon those changes as well.
Hello,
I was trying to search the Grafana dashboard json file which you have mentioned. Could you please point me to it. The graphs look very impressive and would like to leverage your settings.
Additionally, I am personally interested in understand the changes you did to the apache core (source code). Any chance you can share the source code with me on my personal email ID.
Thanks a lot in anticipation.
Hi, Your writing has helped a lot understand how this whole thing works. I downloaded both the Jmeter core and grafana json that you have here. Metrics are going upto influxdb for the 3 measurements that you have specified. However the grafana dashboards are not updated. Are these jsons supposed to work for Grafana 3.X? The dashboards always shows ZERO. When I see the “metrics” part of the graphs or the singlestats, i suspect that the query is not correct. If we are supposed to rewrite those, we also need to know what the values in the table mean.
Download the json files from the download page which supports grafana v3.0 and above.
Would you be able to share the modifications as source code (say on Github, etc.)? That way, others can further build upon those changes as well,thanks.
Great stuffs and thank you for sharing. I’m glad I found your post. I downloaded the jar file and I got it working great with my influxdb. The dashboard I have to manually recreate it since there are format changes in the new Grafana.
I got a question about the delta and total series though, As I understand, the delta table stores the difference between the current and previous row in the total table. However, there are a couple columns that don’t look correct, such as ath and max. max column in my total table stay the same for several rows, which should be zero in the delta table, but it’s not. Wonder if you’ve seen this or something is odd with my jMeter setup – I have 3 separate backendlisteners under 3 different thread groups.
Name of these tables might be misleading and have got created this confusion.
delta -> gives the min,max,ath, total samples processed in 30 seconds window. in just those 30 seconds.
total -> gives the min,max,ath, total samples processed for the test from the beginning.
So, there is a chance that total’s min, max, ath remains same – except the total number of samples of processed.
hi, your approach is appreciable very much. thanks a lot for this graphs…
i just want to change the influxdb update time from 30 sec to 5 or 1 sec. where i can change it?
please help me on this too….
You need to update this property: summariser.interval
and where i can get the Hits Per Second data ?
You need to derive it from requests count
Hi VLN,
Great job there. Need your help to set up. I went through the comments and was lost confused.
IUn the latest comments you mentioned to refer “Download & Grafana Dashboard sections” but in downloads i can see only “Grafana dashboard for grafana v3.0”
Below are my questions:
-Is it sufficient If i downlaod Grafana dashboard for grafana v3.0 to see the real time results? do I still need to install influx DB?
Can you kindly share the steps to be followed.
Thank you in advance
InfluxDB is a database which is used to performance results data. Grafana is a dashboard which shows graphs by reading the data from InfluxDB.
Hi Vlns,
I tried to download InfluxDB in my system(windows 32) bit I didnt get the link anywhere. Can you kindly help me with this?
Thank you in advance
hi,
the ApacheJmeter_core is creating problem when i try to run it from maven jenkins. getting the below error:
“missing class com.thoughtworks.xstream.converters.ConversionException: kg.apc.jmeter.vizualizers.CorrectedResultCollector : kg.apc.jmeter.vizualizers.CorrectedResultCollector”
can you please help me with code you have changed in Core jar..
i think its because of jmeter plugins,… i will check it again from my side
Hi,
when i am trying to run from jenkins maven, no errors in execution, but i am not getting any data in influxdb data base, how trace it where problem is exactly?
its working with default ApacheJmeter_Core,jar, but not working with your given jar. not creating delta, sample, total measuremnts in influxDB
Did you update the jmeter.properties? What is the error you see in the log file?
Yes i have updated under user.properties. and about log there are no errors. backend listner worked properly. from Maven i am replacing the ApacheJmeter_core into my target, its overwriting the existing core jar. in your core jar any specific text writing to log so that i can identify its is the replaced jar?
or just help me to get the throughput calculation from real time results metrics(a.all.count.,a.min etc… which one i have to use for through put calculation?
Fro throughput, you can calculate it from the a.all.count
Hi vlns, Do you mind sharing the jmeter source code? I’d like to make minor modifications to it so that the Jenkins Build number is also feed into the ‘samples’ table. Currently I am feeding the number to the ‘suite’ field, but this is stored a string. I’d like to store this as a number.
How can i configure delta according to my requirment..for example i want to configure it for 5 sec. can you kindly replyASAP.
As I had mentioned, I take the info from the summariser.There is a property for it to change the interval. By default it is 30 seconds. summariser.interval=30
thanks..vlns. how can i get throughput of a sample/ few sec.i want to plot it in grafana .Can you hel;p me with any query to get that. I tried select mean(“value”)from “jmeter.zz.a.count” but this doesnt include the total time taken by the last sample
Or is there any possibilities to pass throughput values to influx db.total and delta gives the total throughput right
Hi vlns, your implementation is very helpful for me,is it possible you share your modifications(the part for writing console info into influxdb) ? when influxdb connection fails, I need to reconnect it.
Somehow it went to spam folder. So I missed this. I am going to create a separate listener & instead of modifying the core lib. I will let you know.
Hello!
I have problem as Raimonds
Dowloaded the jar file and updated the user.properties file. Run jmeter non-GUI mode. I see samples but the metrics delta & total are not displayed in the influx db.
I try jmeter 3.0 and 2.13 – same problem. No errors in jmeter log.
Can you follow the steps mentioned here?
http://www.testautomationguru.com/jmeter-influxdb-integration-how-to-troubleshoot/
I do all the steps and didnt have delta & total too.
https://s12.postimg.org/vhd9tngjv/2016_12_02_1108.png
i have all connections and see results for ‘samples’:
https://s14.postimg.org/fe9zrzgch/2016_12_02_1112.png
What i can do with this issue ?
I doubt that may be some spl char is causing this. Can you please share the log?
Log from what app you need?
jmeter log plz
Can you add this property
summariser.influx.log.enabled=true
& run the test and share the jmeter.log please?I want to plot the graphs of throughput/unit time in grafana using influx db of each samplers i have in my jmeter test.I can get the overall throughput of a test/unit time (using additional tables delta and total in influx db).
Can somebody help me to get this done.
Or is there any way to get sampler wise throughput in influx db in the same way as we get count of sample zz “jmeter.zz.a.count”.May be by using user.properties/jmeter.properties.
Any kind of help in this appreciable
Did you download the appropriate jar from the download section and replace the existing apache_core.jar? whatever you are looking, it is already there. Also, the grpah, you can download the template from the download section and use it.
hi i’ve downloaded
in that count(response code) have used for the particular time .but its not giving the appropriate result i feel
is there any ways to pass throughput as well like we pass count or 90% line
HI hraph attached givies the result for all the samplesa in different graphs..but what i have to change to get throughput of all the samples i have in my test in the same graph..can yuo please help me in this !!!
i didnt get how to meet my requirment..could you please help me in this
is there any ways to include my own column to Samples table…for example i want to include throughput column ??any chances ?
Hi, No, It might not be possible to add your coulumn with this jar. If you want to go with your implementation, I would advise you to check this – http://www.testautomationguru.com/jmeter-save-results-to-a-database/
Is there a way to separate each transaction average and save that do DB instead of having the average of all transactions? I couldn’t find a way to do it. Thanks!
You are asking for aggregate information. In that case that can be done only after JMeter is done with the test. Otherwise calculating avg every time is very time consuming – that could affect the performance of the test. InfluxDB has all the information we need. Grafana can give aggregate information like min, max, avg, median etc.
is it work on apache 3.0? I setup all like in article but still don’t see delta and total(samples is visible). Logs looks fine no Errors or Warns
Yes, It should work. There is a separate jar for V3.0. Please download from the download section and use it. Ensure that you run the non-gui mode. Run the test for min 60 seconds. If you still face any issues, Please check here how to troubleshoot : http://www.testautomationguru.com/jmeter-influxdb-integration-how-to-troubleshoot/
vIns
October 17, 2016 at 4:50 AM – Reply
You are asking for aggregate information. In that case that can be done only after JMeter is done with the test. Otherwise calculating avg every time is very time consuming – that could affect the performance of the test. InfluxDB has all the information we need. Grafana can give aggregate information like min, max, avg, median etc.
Grafana can indeed provide avgs, but if I have several samplers it’s no good. If I’m running a soak test, it would be great to check each sampler response time avg during test execution, not only afterwards. If I have multiple types of samplers (i.e a microservice call and a HTML call – one takes less than 100ms and the other takes 2s) the average showed would do no good. That’s why I wanted to know if there’s a way to show each sampler response time avg individually.
Thanks
Bruno,
The “Samples Dashboard” should show sample level details. If you need the aggregate info in table format – it can be done. but Influxdb is not a good choice for that. I will see if i could modify core jar. But aggregate as graph is already available is Samples Dashboard. Check the “Samples Dashboard” section of this post.
If anyone is interested, I created a Jmeter Plugin based on the code by vlns that only sends data to the “samples” table. I created this for personal use and found I only needed the “samples” table data.
vlns,
I decompiled your jar to get the source, I hope you are ok with this. 🙂
🙂
https://github.com/kycan/jmeter_influxdb_sender
The git repo for this if anyone is interested.
I am getting connect timed out error ,see my logs from jmeter.log
2016/11/08 13:28:52 ERROR – jmeter.visualizers.backend.graphite.TextGraphiteMetricsSender: Error writing to Graphite:connect timed out
2016/11/08 13:28:53 ERROR – jmeter.visualizers.backend.graphite.TextGraphiteMetricsSender: Error writing to Graphite:Connection refused: connect
2016/11/08 13:28:54 ERROR – jmeter.visualizers.backend.graphite.TextGraphiteMetricsSender: Error writing to Graphite:connect timed out
Looks like firewall issue. Check here for the steps to troubleshoot. http://www.testautomationguru.com/jmeter-influxdb-integration-how-to-troubleshoot/
yes it is , looks fine on centos box
Hi vlns,
Thanks for this wonderful tutorial. It’s very helpful. I’m getting stuck at the Solution 2. I could update the Apache Core library, user.properties file and import 2 files of Grafana dashboard from the zip file as well. I can see results of delta, samples, total from InfluxDB web interface when querying “select * from delta” too. But the graphs which are imported don’t show any stats or graph. The data source is marked as Default too. If I change the Metric to “jmeter.all.a…” or somethings like that, it shows the stats and graph immediately, but not for total, samples or delta metrics. Do you know why?
By the way, I can see that we could set username / password for InfluxDB in its web interface. Should we do this? Is it important or related to somethings?
Looking forward to hearing from you.
Thanks & Regards.
I still use old version of Grafana. I created this dashboard in v2.6. So I am not sure if is broken in the recent versions of Grafana if the imported dashboards are not working. One good thing is apache_core lib is supposed to send the data to InfluxDB which seems to work perfectly. Once you have the data, then creating a simple graphs are easy. So for the dashboard, Please see if you could do it yourself. I will also take a look.
Reg the password, I can try to add it. I will let you know.
Hi vlns,
Thanks for your quick reply. I’m using Grafana v3.1.1, InfluxDB v1.0.2, Apache JMeter 3.0. Is itI will try with Grafana 2.6 and let you know.
Thank you very much.
Hi Vlns,
I tried with Grafana v2.6 and it even was worse than v3. Should I try with InfluxDB 0.9 instead?
Hi Vlns,
Thnx for the quick and good content.
ICan you please tell me how I can add more details like connect time, latency and response messages . I was trying to modify the jmeter source code, but I am not able do that.
Can you please help me in that.
Thanks in advance!!
Bhomik, it is actually simple if you have the source code. I have been planning to upload in Github for sometime. Being a lazy guy, it is getting delayed. sorry about that. So, for the modified source code, please use a java decompiler to get the source from the jar – modify it yourself and use it for the time being.
Thanks a lot for providing detailed steps.
Need help. I am getting the following error in dashboard.
“Dashboard init failed. Template variables could not be initialized: b.metricFindQuery is not a function”.
These files were created using old version. I will check again the latest version and update. Please give me some time. Or please google on creating a dashboard in Grafana.
Thanks
Hi Vlns,
I have setup monitoring using influxdb, summariser(for avg response times), telegraf(cpu and memory), jmxtrans(jmx monitoring) . Jmxtrans must need influx db username/password. After adding a user to influx db, summariser can not post the metrics to influx db as expected. Is it possible for you to update summariser to accept influxdb username and password parameters while connecting to db? It will be very helpful for me.
Thanks in advance.
Sure. Meanwhile, set the auth-enabled property to false under HTTP API in InfluxDB config. This is only for API.
Hello,
Your blog is interesting but the second part mentioning your custom implementation seems to be partly wrong:
– The metrics that you mention as missing are generated by JMeter . Only average was not there, it has been introduced in 3.1, see http://jmeter.apache.org/usermanual/realtime-results.html
– You write that throughput should be higher ? I don’t think so as when you send your metrics with your implementation, you are doing it Synchronously, while BackendListener does it asynchronously. What seem to be different in your case is that you send at frequency of Summariser which might be lower that JMeter one. But this can be adapted with DEFAULT_QUEUE_SIZE.
– if you confirmed you had performances issue, then it would be nice to report those problems and help us investigate them so that we fix them. I think the approach you took is not optimal, it forces users to “hack” ApacheJMeter_core.jar potentially breaking current code. It also means you need to update it every time a new JMeter version is released needing to merge your code in JMeter.
I agree with you for one thing that – I need to update it whenever a new JMeter version is released. It is little bit annoying. But throughput was faster because I used the summarizer delta and total information to log. I did not log the samples level information. Ie every 30 seconds / summariser interval, I will insert only one record. Instead of writing tons of records as backend listener was doing. You can also other comments that someone had similar issue with backend listener. If you see my blog I do some comparison & show data to show the proof. This was done more than a year ago. I dont have anything as of now. But I doubt now that If it could be better because I modified my implementation recently to log samples level information as well. I am working on creating a custom listener to avoid this approach.
Thanks yaar….It’s really cool…I used it in my work too
Will you update ApacheJMeter_core.jar for jmeter 3.1 ?
I do not really want to. This is not really a nice approach to update the jar file each and every time JMeter core changes. So, I have been creating this as a external plugin w/o affecting the core jar. It might take some time. But do you face any issue if you the jar for 3 with Jmeter 3.1?
Sorry, i didnt try with 3.0 version 😉
But i have a simple sollusion 😉
Perhaps you are able to write a similar article to http://www.testautomationguru.com/jmeter-save-results-to-a-database/ describing Aggregate report dashboard?
‘Core.jar’ file for 3.0 have some issues on 3.1.
Console: https://s11.postimg.org/6tbxi45oz/2016_12_02_1144.png
ErrorLog: https://s13.postimg.org/cyix7kr39/2016_12_02_1146.png
I expected this. I feel that I should create this as an extn instead of modifying core. Will work on that.
Hi vlns,
I’ve followed your tutorial (Solution 2) but only “samples” measurements is written in influxDB database. “total” and “delta” measurements are not created. I’m using jmeter 3.0 and influxdb 1.1.0.
Can you help me ?
Thanks & Regards.
I also have JMeter 3.0 and InfluxDB 1.1.0. I see no issues. Whenever it writes the delta , it also updates samples. Do you run the test in non-gui mode? You run it for enough duration, say 1 min? Please share the jmeter.log
Hi, vlns,
This is the content of jmeter.log :
2016/12/05 16:50:11 INFO – jmeter.util.JMeterUtils: Setting Locale to en
2016/12/05 16:50:11 INFO – jmeter.JMeter: Loading user properties from: /home/user/apps/apache-jmeter-3.0/bin/user.properties
2016/12/05 16:50:11 INFO – jmeter.JMeter: Loading system properties from: /home/user/apps/apache-jmeter-3.0/bin/system.properties
2016/12/05 16:50:11 INFO – jmeter.JMeter: Copyright (c) 1998-2016 The Apache Software Foundation
2016/12/05 16:50:11 INFO – jmeter.JMeter: Version 3.0.20160606
2016/12/05 16:50:11 INFO – jmeter.JMeter: java.version=1.8.0_112
2016/12/05 16:50:11 INFO – jmeter.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2016/12/05 16:50:11 INFO – jmeter.JMeter: os.name=Linux
2016/12/05 16:50:11 INFO – jmeter.JMeter: os.arch=amd64
2016/12/05 16:50:11 INFO – jmeter.JMeter: os.version=4.4.0-51-generic
2016/12/05 16:50:11 INFO – jmeter.JMeter: file.encoding=UTF-8
2016/12/05 16:50:11 INFO – jmeter.JMeter: Max memory =514850816
2016/12/05 16:50:11 INFO – jmeter.JMeter: Available Processors =8
2016/12/05 16:50:11 INFO – jmeter.JMeter: Default Locale=français (France)
2016/12/05 16:50:11 INFO – jmeter.JMeter: JMeter Locale=anglais
2016/12/05 16:50:11 INFO – jmeter.JMeter: JMeterHome=/home/alain.vernat/apps/apache-jmeter-3.0
2016/12/05 16:50:11 INFO – jmeter.JMeter: user.dir =/home/alain.vernat/apps/apache-jmeter-3.0/bin
2016/12/05 16:50:11 INFO – jmeter.JMeter: PWD =/home/alain.vernat/apps/apache-jmeter-3.0/bin
2016/12/05 16:50:11 INFO – jmeter.JMeter: IP: X.X.X.X Name: xxxx.xxxx.xxxxx FullName: xxxxx
2016/12/05 16:50:11 INFO – jmeter.services.FileServer: Default base=’/home/user/apps/apache-jmeter-3.0/bin’
2016/12/05 16:50:11 INFO – jmeter.services.FileServer: Set new base=’/home/user’
2016/12/05 16:50:11 INFO – jmeter.save.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2016/12/05 16:50:11 INFO – jmeter.save.SaveService: Using SaveService properties file encoding UTF-8
2016/12/05 16:50:11 INFO – jmeter.save.SaveService: Using SaveService properties version 2.9
2016/12/05 16:50:11 INFO – jmeter.save.SaveService: All converter versions present and correct
2016/12/05 16:50:11 INFO – jmeter.save.SaveService: Loading file: /home/user/Test_Plan_SPD2_Dashboard-Grafana.jmx
2016/12/05 16:50:11 INFO – jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/12/05 16:50:11 INFO – jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/12/05 16:50:11 INFO – jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/12/05 16:50:11 INFO – jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/12/05 16:50:11 INFO – jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2016/12/05 16:50:11 INFO – jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2016/12/05 16:50:11 INFO – jmeter.protocol.http.control.CookieManager: Settings: Delete null: true Check: true Allow variable: true Save: false Prefix: COOKIE_
2016/12/05 16:50:11 INFO – jmeter.protocol.http.control.CacheManager: Will only cache the following methods: [GET]
2016/12/05 16:50:11 INFO – jmeter.JMeter: Creating summariser
2016/12/05 16:50:11 INFO – jmeter.engine.StandardJMeterEngine: Running the test!
2016/12/05 16:50:11 INFO – jmeter.samplers.SampleEvent: List of sample_variables: []
2016/12/05 16:50:11 INFO – jmeter.samplers.SampleEvent: List of sample_variables: []
2016/12/05 16:50:11 INFO – jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: ‘.functions.’
2016/12/05 16:50:11 INFO – jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: ‘.gui.’
2016/12/05 16:50:11 INFO – jmeter.JMeter: Running test (1480953011758)
2016/12/05 16:50:11 INFO – jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
2016/12/05 16:50:11 INFO – jmeter.engine.StandardJMeterEngine: Starting 10 threads for group Thread Group.
2016/12/05 16:50:11 INFO – jmeter.engine.StandardJMeterEngine: Thread will continue on error
2016/12/05 16:50:11 INFO – jmeter.threads.ThreadGroup: Starting thread group number 1 threads 10 ramp-up 1 perThread 100.0 delayedStart=false
2016/12/05 16:50:11 INFO – jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times
2016/12/05 16:50:11 INFO – jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2016/12/05 16:50:11 INFO – jmeter.samplers.SampleResult: sampleresult.useNanoTime=true
2016/12/05 16:50:11 INFO – jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000
2016/12/05 16:50:11 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-1
2016/12/05 16:50:11 INFO – jmeter.threads.ThreadGroup: Started thread group number 1
2016/12/05 16:50:11 INFO – jmeter.engine.StandardJMeterEngine: All thread groups have been started
2016/12/05 16:50:11 INFO – jmeter.protocol.http.sampler.HTTPHCAbstractImpl: Local host = palombaggia.dev.cloud-omc.thales
2016/12/05 16:50:11 INFO – jmeter.protocol.http.sampler.HTTPHC4Impl: HTTP request retry count = 0
2016/12/05 16:50:11 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-2
2016/12/05 16:50:11 INFO – jmeter.protocol.http.sampler.LazySchemeSocketFactory: Setting up HTTPS TrustAll Socket Factory
2016/12/05 16:50:11 INFO – jmeter.util.JsseSSLManager: Using default SSL protocol: TLS
2016/12/05 16:50:11 INFO – jmeter.util.JsseSSLManager: SSL session context: per-thread
2016/12/05 16:50:12 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-3
2016/12/05 16:50:12 INFO – jmeter.util.SSLManager: JmeterKeyStore Location: type JKS
2016/12/05 16:50:12 INFO – jmeter.util.SSLManager: KeyStore created OK
2016/12/05 16:50:12 WARN – jmeter.util.SSLManager: Keystore file not found, loading empty keystore
2016/12/05 16:50:12 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-4
2016/12/05 16:50:12 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-5
2016/12/05 16:50:12 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-6
2016/12/05 16:50:12 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-7
2016/12/05 16:50:12 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-8
2016/12/05 16:50:12 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-9
2016/12/05 16:50:12 INFO – jmeter.threads.JMeterThread: Thread started: Thread Group 1-10
2016/12/05 16:52:30 INFO – jmeter.reporters.Summariser: summary + 470 in 00:02:18 = 3,4/s Avg: 472 Min: 5 Max: 2251 Err: 20 (4,26%) Active: 10 Started: 10 Finished: 0
2016/12/05 16:54:01 INFO – jmeter.reporters.Summariser: summary + 311 in 00:01:32 = 3,4/s Avg: 1210 Min: 22 Max: 22106 Err: 0 (0,00%) Active: 10 Started: 10 Finished: 0
2016/12/05 16:54:01 INFO – jmeter.reporters.Summariser: summary = 781 in 00:03:50 = 3,4/s Avg: 766 Min: 5 Max: 22106 Err: 20 (2,56%)
2016/12/05 16:54:33 INFO – jmeter.reporters.Summariser: summary + 50 in 00:00:32 = 1,6/s Avg: 7117 Min: 4652 Max: 10009 Err: 0 (0,00%) Active: 10 Started: 10 Finished: 0
2016/12/05 16:54:33 INFO – jmeter.reporters.Summariser: summary = 831 in 00:04:22 = 3,2/s Avg: 1148 Min: 5 Max: 22106 Err: 20 (2,41%)
2016/12/05 16:55:01 INFO – jmeter.reporters.Summariser: summary + 41 in 00:00:27 = 1,5/s Avg: 6380 Min: 5164 Max: 8067 Err: 0 (0,00%) Active: 10 Started: 10 Finished: 0
2016/12/05 16:55:01 INFO – jmeter.reporters.Summariser: summary = 872 in 00:04:49 = 3,0/s Avg: 1394 Min: 5 Max: 22106 Err: 20 (2,29%)
2016/12/05 16:55:30 INFO – jmeter.reporters.Summariser: summary + 49 in 00:00:29 = 1,7/s Avg: 19278 Min: 458 Max: 76875 Err: 0 (0,00%) Active: 10 Started: 10 Finished: 0
2016/12/05 16:55:30 INFO – jmeter.reporters.Summariser: summary = 921 in 00:05:19 = 2,9/s Avg: 2345 Min: 5 Max: 76875 Err: 20 (2,17%)
2016/12/05 16:56:00 INFO – jmeter.reporters.Summariser: summary + 78 in 00:00:30 = 2,6/s Avg: 3865 Min: 33 Max: 6439 Err: 0 (0,00%) Active: 10 Started: 10 Finished: 0
2016/12/05 16:56:00 INFO – jmeter.reporters.Summariser: summary = 999 in 00:05:49 = 2,9/s Avg: 2464 Min: 5 Max: 76875 Err: 20 (2,00%)
2016/12/05 16:57:07 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-10
2016/12/05 16:57:07 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-10
2016/12/05 16:57:07 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-4
2016/12/05 16:57:07 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-4
2016/12/05 16:57:07 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-3
2016/12/05 16:57:07 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-3
2016/12/05 16:57:07 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-5
2016/12/05 16:57:07 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-5
2016/12/05 16:57:08 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-6
2016/12/05 16:57:08 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-6
2016/12/05 16:57:08 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-7
2016/12/05 16:57:08 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-7
2016/12/05 16:57:08 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-1
2016/12/05 16:57:08 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-1
2016/12/05 16:57:08 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-2
2016/12/05 16:57:08 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-2
2016/12/05 16:57:09 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-9
2016/12/05 16:57:09 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-9
2016/12/05 16:57:09 INFO – jmeter.threads.JMeterThread: Thread is done: Thread Group 1-8
2016/12/05 16:57:09 INFO – jmeter.threads.JMeterThread: Thread finished: Thread Group 1-8
2016/12/05 16:57:09 INFO – jmeter.engine.StandardJMeterEngine: Notifying test listeners of end of test
2016/12/05 16:57:09 INFO – jmeter.reporters.Summariser: summary + 251 in 00:01:09 = 3,6/s Avg: 3672 Min: 21 Max: 63457 Err: 0 (0,00%) Active: 0 Started: 10 Finished: 10
2016/12/05 16:57:09 INFO – jmeter.reporters.Summariser: summary = 1250 in 00:06:58 = 3,0/s Avg: 2707 Min: 5 Max: 76875 Err: 20 (1,60%)
Best Regards.
Alain, Can you add this property
summariser.influx.log.enabled=true
& rerun the test and share the log please?When i try to send you the log i have this error :
Not found
Sorry, no posts matched your criteria
2016/12/06 09:15:43 INFO - jmeter.util.JMeterUtils: Setting Locale to pl_PL
2016/12/06 09:15:43 INFO - jmeter.util.JMeterUtils: Could not find resources for 'pl_PL', using 'pl'
2016/12/06 09:15:43 INFO - jmeter.JMeter: Loading user properties from: C:\Users\RafiK\Desktop\apache-jmeter-3.0\bin\user.properties
2016/12/06 09:15:43 INFO - jmeter.JMeter: Loading system properties from: C:\Users\RafiK\Desktop\apache-jmeter-3.0\bin\system.properties
2016/12/06 09:15:43 INFO - jmeter.JMeter: Copyright (c) 1998-2016 The Apache Software Foundation
2016/12/06 09:15:43 INFO - jmeter.JMeter: Version 3.0.20160606
2016/12/06 09:15:43 INFO - jmeter.JMeter: java.version=1.8.0_111
2016/12/06 09:15:43 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2016/12/06 09:15:43 INFO - jmeter.JMeter: os.name=Windows 7
2016/12/06 09:15:43 INFO - jmeter.JMeter: os.arch=amd64
2016/12/06 09:15:43 INFO - jmeter.JMeter: os.version=6.1
2016/12/06 09:15:43 INFO - jmeter.JMeter: file.encoding=Cp1250
2016/12/06 09:15:43 INFO - jmeter.JMeter: Max memory =523763712
2016/12/06 09:15:43 INFO - jmeter.JMeter: Available Processors =4
2016/12/06 09:15:43 INFO - jmeter.JMeter: Default Locale=polski (Polska)
2016/12/06 09:15:43 INFO - jmeter.JMeter: JMeter Locale=polski (Polska)
2016/12/06 09:15:43 INFO - jmeter.JMeter: JMeterHome=C:\Users\RafiK\Desktop\apache-jmeter-3.0
2016/12/06 09:15:43 INFO - jmeter.JMeter: user.dir =C:\Users\RafiK\Desktop\apache-jmeter-3.0\bin
2016/12/06 09:15:43 INFO - jmeter.JMeter: PWD =C:\Users\RafiK\Desktop\apache-jmeter-3.0\bin
2016/12/06 09:15:43 INFO - jmeter.JMeter: IP: 192.168.232.1 Name: Rafik-TOSHIBA FullName: Rafik-TOSHIBA
2016/12/06 09:15:43 INFO - jmeter.services.FileServer: Default base='C:\Users\RafiK\Desktop\apache-jmeter-3.0\bin'
2016/12/06 09:15:43 INFO - jmeter.services.FileServer: Set new base='C:\Users\RafiK\Desktop'
2016/12/06 09:15:43 INFO - jmeter.save.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2016/12/06 09:15:44 INFO - jmeter.save.SaveService: Using SaveService properties file encoding UTF-8
2016/12/06 09:15:44 INFO - jmeter.save.SaveService: Using SaveService properties version 2.9
2016/12/06 09:15:44 INFO - jmeter.save.SaveService: All converter versions present and correct
2016/12/06 09:15:44 INFO - jmeter.save.SaveService: Loading file: C:\Users\RafiK\Desktop\jmeter.jmx
2016/12/06 09:15:44 INFO - jmeter.protocol.http.control.CacheManager: Will only cache the following methods: [GET]
2016/12/06 09:15:44 INFO - jmeter.protocol.http.control.CookieManager: Settings: Delete null: true Check: true Allow variable: true Save: false Prefix: COOKIE_
2016/12/06 09:15:44 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/12/06 09:15:44 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/12/06 09:15:44 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/12/06 09:15:44 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2016/12/06 09:15:44 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2016/12/06 09:15:44 INFO - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2016/12/06 09:15:44 INFO - jmeter.JMeter: Creating summariser
2016/12/06 09:15:44 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2016/12/06 09:15:44 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2016/12/06 09:15:44 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2016/12/06 09:15:44 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2016/12/06 09:15:44 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2016/12/06 09:15:44 INFO - jmeter.JMeter: Running test (1481012144816)
2016/12/06 09:15:44 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : Jmeter Oferta i Wniosek
2016/12/06 09:15:44 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Jmeter Oferta i Wniosek.
2016/12/06 09:15:44 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2016/12/06 09:15:44 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2016/12/06 09:15:44 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2016/12/06 09:15:44 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2016/12/06 09:15:44 INFO - jmeter.threads.JMeterThread: Thread started: Jmeter Oferta i Wniosek 1-1
2016/12/06 09:15:47 INFO - jmeter.protocol.http.sampler.HTTPHCAbstractImpl: Local host = Rafik-TOSHIBA
2016/12/06 09:15:47 INFO - jmeter.protocol.http.sampler.HTTPHC4Impl: HTTP request retry count = 0
2016/12/06 09:15:47 INFO - jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times
2016/12/06 09:15:47 INFO - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2016/12/06 09:15:47 INFO - jmeter.samplers.SampleResult: sampleresult.useNanoTime=true
2016/12/06 09:15:47 INFO - jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000
2016/12/06 09:16:00 INFO - jmeter.reporters.Summariser: summary + 6 in 00:00:15 = 0,4/s Avg: 0 Min: 0 Max: 0 Err: 6 (100,00%) Active: 1 Started: 1 Finished: 0
2016/12/06 09:16:00 INFO - jmeter.reporters.InfluxMetricSender: project=taguru,suite=taguru-100-users ath=1,sth=1,eth=0,count=6,min=0,avg=0,max=0,err=6,errpct=100,00,rate=0,39
2016/12/06 09:16:00 INFO - jmeter.reporters.InfluxMetricSender: samples,project=taguru,suite=taguru-100-users,label=GET.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012147541000000
samples,project=taguru,suite=taguru-100-users,label=POST.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012150050000000
samples,project=taguru,suite=taguru-100-users,label=GET.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012152572000000
samples,project=taguru,suite=taguru-100-users,label=POST.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012155075000000
samples,project=taguru,suite=taguru-100-users,label=GET.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012157605000000
samples,project=taguru,suite=taguru-100-users,label=POST.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012160107000000
2016/12/06 09:16:30 INFO - jmeter.reporters.Summariser: summary + 12 in 00:00:31 = 0,4/s Avg: 0 Min: 0 Max: 0 Err: 12 (100,00%) Active: 1 Started: 1 Finished: 0
2016/12/06 09:16:30 INFO - jmeter.reporters.InfluxMetricSender: project=taguru,suite=taguru-100-users ath=1,sth=1,eth=0,count=12,min=0,avg=0,max=0,err=12,errpct=100,00,rate=0,39
2016/12/06 09:16:31 INFO - jmeter.reporters.InfluxMetricSender: samples,project=taguru,suite=taguru-100-users,label=GET.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012163387000000
samples,project=taguru,suite=taguru-100-users,label=POST.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012165889000000
samples,project=taguru,suite=taguru-100-users,label=GET.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012168397000000
samples,project=taguru,suite=taguru-100-users,label=POST.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012170899000000
samples,project=taguru,suite=taguru-100-users,label=GET.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012173407000000
samples,project=taguru,suite=taguru-100-users,label=POST.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012175913000000
samples,project=taguru,suite=taguru-100-users,label=GET.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012178421000000
samples,project=taguru,suite=taguru-100-users,label=POST.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012180923000000
samples,project=taguru,suite=taguru-100-users,label=GET.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012183448000000
samples,project=taguru,suite=taguru-100-users,label=POST.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012185950000000
samples,project=taguru,suite=taguru-100-users,label=GET.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012188460000000
samples,project=taguru,suite=taguru-100-users,label=POST.Login,status=Failure,threadname=Jmeter\ Oferta\ i\ Wniosek\ 1-1 ath=1,duration=0,responsecode=0 1481012190961000000
2016/12/06 09:16:31 INFO - jmeter.reporters.Summariser: summary = 18 in 00:00:46 = 0,4/s Avg: 0 Min: 0 Max: 0 Err: 18 (100,00%)
2016/12/06 09:16:31 INFO - jmeter.reporters.InfluxMetricSender: project=taguru,suite=taguru-100-users ath=1,sth=1,eth=0,count=18,min=0,avg=0,max=0,err=18,errpct=100,00,rate=0,39
Hi vlns,
The log file is : https://drive.google.com/open?id=0Bwh7Qxic5Sm4ODdBeXVZVTlIY28
Regards
Hi vlns,
You will find the log file on https://drive.google.com/open?id=0Bwh7Qxic5Sm4ODdBeXVZVTlIY28
Regards
Alain, I see what is happening!! It is a bug which i need to take care. The issue is your locale settings. for ex: 2.9 is sent as 2,9
and tahats my properties:
#True to send data to influx db
summariser.influx.out.enabled=true
# influxdb server ip
summariser.influx.ip=localhost
# influxdb port to post the data via http
summariser.influx.port=8086
# influxdb database
summariser.influx.db=jmeter
# name of the project. might be useful when you use same DB for multiple projects.
# it is stored as tag for faster query
summariser.influx.project=taguru
# name of the test suite. might be useful when you run the same test for different conditions.
# it is stored as tag for faster query
summariser.influx.project.suite=taguru-100-users
# timeouts
summariser.influx.connection.timeout=5000
summariser.influx.socket.timeout=5000
summariser.influx.log.enabled=true
Hi Vlns,
I’ve change my locale settings and it works now.
Thank you for your help.
Regards
Here the jmeter log with
summariser.influx.log.enabled=true
http://textuploader.com/dd4dx
Rafal,
Looks like – your locale setting is causing the issue. For ex: 0.4 is sent as 0,4 to influxdb which does not accept this value. I have to update the jar file. easy fix is to change the locale settings.
Hi Vlns,
Can the code be modified to send data to Elasticsearch instead of Influx? How feasible would it be? I would be willing to take on the work if it’s feasible. The current solution is working for me but since I have all other load/performance testing data in Elasticsearch, it would be better for me to have everything in one place and not having to manage, collect and present data in two different platforms. May be another blog post idea for you 🙂
Thanks.
Hi, Thanks for the detailed post.
When I use your .jar file and execute the steps to run the test in non-gui mode.
I am getting below error:
Uncaught Exception java.lang.NoSuchMethodError: org.apache.jmeter.gui.util.FilePanel.(Ljava/lang/String;Z)V. See log file for details.
Uncaught Exception java.lang.NoClassDefFoundError: Could not initialize class org.apache.jmeter.gui.util.MenuFactory. See log file for details.
Praveens-iMac:bin praveenmaddala$ jmeter.sh -n -t ~/Desktop/Yamini/openGoogle.jmx -l ~/Desktop/Yamini/openGoogle.jtl
Writing log file to: /Users/praveenmaddala/Desktop/apache-jmeter-3.1/bin/jmeter.log
Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:’/Users/praveenmaddala/Desktop/Yamini/openGoogle.jmx’, missing class com.thoughtworks.xstream.converters.ConversionException:
—- Debugging information —-
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message :
first-jmeter-class : org.apache.jmeter.save.converters.TestElementConverter.unmarshal(TestElementConverter.java:107)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.samplers.SampleSaveConfiguration
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/ResultCollector/objProp/value/sentBytes
line number : 119
version : 3.0.20160606
——————————-
Yamini,
It works with version 2.13 and 3.0. For other versions, I am trying a different approach. Will take 2 weeks for me to finish it.
Hi !. Your work is greate. I’m using you imaplementation for sending metrics to influxdb and picks up them from grafana . It’s cool.
I would like to add some tags in database as well as a reconection to it. and some metrics dosn’t be useful for mi. Could you please give me the surce code of ApacheJmeter_core edited by you to add this. Ty
Thanks Ale. I have been working to improve the current implementation. No more apache_core update. Please wait..mostly ll have something in 2 weeks.
That’s will be great ! anyway I would like to make my implementation and if you might to share me your source code, will a big help for me.
Ale, you can always decompile the jar and see the source yourself. My point is – It is not a right approach. I was in need of some quick solution. So I did. but modifying the source is not a good option in the long run. It will not be compatible for new version of jmeter.
Hello vlns, I am using backendlistner and influxdb. I have observed that metric are not collected every 1 second in influx db. Metrics are being captured every 10seconds. Where should I modify the interval so that it can capture every 1 second?
Thanks.
Hello, “vIns”, I am implementing this excellent solution in my performance tests, but I have a problem. I am using 16 independent .jmx and the results obtained from the “total” table are not the ones I want. How could I solve this, without losing the independent metrics? thank you very much.
I assume each jmx is for different project or suite. total table logs the project or suite info. You can filter the metrics specific to a project or suite.
If you think, i have not understood your question correctly, please elaborate.
de pago (WS), los 16 .jmx corren al mismo tiempo y todos registran datos en “total”. Yo necesito presentar los resultados de rendimiento para cada red de pago (WS) y el rendimiento en general de toda la prueba. yo no se si me entiendes. 🙁
qHi vln, I am testing 16 payment networks (WS), the 16 .jmx run at the same time and all register data in “total”. I need to present the performance results for each payment network (WS) and the overall performance of the entire test. I do not know if you understand me 🙁
Hi Vlns,
I have a little problem hahaha, so I need to save in the “total”, the thread name. That it’s possible?.
I want to know, what is the throughput for each jmx. If I can get the thread name, I could calcute the rate for each with influxdb.
total gives aggregate information. if you need sample level info, all the informations are logged under samples table.
Hi vln, I am testing 16 payment networks (WS), the 16 .jmx run at the same time and all register data in “total”. I need to present the performance results for each payment network (WS) and the overall performance of the entire test. I do not know if you understand me 🙁
Hello vlns I can use ant or maven or only works with nom-GUI? I am following the tutorial for continuous integration (IC) http://www.testautomationguru.com/jmeter-continuous-performance-testing-part1/ but I do not register the results.
Great site. Thank you for your time in helping me understand about this.
Hi There,
I have been working on influx DB & Grafana integration in order to create dashboard for jmeter performance tests in real time.
Both Influx Db & Grafana had been installed on the local machine. Samples of jmeter tests can be seen in the Grafana dashboard Table & graphs options.
Requirement is to create a table having multiple columns
First column would be txn name like TS01_01_Launch
Second column should have value of ok.avg sample
Third column should have value of ok.max sample and so on.
Can you assist me in order to write a query under table option to create a table having multiple columns by using different samples.
Check this post – http://www.testautomationguru.com/jmeter-real-time-results-influxdb-grafana-part-2-adding-custom-fields/
Hi,
I tried to import the json file you provided in Grafana, which is TestAutomationGuru-Grafana-Samples.json, but when I done importing, I got a reminder at the corner of Grafana, which is “Templating init failed a.metricFindQuery is not a function. (In ‘a.metricFindQuery(this.query)’,’a.metricFindQuery’ is undefined)”. Also, I got no data points displayed on the two graphs, could you help solve this? I will be so appreciate.
Dawn
Hi, Grafana is now in version 4.1. The json files were bit old. I need to update.
I have Configured the Influx db .Connected data source to grafana . I also see the show measurement data from my influx db . but data is not being displayed on grafana . Was going through stackoverflow found someone saying it has something to with timezone . I changed timezone to UTC still no data appears in grafana .
Do i need to changed the timezone server ?????Please help
I see an error when import dashboard sampler result, complain about Unknown panel type: grafana-piechart-panel
How i can fix this issue?
and how to add new chart like 90%, 95 percentile etc?
thanks
Great blog and really nice customer listener solution. Thanks. I’ve successfully implemented your custom listener and it’s working nicely except that when I start my tests there is an approximately 25 second delay before any data is written to my InfluxDB database. I first noticed the delay on my Grafana dashboard, but I see the delay when querying the database directly, so Grafana is not the issue. I am running JMeter, the InfluxDB server and the Grafana server all on the same machine. Any idea why the delay? Thanks very much.
The custom listener writes the once in every 30 seconds. [based on console output interval]
Hi vlns,
Could you detail the “Change your locale setting” for me as I can’t see the delta, samples and total display in the influxdb after running my test.
Thank you.
Check the log. How does it look? Do you see any special characters in the entry which it sends to influxdb?
Hi vlns,
Thanks for your reply, I attached here 2 files: jmeter.log and user.properties. If you have time, please take a look at them. It seems I can’t find any log regarding writing log to InfluxDB although I followed all of your steps strictly. Any advise would be of help.
Thank you.
http://pasted.co/8b7abfd7
http://pasted.co/b24e4f2b
From the log, your locale setting is en_US only. I do not see any log for influxdb line protocol. Are you sure that you testautomationguru modified apacher_core.jar
Guys, please notice that in the properties that need to be added to the user.properties file there are duplicated lines like below:
True to send data to influx db
summariser.influx.out.enabled=true
True to send write the info it sends to influx db – enable only for debugging purpose
summariser.influx.out.enabled=false
The second one overrides the first so I guess the second one should be rather:
summariser.influx.log.enabled=false
Thank you a bunch Marton. You just saved my whole week, it works like charm now. How can I be so ignorant!.
Thanks vlns again for this amazing post. If possible, would you update the user.properties file as mentioned by Marton? and keep doing your great job, life saver.
Thanks Marton. Updated.
Hi vlns, is there any possibility of an update for ApacheJMeter_core file to match with latest Jmeter version 4.0? As I copy your modified ApacheJmeter_core file to lib/ext folder, Jmeter version auto switches back to 3.3
Yeah, Thats expected. I will try to take a look. Thats the problem with this approach – jars will change for every version JMeter releases.
Is it possible to push ApacheJMeter_core changes latest Jmeter?
Working on it. Will release it soon.
Hi Vlns,
Great post and thanks for sharing it with us. Here I like to check on these 3 items, your thoughts on this will be greatly appreciated
1. Is the modified jmeter_core.jar good to work with latest ver of Jmeter4.0
2. Assume our performance test are setup to run from different jenkins slaves for different applications, how to handle the update of user.properties with respect to application details on the fly
3. I see that that backend listener calculates these values for every given interval (like every 1 second). So let’s say it’s a 1 hour test, even from grafana if we calculate the mean value of “jmeter.all.a.avg” with the settings of “groupby(testintervalperiod)” I believe still we will get the correct value of average value for complete 1hour test. Could you provide your thoughts on this
Appreciate all your help on this
Thanks for this article, it’s indeed very useful.
I’ve configurated successfully on my local environment jmeter + influxdb + grafana + jenkins, but I have some questions related to launching that in jenkins cloud (not on local).
Question #1: For this goal I need to push my JMeter project to Git, right? Do I need just to push my JMeter folder to Git?
Question #2: What should I do with influxdb and grafana? They should be run through docker or so? Or do I need to do some manipulation with that in Jenkis file?
Thanks in advance for your answer!
Q #1:
Your jmx file and its dependencies like csv files etc. Not the JMeter itself. Assumption is, the remote slave should have JMeter installed already.
Q #2:
JMeter should know where to send the data. So, you should have influxdb/grafana server config somewhere like Jmeter.properties or Jenkins file. There are multiple ways to achieve this.
Hi vlns,
Thank you for detailed steps.
Just one question, is the data stored temporarily in the influxDB? I noticed after closing the influx db, i don’t see the data anymore when logged in and started the db again. Is there a way to store the data permanently?
It is a database. So, it will store the permanently. Are you using docker? if yes, you need to map the volume.
Hey vlns,
In the case when I run my JMeter test through Maven, how can I send test result data to InfluxDB?
I’ve followed to your steps, but it seems to not be working with Maven 🙁
Any suggestions?
Thanks in advance for your reply!
When you mean your steps, you use the modified jar? Maven downloads JMeter’s jar – so you might not be able to use modified jars.
I’ve just put modified jar to “/src/test/jmeter/lib/ext” in my Maven project. Does this make sense?
I’ve tried to add your jar file using this: https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Adding-additional-libraries-to-the-classpath
But it seems like I have an issue with artifact defining, can you help me to define what I need to put inside the ? Thanks in advance!
Hi Vins,
do you have any suggestion related the problem above? (how to put your modified jar file in “/lib/ext” folder of Jmeter-Maven project).
Thanks in advance.
maven has an Ant plugin which can be used to replace the jar.
Hi,
First of all thanks for this wonderful article, it helped me a lot. As you mentioned jmeter is not giving/exposing me sufficient data while i am using backend listeners. I tried with your custom approach , by replacing the ApacheJMeter_core at \lib\ext location and added the properties you mentioned in the user.properties file. I imported the json in Grafana, but results are not getting displayed. While i looked into your json, i could see multiple measurements you are using is not created in influxDB. I am getting data in influxDB while using backend listeners. I could not see any error in jmeter log or information about connection details. Can you please advise if anything needs to added/checked?
I am not sure if you followed all the steps. It works only in non-gui mode. you need have a database created in influxdb already.
How can we see different test run results?
Do we need to clear influxDb before each testrun else there is any other way? Please suggest.
I wanted to use ‘grafana’ to compare the results of different test runs and wanted to share the results with the team(via PDF or anything else).
Please Suggest,
No need to. This part 1 of the article. you should continue reading all.
I am using following:
grafana-5.2.2
influxdb-1.6.1-1
JMeter4.0
After importing i don’t see any results in dashboard. However i i right query SELECT last(“value”) FROM “jmeter.all.a.avg” WHERE $timeFilter GROUP BY time($__interval) fill(null) … i am getting results.
One difference i found, don’t show delta and total tables
show measurements
name: measurements
name
delta
samples
total
Instead i am getting following output:
show measurements
name: measurements
name
Upgrade-Insecure-Requests:
jmeter.all.a.avg
jmeter.all.a.count
jmeter.all.a.max
jmeter.all.a.min
jmeter.all.a.pct90
jmeter.all.a.pct95
jmeter.all.a.pct99
jmeter.all.h.count
jmeter.all.ko.avg
jmeter.all.ko.count
jmeter.all.ko.max
jmeter.all.ko.min
jmeter.all.ko.pct90
jmeter.all.ko.pct95
jmeter.all.ko.pct99
jmeter.all.ok.avg
jmeter.all.ok.count
jmeter.all.ok.max
jmeter.all.ok.min
jmeter.all.ok.pct90
jmeter.all.ok.pct95
jmeter.all.ok.pct99
jmeter.test.endedT
jmeter.test.maxAT
jmeter.test.meanAT
jmeter.test.minAT
jmeter.test.startedT
jmeterall.a.avg
jmeterall.a.count
jmeterall.a.max
jmeterall.a.min
jmeterall.a.pct90
jmeterall.a.pct95
jmeterall.a.pct99
jmeterall.h.count
jmeterall.ko.avg
jmeterall.ko.count
jmeterall.ko.max
jmeterall.ko.min
jmeterall.ko.pct90
jmeterall.ko.pct95
jmeterall.ko.pct99
jmeterall.ok.avg
jmeterall.ok.count
jmeterall.ok.max
jmeterall.ok.min
jmeterall.ok.pct90
jmeterall.ok.pct95
jmeterall.ok.pct99
jmetertest.endedT
jmetertest.maxAT
jmetertest.meanAT
jmetertest.minAT
jmetertest.startedT
>
Kindly let me know what i am missing here
hello Vlns,
Thanks for the article. I am trying your custom jmeter jar with version 4.0 and see that the “delta” measurement is missing in influxdb( i am able to see samples and totals measurement). Have you verified if the jar works fine with 4.0 version or do you have an updated custom jar for summarizer, that can be used?.
-Aj
it will work with 3.3. for 4.0 i am yet to upload. sorry for the delay from my side.
This is not feeding p99 latency metrics, Can you include that in the Core-API jar
Hi VIns,
Thank you very much for such a beautiful article. I’m Running load tests using Jmeter and monitoring live results using Grafana Dashboard. My requirement is while load is scheduled on different API’s for example Login and create user AP’s, How to configure displays graphs and metrics for each API in dashboard. Current dashboard display data and graphs on overall throughput, response times. If I scheduled load on 3 api’s , need to monitor results on api’s based to have a clear results. Could you please help on this?
Thanks,
Shankar
Hi Vinoth,
Thanks for the article, I’ve managed to setup on my local machine and it works perfectly fine. Now I’ve set up a server on AWS which is running Grafana and influxDB. When I try to run the jmeter test pointing to that server address. It says connection refused. Any idea on this as why it is happening
Sounds like a firewall issue! Check if the Security group opens the port of influxdb.
Hello Vlns,
Have updated or can you please update your “custom jmeter jar” for newer Jmeter version i.e 5.3 and later.
That will be really helpful.
Please share the update on this and new file location to download.
Thanks once again.