Get the App
SLTechnology News&Howtos  ›  Servers  › 

(2) node_exporter deployment to monitor container hosts

Shulou Source: shulou.com Published: 2022-06-02 21:01:58 10月04日 Update

To monitor CPU, memory, disk, I/O and other information of Kubernetes Engine, first install node_exporter. node_exporter is used for machine system data collection.

(1) Download node_exporter

https://prometheus.io/download/

shell> cd /Download/

shell> wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz

(2) Decompress installation

shell> tar -xvf node_exporter-0.18.1.linux-amd64.tar.gz

shell>cd node_exporter-0.18.1.linux-amd64

shell> mv node_exporter-0.18.1.linux-amd64 node_exporter

shell> chown -R prometheus.prometheus node_exporter

shell> systemctl restart node_exporter

shell>systemctl status node_exporter

shell>netstat -tunlp | grep node_exporter

(3) Create systemd service

shell>cat > /etc/systemd/system/node_exporter.service systemctl daemon-reload

shell> systemctl start node_exporter #Start node_exporter service

shell> systemctl status node_exporter

Add job to prometheus_server

shell> vim /Download/prometheus/prometheus.yml

job_name: 'docker39'

scrape_interval: 5s

static_configs:targets: ['10.10.204.39:9100']

labels:

shell>systemctl restart prometheus #Restart prometheus service

(5) Check whether the prometheus console gets the data

Browser->x. x.x:9090 ->status->targets You can see the monitored nodes

Tags: Services monitoring data containers functions information memory console server machine browser disk system control browsing host Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Linux Huawei vpn Shulou Information