一. InfluxDB配置

  • 安装目录下找到influxdb.conf 文件进行修改如下:

jmeter+influxdb+grafana监控jmeter实时结果1

jmeter+influxdb+grafana监控jmeter实时结果1
# 找到graphite并且修改它的库与端口
[[graphite]] # Determines whether the graphite endpoint
is enabled. enabled = true database = "jmeter" retention-policy = "" bind-address = ":2003" protocol = "tcp" consistency-level = "one"

# 找到admin,将前面的#号去掉,开放它的UI端口(修改配置文件后,若http://localhost:8083/无法打开,则influxd -config influxdb.conf 方式打开后端程序)

[admin]
# Determines whether the admin service is enabled.
enabled = true


# The default bind address used by the admin service.
bind-address = ":8083"

#找到http,将前面的#号去掉,开放它的UI端口,开放后台端口

[http]  # Determines whether HTTP endpoint is enabled.  enabled = true  # The bind address used by the HTTP service.  bind-address = ":8086"

 
  • 启动influxdb:安装目录下的influxd.exe 文件
  • influx.exe可打开客户端, 创建数据库  create database  jmeter  ,show databases, use jmeter ,show measureaments 

二. Grafana配置

  • 下载并安装grafana
  • 启动grafana服务:D:\grafana-4.5.2\bin 目录下的grafana-server.exe 程序
  • 打开网址:http://192.168.8.197:3000,
  • 配置数据源:

jmeter+influxdb+grafana监控jmeter实时结果1

【注意】- 8083端口是InfluxDB的UI界面展示的端口,- 8086端口是Grafana用来从数据库取数据的端口

三. jmeter 配置

  • 增加监听器-Backend Listener,实现方式选择influxdb方式,如下图配置(influxdbur配置成:  http://192.168.8.197:8086/write?db=jmeter)
  • 可以添加单个请求的结果树查看配置后是否运行正常

 

jmeter+influxdb+grafana监控jmeter实时结果1

 

四. 配置Grafana面板

  • 添加统计面板:Dashboards--+New :(图1)
  • 鼠标移动到面板窗口左侧显示:(图2)
  • 编辑统计内容,鼠标移动到panel标题处,点击edit:(图3)
  • 在metric中设置数据源和统计维度:数据源选择jmeter
  • jmeter+influxdb+grafana监控jmeter实时结果1

     

  jmeter+influxdb+grafana监控jmeter实时结果1图1             jmeter+influxdb+grafana监控jmeter实时结果1图2

 

 

 

jmeter+influxdb+grafana监控jmeter实时结果1 图

参考URL

http://blog.csdn.net/RickyOne_RR/article/details/50637839 
https://www.cnblogs.com/liugh/p/6683488.html  
http://www.cnblogs.com/nzyjlr/p/7754381.html

相关文章: