In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about the common expressions of prometheus. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.
1. Collect memory utilization
Total memory on the node_memory_MemTotal_bytes host
Free memory on the node_memory_MemFree_bytes host
Memory on the node_memory_Buffers_bytes buffer cache
Memory in the node_memory_Cached_bytes page cache
Calculate the percentage of memory used
(total memory-(free memory-buffer + cache)) / total memory * 100
Round ((node_memory_MemTotal_bytes- (node_memory_MemFree_bytes+node_memory_Buffers_bytes+node_memory_Cached_bytes)) / node_memory_MemTotal_bytes * 100)
2. Collect cpu
1. Collect cpu utilization: use the function of irate to calculate the instantaneous growth rate per second and instantaneous growth rate of the authentic time series of distance vectors.
Irate (node_cpu_seconds_total {instance= "$ip"} [5m])
2. Average utilization rate of avg
Avg (irate (node_cpu_seconds_total {job= "server", mode= "idle"} [5m])) * 100
3. Average percentage of usage
Avg (irate (node_cpu_seconds_total {job= "server", mode= "idle"} [5m])) * 100
3. Disk utilization
1. Percentage of disk utilization, idle
Free space / total space
Node_filesystem_files_free {mountpoint= "/", device= "/ dev/mapper/centos-root", job= "server"} / node_filesystem_size_bytes {mountpoint= "/", device= "/ dev/mapper/centos-root", job= "server"} * 100
2. Remaining disk utilization
Node_filesystem_files_free {mountpoint= "/", device= "/ dev/mapper/centos-root"} / node_filesystem_size_bytes {mountpoint= "/", device= "/ dev/mapper/centos-root"} * 100
4. Disk io
1. The growth rate of io in five minutes
Irate (node_disk_io_time_seconds_ Total [5m])
2. Average within five minutes
Avg (irate (node_disk_io_time_seconds_ Total [5m])) * 100
3. Percentage of disk io idle
Avg (irate (node_disk_io_time_seconds_ Total [5m])) * 100)
5. Network
1. The growth rate of the network card within five minutes
Node_network_receive_bytes_total {device=~ "ens160 | docker0"} [5m]
2. Average within five minutes
Round (irate (node_network_receive_bytes_total {device=~ "ens160 | docker0"} [5m]) / 1024)
The above is what the common prometheus expressions are like. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.