apiVersion: operator.victoriametrics.com/v1beta1
kind: VMRule
metadata:
  name: alerts-node
  namespace: cozy-monitoring
spec:
  groups:
  - name: kubernetes.dns
    rules:
    - alert: KubernetesDnsTargetDown
      expr: absent(up{job="kube-dns"} == 1)
      for: 5m
      labels:
        severity_level: "5"
        tier: cluster
      annotations:
        plk_protocol_version: "1"
        plk_markup_format: "markdown"
        description: |-
          Prometheus is unable to collect metrics from kube-dns. Thus its status is unknown.
  
          To debug the problem, use the following commands:
          1. `kubectl -n kube-system describe deployment -l k8s-app=kube-dns`
          2. `kubectl -n kube-system describe pod -l k8s-app=kube-dns`
        summary: Kube-dns or CoreDNS are not under monitoring.
