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

How to use node_exporter

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article is about how to use node_exporter. The editor thought it was very practical, so I shared it with you to learn. The following information is about node_exporter.

Run node exporter

Download the software package:

1. Download and install node_export

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/

two。 Register for system services

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: "the instance {{$labels.instance}} 15 minutes is overloaded" 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 the "install and configure alermanager" as soon as possible

1. Download and install alertmanager

Wget https://github.com/prometheus/alertmanager/releases/download/v0.21.0/alertmanager-0.21.0.linux-amd64.tar.gztar-xf alertmanager-0.21.0.linux-amd64.tar.gz mv alertmanager-0.21.0.linux-amd64 / usr/local/alertmanager

two。 Register for system services

Cat > / usr/lib/systemd/system/alertmanager.service

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