https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin

Support my Ukrainian Family ️

Like what you see?

Description

The goal of the project is to make a quite similar online dashboard in the same way as JMeter generates. Supported the latest InfluxDB v2.0 and created appropriate dashboard ("Flux" language has been used to create the queries - now there are a lot fo capacities to build amazing charts, tables with a lot of math function). So that it would be possible to build the monitor hardware solution on the latest InfluxDB v2.0 and telegraf (agent to send the hardware metrics to InfluxDB) as well.

The plugin sends metrics to InfluxDB and provides the possibility to visualize the charts in Grafana, have the Aggregate report as JMeter creates. Added the possibly to save the following extra fields in the database:

  • Response code;
  • Error message;
  • Response body of the failed requests (can be configured);
  • Connect time;
  • Latency;
  • The response time (uses from the SampleResult.class, needs to make aggregate report).

Notes: if you need to save the errors you got wile the test to csv like file and then share to the dev team you can use the jmeter-csv-listener-plugin. This plugin can be used while the functional testing and load tests as well.

Important notes

The plugin allows 5 errors happened one by one, then plugin will stop importing the results after that! See details in the logs. Counter will be refreshed at least you have 4 fails. This is protection to avoid OOM error. The option can be configured in the settings (the key name is influxDBThresholdError see the Plugin configuration for the details). You need to be careful with that option and know the hardware resources to store data in the memory.

Pleas monitor the elapsed time of the data importing (see logs) to avoid issues with requests sending from JMeter. Pay attention on "Sending metrics performance tuning" chapter, see below.

Compatibility

The supported versions:

Maven Support

Please see the latest release here https://search.maven.org/artifact/io.github.mderevyankoaqa/jmeter-plugins-influxdb2-listener.

CI/CD Support

The CI/CD can be done using jmeter-maven-plugin The example of the adding plugin to the project with the jmeter-maven:

      <configuration>
<jmeterExtensions>
<artifact>io.github.mderevyankoaqa:jmeter-plugins-influxdb2-listener:2.1</artifact>
</jmeterExtensions>
</configuration>

Some notes cab be found in the article Adding jar's to the /lib/ext directory.

Development and branching strategy

Hello all contributors! Welcome to the project, I'm happy to see you here. Just to avoid the mess and have a nice history, let's keep the simple rules:

  1. Code should pass standard static code analysis in IntelliJ IDEA.
  2. Comments should be for the new code to have clear java docs.
  3. All new development lets - in the "development" branch. So the steps: a. make a branch for the feature you want to develop from "development" (source branch -> "main"). There will be a mirror of the latest release + can be a merge of the new features. b. all pull requests from your feature branch -> "development" branch only. c. once we decide to make the new release after testing, we will merge "development" -> "main" with push to maven central.

While the first pull request please add your self to the build.gradle the section 'developers'

developers {
developer {
id = 'your github if'
name = 'your name'
email = 'email'
}

Deployment

  • Put 'jmeter-plugin-influxdb2-listener-<version>.jar' file from Releases to ~<JmeterPath<\lib\ext;

Note: "fatJar" gradle task should be used to create the package for the JMeter.

  • Run JMeter and select the test plan, Add-> Listener -> Backend Listener.

  • Go to Backend Listener

  • Select from the dropdown item with the name 'io.github.mderevyankoaqa.influxdb2.visualizer.JMeterInfluxDBBackendListenerClient'.

Upgrade

  • Close JMeter if its started.

  • Remove old jar.

  • Put 'jmeter-plugin-influxdb2-listener-<version>.jar' file from Releases to ~<JmeterPath<\lib\ext;

  • Run JMeter again and got Listener.

  • Select from the dropdown item with the name 'io.github.mderevyankoaqa.influxdb2.visualizer.JMeterInfluxDBBackendListenerClient'.

  • Click 'Clear all' button

  • Set right settings (update all properties).

InfluxDB configuration

  • Create Bucket to store the further testing results.

  • Create the token with read and write rights. 

Plugin configuration

Let’s explain the plugin fields:

  • testName - the name of the test.

  • nodeName - the name of the server.

  • runId - the identification number of hte test run, can be dynamic.

  • influxDBURL - InfluxDB server URL [protocol://][host][:port], protocol (can be http or https) and the default port is 8086.

  • influxDBToken - the influxdb bucket token, the default value should be updated, copy it from InfluxDB site.

  • influxDBOrganization - the influxdb bucket organization, the default value should be updated, copy it from InfluxDB site.

  • influxDBFlushInterval - its interval to send data to InfluxDB, the default value is 4000 (4 seconds).

  • influxDBMaxBatchSize - the max size of the batch with metrics, the default 2000 (2000 items of JMeter results).

  • influxDBThresholdError - the error threshold before stopping the import, the default value is 5. (see Important notes for more detail.)

  • influxDBBucket - the InfluxDB bucket name to store the test results.

  • samplersList - the regex value to sort out the JMeter samplers results; the default is .*. For example if you have the pattern of JMeter test plan development like this - create the 'Transaction controller', add inside of the 'Transaction controller' the Sampler with request, and the name pattern 'GET->Something', like on the see screen below. The regex ^(Home Page|Login|Search)(-success|-failure)?$ can be used to save only samplers names. The regex can be generated from JMeter menu.

You can modify the generated string in terms of your purposes.

  • useRegexForSamplerList - allows to use the regexps if set to 'true'.
  • recordSubSamples - allows to save the JMeter sub samples if set to 'true'.
  • saveResponseBodyOfFailures - allows to save the response body of the failures.
  • responseBodyLength - allows saving the response body, not more than the set specified length.

Sending metrics performance tuning

The plugin imports batch with JMeter results each 4 seconds (by default settings). In the logs you will see records like this: INFO o.m.j.i.v.InfluxDatabaseBackendListenerClient: Data has been imported successfully, batch size --> 68, elapsed time is --> 14 ms (the elapsed time is the response time of the batch importing.) So you can control the flush interval depends on the load you have and adjust influxDBFlushInterval setting. Is not recommended having less 1 second.
Max batch protection -> send data when batch max size is occurred. For example, when batch size is 2000 items (it's the default setting of influxDBMaxBatchSize) plugin imports that batch, even when flush interval was not occurred. Using both options you can tune data importing and have optimal performance.

Make sure you have enough ram to aggregate huge batch and optimal flush period.

Notes: when test has been interrupted from UI; the processes may not be finished properly, restart JMeter.

Grafana dashboard capabilities

See deployment instructions here https://grafana.com/grafana/dashboards/13644

Dashboard helps:

  • Filter the results by Run Id or Type (can be requests or transactions).


  • Monitor throughput with active users. 

  • Overview and analise the response time, distribution as well. Added the filters to see requests with status "pass", "fail".  

  • See aggregate report. The table rendering may take an extra time. The table has hardware resources consuming queries from Influxdb side. If you have low hardware on the Influxdb server - recommended make the clone of the original dashboard and remove aggregate report. So the idea - it's to have one 'fast' dashboard for the online monitoring (has no aggregate report) to see the results while the test, the second (original with aggregate report) to see the final results. 

    Now added the possibility to see the aggregate report for requests with status "pass" only. 

  • Investigate errors. The table is interactive, it's possible to filter data in the columns and see details for the specific error. Added the paging. 

  • See network statistics, latency, processing time.   

  • Check individual request details. 

[转帖]JMeter InfluxDB v2.0 listener plugin的更多相关文章

  1. SteamVR Unity Plugin - v2.0.1中的InteractionSystem

    最近写VR项目的时候用到了SteamVR Unity Plugin - v2.0.1插件,感觉比之前用到的SteamVR plugin for Unity - v1.2.2版本改进了很多,就算不用VR ...

  2. JMeter Nmon Tool V2.0 插件

    很早之前宝路已将nmon监控功能集成到了JMeter中,自己在使用旧版本时,也有诸多不满意的地方.趁着五一假期(基本都是晚上,白天要陪孩子),对插件底层代码进行了重构,自己还要反复测试调整,最晚的一次 ...

  3. jmeter+influxdb+granfana+collectd监控cpu+mem+TPS

    1.安装grafana #####gafana过期安装包安装报错 Error unpacking rpm package grafana-5.1.4-1.x86_64error: unpacking ...

  4. Jmeter+ InfluxDB+Grafana安装配置

    前置条件: 系统:windows jmeter:5.1 InfluxDB安装 下载InfluxDB-v1.7.9和Chronograf-v1.7.14(InfluxDB的可视化web端). 下载完成之 ...

  5. 性能测试监控:Jmeter +InfluxDB +collectd +Grafana

    虚拟机ip 192.168.180.128 Influxdb Influxdb是一个开源的分布式时序.时间和指标数据库,使用go语言编写,无需外部依赖. 它有三大特性: 时序性(Time Series ...

  6. jmeter+influxdb+grafana性能测试监控

    背景: 话说Jmeter原生的监控确实太丑了,听大佬们在讨论Jmeter+InfluxDb+Grafana的监控,于是,为了有一个漂亮的测试报告,就手动开始进行部署. 安装步骤: 1.influxdb ...

  7. Jmeter +InfluxDB +collectd +Grafana16

    Jmeter +InfluxDB +collectd +Grafana(十六) 虚拟机ip 192.168.180.128 Influxdb Influxdb是一个开源的分布式时序.时间和指标数据库, ...

  8. 搭建jmeter+influxdb+grafana压测实时监控平台(超详细,小白适用)

    1.前言 在使用jmeter做性能测试的时候,监控系统性能的时候,无论是使用插件还是报告生成,都没法实现实时监控.使用JMeter+Influxdb+Grafana可以实现实时监控. 本次环境搭建各软 ...

  9. 【JS】heatmap.js v1.0 到 v2.0,详细总结一下:)

    前段时间,项目要开发热力图插件,研究了heatmap.js,打算好好总结一下. 本文主要有以下几部分内容: 部分源码理解 如何迁移到v2.0 v2.0官方文档译文 关于heatmap.js介绍,请看这 ...

  10. ArcGIS Runtime for Android开发教程V2.0(2)开发环境配置

    原文地址: ArcGIS Runtime for Android开发教程V2.0(2)开发环境配置 - ArcGIS_Mobile的专栏 - 博客频道 - CSDN.NET http://blog.c ...

随机推荐

  1. django 定时任务 apscheduler 踩坑

    本想每天定点的去查询一些数据然后用钉钉机器人发出来,前两三天还好好的,后面就执行 ERROR了 看了下错误问题,就跟连不上数据库一样,参考别人的解决方法 scheduler.add_job(every ...

  2. table中td超出内容隐藏,鼠标悬停全部显示(完整版,含js代码)

    一.CSS语法: text-overflow:clip | ellipsis 默认值:clip 适用于:所有元素 clip: 当对象内文本溢出时不显示省略标记(...),而是将溢出的部分裁切掉. el ...

  3. Python 潮流周刊第 35 期(摘要)

    本周刊由 Python猫 出品,精心筛选国内外的 250+ 信息源,为你挑选最值得分享的文章.教程.开源项目.软件工具.播客和视频.热门话题等内容.愿景:帮助所有读者精进 Python 技术,并增长职 ...

  4. 详解ZooKeeper在微服务注册中心的应用

    本文分享自华为云社区<SpringCloud ZooKeeper 详解,以及与Go.Rust等非Java服务的集成>,作者: 张俭. ZooKeeper,是一个开源的分布式协调服务,不仅支 ...

  5. 训练千亿参数模型的法宝,昇腾CANN异构计算架构来了~

    摘要:盘古的训练以「昇腾AI处理器」为基座,同时借助了「CANN 异构计算架构」,让硬件算力得以充分释放,大大缩短了训练时间! 2021年4月,"华为云盘古大模型"一炮走红AI人工 ...

  6. 详解4种微服务框架接入Istio方案

    摘要:使用k8s和lstio网格进行开发,将服务发现.服务治理留给基础设施,可以将开发人员从复杂的服务中解脱出来,专注于业务开发,是当前来说比较好的解决方案. 本文分享自华为云社区<传统微服务框 ...

  7. 再获信通院权威认证,优等生华为云GaussDB数据库凭什么?

    摘要:在八大项测试中,华为云 GaussDB的两款数据库都以优异的成绩通过.那么这两款数据库究竟是凭借什么获此殊荣呢? 近期,中国信通院公布了第十三批数据库产品基础能力.性能和稳定性评审结果.在本次评 ...

  8. [BitSail] Connector开发详解系列三:SourceReader

    更多技术交流.求职机会,欢迎关注字节跳动数据平台微信公众号,回复[1]进入官方交流群 Source Connector 本文将主要介绍负责数据读取的组件SourceReader: SourceRead ...

  9. Python 合并多张图片至一张图片

    PDF 有多页,一次性转成JPG 图片,JAVA 报内存溢出, 现改为,每一页存成一张图片,然后再将多张图片合成一张图片. 安装库 pip3 install Image -i https://pypi ...

  10. PPT 提升素材搜索能力

    https://cn.bing.com/images 高清透明 https://unsplash.com/ 更新快 https://pixabay.com/zh/ 免费高清图片 https://www ...