From b4698feb3bebbf723d9c7a29a69a3447cafd59a7 Mon Sep 17 00:00:00 2001 From: Ryan Cole Date: Thu, 14 Sep 2023 11:47:42 -0400 Subject: [PATCH] fix(stoneintg-564): ignore empty values Previously empty values in the violations graphs were reported as zero. This is because in order to calculate the percentage of requests meeting our thresholds we divide the "good" requests by the total requests. If there are no total requests then grafana sets 0/0 to 0 rather than dividing by 0. This change ignores the empty values and changes the display from a line to bars to improve readability. Signed-off-by: Ryan Cole --- .../integration-service-dashboard.json | 161 ++++++++---------- 1 file changed, 73 insertions(+), 88 deletions(-) diff --git a/config/grafana/dashboards/integration-service-dashboard.json b/config/grafana/dashboards/integration-service-dashboard.json index 3002ee8e7..e4a93199c 100644 --- a/config/grafana/dashboards/integration-service-dashboard.json +++ b/config/grafana/dashboards/integration-service-dashboard.json @@ -143,110 +143,95 @@ } }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "description": "90% of requests must take less than 30sec", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, + "id": 24, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 1 }, - "hiddenSeries": false, - "id": 24, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "type": "timeseries", + "title": "[Violations] #1 Latency - Percentile Service Response (in-progress change)", + "pluginVersion": "9.1.6", + "description": "90% of requests must take less than 30sec", + "fieldConfig": { + "defaults": { + "custom": { + "drawStyle": "bars", + "lineInterpolation": "linear", + "barAlignment": 0, + "lineWidth": 1, + "fillOpacity": 10, + "gradientMode": "none", + "spanNulls": false, + "showPoints": "never", + "pointSize": 5, + "stacking": { + "mode": "none", + "group": "A" + }, + "axisPlacement": "auto", + "axisLabel": "%", + "axisColorMode": "text", + "scaleDistribution": { + "type": "linear" + }, + "axisCenteredZero": false, + "hideFrom": { + "tooltip": false, + "viz": false, + "legend": false + }, + "thresholdsStyle": { + "mode": "line+area" + } + }, + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": null, + "color": "red" + }, + { + "value": 90, + "color": "transparent" + } + ] + }, + "unit": "short" + }, + "overrides": [] }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "tooltip": { + "mode": "multi", + "sort": "none" + }, + "legend": { + "showLegend": true, + "displayMode": "list", + "placement": "bottom", + "calcs": [] + } }, - "percentage": false, - "pluginVersion": "7.5.17", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { "exemplar": true, - "expr": "sum(rate(integration_svc_response_seconds_bucket{le=\"30\"}[$__rate_interval])) by (job)\n/\nsum(rate(integration_svc_response_seconds_count[$__rate_interval])) by (job)\n*100", + "expr": "sum(rate(integration_svc_response_seconds_bucket{le=\"30\"}[$__rate_interval])) by (job)\n/\nsum(rate(integration_svc_response_seconds_count[$__rate_interval]) > 0) by (job)\n*100", "interval": "", "legendFormat": "% of requests within required latency time", - "refId": "A" - } - ], - "thresholds": [ - { - "$$hashKey": "object:267", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "lt", - "value": 90, - "yaxis": "left" + "refId": "A", + "editorMode": "code", + "range": true } ], "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "[Violations] #1 Latency - Percentile Service Response (in-progress change)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:78", - "format": "short", - "label": "%", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:79", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "timeShift": null }, { "aliasColors": {}, @@ -1287,4 +1272,4 @@ "title": "Integration Service", "uid": "b1fac0453848b1e7ce9377a6eb38d7ec3b8a23d9", "version": 5 -} \ No newline at end of file +}