---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  creationTimestamp: "2022-03-08T10:14:06Z"
  generation: 1
  labels:
    role: alert-rules
  managedFields:
  - apiVersion: monitoring.coreos.com/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:labels:
          .: {}
          f:role: {}
      f:spec:
        .: {}
        f:groups: {}
    manager: cluster-version-operator
    operation: Update
    time: "2022-03-08T10:14:06Z"
  name: dns
  namespace: openshift-dns-operator
  resourceVersion: "1433"
  selfLink: /apis/monitoring.coreos.com/v1/namespaces/openshift-dns-operator/prometheusrules/dns
  uid: 9ac1040c-7ae8-4d0e-9a09-014c9404957c
spec:
  groups:
  - name: openshift-dns.rules
    rules:
    - alert: CoreDNSPanicking
      annotations:
        message: '{{ $value }} CoreDNS panics observed on {{ $labels.instance }}'
      expr: increase(coredns_panic_count_total[10m]) > 0
      for: 5m
      labels:
        severity: warning
    - alert: CoreDNSHealthCheckSlow
      annotations:
        message: CoreDNS Health Checks are slowing down (instance {{ $labels.instance }})
      expr: histogram_quantile(.95, sum(rate(coredns_health_request_duration_seconds_bucket[5m])) by (instance, le)) > 10
      for: 5m
      labels:
        severity: warning
    - alert: CoreDNSErrorsHigh
      annotations:
        message: CoreDNS is returning SERVFAIL for {{ $value | humanizePercentage }} of requests.
      expr: |
        (sum(rate(coredns_dns_response_rcode_count_total{rcode="SERVFAIL"}[5m]))
          /
        sum(rate(coredns_dns_response_rcode_count_total[5m])))
        > 0.01
      for: 5m
      labels:
        severity: warning
