InfluxDB:http://docs.influxdata.com/influxdb/v1.7/introduction/installation
一、安装:InfluxDB
新建InfluxDB下载源
cat << EOF | tee /etc/yum.repos.d/influxdb.repo
[influxdb]
name = InfluxDB Repository - RHEL \$releasever
baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key
EOF
使用yum下载InfluxDB
yum install -y influxdb
没云得用apt-get安装
apt-get install -y influxdb
启动InfluxDB
[root@localhost ~]#sudo service influxdb start
#重启:/bin/systemctl restart influxdb.service
进入InfluxDB
[root@localhost ~]#influx
查看数据库
[root@localhost ~]#show databases;
创建库
[root@localhost ~]#create database“JMeter”;
进入库
[root@localhost ~]#use JMeter;
创建用户名&密码
[root@localhost ~]#create user “JMeter”with password‘123456’with all privileges;
修改InfluxDB的配置,主要配置jmeter存储的数据库与端口号
[root@localhost ~]# vi /etc/influxdb/influxdb.conf
# 找到graphite并且修改它的库与端口
[[graphite]]
enabled = true
database = "JMeter" JMeter代表的是库名,后续采集到的数据存放库
retention-policy = ""
bind-address = ":2003"
protocol = "tcp"
consistency-level = "one"
batch-size = 5000
batch-pending = 10
batch-timeout = "1s"
udp-read-buffer = 0
separator = "."
# 找到http并且修改它的库与端口
[[http]]
enabled=true
bind-adress=”:8086”
auth-enabled=true
使用以下-config选项将进程指向正确的配置文件
[root@localhost ~]# influxd -config /etc/influxdb/influxdb.conf
下载连接工具
https://blog.csdn.net/x541211190/article/details/83152068
二、安装Telegraf,监控cpu、内存、磁盘
安装
yum -y install telegraf
进入cd /etc/telegraf 配置 只收集cpu, 内存和硬盘的数据
telegraf -sample-config -input-filter cpu:mem:disk -output-filter influxdb > telegraf.conf
编辑vi telegraf.conf 设置将数据传递写入influxdb服务器
[[outputs.influxdb]]
urls = ["http://127.0.0.1:8086"]
database = "telegraf"
启动服务
service telegraf start
原文:https://www.jianshu.com/p/dfd329d30891
三、安装:Graphite
官网地址:https://grafana.com/grafana/download
下载安装
wget https://dl.grafana.com/oss/release/grafana-5.4.2-1.x86_64.rpm
sudo yum grafana-5.4.2-1.x86_64.rpm
启动Grafana
[root@localhost ~]# /etc/init.d/grafana-server restart
打开浏览器,访问虚拟机IP“http://IP:3000”
输入用户名,密码登录系统。用户名与密码都是"admin"
添加InfluxDB数据库配置。输入帐号密码“admin / admin”,点击Test & Save 提示“Success”说明成功了
导入模板
https://grafana.com/dashboards/4026
https://grafana.com/dashboards/3351
四、jmeter得配置,配置完成后正常使用即可
配置“Backend Listener”,主要配置Host,如下图