Skip to content

Commit

Permalink
feat(cert-manager-monitoring): introduce critical severity for CertMa…
Browse files Browse the repository at this point in the history
…nagerCertExpirySoon alert (#1361)
  • Loading branch information
tongpu authored Jan 15, 2025
1 parent 00d97e0 commit 40d4609
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
6 changes: 5 additions & 1 deletion charts/cert-manager-monitoring/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cert-manager-monitoring
description: Monitor cert-manager with cert-manager-mixin.
type: application
version: 0.1.2
version: 0.2.0
keywords:
- cert-manager
- tls
Expand All @@ -16,3 +16,7 @@ maintainers:
- name: adfinis
email: [email protected]
url: https://adfinis.com
annotations:
artifacthub.io/changes: |
- kind: changed
description: "introduce critical severity for CertManagerCertExpirySoon alert"
2 changes: 1 addition & 1 deletion charts/cert-manager-monitoring/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@ spec:
for: 1h
labels:
severity: warning
- alert: CertManagerCertExpirySoon
annotations:
dashboard_url: https://grafana.example.com/d/TvuRo2iMk/cert-manager
description: {{`The domain that this cert covers will be unavailable after {{ $value
| humanizeDuration }}. Clients using endpoints that this cert protects will start
to fail in {{ $value | humanizeDuration }}.`}}
runbook_url: https://gitlab.com/uneeq-oss/cert-manager-mixin/-/blob/master/RUNBOOK.md#certmanagercertexpirysoon
summary: {{`The cert '{{ $labels.name }}' is {{ $value | humanizeDuration }} from expiry,
it should have renewed over a week ago.`}}
expr: |
avg by (exported_namespace, namespace, name) (
certmanager_certificate_expiration_timestamp_seconds - time()
) < (10 * 24 * 3600) # 10 days in seconds
for: 1h
labels:
severity: critical
{{- end }}
{{- if .Values.prometheus.rule.alerts.certnotready }}
- alert: CertManagerCertNotReady
Expand Down

0 comments on commit 40d4609

Please sign in to comment.