Skip to content

JMeter Grafana InfluxDB Backend Listener

Stream live JMeter metrics to InfluxDB and Grafana with Backend Listener: Influx clients, Graphite, metric prefixes, cardinality tips, and CLI setup.

Difficulty
intermediate
Guide type
how-to
Estimated read time
12 min read
Last verified version
Verified JMeter 5.6

JMeter + Grafana / InfluxDB / Backend Listener

Section titled “JMeter + Grafana / InfluxDB / Backend Listener”

For long tests you need live visibility, not only a post-run HTML report. Since JMeter 2.13, the Backend Listener can send metrics to external backends. JMeter ships Graphite and InfluxDB clients; Grafana commonly visualizes InfluxDB or Graphite data. This guide summarizes the official Real-time results chapter and component reference fields so you can wire live dashboards without abandoning CLI + HTML dashboard artifacts.

Backend Listener is a Listener implementation that pushes metrics through a BackendListenerClient rather than only painting GUI graphs. Official clients include:

ClientIntroduced / notes
GraphiteBackendListenerClientGraphite-compatible metrics; also used with InfluxDB Graphite input in some setups
InfluxdbBackendListenerClientSince JMeter 3.2; direct Influx write, custom schema, annotations support
InfluxDBRawBackendListenerClientSince JMeter 5.4; writes sample-oriented data (heavier)

You can implement AbstractBackendListenerClient for other backends (JDBC, JMS, custom HTTP), as described in the real-time results overview.

The real-time results doc groups metrics such as:

  • test.minAT / test.maxAT / test.meanAT - active threads
  • test.startedT / test.endedT - started / finished threads

Names are prefixed by a configurable root metrics prefix.

Section titled “Response-related metrics (per sampler name)”

Examples documented:

  • .ok.count - successful responses
  • .h.count - hits per second (includes sub-results depending on Transaction Controller settings)
  • .ok.min / .ok.max - min/max successful response times
  • Additional percentile and error metrics as documented for your client

Transaction Controller note: for hit-rate style metrics, official text warns about parent sampler generation settings. Keep transaction usage consistent so Grafana panels mean what you think.

  1. Add Backend Listener under Test Plan or Thread Group (scope like other listeners).
  2. Choose implementation class (InfluxdbBackendListenerClient is the usual Influx path).
  3. Fill parameters from the component reference.
  4. Run a short CLI test and confirm points arrive in Influx.
  5. Build or import Grafana panels on those measurements.

InfluxdbBackendListenerClient parameters (documented)

Section titled “InfluxdbBackendListenerClient parameters (documented)”

From the component reference (verify against your JMeter version):

ParameterRole
influxdbUrlWrite URL, e.g. http://influxHost:8086/write?db=jmeter
influxdbTokenInfluxDB 2 token (since 5.2); example format in docs
measurementLine protocol measurement; default often jmeter
applicationTag for separating apps/tests
title / run title fieldsHelp distinguish runs in Grafana
eventTagsTags for Grafana annotations (events measurement)
summaryOnlyWhen true, send fewer detail series (lighter)
samplersRegexFilter which sampler labels are sent
percentilesWhich percentiles to export

Exact property rows can evolve; copy from your JMeter UI or the versioned component reference on this site.

The real-time results chapter includes an InfluxDB v2 subsection (anchor influxdb_v2 in the manual). Use org/bucket style URLs and tokens as shown there and in the component reference cloud example for raw client:

https://.../api/v2/write?org=org-id&bucket=jmeter

Parameters include graphiteHost, graphitePort (default 2003; pickle sender notes for port 2004 in the reference). You can point at Graphite itself or an InfluxDB instance with Graphite input enabled, depending on your stack.

Since 5.4, raw client writes more granular sample data. Expect higher write volume and Influx load. Use when you need per-sample analysis in the TSDB; prefer the aggregated Influx client for large tests if summary metrics suffice.

Official docs mention Grafana dashboards and InfluxDB annotations. Typical flow:

  1. Create Influx datasource in Grafana (URL, token, org/bucket or database).
  2. Query the jmeter measurement (or your measurement name).
  3. Panel active threads (minAT/meanAT/maxAT), throughput, and response time percentiles.
  4. Enable annotations from the events measurement if you set eventTags / title fields.
  5. Variable filters on application and transaction tags to switch tests.

Screenshot references appear in the component reference (grafana_dashboard.png). Community dashboards exist; always remap metric names to your prefix and JMeter version.

Terminal window
jmeter -n -t plan.jmx -l results.jtl \
-JinfluxHost=influx.internal \
-e -o report/

Backend Listener configuration usually lives in the plan. You can still parameterize hosts with variables if you externalize URL pieces via \${__P} where the element allows.

Lean-run rules still apply (best practices):

  • No View Results Tree under load.
  • Backend Listener itself costs CPU and network; use samplersRegex / summaryOnly to reduce series.
  • Ensure the injector can reach Influx (firewall, DNS).

With remote testing:

  • Each worker runs the plan, so each worker may send metrics if Backend Listener is in the plan.
  • Tag by hostname or application property so Grafana can split injectors.
  • Controller still aggregates the JTL when using standard remote mode.
  • Do not overwhelm Influx with thousands of high-cardinality series (unique dynamic sampler names).

Bad:

  • Sampler labels containing free-text URLs with unique ids every sample.

Good:

  • Stable labels: Login, Search, Checkout.
  • Dynamic data in body/parameters, not in the sample label.

High cardinality destroys Influx performance and Grafana usability.

SymptomCheck
No data in GrafanaURL/token/db; network from injector; Backend Listener enabled
Partial seriessamplersRegex too strict; summaryOnly
Influx OOM / heavy writesRaw client at high RPS; reduce cardinality
Clock skew graphsNTP on injectors and Influx
Auth errors Influx 2Token permissions for org/bucket

A listener that sends metrics to external backends through a BackendListenerClient implementation instead of only showing GUI graphs.

For live dashboards during large tests, start with InfluxdbBackendListenerClient (since 3.2). Use InfluxDBRawBackendListenerClient (since 5.4) when you need raw sample writes and can afford the volume.

Does Backend Listener replace the HTML report?

Section titled “Does Backend Listener replace the HTML report?”

No. Keep -l results and -e -o HTML dashboards for offline analysis and artifacts. Backend Listener is for live monitoring.

Yes. GraphiteBackendListenerClient ships with JMeter. Grafana can also query Graphite datasources.

Why are my Grafana series empty for some samplers?

Section titled “Why are my Grafana series empty for some samplers?”

Check samplersRegex, whether those labels actually ran, and whether Transaction Controller parent/child settings change what is emitted.

InfluxdbBackendListenerClient can write events used as Grafana annotations; eventTags and title-related fields help tag runs. See the component reference and Grafana Influx annotation docs linked from the manual.

On this page