Skip to content

Commit

Permalink
Move zot alerting rules to be CAPI only (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
uvegla authored Jun 26, 2024
1 parent ac4951b commit 5cc3124
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if eq .Values.managementCluster.provider.flavor "capi" }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
Expand Down Expand Up @@ -46,3 +47,4 @@ spec:
severity: page
team: honeybadger
topic: managementcluster
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
rule_files:
- zot.rules.yml

tests:
- interval: 1m
input_series:
- series: 'kube_deployment_status_replicas_unavailable{cluster_type="management_cluster",namespace="zot",deployment="zot-zot"}'
values: '_x5 0x10 1x45'
alert_rule_test:
- alertname: ZotDeploymentNotSatisfied
eval_time: 46m
exp_alerts:
- exp_labels:
alertname: "ZotDeploymentNotSatisfied"
area: "platform"
cancel_if_cluster_status_creating: "true"
cancel_if_cluster_status_deleting: "true"
cancel_if_cluster_status_updating: "true"
cancel_if_outside_working_hours: "true"
cluster_type: "management_cluster"
deployment: "zot-zot"
namespace: "zot"
severity: "page"
team: "honeybadger"
topic: "managementcluster"
exp_annotations:
description: "Zot deployment zot/zot-zot is not satisfied."
opsrecipe: "zot/"
- interval: 1m
input_series:
- series: 'kubelet_volume_stats_available_bytes{namespace="zot", persistentvolumeclaim="zot-zot-pvc"}'
values: '50x30 20x30 15x30 5x60'
- series: 'kubelet_volume_stats_capacity_bytes{namespace="zot", persistentvolumeclaim="zot-zot-pvc"}'
values: '100x150'
alert_rule_test:
- alertname: ZotPersistentVolumeFillingUp
eval_time: 150m
exp_alerts:
- exp_labels:
alertname: "ZotPersistentVolumeFillingUp"
area: "platform"
cancel_if_cluster_status_creating: "true"
cancel_if_cluster_status_deleting: "true"
cancel_if_cluster_status_updating: "true"
cancel_if_outside_working_hours: "true"
namespace: "zot"
persistentvolumeclaim: "zot-zot-pvc"
severity: "page"
team: "honeybadger"
topic: "managementcluster"
exp_annotations:
description: "The Zot PersistentVolume claimed by zot-zot-pvc in namespace zot is at least 80% full and projected to fill up soon."
opsrecipe: "zot/"
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
rule_files:
- zot.rules.yml

tests:
- interval: 1m
input_series:
- series: 'kube_deployment_status_replicas_unavailable{cluster_type="management_cluster",namespace="zot",deployment="zot-zot"}'
values: '_x5 0x10 1x45'
alert_rule_test:
- alertname: ZotDeploymentNotSatisfied
eval_time: 46m
exp_alerts:
- exp_labels:
alertname: "ZotDeploymentNotSatisfied"
area: "platform"
cancel_if_cluster_status_creating: "true"
cancel_if_cluster_status_deleting: "true"
cancel_if_cluster_status_updating: "true"
cancel_if_outside_working_hours: "true"
cluster_type: "management_cluster"
deployment: "zot-zot"
namespace: "zot"
severity: "page"
team: "honeybadger"
topic: "managementcluster"
exp_annotations:
description: "Zot deployment zot/zot-zot is not satisfied."
opsrecipe: "zot/"
- interval: 1m
input_series:
- series: 'kubelet_volume_stats_available_bytes{namespace="zot", persistentvolumeclaim="zot-zot-pvc"}'
values: '50x30 20x30 15x30 5x60'
- series: 'kubelet_volume_stats_capacity_bytes{namespace="zot", persistentvolumeclaim="zot-zot-pvc"}'
values: '100x150'
alert_rule_test:
- alertname: ZotPersistentVolumeFillingUp
eval_time: 150m
exp_alerts:
- exp_labels:
alertname: "ZotPersistentVolumeFillingUp"
area: "platform"
cancel_if_cluster_status_creating: "true"
cancel_if_cluster_status_deleting: "true"
cancel_if_cluster_status_updating: "true"
cancel_if_outside_working_hours: "true"
namespace: "zot"
persistentvolumeclaim: "zot-zot-pvc"
severity: "page"
team: "honeybadger"
topic: "managementcluster"
exp_annotations:
description: "The Zot PersistentVolume claimed by zot-zot-pvc in namespace zot is at least 80% full and projected to fill up soon."
opsrecipe: "zot/"

0 comments on commit 5cc3124

Please sign in to comment.