Giter Site home page Giter Site logo

grafana8_influxdb2's Introduction

Jmeter + Grafana + InfluxDB

使用Docker搭建环境

软件版本

Jmeter 5.4.1 Grafana 8.1.2 InfluxDB 2.0.3

软件启动

  1. 修改docker-compose.yml中 influxdb下的volumes本地映射
  2. 启动命令

docker-compose up -d

软件配置

初始化influxdb

  1. 访问http://localhost:8086
  2. 点击Get Started
  3. 配置username、password、organization、bucket等 image-20210901181838621
  4. 配置token 点击左侧菜单》Data》Tokens》Generate Token选择Read/Write Token 选择创建的bucket,点击Save

初始化grafana

  1. 访问http://localhost:3000 ,初始密码为admin/admin
  2. 配置datasource

2.1 点击左侧菜单》设置》Data Sources》Add DataSource》选择influxdb 进入设置页面

2.2 Query Language 选择 Flux

2.3 URL 填写 http://influxdb:8086

2.4 Organization 填写 创建的 organization

2.5 Token 填写 在influxdb中创建的token

2.6 Default Bucket 填写 创建的 bucket

2.7 点击Save&test

  1. 配置Dashbord 下载https://grafana.com/grafana/dashboards/13644 Json文件,这个只针对改进方式显示 点击左侧+按钮,选择Import导入Json,选择数据源点击Import

环境测试

Jmeter配置BackendListener

默认方式image-20210901184120601

  1. BackendListener中选择InfluxDBRawBackendListenerClient
  2. influxdbUrl 配置为 http://<你的IP>:8086/api/v2/write?org=<你的org>&bucket=<你的bucket>
  3. influxdbToken 配置为 创建的token
  4. measurement 配置为jmeter
  5. Jmeter中创建一个HTTP Request或Java Request都可以,设置无线循环,运行查看数据结果
  6. 直接在查看InfluxDb上的数据显示image-20210901185224809

改进方式:需要Java11

  1. 下载jmeter插件https://github.com/mderevyankoaqa/jmeter-influxdb2-listener-plugin/
  2. BackendListener中选择JMeterInfluxDBBackendListenerClient
  3. 填写相应配置即可
  4. 然后Jmeter中创建一个HTTP Request或Java Request都可以,设置无线循环,运行查看数据结果

grafana8_influxdb2's People

Contributors

hui1hui2hui3 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.