groups:
- name: o11y-agent-absent.rules
  rules:
  - alert: VMAgentJobMissing
    expr: absent(up{job=~".*(vmagent|metrics-agent).*"}) and max_over_time(up{job=~".*(vmagent|metrics-agent).*"}[2h]) > 0
    for: 5m
    labels:
      component: o11y
      oncall_team: o11y
      severity: major
      response_class: ticket
    annotations:
      description: "VMAgent metrics missing, it might be casued by error remote writing metrics to o11y. \n LABELS = {{ $labels }}"
      runbook_url: https://pingcap.feishu.cn/wiki/wikcnJ3TYvhozrRtWCMBh5z92Wd#doxcnyOO8q0ok8g24c3lEjgJZFh
