Allow change of datasource/select datasource at import.

This commit is contained in:
Vegard Fladby 2023-07-20 18:00:32 +02:00
parent 9d5a7c0bef
commit fb668bf3e2

View file

@ -1,4 +1,47 @@
{ {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.0.2"
},
{
"type": "panel",
"id": "piechart",
"name": "Pie chart",
"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": [
{ {
@ -24,12 +67,15 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": 11, "id": null,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -72,10 +118,13 @@
}, },
"textMode": "name" "textMode": "name"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "immich_server_info_version_number", "expr": "immich_server_info_version_number",
@ -89,7 +138,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -133,10 +185,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "immich_server_stats_user_count", "expr": "immich_server_stats_user_count",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -148,7 +203,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -189,10 +247,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "sum(immich_server_stats_usage_by_users)", "expr": "sum(immich_server_stats_usage_by_users)",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -204,7 +265,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -245,10 +309,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "immich_server_info_totalDiskSize", "expr": "immich_server_info_totalDiskSize",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -260,7 +327,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -301,10 +371,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "immich_server_info_diskUse", "expr": "immich_server_info_diskUse",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -316,7 +389,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -357,10 +433,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "100 - immich_server_info_diskUsagePercentage", "expr": "100 - immich_server_info_diskUsagePercentage",
@ -376,7 +455,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -418,10 +500,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "increase(immich_server_stats_usage_growth[24h])", "expr": "increase(immich_server_stats_usage_growth[24h])",
@ -436,7 +521,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -478,10 +566,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_useage_growth[7d])", "expr": "increase(immich_server_stats_useage_growth[7d])",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -494,7 +585,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -543,7 +637,10 @@
}, },
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "immich_server_stats_usage_by_users", "expr": "immich_server_stats_usage_by_users",
"legendFormat": "{{firstName}}", "legendFormat": "{{firstName}}",
@ -555,7 +652,10 @@
"type": "piechart" "type": "piechart"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -597,10 +697,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_usage_growth[30h])", "expr": "increase(immich_server_stats_usage_growth[30h])",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -613,7 +716,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -655,10 +761,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_useage_growth[365d])", "expr": "increase(immich_server_stats_useage_growth[365d])",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -671,7 +780,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"mappings": [], "mappings": [],
@ -710,10 +822,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_photos_growth[24h])", "expr": "increase(immich_server_stats_photos_growth[24h])",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -726,7 +841,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"mappings": [], "mappings": [],
@ -765,10 +883,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_photos_growth[7d])", "expr": "increase(immich_server_stats_photos_growth[7d])",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -781,7 +902,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -830,7 +954,10 @@
}, },
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"exemplar": false, "exemplar": false,
"expr": "immich_server_stats_photos_by_users", "expr": "immich_server_stats_photos_by_users",
@ -844,7 +971,10 @@
"type": "piechart" "type": "piechart"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -885,10 +1015,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_photos_growth[4w])", "expr": "increase(immich_server_stats_photos_growth[4w])",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -901,7 +1034,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -942,10 +1078,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_photos_growth[52w])", "expr": "increase(immich_server_stats_photos_growth[52w])",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -958,7 +1097,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "amount of photos over time", "description": "amount of photos over time",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@ -1034,7 +1176,10 @@
}, },
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "immich_server_stats_photos_by_users", "expr": "immich_server_stats_photos_by_users",
"legendFormat": "{{firstName}}", "legendFormat": "{{firstName}}",
@ -1047,7 +1192,10 @@
"type": "timeseries" "type": "timeseries"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -1088,10 +1236,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_videos_growth[1d])", "expr": "increase(immich_server_stats_videos_growth[1d])",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -1104,7 +1255,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -1145,10 +1299,13 @@
}, },
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "9.4.3", "pluginVersion": "10.0.2",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_videos_growth[1w])", "expr": "increase(immich_server_stats_videos_growth[1w])",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -1161,7 +1318,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -1210,7 +1370,10 @@
}, },
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "immich_server_stats_videos_by_users", "expr": "immich_server_stats_videos_by_users",
"legendFormat": "{{firstName}}", "legendFormat": "{{firstName}}",
@ -1222,7 +1385,10 @@
"type": "piechart" "type": "piechart"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -1233,8 +1399,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
} }
] ]
} }
@ -1266,7 +1431,10 @@
"pluginVersion": "9.4.3", "pluginVersion": "9.4.3",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_videos_growth[4w])\r\n", "expr": "increase(immich_server_stats_videos_growth[4w])\r\n",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -1279,7 +1447,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
@ -1290,8 +1461,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
} }
] ]
} }
@ -1323,7 +1493,10 @@
"pluginVersion": "9.4.3", "pluginVersion": "9.4.3",
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "increase(immich_server_stats_videos_growth[52w])\r\n", "expr": "increase(immich_server_stats_videos_growth[52w])\r\n",
"legendFormat": "__auto", "legendFormat": "__auto",
@ -1336,7 +1509,10 @@
"type": "stat" "type": "stat"
}, },
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "amount of videos over time", "description": "amount of videos over time",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
@ -1381,8 +1557,7 @@
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "green", "color": "green"
"value": null
} }
] ]
} }
@ -1410,7 +1585,10 @@
}, },
"targets": [ "targets": [
{ {
"datasource": "Prometheus", "datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code", "editorMode": "code",
"expr": "immich_server_stats_videos_by_users", "expr": "immich_server_stats_videos_by_users",
"legendFormat": "{{firstName}}", "legendFormat": "{{firstName}}",
@ -1439,6 +1617,6 @@
"timezone": "", "timezone": "",
"title": "immich", "title": "immich",
"uid": "ZWWp3aa4k", "uid": "ZWWp3aa4k",
"version": 9, "version": 1,
"weekStart": "" "weekStart": ""
} }