Node_exporter 是可以在 * Nix 和 Linux 系统上运行的计算机度量标准的导出器.
Node_exporter 主要用于暴露 metrics 给 Prometheus, 其中 metrics 包括: CPU 的负载, 内存的使用情况, 网络等.
官方下载地址:
1, 安装 Node_exporter
解压缩 node_exporter 并将目录重命名为 "node_exporter" 放到 / usr/local / 下.
- tar -xf node_exporter-0.17.0.Linux-amd64.tar.gz
- mv node_exporter-0.17.0.Linux-amd64 /usr/local/node_exporter
放在后台启动即可:
nohup ./node_exporter &
2, 修改 Prometheus 的配置文件 prometheus.YAML 的 scrape_configs 下添加 node_exporter, 后重启 Prometheus.
- scrape_configs:
- # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- - job_name: 'prometheus'
- # metrics_path defaults to '/metrics'
- # scheme defaults to 'http'.
- static_configs:
- - targets: ['localhost:9090']
- - job_name: 'node_exporter'
- static_configs:
- - targets:
- - '172.31.182.140:9100'
- - '172.31.182.141:9100'
- - '172.31.182.142:9100'
- - '172.31.182.143:9100'
- - '172.31.182.144:9100'
- - '172.31.182.145:9100'
- - '172.31.182.146:9100'
- - '172.31.182.147:9100'
3, 添加 granfana
模板下载地址:
导入后的效果:
来源: https://www.cnblogs.com/Dev0ps/p/10668116.html