Adapt dashboards to be accepted by Grafana dashboard repository

Grafana provides a repository for dashboards that can be used to easily
import dashboards. Providing these dashboards there would make it easier
for users not using the full setup provided here to still use the
dashboards. To be able to upload however, the datasource reference in the
dashboards has to be a template.

This is however not compatible with the way how the dashboards are imported
in the Grafana of the stack provided here. Thus, the variables are
removed during the installation.

Change-Id: I99f127882a6f7594ca1c40fbe1e299378e89f4e9
This commit is contained in:
Thomas Draebing 2020-11-20 09:15:55 +01:00
parent 65582f2deb
commit bec7bf7897
10 changed files with 385 additions and 112 deletions

View file

@ -1,4 +1,34 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -22,7 +52,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 1, "fillGradient": 1,
"gridPos": { "gridPos": {
@ -128,7 +158,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 1, "fillGradient": 1,
@ -225,7 +255,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 1, "fillGradient": 1,
@ -326,7 +356,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 1, "fillGradient": 1,
"gridPos": { "gridPos": {
@ -422,7 +452,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 1, "fillGradient": 1,
"gridPos": { "gridPos": {
@ -522,7 +552,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 0, "fill": 0,
"fillGradient": 0, "fillGradient": 0,
@ -637,7 +667,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total, instance)", "definition": "label_values(git_upload_pack_phase_writing_total, instance)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@ -662,7 +692,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)", "definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,

View file

@ -1,4 +1,34 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -22,7 +52,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "upload-pack requests", "description": "upload-pack requests",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -111,7 +141,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "upload-pack requests for fetches", "description": "upload-pack requests for fetches",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -200,7 +230,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 0, "fill": 0,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -307,7 +337,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 0, "fill": 0,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -420,7 +450,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total, instance)", "definition": "label_values(git_upload_pack_phase_writing_total, instance)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@ -445,7 +475,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)", "definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,

View file

@ -1,4 +1,34 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -22,7 +52,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -125,7 +155,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -226,7 +256,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -327,7 +357,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -428,7 +458,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -529,7 +559,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -630,7 +660,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -731,7 +761,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -832,7 +862,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -933,7 +963,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -1035,7 +1065,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -1136,7 +1166,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -1245,7 +1275,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total, instance)", "definition": "label_values(git_upload_pack_phase_writing_total, instance)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@ -1270,7 +1300,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)", "definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,

View file

@ -1,4 +1,34 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -19,7 +49,7 @@
"panels": [ "panels": [
{ {
"columns": [], "columns": [],
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"fontSize": "100%", "fontSize": "100%",
"gridPos": { "gridPos": {
"h": 4, "h": 4,
@ -159,7 +189,7 @@
}, },
{ {
"collapsed": false, "collapsed": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"gridPos": { "gridPos": {
"h": 1, "h": 1,
"w": 24, "w": 24,
@ -173,7 +203,7 @@
}, },
{ {
"cacheTimeout": null, "cacheTimeout": null,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"gridPos": { "gridPos": {
"h": 6, "h": 6,
"w": 8, "w": 8,
@ -243,7 +273,7 @@
}, },
{ {
"cacheTimeout": null, "cacheTimeout": null,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"gridPos": { "gridPos": {
"h": 6, "h": 6,
"w": 8, "w": 8,
@ -313,7 +343,7 @@
}, },
{ {
"cacheTimeout": null, "cacheTimeout": null,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"gridPos": { "gridPos": {
"h": 6, "h": 6,
"w": 8, "w": 8,
@ -374,7 +404,7 @@
}, },
{ {
"cacheTimeout": null, "cacheTimeout": null,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"gridPos": { "gridPos": {
"h": 6, "h": 6,
"w": 8, "w": 8,
@ -433,7 +463,7 @@
}, },
{ {
"cacheTimeout": null, "cacheTimeout": null,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "Excludes 404 and 401, since these error codes are caused by client behaviour and are overrepresented in the data.", "description": "Excludes 404 and 401, since these error codes are caused by client behaviour and are overrepresented in the data.",
"gridPos": { "gridPos": {
"h": 6, "h": 6,
@ -503,7 +533,7 @@
"type": "gauge" "type": "gauge"
}, },
{ {
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"gridPos": { "gridPos": {
"h": 1, "h": 1,
"w": 24, "w": 24,
@ -520,7 +550,7 @@
"cacheTimeout": null, "cacheTimeout": null,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -614,7 +644,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#299c46" "#299c46"
], ],
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"decimals": 2, "decimals": 2,
"format": "percent", "format": "percent",
"gauge": { "gauge": {
@ -695,7 +725,7 @@
"bars": true, "bars": true,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "This excludes response code 404, since it is caused by an issue with the Gerrit Trigger plugin.", "description": "This excludes response code 404, since it is caused by an issue with the Gerrit Trigger plugin.",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -942,7 +972,7 @@
"bars": true, "bars": true,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 0, "fill": 0,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -1101,7 +1131,7 @@
"bars": true, "bars": true,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 0, "fill": 0,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -1209,7 +1239,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total, instance)", "definition": "label_values(git_upload_pack_phase_writing_total, instance)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@ -1234,7 +1264,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)", "definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,

View file

@ -1,4 +1,34 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -22,7 +52,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -110,7 +140,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -216,7 +246,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -317,7 +347,7 @@
"bars": true, "bars": true,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"decimals": 2, "decimals": 2,
"fill": 6, "fill": 6,
"fillGradient": 0, "fillGradient": 0,
@ -449,7 +479,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -538,7 +568,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 6, "fill": 6,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -632,7 +662,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 2, "fill": 2,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -749,7 +779,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total, instance)", "definition": "label_values(git_upload_pack_phase_writing_total, instance)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@ -774,7 +804,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)", "definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,

View file

@ -1,4 +1,34 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -22,7 +52,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -149,7 +179,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -274,7 +304,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -399,7 +429,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -504,7 +534,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -599,7 +629,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -704,7 +734,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -847,7 +877,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -939,7 +969,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
@ -1061,7 +1091,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total, instance)", "definition": "label_values(git_upload_pack_phase_writing_total, instance)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@ -1086,7 +1116,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)", "definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,

View file

@ -1,4 +1,34 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -22,7 +52,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 1, "fillGradient": 1,
@ -111,7 +141,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": null, "datasource": "${DS_PROMETHEUS}",
"description": "", "description": "",
"fill": 1, "fill": 1,
"fillGradient": 1, "fillGradient": 1,
@ -206,7 +236,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total, instance)", "definition": "label_values(git_upload_pack_phase_writing_total, instance)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@ -231,7 +261,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)", "definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
@ -257,7 +287,7 @@
"text": "", "text": "",
"value": "" "value": ""
}, },
"datasource": "Prometheus", "datasource": "${DS_PROMETHEUS}",
"definition": "metrics(plugins_replication_replication_latency_.*_count)", "definition": "metrics(plugins_replication_replication_latency_.*_count)",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,

View file

@ -1,4 +1,34 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -36,7 +66,7 @@
{ {
"cacheTimeout": null, "cacheTimeout": null,
"columns": [], "columns": [],
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fontSize": "100%", "fontSize": "100%",
"gridPos": { "gridPos": {
"h": 5, "h": 5,
@ -1401,7 +1431,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -1519,7 +1549,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -1637,7 +1667,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -1755,7 +1785,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {

View file

@ -1,4 +1,34 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.1.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -40,7 +70,7 @@
{ {
"cacheTimeout": null, "cacheTimeout": null,
"columns": [], "columns": [],
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fontSize": "100%", "fontSize": "100%",
"gridPos": { "gridPos": {
"h": 5, "h": 5,
@ -494,7 +524,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 0, "fill": 0,
"fillGradient": 1, "fillGradient": 1,
"gridPos": { "gridPos": {
@ -582,7 +612,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"description": "", "description": "",
"editable": true, "editable": true,
"error": false, "error": false,
@ -683,7 +713,7 @@
"bars": true, "bars": true,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 6, "fill": 6,
@ -808,7 +838,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -909,7 +939,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -1008,7 +1038,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -1115,7 +1145,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"decimals": 2, "decimals": 2,
"editable": true, "editable": true,
"error": false, "error": false,
@ -1224,7 +1254,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"decimals": null, "decimals": null,
"editable": true, "editable": true,
"error": false, "error": false,
@ -1345,7 +1375,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -1457,7 +1487,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -1554,7 +1584,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -1669,7 +1699,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -1780,7 +1810,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -1872,7 +1902,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -1984,7 +2014,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -2094,7 +2124,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -2196,7 +2226,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 3, "fill": 3,
@ -2318,7 +2348,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -2432,7 +2462,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -2531,7 +2561,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -2640,7 +2670,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"decimals": 0, "decimals": 0,
"fill": 5, "fill": 5,
"fillGradient": 0, "fillGradient": 0,
@ -2741,7 +2771,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -2842,7 +2872,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -2965,7 +2995,7 @@
"bars": true, "bars": true,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -3055,7 +3085,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 3, "fill": 3,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -3151,7 +3181,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"fill": 3, "fill": 3,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
@ -3268,7 +3298,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -3365,7 +3395,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -3462,7 +3492,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -3576,7 +3606,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -3674,7 +3704,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -3772,7 +3802,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -3884,7 +3914,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -3982,7 +4012,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -4080,7 +4110,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 5, "fill": 5,
@ -4233,7 +4263,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -4341,7 +4371,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -4534,7 +4564,7 @@
"text": "0.99", "text": "0.99",
"value": "0.99" "value": "0.99"
}, },
"datasource": "Prometheus", "datasource":"${DS_PROMETHEUS}",
"definition": "query_result({__name__=~\"prometheus_.*_seconds\"})", "definition": "query_result({__name__=~\"prometheus_.*_seconds\"})",
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,

View file

@ -73,6 +73,9 @@ def _create_dashboard_configmaps(output_dir, namespace):
dashboard_cm = yaml.load(f, Loader=yaml.SafeLoader) dashboard_cm = yaml.load(f, Loader=yaml.SafeLoader)
dashboard_cm["metadata"]["labels"] = dict() dashboard_cm["metadata"]["labels"] = dict()
dashboard_cm["metadata"]["labels"]["grafana_dashboard"] = dashboard_name dashboard_cm["metadata"]["labels"]["grafana_dashboard"] = dashboard_name
dashboard_cm["data"][dashboard] = dashboard_cm["data"][dashboard].replace(
'"${DS_PROMETHEUS}"', "null"
)
with open(output_file, "w") as f: with open(output_file, "w") as f:
yaml.dump(dashboard_cm, f) yaml.dump(dashboard_cm, f)