fix: correct metric name for immich version

Signed-off-by: martin <martin.labat92@gmail.com>
This commit is contained in:
martin 2023-02-19 12:16:32 +01:00
parent e6870170aa
commit 05a3dd2501
No known key found for this signature in database
GPG key ID: 4544CC55835A3B9E
2 changed files with 742 additions and 693 deletions

View file

@ -1,4 +1,53 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.3.6"
},
{
"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": "table",
"name": "Table",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
@ -24,7 +73,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 65,
"id": null,
"links": [],
"liveNow": false,
"panels": [
@ -42,7 +91,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
@ -93,7 +142,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
@ -111,7 +160,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
@ -162,11 +211,11 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
"expr": "immich_app_nb_users",
"expr": "immich_app_number_users",
"format": "table",
"instant": true,
"legendFormat": "__auto",
@ -180,7 +229,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
@ -335,7 +384,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
@ -353,7 +402,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
@ -431,7 +480,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
@ -448,7 +497,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
@ -525,7 +574,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "immich_app_total_photos + immich_app_total_videos",
@ -540,7 +589,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
@ -588,7 +637,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "immich_app_total_photos",
@ -599,7 +648,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "immich_app_total_videos",
@ -615,7 +664,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
@ -663,7 +712,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "zBtc3iPnk"
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
@ -693,6 +742,6 @@
"timezone": "",
"title": "Immich",
"uid": "9QXCv3AVk",
"version": 7,
"version": 8,
"weekStart": ""
}
}

View file

@ -68,7 +68,7 @@ func SendBackMessagePreference(result *models.StructServerInfo, result2 *models.
func SendBackMessageserverVersion(result *models.StructServerVersion, r *prometheus.Registry) {
version := prometheus.NewGauge(prometheus.GaugeOpts{
Name: "version",
Name: "immich_app_version",
Help: "Immich version",
ConstLabels: map[string]string{
"version": strconv.Itoa((*result).Major) + "." + strconv.Itoa((*result).Minor) + "." + strconv.Itoa((*result).Patch),