监控告警策略配置node 节点相关告警策略(如配置node memory 大于%85 报警策略 ,如何在prometheus-k8s-rulefiles-0 中生效)

添加配置如下

- alert: HighMemoryNode
expr: ‘node:node_memory_utilisation:’ > 0.85
for: 5m
labels:
severity: critical
annotations:
summary: “High memory usage detected on instance {{ $labels.instance }}”
description: “Memory usage is {{ $value }}, which is above the threshold of 80% for 5 minutes.”

在crd 的prometheusrules 中prometheus-k8s-rules 这个文件写法有点费劲,这个如何搞?

  • liwm 回复了此帖
    5 天 后

    wade
    可以新增一个自定义的告警规则
    kubectl -n kubesphere-monitoring-system get prometheusrules