apache / apache/jmeter

Send data to influxDB failed when measurement is replaced by Property or Variable

Open
#5,505 1 comment 0 reactions 0 assignees View on GitHub
os: All P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**Markowski_JM** ([Bug 65164](https://bz.apache.org/bugzilla//show_bug.cgi?id=65164&redirect=false)):
Hi,

I found a bug when JMeter send data to InfluxDB.
I use this configuration in the simple scenario

influxdbMetricsSender org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender
influxdbUrl http://${__P(InfluxDB_HostName,)}:${__P(InfluxDB_HostPort,)}/write?db=TEST
application TEST_PLAN
measurement ${__P(Name,)}
summaryOnly false
samplersRegex (^\d+).+
percentiles 99;95;90
testTitle ${__P(InfluxDB_TestTitle,)}
eventTags

JMETER IN GUI MODE
The scenario run correctly and I found data in db TEST

JMETER NO GUI MODE
I have a problem only with parameter measurement
measurement ${__P(Name,)}

The parameters :
influxdbUrl with this values is correct (GUI / NO GUI)
http://${__P(InfluxDB_HostName,)}:${__P(InfluxDB_HostPort,)}/write?db=TEST

testTitle with this values is correct (GUI / NO GUI)
${__P(InfluxDB_TestTitle,)}

application with this values is correct (GUI / NO GUI)
TEST_PLAN (or parameter or value)

BUT,

I try to use measurement with ${__P(Name,)} and ${Name_1} : NOT OK in non gui

2021-03-02 17:30:10,520 ERROR o.a.j.v.b.i.HttpMetricsSender: Error writing metrics to influxDB Url: http://localhost:8086/write?db=TEST, responseCode: 400, responseBody: {"error":"partial write: unable to parse ',application=TEST_PLAN,transaction=internal minAT=0,maxAT=0,meanAT=0,startedT=0,endedT=0 1614702610451000000': missing measurement dropped=0"}

In conclusion, it's impossible to execute a scenario in non gui mode with parameter measurement replaced by a Property from Backend Listener.

Severity: normal
OS: All

Contributor guide

Open the contributing guide

Research direction

Start with the Backend Listener configuration and the org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender entry point. Reproduce the difference between GUI and non-GUI execution using a property or variable for measurement. Done means non-GUI runs send metrics with the resolved measurement and InfluxDB accepts them without the missing-measurement error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.