Skip to content

Commit

Permalink
Merge pull request #1174 from sebastiangaiser/main
Browse files Browse the repository at this point in the history
fix(examples,grafana): correct dashboards for Grafana 10.X
  • Loading branch information
metalmatze authored Jun 29, 2024
2 parents 307afca + d316a39 commit a5e3b46
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 119 deletions.
118 changes: 45 additions & 73 deletions examples/grafana/detail.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,4 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.1.5"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
Expand All @@ -62,14 +25,13 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
Expand Down Expand Up @@ -112,15 +74,17 @@
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {},
"textMode": "auto"
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "9.1.5",
"pluginVersion": "10.4.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"editorMode": "code",
"exemplar": false,
Expand All @@ -137,7 +101,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
Expand Down Expand Up @@ -179,15 +143,17 @@
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {},
"textMode": "auto"
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "9.1.5",
"pluginVersion": "10.4.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"editorMode": "code",
"exemplar": false,
Expand All @@ -204,7 +170,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
Expand Down Expand Up @@ -251,15 +217,17 @@
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {},
"textMode": "auto"
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "9.1.5",
"pluginVersion": "10.4.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"editorMode": "code",
"exemplar": false,
Expand All @@ -276,7 +244,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
Expand Down Expand Up @@ -323,15 +291,17 @@
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {},
"textMode": "auto"
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "9.1.5",
"pluginVersion": "10.4.1",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"editorMode": "code",
"exemplar": false,
Expand All @@ -348,7 +318,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
Expand All @@ -358,6 +328,7 @@
"seriesBy": "last"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand All @@ -372,6 +343,7 @@
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 0,
"pointSize": 5,
Expand Down Expand Up @@ -430,7 +402,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "((pyrra_availability{slo=\"$slo\"} - pyrra_objective{slo=\"$slo\"})) / (1 - pyrra_objective{slo=\"$slo\"})",
Expand All @@ -445,7 +417,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
Expand All @@ -454,6 +426,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand All @@ -468,6 +441,7 @@
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 5,
Expand Down Expand Up @@ -526,7 +500,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "sum(rate(pyrra_requests_total{slo=\"$slo\"}[$__rate_interval]))",
Expand All @@ -542,7 +516,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
Expand All @@ -551,6 +525,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
Expand All @@ -566,6 +541,7 @@
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 5,
Expand Down Expand Up @@ -641,7 +617,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"editorMode": "builder",
"expr": "sum(rate(pyrra_errors_total{slo=\"$slo\"}[$__rate_interval]))",
Expand All @@ -656,22 +632,17 @@
}
],
"refresh": "10s",
"schemaVersion": 37,
"style": "dark",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "prometheus",
"value": "prometheus"
},
"current": {},
"hide": 0,
"includeAll": false,
"label": "Prometheus",
"label": "Data source",
"multi": false,
"name": "prometheus",
"name": "datasource",
"options": [],
"query": "prometheus",
"queryValue": "",
Expand All @@ -684,18 +655,19 @@
"current": {},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
"uid": "${datasource}"
},
"definition": "label_values(pyrra_objective, slo)",
"definition": "label_values(pyrra_objective,slo)",
"hide": 0,
"includeAll": false,
"label": "SLO",
"multi": false,
"name": "slo",
"options": [],
"query": {
"query": "label_values(pyrra_objective, slo)",
"refId": "StandardVariableQuery"
"qryType": 1,
"query": "label_values(pyrra_objective,slo)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
Expand Down
Loading

0 comments on commit a5e3b46

Please sign in to comment.