Created
January 26, 2022 16:56
-
-
Save benjvi/73b1556b4749be2a4e19fb83de890653 to your computer and use it in GitHub Desktop.
Sample Alert For Expiring Cert Manager Certificates
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
apiVersion: monitoring.coreos.com/v1 | |
kind: PrometheusRule | |
metadata: | |
name: ingress-certificate-expiry | |
namespace: monitoring | |
labels: | |
prometheus: k8s | |
role: alert-rules | |
spec: | |
groups: | |
- name: IngressCertificateExpiry | |
rules: | |
- alert: CertificateMissedExpectedRotation28Days | |
annotations: | |
message: Certificate for {{ $labels.instance }} will expire in less than 28 days, has not been rotated as expected. | |
expr: |- | |
(probe_ssl_earliest_cert_expiry - time()) < ( 86400 * 28 ) | |
for: 15m | |
labels: | |
severity: warning | |
- alert: CertificateMissedExpectedRotation24Hours | |
annotations: | |
message: Certificate for {{ $labels.instance }} will expire in less than 24 hours, has not been rotated as expected. | |
expr: |- | |
(probe_ssl_earliest_cert_expiry - time()) > ( 3600 * 24 ) | |
for: 15m | |
labels: | |
severity: critical |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment