Skip to content

Commit

Permalink
add dns record missing alert
Browse files Browse the repository at this point in the history
Signed-off-by: craig <[email protected]>

rh-pre-commit.version: 2.2.0
rh-pre-commit.check-secrets: ENABLED
  • Loading branch information
maleck13 committed Sep 19, 2024
1 parent 2cd87da commit 4b98c06
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/alerts/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ resources:
- prometheusrules_policies_missing.yaml
- slo-availability.yaml
- slo-latency.yaml
- orphan_records.yaml
18 changes: 18 additions & 0 deletions examples/alerts/orphan_records.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: dns-records-rules
namespace: monitoring
spec:
groups:
- name: dns_records
rules:
- alert: PossibleOrphanedDNSRecords
expr: |
sum(count by(rootDomain) (kuadrant_dnsrecord_status_root_domain_owners) / count by(rootDomain) (kuadrant_dnsrecord_status) - count by(rootDomain) (kuadrant_dnsrecord_status) ) > 0
for: 5m
labels:
severity: warning
annotations:
summary: "The number of DNS Owners is greater than the number of records for root domain '{{ $labels.rootDomain }}'"
description: "This alert fires if the number of owners (controller collaborating on a record set) is greater than the number of records. This may mean a record has been left behind in the provider due to a failed delete"

0 comments on commit 4b98c06

Please sign in to comment.