{ "__inputs": [ { "name": "DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY", "label": "Managed_Prometheus_jamesnk-telemetry", "description": "", "type": "datasource", "pluginId": "prometheus", "pluginName": "Prometheus" } ], "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "9.4.8" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" }, { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, { "type": "panel", "id": "table", "name": "Table", "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": "ASP.NET Core metrics from OpenTelemetry NuGet", "editable": true, "fiscalYearStartMonth": 0, "gnetId": 17706, "graphTooltip": 0, "id": null, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "dark-green", "mode": "continuous-GrYlRd", "seriesBy": "max" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", "fillOpacity": 50, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "s" }, "overrides": [ { "__systemRef": "hideSeriesFrom", "matcher": { "id": "byNames", "options": { "mode": "exclude", "names": [ "p50" ], "prefix": "All except:", "readOnly": true } }, "properties": [ { "id": "custom.hideFrom", "value": { "legend": false, "tooltip": false, "viz": false } } ] } ] }, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 0 }, "id": 40, "options": { "legend": { "calcs": [ "lastNotNull", "min", "max" ], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "histogram_quantile(0.50, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (le))", "legendFormat": "p50", "range": true, "refId": "p50" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "histogram_quantile(0.75, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (le))", "hide": false, "legendFormat": "p75", "range": true, "refId": "p75" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "histogram_quantile(0.90, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (le))", "hide": false, "legendFormat": "p90", "range": true, "refId": "p90" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "histogram_quantile(0.95, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (le))", "hide": false, "legendFormat": "p95", "range": true, "refId": "p95" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "histogram_quantile(0.98, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (le))", "hide": false, "legendFormat": "p98", "range": true, "refId": "p98" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "histogram_quantile(0.99, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (le))", "hide": false, "legendFormat": "p99", "range": true, "refId": "p99" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "histogram_quantile(0.999, sum(rate(http_server_request_duration_s_bucket{job=\"$job\", instance=\"$instance\"}[$__rate_interval])) by (le))", "hide": false, "legendFormat": "p99.9", "range": true, "refId": "p99.9" } ], "title": "Requests Duration", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic", "seriesBy": "max" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 50, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "percentunit" }, "overrides": [ { "matcher": { "id": "byName", "options": "All" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-orange", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "4XX" }, "properties": [ { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "5XX" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 0 }, "id": 47, "options": { "legend": { "calcs": [ "lastNotNull", "min", "max" ], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", status_code=~\"4..|5..\"}[$__rate_interval]) or vector(0)) / sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\"}[$__rate_interval]))", "legendFormat": "All", "range": true, "refId": "All" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", status_code=~\"4..\"}[$__rate_interval]) or vector(0)) / sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\"}[$__rate_interval]))", "hide": false, "legendFormat": "4XX", "range": true, "refId": "4XX" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", status_code=~\"5..\"}[$__rate_interval]) or vector(0)) / sum(rate(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\"}[$__rate_interval]))", "hide": false, "legendFormat": "5XX", "range": true, "refId": "5XX" } ], "title": "Errors Rate", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 0, "y": 9 }, "id": 49, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "sum(kestrel_current_connections{job=\"$job\", instance=\"$instance\"})", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Current Connections", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 6, "y": 9 }, "id": 55, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "sum(http_server_current_requests{job=\"$job\", instance=\"$instance\"})", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Current Requests", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "blue", "mode": "fixed" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 6, "x": 12, "y": 9 }, "id": 58, "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "value" }, "pluginVersion": "9.4.8", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "exemplar": false, "expr": "sum(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\"})", "instant": false, "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Total Requests", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "dark-red", "mode": "fixed" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 6, "x": 18, "y": 9 }, "id": 59, "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "center", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "text": {}, "textMode": "value" }, "pluginVersion": "9.4.8", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "exemplar": false, "expr": "sum(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", exception_name!=\"\"})", "instant": false, "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Total Unhandled Exceptions", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "fixedColor": "green", "mode": "fixed" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 6, "x": 12, "y": 13 }, "id": 60, "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "max" ], "fields": "", "values": false }, "textMode": "value_and_name" }, "pluginVersion": "9.4.8", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "sum by (scheme) (\r\n max_over_time(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\"}[$__rate_interval])\r\n )", "legendFormat": "{{scheme}}", "range": true, "refId": "A" } ], "title": "Requests Secured", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "fixedColor": "purple", "mode": "fixed" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 4, "w": 6, "x": 18, "y": 13 }, "id": 42, "options": { "colorMode": "background", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "max" ], "fields": "", "values": false }, "textMode": "value_and_name" }, "pluginVersion": "9.4.8", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "expr": "sum by (protocol) (\r\n max_over_time(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\"}[$__rate_interval])\r\n )", "legendFormat": "{{protocol}}", "range": true, "refId": "A" } ], "title": "Requests HTTP Protocol", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Requests" }, "properties": [ { "id": "custom.width", "value": 300 }, { "id": "custom.cellOptions", "value": { "mode": "gradient", "type": "gauge" } }, { "id": "color", "value": { "mode": "continuous-BlPu" } } ] }, { "matcher": { "id": "byName", "options": "Endpoint" }, "properties": [ { "id": "links", "value": [ { "targetBlank": false, "title": "Test", "url": "/d/NagEsjE4z/asp-net-core-endpoint-details?var-route=${__data.fields.route}&var-method=${__data.fields.method}&${__url_time_range}" } ] } ] }, { "matcher": { "id": "byName", "options": "route" }, "properties": [ { "id": "custom.hidden", "value": true } ] }, { "matcher": { "id": "byName", "options": "method" }, "properties": [ { "id": "custom.hidden", "value": true } ] } ] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 17 }, "hideTimeOverride": false, "id": 51, "options": { "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true, "sortBy": [ { "desc": true, "displayName": "Value" } ] }, "pluginVersion": "9.4.8", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "exemplar": false, "expr": " topk(10,\r\n sum by (route, method, method_route) (\r\n label_join(max_over_time(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route!=\"\"}[$__rate_interval]), \"method_route\", \" \", \"method\", \"route\")\r\n ))", "format": "table", "instant": true, "interval": "", "legendFormat": "{{route}}", "range": false, "refId": "A" } ], "title": "Top 10 Requested Endpoints", "transformations": [ { "id": "organize", "options": { "excludeByName": { "Time": true, "method": false, "route": false }, "indexByName": { "Time": 0, "Value": 4, "method": 2, "method_route": 3, "route": 1 }, "renameByName": { "Value": "Requests", "method": "", "method_route": "Endpoint", "route": "" } } } ], "type": "table" }, { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Requests" }, "properties": [ { "id": "custom.width", "value": 300 }, { "id": "custom.cellOptions", "value": { "mode": "gradient", "type": "gauge" } }, { "id": "color", "value": { "mode": "continuous-YlRd" } } ] }, { "matcher": { "id": "byName", "options": "Endpoint" }, "properties": [ { "id": "links", "value": [ { "title": "", "url": "/d/NagEsjE4z/asp-net-core-endpoint-details?var-route=${__data.fields.route}&var-method=${__data.fields.method}&${__url_time_range}" } ] } ] }, { "matcher": { "id": "byName", "options": "route" }, "properties": [ { "id": "custom.hidden", "value": true } ] }, { "matcher": { "id": "byName", "options": "method" }, "properties": [ { "id": "custom.hidden", "value": true } ] } ] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 17 }, "hideTimeOverride": false, "id": 54, "options": { "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true, "sortBy": [ { "desc": true, "displayName": "Value" } ] }, "pluginVersion": "9.4.8", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "editorMode": "code", "exemplar": false, "expr": " topk(10,\r\n sum by (route, method, method_route) (\r\n label_join(max_over_time(http_server_request_duration_s_count{job=\"$job\", instance=\"$instance\", route!=\"\", exception_name!=\"\"}[$__rate_interval]), \"method_route\", \" \", \"method\", \"route\")\r\n ))", "format": "table", "instant": true, "interval": "", "legendFormat": "{{route}}", "range": false, "refId": "A" } ], "title": "Top 10 Unhandled Exception Endpoints", "transformations": [ { "id": "organize", "options": { "excludeByName": { "Time": true, "method": false }, "indexByName": { "Time": 0, "Value": 4, "method": 2, "method_route": 3, "route": 1 }, "renameByName": { "Value": "Requests", "method": "", "method_route": "Endpoint", "route": "" } } } ], "type": "table" } ], "refresh": "", "revision": 1, "schemaVersion": 38, "style": "dark", "tags": [ "dotnet", "prometheus", "aspnetcore" ], "templating": { "list": [ { "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "definition": "label_values(http_server_current_requests, job)", "hide": 0, "includeAll": false, "label": "Job", "multi": false, "name": "job", "options": [], "query": { "query": "label_values(http_server_current_requests, job)", "refId": "StandardVariableQuery" }, "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 1, "type": "query" }, { "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_MANAGED_PROMETHEUS_JAMESNK-TELEMETRY}" }, "definition": "label_values(http_server_current_requests{job=~\"$job\"}, instance)", "hide": 0, "includeAll": false, "label": "Instance", "multi": false, "name": "instance", "options": [], "query": { "query": "label_values(http_server_current_requests{job=~\"$job\"}, instance)", "refId": "StandardVariableQuery" }, "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 1, "type": "query" } ] }, "time": { "from": "now-30m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "ASP.NET Core", "uid": "KdDACDp4z", "version": 5, "weekStart": "" }