kubernetes部署kube-prometheus后grafana无数据显示(基于docker cri的K8S)

在Kubernetes1.27集群中,基于docker-cri部署kube-prometheus后,Grafana界面出现部分数据无法显示的问题。原因是Docker节点指标格式与containerd等其他运行时格式不同,导致文件系统指标缺失。解决方案是通过部署cAdvisor服务监控,创建并应用cAvisorServiceMonitor.yaml,然后通过NodePort访问,使Grafana恢复数据显示。
摘要由CSDN通过智能技术生成

一、背景说明

kubernetes1.27集群部署完之后,想要采用kube-prometheus对其进行监控。

1、基于containerd部署,部署完成后,grafana界面有数据展示

2、基于docker-cri部署,完成后grafana界面部分数据未显示

二、原因

参考官网描述信息

https://kubernetes.io/zh-cn/docs/tasks/administer-cluster/migrating-from-dockershim/check-if-dockershim-removal-affects-you/

  • Docker 节点上的指标格式为 k8s_<container-name>_<pod-name>_<namespace>_<pod-uid>_<restart-count>, 但其他运行时的格式不同。例如,在 containerd 节点上它是 <container-id>

  • 一些文件系统指标缺失,如下所示:

container_fs_inodes_free
container_fs_inodes_total
container_fs_io_current
container_fs_io_time_seconds_total
container_fs_io_time_weighted_seconds_total
container_fs_limit_bytes
container_fs_read_seconds_total
container_fs_reads_merged_total
container_fs_sector_reads_total
container_fs_sector_writes_total
container_fs_usage_bytes
container_fs_write_seconds_total
container_fs_wri
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

l3478127890

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值