Live Performance Result Monitoring with Jmeter-Grafana-influxdb

This blog has been moved here


  1. After running Jmeter scripts ,Measurements showing:- Success! (no results to display)

    1. Select DB from right upper corner and do it again.

      make sure your influxdb has graphite plugins configured.

  2. Hi Shantonu!
    thanks for good and detailed guide on this.
    However I failed to found how to see in influxDB transactions response times without percentiles. Is it ever possible?


    1. Hi Artem,

      in jmeter response time comes in Max,Min, or any %tile.. In influx db , data stored in all of those fields. So, just select proper parameter for the graph.
      Check details here on which items are stored.
      Select among them.

      ----------- if you want to dig inside-------------
      If you check what jmeter sends , see this Method name ( static void sendToListener)
      And , in sample result( , it has every thing.

      So, practically it send everything as results , you need to see your query in grafana.
      And , if you want some more info , you need to make a plugins that extends backend listener and use this predefined statistics.


  3. Hey Shantanu, this is simply great, relatively new to this area. Was looking for this kind of tool. Just wanted to confirm few things

    1- Does Influxdb picks up the data from Webserver to track the traffic/load real time?
    2- Not sure if we can configure this for realtime servers with no UI

    1. thanks

      1. influxdb doesn't pick, we need to send. I am sending from jmeter backend listener to the influxdb host's 2003 port. This port is opened for graphite format input. (see the configuration)
      it is possible to send /receive data without any formating/plugins. I use 8086 port to actually read data from influxdb to show in grafana. you can send data using that.
      in fact, infludb supports multiple clustered DB , so you can have distributed DB for data collection which scales.

      2. Yes, this is full non UI, see my docker example
      and I test with jmeter which can be run in non gui or even from jenkins jobs(maven, ant, sh)

  4. Hi Shantonu,
    Useful article.
    Keep it up.

  5. We are trying to disply active threads with multiple jmx script that are controlled by Ant
    But Grafana is just displaying the Max value of active threads amongst the jmx scripts as running Users.
    How do i handle this? I want to display all running VUsers of all the jmx scripts

    Suppose i have 3 scripts
    1. 4 Users
    2. 5 Users
    3. 6 users

    now i just see 6 Users as running with test.startedT

    how do i get sum of all these 3 i.e 15 Users

    1. V users in jmeter are the threads. So, include thread counts.

  6. Awesome article Shantonu dada.


  7. Is there any way to pass number of threads to influxDB??

    1. possible as variable . But i prefer , send me JMX, let me try first

  8. Hi Shantonu,

    I have followed all the steps mentioned above. These are the Errors I am facing:
    #1 java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
    2018-02-14 15:51:11,234 INFO o.a.j.s.FileServer: Set new base='/home/dinesh/apache-jmeter-4.0/bin/Result'
    2018-02-14 15:52:15,516 INFO o.a.j.e.StandardJMeterEngine: Running the test!
    2018-02-14 15:52:15,517 INFO o.a.j.s.SampleEvent: List of sample_variables: []
    2018-02-14 15:52:15,517 INFO o.a.j.s.SampleEvent: List of sample_variables: []
    2018-02-14 15:52:15,573 INFO o.a.j.v.b.BackendListener: Backend Listener: Starting worker with class: class org.apache.jmeter.visualizers.backend.graphite.GraphiteBackendListenerClient and queue capacity: 5000
    2018-02-14 15:52:15,587 INFO o.a.j.v.b.BackendListener: Backend Listener: Started worker with class: class org.apache.jmeter.visualizers.backend.graphite.GraphiteBackendListenerClient
    2018-02-14 15:52:15,665 INFO o.a.j.v.b.g.TextGraphiteMetricsSender: Created TextGraphiteMetricsSender with host: localhost, port: 2003, prefix: jmeter.
    2018-02-14 15:52:15,673 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
    2018-02-14 15:52:15,992 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group
    2018-02-14 15:52:15,992 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group.
    2018-02-14 15:52:15,992 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
    2018-02-14 15:52:15,993 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false
    2018-02-14 15:52:16,011 INFO o.a.j.t.ThreadGroup: Started thread group number 1
    2018-02-14 15:52:16,011 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
    2018-02-14 15:52:16,031 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1
    2018-02-14 15:52:16,100 INFO o.a.j.p.h.s.HTTPHCAbstractImpl: Local host = dinesh-VirtualBox
    2018-02-14 15:52:16,153 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP request retry count = 0
    2018-02-14 15:52:16,452 INFO o.a.j.p.h.s.LazySchemeSocketFactory: Setting up HTTPS TrustAll Socket Factory
    2018-02-14 15:52:16,462 INFO o.a.j.u.JsseSSLManager: Using default SSL protocol: TLS
    2018-02-14 15:52:16,462 INFO o.a.j.u.JsseSSLManager: SSL session context: per-thread
    2018-02-14 15:52:16,535 INFO o.a.j.u.SSLManager: JmeterKeyStore Location: type JKS
    2018-02-14 15:52:16,537 INFO o.a.j.u.SSLManager: KeyStore created OK
    2018-02-14 15:52:16,537 WARN o.a.j.u.SSLManager: Keystore file not found, loading empty keystore
    2018-02-14 15:52:16,713 ERROR o.a.j.v.b.g.TextGraphiteMetricsSender: Error writing to Graphite: Connection refused (Connection refused)
    2018-02-14 15:52:17,666 ERROR o.a.j.v.b.g.TextGraphiteMetricsSender: Error writing to Graphite: Connection refused (Connection refused)
    2018-02-14 15:52:18,611 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1
    2018-02-14 15:52:18,611 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1
    2018-02-14 15:52:18,629 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
    2018-02-14 15:52:18,629 INFO o.a.j.v.b.BackendListener: Worker ended
    2018-02-14 15:52:18,631 ERROR o.a.j.v.b.g.TextGraphiteMetricsSender: Error writing to Graphite: Connection refused (Connection refused)
    2018-02-14 15:52:18,636 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

    Created jmeter database and using the database.
    Typer SHOW MEASUREMETS. It is just saying "Success! (no results to display)"

    Please help me

    1. its connection errors... check port & connections

  9. Hi Shantonu,
    I am running test using jmeter on two machines inorder to distribute the load properly. I am sable configure influxdb and Grafana in two machines and fetch the report for the scripts that are run in that machine. When I try to write data to influxdb from machine 1 to machine 2 I am getting the below error.

    2018/09/17 14:55:32 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
    2018/09/17 14:55:32 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
    2018/09/17 14:55:32 INFO - jmeter.visualizers.backend.BackendListener: Backend Listener:Starting worker with class:class rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient and queue capacity:5000
    2018/09/17 14:55:32 INFO - jmeter.visualizers.backend.BackendListener: Backend Listener: Started worker with class:class rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient
    2018/09/17 14:55:42 ERROR - jmeter.JMeter: Uncaught exception: java.lang.IllegalStateException: Failed calling setupTest
    at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(
    at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(
    at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(
    at Source)
    Caused by: java.lang.RuntimeException: connect timed out
    at org.influxdb.impl.InfluxDBImpl.execute(
    at org.influxdb.impl.InfluxDBImpl.describeDatabases(
    at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.createDatabaseIfNotExistent(
    at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.setupInfluxClient(
    at rocks.nt.apm.jmeter.JMeterInfluxDBBackendListenerClient.setupTest(
    at org.apache.jmeter.visualizers.backend.BackendListener.testStarted(
    ... 4 more
    Caused by: connect timed out

    My Expected Result: Run test in two machines and the scripts should always report to influxdb located in one machine so that I collate the results easily.

    1. influx cant connect , (time out).. see if you can connect from browser . without debugging , i cant give you any feedback