-
Notifications
You must be signed in to change notification settings - Fork 6
/
tests.yaml
109 lines (108 loc) · 6.81 KB
/
tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# yamllint disable rule:line-length
---
rule_files:
- prometheus_alerts.yaml
tests:
- interval: 5m
input_series:
- series: 'argocd_app_info{autosync_enabled="false", dest_server="https://kubernetes.default.svc", health_status="Healthy", job="argo-cd-argocd-application-controller-metrics", name="ci-cd", namespace="ci-cd", project="ops", sync_status="OutOfSync"}'
values: "1+0x4"
- series: 'argocd_app_info{autosync_enabled="false", dest_server="https://kubernetes.default.svc", health_status="Healthy", job="argo-cd-argocd-application-controller-metrics", name="ci-cd-synced", namespace="ci-cd", project="ops", sync_status="Synced"}'
values: "1+0x4"
alert_rule_test:
- eval_time: 20m
alertname: ArgoCdAppOutOfSync
exp_alerts:
- exp_labels:
severity: warning
job: argo-cd-argocd-application-controller-metrics
dest_server: https://kubernetes.default.svc
project: ops
name: ci-cd
sync_status: OutOfSync
exp_annotations:
summary: "An ArgoCD Application is Out Of Sync."
description: "The application https://kubernetes.default.svc/ops/ci-cd is out of sync with the sync status OutOfSync for the past 15m."
dashboard_url: "https://grafana.com/d/argo-cd-application-overview-kask/argocd-application-overview?var-dest_server=https://kubernetes.default.svc&var-project=ops&var-application=ci-cd"
- interval: 5m
input_series:
- series: 'argocd_app_info{autosync_enabled="true", dest_server="https://kubernetes.default.svc", health_status="Degraded", job="argo-cd-argocd-application-controller-metrics", name="ci-cd", namespace="ci-cd", project="ops", sync_status="Synced"}'
values: "1+0x4"
- series: 'argocd_app_info{autosync_enabled="true", dest_server="https://kubernetes.default.svc", health_status="Healthy", job="argo-cd-argocd-application-controller-metrics", name="ci-cd-healthy", namespace="ci-cd", project="ops", sync_status="Synced"}'
values: "1+0x4"
alert_rule_test:
- eval_time: 20m
alertname: ArgoCdAppUnhealthy
exp_alerts:
- exp_labels:
severity: warning
job: argo-cd-argocd-application-controller-metrics
dest_server: https://kubernetes.default.svc
project: ops
name: ci-cd
health_status: Degraded
exp_annotations:
summary: "An ArgoCD Application is Unhealthy."
description: "The application https://kubernetes.default.svc/ops/ci-cd is unhealthy with the health status Degraded for the past 15m."
dashboard_url: "https://grafana.com/d/argo-cd-application-overview-kask/argocd-application-overview?var-dest_server=https://kubernetes.default.svc&var-project=ops&var-application=ci-cd"
- interval: 5m
input_series:
- series: 'argocd_app_info{autosync_enabled="false", dest_server="https://kubernetes.default.svc", health_status="Healthy", job="argo-cd-argocd-application-controller-metrics", name="ci-cd", namespace="ci-cd", project="ops", sync_status="Synced"}'
values: "1+0x40"
- series: 'argocd_app_info{autosync_enabled="true", dest_server="https://kubernetes.default.svc", health_status="Healthy", job="argo-cd-argocd-application-controller-metrics", name="ci-cd-sync-enabled", namespace="ci-cd", project="ops", sync_status="Synced"}'
values: "1+0x40"
alert_rule_test:
- eval_time: 3h
alertname: ArgoCdAppAutoSyncDisabled
exp_alerts:
- exp_labels:
severity: warning
job: argo-cd-argocd-application-controller-metrics
dest_server: https://kubernetes.default.svc
project: ops
name: ci-cd
autosync_enabled: false
exp_annotations:
summary: "An ArgoCD Application has AutoSync Disabled."
description: "The application https://kubernetes.default.svc/ops/ci-cd has autosync disabled for the past 2h."
dashboard_url: "https://grafana.com/d/argo-cd-application-overview-kask/argocd-application-overview?var-dest_server=https://kubernetes.default.svc&var-project=ops&var-application=ci-cd"
- interval: 5m
input_series:
- series: 'argocd_app_sync_total{dest_server="https://kubernetes.default.svc", job="argo-cd-argocd-application-controller-metrics", name="ci-cd", namespace="ci-cd", phase="Failed", project="ops", service="argo-cd-argocd-application-controller-metrics"}'
values: "1+1x4"
- series: 'argocd_app_sync_total{dest_server="https://kubernetes.default.svc", job="argo-cd-argocd-application-controller-metrics", name="ci-cd-succeeded", namespace="ci-cd", phase="Succeeded", project="ops", service="argo-cd-argocd-application-controller-metrics"}'
values: "1+1x4"
alert_rule_test:
- eval_time: 20m
alertname: ArgoCdAppSyncFailed
exp_alerts:
- exp_labels:
severity: warning
job: argo-cd-argocd-application-controller-metrics
dest_server: https://kubernetes.default.svc
project: ops
name: ci-cd
phase: "Failed"
exp_annotations:
summary: "An ArgoCD Application has Failed to Sync."
description: "The application https://kubernetes.default.svc/ops/ci-cd has failed to sync with the status Failed the past 10m."
dashboard_url: "https://grafana.com/d/argo-cd-application-overview-kask/argocd-application-overview?var-dest_server=https://kubernetes.default.svc&var-project=ops&var-application=ci-cd"
- interval: 5m
input_series:
- series: 'argocd_notifications_deliveries_total{exported_service="grafana", job="argo-cd-argocd-notifications-controller-metrics", namespace="ci-cd", succeeded="false", trigger="on-deployed"}'
values: "1+1x4"
- series: 'argocd_notifications_deliveries_total{exported_service="grafana", job="argo-cd-argocd-notifications-controller-metrics", namespace="ci-cd", succeeded="true", trigger="on-deployed"}'
values: "1+1x4"
alert_rule_test:
- eval_time: 20m
alertname: ArgoCdNotificationDeliveryFailed
exp_alerts:
- exp_labels:
severity: warning
job: argo-cd-argocd-notifications-controller-metrics
exported_service: grafana
succeeded: false
exp_annotations:
summary: "ArgoCD Notification Delivery Failed."
description: "The notification job argo-cd-argocd-notifications-controller-metrics has failed to deliver to grafana for the past 10m."
dashboard_url: "https://grafana.com/d/argo-cd-notifications-overview-kask/argocd-notifications-overview?var-job=argo-cd-argocd-notifications-controller-metrics&var-exported_service=grafana"