From cf29943ebe239a741d361303a402f32e3c56ba6c Mon Sep 17 00:00:00 2001 From: martin <74269598+martabal@users.noreply.github.com> Date: Wed, 22 Feb 2023 21:48:50 +0100 Subject: [PATCH] fix(dashboard): show total photos & videos (#1) --- grafana/dashboard.json | 167 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 154 insertions(+), 13 deletions(-) diff --git a/grafana/dashboard.json b/grafana/dashboard.json index f676191..309ba50 100644 --- a/grafana/dashboard.json +++ b/grafana/dashboard.json @@ -118,10 +118,79 @@ }, "gridPos": { "h": 6, - "w": 9, + "w": 5, "x": 0, "y": 1 }, + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "first" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.6", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "immich_app_number_users", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Number of users", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "string" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 5, + "y": 1 + }, "id": 4, "options": { "colorMode": "value", @@ -188,10 +257,10 @@ "gridPos": { "h": 6, "w": 5, - "x": 9, + "x": 14, "y": 1 }, - "id": 13, + "id": 16, "options": { "colorMode": "value", "graphMode": "none", @@ -215,7 +284,76 @@ }, "editorMode": "code", "exemplar": false, - "expr": "immich_app_number_users", + "expr": "immich_app_total_photos", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Number of photos", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "string" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 5, + "x": 19, + "y": 1 + }, + "id": 17, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "first" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.6", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "immich_app_total_videos", "format": "table", "instant": true, "legendFormat": "__auto", @@ -423,14 +561,17 @@ "tooltip": false, "viz": false }, - "lineInterpolation": "linear", + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, - "showPoints": "auto", - "spanNulls": false, + "showPoints": "never", + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -485,9 +626,9 @@ "editorMode": "code", "exemplar": false, "expr": "immich_user_usage", - "instant": true, + "instant": false, "legendFormat": "{{firstname}} {{lastname}}", - "range": false, + "range": true, "refId": "A" } ], @@ -524,8 +665,8 @@ "scaleDistribution": { "type": "linear" }, - "showPoints": "auto", - "spanNulls": false, + "showPoints": "never", + "spanNulls": true, "stacking": { "group": "A", "mode": "none" @@ -735,13 +876,13 @@ "list": [] }, "time": { - "from": "now-6h", + "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Immich", "uid": "9QXCv3AVk", - "version": 8, + "version": 9, "weekStart": "" } \ No newline at end of file