Prometheus采集主机监控参考部署下载,图形生成
系统 | 安装 | Grafana | download |
Windows | 参考 | 图形生成参考 | win_exporter |
Linux | 参考 | node_exporter | |
Mysql | 参考 | Mysql_exporter | |
SQL Server | 参考 | SQL exporter | |
Redis | 参考 | Redis_exporter | |
cadvisor | 参考 | cadvisor | |
snmp_exporter | 参考 | 图形展示在测试中 | snmp_exporter |
download cadvisor
- cadvisor采集数据
- 端口 8082
- go版本不要太高(1.14+1.18以下)默认系统yum 安装的是1.16版本我的系统是Red Hat 8
cadvisor 一键docker监控安装脚本
vim /cadvisor.sh
#!/bin/sh
# -*- coding: utf-8 -*-
# Date: 2022/11/23
# CIASM CSDN
echo "Dependent installation"
sleep 2
yum install go gcc make -y
echo "download cadvisor"
sleep 2
wget -N -P /root/ https://github.com/google/cadvisor/archive/refs/tags/v0.46.0.tar.gz
echo "Compile and install & config"
sleep 2
tar xvf /root/v0.46.0.tar.gz -C /usr/local/
ln -s /usr/local/cadvisor-0.46.0 /usr/local/cadvisor
cd /usr/local/cadvisor/ && go env -w GOPROXY=https://goproxy.cn && go get -d github.com/google/cadvisor && make build
echo "cadvisor Start Service"
sleep 2
cat >>/usr/lib/systemd/system/cadvisor.service<<EOF
[Unit]
Description=cadvisor
Documentation=https://github.com/google/cadvisor/tree/master/docs
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/cadvisor/_output/cadvisor -port 8082
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
echo " cadvisor Example Set the automatic startup service"
sleep 2
systemctl daemon-reload && systemctl enable --now cadvisor
执行部署
sh /cadvisor.sh
页面访问
-
http://YOU_IP:8082