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 Prometheus to monitor the indicators of Linux system

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

Share

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

This article mainly explains "how to use Prometheus to monitor various indicators of Linux system". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian slowly and deeply to study and learn "how to use Prometheus to monitor various indicators of Linux system" together!

First install a probe node explorer on your Linux system, download it at https://prometheus.io/docs/guides/node-exporter/

This probe periodically exposes linux hardware metrics and kernel parameters to the outside world via port 9100 and url metrics.

Start node explorer and show listening on port 9100:

Enter hostname:9100/metrics in your browser to access the parameters collected by node explorer:

Some examples:

CPU usage time in different operating modes: node_cpu_seconds_total

File system available bytes: node_filesystem_avail_bytes

Number of bytes received by NIC: node_network_receive_bytes_total

Prometheus is used below to collect and display data exposed through node explorer.

Define a job in the prometheus.yml file in the Prometheus installation directory, pointing to node explorer: running on Linux systems

Start Prometheus locally and open the following url:

http://localhost:9090/

Enter node_cpu_seconds_total{mode="system"} to query the time consumed by all CPUs working in system state on this server:

You can also specify a time window to query only CPU running data in the past 1 minute:

rate(node_cpu_seconds_total{mode="system"}[1m])

Thank you for reading, the above is "how to use Prometheus to monitor the indicators of Linux system" content, after the study of this article, I believe that everyone on how to use Prometheus to monitor the indicators of Linux system this problem has a deeper understanding, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

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