Skip to content

Commit 332c7bb

Browse files
jhoblittfbegyn
authored andcommitted
(fleet/kyverno) add alerts
1 parent 762e6a5 commit 332c7bb

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: PrometheusRule
4+
metadata:
5+
labels:
6+
lsst.io/rule: "true"
7+
name: kyverno
8+
spec:
9+
groups:
10+
- name: kyverno.rules
11+
rules:
12+
- alert: KyvernoPolicyExecutionDurationHigh
13+
annotations:
14+
summary: "High mean Kyverno policy execution time of {{ $value }} seconds"
15+
expr: sum(kyverno_policy_execution_duration_seconds_sum{cluster=~".*"}) / sum(kyverno_policy_execution_duration_seconds_count{cluster=~".*"}) > 0.1
16+
for: 15s
17+
labels:
18+
severity: warning
19+
20+
- alert: KyvernoDeploymentIsOnFire
21+
annotations:
22+
summary: "Kyverno deployment {{ $labels.namespace }}/{{ $labels.deployment }} is on fire"
23+
# XXX is this the correct way to determine if a deployment is unhappy?
24+
expr: kube_deployment_status_condition{namespace="kyverno",condition="Available",status="true"} != 1
25+
for: 5m
26+
labels:
27+
severity: warning

0 commit comments

Comments
 (0)