groups: - name: certificates interval: 1d rules: - alert: cert-manager/certificate-expiring-soon expr: (certmanager_certificate_expiration_timestamp_seconds - time()) / 60 / 60 / 24 < 7 for: 0m labels: # This isn't critical, but if we have reached this point, renewal probably needs manual intervention. severity: page annotations: summary: "Certificate is expiring in < 7 days" description: "The certificate named {{ $labels.name }} is due for expiry in {{ $value | humanize }} days."