Prometheus client端
安裝node-exporter (Linux)
wget https://github.com/prometheus/node_exporter/releases/download/v1.5.0/node_exporter-1.5.0.linux-amd64.tar.gz #node_exporter套件
tar zxvf node_exporter-1.5.0.linux-amd64.tar.gz #解壓
mv node_exporter-1.5.0.linux-amd64 /usr/local/node_exporter #放到常用路徑
cd /usr/local/node_exporter/
./node_exporter #執行,下面會有加入systemctl文件
http://192.168.253.130:9100/
tar zxvf node_exporter-1.5.0.linux-amd64.tar.gz #解壓
mv node_exporter-1.5.0.linux-amd64 /usr/local/node_exporter #放到常用路徑
cd /usr/local/node_exporter/
./node_exporter #執行,下面會有加入systemctl文件
http://192.168.253.130:9100/
加入systemd服務
vi /usr/lib/systemd/system/node_exporter.service
[Unit]
Description=node_exporter
[Service]
ExecStart=/usr/local/node_exporter/node_exporter
ExecReload=/bin/kill -HUP #MAINPID
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target
systemctl daemon-reload #重載systemd設定
systemctl start node_exporter
systemctl enable node_exporter
沒有留言:
張貼留言