本文介绍了如何在稳定/普罗米修斯图表values.yaml中设置普罗米修斯规则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 使用官方普罗米修斯图表稳定/普罗米修斯。自定义其 values.yaml 文件以设置 alertmanager.yml 文件和 serverFiles 区域。Customized its values.yaml file to set alertmanager.yml file and serverFiles area.在规则下:{} : https://github.com。 com / kubernetes / charts / blob / master / stable / prometheus / values.yaml#L598它是 {} 。例如,我尝试过: serverFiles: alerts: {} rules: # Alert for any instance that is unreachable for >5 minutes. - alert: InstanceDown expr: up == 0 for: 5m labels: severity: page annotations: summary: "Instance {{ $labels.instance }} down" description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes."然后运行 $ helm install my_prometheus 。然后pod出现了此错误:And ran $ helm install my_prometheus. Then pod got this error:PersistentVolumeClaim is not bound: "sweet-terrier-prometheus-server"Back-off restarting failed containerError syncing pod推荐答案serverFiles: alerts: groups: - name: NodeAlerts rules: - alert: NodeCPUUsage expr: (100 - (avg(irate(node_cpu{mode="idle"}[5m])) BY (instance) * 100)) > 75 for: 2m labels: severity: alert annotations: description: '{{$labels.instance}}: CPU usage is above 75% (current value is: {{ $value }})' summary: '{{$labels.instance}}: High CPU usage detect规则用于记录规则,警报用于警报规则。rules are for record rules, alert is for alert rules. 这篇关于如何在稳定/普罗米修斯图表values.yaml中设置普罗米修斯规则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-05 22:06