1,prometheus告警语法,设置的的是大于8000,持续时间5min中告警
告警语法:
- alert: HostContextSwitching
expr: (rate(node_context_switches_total[5m])) / (count without(cpu, mode) (node_cpu_seconds_total{mode="idle"})) > 8000
for: 5m
labels:
severity: warning
annotations:
summary: Host context switching (instance {{ $labels.instance }})
description: "上下文切换次数 (> 8000 / s)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
2,正常告警出来,如图
但是恢复提示的值竟然还是大于8000