node+Exporter

[TOC]

一 k8s安装

参考1-Kubernetes项目空间–6.2监控–6.2.1-prometheus-yaml手动部署1
https://www.wangairui.com/docs/k8s/k8s-1c35man7vkri5

二 客户端安装

1gitlab地址prometheus-expoeter

https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases

1.1下载地址

https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/7.6.2.0/prometheus-exporter-7.6.2.0.zip

2 github地址node_exporter

https://github.com/prometheus/node_exporter

下载最新版本

cd /opt
wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz
tar xf node_exporter-1.5.0.linux-amd64.tar.gz 
mv node_exporter-1.5.0.linux-amd64 node_exporter
cd node_exporter/

3 后台运行

./node_exporter &

开机启动

cat > /usr/lib/systemd/system/node_exporter.service << 'EOF'
[Service]
ExecStart=/data/node_exporter/node_exporter --web.listen-address=0.0.0.0:9101
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target

[Unit]
Description=node_exporter
After=network.target
EOF

systemctl daemon-reload
systemctl enable node_exporter.service
systemctl start node_exporter.service
systemctl status node_exporter.service

4 访问IP+9100端口/metrics


5 采集指标说明