# 下载
wget https://github.com/prometheus/node_exporter/releases/download/v1.6.1/node_exporter-1.6.1.linux-amd64.tar.gz
# 解压
tar -xzf node_exporter-1.6.1.linux-amd64.tar.gz
# 运行
cd node_exporter-1.6.1.linux-amd64
node_exporter
ts=2023-09-29T06:37:29.158Z caller=tls_config.go:274 level=info msg="Listening on" address=[::]:9100
ts=2023-09-29T06:37:29.158Z caller=tls_config.go:277 level=info msg="TLS is disabled." http2=false address=[::]:9100
然后去prometheus那边配置监控任务
编辑prometheus.yml并在scrape_configs节点下添加以下内容:
scrape_configs:
# 采集node exporter监控数据 job_name 可以按照你的需要修改
- job_name: 'node'
static_configs:
- targets: ['192.168.85.140:9100']
并使配置生效
然后再访问 Prometheus Server 地址,可以查询到 所监控 的 node 内容
作者:admin 创建时间:2023-09-29 14:21
最后编辑:admin 更新时间:2023-09-29 14:51
最后编辑:admin 更新时间:2023-09-29 14:51