3

K8S关于pod资源监控

 2 years ago
source link: https://blog.51cto.com/liqingbiao/5260008
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

K8S关于pod资源监控

原创

清风明月li 2022-04-28 21:04:42 博主文章分类:监控系统 ©著作权

文章标签 sed 用户态 运行时间 文章分类 Linux 系统/运维 阅读数392

POD监控类型

container_cpu_usage_seconds_total

CPU使用率(CPU消费累计时间)

sum(rate(container_cpu_usage_seconds_total{image!="",container!="POD",container!=""}[1m])) by (pod,namespace) / (sum(container_spec_cpu_quota{image!="",container!="POD",container!=""}/100000) by (pod,namespace)) * 100

container_cpu_system_seconds_total

系统的态使用率

系统CPU消费的累计时间

sum(rate(container_cpu_system_seconds_total{image!="",container!="POD",container!=""}[1m])) by (pod,namespace) / (sum(container_spec_cpu_quota{image!="",container!="POD",container!=""}/100000) by (pod,namespace)) * 100

container_cpu_user_seconds_total

用户态使用率

用户CPU消费的累计时间

sum(rate(container_cpu_user_seconds_total{image!="",container!="POD",container!=""}[1m])) by (pod,namespace) / (sum(container_spec_cpu_quota{image!="",container!="POD",container!=""}/100000) by (pod,namespace)) * 100

container_cpu_cfs_throttled_seconds_total

limit

CPU限制的运行时间

sum(rate(container_cpu_cfs_throttled_seconds_total[5m])) by (container_name,pod,namespace)

container_memory_rss

常驻内存的百分比

sum(container_memory_rss{container!="POD",container!="alermanager",image!="",pod!=""})by(pod) / sum(container_spec_memory_limit_bytes{container!="",container!="POD"})by(pod) * 100 != +inf

container_memory_working_set_bytes

当前使用内存的百分比

sum(container_memory_working_set_bytes{container!="POD",container!="alermanager",image!="",pod!=""})by(pod) / sum(container_spec_memory_limit_bytes{container!="",container!="POD"})by(pod) * 100 != +inf

container_memory_usage_bytes

当前内存使用,包括所有缓存

sum(container_memory_usage_bytes{container!="POD",container!="alermanager",image!="",pod!=""})by (pod)

container_network_receive_bytes_total

in(receive)

流量进来的

sum(irate(container_network_receive_bytes_total{}[1m])) by (pod,namespace)

container_network_transmit_bytes_total

out(transmit)

流量出去的

sum(irate(container_network_transmit_bytes_total{ namespace=~".+"}[1m])) by (pod,namespace)

container_fs_io_current

io-iops

当前正在进行的I/O数

sum(container_fs_io_current{}) by (namespace,pod_name)

container_fs_reads_bytes_total

io-read

sum(rate(container_fs_reads_bytes_total{}[5m])) by (container_name,pod,namespace)

container_fs_writes_bytes_total

io-write

write

sum(rate(container_fs_writes_bytes_total{}[5m])) by (container_name,pod,namespace)

container_fs_usage_byte

used%

磁盘使用率

sum(container_fs_usage_bytes{image!="",container!="POD",container!=""}) by(pod, namespace) / 1024 / 1024 / 1024


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK