该仓库基于kube-prometheus-stack helm chart 生成各个监控组件的yaml文件。由于kube-prometheus-stack是一组打包监控工具,在真实场景中并不一定需要安装全部组件,因此本文旨在提供一种灵活的监控组件安装方案,用户可以根据需求安装所需组件。
kube-prometheus-stack的部署文档可以参考:kube-prometheus-stack的使用
包含的组件有:
- grafana
- kube-state-metrics
- prometheus
- prometheus-node-exporter
- prometheus-operator
- alertmanager
建议安装的组件:
- kube-state-metrics
- prometheus
- grafana
- 部署kube-state-metrics
- 部署prometheus
- 部署grafana
筛选标签:namespace/deployment/pod/container
- CPU(使用量,limit,request值)
- 内存指标(使用量,limit,request值)
- 网络发送速率、接收速率
- 入流量
- 出流量
- Url延迟
-
CPU(使用量,limit,request值)
-
内存(使用量,limit,request值)
-
磁盘
-
网络入流量,出流量
- 集群维度(集群CPU,内存总量、limit,request值)
- 节点维度(总量,ready, notready)
- pod维度(总量,running, crash,pending)
- deployment维度
- Etcd(核心)
- Apiserver(核心)
- Controller-manager
- Scheduler
- Kubelet
- Kube-Proxy
Pod级别
- Pod 状态告警(crash,pending)
- Pod 资源告警(CPU、内存超过limit 80%阈值)
管理员视角包含用户视角的告警。
- Node状态(NotReady,宕机)
- Node 资源值(CPU、内存、根分区磁盘 80%阈值)
- Node其他告警
- k8s 组件状态告警
参考: