From 8fadb8a01f394dabfa5837259075ad5941614cea Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Mon, 30 Oct 2023 05:14:00 +0100
Subject: [PATCH] fix(immich): Fix wrong ingress name in SLI metric

---
 apps/k8s01/immich/slo.yaml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/apps/k8s01/immich/slo.yaml b/apps/k8s01/immich/slo.yaml
index f497c9c00..6f266022c 100644
--- a/apps/k8s01/immich/slo.yaml
+++ b/apps/k8s01/immich/slo.yaml
@@ -11,14 +11,14 @@ spec:
       description: "Immich: SLO based on availability for HTTP request responses."
       sli:
         events:
-          errorQuery: sum(rate(nginx_ingress_controller_requests{exported_namespace="immich",ingress="immich",status=~"(5..|429)"}[{{.window}}])) OR vector(0)
-          totalQuery: sum(rate(nginx_ingress_controller_requests{exported_namespace="immich",ingress="immich"}[{{.window}}])) > 0 OR vector(1)
+          errorQuery: sum(rate(nginx_ingress_controller_requests{exported_namespace="immich",ingress="immich-proxy",status=~"(5..|429)"}[{{.window}}])) OR vector(0)
+          totalQuery: sum(rate(nginx_ingress_controller_requests{exported_namespace="immich",ingress="immich-proxy"}[{{.window}}])) > 0 OR vector(1)
       alerting:
         name: ImmichHighErrorRate
         labels:
           category: "availability"
         annotations:
-          summary: "High error rate on 'immich' requests responses"
+          summary: "High error rate on 'immich-proxy' requests responses"
     - name: "requests-latency"
       objective: 95
       description: "Immich: SLO based on latency for HTTP request responses. Warns if requests take longer than 250ms. When responses are slower than 200ms they become noticable slow."
@@ -28,14 +28,14 @@ spec:
         events:
           errorQuery: |
             (
-              sum(rate(nginx_ingress_controller_request_duration_seconds_count{exported_namespace="immich",ingress="immich",method!="WATCH"}[{{.window}}]))
+              sum(rate(nginx_ingress_controller_request_duration_seconds_count{exported_namespace="immich",ingress="immich-proxy",method!="WATCH"}[{{.window}}]))
               -
-              sum(rate(nginx_ingress_controller_request_duration_seconds_bucket{exported_namespace="immich",ingress="immich",le="0.25",verb!="WATCH"}[{{.window}}]))
+              sum(rate(nginx_ingress_controller_request_duration_seconds_bucket{exported_namespace="immich",ingress="immich-proxy",le="0.25",verb!="WATCH"}[{{.window}}]))
             )
-          totalQuery: sum(rate(nginx_ingress_controller_request_duration_seconds_count{exported_namespace="immich",ingress="immich",method!="WATCH"}[{{.window}}])) > 0 OR vector(1)
+          totalQuery: sum(rate(nginx_ingress_controller_request_duration_seconds_count{exported_namespace="immich",ingress="immich-proxy",method!="WATCH"}[{{.window}}])) > 0 OR vector(1)
       alerting:
         name: ImmichLatencyAlert
         labels:
           category: "latency"
         annotations:
-          summary: "Slow responses on 'immich' requests responses. More than 1% take more than 250ms."
\ No newline at end of file
+          summary: "Slow responses on 'immich-proxy' requests responses. More than 1% take more than 250ms."
\ No newline at end of file
-- 
GitLab