Fix Grafana dashboard data-source names

These were prepared as import-able dashboards, which prepares common
options as variables to be provided by the user, and thus is not
compatible with automated provisioning.
This commit is contained in:
Alex Palaistras 2022-05-09 13:59:49 +01:00
parent 80b3a5365e
commit 10deb13f76
2 changed files with 48 additions and 134 deletions

View File

@ -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": "8.5.0"
},
{
"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": { "annotations": {
"list": [ "list": [
{ {
@ -62,14 +25,14 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 7,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -147,7 +110,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "up{instance=\"dovecot:9900\"}", "expr": "up{instance=\"dovecot:9900\"}",
@ -164,7 +127,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -211,7 +174,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"expr": "sum(rate(dovecot_client_connection_count{}[2m]))", "expr": "sum(rate(dovecot_client_connection_count{}[2m]))",
"refId": "A" "refId": "A"
@ -224,7 +187,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -271,7 +234,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"expr": "sum(rate(dovecot_server_connection_count[2m]))", "expr": "sum(rate(dovecot_server_connection_count[2m]))",
"refId": "A" "refId": "A"
@ -284,7 +247,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -331,7 +294,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "dovecot_build_info", "expr": "dovecot_build_info",
@ -360,7 +323,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The rate of requests for authentication, by `passdb` name and result.", "description": "The rate of requests for authentication, by `passdb` name and result.",
"fieldConfig": { "fieldConfig": {
@ -431,7 +394,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "rate(dovecot_auth_passdb_request_count{}[2m])", "expr": "rate(dovecot_auth_passdb_request_count{}[2m])",
@ -446,7 +409,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The rate of requests for user information, by `userdb` name and result.", "description": "The rate of requests for user information, by `userdb` name and result.",
"fieldConfig": { "fieldConfig": {
@ -517,7 +480,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "rate(dovecot_auth_userdb_request_count{}[2m])", "expr": "rate(dovecot_auth_userdb_request_count{}[2m])",
@ -532,7 +495,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The current rate of incoming client connections established.", "description": "The current rate of incoming client connections established.",
"fieldConfig": { "fieldConfig": {
@ -604,7 +567,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(rate(dovecot_client_connection_count{}[2m]))", "expr": "sum(rate(dovecot_client_connection_count{}[2m]))",
@ -619,7 +582,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The current rate of outgoing server connections established.", "description": "The current rate of outgoing server connections established.",
"fieldConfig": { "fieldConfig": {
@ -691,7 +654,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"expr": "sum(rate(dovecot_server_connection_count[2m]))", "expr": "sum(rate(dovecot_server_connection_count[2m]))",
"refId": "A" "refId": "A"
@ -716,7 +679,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The rate of IMAP commands executed for a authenticated users.", "description": "The rate of IMAP commands executed for a authenticated users.",
"fieldConfig": { "fieldConfig": {
@ -788,7 +751,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(rate(dovecot_imap_command_count{cmd_name!=\"\",tagged_reply_state!=\"\"}[2m])) by (cmd_name, tagged_reply_state, user)", "expr": "sum(rate(dovecot_imap_command_count{cmd_name!=\"\",tagged_reply_state!=\"\"}[2m])) by (cmd_name, tagged_reply_state, user)",
@ -803,7 +766,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The rate of SQL queries executed for a authenticated users.", "description": "The rate of SQL queries executed for a authenticated users.",
"fieldConfig": { "fieldConfig": {
@ -875,7 +838,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(rate(dovecot_sql_query_count[2m])) by (query_first_word, error_code)", "expr": "sum(rate(dovecot_sql_query_count[2m])) by (query_first_word, error_code)",
@ -890,7 +853,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The rate of Sieve scripts executing, by script name.", "description": "The rate of Sieve scripts executing, by script name.",
"fieldConfig": { "fieldConfig": {
@ -962,7 +925,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(rate(dovecot_sieve_script_count[2m])) by (script_name, error)", "expr": "sum(rate(dovecot_sieve_script_count[2m])) by (script_name, error)",
@ -977,7 +940,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The rate of Sieve script actions taken, by name.", "description": "The rate of Sieve script actions taken, by name.",
"fieldConfig": { "fieldConfig": {
@ -1049,7 +1012,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(rate(dovecot_sieve_action_count[2m])) by (action_name)", "expr": "sum(rate(dovecot_sieve_action_count[2m])) by (action_name)",
@ -1080,6 +1043,6 @@
"timezone": "", "timezone": "",
"title": "Dovecot", "title": "Dovecot",
"uid": "LOE5wuQ7k", "uid": "LOE5wuQ7k",
"version": 3, "version": 4,
"weekStart": "" "weekStart": ""
} }

View File

@ -1,53 +1,4 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": [],
"__requires": [
{
"type": "panel",
"id": "bargauge",
"name": "Bar gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.5.0"
},
{
"type": "panel",
"id": "heatmap",
"name": "Heatmap",
"version": ""
},
{
"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": { "annotations": {
"list": [ "list": [
{ {
@ -74,14 +25,14 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": null, "id": 4,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -159,7 +110,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "up{instance=\"prosody:5280\"}", "expr": "up{instance=\"prosody:5280\"}",
@ -176,7 +127,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -227,7 +178,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"expr": "sum(prosody_mod_s2s__connections_inbound) + sum(prosody_mod_s2s__connections_outbound)", "expr": "sum(prosody_mod_s2s__connections_inbound) + sum(prosody_mod_s2s__connections_outbound)",
"refId": "A" "refId": "A"
@ -240,7 +191,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -291,7 +242,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"expr": "sum(prosody_mod_c2s__connections)", "expr": "sum(prosody_mod_c2s__connections)",
"refId": "A" "refId": "A"
@ -304,7 +255,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "", "description": "",
"fieldConfig": { "fieldConfig": {
@ -352,7 +303,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(prosody_mod_muc__live_room) by (host)", "expr": "sum(prosody_mod_muc__live_room) by (host)",
@ -381,7 +332,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "Client connections established against Prosody, by host and type.", "description": "Client connections established against Prosody, by host and type.",
"fieldConfig": { "fieldConfig": {
@ -452,7 +403,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(prosody_mod_c2s__connections) by (host, type)", "expr": "sum(prosody_mod_c2s__connections) by (host, type)",
@ -467,7 +418,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "Server connections established against Prosody, by host and IP family.", "description": "Server connections established against Prosody, by host and IP family.",
"fieldConfig": { "fieldConfig": {
@ -538,7 +489,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(prosody_mod_s2s__connections_inbound) by (host, ip_family)", "expr": "sum(prosody_mod_s2s__connections_inbound) by (host, ip_family)",
@ -553,7 +504,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "Server connections established by Prosody, by host and IP family.", "description": "Server connections established by Prosody, by host and IP family.",
"fieldConfig": { "fieldConfig": {
@ -624,7 +575,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "sum(prosody_mod_s2s__connections_outbound) by (host, ip_family)", "expr": "sum(prosody_mod_s2s__connections_outbound) by (host, ip_family)",
@ -661,7 +612,7 @@
"dataFormat": "tsbuckets", "dataFormat": "tsbuckets",
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The number of HTTP file uploads processed, by size.", "description": "The number of HTTP file uploads processed, by size.",
"gridPos": { "gridPos": {
@ -683,7 +634,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
@ -716,7 +667,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The cumulative size of HTTP uploads against the shared daily quota.", "description": "The cumulative size of HTTP uploads against the shared daily quota.",
"fieldConfig": { "fieldConfig": {
@ -773,7 +724,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"expr": "increase(prosody_mod_http_file_share__upload_bytes_sum[24h])", "expr": "increase(prosody_mod_http_file_share__upload_bytes_sum[24h])",
"refId": "A" "refId": "A"
@ -785,7 +736,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"description": "The cumulative size of HTTP uploads against the shared global quota.", "description": "The cumulative size of HTTP uploads against the shared global quota.",
"fieldConfig": { "fieldConfig": {
@ -842,7 +793,7 @@
{ {
"datasource": { "datasource": {
"type": "prometheus", "type": "prometheus",
"uid": "${DS_PROMETHEUS}" "uid": "Prometheus"
}, },
"expr": "prosody_mod_http_file_share__total_storage_bytes", "expr": "prosody_mod_http_file_share__total_storage_bytes",
"refId": "A" "refId": "A"
@ -871,6 +822,6 @@
"timezone": "", "timezone": "",
"title": "Prosody", "title": "Prosody",
"uid": "gU7aVBQnk", "uid": "gU7aVBQnk",
"version": 11, "version": 12,
"weekStart": "" "weekStart": ""
} }