上传文件至「docker-compose/prometheus/promtheus/config/rules」
This commit is contained in:
12
docker-compose/prometheus/promtheus/config/rules/cpu.yaml
Normal file
12
docker-compose/prometheus/promtheus/config/rules/cpu.yaml
Normal 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 }}"
|
||||
Reference in New Issue
Block a user