Skip to content

Commit

Permalink
fix(stoneintg-564): ignore empty values
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
14rcole committed Sep 15, 2023
1 parent 5b429ef commit 8bfeb9c
Showing 1 changed file with 146 additions and 176 deletions.
322 changes: 146 additions & 176 deletions config/grafana/dashboards/integration-service-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {},
Expand Down Expand Up @@ -355,111 +340,96 @@
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"description": "90% of requests must take less than 5sec",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"id": 25,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 9
},
"hiddenSeries": false,
"id": 25,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
"type": "timeseries",
"title": "[Violations] #2 Time to Start PipelineRun",
"pluginVersion": "9.1.6",
"description": "90% of requests must take less than 5sec",
"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(snapshot_created_to_pipelinerun_started_seconds_bucket{le=\"5\"}[$__rate_interval])) by (job)\n/\nsum(rate(snapshot_created_to_pipelinerun_started_seconds_count[$__rate_interval])) by (job)\n*100",
"expr": "sum(rate(snapshot_created_to_pipelinerun_started_seconds_bucket{le=\"5\"}[$__rate_interval])) by (job)\n/\nsum(rate(snapshot_created_to_pipelinerun_started_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] #2 Time to Start PipelineRun",
"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
}
{
"collapsed": false,
"gridPos": {
Expand Down Expand Up @@ -1287,4 +1257,4 @@
"title": "Integration Service",
"uid": "b1fac0453848b1e7ce9377a6eb38d7ec3b8a23d9",
"version": 5
}
}

0 comments on commit 8bfeb9c

Please sign in to comment.