From 513856beffcad781e733d039221d0c57e762c9c1 Mon Sep 17 00:00:00 2001 From: Vegard Fladby Date: Thu, 20 Jul 2023 18:15:05 +0200 Subject: [PATCH] Further edit of readme - Added better description on UnRaid template - Added Immich_api_token to readme - Populated default Immich_port 8080 in Dockerfile - Clarified that it's the Immich Proxy that you need to connect to, not Immich Server --- Dockerfile | 2 +- README.md | 23 ++++++----------------- unraid/prometheus-immich-exporter.xml | 6 +++--- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index a2c1b72..f58eb14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN pip3 install . ENV IMMICH_API_TOKEN="" ENV IMMICH_HOST="" -ENV IMMICH_PORT="" +ENV IMMICH_PORT="8080" #has to be EXPORT_PORT 8000 or else it does not work, same applies to the env file ENV EXPORTER_PORT="8000" ENV EXPORTER_LOG_LEVEL="INFO" diff --git a/README.md b/README.md index fc94115..1639c24 100644 --- a/README.md +++ b/README.md @@ -5,26 +5,14 @@ A prometheus exporter for Immich. Get metrics from a server and offers them in a ## How to use it -You can install this exporter with the following command: - -```bash -pip3 install prometheus-qbittorrent-exporter -``` - -Then you can run it with +Here is an example docker run command ``` -immich-exporter -``` - -Another option is to run it in a docker container. Here is an example docker run command - -``` -docker run -e IMMICH_PORT=8010 -e IMMICH_HOST=192.168.178.1 -p 8000:8000 friendlyfriend/prometheus-immich-exporter +docker run -e IMMICH_PORT=8080 -e IMMICH_HOST=192.168.178.1 -e IMMICH_API_TOKEN=TOKEN -p 8000:8000 friendlyfriend/prometheus-immich-exporter ``` Add this to your prometheus.yml ``` - - job_name: "immich_exporter" + - job_name: "Immich_exporter" static_configs: - targets: ['yourimmichexporter:port'] ``` @@ -32,8 +20,9 @@ The application reads configuration using environment variables: | Environment variable | Default | Description | |----------------------|----------|----------------------------------------------------| -| `IMMICH_HOST` | | immich server hostname | -| `IMMICH_PORT` | | immich server port | +| `IMMICH_HOST` | | Immich proxy url | +| `IMMICH_PORT` | `8080` | Immich proxy port | +| `IMMICH_API_TOKEN` | | Immich API token, created from Immich dashboard | | `EXPORTER_PORT` | `8000` | Exporter listening port | | `EXPORTER_LOG_LEVEL` | `INFO` | Log level. One of: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL` | | `METRICS_PREFIX` | `immich` | Prefix to add to all the metrics | diff --git a/unraid/prometheus-immich-exporter.xml b/unraid/prometheus-immich-exporter.xml index 41bc295..6953cb7 100644 --- a/unraid/prometheus-immich-exporter.xml +++ b/unraid/prometheus-immich-exporter.xml @@ -21,8 +21,8 @@ If I made your day a little bit brighter, consider donating. https://www.paypal.com/donate/?hosted_button_id=DPDKED3T3BFV8 - 8028 + 8000 - - + + \ No newline at end of file