Add panels for GQL metrics to watcher dashboard (#834)

Part of [Metrics and logging for GQL queries in watcher](https://www.notion.so/Metrics-and-logging-for-GQL-queries-in-watcher-928c692292b140a2a4f52cda9795df5e)

Reviewed-on: cerc-io/stack-orchestrator#834
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
2024-06-06 11:47:18 +00:00
committed by ashwin
parent a322d6eed4
commit abc0c2423f
8 changed files with 321 additions and 27 deletions
@@ -18,7 +18,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 6,
"id": 4,
"links": [
{
"asDropdown": false,
@@ -117,7 +117,7 @@
"disableTextWrap": false,
"editorMode": "code",
"exemplar": false,
"expr": "max(watcher_info{job=\"$job\", instance=\"$watcher\"}) by (version, commitHash)",
"expr": "max(watcher_info{job=\"$job\", instance=\"$watcher\"}) by (repository, version, commitHash)",
"format": "table",
"fullMetaSearch": false,
"includeNullMetadata": true,
@@ -139,12 +139,14 @@
"includeByName": {},
"indexByName": {
"Time": 0,
"Value": 3,
"commitHash": 2,
"version": 1
"Value": 4,
"commitHash": 3,
"repository": 1,
"version": 2
},
"renameByName": {
"commitHash": "Commit hash",
"repository": "Repository",
"version": "Release"
}
}
@@ -2099,6 +2101,282 @@
],
"type": "table"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": 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
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 33
},
"id": 35,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "gql_query_count_total{job=~\"$job\", instance=~\"$watcher\"}",
"instant": false,
"legendFormat": "{{__name__}}",
"range": true,
"refId": "A"
}
],
"title": "Total GQL query count",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": 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
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 8,
"y": 33
},
"id": 36,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "gql_query_count{job=~\"$job\", instance=~\"$watcher\"}",
"instant": false,
"legendFormat": "{{name}}",
"range": true,
"refId": "A"
}
],
"title": "GQL query count",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": 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
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 16,
"y": 33
},
"id": 37,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"exemplar": false,
"expr": "gql_query_duration_seconds{job=~\"$job\", instance=~\"$watcher\"}",
"instant": false,
"legendFormat": "{{name}}",
"range": true,
"refId": "A"
}
],
"title": "GQL queries duration",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
@@ -2138,7 +2416,7 @@
"h": 5,
"w": 8,
"x": 0,
"y": 33
"y": 39
},
"id": 18,
"options": {
@@ -2284,7 +2562,7 @@
"h": 5,
"w": 8,
"x": 8,
"y": 33
"y": 39
},
"id": 17,
"options": {
@@ -2432,7 +2710,7 @@
"h": 5,
"w": 8,
"x": 16,
"y": 33
"y": 39
},
"id": 19,
"options": {
@@ -2599,7 +2877,7 @@
"h": 6,
"w": 8,
"x": 0,
"y": 38
"y": 44
},
"hide": true,
"id": 8,
@@ -2697,7 +2975,7 @@
"h": 6,
"w": 8,
"x": 8,
"y": 38
"y": 44
},
"id": 9,
"options": {
@@ -2794,7 +3072,7 @@
"h": 6,
"w": 8,
"x": 16,
"y": 38
"y": 44
},
"id": 10,
"options": {
@@ -2937,6 +3215,6 @@
"timepicker": {},
"timezone": "",
"title": "Watchers",
"version": 3,
"version": 4,
"weekStart": ""
}