Skip to content

Commit

Permalink
Certificate Expiring Critical + Warning-updated
Browse files Browse the repository at this point in the history
  • Loading branch information
aaa5kameric committed Aug 9, 2024
1 parent c8e0a9d commit dd9679d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions resources/prometheus/prometheus-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ spec:
labels:
severity: critical
annotations:
summary: "Certificate Expiring very soon in namespace `{{ $labels.namespace }}` for secret '{{ $labels.secret}}'."
description: "Certificate '{{ $labels.data_key }}` in namespace `{{ $labels.namespace }}` expires in '{{ $value | time.Unix | time.Since | humanizeDuration }}'."
summary: "Certificate expiring very soon: '{{ $labels.namespace }}/{{ $labels.secret }}/{{ $labels.data_key }}`."
description: "Certificate '{{ $labels.namespace }}/{{ $labels.secret }}/{{ $labels.data_key }}` expires on '{{ ($value | toTime).UTC().Format \"2006-02-01\" }}'."
- alert: RHACSFleetshardCertificateExpiringSoon
expr: |
((acs_fleetshard_certificate_expiration_timestamp-time())/60/60/24)<7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ tests:
data_key: key
severity: critical
exp_annotations:
summary: "Certificate Expiring very soon in namespace `rhacs` for secret 'secret'."
description: "Certificate 'key` in namespace `rhacs` expires in '{{ $value | time.Unix | time.Since | humanizeDuration }}'."
summary: "Certificate expiring very soon: 'rhacs/secret/key`."
description: "Certificate 'rhacs/secret/key` expires on '1970-01-07'."
- eval_time: 10d
alertname: RHACSFleetshardCertificateExpiringCritical
exp_alerts:
Expand All @@ -47,6 +47,6 @@ tests:
data_key: key
severity: critical
exp_annotations:
summary: "Certificate Expiring very soon in namespace `rhacs` for secret 'secret'."
description: "Certificate 'key` in namespace `rhacs` expires in '{{ $value | time.Unix | time.Since | humanizeDuration }}'."
summary: "Certificate expiring very soon: 'rhacs/secret/key`."
description: "Certificate 'rhacs/secret/key` expires on '1970-01-11'."

0 comments on commit dd9679d

Please sign in to comment.