---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  annotations:
    include.release.openshift.io/ibm-cloud-managed: "true"
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
  creationTimestamp: "2025-10-27T11:18:36Z"
  generation: 1
  labels:
    role: alert-rules
  managedFields:
  - apiVersion: monitoring.coreos.com/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:include.release.openshift.io/ibm-cloud-managed: {}
          f:include.release.openshift.io/self-managed-high-availability: {}
          f:include.release.openshift.io/single-node-developer: {}
        f:labels:
          .: {}
          f:role: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"d36bdf59-d268-4238-afb0-5e0b21cca1a4"}: {}
      f:spec:
        .: {}
        f:groups:
          .: {}
          k:{"name":"openshift-dns.rules"}:
            .: {}
            f:name: {}
            f:rules: {}
    manager: cluster-version-operator
    operation: Update
    time: "2025-10-27T11:18:36Z"
  name: dns
  namespace: openshift-dns-operator
  ownerReferences:
  - apiVersion: config.openshift.io/v1
    controller: true
    kind: ClusterVersion
    name: version
    uid: d36bdf59-d268-4238-afb0-5e0b21cca1a4
  resourceVersion: "1732"
  uid: a8b78ff6-a5f8-488d-93c9-34b5aaef3686
spec:
  groups:
  - name: openshift-dns.rules
    rules:
    - alert: CoreDNSPanicking
      annotations:
        description: '{{ $value }} CoreDNS panics observed on {{ $labels.instance
          }}'
        summary: CoreDNS panic
      expr: increase(coredns_panics_total[10m]) > 0
      for: 5m
      labels:
        severity: warning
    - alert: CoreDNSHealthCheckSlow
      annotations:
        description: CoreDNS Health Checks are slowing down (instance {{ $labels.instance
          }})
        summary: CoreDNS health checks
      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:
        description: CoreDNS is returning SERVFAIL for {{ $value | humanizePercentage
          }} of requests.
        runbook_url: https://github.com/openshift/runbooks/blob/master/alerts/cluster-dns-operator/CoreDNSErrorsHigh.md
        summary: CoreDNS serverfail
      expr: |
        (sum by(namespace) (rate(coredns_dns_responses_total{rcode="SERVFAIL"}[5m]))
          /
        sum by(namespace) (rate(coredns_dns_responses_total[5m])))
        > 0.01
      for: 5m
      labels:
        severity: warning
