groups:
- name: Ceph存储
  rules:
  - alert: "Ceph存储健康状态异常"
    expr: ceph_health_status==2
    for: 2m
    labels:
      severity: critical
    annotations:
      summary: "Ceph存储健康状态异常"
      description: "Ceph存储状态为Error,请即刻处理"

  - alert: "OSD Down"
    expr: ceph_osd_up==0
    for: 2m
    labels:
      severity: critical
    annotations:
      summary: "OSD Down"
      description: "OSD {{ $labels.ceph_daemon }} Down!!!"

  - alert: "OSD平均延迟过高"
    expr: round(avg(ceph_osd_apply_latency_ms) by(job,instance), 0.01) > 100
    for: 2m
    labels:
      severity: critical
    annotations:
      summary: "OSD平均延迟过高"
      description: "OSD当前平均延迟为 {{ $value }} ms"

  - alert: "存储池容量不足"
    expr: (round(ceph_pool_bytes_used / (ceph_pool_bytes_used + ceph_pool_max_avail) * 100, 0.01)) *on (pool_id) group_left(name)(ceph_pool_metadata) > 90
    for: 2m
    labels:
      severity: critical
    annotations:
      summary: "存储池容量不足"
      description: "当前存储池 {{ $labels.name }} 已用 {{ $value }} %"

