68.k8s告警规则101706.pdf

上传人:X** 文档编号:55885149 上传时间:2022-10-31 格式:PDF 页数:14 大小:684.18KB
返回 下载 相关 举报
68.k8s告警规则101706.pdf_第1页
第1页 / 共14页
68.k8s告警规则101706.pdf_第2页
第2页 / 共14页
点击查看更多>>
资源描述

《68.k8s告警规则101706.pdf》由会员分享,可在线阅读,更多相关《68.k8s告警规则101706.pdf(14页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、勿以恶小而为之,勿以善小而不为。刘备人人好公,则天下太平;人人营私,则天下大乱。刘鹗68.k8s告警规则apiVersion: role:alert-rules name:container-hpa namespace:kubesphere-monitoring-systemspec:groups:-name:容器伸缩 rules:-alert:Pod伸缩异常 expr:kube_hpa_status_conditioncondition=AbleToScale,status=false=1 for:1m labels:level:p1 resources:container annotati

2、ons:value:$value summary:Kubernetes 伸缩异常 description:Kubernetes【$labels.instance】伸缩异常重启,请检查 -alert:HPA收集数据异常 expr:kube_hpa_status_conditioncondition=ScalingActive,status=false=1 for:1m志不强者智不达,言不信者行不果。墨翟丹青不知老将至,贫贱于我如浮云。杜甫 labels:level:p1 resources:container annotations:value:$value summary:Kubernetes

3、 Pod HPA收集监控数据异常 description:Kubernetes Pod节点【$labels.instance】收集指标异常重启,请检查 -alert:HPA伸缩能 expr:kube_hpa_status_desired_replicas=kube_hpa_spec_max_replicas for:1m labels:level:p2 resources:container annotations:value:$value summary:Kubernetes Pod HPA扩容节点已经达到最 description:Kubernetes Pod节点【$labels.inst

4、ance】扩容节点已经达到最,请检查apiVersion: role:alert-rules name:container-resources namespace:kubesphere-monitoring-system忍一句,息一怒,饶一着,退一步。增广贤文宠辱不惊,看庭前花开花落;去留无意,望天上云卷云舒。洪应明spec:groups:-name:容器资源 rules:-alert:CPU使率 expr:sum(rate(container_cpu_usage_seconds_totalcontainer!=,container!=POD2m)by(pod,namespace,instan

5、ce,container)/(sum(container_spec_cpu_quotacontainer!=,container!=POD/100000)by(pod,namespace,instance,container)*100 60 for:1m labels:level:p4 resources:container annotations:value:$value summary:Kubernetes Pod CPU使率过 description:Kubernetes Pod节点【$labels.pod】CPU使率过,请检查 -alert:CPU使率 expr:sum(rate(co

6、ntainer_cpu_usage_seconds_totalcontainer!=,container!=POD2m)by(pod,namespace,instance,container)/(sum(container_spec_cpu_quotacontainer!=,container!=POD/100000)by(pod,namespace,instance,container)*100 70 for:1m labels:level:p3 resources:container annotations:value:$value summary:Kubernetes Pod CPU使率

7、过 description:Kubernetes Pod节点【$labels.pod】CPU使率过,请检查 -alert:CPU使率 expr:sum(rate(container_cpu_usage_seconds_totalcontainer!=,container!=POD2m)by(pod,namespace,instance,container)/(sum(container_spec_cpu_quotacontainer!=,container!=POD/100000)by(pod,namespace,instance,container)*100 80以铜为镜,可以正衣冠;以古为

8、镜,可以知兴替;以人为镜,可以明得失。旧唐书魏征列传人之为学,不日进则日退,独学无友,则孤陋而难成;久处一方,则习染而不自觉。顾炎武 for:1m labels:level:p2 resources:container annotations:value:$value summary:Kubernetes Pod CPU使率过 description:Kubernetes Pod节点【$labels.pod】CPU使率过,请检查 -alert:CPU使率 expr:sum(rate(container_cpu_usage_seconds_totalcontainer!=,container!=

9、POD2m)by(pod,namespace,instance,container)/(sum(container_spec_cpu_quotacontainer!=,container!=POD/100000)by(pod,namespace,instance,container)*100 90 for:1m labels:level:p1 resources:container annotations:value:$value summary:Kubernetes Pod CPU使率过 description:Kubernetes Pod节点【$labels.pod】CPU使率过,请检查

10、-alert:内存使率 expr:sum(container_memory_rsscontainer!=,container!=POD)by(pod,namespace,instance,container)/sum(container_spec_memory_limit_bytescontainer!=,container!=POD)by(pod,namespace,instance,container)*100 80 for:1m labels:level:p4 resources:container annotations:value:$value summary:Kubernetes

11、Pod 内存使率过丹青不知老将至,贫贱于我如浮云。杜甫吾日三省乎吾身。为人谋而不忠乎?与朋友交而不信乎?传不习乎?论语 description:Kubernetes Pod节点【$labels.pod】内存使率过,请检查 -alert:内存使率 expr:sum(container_memory_rsscontainer!=,container!=POD)by(pod,namespace,instance,container)/sum(container_spec_memory_limit_bytescontainer!=,container!=POD)by(pod,namespace,ins

12、tance,container)*100 85 for:1m labels:level:p3 resources:container annotations:value:$value summary:Kubernetes Pod 内存使率过 description:Kubernetes Pod节点【$labels.pod】内存使率过,请检查 -alert:内存使率 expr:sum(container_memory_rsscontainer!=,container!=POD)by(pod,namespace,instance,container)/sum(container_spec_memo

13、ry_limit_bytescontainer!=,container!=POD)by(pod,namespace,instance,container)*100 90 for:1m labels:level:p2 resources:container annotations:value:$value summary:Kubernetes Pod 内存使率过 description:Kubernetes Pod节点【$labels.pod】内存使率过,请检查 -alert:内存使率 expr:sum(container_memory_rsscontainer!=,container!=POD

14、)by(pod,namespace,instance,container)/sum(container_spec_memory_limit_bytescontainer!=,container!=POD)by(pod,namespace,instance,container)*100 95 for:1m labels:level:p1 resources:container谋事在人,成事在天!增广贤文忍一句,息一怒,饶一着,退一步。增广贤文 annotations:value:$value summary:Kubernetes Pod 内存使率过 description:Kubernetes

15、Pod节点【$labels.pod】内存使率过,请检查 -alert:磁盘I/O使 expr:sum(rate(container_fs_reads_bytes_total5m)by(pod,namespace,instance,container)10485760 for:1m labels:level:p4 resources:container annotations:value:$value summary:Kubernetes Pod 磁盘IO使过 description:Kubernetes Pod节点【$labels.pod】磁盘IO使率过,每秒达到10MB请检查 -alert:

16、磁盘I/O使 expr:sum(rate(container_fs_reads_bytes_total5m)by(pod,namespace,instance,container)20971520 for:1m labels:level:p3 resources:container annotations:value:$value summary:Kubernetes Pod 磁盘IO使过 description:Kubernetes Pod节点【$labels.pod】磁盘IO使率过,每秒达到20MB请检查 -alert:磁盘I/O使 expr:sum(rate(container_fs_r

17、eads_bytes_total5m)by(pod,namespace,instance,container)31457280 for:1m labels:level:p2良辰美景奈何天,便赏心乐事谁家院。则为你如花美眷,似水流年。汤显祖百川东到海,何时复西归?少壮不尽力,老大徒伤悲。汉乐府长歌行 resources:container annotations:value:$value summary:Kubernetes Pod 磁盘IO使过 description:Kubernetes Pod节点【$labels.pod】磁盘IO使率过,每秒达到30MB请检查 -alert:磁盘I/O使

18、expr:sum(rate(container_fs_reads_bytes_total5m)by(pod,namespace,instance,container)41943040 for:1m labels:level:p1 resources:container annotations:value:$value summary:Kubernetes Pod 磁盘IO使过 description:Kubernetes Pod节点【$labels.pod】磁盘IO使率过,每秒达到40MB请检查 -alert:络I/O使 expr:sum(rate(container_network_rece

19、ive_bytes_total5m)by(pod,namespace,instance,container)20971520 for:1m labels:level:p4 resources:container annotations:value:$value summary:Kubernetes Pod 络IO使过 description:Kubernetes Pod节点【$labels.pod】络IO使率过,每秒达到20MB请检查 -alert:络I/O使 expr:sum(rate(container_network_receive_bytes_total5m)by(pod,namesp

20、ace,instance,container)31457280 for:1m labels:我尽一杯,与君发三愿:一愿世清平,二愿身强健,三愿临老头,数与君相见。白居易百学须先立志。朱熹 level:p3 resources:container annotations:value:$value summary:Kubernetes Pod 络IO使过 description:Kubernetes Pod节点【$labels.pod】络IO使率过,每秒达到30MB请检查 -alert:络I/O使 expr:sum(rate(container_network_receive_bytes_tota

21、l5m)by(pod,namespace,instance,container)41943040 for:1m labels:level:p2 resources:container annotations:value:$value summary:Kubernetes Pod 络IO使过 description:Kubernetes Pod节点【$labels.pod】络IO使率过,每秒达到40MB请检查 -alert:络I/O使 expr:sum(rate(container_network_receive_bytes_total5m)by(pod,namespace,instance,c

22、ontainer)51943040 for:1m labels:level:p1 resources:container annotations:value:$value summary:Kubernetes Pod 络IO使过 description:Kubernetes Pod节点【$labels.pod】络IO使率过,每秒达到50MB请检查apiVersion: role:alert-rules name:kube-slos namespace:kubesphere-monitoring-systemspec:groups:-name:接错误率 rules:-alert:KubeAPI错

23、误预算 expr:sum(apiserver_request:burnrate3d)(1*0.01)and sum(apiserver_request:burnrate6h)(1*0.01)for:1h labels:level:p4 resources:container annotations:value:$value summary:Kubernetes API错误预算 description:Kubernetes API错误预算较多,请检查 -alert:KubeAPI错误预算 expr:sum(apiserver_request:burnrate1d)(3*0.01)and sum(

24、apiserver_request:burnrate2h)(3*0.01)for:1h labels:level:p3 resources:container谋事在人,成事在天!增广贤文穷则独善其身,达则兼善天下。孟子 annotations:value:$value summary:Kubernetes API错误预算 description:Kubernetes API错误预算较多,请检查 -alert:KubeAPI错误预算 expr:sum(apiserver_request:burnrate6h)(6*0.01)and sum(apiserver_request:burnrate30

25、m)(6*0.01)for:15m labels:level:p2 resources:container annotations:value:$value summary:Kubernetes API错误预算 description:Kubernetes API错误预算较多,请检查 -alert:KubeAPI错误预算 expr:sum(apiserver_request:burnrate1h)(14.4*0.01)and sum(apiserver_request:burnrate5m)(14.4*0.01)for:2m labels:level:p1 resources:containe

26、r annotations:value:$value summary:Kubernetes API错误预算 description:Kubernetes API错误预算较多,请检查 -alert:KubeStateMetricsList错误率 expr:(sum(rate(kube_state_metrics_list_totaljob=kube-state-metrics,result=error5m)/sum(rate(kube_state_metrics_list_totaljob=kube-state-metrics5m)0.01 for:2m labels:level:p1天行健,君

27、子以自强不息。地势坤,君子以厚德载物。易经大丈夫处世,不能立功建业,几与草木同腐乎?罗贯中 resources:container annotations:value:$value summary:Kubernetes kube-state-metrics List错误率 description:Kubernetes kube-state-metrics List错误率较,请检查 -alert:KubeStateMetricsWatch错误率 expr:(sum(rate(kube_state_metrics_watch_totaljob=kube-state-metrics,result=e

28、rror5m)/sum(rate(kube_state_metrics_watch_totaljob=kube-state-metrics5m)0.01 for:2m labels:level:p1 resources:container annotations:value:$value summary:Kubernetes kube-state-metrics Watch错误率 description:Kubernetes kube-state-metrics Watch错误率较,请检查apiVersion: role:alert-rules name:container-status na

29、mespace:kubesphere-monitoring-systemspec:古之立大事者,不惟有超世之才,亦必有坚忍不拔之志。苏轼非淡泊无以明志,非宁静无以致远。诸葛亮 groups:-name:容器状态 rules:-alert:Pod异常重启 expr:rate(kube_pod_container_status_restarts_totaljob=kube-state-metrics15m)*60*5 0 for:1m labels:level:p1 resources:container annotations:value:$value summary:Kubernetes Po

30、d 异常重启 description:Kubernetes Pod节点【$labels.pod】异常重启,请检查 -alert:Pod处于准备阶段 expr:sum by(pod,namespace,instance,container)(max by(pod,namespace,instance,container)(kube_pod_status_phasejob=kube-state-metrics,phase=Pending|Unknown)*on(pod,namespace,instance,container)group_left(owner_kind)max by(pod,nam

31、espace,instance,container,owner_kind)(kube_pod_ownerowner_kind!=Job)0 for:2m labels:level:p1 resources:container annotations:value:$value summary:Kubernetes Pod 处于Ready阶段 description:Kubernetes Pod节点【$labels.pod】启动异常,长时间处于Ready阶段,请检查 -alert:Pod处于等待状态 expr:sum by(namespace,pod,container,instance)(kub

32、e_pod_container_status_waiting_reasonjob=kube-state-metrics)0 for:2m labels:老当益壮,宁移白首之心;穷且益坚,不坠青云之志。唐王勃勿以恶小而为之,勿以善小而不为。刘备 level:p1 resources:container annotations:value:$value summary:Kubernetes Pod 处于waiting状态 description:Kubernetes Pod节点【$labels.pod】状态异常,长时间处于waiting状态,请检查 -alert:Deployment部署状态不匹配

33、 expr:kube_deployment_status_observed_generationjob=kube-state-metrics!=kube_deployment_metadata_generationjob=kube-state-metrics for:5m labels:level:p1 resources:container annotations:value:$value summary:Kubernetes Deployment部署失败 description:Kubernetes【$labels.namespace$labels.deployment】部署状态异常,这表

34、部署失败,但尚未回滚,请检查 -alert:Deployment副本数不匹配 expr:(kube_deployment_spec_replicasjob=kube-state-metrics!=kube_deployment_status_replicas_availablejob=kube-state-metrics)and(changes(kube_deployment_status_replicas_updatedjob=kube-state-metrics5m)=0)for:5m labels:level:p1 resources:container annotations:valu

35、e:$value summary:Kubernetes Deployment期望数量不匹配 description:Kubernetes【$labels.namespace$labels.deployment】与预期的副本数不匹配,请检查 -alert:Deployment Pod扩缩容常将有日思无日,莫待无时思有时。增广贤文丹青不知老将至,贫贱于我如浮云。杜甫 expr:changes(kube_deployment_status_replicas_available2m)0 for:1m labels:level:p1 resources:container annotations:val

36、ue:$value summary:Kubernetes Pod进了扩缩容 description:Kubernetes【$labels.namespace$labels.deployment】Pod进了扩缩容,请检查 -alert:Deployment Pod异常 expr:kube_deployment_status_replicas_unavailable 0 for:1m labels:level:p1 resources:container annotations:value:$value summary:Kubernetes Deployment 存在不可Pod description:Kubernetes【$labels.namespace$labels.deployment】存在不可Pod,请检查

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 研究报告 > 其他报告

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁