下载安装
tar -zxf node_exporter-1.8.2.linux-amd64.tar.gz -C /opt mv /opt/node_exporter-1.8.2.linux-amd64/ /opt/node_exporter ln -s /opt/node_exporter/node_exporter /usr/local/bin/node_exporter
cat > /usr/lib/systemd/system/node_exporter.service <<EOF [Unit] Description=mysql_exporter After=network.target
[Service] Type=simple User=root ExecStart=/usr/local/bin/node_exporter --web.listen-address=":9100" Restart=on-failure
[Install] WantedBy=multi-user.target EOF
systemctl daemon-reload systemctl start node_exporter systemctl enable node_exporter systemctl status node_exporter
|
配置Prometheus
修改对应IP/opt/prometheus/prometheus.yml- job_name: "LinuxNode:IP" static_configs: - targets: ["IP:9100"]
|
systemctl restart prometheus systemctl status prometheus
|
配置Grafana
- 新增Dashboard
- 填写
https://grafana.com/grafana/dashboards/11074
- 选择Prometheus
- 导入