cd /usr/local/node_exporter-0.17.0.linux-amd64
nohup ./node_exporter
3.设置prometheus
进入/usr/local/prometheus-2.17.1.linux-amd64/prometheus.yml,添加prometheus.yml 红框部分。
- job_name: ‘linux’
static_configs:
- targets: [‘localhost:9100’]
labels:
instance: linux
4.配置grafana
输入grafana可视化页面地址:ip:3000。
1.配置数据源 (prometheus地址:ip:9090)
上图填写你prometheus地址,端口切记填写9090,点击save后,如果失败会有提示 。