{ "__inputs": [], "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "10.0.3" }, { "type": "datasource", "id": "grafana-azure-monitor-datasource", "name": "Azure Monitor", "version": "1.0.0" }, { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, { "type": "panel", "id": "table", "name": "Table", "version": "" }, { "type": "panel", "id": "text", "name": "Text", "version": "" }, { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- 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": "The dashboard provides insights of operation failures through Application Insights.", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [ { "asDropdown": true, "icon": "external link", "includeVars": true, "keepTime": true, "tags": ["Azure-AppInsights-Failures"], "targetBlank": true, "title": "Azure Application Insights Failures", "tooltip": "", "type": "dashboards", "url": "" } ], "liveNow": false, "panels": [ { "datasource": { "type": "datasource", "uid": "grafana" }, "gridPos": { "h": 2, "w": 24, "x": 0, "y": 0 }, "id": 87, "options": { "code": { "language": "plaintext", "showLineNumbers": false, "showMiniMap": false }, "content": "# Failures - Operations", "mode": "markdown" }, "pluginVersion": "10.0.3", "transparent": true, "type": "text" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 2 }, "id": 68, "panels": [], "title": "Application Insights - Failures", "type": "row" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "fixed" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", "fillOpacity": 64, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "users/count_unique" }, "properties": [ { "id": "displayName", "value": "Users (Unique)" } ] }, { "matcher": { "id": "byName", "options": "sessions/count_unique" }, "properties": [ { "id": "displayName", "value": "Sessions (Unique)" }, { "id": "color", "value": { "fixedColor": "purple", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Max" }, "properties": [ { "id": "color", "value": { "fixedColor": "semi-dark-orange", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "failedCount" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "FailedCount" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 10, "w": 13, "x": 0, "y": 3 }, "id": 69, "interval": "60s", "links": [ { "targetBlank": true, "title": "${res} | Users", "url": "https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/${sub}/resourceGroups/${rg}/providers/microsoft.insights/components/${res}/segmentationUsers" } ], "maxDataPoints": 150, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "azureLogAnalytics": { "query": "\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where \"All\" in ($operation_name) or operation_Name in ($operation_name)\n| where \"All\" in ($result_code) or resultCode in ($result_code)\n| summarize FailedCount=sumif(itemCount, success == false) by bin(timestamp, $__interval)\n| order by timestamp asc\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "time_series" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Failed Requests (count)", "transformations": [], "type": "timeseries" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "description": "Click on a result code to filter this dashboard.", "fieldConfig": { "defaults": { "color": { "fixedColor": "dark-red", "mode": "fixed" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "links": [ { "targetBlank": false, "title": "Filter Result code", "url": "/d/Azure-AppInsights-Failures-Operations/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${operation_name:queryparam}&var-result_code=${__data.fields[\"Result Code\"]}" } ], "mappings": [], "min": 0, "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Count" }, "properties": [ { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge" } }, { "id": "custom.width", "value": 584 } ] }, { "matcher": { "id": "byName", "options": "Result Code" }, "properties": [ { "id": "custom.width", "value": 252 }, { "id": "links", "value": [ { "title": "Filter result code", "url": "/d/Azure-AppInsights-Failures-Operations/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&${operation_name:queryparam}&var-result_code=${__data.fields[\"Result Code\"]}" } ] } ] } ] }, "gridPos": { "h": 6, "w": 11, "x": 13, "y": 3 }, "id": 72, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true, "sortBy": [] }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| where success == false\n| where \"All\" in ($operation_name) or operation_Name in ($operation_name)\n| summarize Count=sum(itemCount) by [\"Result Code\"]=resultCode\n| top 5 by Count desc\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Top 5 response codes", "transformations": [], "type": "table" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "description": "Click on an type to open the exceptions dashboard.", "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "links": [], "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Count" }, "properties": [ { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge" } }, { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "type" }, "properties": [ { "id": "custom.width", "value": 257 }, { "id": "links", "value": [ { "targetBlank": true, "title": "Open Exceptions Dashboard", "url": "/d/Azure-AppInsights-Failures-Exceptions?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&var-exception_type=${__data.fields.type}" } ] } ] } ] }, "gridPos": { "h": 7, "w": 11, "x": 13, "y": 9 }, "id": 73, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true, "sortBy": [] }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "\nexceptions\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| summarize Count=sum(itemCount) by type\n| top 5 by Count desc\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Top 5 exception types", "transformations": [], "type": "table" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "dark-red", "mode": "fixed" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 22, "gradientMode": "hue", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 1, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "links": [], "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "sum_itemCount 404" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "sum_itemCount 500" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "ResultCode 404" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-orange", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 5, "w": 13, "x": 0, "y": 13 }, "id": 79, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "pluginVersion": "9.0.8.1", "targets": [ { "azureLogAnalytics": { "query": "\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where \"All\" in ($operation_name) or operation_Name in ($operation_name)\n| where \"All\" in ($result_code) or resultCode in ($result_code)\n| where client_Type != \"Browser\"\n| where success == false\n| summarize ResultCode = sum(itemCount) by resultCode, bin(timestamp, $__interval)\n| sort by timestamp asc\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "time_series" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Response codes (count)", "transformations": [], "type": "timeseries" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "links": [], "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Count" }, "properties": [ { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge" } }, { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } }, { "id": "links" } ] }, { "matcher": { "id": "byName", "options": "type" }, "properties": [ { "id": "custom.width", "value": 264 }, { "id": "links", "value": [ { "targetBlank": true, "title": "Open Dependencies Dashboard", "url": "/d/Azure-AppInsights-Failures-Dependencies/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}" } ] } ] } ] }, "gridPos": { "h": 8, "w": 11, "x": 13, "y": 16 }, "id": 74, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true, "sortBy": [] }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "\ndependencies\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| where success == false\n| summarize Count=sum(itemCount) by type\n| top 5 by Count desc\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Top 5 failed dependencies", "transformations": [], "type": "table" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "fixed" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", "fillOpacity": 62, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "users/count_unique" }, "properties": [ { "id": "displayName", "value": "Users (Unique)" } ] }, { "matcher": { "id": "byName", "options": "sessions/count_unique" }, "properties": [ { "id": "displayName", "value": "Sessions (Unique)" }, { "id": "color", "value": { "fixedColor": "purple", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Max" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-blue", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 6, "w": 13, "x": 0, "y": 18 }, "id": 70, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "azureLogAnalytics": { "query": "\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\"\n| where \"All\" in ($operation_name) or operation_Name in ($operation_name)\n| where \"All\" in ($result_code) or resultCode in ($result_code)\n// calculate average request duration for all requests\n| summarize Count = count() by bin(timestamp, $__interval)\n| order by timestamp asc\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "time_series" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Server Requests (count)", "transformations": [], "type": "timeseries" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "dark-red", "mode": "fixed" }, "links": [ { "title": "Reset to All Operations and All Result codes", "url": "/d/Azure-AppInsights-Failures-Operations/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&var-result_code=All${result_code:queryparam}&var-operation_name=All" } ], "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 3, "w": 8, "x": 0, "y": 24 }, "id": 78, "interval": "60s", "links": [ { "title": "Reset to All Operation Names and All Result codes", "url": "/d/Azure-AppInsights-Failures-Operations/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&var-result_code=All${result_code:queryparam}&var-operation_name=All" } ], "maxDataPoints": 150, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where \"All\" in ($result_code) or resultCode in ($result_code)\n| where client_Type != \"Browser\"\n| summarize failedCount=sumif(itemCount, success == false)\n\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "All Failed Operations (Count) matching Result code $result_code", "transformations": [], "type": "stat" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "dark-red", "mode": "fixed" }, "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "dark-red", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "failedCount" }, "properties": [ { "id": "links" } ] } ] }, "gridPos": { "h": 3, "w": 8, "x": 8, "y": 24 }, "id": 86, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "requests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where \"All\" in ($result_code) or resultCode in ($result_code)\n| where client_Type != \"Browser\"\n| where \"All\" in ($operation_name) or operation_Name in ($operation_name)\n| summarize failedCount=sumif(itemCount, success == false)\n\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Number of failed transactions matching $operation_name", "transformations": [], "type": "stat" }, { "datasource": { "uid": "${ds}", "type": "grafana-azure-monitor-datasource" }, "description": "Click on the Operation name to filter dashboard.", "fieldConfig": { "defaults": { "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "color": { "fixedColor": "green", "mode": "thresholds" }, "links": [ { "title": "View transactions with Operation name", "url": "/explore?left={\"datasource\":\"${ds:raw}\",\"queries\":[{\"refId\":\"A\",\"datasource\":\"${ds:raw}\",\"queryType\":\"Azure Traces\",\"azureTraces\":{\"resultFormat\":\"table\",\"resources\":[\"/subscriptions/${sub}/resourceGroups/${rg}/providers/Microsoft.Insights/components/${res}\"],\"filters\":[{\"property\":\"operation_Name\",\"filters\":[\"${__data.fields.operation_Name}\"],\"operation\":\"eq\"}],\"traceTypes\": [\"requests\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}" } ], "noValue": "--" }, "overrides": [ { "matcher": { "id": "byName", "options": "Failed count" }, "properties": [ { "id": "custom.cellOptions", "value": { "mode": "lcd", "type": "gauge" } }, { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } }, { "id": "links", "value": [ { "targetBlank": true, "title": "View transactions with Operation Name", "url": "/explore?left={\"datasource\":\"${ds:raw}\",\"queries\":[{\"refId\":\"A\",\"datasource\":\"${ds:raw}\",\"queryType\":\"Azure Traces\",\"azureTraces\":{\"resultFormat\":\"table\",\"resources\":[\"/subscriptions/${sub}/resourceGroups/${rg}/providers/Microsoft.Insights/components/${res}\"],\"filters\":[{\"property\":\"operation_Name\",\"filters\":[\"${__data.fields[\"Operation name\"]}\"],\"operation\":\"eq\"}, {\"property\":\"resultCode\",\"filters\":[${result_code:doublequote}],\"operation\":\"eq\"}],\"traceTypes\": [\"requests\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}" } ] } ] }, { "matcher": { "id": "byName", "options": "Total count" }, "properties": [ { "id": "custom.cellOptions", "value": { "mode": "lcd", "type": "gauge" } }, { "id": "color", "value": { "fixedColor": "text", "mode": "fixed" } }, { "id": "links", "value": [ { "targetBlank": true, "title": "View transactions with Operation name", "url": "/explore?left={\"datasource\":\"${ds:raw}\",\"queries\":[{\"refId\":\"A\",\"datasource\":\"${ds:raw}\",\"queryType\":\"Azure Traces\",\"azureTraces\":{\"resultFormat\":\"table\",\"resources\":[\"/subscriptions/${sub}/resourceGroups/${rg}/providers/Microsoft.Insights/components/${res}\"],\"filters\":[{\"property\":\"operation_Name\",\"filters\":[\"${__data.fields[\"Operation name\"]}\"],\"operation\":\"eq\"}, {\"property\":\"resultCode\",\"filters\":[${result_code:doublequote}],\"operation\":\"eq\"}],\"traceTypes\": [\"requests\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}" } ] } ] }, { "matcher": { "id": "byName", "options": "Operation name" }, "properties": [ { "id": "custom.width", "value": 184 } ] }, { "matcher": { "id": "byName", "options": "Impacted users" }, "properties": [ { "id": "custom.width", "value": 130 }, { "id": "links" } ] }, { "matcher": { "id": "byName", "options": "Operation name" }, "properties": [ { "id": "links", "value": [ { "title": "Filter dashboard to this failing operation", "url": "/d/Azure-AppInsights-Failures-Operations/?${ds:queryparam}&${sub:queryparam}&${rg:queryparam}&${ns:queryparam}&${res:queryparam}&var-operation_name=${__data.fields[\"Operation name\"]}&${result_code:queryparam}" } ] } ] } ] }, "gridPos": { "h": 13, "w": 8, "x": 0, "y": 27 }, "id": 71, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "showHeader": true, "cellHeight": "sm", "footer": { "show": false, "reducer": ["sum"], "countRows": false, "fields": "" }, "sortBy": [ { "desc": true, "displayName": "failedCount" } ] }, "pluginVersion": "10.2.0-pre", "targets": [ { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "azureLogAnalytics": { "query": "let dataset =\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where client_Type != \"Browser\";\ndataset\n| summarize\n [\"Failed count\"]=sumif(itemCount, success == 'False' and (\"All\" in ($result_code) or resultCode in ($result_code))),\n [\"Impacted users\"]=dcountif(user_Id, success == 'False' and (\"All\" in ($result_code) or resultCode in ($result_code))),\n [\"Total count\"]=sum(itemCount)\n| project [\"Operation name\"]=\"All\", [\"Failed count\"], [\"Impacted users\"], [\"Total count\"]\n| union (dataset| summarize\n [\"Failed count\"]=sumif(itemCount, success == 'False' and (\"All\" in ($result_code) or resultCode in ($result_code))),\n [\"Impacted users\"]=dcountif(user_Id, success == 'False' and (\"All\" in ($result_code) or resultCode in ($result_code))),\n [\"Total count\"]=sum(itemCount)\n by [\"Operation name\"]=operation_Name\n| where [\"Failed count\"] > 0\n| top 10 by [\"Failed count\"] desc)\n\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table", "dashboardTime": false }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Top 10 Failed Operation Name List", "transformations": [], "type": "table" }, { "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "description": "Click on the OperationID or Name to view trace details in explorer.", "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "noValue": "--", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Response Time" }, "properties": [ { "id": "custom.cellOptions", "value": { "mode": "basic", "type": "gauge" } }, { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } }, { "id": "links" } ] }, { "matcher": { "id": "byName", "options": "Name" }, "properties": [ { "id": "custom.width", "value": 173 }, { "id": "links", "value": [ { "targetBlank": true, "title": "Open explorer with this name", "url": "/explore?left={\"datasource\":\"${ds:raw}\",\"queries\":[{\"refId\":\"A\",\"datasource\":\"${ds:raw}\",\"queryType\":\"Azure Traces\",\"azureTraces\":{\"resultFormat\":\"table\",\"resources\":[\"/subscriptions/${sub}/resourceGroups/${rg}/providers/Microsoft.Insights/components/${res}\"],\"filters\":[{\"property\":\"operation_Name\",\"filters\":[\"${__data.fields.Name}\"],\"operation\":\"eq\"}, {\"property\":\"resultCode\",\"filters\":[${result_code:doublequote}],\"operation\":\"eq\"}],\"traceTypes\": [\"requests\"]}}],\"range\":{\"from\": \"${__from}\", \"to\":\"${__to}\" }}" } ] } ] }, { "matcher": { "id": "byName", "options": "Response Code" }, "properties": [ { "id": "mappings", "value": [ { "options": { "200": { "color": "dark-green", "index": 0 } }, "type": "value" }, { "options": { "from": 201, "result": { "color": "dark-orange", "index": 1 }, "to": 399 }, "type": "range" }, { "options": { "from": 400, "result": { "color": "dark-red", "index": 2 }, "to": 999 }, "type": "range" } ] }, { "id": "links" }, { "id": "custom.width", "value": 211 }, { "id": "custom.cellOptions", "value": { "type": "color-text" } } ] }, { "matcher": { "id": "byName", "options": "OperationID" }, "properties": [ { "id": "links", "value": [ { "targetBlank": true, "title": "Show Trace Details", "url": "/explore?left={\r\n\t\"datasource\": \"${ds}\",\r\n\t\"queries\": [{\r\n\t\t\"azureTraces\": {\r\n\r\n\t\t\t\"operationId\": \"${__data.fields.OperationID}\",\r\n\r\n\t\t\t\"resources\": [\"/subscriptions/${sub}/resourceGroups/${rg}/providers/${ns}/${res}\"],\r\r\n\r\n\t\t\t\"resultFormat\": \"trace\"\r\n\r\n\r\n\r\n\r\n\t\t},\r\n\t\t\"datasource\": \"${ds}\",\r\n\t\t\"refId\": \"A\",\r\n\r\n\t\t\"queryType\": \"Azure Traces\"\r\n\t}],\r\n\t\"range\": {\r\n\t\t\"from\": \"${__from}\",\r\n\t\t\"to\": \"${__to}\"\r\n\t}\r\n}" } ] } ] }, { "matcher": { "id": "byName", "options": "Score" }, "properties": [ { "id": "custom.hidden", "value": true } ] } ] }, "gridPos": { "h": 13, "w": 16, "x": 8, "y": 27 }, "id": 75, "interval": "60s", "links": [], "maxDataPoints": 150, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false }, "showHeader": true, "sortBy": [] }, "pluginVersion": "10.0.3", "targets": [ { "azureLogAnalytics": { "query": "let min_length_8 = (s: string) {\n let len = strlen(s);\n case(len == 1, strcat(s, s, s, s, s, s, s, s),\n len == 2 or len == 3, strcat(s, s, s, s),\n len == 4 or len == 5 or len == 6 or len == 7, strcat(s, s),\n s)\n};\nlet ai_hash = (s: string) {\n abs(toint(__hash_djb2(min_length_8(s))))\n};\n\nrequests\n// additional filters can be applied here\n| where $__timeFilter(timestamp)\n| where \"All\" in ($operation_name) or operation_Name in ($operation_name)\n| where \"All\" in ($result_code) or resultCode in ($result_code)\n| where success == 'False'\n| project Name = operation_Name, [\"Response Code\"] = resultCode, [\"Response Time\"] = duration, OperationID = operation_Id, Score=ai_hash(operation_Id)\n| top 20 by Score asc\n\n\n", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"], "resultFormat": "table" }, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub", "subscriptions": [] } ], "title": "Top 20 Sample Failed Operations matching $operation_name by relevance", "transformations": [], "type": "table" } ], "refresh": "", "revision": 1, "schemaVersion": 38, "style": "dark", "tags": ["Azure-AppInsights-Failures"], "templating": { "list": [ { "current": { "selected": false, "text": "Azure Monitor", "value": "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": "", "hide": 0, "includeAll": false, "label": "Subscription", "multi": false, "name": "sub", "options": [], "query": { "grafanaTemplateVariableFn": { "kind": "SubscriptionsQuery", "rawQuery": "Subscriptions()" }, "queryType": "Azure Subscriptions", "refId": "A" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 0, "includeAll": false, "label": "Resource Group", "multi": false, "name": "rg", "options": [], "query": { "grafanaTemplateVariableFn": { "kind": "ResourceGroupsQuery", "rawQuery": "ResourceGroups($sub)", "subscription": "$sub" }, "queryType": "Azure Resource Groups", "refId": "A", "subscription": "$sub" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 2, "includeAll": false, "label": "Namespace", "multi": false, "name": "ns", "options": [], "query": { "grafanaTemplateVariableFn": { "kind": "MetricNamespaceQuery", "rawQuery": "Namespaces($sub, $rg)", "resourceGroup": "$rg", "subscription": "$sub" }, "queryType": "Azure Namespaces", "refId": "A", "resourceGroup": "$rg", "subscription": "$sub" }, "refresh": 1, "regex": "([mM](icrosoft)\\.[iI](nsights)/(components))", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "ResourceNames($sub, $rg, $ns)", "hide": 0, "includeAll": false, "label": "Resource", "multi": false, "name": "res", "options": [], "query": "ResourceNames($sub, $rg, $ns)", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "allValue": "\"All\"", "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 0, "includeAll": true, "label": "Result Code", "multi": true, "name": "result_code", "options": [], "query": { "azureLogAnalytics": { "query": "requests\r\n// additional filters can be applied here\r\n| where $__timeFilter(timestamp)\r\n| where client_Type != \"Browser\"\r\n| where success == false\r\n| summarize Count=sum(itemCount) by resultCode\r\n| sort by Count desc", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"] }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "allValue": "\"All\"", "current": {}, "datasource": { "type": "grafana-azure-monitor-datasource", "uid": "${ds}" }, "definition": "", "hide": 0, "includeAll": true, "label": "Operation Names", "multi": true, "name": "operation_name", "options": [], "query": { "azureLogAnalytics": { "query": "requests\r\n// additional filters can be applied here\r\n| where $__timeFilter(timestamp)\r\n| where client_Type != \"Browser\"\r\n| where \"All\" in ($result_code) or resultCode in ($result_code)\r\n| summarize count=sumif(itemCount, success == false) by operation_Name", "resource": "/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res", "resources": ["/subscriptions/$sub/resourceGroups/$rg/providers/$ns/$res"] }, "queryType": "Azure Log Analytics", "refId": "A", "subscription": "$sub" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "now-30m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Azure / Insights / Applications - Failures - 1. Operations", "uid": "Azure-AppInsights-Failures-Operations", "version": 127 }