-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Certificate Expiring Critical + Warning-updated
- Loading branch information
1 parent
2d8544c
commit 4d4bad8
Showing
4 changed files
with
44 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
resources/prometheus/unit_tests/RHACSFleetschardCertificateExpiring.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
rule_files: | ||
- /tmp/prometheus-rules-test.yaml | ||
|
||
evaluation_interval: 1m | ||
|
||
tests: | ||
- interval: 1d | ||
input_series: | ||
- series: acs_fleetshard_certificate_expiration_timestamp{namespace="rhacs", secret="secret", data_key="key"} | ||
values: "604800+15x0" # equals to 7 days | ||
|
||
alert_rule_test: | ||
- eval_time: 0 | ||
alertname: RHACSFleetshardCertificateExpiringCritical | ||
exp_alerts: [ ] | ||
- eval_time: 3d | ||
alertname: RHACSFleetshardCertificateExpiringSoon | ||
exp_alerts: | ||
- exp_labels: | ||
alertname: RHACSFleetshardCertificateExpiringSoon | ||
namespace: rhacs | ||
secret: secret | ||
data_key: key | ||
severity: warning | ||
exp_annotations: | ||
summary: "Certificate Expiring soon in namespace `rhacs` for secret 'secret'." | ||
description: "Certificate `key` in namespace `rhacs` is expiring in less than 7 days." | ||
- eval_time: 6d | ||
alertname: RHACSFleetshardCertificateExpiringCritical | ||
exp_alerts: | ||
- exp_labels: | ||
alertname: RHACSFleetshardCertificateExpiringCritical | ||
namespace: rhacs | ||
secret: secret | ||
data_key: key | ||
severity: critical | ||
exp_annotations: | ||
summary: "Certificate Expiring very soon in namespace `rhacs` for secret 'secret'." | ||
description: "Certificate `key` in namespace `rhacs` is expiring in less than a day." | ||
- eval_time: 10d | ||
alertname: RHACSFleetshardCertificateExpiringSoon | ||
exp_alerts: [ ] |
28 changes: 0 additions & 28 deletions
28
resources/prometheus/unit_tests/RHACSFleetschardCertificateExpiringCritical.yaml
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
resources/prometheus/unit_tests/RHACSFleetschardCertificateExpiringSoon.yaml
This file was deleted.
Oops, something went wrong.