上传文件至「docker-compose/prometheus/promtheus/config/rules」

This commit is contained in:
2026-03-23 10:02:45 +08:00
parent 3f631e045d
commit df54273131
4 changed files with 196 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
groups:
- name: cpu
interval: 15s
rules:
- alert: HighCpuUsage
expr: 1 - avg(irate(node_cpu_seconds_total{mode="idle"}[1m])) by (hostname) > 0.8
for: 30s
labels:
severity: warning
annotations:
summary: "主机 {{ $labels.hostname }} CPU 使用率过高"
description: "CPU 使用率: {{ $value | humanizePercentage }}"