Add Immich Grafana dashboard
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: immich-grafana-dashboard
|
||||
namespace: immich
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
immich.json: |-
|
||||
{
|
||||
"uid": "immich",
|
||||
"title": "Immich",
|
||||
"tags": ["immich", "homelab"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "30s",
|
||||
"time": {"from": "now-6h", "to": "now"},
|
||||
"panels": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "CPU by pod and container",
|
||||
"type": "timeseries",
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"gridPos": {"x": 0, "y": 0, "w": 12, "h": 8},
|
||||
"targets": [{"refId": "A", "expr": "sum by (pod, container) (rate(container_cpu_usage_seconds_total{namespace=\"immich\",pod=~\"immich-(server|machine-learning|valkey|postgresql-[0-9]+).*\",container!=\"\",container!=\"POD\"}[5m]))", "legendFormat": "{{pod}} / {{container}}"}],
|
||||
"fieldConfig": {"defaults": {"unit": "cores", "custom": {"drawStyle": "line", "lineWidth": 2, "fillOpacity": 10}}, "overrides": []},
|
||||
"options": {"legend": {"displayMode": "table", "placement": "bottom"}, "tooltip": {"mode": "multi", "sort": "desc"}}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "Memory working set by pod and container",
|
||||
"type": "timeseries",
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"gridPos": {"x": 12, "y": 0, "w": 12, "h": 8},
|
||||
"targets": [{"refId": "A", "expr": "sum by (pod, container) (container_memory_working_set_bytes{namespace=\"immich\",pod=~\"immich-(server|machine-learning|valkey|postgresql-[0-9]+).*\",container!=\"\",container!=\"POD\"})", "legendFormat": "{{pod}} / {{container}}"}],
|
||||
"fieldConfig": {"defaults": {"unit": "bytes", "custom": {"drawStyle": "line", "lineWidth": 2, "fillOpacity": 10}}, "overrides": []},
|
||||
"options": {"legend": {"displayMode": "table", "placement": "bottom"}, "tooltip": {"mode": "multi", "sort": "desc"}}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title": "Network throughput by pod",
|
||||
"type": "timeseries",
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"gridPos": {"x": 0, "y": 8, "w": 12, "h": 8},
|
||||
"targets": [
|
||||
{"refId": "A", "expr": "sum by (pod) (rate(container_network_receive_bytes_total{namespace=\"immich\",pod=~\"immich-(server|machine-learning|valkey|postgresql-[0-9]+).*\",interface!=\"lo\"}[5m]))", "legendFormat": "{{pod}} receive"},
|
||||
{"refId": "B", "expr": "sum by (pod) (rate(container_network_transmit_bytes_total{namespace=\"immich\",pod=~\"immich-(server|machine-learning|valkey|postgresql-[0-9]+).*\",interface!=\"lo\"}[5m]))", "legendFormat": "{{pod}} transmit"}
|
||||
],
|
||||
"fieldConfig": {"defaults": {"unit": "Bps", "custom": {"drawStyle": "line", "lineWidth": 2}}, "overrides": []},
|
||||
"options": {"legend": {"displayMode": "table", "placement": "bottom"}, "tooltip": {"mode": "multi", "sort": "desc"}}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"title": "Immich database size",
|
||||
"type": "stat",
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"gridPos": {"x": 12, "y": 8, "w": 6, "h": 4},
|
||||
"targets": [{"refId": "A", "expr": "max(cnpg_pg_database_size_bytes{namespace=\"immich\",datname=\"immich\"})", "instant": true, "legendFormat": "immich"}],
|
||||
"fieldConfig": {"defaults": {"unit": "bytes", "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}]}}, "overrides": []},
|
||||
"options": {"colorMode": "value", "graphMode": "area", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "orientation": "auto", "textMode": "auto"}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"title": "PostgreSQL replication lag",
|
||||
"type": "timeseries",
|
||||
"datasource": {"type": "prometheus", "uid": "aevstx976yku8a"},
|
||||
"gridPos": {"x": 12, "y": 12, "w": 12, "h": 4},
|
||||
"targets": [{"refId": "A", "expr": "max by (pod) (cnpg_pg_replication_lag{namespace=\"immich\"})", "legendFormat": "{{pod}}"}],
|
||||
"fieldConfig": {"defaults": {"unit": "s", "custom": {"drawStyle": "line", "lineWidth": 2}}, "overrides": []},
|
||||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}}
|
||||
}
|
||||
],
|
||||
"annotations": {"list": []},
|
||||
"links": []
|
||||
}
|
||||
@@ -2,4 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- alerts.yaml
|
||||
- dashboard.yaml
|
||||
- library-storage.yaml
|
||||
|
||||
Reference in New Issue
Block a user