11apiVersion : v1
22data :
3+ contactpoints.yaml : |
4+ apiVersion: 1
5+ contactPoints:
6+ - name: cluster-alerts-email
7+ orgId: 1
8+ receivers:
9+ - settings:
10+ addresses: ${ALERT_EMAIL_TO}
11+ singleEmail: false
12+ type: email
13+ uid: cluster-alerts-email
314 dashboardproviders.yaml : |
415 apiVersion: 1
516 providers:
@@ -17,10 +28,12 @@ data:
1728 - isDefault: true
1829 name: Prometheus
1930 type: prometheus
31+ uid: prometheus
2032 url: http://prometheus-server.prometheus.svc.cluster.local
2133 - access: proxy
2234 name: Loki
2335 type: loki
36+ uid: loki
2437 url: http://loki.loki.svc.cluster.local:3100
2538 version: 1
2639 download_dashboards.sh : |
@@ -86,6 +99,201 @@ data:
8699 provisioning = /etc/grafana/provisioning
87100 [server]
88101 domain = metrics.sandbox.k8s.phl.io
102+ [smtp]
103+ enabled = true
104+ from_name = Cluster Monitoring
105+ host = smtp.postmarkapp.com:587
106+ policies.yaml : |
107+ apiVersion: 1
108+ policies:
109+ - group_by:
110+ - alertname
111+ - namespace
112+ - name
113+ group_interval: 5m
114+ group_wait: 30s
115+ orgId: 1
116+ receiver: cluster-alerts-email
117+ repeat_interval: 12h
118+ rules.yaml : |
119+ apiVersion: 1
120+ groups:
121+ - folder: Certificates
122+ interval: 5m
123+ name: cert-manager
124+ orgId: 1
125+ rules:
126+ - annotations:
127+ description: renewalTime is over a day in the past and renewal hasn't happened.
128+ The cert is probably still valid, so nothing looks broken yet — which is exactly
129+ how this failure mode hides. Check `kubectl get challenges -A` for a stuck
130+ challenge.
131+ summary: 'Certificate {{ $labels.namespace }}/{{ $labels.name }} is overdue
132+ for renewal'
133+ condition: C
134+ data:
135+ - datasourceUid: prometheus
136+ model:
137+ expr: time() - certmanager_certificate_renewal_timestamp_seconds
138+ instant: true
139+ refId: A
140+ refId: A
141+ relativeTimeRange:
142+ from: 600
143+ to: 0
144+ - datasourceUid: __expr__
145+ model:
146+ conditions:
147+ - evaluator:
148+ params:
149+ - 86400
150+ type: gt
151+ expression: A
152+ refId: C
153+ type: threshold
154+ refId: C
155+ execErrState: OK
156+ for: 1h
157+ labels:
158+ severity: warning
159+ noDataState: OK
160+ title: CertRenewalOverdue
161+ uid: cert-renewal-overdue
162+ - annotations:
163+ description: Challenge in flight for over an hour. Healthy ones resolve in seconds.
164+ If its Order is gone it must be deleted by name, or it starves every future
165+ renewal for this hostname.
166+ summary: 'ACME challenge stuck for {{ $labels.namespace }}/{{ $labels.name
167+ }}'
168+ condition: C
169+ data:
170+ - datasourceUid: prometheus
171+ model:
172+ expr: certmanager_certificate_challenge_status
173+ instant: true
174+ refId: A
175+ refId: A
176+ relativeTimeRange:
177+ from: 600
178+ to: 0
179+ - datasourceUid: __expr__
180+ model:
181+ conditions:
182+ - evaluator:
183+ params:
184+ - 0
185+ type: gt
186+ expression: A
187+ refId: C
188+ type: threshold
189+ refId: C
190+ execErrState: OK
191+ for: 1h
192+ labels:
193+ severity: warning
194+ noDataState: OK
195+ title: CertChallengeStuck
196+ uid: cert-challenge-stuck
197+ - annotations:
198+ description: Renewal starts at 30 days, so this has been failing for a week
199+ or more.
200+ summary: 'Certificate {{ $labels.namespace }}/{{ $labels.name }} expires
201+ within 21 days'
202+ condition: C
203+ data:
204+ - datasourceUid: prometheus
205+ model:
206+ expr: certmanager_certificate_expiration_timestamp_seconds - time()
207+ instant: true
208+ refId: A
209+ refId: A
210+ relativeTimeRange:
211+ from: 600
212+ to: 0
213+ - datasourceUid: __expr__
214+ model:
215+ conditions:
216+ - evaluator:
217+ params:
218+ - 1814400
219+ type: lt
220+ expression: A
221+ refId: C
222+ type: threshold
223+ refId: C
224+ execErrState: OK
225+ for: 1h
226+ labels:
227+ severity: warning
228+ noDataState: OK
229+ title: CertExpiringSoon
230+ uid: cert-expiring-soon
231+ - annotations:
232+ description: Under a week to expiry. Users will see browser warnings when this
233+ lapses.
234+ summary: 'Certificate {{ $labels.namespace }}/{{ $labels.name }} expires
235+ within 7 days'
236+ condition: C
237+ data:
238+ - datasourceUid: prometheus
239+ model:
240+ expr: certmanager_certificate_expiration_timestamp_seconds - time()
241+ instant: true
242+ refId: A
243+ refId: A
244+ relativeTimeRange:
245+ from: 600
246+ to: 0
247+ - datasourceUid: __expr__
248+ model:
249+ conditions:
250+ - evaluator:
251+ params:
252+ - 604800
253+ type: lt
254+ expression: A
255+ refId: C
256+ type: threshold
257+ refId: C
258+ execErrState: OK
259+ for: 10m
260+ labels:
261+ severity: critical
262+ noDataState: OK
263+ title: CertExpiringCritical
264+ uid: cert-expiring-critical
265+ - annotations:
266+ description: No certificate can be issued or renewed through this issuer.
267+ summary: 'ClusterIssuer {{ $labels.name }} is not Ready'
268+ condition: C
269+ data:
270+ - datasourceUid: prometheus
271+ model:
272+ expr: certmanager_clusterissuer_ready_status{condition="True"}
273+ instant: true
274+ refId: A
275+ refId: A
276+ relativeTimeRange:
277+ from: 600
278+ to: 0
279+ - datasourceUid: __expr__
280+ model:
281+ conditions:
282+ - evaluator:
283+ params:
284+ - 1
285+ type: lt
286+ expression: A
287+ refId: C
288+ type: threshold
289+ refId: C
290+ execErrState: OK
291+ for: 15m
292+ labels:
293+ severity: critical
294+ noDataState: OK
295+ title: ClusterIssuerNotReady
296+ uid: clusterissuer-not-ready
89297kind : ConfigMap
90298metadata :
91299 labels :
0 commit comments