Reference link:
https://testerhome.com/topics/21113
Grafana
- Install using docker
# 创建 influx 与 grafana 共用的文件映射卷:容器的存放目录
docker volume create influx_grafana
# 拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/zhufc/influx_grafana:v6
# 运行容器
docker run -d -p 2003:2003 -p 8086:8086 -p 8085:8083 -p 3000:3000 registry.cn-hangzhou.aliyuncs.com/zhufc/influx_grafana:v6
- Start Grafana
# 进入容器
docker exec -it 容器id bash
# 启动
/etc/init.d/grafana-server start
# 重启
/etc/init.d/grafana-server restart
- Enter Grafana via ip:3000
Default account password:
admin
admin
InfluxDB
InfluxDB has been installed at the same time in the previous step, and the configuration file will be modified directly.
- Configuration file
# 进入配置文件
vim /etc/influxdb/influxdb.conf
Modify hostname
Open port
- Data transmission channel:
bind-address = ":8086"
- InfluxDB start port:
bind-address = ":8083"
bind-address = ":2003"
and InfluxDB associated port: 0616547919759c
Configuration database name (jmeter by default)
InfluxDB related commands
# 启动 InfluxDB 数据库
influxd
# 使用 Ctrl + q + p 将数据库置于后台运行
# 进入 InfluxDB 数据库
influx
# 添加用户名与密码
> CREATE USER root WITH PASSWORD '000000' WITH ALL PRIVILEGES
> SHOW USERS
user admin
root true
PS: If auth-enabled = true
is set, you must bring your username and password to enter the InfluxDB database
influx -username root -password 000000
JMeter listener
Add a listener to the thread group
In actual operation, you can add it to the top-level test plan for global monitoring
Configure the listener
Grafana page configuration
Configuration database
Configuration template
JMeter template:
https://grafana.com/grafana/dashboards/4026
Select the template configured in the container:
Run JMeter and observe Grafana data
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。