jmetergrafanainfluxdb

Get ${path} variable from JMeter plan into InfluxDB to build Grafana dashboards


Our test plan iterates via While Controller and HTTP Request Sampler over an url list and writes its results to an InfluxDB2. We create Dashboards in Grafana for the metrics.

We need to see the data (i.e. response time) for every URL though. How can we pass variables like ${path} to InfluxDB2 to filter/sort them in custom Grafana dashboards?

We add "path" already in JMeter test plan.

enter image description here


Solution

  • The easiest way is making this path a part of Sampler's (or Transaction's) label:

    enter image description here

    Then in Grafana you can build your queries to include sampler's labels.