标签:single node 使用 export cpu mod ntp 共享 eth
type: Singlestat
Unit: perent(0-100)
(所有 cpu使用情况 - 5分钟内 cpu 空闲的平均值) / 所有 cpu使用情况
metrics:
(((count(count(node_cpu_seconds_total{instance=~\"$node:$port\",job=~\"$job\"}) by (cpu))) - avg(sum by (mode)(irate(node_cpu_seconds_total{mode=‘idle‘,instance=~\"$node:$port\",job=~\"$job\"}[5m])))) * 100) / count(count(node_cpu_seconds_total{instance=~\"$node:$port\",job=~\"$job\"}) by (cpu))
最大值: 100%
type: Singlestat
Unit: perent(0-100)
已使用的内存占比(包括Buffer缓存和Cached缓存)
metrics:
((node_memory_MemTotal_bytes{instance=~\"$node:$port\",job=~\"$job\"} - node_memory_MemFree_bytes{instance=~\"$node:$port\",job=~\"$job\"}) / (node_memory_MemTotal_bytes{instance=~\"$node:$port\",job=~\"$job\"} )) * 100
node_memory_MemFree_bytes 空闲内存
已使用的内存占比(不包括Buffer缓存和Cached缓存)
metrics:
100 - ((node_memory_MemAvailable_bytes{instance=~"$node:$port",job=~"$job"} * 100) / node_memory_MemTotal_bytes{instance=~"$node:$port",job=~"$job"})
MemAvailable: Free + Buffers + Cached - 不可回收的部分。不可回收部分包括:共享内存段,tmpfs,ramfs等
type: Singlestat
Unit: perent(0-100)
metrics:
((node_memory_SwapTotal_bytes{instance=~\"$node:$port\",job=~\"$job\"} - node_memory_SwapFree_bytes{instance=~\"$node:$port\",job=~\"$job\"}) / (node_memory_SwapTotal_bytes{instance=~\"$node:$port\",job=~\"$job\"} )) * 100
node_memory_SwapFree_bytes 交换分区的空闲大小
type: Singlestat
Unit: perent(0-100)
metrics:
100 - ((node_filesystem_avail_bytes{instance=~"$node:$port",job=~"$job",mountpoint="/",fstype!="rootfs"} * 100) / node_filesystem_size_bytes{instance=~"$node:$port",job=~"$job",mountpoint="/",fstype!="rootfs"})
node_filesystem_avail_bytes 文件系统可用空间
type: Singlestat
Unit: perent(0-100)
metrics:
avg(node_load1{instance=~"$node:$port",job=~"$job"}) / count(count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)) * 100
node_load1 : 系统一分钟内的负载
type: Singlestat
Unit: perent(0-100)
metrics:
avg(node_load5{instance=~"$node:$port",job=~"$job"}) / count(count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)) * 100
node_load5 : 指5分钟内cpu的负载
type: Singlestat
Unit: perent(0-100)
(所有 cpu使用情况 - 5分钟内 cpu 空闲的平均值) / 所有 cpu使用情况
metrics:
(((count(count(node_cpu_seconds_total{instance=~\"$node:$port\",job=~\"$job\"}) by (cpu))) - avg(sum by (mode)(irate(node_cpu_seconds_total{mode=‘idle‘,instance=~\"$node:$port\",job=~\"$job\"}[5m])))) * 100) / count(count(node_cpu_seconds_total{instance=~\"$node:$port\",job=~\"$job\"}) by (cpu))
最大值: 100%
type: Singlestat
Unit: perent(0-100)
已使用的内存占比(包括Buffer缓存和Cached缓存)
metrics:
((node_memory_MemTotal_bytes{instance=~\"$node:$port\",job=~\"$job\"} - node_memory_MemFree_bytes{instance=~\"$node:$port\",job=~\"$job\"}) / (node_memory_MemTotal_bytes{instance=~\"$node:$port\",job=~\"$job\"} )) * 100
node_memory_MemFree_bytes 空闲内存
已使用的内存占比(不包括Buffer缓存和Cached缓存)
metrics:
100 - ((node_memory_MemAvailable_bytes{instance=~"$node:$port",job=~"$job"} * 100) / node_memory_MemTotal_bytes{instance=~"$node:$port",job=~"$job"})
MemAvailable: Free + Buffers + Cached - 不可回收的部分。不可回收部分包括:共享内存段,tmpfs,ramfs等
type: Singlestat
Unit: perent(0-100)
metrics:
((node_memory_SwapTotal_bytes{instance=~\"$node:$port\",job=~\"$job\"} - node_memory_SwapFree_bytes{instance=~\"$node:$port\",job=~\"$job\"}) / (node_memory_SwapTotal_bytes{instance=~\"$node:$port\",job=~\"$job\"} )) * 100
node_memory_SwapFree_bytes 交换分区的空闲大小
type: Singlestat
Unit: perent(0-100)
metrics:
100 - ((node_filesystem_avail_bytes{instance=~"$node:$port",job=~"$job",mountpoint="/",fstype!="rootfs"} * 100) / node_filesystem_size_bytes{instance=~"$node:$port",job=~"$job",mountpoint="/",fstype!="rootfs"})
node_filesystem_avail_bytes 文件系统可用空间
type: Singlestat
Unit: perent(0-100)
metrics:
avg(node_load1{instance=~"$node:$port",job=~"$job"}) / count(count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)) * 100
node_load1 : 系统一分钟内的负载
type: Singlestat
Unit: perent(0-100)
metrics:
avg(node_load5{instance=~"$node:$port",job=~"$job"}) / count(count(node_cpu_seconds_total{instance=~"$node:$port",job=~"$job"}) by (cpu)) * 100
node_load5 : 指5分钟内cpu的负载
Prometheus Node_exporter 之 Basic CPU / Mem / Disk Gauge
标签:single node 使用 export cpu mod ntp 共享 eth
原文地址:https://www.cnblogs.com/qianyuliang/p/10479553.html