diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/alertRules.json b/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/alertRules.json
deleted file mode 100644
index e63cc56c07f..00000000000
--- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/alertRules.json
+++ /dev/null
@@ -1,425 +0,0 @@
-{
- "__inputs": [
- {
- "name": "DS_AZURE_MONITOR",
- "label": "Azure Monitor",
- "description": "",
- "type": "datasource",
- "pluginId": "grafana-azure-monitor-datasource",
- "pluginName": "Azure Monitor"
- }
- ],
- "__elements": [],
- "__requires": [
- {
- "type": "grafana",
- "id": "grafana",
- "name": "Grafana",
- "version": "8.3.0-pre"
- },
- {
- "type": "datasource",
- "id": "grafana-azure-monitor-datasource",
- "name": "Azure Monitor",
- "version": "0.3.0"
- },
- {
- "type": "panel",
- "id": "table",
- "name": "Table",
- "version": ""
- }
- ],
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "target": {
- "limit": 100,
- "matchAny": false,
- "tags": [],
- "type": "dashboard"
- },
- "type": "dashboard"
- }
- ]
- },
- "description": "A summary of all alert rules for the subscription selected and following filters.",
- "editable": true,
- "fiscalYearStartMonth": 0,
- "gnetId": null,
- "graphTooltip": 0,
- "id": null,
- "iteration": 1634314043696,
- "links": [],
- "liveNow": false,
- "panels": [
- {
- "datasource": "${DS_AZURE_MONITOR}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "custom": {
- "align": "auto",
- "displayMode": "auto"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "Status"
- },
- "properties": [
- {
- "id": "mappings",
- "value": [
- {
- "options": {
- "Disabled": {
- "color": "red",
- "index": 1
- },
- "Enabled": {
- "color": "green",
- "index": 0
- }
- },
- "type": "value"
- }
- ]
- },
- {
- "id": "custom.displayMode",
- "value": "color-background"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Name"
- },
- "properties": [
- {
- "id": "links",
- "value": [
- {
- "targetBlank": true,
- "title": "",
- "url": "https://ms.portal.azure.com/#blade/Microsoft_Azure_Monitoring/UpdateVNextAlertRuleBlade/ruleInputs/%7B%22alertId%22%3A%22%2Fsubscriptions%2F${sub}%2FresourceGroups%2F${rg}%2Fproviders%2Fmicrosoft.alertsmanagement%2F${__data.fields[\"Signal type\"]}%2F${__data.fields.Name}%22%7D"
- }
- ]
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "blue",
- "mode": "fixed"
- }
- },
- {
- "id": "custom.displayMode",
- "value": "color-text"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Target resource"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": null
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 11,
- "w": 24,
- "x": 0,
- "y": 0
- },
- "id": 2,
- "options": {
- "footer": {
- "fields": "",
- "reducer": ["sum"],
- "show": false
- },
- "showHeader": true,
- "sortBy": []
- },
- "pluginVersion": "8.3.0-pre",
- "targets": [
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n
//the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "resources\r\n| where type == \"microsoft.alertsmanagement/smartdetectoralertrules\"\r\n| parse properties.scope with * 'components/' targetResource '\"' *\r\n| parse type with * 'microsoft.alertsmanagement/' signalType \r\n| parse properties.detector.supportedResourceTypes with * '[\"' resourceType '\"]' *\r\n| where subscriptionId == \"$sub\" and resourceGroup in ($rg) and signalType in ($sig_type)\r\nand properties.state in ($stat)\r\n| project name, tostring(properties.state), targetResource, tostring(properties.detector.supportedResourceTypes[0]), signalType\r\n",
- "resultFormat": "table"
- },
- "hide": false,
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "Smart detector alert rules",
- "subscription": "",
- "subscriptions": ["$sub"]
- },
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "resources\r\n| where type == \"microsoft.alertsmanagement/resourcehealthalertrules\"\r\n| parse properties.scope with * 'components/' targetResource '\"' *\r\n| parse type with * 'microsoft.alertsmanagement/' signalType \r\n| parse properties.detector.supportedResourceTypes with * '[\"' resourceType '\"]' *\r\n| where subscriptionId == \"$sub\" and resourceGroup in ($rg) and signalType in ($sig_type)\r\nand properties.state in ($stat)\r\n| project name, tostring(properties.state), targetResource, tostring(properties.detector.supportedResourceTypes[0]), signalType\r\n",
- "resultFormat": "table"
- },
- "hide": false,
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "Resource health alert rules",
- "subscription": "",
- "subscriptions": ["$sub"]
- },
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "resources\r\n| where type == \"microsoft.insights/alertrules\"\r\n| parse properties.scope with * 'components/' targetResource '\"' *\r\n| parse type with * 'microsoft.insights/' signalType \r\n| parse properties.detector.supportedResourceTypes with * '[\"' resourceType '\"]' *\r\n| where subscriptionId == \"$sub\" and resourceGroup in ($rg) and signalType in ($sig_type)\r\nand properties.state in ($stat)\r\n| project name, tostring(properties.state), targetResource, tostring(properties.detector.supportedResourceTypes[0]), signalType\r\n",
- "resultFormat": "table"
- },
- "hide": false,
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "A",
- "subscription": "",
- "subscriptions": ["$sub"]
- }
- ],
- "title": "Alert rules",
- "transformations": [
- {
- "id": "merge",
- "options": {}
- },
- {
- "id": "organize",
- "options": {
- "excludeByName": {},
- "indexByName": {},
- "renameByName": {
- "name": "Name",
- "properties_detector_supportedResourceTypes_0": "Resource type",
- "properties_state": "Status",
- "resourceTypes": "Target resource type",
- "signalType": "Signal type",
- "targetResource": "Target resource",
- "type": "Signal type"
- }
- }
- }
- ],
- "transparent": true,
- "type": "table"
- }
- ],
- "refresh": "",
- "schemaVersion": 31,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {},
- "datasource": "${DS_AZURE_MONITOR}",
- "definition": "Subscriptions()",
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": "Subscription",
- "multi": false,
- "name": "sub",
- "options": [],
- "query": "Subscriptions()",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "type": "query"
- },
- {
- "allValue": null,
- "current": {},
- "datasource": "${DS_AZURE_MONITOR}",
- "definition": "ResourceGroups($sub)",
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": "Resource Group",
- "multi": true,
- "name": "rg",
- "options": [],
- "query": "ResourceGroups($sub)",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "type": "query"
- },
- {
- "allValue": null,
- "current": {
- "selected": true,
- "text": ["Smart detector", "Resource health"],
- "value": ["smartdetectoralertrules", "resourcehealth"]
- },
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": "Signal type",
- "multi": true,
- "name": "sig_type",
- "options": [
- {
- "selected": true,
- "text": "Smart detector",
- "value": "smartdetectoralertrules"
- },
- {
- "selected": true,
- "text": "Resource health",
- "value": "resourcehealth"
- }
- ],
- "query": "Smart detector : smartdetectoralertrules, Resource health : resourcehealth",
- "queryValue": "",
- "skipUrlSync": false,
- "type": "custom"
- },
- {
- "allValue": null,
- "current": {
- "selected": false,
- "text": ["Enabled", "Disabled"],
- "value": ["Enabled", "Disabled"]
- },
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": "Status",
- "multi": true,
- "name": "stat",
- "options": [
- {
- "selected": true,
- "text": "Enabled",
- "value": "Enabled"
- },
- {
- "selected": true,
- "text": "Disabled",
- "value": "Disabled"
- }
- ],
- "query": "Enabled, Disabled",
- "queryValue": "",
- "skipUrlSync": false,
- "type": "custom"
- }
- ]
- },
- "time": {
- "from": "now-6h",
- "to": "now"
- },
- "timepicker": {
- "hidden": true
- },
- "timezone": "",
- "title": "Azure Alert Rules Overview",
- "uid": "Pxwf9wN7k",
- "version": 1
-}
diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/v1Alerts.json b/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/v1Alerts.json
index bea932e18ae..f3a0bb4b2c0 100644
--- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/v1Alerts.json
+++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/v1Alerts.json
@@ -1,21 +1,12 @@
{
- "__inputs": [
- {
- "name": "DS_AZURE_MONITOR",
- "label": "Azure Monitor",
- "description": "",
- "type": "datasource",
- "pluginId": "grafana-azure-monitor-datasource",
- "pluginName": "Azure Monitor"
- }
- ],
+ "__inputs": [],
"__elements": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
- "version": "8.3.0-pre"
+ "version": "8.4.3"
},
{
"type": "datasource",
@@ -23,6 +14,12 @@
"name": "Azure Monitor",
"version": "0.3.0"
},
+ {
+ "type": "panel",
+ "id": "stat",
+ "name": "Stat",
+ "version": ""
+ },
{
"type": "panel",
"id": "table",
@@ -52,15 +49,616 @@
"description": "A summary of all alerts for the subscription and other filters selected",
"editable": true,
"fiscalYearStartMonth": 0,
- "gnetId": null,
"graphTooltip": 0,
"id": null,
- "iteration": 1634314135767,
+ "iteration": 1647624046153,
"links": [],
"liveNow": false,
"panels": [
{
- "datasource": "${DS_AZURE_MONITOR}",
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Total Alerts"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": false,
+ "title": "",
+ "url": "d/dyzn5SK7z/alert-consumption?${sub:queryparam}&${rg:queryparam}&${__url_time_range}&var-mc=Fired&var-mc=Resolved&var-as=New&var-as=Acknowledged&var-as=Closed&var-sev=Sev0&var-sev=Sev1&var-sev=Sev2&var-sev=Sev3&var-sev=Sev4&${__url_time_range}"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 2,
+ "x": 0,
+ "y": 0
+ },
+ "id": 4,
+ "options": {
+ "colorMode": "background",
+ "graphMode": "area",
+ "justifyMode": "center",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": ["lastNotNull"],
+ "fields": "",
+ "values": true
+ },
+ "textMode": "value_and_name"
+ },
+ "pluginVersion": "8.4.3",
+ "targets": [
+ {
+ "azureMonitor": {
+ "dimensionFilters": [],
+ "timeGrain": "auto"
+ },
+ "azureResourceGraph": {
+ "query": "alertsmanagementresources\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg)\r\n| summarize count()"
+ },
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "queryType": "Azure Resource Graph",
+ "refId": "A",
+ "subscription": "",
+ "subscriptions": ["$sub"]
+ }
+ ],
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {},
+ "indexByName": {},
+ "renameByName": {
+ "count_": "Total Alerts"
+ }
+ }
+ }
+ ],
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "red",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Critical"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": false,
+ "title": "",
+ "url": "d/dyzn5SK7z/alert-consumption?${sub:queryparam}&${rg:queryparam}&${__url_time_range}&var-mc=Fired&var-mc=Resolved&var-as=New&var-as=Acknowledged&var-as=Closed&var-sev=Sev0&${__url_time_range}"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 2,
+ "x": 2,
+ "y": 0
+ },
+ "id": 15,
+ "options": {
+ "colorMode": "background",
+ "graphMode": "area",
+ "justifyMode": "center",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": ["lastNotNull"],
+ "fields": "",
+ "values": true
+ },
+ "textMode": "value_and_name"
+ },
+ "pluginVersion": "8.4.3",
+ "targets": [
+ {
+ "azureMonitor": {
+ "dimensionFilters": [],
+ "timeGrain": "auto"
+ },
+ "azureResourceGraph": {
+ "query": "alertsmanagementresources\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg) and properties.essentials.severity == \"Sev0\" \r\n| summarize count()"
+ },
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "queryType": "Azure Resource Graph",
+ "refId": "A",
+ "subscription": "",
+ "subscriptions": ["$sub"]
+ }
+ ],
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {},
+ "indexByName": {},
+ "renameByName": {
+ "count_": "Critical"
+ }
+ }
+ }
+ ],
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "orange",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Error"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": false,
+ "title": "",
+ "url": "d/dyzn5SK7z/alert-consumption?${sub:queryparam}&${rg:queryparam}&${__url_time_range}&var-mc=Fired&var-mc=Resolved&var-as=New&var-as=Acknowledged&var-as=Closed&var-sev=Sev1&${__url_time_range}"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 2,
+ "x": 4,
+ "y": 0
+ },
+ "id": 8,
+ "options": {
+ "colorMode": "background",
+ "graphMode": "area",
+ "justifyMode": "center",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": ["lastNotNull"],
+ "fields": "",
+ "values": true
+ },
+ "textMode": "value_and_name"
+ },
+ "pluginVersion": "8.4.3",
+ "targets": [
+ {
+ "azureMonitor": {
+ "dimensionFilters": [],
+ "timeGrain": "auto"
+ },
+ "azureResourceGraph": {
+ "query": "alertsmanagementresources\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg) and properties.essentials.severity == \"Sev1\" \r\n| summarize count()"
+ },
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "queryType": "Azure Resource Graph",
+ "refId": "A",
+ "subscription": "",
+ "subscriptions": ["$sub"]
+ }
+ ],
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {},
+ "indexByName": {},
+ "renameByName": {
+ "count_": "Error"
+ }
+ }
+ }
+ ],
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "yellow",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Warning"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": false,
+ "title": "",
+ "url": "d/dyzn5SK7z/alert-consumption?${sub:queryparam}&${rg:queryparam}&${__url_time_range}&var-mc=Fired&var-mc=Resolved&var-as=New&var-as=Acknowledged&var-as=Closed&var-sev=Sev2&${__url_time_range}"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 2,
+ "x": 6,
+ "y": 0
+ },
+ "id": 10,
+ "options": {
+ "colorMode": "background",
+ "graphMode": "area",
+ "justifyMode": "center",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": ["lastNotNull"],
+ "fields": "",
+ "values": true
+ },
+ "textMode": "value_and_name"
+ },
+ "pluginVersion": "8.4.3",
+ "targets": [
+ {
+ "azureMonitor": {
+ "dimensionFilters": [],
+ "timeGrain": "auto"
+ },
+ "azureResourceGraph": {
+ "query": "alertsmanagementresources\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg) and properties.essentials.severity == \"Sev2\" \r\n| summarize count()"
+ },
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "queryType": "Azure Resource Graph",
+ "refId": "A",
+ "subscription": "",
+ "subscriptions": ["$sub"]
+ }
+ ],
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {},
+ "indexByName": {},
+ "renameByName": {
+ "count_": "Warning"
+ }
+ }
+ }
+ ],
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "blue",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Informational"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": false,
+ "title": "",
+ "url": "d/dyzn5SK7z/alert-consumption?${sub:queryparam}&${rg:queryparam}&${__url_time_range}&var-mc=Fired&var-mc=Resolved&var-as=New&var-as=Acknowledged&var-as=Closed&var-sev=Sev3&${__url_time_range}"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 2,
+ "x": 8,
+ "y": 0
+ },
+ "id": 12,
+ "options": {
+ "colorMode": "background",
+ "graphMode": "area",
+ "justifyMode": "center",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": ["lastNotNull"],
+ "fields": "",
+ "values": true
+ },
+ "textMode": "value_and_name"
+ },
+ "pluginVersion": "8.4.3",
+ "targets": [
+ {
+ "azureMonitor": {
+ "dimensionFilters": [],
+ "timeGrain": "auto"
+ },
+ "azureResourceGraph": {
+ "query": "alertsmanagementresources\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg) and properties.essentials.severity == \"Sev3\" \r\n| summarize count()"
+ },
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "queryType": "Azure Resource Graph",
+ "refId": "A",
+ "subscription": "",
+ "subscriptions": ["$sub"]
+ }
+ ],
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {},
+ "indexByName": {},
+ "renameByName": {
+ "count_": "Informational"
+ }
+ }
+ }
+ ],
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "fixedColor": "purple",
+ "mode": "fixed"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 80
+ }
+ ]
+ }
+ },
+ "overrides": [
+ {
+ "matcher": {
+ "id": "byName",
+ "options": "Verbose"
+ },
+ "properties": [
+ {
+ "id": "links",
+ "value": [
+ {
+ "targetBlank": false,
+ "title": "",
+ "url": "d/dyzn5SK7z/alert-consumption?${sub:queryparam}&${rg:queryparam}&${__url_time_range}&var-mc=Fired&var-mc=Resolved&var-as=New&var-as=Acknowledged&var-as=Closed&var-sev=Sev4&${__url_time_range}"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 2,
+ "x": 10,
+ "y": 0
+ },
+ "id": 14,
+ "options": {
+ "colorMode": "background",
+ "graphMode": "area",
+ "justifyMode": "center",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": ["lastNotNull"],
+ "fields": "",
+ "values": true
+ },
+ "textMode": "value_and_name"
+ },
+ "pluginVersion": "8.4.3",
+ "targets": [
+ {
+ "azureMonitor": {
+ "dimensionFilters": [],
+ "timeGrain": "auto"
+ },
+ "azureResourceGraph": {
+ "query": "alertsmanagementresources\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg) and properties.essentials.severity == \"Sev4\" \r\n| summarize count()"
+ },
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
+ "queryType": "Azure Resource Graph",
+ "refId": "A",
+ "subscription": "",
+ "subscriptions": ["$sub"]
+ }
+ ],
+ "transformations": [
+ {
+ "id": "organize",
+ "options": {
+ "excludeByName": {},
+ "indexByName": {},
+ "renameByName": {
+ "count_": "Verbose"
+ }
+ }
+ }
+ ],
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
"fieldConfig": {
"defaults": {
"color": {
@@ -91,7 +689,7 @@
{
"matcher": {
"id": "byName",
- "options": "properties_essentials_severity"
+ "options": "Severity"
},
"properties": [
{
@@ -102,27 +700,27 @@
"\"Sev0\"": {
"color": "red",
"index": 4,
- "text": "0 - Critical"
+ "text": "Critical"
},
"\"Sev1\"": {
"color": "orange",
"index": 3,
- "text": "1 - Error"
+ "text": "Error"
},
"\"Sev2\"": {
"color": "yellow",
"index": 2,
- "text": "2 - Warning"
+ "text": "Warning"
},
"\"Sev3\"": {
"color": "blue",
"index": 1,
- "text": "3 - Informational"
+ "text": "Informational"
},
"\"Sev4\"": {
"color": "#8F3BB8",
"index": 0,
- "text": "4 - Verbose"
+ "text": "Verbose"
}
},
"type": "value"
@@ -132,23 +730,15 @@
{
"id": "custom.displayMode",
"value": "color-background-solid"
- },
- {
- "id": "displayName",
- "value": "Severity"
}
]
},
{
"matcher": {
"id": "byName",
- "options": "name"
+ "options": "Name"
},
"properties": [
- {
- "id": "displayName",
- "value": "Name"
- },
{
"id": "custom.displayMode",
"value": "color-text"
@@ -159,13 +749,9 @@
{
"targetBlank": true,
"title": "test title",
- "url": "https://ms.portal.azure.com/#blade/Microsoft_Azure_Monitoring/AlertDetailsTemplateBlade/alertId/%2Fsubscriptions%2F${sub}%2Fresourcegroups%2F${rg}%2Fproviders%2Fmicrosoft.insights%2Fcomponents%2F${res}%2Fproviders%2FMicrosoft.AlertsManagement%2Falerts%2F${__data.fields.alertId}"
+ "url": "https://ms.portal.azure.com/#blade/Microsoft_Azure_Monitoring/AlertDetailsTemplateBlade/alertId/%2Fsubscriptions%2F${sub}%2Fresourcegroups%2F${rg}%2Fproviders%2Fmicrosoft.insights%2Fcomponents%2F${res}%2Fproviders%2FMicrosoft.AlertsManagement%2Falerts%2F${__data.fields[\"Alert ID\"]}"
}
]
- },
- {
- "id": "mappings",
- "value": []
}
]
},
@@ -175,10 +761,6 @@
"options": "properties_essentials_monitorCondition"
},
"properties": [
- {
- "id": "displayName",
- "value": "Monitor condition"
- },
{
"id": "mappings",
"value": [
@@ -202,110 +784,6 @@
"value": "basic"
}
]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "properties_essentials_alertState"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Alert state"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "properties_essentials_targetResourceName"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Affected resource"
- },
- {
- "id": "custom.displayMode",
- "value": "color-text"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "properties_essentials_monitorService"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Monitor service"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "properties_essentials_signalType"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Signal type"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "properties_essentials_lastModifiedDateTime"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Fired time"
- },
- {
- "id": "unit",
- "value": "dateTimeAsUS"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "SubName"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Subscription name"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Name"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 423
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "Subscription name"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 266
- }
- ]
}
]
},
@@ -313,7 +791,7 @@
"h": 16,
"w": 24,
"x": 0,
- "y": 0
+ "y": 4
},
"id": 2,
"links": [],
@@ -327,7 +805,7 @@
"showHeader": true,
"sortBy": []
},
- "pluginVersion": "8.3.0-pre",
+ "pluginVersion": "8.4.3",
"targets": [
{
"appInsights": {
@@ -348,9 +826,13 @@
"top": "10"
},
"azureResourceGraph": {
- "query": "alertsmanagementresources\r\n| join kind=leftouter (ResourceContainers | where type=='microsoft.resources/subscriptions' | project SubName=name, subscriptionId) on subscriptionId\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg) and properties.essentials.monitorCondition in ($mc)\r\nand properties.essentials.alertState in ($as) and properties.essentials.severity in ($sev)\r\nand todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| parse id with * \"alerts/\" alertId\r\n| project name, properties.essentials.severity, tostring(properties.essentials.monitorCondition), \r\ntostring(properties.essentials.alertState), tostring(properties.essentials.targetResourceName),\r\n tostring(properties.essentials.monitorService), tostring(properties.essentials.signalType),\r\n todatetime(properties.essentials.lastModifiedDateTime), tostring(SubName), alertId, id\r\n",
+ "query": "alertsmanagementresources\r\n| join kind=leftouter (ResourceContainers | where type=='microsoft.resources/subscriptions' | project SubName=name, subscriptionId) on subscriptionId\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg) and properties.essentials.monitorCondition in ($mc)\r\nand properties.essentials.alertState in ($as) and properties.essentials.severity in ($sev)\r\nand todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| parse id with * \"alerts/\" alertId\r\n| project name, properties.essentials.severity, tostring(properties.essentials.monitorCondition), \r\ntostring(properties.essentials.alertState), todatetime(properties.essentials.lastModifiedDateTime), alertId\r\n",
"resultFormat": "table"
},
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
"insightsAnalytics": {
"query": "",
"resultFormat": "time_series"
@@ -358,30 +840,11 @@
"queryType": "Azure Resource Graph",
"refId": "A",
"subscription": "",
- "subscriptions": []
+ "subscriptions": ["$sub"]
}
],
"title": "V1 Alerts",
"transformations": [
- {
- "id": "filterFieldsByName",
- "options": {
- "include": {
- "names": [
- "alertId",
- "name",
- "properties_essentials_severity",
- "properties_essentials_monitorCondition",
- "properties_essentials_alertState",
- "properties_essentials_targetResourceName",
- "properties_essentials_monitorService",
- "properties_essentials_signalType",
- "properties_essentials_lastModifiedDateTime",
- "SubName"
- ]
- }
- }
- },
{
"id": "organize",
"options": {
@@ -389,7 +852,14 @@
"alertId": false
},
"indexByName": {},
- "renameByName": {}
+ "renameByName": {
+ "alertId": "Alert ID",
+ "name": "Name",
+ "properties_essentials_alertState": "User Response",
+ "properties_essentials_lastModifiedDateTime": "Fired Time",
+ "properties_essentials_monitorCondition": "Alert Condition",
+ "properties_essentials_severity": "Severity"
+ }
}
}
],
@@ -398,18 +868,33 @@
}
],
"refresh": "",
- "schemaVersion": 31,
+ "schemaVersion": 35,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
- "allValue": null,
"current": {},
- "datasource": "${DS_AZURE_MONITOR}",
+ "hide": 0,
+ "includeAll": false,
+ "label": "Datasource",
+ "multi": false,
+ "name": "ds",
+ "options": [],
+ "query": "grafana-azure-monitor-datasource",
+ "queryValue": "",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "type": "datasource"
+ },
+ {
+ "current": {},
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
"definition": "subscriptions()",
- "description": null,
- "error": null,
"hide": 0,
"includeAll": false,
"label": "Subscription",
@@ -424,12 +909,12 @@
"type": "query"
},
{
- "allValue": null,
"current": {},
- "datasource": "${DS_AZURE_MONITOR}",
+ "datasource": {
+ "type": "grafana-azure-monitor-datasource",
+ "uid": "${ds}"
+ },
"definition": "ResourceGroups($sub)",
- "description": null,
- "error": null,
"hide": 0,
"includeAll": false,
"label": "Resource group",
@@ -444,17 +929,14 @@
"type": "query"
},
{
- "allValue": null,
"current": {
"selected": false,
"text": ["Fired", "Resolved"],
"value": ["Fired", "Resolved"]
},
- "description": null,
- "error": null,
"hide": 0,
"includeAll": false,
- "label": "Monitor Condition",
+ "label": "Alert Condition",
"multi": true,
"name": "mc",
"options": [
@@ -475,17 +957,14 @@
"type": "custom"
},
{
- "allValue": null,
"current": {
"selected": false,
"text": ["New", "Acknowledged", "Closed"],
"value": ["New", "Acknowledged", "Closed"]
},
- "description": null,
- "error": null,
"hide": 0,
"includeAll": false,
- "label": "Alert State",
+ "label": "User Response",
"multi": true,
"name": "as",
"options": [
@@ -511,14 +990,11 @@
"type": "custom"
},
{
- "allValue": null,
"current": {
"selected": false,
- "text": ["1 - Error", "0 - Critical", "2 - Warning", "3 - Informational", "4 - Verbose"],
- "value": ["Sev1", "Sev0", "Sev2", "Sev3", "Sev4"]
+ "text": ["Critical", "Error", "Warning", "Informational", "Verbose"],
+ "value": ["Sev0", "Sev1", "Sev2", "Sev3", "Sev4"]
},
- "description": null,
- "error": null,
"hide": 0,
"includeAll": false,
"label": "Severity",
@@ -527,31 +1003,31 @@
"options": [
{
"selected": true,
- "text": "0 - Critical",
+ "text": "Critical",
"value": "Sev0"
},
{
"selected": true,
- "text": "1 - Error",
+ "text": "Error",
"value": "Sev1"
},
{
"selected": true,
- "text": "2 - Warning",
+ "text": "Warning",
"value": "Sev2"
},
{
"selected": true,
- "text": "3 - Informational",
+ "text": "Informational",
"value": "Sev3"
},
{
"selected": true,
- "text": "4 - Verbose",
+ "text": "Verbose",
"value": "Sev4"
}
],
- "query": "0 - Critical : Sev0, 1 - Error : Sev1, 2 - Warning : Sev2, 3 - Informational : Sev3, 4 - Verbose : Sev4",
+ "query": "Critical : Sev0, Error : Sev1, Warning : Sev2, Informational : Sev3, Verbose : Sev4",
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
@@ -568,6 +1044,7 @@
},
"timezone": "",
"title": "Azure Alert Consumption",
- "uid": "5DLst5N7k",
- "version": 1
+ "uid": "dyzn5SK7z",
+ "version": 45,
+ "weekStart": ""
}
diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/v1AlertsAtScale.json b/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/v1AlertsAtScale.json
deleted file mode 100644
index ae3b7ce0571..00000000000
--- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/dashboards/v1AlertsAtScale.json
+++ /dev/null
@@ -1,832 +0,0 @@
-{
- "__inputs": [
- {
- "name": "DS_AZURE_MONITOR",
- "label": "Azure Monitor",
- "description": "",
- "type": "datasource",
- "pluginId": "grafana-azure-monitor-datasource",
- "pluginName": "Azure Monitor"
- }
- ],
- "__elements": [],
- "__requires": [
- {
- "type": "grafana",
- "id": "grafana",
- "name": "Grafana",
- "version": "8.3.0-pre"
- },
- {
- "type": "datasource",
- "id": "grafana-azure-monitor-datasource",
- "name": "Azure Monitor",
- "version": "0.3.0"
- },
- {
- "type": "panel",
- "id": "stat",
- "name": "Stat",
- "version": ""
- },
- {
- "type": "panel",
- "id": "table",
- "name": "Table",
- "version": ""
- }
- ],
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "target": {
- "limit": 100,
- "matchAny": false,
- "tags": [],
- "type": "dashboard"
- },
- "type": "dashboard"
- }
- ]
- },
- "description": "A summary of alerts per severity with an overall count of total alerts, alert rules and action rules",
- "editable": true,
- "fiscalYearStartMonth": 0,
- "gnetId": null,
- "graphTooltip": 0,
- "id": null,
- "iteration": 1634313967579,
- "links": [],
- "liveNow": false,
- "panels": [
- {
- "datasource": "${DS_AZURE_MONITOR}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "blue",
- "mode": "fixed"
- },
- "links": [],
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "count_"
- },
- "properties": [
- {
- "id": "links",
- "value": [
- {
- "targetBlank": true,
- "title": "",
- "url": "d/5DLst5N7k/alert-consumption?${sub:queryparam}&${rg:queryparam}&${__url_time_range}&var-mc=Fired&var-mc=Resolved&var-as=New&var-as=Acknowledged&var-as=Closed&var-sev=Sev0&var-sev=Sev1&var-sev=Sev2&var-sev=Sev3&var-sev=Sev4&${__url_time_range}"
- }
- ]
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 5,
- "w": 2,
- "x": 0,
- "y": 0
- },
- "id": 4,
- "options": {
- "colorMode": "value",
- "graphMode": "none",
- "justifyMode": "center",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": ["lastNotNull"],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "8.3.0-pre",
- "targets": [
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "alertsmanagementresources\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg)\r\n| summarize count()",
- "resultFormat": "table"
- },
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "A",
- "subscription": "",
- "subscriptions": ["$sub"]
- }
- ],
- "title": "Total alerts",
- "type": "stat"
- },
- {
- "datasource": "${DS_AZURE_MONITOR}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "blue",
- "mode": "fixed"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "Total"
- },
- "properties": [
- {
- "id": "links",
- "value": [
- {
- "targetBlank": true,
- "title": "",
- "url": "d/Pxwf9wN7k/alert-rules-overview?${sub:queryparam}&${rg:queryparam}&var-sig_type=smartdetectoralertrules&var-sig_type=resourcehealth&var-stat=Enabled&var-stat=Disabled"
- }
- ]
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 5,
- "w": 2,
- "x": 2,
- "y": 0
- },
- "id": 6,
- "options": {
- "colorMode": "value",
- "graphMode": "none",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": ["lastNotNull"],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "8.3.0-pre",
- "targets": [
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "resources\r\n| where type == \"microsoft.alertsmanagement/smartdetectoralertrules\"\r\n| where subscriptionId == \"$sub\" and resourceGroup in ($rg)\r\n| summarize count()",
- "resultFormat": "table"
- },
- "hide": false,
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "Smart detector rules",
- "subscription": "",
- "subscriptions": ["$sub"]
- },
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "resources\r\n| where type == \"microsoft.alertsmanagement/resourcehealthalertrules\"\r\n| where subscriptionId == \"$sub\" and resourceGroup in ($rg)\r\n| summarize count()",
- "resultFormat": "table"
- },
- "hide": false,
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "Resource health alert rules",
- "subscription": "",
- "subscriptions": ["$sub"]
- },
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "resources\r\n| where type == \"microsoft.insights/alertrules\"\r\n| where subscriptionId == \"$sub\" and resourceGroup in ($rg)\r\n| summarize count()",
- "resultFormat": "table"
- },
- "hide": false,
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "Insights alert rules",
- "subscription": "",
- "subscriptions": ["$sub"]
- },
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "resources\r\n| where type == \"microsoft.insights/metricalerts\"\r\n| where subscriptionId == \"$sub\" and resourceGroup in ($rg)\r\n| summarize count()",
- "resultFormat": "table"
- },
- "hide": false,
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "Metrics alert rules",
- "subscription": "",
- "subscriptions": ["$sub"]
- },
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "resources\r\n| where type == \"microsoft.insights/activitylogalerts\"\r\n| where subscriptionId == \"$sub\" and resourceGroup in ($rg)\r\n| summarize count()",
- "resultFormat": "table"
- },
- "hide": false,
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "Log alert rules",
- "subscription": "",
- "subscriptions": ["$sub"]
- }
- ],
- "title": "Total alert rules",
- "transformations": [
- {
- "id": "concatenate",
- "options": {}
- },
- {
- "id": "calculateField",
- "options": {
- "mode": "reduceRow",
- "reduce": {
- "include": [],
- "reducer": "sum"
- }
- }
- },
- {
- "id": "organize",
- "options": {
- "excludeByName": {
- "count_ 1": true,
- "count_ 2": true,
- "count_ 3": true,
- "count_ 4": true,
- "count_ 5": true
- },
- "indexByName": {},
- "renameByName": {}
- }
- }
- ],
- "type": "stat"
- },
- {
- "datasource": "${DS_AZURE_MONITOR}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "blue",
- "mode": "fixed"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 5,
- "w": 2,
- "x": 4,
- "y": 0
- },
- "id": 8,
- "options": {
- "colorMode": "value",
- "graphMode": "none",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": ["lastNotNull"],
- "fields": "",
- "values": false
- },
- "text": {},
- "textMode": "auto"
- },
- "pluginVersion": "8.3.0-pre",
- "targets": [
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "resources\r\n| where type == \"microsoft.alertsmanagement/actionrules\"\r\n| parse properties.scope with * 'components/' targetResource '\"' *\r\n| where subscriptionId == \"$sub\" and resourceGroup in ($rg)\r\n| summarize count()",
- "resultFormat": "table"
- },
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "A",
- "subscription": "",
- "subscriptions": ["$sub"]
- }
- ],
- "title": "Action rules",
- "type": "stat"
- },
- {
- "datasource": "${DS_AZURE_MONITOR}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "fixedColor": "blue",
- "mode": "fixed"
- },
- "custom": {
- "align": "left",
- "displayMode": "auto",
- "filterable": true
- },
- "mappings": [],
- "noValue": "0",
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "properties_essentials_severity"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Severity"
- },
- {
- "id": "mappings",
- "value": [
- {
- "options": {
- "Sev0": {
- "color": "red",
- "index": 0,
- "text": "0 - Critical"
- },
- "Sev1": {
- "color": "orange",
- "index": 1,
- "text": "1 - Error"
- },
- "Sev2": {
- "color": "yellow",
- "index": 2,
- "text": "2 - Warning"
- },
- "Sev3": {
- "color": "blue",
- "index": 3,
- "text": "3 - Informational"
- },
- "Sev4": {
- "color": "purple",
- "index": 4,
- "text": "4 - Verbose"
- }
- },
- "type": "value"
- }
- ]
- },
- {
- "id": "custom.displayMode",
- "value": "color-text"
- },
- {
- "id": "links",
- "value": [
- {
- "targetBlank": true,
- "title": "",
- "url": "d/5DLst5N7k/alert-consumption?${sub:queryparam}&${rg:queryparam}&${__url_time_range}&var-mc=Fired&var-mc=Resolved&var-as=New&var-as=Acknowledged&var-as=Closed&var-sev=${__data.fields.properties_essentials_severity}&${__url_time_range}"
- }
- ]
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "total"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Total alerts"
- },
- {
- "id": "custom.displayMode",
- "value": "basic"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "mcFired"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Fired"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "orange",
- "mode": "fixed"
- }
- },
- {
- "id": "custom.displayMode",
- "value": "gradient-gauge"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "mcResolved"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Resolved"
- },
- {
- "id": "color",
- "value": {
- "fixedColor": "green",
- "mode": "fixed"
- }
- },
- {
- "id": "custom.displayMode",
- "value": "basic"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "asNew"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "New"
- },
- {
- "id": "custom.displayMode",
- "value": "color-text"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "asAcknowledged"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Acknowledged"
- },
- {
- "id": "custom.displayMode",
- "value": "color-text"
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "asClosed"
- },
- "properties": [
- {
- "id": "displayName",
- "value": "Closed"
- },
- {
- "id": "custom.displayMode",
- "value": "color-text"
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 9,
- "w": 24,
- "x": 0,
- "y": 5
- },
- "id": 2,
- "options": {
- "footer": {
- "fields": "",
- "reducer": ["sum"],
- "show": false
- },
- "showHeader": true,
- "sortBy": [
- {
- "desc": false,
- "displayName": "Severity"
- }
- ]
- },
- "pluginVersion": "8.3.0-pre",
- "targets": [
- {
- "appInsights": {
- "dimension": [],
- "metricName": "select",
- "timeGrain": "auto"
- },
- "azureLogAnalytics": {
- "query": "//change this example to create your own time series query\n //the table to query (e.g. Usage, Heartbeat, Perf)\n| where $__timeFilter(TimeGenerated) //this is a macro used to show the full chart’s time range, choose the datetime column here\n| summarize count() by , bin(TimeGenerated, $__interval) //change “group by column” to a column in your table, such as “Computer”. The $__interval macro is used to auto-select the time grain. Can also use 1h, 5m etc.\n| order by TimeGenerated asc",
- "resultFormat": "time_series"
- },
- "azureMonitor": {
- "aggOptions": [],
- "dimensionFilter": "*",
- "dimensionFilters": [],
- "timeGrain": "auto",
- "timeGrains": [],
- "top": "10"
- },
- "azureResourceGraph": {
- "query": "alertsmanagementresources\r\n| where type == \"microsoft.alertsmanagement/alerts\"\r\n| where todatetime(properties.essentials.lastModifiedDateTime) >= $__timeFrom and todatetime(properties.essentials.lastModifiedDateTime) <= $__timeTo\r\n| where subscriptionId == \"$sub\" and properties.essentials.targetResourceGroup in ($rg)\r\n| summarize total = count(),\r\n mcFired = countif(properties.essentials.monitorCondition == \"Fired\"),\r\n mcResolved = countif(properties.essentials.monitorCondition == \"Resolved\"),\r\n asNew = countif(properties.essentials.alertState == \"New\"),\r\n asAcknowledged = countif(properties.essentials.alertState == \"Acknowledged\"),\r\n asClosed = countif(properties.essentials.alertState == \"Closed\")\r\nby tostring(properties.essentials.severity)",
- "resultFormat": "table"
- },
- "insightsAnalytics": {
- "query": "",
- "resultFormat": "time_series"
- },
- "queryType": "Azure Resource Graph",
- "refId": "A",
- "subscription": "",
- "subscriptions": ["$sub"]
- }
- ],
- "title": "Alerts by Severity",
- "transformations": [],
- "transparent": true,
- "type": "table"
- }
- ],
- "schemaVersion": 31,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "allValue": null,
- "current": {},
- "datasource": "${DS_AZURE_MONITOR}",
- "definition": "Subscriptions()",
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": "Subscription",
- "multi": false,
- "name": "sub",
- "options": [],
- "query": "Subscriptions()",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "type": "query"
- },
- {
- "allValue": null,
- "current": {},
- "datasource": "${DS_AZURE_MONITOR}",
- "definition": "ResourceGroups($sub)",
- "description": null,
- "error": null,
- "hide": 0,
- "includeAll": false,
- "label": "Resource Group",
- "multi": true,
- "name": "rg",
- "options": [],
- "query": "ResourceGroups($sub)",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "type": "query"
- }
- ]
- },
- "time": {
- "from": "now-30d",
- "to": "now"
- },
- "timepicker": {},
- "timezone": "",
- "title": "Azure Alert Consumption At Scale",
- "uid": "hcsp8ND7k",
- "version": 1
-}
diff --git a/public/app/plugins/datasource/grafana-azure-monitor-datasource/plugin.json b/public/app/plugins/datasource/grafana-azure-monitor-datasource/plugin.json
index 7cbc379357a..3d72389b2c2 100644
--- a/public/app/plugins/datasource/grafana-azure-monitor-datasource/plugin.json
+++ b/public/app/plugins/datasource/grafana-azure-monitor-datasource/plugin.json
@@ -11,8 +11,6 @@
{ "type": "dashboard", "name": "Azure Data Explorer Insights", "path": "dashboards/adx.json" },
{ "type": "dashboard", "name": "Azure Resource Overview", "path": "dashboards/arg.json" },
{ "type": "dashboard", "name": "Azure Alert Consumption", "path": "dashboards/v1Alerts.json" },
- { "type": "dashboard", "name": "Azure Alert Rules", "path": "dashboards/alertRules.json" },
- { "type": "dashboard", "name": "Azure Alert Consumption Overview", "path": "dashboards/v1AlertsAtScale.json" },
{
"type": "dashboard",
"name": "Azure App Monitoring - Application Insights",