forked from grafana.jool/grafana-jool
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.
573 lines
16 KiB
573 lines
16 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 alerts for the subscription and other filters selected",
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"gnetId": null,
|
|
"graphTooltip": 0,
|
|
"id": null,
|
|
"iteration": 1634314135767,
|
|
"links": [],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"datasource": "${DS_AZURE_MONITOR}",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "continuous-BlYlRd"
|
|
},
|
|
"custom": {
|
|
"align": "center",
|
|
"displayMode": "auto",
|
|
"filterable": true
|
|
},
|
|
"links": [],
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80.0002
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "properties_essentials_severity"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"options": {
|
|
"\"Sev0\"": {
|
|
"color": "red",
|
|
"index": 4,
|
|
"text": "0 - Critical"
|
|
},
|
|
"\"Sev1\"": {
|
|
"color": "orange",
|
|
"index": 3,
|
|
"text": "1 - Error"
|
|
},
|
|
"\"Sev2\"": {
|
|
"color": "yellow",
|
|
"index": 2,
|
|
"text": "2 - Warning"
|
|
},
|
|
"\"Sev3\"": {
|
|
"color": "blue",
|
|
"index": 1,
|
|
"text": "3 - Informational"
|
|
},
|
|
"\"Sev4\"": {
|
|
"color": "#8F3BB8",
|
|
"index": 0,
|
|
"text": "4 - Verbose"
|
|
}
|
|
},
|
|
"type": "value"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.displayMode",
|
|
"value": "color-background-solid"
|
|
},
|
|
{
|
|
"id": "displayName",
|
|
"value": "Severity"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "name"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "Name"
|
|
},
|
|
{
|
|
"id": "custom.displayMode",
|
|
"value": "color-text"
|
|
},
|
|
{
|
|
"id": "links",
|
|
"value": [
|
|
{
|
|
"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}"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "mappings",
|
|
"value": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "properties_essentials_monitorCondition"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "displayName",
|
|
"value": "Monitor condition"
|
|
},
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"options": {
|
|
"Fired": {
|
|
"color": "orange",
|
|
"index": 1
|
|
},
|
|
"Resolved": {
|
|
"color": "green",
|
|
"index": 0
|
|
}
|
|
},
|
|
"type": "value"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.displayMode",
|
|
"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
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 16,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 2,
|
|
"links": [],
|
|
"options": {
|
|
"footer": {
|
|
"fields": "",
|
|
"reducer": ["sum"],
|
|
"show": false
|
|
},
|
|
"frameIndex": 0,
|
|
"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": "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",
|
|
"resultFormat": "table"
|
|
},
|
|
"insightsAnalytics": {
|
|
"query": "",
|
|
"resultFormat": "time_series"
|
|
},
|
|
"queryType": "Azure Resource Graph",
|
|
"refId": "A",
|
|
"subscription": "",
|
|
"subscriptions": []
|
|
}
|
|
],
|
|
"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": {
|
|
"excludeByName": {
|
|
"alertId": false
|
|
},
|
|
"indexByName": {},
|
|
"renameByName": {}
|
|
}
|
|
}
|
|
],
|
|
"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": false,
|
|
"text": ["Fired", "Resolved"],
|
|
"value": ["Fired", "Resolved"]
|
|
},
|
|
"description": null,
|
|
"error": null,
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"label": "Monitor Condition",
|
|
"multi": true,
|
|
"name": "mc",
|
|
"options": [
|
|
{
|
|
"selected": true,
|
|
"text": "Fired",
|
|
"value": "Fired"
|
|
},
|
|
{
|
|
"selected": true,
|
|
"text": "Resolved",
|
|
"value": "Resolved"
|
|
}
|
|
],
|
|
"query": "Fired, Resolved",
|
|
"queryValue": "",
|
|
"skipUrlSync": false,
|
|
"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",
|
|
"multi": true,
|
|
"name": "as",
|
|
"options": [
|
|
{
|
|
"selected": true,
|
|
"text": "New",
|
|
"value": "New"
|
|
},
|
|
{
|
|
"selected": true,
|
|
"text": "Acknowledged",
|
|
"value": "Acknowledged"
|
|
},
|
|
{
|
|
"selected": true,
|
|
"text": "Closed",
|
|
"value": "Closed"
|
|
}
|
|
],
|
|
"query": "New, Acknowledged, Closed",
|
|
"queryValue": "",
|
|
"skipUrlSync": false,
|
|
"type": "custom"
|
|
},
|
|
{
|
|
"allValue": null,
|
|
"current": {
|
|
"selected": false,
|
|
"text": ["1 - Error", "0 - Critical", "2 - Warning", "3 - Informational", "4 - Verbose"],
|
|
"value": ["Sev1", "Sev0", "Sev2", "Sev3", "Sev4"]
|
|
},
|
|
"description": null,
|
|
"error": null,
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"label": "Severity",
|
|
"multi": true,
|
|
"name": "sev",
|
|
"options": [
|
|
{
|
|
"selected": true,
|
|
"text": "0 - Critical",
|
|
"value": "Sev0"
|
|
},
|
|
{
|
|
"selected": true,
|
|
"text": "1 - Error",
|
|
"value": "Sev1"
|
|
},
|
|
{
|
|
"selected": true,
|
|
"text": "2 - Warning",
|
|
"value": "Sev2"
|
|
},
|
|
{
|
|
"selected": true,
|
|
"text": "3 - Informational",
|
|
"value": "Sev3"
|
|
},
|
|
{
|
|
"selected": true,
|
|
"text": "4 - Verbose",
|
|
"value": "Sev4"
|
|
}
|
|
],
|
|
"query": "0 - Critical : Sev0, 1 - Error : Sev1, 2 - Warning : Sev2, 3 - Informational : Sev3, 4 - Verbose : Sev4",
|
|
"queryValue": "",
|
|
"skipUrlSync": false,
|
|
"type": "custom"
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-30d",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {
|
|
"hidden": false,
|
|
"refresh_intervals": ["30m", "1h", "12h", "24h", "3d", "7d", "30d"]
|
|
},
|
|
"timezone": "",
|
|
"title": "Azure Alert Consumption",
|
|
"uid": "5DLst5N7k",
|
|
"version": 1
|
|
}
|
|
|