groups:
- name: vCloud
  rules:
  - alert: "超融合NTP时间未同步"
    expr: node_timex_sync_status{job=~".*Vcloud.*"}==0
    for: 10m
    labels:
      severity: warning
    annotations:
      summary: "超融合NTP时间未同步"
      description: "机器时间最近未同步,检查NTP是否正常配置"

  - alert: "超融合集群时间不同步"
    expr: round(max(abs(timestamp(node_time_seconds{job=~".*Vcloud.*"}) - node_time_seconds)) by(job) - min(abs(timestamp(node_time_seconds{job=~".*Vcloud.*"}) - node_time_seconds)) by(job), 0.01) > 30
    for: 0m
    labels:
      severity: critical
    annotations:
      summary: "超融合集群时间不同步"
      description: "时间不同步,当前超融合集群节点间最大时间差为 {{ $value }}"

  - alert: "超融合节点异常"
    expr: pve_node_info==0
    for: 0m
    labels:
      severity: critical
    annotations:
      summary: "超融合节点异常"
      description: "超融合节点 {{ $labels.name }} 异常"

  - alert: "超融合集群异常"
    expr: pve_cluster_info==0 or pve_cluster_info{quorate="0"}==1
    for: 0m
    labels:
      severity: critical
    annotations:
      summary: "超融合集群异常"
      description: "超融合集群异常"

