Files
docker/docker-compose/prometheus/promtheus/config/rules/mem.yaml

14 lines
536 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
groups:
- name: memory
interval: 15s
rules:
- alert: HighMemoryUsage
expr: 1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) > 0.8
for: 2m
labels:
severity: warning
alert_type: memory
annotations:
summary: "主机 {{ $labels.hostname }} 内存使用率过高"
# 修正:移除不支持的函数,只保留百分比显示
description: "当前内存使用率: {{ $value | humanizePercentage }}阈值80%"