Linux 版本:Centos 8.4
Telegraf 版本:1.20.4
Influxdb 版本:1.8.10
Chronograf 版本:1.9.1
Kapacitor 版本:1.6.2
InfluxData 监控体系分为四个组件:
- Telegraf:数据采集
- InfluxDB:时序数据库
- Chronograf:数据展示
- Kapacitor:监控报警
一. Telegraf 安装
1. 配置 yum 源
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
2. 使用 yum 安装
yum -y install telegraf
二. InfluxDB 安装
1. 使用 yum 安装
yum -y install influxdb
2. 启动 influxdb
systemctl start influxdb
3. 修改 telegraf 配置文件 /etc/telegraf/telegraf.conf
(添加 influxdb 连接,开启 net (网络) 数据采集)
[[outputs.influxdb]]
urls = ["http://127.0.0.1:8086"]
[[inputs.net]]
4. 启动 telegraf
systemctl start telegraf
三. 安装 Kapacitor
1. 使用 yum 安装
yum -y install kapacitor
2. 启动 kapacitor
systemctl start kapacitor
四. 安装 Chronograf
1. 使用 yum 安装
yum -y install chronograf
2. 启动 chronograf
systemctl start chronograf
3. 访问页面 http://ip:8888
4. 连接 influxdb
(默认 8086 端口)
5. 选择一个 Dashboard
(System 操作系统性能)
6. 连接 kapacitor
(默认 9092 端口)
7. 点击查看 System 视图