Skip to content

Commit

Permalink
Merge pull request #233 from nsg/bump/v1.119.0
Browse files Browse the repository at this point in the history
Bump v1.119.0
  • Loading branch information
nsg authored Oct 29, 2024
2 parents 46339f4 + 86b519c commit 76383e9
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 27 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.118.2
v1.119.0
20 changes: 20 additions & 0 deletions docs/docs/configuration/metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Metrics

Immich supports Prometheus based metrics. You can read more about them over at the [official Immich documentation](https://immich.app/docs/features/monitoring/). You can configure the metrics via two configuration keys. `metrics-telemetry-include` and `metrics-telemetry-exclude`. They map to the environment variables `IMMICH_TELEMETRY_INCLUDE` and `IMMICH_TELEMETRY_EXCLUDE` [documented here](https://immich.app/docs/install/environment-variables#prometheus).

## Examples

```sh title="Enable all metrics"
sudo snap set immich-distribution metrics-telemetry-include="all"
```

```sh title="Enable only api metrics"
sudo snap set immich-distribution metrics-telemetry-include="api"
```

```sh title="Enable all, except api metrics"
sudo snap set immich-distribution metrics-telemetry-include="all"
sudo snap set immich-distribution metrics-telemetry-exclude="api"
```

Mix and match as you see please, available options are `host`, `api`, `io`, `repo`, `job`.
10 changes: 10 additions & 0 deletions docs/docs/news/posts/2024/10/metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
date: 2024-10-28
author: [nsg]
---

# Breaking change in Metrics Configuration

The upstream Immich project has changed the configuration format for metrics in the [v1.119.0 release](https://github.com/immich-app/immich/releases/tag/v1.119.0). You will be affected if you have enabled `metrics-enabled` and configured `metrics-api-enabled`, `metrics-host-enabled`, `metrics-io-enabled` or `metrics-job-enabled` to limit collected telemetries.

Check out the [metrics documentation](/configuration/metrics) for more information.
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ nav:
- configuration/postgres.md
- configuration/haproxy.md
- configuration/sync.md
- configuration/metrics.md
- Contribute:
- Upgrade: build/upgrade.md
- Tests: build/tests.md
Expand Down
2 changes: 1 addition & 1 deletion parts/machine-learning/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
IMMICH_VERSION := v1.118.2
IMMICH_VERSION := v1.119.0

POETRY_ENV = ${HOME}/poetry
POETRY = ${POETRY_ENV}/bin/poetry
Expand Down
25 changes: 8 additions & 17 deletions snap/hooks/configure
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,16 @@ if [[ $(snapctl get sync-delete-threshold) == "" ]]; then
snapctl set sync-delete-threshold="300"
fi

if [[ $(snapctl get metrics-enabled) == "" ]]; then
snapctl set metrics-enabled="false"
if [[ $(snapctl get metrics-enabled) == "true" ]]; then
snapctl set metrics-telemetry-include="all"
fi

if [[ $(snapctl get metrics-api-enabled) == "" ]]; then
snapctl set metrics-api-enabled="false"
fi

if [[ $(snapctl get metrics-host-enabled) == "" ]]; then
snapctl set metrics-host-enabled="false"
fi

if [[ $(snapctl get metrics-io-enabled) == "" ]]; then
snapctl set metrics-io-enabled="false"
fi

if [[ $(snapctl get metrics-job-enabled) == "" ]]; then
snapctl set metrics-job-enabled="false"
fi
# Clean up legacy metrics configuration
snapctl unset metrics-enabled
snapctl unset metrics-api-enabled
snapctl unset metrics-host-enabled
snapctl unset metrics-io-enabled
snapctl unset metrics-job-enabled

if [[ $(snapctl get backup-database-daily) == "" ]]; then
snapctl set backup-database-daily="false"
Expand Down
6 changes: 3 additions & 3 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: immich-distribution
title: Immich Distribution
version: "v1.118.2"
version: "v1.119.0"
base: core22
grade: stable
confinement: strict
Expand Down Expand Up @@ -165,7 +165,7 @@ parts:
server:
plugin: nil
source: https://github.com/immich-app/immich.git
source-tag: v1.118.2
source-tag: v1.119.0
override-build: |
craftctl default
Expand Down Expand Up @@ -253,7 +253,7 @@ parts:
web:
plugin: nil
source: https://github.com/immich-app/immich.git
source-tag: v1.118.2
source-tag: v1.119.0
override-build: |
# Build typescript-sdk, this is included by cli and web
cd open-api/typescript-sdk
Expand Down
7 changes: 2 additions & 5 deletions src/bin/load-env
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,8 @@ export IMMICH_BUILD_DATA="$SNAP/var/lib/immich/build" # Contains www, geodata an
export IMMICH_MEDIA_LOCATION="$SNAP_COMMON/upload"
export IMMICH_API_METRICS_PORT=8081
export IMMICH_MICROSERVICES_METRICS_PORT=8082
export IMMICH_METRICS="$(snapctl get metrics-enabled)"
export IMMICH_API_METRICS="$(snapctl get metrics-api-enabled)"
export IMMICH_HOST_METRICS="$(snapctl get metrics-host-enabled)"
export IMMICH_IO_METRICS="$(snapctl get metrics-io-enabled)"
export IMMICH_JOB_METRICS="$(snapctl get metrics-job-enabled)"
export IMMICH_TELEMETRY_INCLUDE="$(snapctl get metrics-telemetry-include)"
export IMMICH_TELEMETRY_EXCLUDE="$(snapctl get metrics-telemetry-exclude)"

export IMMICH_THIRD_PARTY_SOURCE_URL="https://github.com/nsg/immich-distribution"
export IMMICH_THIRD_PARTY_BUG_FEATURE_URL="https://github.com/nsg/immich-distribution/issues"
Expand Down

0 comments on commit 76383e9

Please sign in to comment.