天天看點

性能監控---Grafana+InfluxDB+jmeter(windows版)平台搭建

監控平台搭建流程:

1.InfluxDB搭建(資料庫)

2.jmeter設定(生成資料)

3.Grafana操作(資料展示)

具體操作:

1.InfluxDB搭建(influxdb-1.4.2_windows_amd64)

工具連結:https://pan.baidu.com/s/1w6DV3f5hj0iuJw40IQvETQ 提取碼: es7q

關聯jmeter:influxdb.conf

 [[graphite]]

  # Determines whether the graphite endpoint is enabled.

  enabled = true

  database = "jmeter"(資料庫名稱,自定義)

  retention-policy = ""

  bind-address = ":2003"

  protocol = "tcp"

  consistency-level = "one"

啟動資料庫服務:influxd.exe

cd D:\personal\tools\Jmeter-tools\influxdb-1.4.2-1

influxd -config influxdb.conf

可以寫成一個批處理檔案,容易操作

性能監控---Grafana+InfluxDB+jmeter(windows版)平台搭建

啟動資料庫用戶端:influx.exe

建立jmeter資料庫

create database jmeter

use jmeter

show measurements

2.jmeter設定

添加後端監聽器

性能監控---Grafana+InfluxDB+jmeter(windows版)平台搭建

3.Grafana操作(6.4.4-Windows-64)

工具連結:https://pan.baidu.com/s/1H2UwfJks-wF4UI8WQjeMJQ 提取碼: k4h9

啟動grafana服務:

性能監控---Grafana+InfluxDB+jmeter(windows版)平台搭建

預設使用端口:3000

進入http://localhost:3000,登入預設使用者名和密碼都是admin

性能監控---Grafana+InfluxDB+jmeter(windows版)平台搭建

添加資料庫

性能監控---Grafana+InfluxDB+jmeter(windows版)平台搭建

檢視圖表

性能監控---Grafana+InfluxDB+jmeter(windows版)平台搭建

常見監控名額:

jmeter.all.h.count    所有請求的TPS

jmeter.<請求名稱>.h.count    對應<請求名稱>的TPS

jmeter.all.ok.pct99    99%的請求響應時間

jmeter.<請求名稱>.ok.pct99    對應<請求名稱>99%的請求響應時間

jmeter.all.test.startedT    線程數

繼續閱讀