From d925e87d96f819da796378d9034d1a7e0002a713 Mon Sep 17 00:00:00 2001 From: Sohamdg081992 <31517098+Sohamdg081992@users.noreply.github.com> Date: Mon, 23 Oct 2023 10:24:26 -0700 Subject: [PATCH] Add alert for new agent version in prometheus collector (#654) * Removing duplicate alerts from ci recommended alerts * Remove test branch * Remove preview keyword from policy readme * Add alert for new agent version in prometheus collector --- internal/alerts/example-alert-template.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/internal/alerts/example-alert-template.json b/internal/alerts/example-alert-template.json index e9a7a5a45..46884a2a0 100644 --- a/internal/alerts/example-alert-template.json +++ b/internal/alerts/example-alert-template.json @@ -251,6 +251,24 @@ "actionGroupId": "/subscriptions/13d371f9-5a39-46d5-8e1b-60158c49db84/resourceGroups/ContainerInsightsPrometheusCollector-Prod/providers/microsoft.insights/actiongroups/AMA-PrometheusCollectorAlertGroup" } ] + }, + { + "alert": "New agent version found for prometheus collector", + "expression": "count(count (kube_pod_container_info{image=~\"mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-collector.*\"}) by (image)) > 2", + "for": "PT30M", + "annotations": { + "description": "New agent version found for prometheus collector. This alert is only used in near ring regions for prod monitoring clusters" + }, + "severity": 4, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/13d371f9-5a39-46d5-8e1b-60158c49db84/resourceGroups/ContainerInsightsPrometheusCollector-Prod/providers/microsoft.insights/actiongroups/AMA-PrometheusCollectorAlertGroup" + } + ] } ] }