You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
425 lines
14 KiB
425 lines
14 KiB
{
|
|
"__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<table name> //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 <group by column>, 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<table name> //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 <group by column>, 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<table name> //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 <group by column>, 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
|
|
}
|
|
|