groups:
  - name: momo_pro_alerts
    rules:
      - alert: ContainerDown
        expr: up == 0
        for: 1m
        labels:
          severity: critical
        annotations:
          summary: "容器 {{ $labels.instance }} 已停止回應"

      - alert: HighMemoryUsage
        expr: (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) < 0.1
        for: 2m
        labels:
          severity: warning
        annotations:
          summary: "記憶體使用率超過 90%"

      - alert: SchedulerTaskFailed
        expr: increase(scheduler_task_failures_total[5m]) > 0
        for: 0m
        labels:
          severity: warning
        annotations:
          summary: "排程任務失敗：{{ $labels.task_name }}"
