1、安装node_exporter
wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz
tar xvfz node_exporter-1.3.1.linux-amd64.tar.gz
mv node_exporter-1.3.1.linux-amd64 node-exporter
cd node-exporter
nohup ./node_exporter &
2、prometheus增加拉取地址
端口是9100,示例中的机器ip地址是192.168.8.28。
访问地址:http://192.168.8.28:9100/metrics,能看到已经有指标数据了。

vi prometheus.yml
- job_name: linux
metrics_path: '/metrics'
static_configs:
- targets: ['192.168.8.28:9100']
3、grafana配置展示的面板
https://grafana.com/dashboards/8919


网友评论