Skip to content

Commit

Permalink
Fixes #7335
Browse files Browse the repository at this point in the history
This relies on a variable datasource ($datasource), of type Data source, where it's Data source option type is Prometheus.
  • Loading branch information
kylos101 committed Dec 21, 2021
1 parent 32d72af commit 292c416
Showing 1 changed file with 69 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
{
"__inputs": [
{
"name": "DS_VICTORIAMETRICS",
"label": "VictoriaMetrics",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.3.2"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
Expand All @@ -20,14 +51,17 @@
},
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": null,
"graphTooltip": 0,
"id": 56,
"id": null,
"iteration": 1640100928999,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": "$datasource",
"datasource": {
"type": "prometheus",
"uid": "${DS_VICTORIAMETRICS}"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -69,8 +103,7 @@
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
"color": "red"
},
{
"color": "green",
Expand Down Expand Up @@ -100,18 +133,24 @@
},
"targets": [
{
"exemplar": true,
"datasource": {
"type": "prometheus",
"uid": "${DS_VICTORIAMETRICS}"
},
"exemplar": false,
"expr": "1-((\n (\n sum(rate(gitpod_ws_manager_workspace_stops_total{reason=\"failed\",type!~\"GHOST|PREBUILD\"}[1d]))\n /\n sum(rate(gitpod_ws_manager_workspace_stops_total{type!~\"GHOST|PREBUILD\"}[1d]))\n )\n) + (\n (\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\",grpc_code!~\"OK|ResourceExhausted\"}[1d]))\n /\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\"}[1d]))\n )\n))",
"interval": "",
"legendFormat": "Success Rate",
"legendFormat": "",
"refId": "A"
}
],
"title": "Workspace Success Rate",
"type": "timeseries"
},
{
"datasource": "$datasource",
"datasource": {
"uid": "$datasource"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -194,14 +233,32 @@
"type": "timeseries"
}
],
"schemaVersion": 31,
"schemaVersion": 33,
"style": "dark",
"tags": [
"workspace",
"success criteria"
],
"templating": {
"list": []
"list": [
{
"current": {
"selected": false,
"text": "VictoriaMetrics",
"value": "VictoriaMetrics"
},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
"time": {
"from": "now-7d",
Expand All @@ -211,5 +268,6 @@
"timezone": "",
"title": "Success Criteria",
"uid": "jgjwvIc7k",
"version": 2
"version": 1,
"weekStart": ""
}

0 comments on commit 292c416

Please sign in to comment.