Bug 60590 - BackendListener : Add Influxdb BackendListenerClient implementation to JMeter
Summary: BackendListener : Add Influxdb BackendListenerClient implementation to JMeter
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.1
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-15 18:46 UTC by Philippe Mouawad
Modified: 2017-02-17 16:54 UTC (History)
1 user (show)



Attachments
Test plan using Mirror Server for people who want to test (14.66 KB, application/xml)
2017-01-21 10:11 UTC, Philippe Mouawad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2017-01-15 18:46:07 UTC
Add a new backend listener to send data to InfluxDB server. 
InfluxDB is a time series database built to handle high write and query loads.

This backend writes data with the HTTP API based on the influxdb line protocol.
See :
HTTP API (https://docs.influxdata.com/influxdb/v1.1/guides/writing_data/)
Line protocol reference (https://docs.influxdata.com/influxdb/v1.1/write_protocols/line_protocol_reference/)

Syntax example :
<measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]

At the start and the end of a JMeter test, the backend automaticaly adds two annotations in the events measurement for a better usage with Grafana ( See grafana documentation http://docs.grafana.org/reference/annotations/#influxdb-annotations)

PR : https://github.com/apache/jmeter/pull/246
Comment 1 Philippe Mouawad 2017-01-15 21:24:49 UTC
Author: pmouawad
Date: Sun Jan 15 21:19:52 2017
New Revision: 1778947

URL: http://svn.apache.org/viewvc?rev=1778947&view=rev
Log:
Bug 60590 - BackendListener : Add Influxdb BackendListenerClient implementation to JMeter
Partly Based on PR 246  from by Logan Mauzaize (logan.mauzaize at gmail.com) and
Maxime Chassagneux (maxime.chassagneux at gmail.com).

Fixed following issues in PR:
- Reinit httpRequest
- Fix issue with broken NaN comparison which led to missing
- Improve InfluxDB Annotations
- Use StringBuilder
- Init StringBuilder capacity
- Add documentation

This closes #246
Bugzilla Id: 60590

Added:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/AbstractInfluxdbMetricsSender.java   (with props)
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java   (with props)
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java   (with props)
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbMetricsSender.java   (with props)
Modified:
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/component_reference.xml
Comment 2 Philippe Mouawad 2017-01-21 09:19:19 UTC
Author: pmouawad
Date: Sat Jan 21 09:18:49 2017
New Revision: 1779711

URL: http://svn.apache.org/viewvc?rev=1779711&view=rev
Log:
Bug 60590 BackendListener : Add Influxdb BackendListenerClient implementation to JMeter.
Partly based on <pr>253</pr> by  Maxime Chassagneux (maxime.chassagneux at gmail.com).
Set timestamp to be able to use AsyncHttpClient
Use AsyncHttpClient
Allow configuration of Send interval
This closes #253
Bugzilla Id: 60590

Modified:
    jmeter/trunk/LICENSE
    jmeter/trunk/bin/jmeter.properties
    jmeter/trunk/build.properties
    jmeter/trunk/build.xml
    jmeter/trunk/eclipse.classpath
    jmeter/trunk/lib/   (props changed)
    jmeter/trunk/lib/aareadme.txt
    jmeter/trunk/res/maven/ApacheJMeter_parent.pom
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/graphite/GraphiteBackendListenerClient.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/AbstractInfluxdbMetricsSender.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java
Comment 3 Philippe Mouawad 2017-01-21 10:07:51 UTC
Author: pmouawad
Date: Sat Jan 21 10:06:30 2017
New Revision: 1779715

URL: http://svn.apache.org/viewvc?rev=1779715&view=rev
Log:
Bug 60590 BackendListener : Add Influxdb BackendListenerClient implementation to JMeter.
Annotation contained "timestamp in its label
Annotation for end of test was not send due to HttpClient being closed before last send was done
Bugzilla Id: 60590

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java

Author: pmouawad
Date: Sat Jan 21 10:06:58 2017
New Revision: 1779716

URL: http://svn.apache.org/viewvc?rev=1779716&view=rev
Log:
Bug 60590 BackendListener : Add Influxdb BackendListenerClient implementation to JMeter.
Restore tag in annotations
Bugzilla Id: 60590

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java
Comment 4 Philippe Mouawad 2017-01-21 10:11:51 UTC
Created attachment 34655 [details]
Test plan using Mirror Server for people who want to test

You need to install last Influx DB and Grafana Server.
It's pretty straightforward
Comment 5 Philippe Mouawad 2017-01-25 17:03:20 UTC
Author: pmouawad
Date: Wed Jan 25 17:02:57 2017
New Revision: 1780241

URL: http://svn.apache.org/viewvc?rev=1780241&view=rev
Log:
Bug 60590 BackendListener : Add Influxdb BackendListenerClient implementation to JMeter.
Fix missing httpcore-nio in bundle
Bugzilla Id: 60590

Modified:
    jmeter/trunk/build.xml
Comment 6 Philippe Mouawad 2017-01-25 22:01:30 UTC
Author: pmouawad
Date: Wed Jan 25 22:01:03 2017
New Revision: 1780273

URL: http://svn.apache.org/viewvc?rev=1780273&view=rev
Log:
Bug 60590 BackendListener : Add Influxdb BackendListenerClient implementation to JMeter.
Fix corruption of ArrayList due to Multi-thread access
Fix timestamp which was computed too late
Bugzilla Id: 60590

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbBackendListenerClient.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/InfluxdbMetricsSender.java
Comment 7 Philippe Mouawad 2017-01-25 22:22:19 UTC
Author: pmouawad
Date: Wed Jan 25 22:17:00 2017
New Revision: 1780277

URL: http://svn.apache.org/viewvc?rev=1780277&view=rev
Log:
Bug 60590 BackendListener : Add Influxdb BackendListenerClient implementation to JMeter.
Avoid useless instanciation and set capacity
Bugzilla Id: 60590

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/backend/influxdb/HttpMetricsSender.java
Comment 8 The ASF infrastructure team 2022-09-24 20:38:07 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4227