diff --git a/INTEGRATIONS.md b/INTEGRATIONS.md index 9be3e07..feae9da 100644 --- a/INTEGRATIONS.md +++ b/INTEGRATIONS.md @@ -408,7 +408,7 @@ osTicket's API cannot close a ticket, so this is the one place in the app that * ### Immich - **Config fields:** the **address** of Immich (`http://host:2283`), an **API key** (Immich → Account Settings → API Keys; stored encrypted) and, for an https address with a certificate you made yourself, *insecure*. -- **Required access:** read only. Give the key just these permissions: `server.about`, `server.storage`, `server.versionCheck`, `server.statistics` and `job.read` (`queue.read` on newer versions) — statistics and jobs need an administrator's key. Without one of them that part is left out (and **Inspect** shows the reason Immich gave, such as *Missing required permission: server.versionCheck*). This app only ever sends GET requests; **nothing is changed, and no job is started, paused or cleared**. +- **Required access:** read only. Give the key just these permissions: `server.about`, `server.storage`, `server.versionCheck`, `server.statistics` and `job.read` (`queue.read` on newer versions) — statistics and jobs need a key **made by an administrator user** (the permissions alone are not enough; Immich answers “Forbidden”). Without one of them that part is left out (and **Inspect** shows the reason Immich gave, such as *Missing required permission: server.versionCheck*). This app only ever sends GET requests; **nothing is changed, and no job is started, paused or cleared**. If one of those is refused, that part is left out and the rest still works. - **What it does:** every **five minutes** Immich is read and stored — its version (and whether a newer one is out), how full the **disk under the library** is, how many **photos and videos** there are and what they take, and the **background job queues** with how many jobs **failed** in each. **Apps → Immich** shows it. @@ -416,7 +416,7 @@ osTicket's API cannot close a ticket, so this is the one place in the app that * Failed jobs stay counted until you run them again or clear them in Immich, so the alert stays until you do). - If Immich cannot be read for 20 minutes its alerts are neither raised nor cleared, the Alerts page says it could not check, and the integration is raised as failing like any other. A part that could not be asked is *unknown*, never *none*. - `/metrics` has `homelab_immich_photos`, `homelab_immich_videos`, `homelab_immich_library_bytes`, `homelab_immich_disk_used_percent` and `homelab_immich_failed_jobs` for each Immich that was read lately. -- **Partly checked against a live Immich** (Inspect): `/api/server/about` and `/api/server/storage` answered as the reader expects (version, disk size, used and percent). On the first check the other four (`/server/statistics`, `/server/version-check`, `/jobs`, `/queues`) were refused with a short message instead of data — most likely a key without those permissions or not an administrator's — so photos, videos, usage, the latest version and the job queues are **not yet seen with data**. The endpoints (`/api/server/about`, `/server/storage`, `/server/statistics`, `/server/version-check`, `/api/jobs`, and `/api/queues` on newer versions) and their fields are as Immich publishes them, and the reader is tried against a pretend server that answers both ways. Immich renames +- **Partly checked against a live Immich** (Inspect): `/api/server/about` and `/api/server/storage` answered as the reader expects (version, disk size, used and percent). On the second check `/server/version-check` answered too (`checkedAt`, `releaseVersion`, which gives the latest version). `/server/statistics`, `/jobs` and `/queues` were refused with a plain **“Forbidden”**, which Immich says when the key is fine but **its user is not an administrator** (a missing permission reads “Missing required permission: …” instead) — so photos, videos, usage and the job queues are **not yet seen with data**; make the API key while signed in as an administrator. The page says so where those figures would be. The endpoints (`/api/server/about`, `/server/storage`, `/server/statistics`, `/server/version-check`, `/api/jobs`, and `/api/queues` on newer versions) and their fields are as Immich publishes them, and the reader is tried against a pretend server that answers both ways. Immich renames these now and then; the **Diagnostic Log** has what was asked and answered if something comes back empty. Whether a *waiting* backlog is a problem is not judged: a big import has one for days. ### Nextcloud diff --git a/server/src/integrations/immich/adapter.ts b/server/src/integrations/immich/adapter.ts index 6b0a563..dff0a88 100644 --- a/server/src/integrations/immich/adapter.ts +++ b/server/src/integrations/immich/adapter.ts @@ -6,7 +6,7 @@ * background job queues — above all how many jobs have **failed** (thumbnails or metadata that were never made). Nothing is sent to Immich but GET requests for these. * * Endpoints and field names are from Immich's published API (`/api/server/about`, `/server/storage`, `/server/statistics`, `/server/version-check`, `/jobs` — `/queues` on newer - * versions) and were checked against a live server only for `/server/about` and `/server/storage` (the others were refused for lack of permission); every field is read defensively, and a part that cannot be read (statistics need an administrator's key) is left out. + * versions) and were checked against a live server for `/server/about`, `/server/storage` and `/server/version-check` (statistics and the job queues answered "Forbidden": they need a key made by an administrator user); every field is read defensively, and a part that cannot be read (statistics need an administrator's key) is left out. */ import { requestJson } from "../httpJson.js"; import { withDiagLogging } from "../../services/diagLog.js"; diff --git a/web/src/i18n/sv.ts b/web/src/i18n/sv.ts index 6413cf7..72bd92d 100644 --- a/web/src/i18n/sv.ts +++ b/web/src/i18n/sv.ts @@ -833,6 +833,7 @@ export const sv: Record = { "Ignore": "Ignorera", "Ignore this finding": "Ignorera det här fyndet", "Image": "Avbild", + "Immich did not answer about its jobs. Reading them needs an API key made by an administrator, with permission to read jobs.": "Immich svarade inte om sina jobb. För att läsa dem behövs en API-nyckel som en administratör har skapat, med rätt att läsa jobb.", "Import": "Importera", "Import backup": "Importera säkerhetskopia", "Import configuration": "Importera konfiguration", @@ -2074,6 +2075,7 @@ export const sv: Record = { "The apps you run, and whether each is working.": "Apparna du kör, och om var och en fungerar.", "The controller has not reported any, or has not been read yet. Press Read now.": "Kontrollern har inte rapporterat några, eller har inte lästs ännu. Tryck på Läs nu.", "The controller has not seen it online": "Kontrollern har inte sett den online", + "The counts are not available: Immich only gives them to an API key made by an administrator.": "Antalen är inte tillgängliga: Immich ger dem bara till en API-nyckel som en administratör har skapat.", "The database becomes": "Databasen blir", "The database that was in use when a restore took effect — restore this to undo it": "Databasen som användes när en återställning trädde i kraft — återställ den här för att ångra", "The database was restored": "Databasen återställdes", diff --git a/web/src/pages/Immich.tsx b/web/src/pages/Immich.tsx index 37a189c..e49e600 100644 --- a/web/src/pages/Immich.tsx +++ b/web/src/pages/Immich.tsx @@ -50,6 +50,7 @@ function Card({ i }: { i: ImmichInfo }) {
{[s.version ? `version ${s.version}` : null, s.updateAvailable && s.latestVersion ? `${s.latestVersion} is out` : null].filter(Boolean).join(" · ")}
+ {s.photos === null && s.videos === null &&
{t("The counts are not available: Immich only gives them to an API key made by an administrator.")}
}
@@ -97,7 +98,7 @@ function Card({ i }: { i: ImmichInfo }) {

Background jobs{failed > 0 && {failed} failed}

{!s.queues ? ( -
Immich did not answer about its jobs (the API key needs to be allowed to read them).
+
{t("Immich did not answer about its jobs. Reading them needs an API key made by an administrator, with permission to read jobs.")}
) : (