categraf部分节点采集不到 container_memory_cache container_memory_rss指标

Viewed 45

k8s集群有30个节点,其中categraf 只能采集到五六个个节点(几个worker节点)的 container_memory_cache container_memory_rss数据,其他节点(大概有20多个)对应指标数据都为0。
且在采集不到的节点上,任何容器的对应这两个指标都为0。
而其他能采集到的节点的所有容器也都能显示这两个指标的数值。
尝试重启 所有不行的节点的categraf pod 后依然无效果。
具体查询效果如下:
下面两张图是无数据的效果:
image.png
image.png

下面是有数据的效果:
image.png
image.png

且个节点的 categraf无明显报错日志
image.png

1 Answers

后续观察发现categraf是由 获取container stats failed的问题的,但这该如何处理呢?
image.png

最终比对发现,是docker.sock 中获取不到对应的值。然后通过部署cadvisor作为代替解决的。