diff --git a/controllers/argocd_metrics_controller.go b/controllers/argocd_metrics_controller.go index 5dd156a6d..ea0c9799b 100644 --- a/controllers/argocd_metrics_controller.go +++ b/controllers/argocd_metrics_controller.go @@ -521,7 +521,8 @@ func newPrometheusRule(namespace string) *monitoringv1.PrometheusRule { { Alert: "ArgoCDSyncAlert", Annotations: map[string]string{ - "message": "ArgoCD application {{ $labels.name }} is out of sync", + "summary": "Argo CD application is out of sync", + "description": "Argo CD application {{ $labels.name }} is out of sync. Check ArgoCDSyncAlert status, this alert is designed to notify that an application managed by Argo CD is out of sync.", }, Expr: intstr.IntOrString{ Type: intstr.String, diff --git a/controllers/argocd_metrics_controller_test.go b/controllers/argocd_metrics_controller_test.go index fe9deee3b..57cee9976 100644 --- a/controllers/argocd_metrics_controller_test.go +++ b/controllers/argocd_metrics_controller_test.go @@ -283,7 +283,8 @@ func TestReconciler_add_prometheus_rule(t *testing.T) { assert.Equal(t, rule.OwnerReferences[0].Name, tc.instanceName) assert.Equal(t, rule.Spec.Groups[0].Rules[0].Alert, "ArgoCDSyncAlert") - assert.Assert(t, rule.Spec.Groups[0].Rules[0].Annotations["message"] != "") + assert.Assert(t, rule.Spec.Groups[0].Rules[0].Annotations["summary"] != "") + assert.Assert(t, rule.Spec.Groups[0].Rules[0].Annotations["description"] != "") assert.Assert(t, rule.Spec.Groups[0].Rules[0].Labels["severity"] != "") assert.Equal(t, rule.Spec.Groups[0].Rules[0].For, "5m") expr := fmt.Sprintf("argocd_app_info{namespace=\"%s\",sync_status=\"OutOfSync\"} > 0", tc.namespace) diff --git a/test/openshift/e2e/ignore-tests/sequential/1-005_validate_metrics/01-assert.yaml b/test/openshift/e2e/ignore-tests/sequential/1-005_validate_metrics/01-assert.yaml index 6ca4b467b..1b0dc4c31 100644 --- a/test/openshift/e2e/ignore-tests/sequential/1-005_validate_metrics/01-assert.yaml +++ b/test/openshift/e2e/ignore-tests/sequential/1-005_validate_metrics/01-assert.yaml @@ -46,7 +46,8 @@ spec: rules: - alert: ArgoCDSyncAlert annotations: - message: ArgoCD application {{ $labels.name }} is out of sync + summary: Argo CD application is out of sync + description: Argo CD application {{ $labels.name }} is out of sync. Check ArgoCDSyncAlert status, this alert is designed to notify that an application managed by Argo CD is out of sync. expr: argocd_app_info{namespace="openshift-gitops",sync_status="OutOfSync"} > 0 labels: severity: warning diff --git a/test/openshift/e2e/ignore-tests/sequential/1-041_validate_argocd_sync_alert/01-assert.yaml b/test/openshift/e2e/ignore-tests/sequential/1-041_validate_argocd_sync_alert/01-assert.yaml index cdd2858ee..2b89033e1 100644 --- a/test/openshift/e2e/ignore-tests/sequential/1-041_validate_argocd_sync_alert/01-assert.yaml +++ b/test/openshift/e2e/ignore-tests/sequential/1-041_validate_argocd_sync_alert/01-assert.yaml @@ -17,7 +17,8 @@ spec: rules: - alert: ArgoCDSyncAlert annotations: - message: ArgoCD application {{ $labels.name }} is out of sync + summary: Argo CD application is out of sync + description: Argo CD application {{ $labels.name }} is out of sync. Check ArgoCDSyncAlert status, this alert is designed to notify that an application managed by Argo CD is out of sync. expr: argocd_app_info{namespace="openshift-gitops",sync_status="OutOfSync"} > 0 for: 5m labels: diff --git a/test/openshift/e2e/sequential/1-041_validate_argocd_sync_alert/01-assert.yaml b/test/openshift/e2e/sequential/1-041_validate_argocd_sync_alert/01-assert.yaml index cdd2858ee..0257afc12 100644 --- a/test/openshift/e2e/sequential/1-041_validate_argocd_sync_alert/01-assert.yaml +++ b/test/openshift/e2e/sequential/1-041_validate_argocd_sync_alert/01-assert.yaml @@ -17,8 +17,9 @@ spec: rules: - alert: ArgoCDSyncAlert annotations: - message: ArgoCD application {{ $labels.name }} is out of sync + summary: Argo CD application is out of sync + description: Argo CD application {{ $labels.name }} is out of sync. Check ArgoCDSyncAlert status, this alert is designed to notify that an application managed by Argo CD is out of sync. expr: argocd_app_info{namespace="openshift-gitops",sync_status="OutOfSync"} > 0 for: 5m labels: - severity: warning + severity: warning \ No newline at end of file