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 <cbrookes@redhat.com>
  • Loading branch information
maleck13 committed Sep 17, 2024
1 parent 2cd87da commit c2cf07f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
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"

Check failure on line 18 in examples/alerts/orphan_records.yaml

View workflow job for this annotation

GitHub Actions / EOF Newline

[EOF Newline] examples/alerts/orphan_records.yaml#L18

Missing newline
Raw output
examples/alerts/orphan_records.yaml:18: Missing newline
2 changes: 1 addition & 1 deletion examples/alerts/prometheusrules_policies_missing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ spec:
severity: warning
annotations:
summary: "No RateLimitPolicy targeting HTTPRoute '{{ $labels.httproute_name }}'"
description: "This alert fires if a HTTPRoute does not have an associated RateLimitPolicy."
description: "This alert fires if a HTTPRoute does not have an associated RateLimitPolicy."

Check failure on line 57 in examples/alerts/prometheusrules_policies_missing.yaml

View workflow job for this annotation

GitHub Actions / EOF Newline

[EOF Newline] examples/alerts/prometheusrules_policies_missing.yaml#L57

Missing newline
Raw output
examples/alerts/prometheusrules_policies_missing.yaml:57: Missing newline

0 comments on commit c2cf07f

Please sign in to comment.