node_exporter:用于监控Linux系统的指标采集器。
常用指标:
•CPU
•内存
•硬盘
•网络流量
•文件描述符
•系统负载
•系统服务数据接口:http://IP:9100
使用文档:
https://prometheus.io/docs/guides/node-exporter/
GitHub:
https://github.com/prometheus/node_exporter
在Prometheus配置文件添加被监控端:
scrape_configs:
-job_name: 'Linux Server'
basic_auth:
username: prometheus
password: 123456
static_configs:
-targets: ['192.168.121.132:9100']
自启动:
[root@k8s-2 node_exporter]# vi /usr/lib/systemd/system/node_exporter.service
[Unit]
Description=node_exporter
[Service]
ExecStart=/opt/monitor/node_exporter/node_exporter --web.config=/opt/monitor/node_exporter/config.yml
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target