PVE安装Node-exporter监控Prometheus
一、安装
- 创建用户
groupadd --system prometheus |
安装Node - exporter
apt install python python-pip
pip install prometheus-pve-exporter创建配置文件
vi /etc/prometheus/pve.yml |
- 编写用户配置:nodeExporter依赖PVE权限验证,查看自己默认User配置为
default: |
- 设置一下权限
chown -R prometheus:prometheus /etc/prometheus/ |
创建systemed
tee /etc/systemd/system/prometheus-pve-exporter.service<<EOF
[Unit]
Description=Prometheus exporter for Proxmox VE
Documentation=https://github.com/znerol/prometheus-pve-exporter
[Service]
Restart=always
User=prometheus
ExecStart=/usr/local/bin/pve_exporter /etc/prometheus/pve.yml
[Install]
WantedBy=multi-user.target
EOF设置开机启动
systemctl daemon-reload |
二、验证
三、配置Prometheus配置文件
进入自己的Prometheus主机:vim /opt/sofeware/prometheus/prometheus.yml
添加:
scrape_configs: |
重启Prometheus:systemctl restart prometheus.service
四、配置Grafana
导入模板:10347 -> Proxmox via Prometheus | Grafana Labs
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Bai's Blog!