From b1510e10a320843edb15b7253aed765d5a8b663f Mon Sep 17 00:00:00 2001 From: David Martin Date: Wed, 10 Apr 2024 17:16:11 +0100 Subject: [PATCH] Add a repeating row with more compact panels also: - consistent colours for success/error/% - text box at top to explain dashboard & row repeating - %ile color gradient --- examples/dashboards/app_developer.json | 1859 ++++++++---------------- 1 file changed, 581 insertions(+), 1278 deletions(-) diff --git a/examples/dashboards/app_developer.json b/examples/dashboards/app_developer.json index 50d27b8ad..68c8455dd 100644 --- a/examples/dashboards/app_developer.json +++ b/examples/dashboards/app_developer.json @@ -25,23 +25,45 @@ "editable": true, "fiscalYearStartMonth": 0, "gnetId": 7630, - "graphTooltip": 0, + "graphTooltip": 1, "id": 33, - "iteration": 1712678750650, + "iteration": 1712855114774, "links": [], "liveNow": false, "panels": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "description": "", + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 153, + "options": { + "content": "The row of panels below is repeated for each HTTPRoute resource in your cluster.\nThey provide real-time & historical insights into the performance and health of each API.\nMetrics displayed include request rates, success/error breakdown, and latency percentiles, giving a snapshot of API efficiency and reliability.\nUse this dashboard to monitor traffic patterns, identify potential issues, and ensure optimal performance of your services.\n\n*Important: HTTPRoutes must include a \"service\" label with a value that matches the name of the service being routed to. eg. \"service=myapp\"*", + "mode": "markdown" + }, + "pluginVersion": "8.5.5", + "title": "Overview of API/HTTPRoute Metrics", + "type": "text" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 0 + "y": 5 }, - "id": 133, + "id": 141, "panels": [], - "title": "API Error Request", + "repeat": "api", + "title": "\"$api\" API - Requests, latency and errors", "type": "row" }, { @@ -49,7 +71,7 @@ "type": "prometheus", "uid": "${datasource}" }, - "description": "List of current error requests API is encountering ", + "description": "Hostname: \"Domain name for the API server.\" | API Namespace: \"Kubernetes namespace where the API is deployed.\" | Gateway name: \"Name of the Gateway API gateway the HTTPRoute is targeting\" | Gateway name: \"Name of the Gateway API gateway namespace\"\n", "fieldConfig": { "defaults": { "color": { @@ -57,8 +79,7 @@ }, "custom": { "align": "center", - "displayMode": "color-text", - "filterable": false, + "displayMode": "auto", "inspect": false }, "mappings": [], @@ -66,306 +87,21 @@ "mode": "absolute", "steps": [ { - "color": "red", + "color": "green", "value": null } ] } }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Value #A" - }, - "properties": [ - { - "id": "displayName", - "value": "Current Error Request Rate" - }, - { - "id": "unit", - "value": "reqps" - }, - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #B" - }, - "properties": [ - { - "id": "displayName", - "value": "Increase/Decrease" - }, - { - "id": "unit", - "value": "reqps" - }, - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #C" - }, - "properties": [ - { - "id": "displayName", - "value": "Total Unsuccessful Requests" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #D" - }, - "properties": [ - { - "id": "displayName", - "value": "Cur. Error Rate" - }, - { - "id": "unit", - "value": "reqps" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 0.01 - } - ] - } - }, - { - "id": "noValue", - "value": "0" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #E" - }, - "properties": [ - { - "id": "displayName", - "value": "Cur. 4xx Rate" - }, - { - "id": "unit", - "value": "reqps" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "0" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #F" - }, - "properties": [ - { - "id": "displayName", - "value": "Cur. 5xx Rate" - }, - { - "id": "unit", - "value": "reqps" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "0" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #G" - }, - "properties": [ - { - "id": "displayName", - "value": "Total Errors" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "noValue", - "value": "0" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #H" - }, - "properties": [ - { - "id": "displayName", - "value": "Cur. Error Rate %" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "0" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #I" - }, - "properties": [ - { - "id": "displayName", - "value": "Cur. 4xx Rate %" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "0" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #J" - }, - "properties": [ - { - "id": "displayName", - "value": "Cur. 5xx Rate %" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "0" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Value #K" - }, - "properties": [ - { - "id": "displayName", - "value": "Total Errors %" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 0.01 - } - ] - } - }, - { - "id": "noValue", - "value": "0" - } - ] - } - ] + "overrides": [] }, "gridPos": { - "h": 6, + "h": 2, "w": 24, "x": 0, - "y": 1 + "y": 6 }, - "id": 127, + "id": 97, "options": { "footer": { "fields": "", @@ -374,13 +110,7 @@ ], "show": false }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Total Unsuccessful Requests" - } - ] + "showHeader": true }, "pluginVersion": "8.5.5", "targets": [ @@ -391,82 +121,13 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(rate(istio_requests_total{response_code=~\"5.*\", destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(sum(rate(istio_requests_total{response_code=~\"5.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "J" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(rate(istio_requests_total{response_code=~\"4.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "(sum(rate(istio_requests_total{response_code=~\"4.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "I" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(rate(istio_requests_total{response_code=~\"4.*|5.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(increase(istio_requests_total{response_code=~\"4.*|5.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "expr": "gatewayapi_httproute_hostname_info{name=~\"$api\"}", "format": "table", "hide": false, "instant": true, + "legendFormat": "__auto", "range": false, - "refId": "G" + "refId": "A" }, { "datasource": { @@ -475,12 +136,12 @@ }, "editorMode": "code", "exemplar": false, - "expr": "(sum(rate(istio_requests_total{response_code=~\"4.*|5.*\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_totalP{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "expr": "gatewayapi_httproute_labels{name=~\"$api\"}", "format": "table", "hide": false, "instant": true, "range": false, - "refId": "H" + "refId": "B" }, { "datasource": { @@ -489,294 +150,123 @@ }, "editorMode": "code", "exemplar": false, - "expr": "(sum(increase(istio_requests_total{response_code=~\"4.*|5.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(increase(istio_requests_total{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "expr": "gatewayapi_httproute_parent_info{name=~\"$api\"}", "format": "table", "hide": false, "instant": true, "range": false, - "refId": "K" + "refId": "C" } ], - "title": "API Error Requests ", "transformations": [ { - "id": "merge", - "options": {} + "id": "seriesToColumns", + "options": { + "byField": "name" + } }, { "id": "organize", "options": { "excludeByName": { - "Time": true, - "Value #A": false, - "Value #B": false, - "Value #C": false, - "Value #D": false, - "Value #E": false, - "Value #G": false, - "Value #H": false, - "Value #K": false, - "container": true, - "customresource_group": true, - "customresource_kind": true, - "customresource_version": true, - "deployment": true, - "destination_service_name": true, - "destination_workload": true, - "exported_namespace": true, - "instance": true, - "job": true, - "namespace": true, - "prometheus": true + "Time 1": true, + "Time 2": true, + "Value #A": true, + "Value #B": true, + "__name__ 1": true, + "__name__ 2": true, + "container 1": true, + "container 2": true, + "customresource_group 1": true, + "customresource_group 2": true, + "customresource_kind 1": true, + "customresource_kind 2": true, + "customresource_version 1": true, + "customresource_version 2": true, + "deployment": false, + "exported_namespace 2": true, + "instance 1": true, + "instance 2": true, + "job 1": true, + "job 2": true, + "name": true, + "namespace 1": false, + "namespace 2": true, + "namespace 3": false, + "parent_name": false, + "parent_namespace": false, + "prometheus 1": true, + "prometheus 2": true, + "service": false }, "indexByName": { - "Time": 1, - "Value #A": 14, - "Value #B": 15, - "Value #C": 13, - "Value #D": 18, - "Value #E": 20, - "Value #F": 22, - "Value #G": 16, - "Value #H": 19, - "Value #I": 21, - "Value #J": 23, - "Value #K": 17, - "container": 2, - "customresource_group": 3, - "customresource_kind": 4, - "customresource_version": 5, - "deployment": 6, - "destination_workload": 7, - "exported_namespace": 8, - "instance": 9, - "job": 10, - "name": 0, - "namespace": 11, - "prometheus": 12 - }, - "renameByName": { - "Time": "", - "deployment": "", - "exported_namespace": "", - "name": "API" - } - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "API", - "Value #K", - "Value #D", - "Value #H", - "Value #E", - "Value #I", - "Value #G" - ] - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "description": "API Error rate for different response codes over time the API name can be cross referenced with the API list to see additional details.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "reqps" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 7 - }, - "id": 101, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=~\"4.*|5.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "legendFormat": "Total Errors: {{name}} ", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=~\"4.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "hide": false, - "legendFormat": "4xx: {{name}} ", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=~\"5.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "hide": false, - "legendFormat": "5xx: {{name}} ", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=~\"404\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "hide": false, - "legendFormat": "404: {{name}}", - "range": true, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=~\"401\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "hide": false, - "legendFormat": "401: {{name}}", - "range": true, - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=~\"429\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "hide": false, - "legendFormat": "429: {{name}}", - "range": true, - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=~\"500\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "hide": false, - "legendFormat": "500: {{name}}", - "range": true, - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=~\"501\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "hide": false, - "legendFormat": "501: {{name}}", - "range": true, - "refId": "H" + "Time 1": 1, + "Time 2": 14, + "Value #A": 13, + "Value #B": 26, + "__name__ 1": 2, + "__name__ 2": 15, + "container 1": 3, + "container 2": 16, + "customresource_group 1": 4, + "customresource_group 2": 17, + "customresource_kind 1": 5, + "customresource_kind 2": 18, + "customresource_version 1": 6, + "customresource_version 2": 19, + "deployment": 20, + "exported_namespace 1": 8, + "exported_namespace 2": 21, + "hostname": 7, + "instance 1": 9, + "instance 2": 22, + "job 1": 10, + "job 2": 23, + "name": 0, + "namespace 1": 11, + "namespace 2": 24, + "prometheus 1": 12, + "prometheus 2": 25 + }, + "renameByName": { + "Time 2": "", + "Value #C": "", + "customresource_kind 2": "", + "deployment": "API Workload (Deployment)", + "exported_namespace 1": "Namespace", + "exported_namespace 2": "", + "hostname": "Hostname", + "name": "API Name (HTTPRoute)", + "namespace 1": "API Namespace", + "owner": "Owner", + "parent_name": "Gateway name", + "parent_namespace": "Gateway namespace", + "service": "Service" + } + } }, { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=~\"503\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "hide": false, - "legendFormat": "503: {{name}}", - "range": true, - "refId": "I" + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "Hostname", + "API Namespace", + "Gateway name", + "Gateway namespace" + ] + } + } } ], - "title": "API Error Rate (/sec)", - "type": "timeseries" + "type": "table" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "description": "API % Error rate for different response codes over time the API name can be cross referenced with the API list to see additional details.", + "description": "Requests per second, broken down by success (2xx,3xxx) and error (4xx,5xx)", "fieldConfig": { "defaults": { "color": { @@ -788,8 +278,8 @@ "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", + "fillOpacity": 5, + "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, @@ -811,6 +301,7 @@ "mode": "off" } }, + "decimals": 2, "mappings": [], "thresholds": { "mode": "absolute", @@ -818,24 +309,66 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, - "unit": "percentunit" + "unit": "reqps" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "A" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "C" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-green", + "mode": "fixed" + } + } + ] + } + ] }, "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 7 + "h": 6, + "w": 9, + "x": 0, + "y": 8 }, - "id": 124, + "id": 99, "options": { "legend": { "calcs": [], @@ -843,7 +376,7 @@ "placement": "bottom" }, "tooltip": { - "mode": "single", + "mode": "multi", "sort": "none" } }, @@ -854,8 +387,8 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "(sum(rate(istio_requests_total{response_code=~\"4.*|5.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", - "legendFormat": "Total Errors: {{name}} ", + "expr": "sum(rate(istio_requests_total{destination_service_name=~\"$api\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "legendFormat": "total", "range": true, "refId": "A" }, @@ -865,9 +398,9 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "(sum(rate(istio_requests_total{response_code=~\"4.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "expr": "sum(rate(istio_requests_total{response_code=~\"4.*|5.*\",destination_service_name=~\"$api\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", "hide": false, - "legendFormat": "4xx: {{name}} ", + "legendFormat": "error (4xx,5xx)", "range": true, "refId": "B" }, @@ -877,188 +410,250 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "(sum(rate(istio_requests_total{response_code=~\"5.*\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))/ (sum(rate(istio_requests_total{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "expr": "sum(rate(istio_requests_total{response_code=~\"2.*|3.*\",destination_service_name=~\"$api\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", "hide": false, - "legendFormat": "5xx: {{name}} ", + "legendFormat": "success (2xx,3xx)", "range": true, "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" + } + ], + "title": "request breakdown (req/s)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Total requests per second", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" }, - "editorMode": "code", - "expr": "(sum(rate(istio_requests_total{response_code=~\"401\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", - "hide": false, - "legendFormat": "401: {{name}}", - "range": true, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] }, - "editorMode": "code", - "expr": "(sum(rate(istio_requests_total{response_code=~\"429\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", - "hide": false, - "legendFormat": "429: {{name}}", - "range": true, - "refId": "E" + "unit": "reqps" }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "(sum(rate(istio_requests_total{response_code=~\"404\",destination_service_name=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")) / (sum(rate(istio_requests_total{destination_service_name=~\"$api\",destination_service_name=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", - "hide": false, - "legendFormat": "404: {{name}}", - "range": true, - "refId": "F" + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 9, + "y": 8 + }, + "id": 137, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", - "expr": "(sum(rate(istio_requests_total{response_code=~\"500\",destination_service_name=~\"$api\",destination_service_name=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))/ (sum(rate(istio_requests_total{destination_service_name=~\"$api\",destination_service_name=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "exemplar": false, + "expr": "sum(rate(istio_requests_total{destination_service_name=~\"$api\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", "hide": false, - "legendFormat": "500: {{name}}", - "range": true, - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" + "instant": true, + "legendFormat": "P50 {{destination_service_name}}", + "range": false, + "refId": "C" + } + ], + "title": "total", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Total number of responses.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" }, - "editorMode": "code", - "expr": "(sum(rate(istio_requests_total{response_code=~\"501\",destination_service_name=~\"$api\",destination_service_name=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))/ (sum(rate(istio_requests_total{destination_service_name=~\"$api\",destination_service_name=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", - "hide": false, - "legendFormat": "501: {{name}}", - "range": true, - "refId": "H" + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 11, + "y": 8 + }, + "id": 149, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", - "expr": "(sum(rate(istio_requests_total{response_code=~\"503\",destination_service_name=~\"$api\",destination_service_name=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))/ (sum(rate(istio_requests_total{destination_service_name=~\"$api\",destination_service_name=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\"))", + "exemplar": false, + "expr": "sum(increase(istio_requests_total{destination_service_name=~\"$api\"}[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{service=~\"$api\"}, \"destination_service_name\", \"$1\",\"service\", \"(.+)\")", "hide": false, - "legendFormat": "503: {{name}}", - "range": true, - "refId": "I" + "instant": true, + "legendFormat": "P50 {{destination_service_name}}", + "range": false, + "refId": "C" } ], - "title": "API Error Rate %", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 131, - "panels": [], - "title": "API Successful Request", - "type": "row" + "title": "total", + "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "description": "List of current successful requests API is encountering ", + "description": "Time it takes to process a request", "fieldConfig": { "defaults": { "color": { - "fixedColor": "green", - "mode": "fixed" + "mode": "palette-classic" }, "custom": { - "align": "center", - "displayMode": "color-text", - "filterable": false, - "inspect": false + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "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": "text", + "color": "green", "value": null } ] - } + }, + "unit": "ms" }, "overrides": [ { "matcher": { - "id": "byName", - "options": "Value #A" + "id": "byFrameRefID", + "options": "A" }, "properties": [ { - "id": "displayName", - "value": "Current Successful Request Rate" - }, - { - "id": "unit", - "value": "reqps" - }, - { - "id": "decimals", - "value": 2 + "id": "color", + "value": { + "fixedColor": "super-light-blue", + "mode": "fixed" + } } ] }, { "matcher": { - "id": "byName", - "options": "Value #B" + "id": "byFrameRefID", + "options": "C" }, "properties": [ { - "id": "displayName", - "value": "Increase/Decrease" - }, - { - "id": "unit", - "value": "reqps" - }, - { - "id": "decimals", - "value": 2 + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } } ] }, { "matcher": { - "id": "byName", - "options": "Value #C" + "id": "byFrameRefID", + "options": "B" }, "properties": [ { - "id": "displayName", - "value": "Total Successful Requests" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 0 + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } } ] } @@ -1066,23 +661,22 @@ }, "gridPos": { "h": 6, - "w": 24, - "x": 0, - "y": 15 + "w": 9, + "x": 13, + "y": 8 }, - "id": 134, + "id": 129, "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" - ], - "show": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" }, - "showHeader": true, - "sortBy": [] + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "pluginVersion": "8.5.5", "targets": [ { "datasource": { @@ -1090,12 +684,21 @@ "uid": "${datasource}" }, "editorMode": "code", - "exemplar": false, - "expr": "sum(rate(istio_requests_total{response_code=\"200\",destination_service_name=~\"$api\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "format": "table", + "expr": "histogram_quantile(0.95, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", "hide": false, - "instant": true, - "range": false, + "legendFormat": "P95", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "legendFormat": "P90", + "range": true, "refId": "A" }, { @@ -1104,14 +707,65 @@ "uid": "${datasource}" }, "editorMode": "code", - "exemplar": false, - "expr": "(sum(rate(istio_requests_total{response_code=\"200\",destination_service_name=~\"$api\"}[5m])) by (destination_service_name) - sum(rate(istio_requests_total{response_code=\"200\",destination_service_name=~\"$api\"}[5m] offset $__range)) by (destination_service_name))\n* on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "format": "table", + "expr": "histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", "hide": false, - "instant": true, - "range": false, + "legendFormat": "P99", + "range": true, "refId": "B" + } + ], + "title": "request latency (percentiles)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "99% of API requests were completed inside this value, while the remaining 1% took longer.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 2, + "x": 22, + "y": 8 + }, + "id": 139, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, + "textMode": "auto" + }, + "pluginVersion": "8.5.5", + "targets": [ { "datasource": { "type": "prometheus", @@ -1119,141 +773,28 @@ }, "editorMode": "code", "exemplar": false, - "expr": "sum(increase(istio_requests_total{response_code=\"200\",destination_service_name=~\"$api\"}[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "format": "table", + "expr": "histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", "hide": false, "instant": true, + "legendFormat": "P99 {{destination_service_name}}", "range": false, - "refId": "C" - } - ], - "title": "API Successful Requests", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true, - "Value #A": false, - "Value #B": false, - "Value #C": false, - "Value #D": false, - "Value #E": false, - "Value #G": false, - "Value #H": false, - "Value #K": false, - "container": true, - "customresource_group": true, - "customresource_kind": true, - "customresource_version": true, - "deployment": true, - "destination_service_name": true, - "destination_workload": true, - "exported_namespace": true, - "instance": true, - "job": true, - "namespace": true, - "prometheus": true - }, - "indexByName": { - "Time": 1, - "Value #A": 14, - "Value #B": 15, - "Value #C": 13, - "Value #D": 18, - "Value #E": 20, - "Value #F": 22, - "Value #G": 16, - "Value #H": 19, - "Value #I": 21, - "Value #J": 23, - "Value #K": 17, - "container": 2, - "customresource_group": 3, - "customresource_kind": 4, - "customresource_version": 5, - "deployment": 6, - "destination_workload": 7, - "exported_namespace": 8, - "instance": 9, - "job": 10, - "name": 0, - "namespace": 11, - "prometheus": 12 - }, - "renameByName": { - "Time": "", - "deployment": "", - "exported_namespace": "", - "name": "API" - } - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "API", - "Value #C", - "Value #B", - "Value #G", - "Value #K", - "Value #D", - "Value #H", - "Value #E", - "Value #I", - "Value #A" - ] - } - } + "refId": "B" } ], - "type": "table" + "title": "P99", + "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "description": "API successful request rate for 200 response code over time the API name can be cross referenced with the API list to see additional details.", + "description": "Requests per second that resulted in a success (2xx, 3xx).", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 1, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "fixedColor": "light-green", + "mode": "fixed" }, "decimals": 2, "mappings": [], @@ -1263,10 +804,6 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, @@ -1275,23 +812,27 @@ "overrides": [] }, "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 21 + "h": 2, + "w": 2, + "x": 9, + "y": 10 }, - "id": 99, + "id": 147, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "textMode": "auto" }, + "pluginVersion": "8.5.5", "targets": [ { "datasource": { @@ -1299,39 +840,31 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(rate(istio_requests_total{response_code=\"200\",destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "legendFormat": "API: {{name}}", - "range": true, - "refId": "A" + "exemplar": false, + "expr": "sum(rate(istio_requests_total{response_code=~\"2.*|3.*\",destination_service_name=~\"$api\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "hide": false, + "instant": true, + "legendFormat": "P50 {{destination_service_name}}", + "range": false, + "refId": "C" } ], - "title": "API Successful Request Rate (/sec)", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 136, - "panels": [], - "title": "API Duration", - "type": "row" + "title": "success", + "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "description": "Shows that 50% of API requests were completed inside the latency value, while the remaining 50% took longer.", + "description": "Total number of success response (2xx, 3xx).", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "light-green", + "mode": "fixed" }, + "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", @@ -1339,24 +872,20 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, - "unit": "ms" + "unit": "none" }, "overrides": [] }, "gridPos": { - "h": 6, - "w": 3, - "x": 0, - "y": 28 + "h": 2, + "w": 2, + "x": 11, + "y": 10 }, - "id": 137, + "id": 150, "options": { "colorMode": "value", "graphMode": "none", @@ -1380,7 +909,7 @@ }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "expr": "sum(increase(istio_requests_total{response_code=~\"2.*|3.*\",destination_service_name=~\"$api\"}[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{service=~\"$api\"}, \"destination_service_name\", \"$1\",\"service\", \"(.+)\")", "hide": false, "instant": true, "legendFormat": "P50 {{destination_service_name}}", @@ -1388,7 +917,7 @@ "refId": "C" } ], - "title": "API Request Duration P50", + "title": "success", "type": "stat" }, { @@ -1396,11 +925,12 @@ "type": "prometheus", "uid": "${datasource}" }, - "description": "Shows that 99% of API requests were completed inside the latency value, while the remaining 1% took longer.", + "description": "95% of API requests were completed inside this value, while the remaining 5% took longer.", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "light-blue", + "mode": "fixed" }, "mappings": [], "thresholds": { @@ -1409,10 +939,6 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, @@ -1421,12 +947,12 @@ "overrides": [] }, "gridPos": { - "h": 11, - "w": 3, - "x": 3, - "y": 28 + "h": 2, + "w": 2, + "x": 22, + "y": 10 }, - "id": 139, + "id": 146, "options": { "colorMode": "value", "graphMode": "none", @@ -1450,15 +976,15 @@ }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "expr": "histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", "hide": false, "instant": true, - "legendFormat": "P99 {{destination_service_name}}", + "legendFormat": "P50 {{destination_service_name}}", "range": false, - "refId": "B" + "refId": "C" } ], - "title": "API Request Duration P99", + "title": "P95", "type": "stat" }, { @@ -1466,40 +992,14 @@ "type": "prometheus", "uid": "${datasource}" }, - "description": "Different percentiles over time can be cross referenced with the API list to see additional details.", + "description": "Requests per second that resulted in an error (4xx, 5xx).", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "fixedColor": "light-yellow", + "mode": "fixed" }, + "decimals": 2, "mappings": [], "thresholds": { "mode": "absolute", @@ -1507,35 +1007,35 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, - "unit": "ms" + "unit": "reqps" }, "overrides": [] }, "gridPos": { - "h": 11, - "w": 18, - "x": 6, - "y": 28 + "h": 2, + "w": 2, + "x": 9, + "y": 12 }, - "id": 129, + "id": 148, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom" + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "textMode": "auto" }, + "pluginVersion": "8.5.5", "targets": [ { "datasource": { @@ -1543,50 +1043,31 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "exemplar": false, + "expr": "sum(rate(istio_requests_total{response_code=~\"4.*|5.*\",destination_service_name=~\"$api\"}[5m])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", "hide": false, + "instant": true, "legendFormat": "P50 {{destination_service_name}}", - "range": true, + "range": false, "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "legendFormat": "P90 {{destination_service_name}}", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "expr": "histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{deployment=~\"$api\"}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", - "hide": false, - "legendFormat": "P99 {{destination_service_name}}", - "range": true, - "refId": "B" } ], - "title": "API Request Duration", - "type": "timeseries" + "title": "error", + "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "description": "Shows that 90% of API requests were completed inside the latency value, while the remaining 10% took longer.", + "description": "Total number of error response (4xx, 5xx).", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "light-yellow", + "mode": "fixed" }, + "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", @@ -1594,24 +1075,20 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] }, - "unit": "ms" + "unit": "none" }, "overrides": [] }, "gridPos": { - "h": 5, - "w": 3, - "x": 0, - "y": 34 + "h": 2, + "w": 2, + "x": 11, + "y": 12 }, - "id": 138, + "id": 151, "options": { "colorMode": "value", "graphMode": "none", @@ -1635,44 +1112,28 @@ }, "editorMode": "code", "exemplar": false, - "expr": "histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\",request_url_path=~\"$api_path\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", + "expr": "sum(increase(istio_requests_total{response_code=~\"4.*|5.*\",destination_service_name=~\"$api\"}[$__range])) by (destination_service_name) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{service=~\"$api\"}, \"destination_service_name\", \"$1\",\"service\", \"(.+)\")", + "hide": false, "instant": true, - "legendFormat": "P90 {{destination_service_name}}", + "legendFormat": "P50 {{destination_service_name}}", "range": false, - "refId": "A" + "refId": "C" } ], - "title": "API Request Duration P90", + "title": "error", "type": "stat" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 39 - }, - "id": 109, - "panels": [], - "title": "API Summary", - "type": "row" - }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, - "description": "Summary of API", + "description": "Shows that 90% of API requests were completed inside this value, while the remaining 10% took longer.", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false + "fixedColor": "super-light-blue", + "mode": "fixed" }, "mappings": [], "thresholds": { @@ -1681,32 +1142,33 @@ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] - } + }, + "unit": "ms" }, "overrides": [] }, "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 40 + "h": 2, + "w": 2, + "x": 22, + "y": 12 }, - "id": 97, + "id": 138, "options": { - "footer": { - "fields": "", - "reducer": [ - "sum" + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "show": false + "fields": "", + "values": false }, - "showHeader": true + "textMode": "auto" }, "pluginVersion": "8.5.5", "targets": [ @@ -1717,142 +1179,15 @@ }, "editorMode": "code", "exemplar": false, - "expr": "gatewayapi_httproute_hostname_info{name=~\"$api\"}", - "format": "table", - "hide": false, + "expr": "histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{destination_service_name=~\"$api\"}[1m])) by (le, destination_service_name)) * on(destination_service_name) group_right label_replace(gatewayapi_httproute_labels{}, \"destination_service_name\", \"$1\",\"deployment\", \"(.+)\")", "instant": true, - "legendFormat": "__auto", + "legendFormat": "P90 {{destination_service_name}}", "range": false, "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_labels{name=~\"$api\"}", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "gatewayapi_httproute_parent_info{name=~\"$api\"}", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "C" - } - ], - "title": "API Summary", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "name" - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time 1": true, - "Time 2": true, - "Value #A": true, - "Value #B": true, - "__name__ 1": true, - "__name__ 2": true, - "container 1": true, - "container 2": true, - "customresource_group 1": true, - "customresource_group 2": true, - "customresource_kind 1": true, - "customresource_kind 2": true, - "customresource_version 1": true, - "customresource_version 2": true, - "exported_namespace 2": true, - "instance 1": true, - "instance 2": true, - "job 1": true, - "job 2": true, - "namespace 1": false, - "namespace 2": true, - "namespace 3": false, - "parent_name": false, - "prometheus 1": true, - "prometheus 2": true - }, - "indexByName": { - "Time 1": 1, - "Time 2": 14, - "Value #A": 13, - "Value #B": 26, - "__name__ 1": 2, - "__name__ 2": 15, - "container 1": 3, - "container 2": 16, - "customresource_group 1": 4, - "customresource_group 2": 17, - "customresource_kind 1": 5, - "customresource_kind 2": 18, - "customresource_version 1": 6, - "customresource_version 2": 19, - "deployment": 20, - "exported_namespace 1": 8, - "exported_namespace 2": 21, - "hostname": 7, - "instance 1": 9, - "instance 2": 22, - "job 1": 10, - "job 2": 23, - "name": 0, - "namespace 1": 11, - "namespace 2": 24, - "prometheus 1": 12, - "prometheus 2": 25 - }, - "renameByName": { - "Time 2": "", - "Value #C": "", - "customresource_kind 2": "", - "deployment": "API Workload (Deployment)", - "exported_namespace 1": "Namespace", - "exported_namespace 2": "", - "hostname": "Hostname", - "name": "API Name (HTTPRoute)", - "namespace 1": "API Namespace", - "owner": "Owner", - "parent_name": "Parent Name (Gateway)", - "parent_namespace": "Parent Namespace (Gateway)" - } - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "API Name (HTTPRoute)", - "Hostname", - "Parent Name (Gateway)", - "Parent Namespace (Gateway)", - "API Namespace" - ] - } - } } ], - "type": "table" + "title": "P90", + "type": "stat" } ], "refresh": "", @@ -1863,7 +1198,7 @@ "list": [ { "current": { - "selected": true, + "selected": false, "text": "prometheus", "value": "prometheus" }, @@ -1911,43 +1246,11 @@ "skipUrlSync": false, "sort": 0, "type": "query" - }, - { - "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] - }, - "datasource": { - "type": "prometheus", - "uid": "${datasource}" - }, - "definition": "label_values(istio_requests_total{destination_service_name=~\"$api\"}, request_url_path)", - "description": "API endpoint path ", - "hide": 0, - "includeAll": true, - "label": "API path", - "multi": true, - "name": "api_path", - "options": [], - "query": { - "query": "label_values(istio_requests_total{destination_service_name=~\"$api\"}, request_url_path)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" } ] }, "time": { - "from": "now-5m", + "from": "now-15m", "to": "now" }, "timepicker": { @@ -1973,7 +1276,7 @@ }, "timezone": "", "title": "Stitch: App Developer Dashboard", - "uid": "6bHBHa7Izx", - "version": 11, + "uid": "J_sdY4-Ik", + "version": 8, "weekStart": "" -} +} \ No newline at end of file