Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Monitoring host: node_exporter

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Monitoring host: node_exporter

In the architecture design of Prometheus, Prometheus Server does not directly serve to monitor specific goals, its main task is responsible for data collection, storage and external data query support. So in order to be able to monitor something, such as host CPU usage, we need to use Exporter. Prometheus periodically pulls monitoring sample data from the HTTP service address exposed by Exporter (usually / metrics).

As can be seen from the above description, Exporter can be a relatively open concept. It can be a program that runs independently of the monitoring target, or it can be built directly into the monitoring target. As long as you can provide Prometheus with monitoring sample data in a standard format.

Here in order to be able to collect the host operating indicators such as CPU, memory, disk and other information. We can use Node Exporter.

Node Exporter is also written in Golang, and there is no third-party dependency, just download, extract and run.

Run node exporter

Download the software package:

Mkdir-p / usr/local/prometheus/exporter/node cd / usr/local/prometheus/exporter/nodecurl-s-OL https://github.com/prometheus/node_exporter/releases/download/v0.18.0/node_exporter-$Version.linux-amd64.tar.gztar xf node_exporter-0.18.0.linux-amd64.tar.gzcp-a node_exporter-0.18.0.linux-amd64/node_exporter / usr/local/bin/cat > / usr/lib/systemd/system/ Node-exporter.service 85 for: 1m labels: level: disaster annotations: summary: "instance {{$labels.instance}} memory utilization is too high" description: "{{$labels.instance}} memory utilization greater than 85% (current value: {{$value})"-alert: hostLoad expr: sum (node_load15) > = sum (count (node_cpu_seconds_total {mode='system'})) By (cpu) and node_load1 > node_load5 and node_load5 > node_load15 for: 1m labels: level: disaster annotations: summary: "instance {{$labels.instance}} 15 minutes overload" description: "{{$labels.instance}} 15 minutes load is greater than its cpu cores (current value: {{$value}})"-alert: hostUp expr: up {job= "node"} = = 0 for: 1m labels: level: disaster annotations: summary: "instance {{$labels.instance}} unreachable" description: "{{$labels.instance}} instance unreachable Please solve it as soon as possible. "

Reference documentation:

Https://github.com/prometheus/node_exporterhttps://yunlzheng.gitbook.io/prometheus-book/parti-prometheus-ji-chu/quickstart/prometheus-quick-start/use-node-exporterhttps://grafana.com/grafana/dashboards/8919

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report