From 68c7f7f61b3869ae4cdc1feeedb7efc7598cc368 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Mon, 24 Jun 2024 12:58:39 +0200
Subject: [PATCH] fix(nut-exporter): Fix runbook URLs

---
 charts/nut-exporter/Chart.yaml  |  2 +-
 charts/nut-exporter/README.md   |  4 ++--
 charts/nut-exporter/values.yaml | 10 +++++-----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/charts/nut-exporter/Chart.yaml b/charts/nut-exporter/Chart.yaml
index a370594f7..c52d3312f 100644
--- a/charts/nut-exporter/Chart.yaml
+++ b/charts/nut-exporter/Chart.yaml
@@ -15,6 +15,6 @@ sources:
   - https://github.com/acolombier/nut_exporter/tree/feat/add-helm-chart
 
 type: application
-version: 0.3.16
+version: 0.3.17
 # renovate: image=ghcr.io/druggeri/nut_exporter
 appVersion: 3.1.1
diff --git a/charts/nut-exporter/README.md b/charts/nut-exporter/README.md
index 61602c6ba..ca9c392d8 100644
--- a/charts/nut-exporter/README.md
+++ b/charts/nut-exporter/README.md
@@ -1,6 +1,6 @@
 # nut-exporter
 
-![Version: 0.3.16](https://img.shields.io/badge/Version-0.3.16-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.1.1](https://img.shields.io/badge/AppVersion-3.1.1-informational?style=flat-square)
+![Version: 0.3.17](https://img.shields.io/badge/Version-0.3.17-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.1.1](https://img.shields.io/badge/AppVersion-3.1.1-informational?style=flat-square)
 
 Installs NUT exporter in Kubernetes
 
@@ -33,7 +33,7 @@ Installs NUT exporter in Kubernetes
 | resources.limits.memory | string | `"128Mi"` |  |
 | resources.requests.cpu | string | `"50m"` |  |
 | resources.requests.memory | string | `"24Mi"` |  |
-| rules | object | `{"enabled":true,"labels":{},"rules":[{"alert":"UPSBatteryNeedsReplacement","annotations":{"message":"{{ $labels.ups }} is indicating a need for a battery replacement."},"expr":"network_ups_tools_ups_status{flag=\"RB\"} != 0","for":"60s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsbatteryneedsreplacement","severity":"high"}},{"alert":"UPSLowBattery","annotations":{"message":"{{ $labels.ups }} has low battery and is running on backup. Expect shutdown soon"},"expr":"network_ups_tools_ups_status{flag=\"LB\"} == 0 and network_ups_tools_ups_status{flag=\"OL\"} == 0","for":"60s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upslowbattery","severity":"critical"}},{"alert":"UPSRuntimeShort","annotations":{"message":"{{ $labels.ups }} has only {{ $value | humanizeDuration}} of battery autonomy"},"expr":"network_ups_tools_battery_runtime < 300","for":"30s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsruntimeshort","severity":"high"}},{"alert":"UPSMainPowerOutage","annotations":{"message":"{{ $labels.ups }} has no main power and is running on backup."},"expr":"network_ups_tools_ups_status{flag=\"OL\"} == 0","for":"60s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsmainpoweroutage","severity":"critical"}},{"alert":"UPSIndicatesWarningStatus","annotations":{"message":"{{ $labels.ups }} is indicating a need for a battery replacement."},"expr":"network_ups_tools_ups_status{flag=\"HB\"} != 0","for":"60s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsindicateswarningstatus","severity":"warning"}}]}` | Prometheus rules to trigger alerts from UPS |
+| rules | object | `{"enabled":true,"labels":{},"rules":[{"alert":"UPSBatteryNeedsReplacement","annotations":{"message":"{{ $labels.ups }} is indicating a need for a battery replacement."},"expr":"network_ups_tools_ups_status{flag=\"RB\"} != 0","for":"60s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsbatteryneedsreplacement/","severity":"high"}},{"alert":"UPSLowBattery","annotations":{"message":"{{ $labels.ups }} has low battery and is running on backup. Expect shutdown soon"},"expr":"network_ups_tools_ups_status{flag=\"LB\"} == 0 and network_ups_tools_ups_status{flag=\"OL\"} == 0","for":"60s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upslowbattery/","severity":"critical"}},{"alert":"UPSRuntimeShort","annotations":{"message":"{{ $labels.ups }} has only {{ $value | humanizeDuration}} of battery autonomy"},"expr":"network_ups_tools_battery_runtime < 300","for":"30s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsruntimeshort/","severity":"high"}},{"alert":"UPSMainPowerOutage","annotations":{"message":"{{ $labels.ups }} has no main power and is running on backup."},"expr":"network_ups_tools_ups_status{flag=\"OL\"} == 0","for":"60s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsmainpoweroutage/","severity":"critical"}},{"alert":"UPSIndicatesWarningStatus","annotations":{"message":"{{ $labels.ups }} is indicating a need for a battery replacement."},"expr":"network_ups_tools_ups_status{flag=\"HB\"} != 0","for":"60s","labels":{"runbook_url":"https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsindicateswarningstatus/","severity":"warning"}}]}` | Prometheus rules to trigger alerts from UPS |
 | securityContext.allowPrivilegeEscalation | bool | `false` |  |
 | securityContext.capabilities.drop[0] | string | `"ALL"` |  |
 | securityContext.readOnlyRootFilesystem | bool | `true` |  |
diff --git a/charts/nut-exporter/values.yaml b/charts/nut-exporter/values.yaml
index da713a16f..e1d7aea4b 100644
--- a/charts/nut-exporter/values.yaml
+++ b/charts/nut-exporter/values.yaml
@@ -112,7 +112,7 @@ rules:
       for: 60s
       labels:
         severity: high
-        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsbatteryneedsreplacement
+        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsbatteryneedsreplacement/
     - alert: UPSLowBattery
       annotations:
         message: '{{ $labels.ups }} has low battery and is running on backup. Expect shutdown soon'
@@ -120,7 +120,7 @@ rules:
       for: 60s
       labels:
         severity: critical
-        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upslowbattery
+        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upslowbattery/
     - alert: UPSRuntimeShort
       annotations:
         message: '{{ $labels.ups }} has only {{ $value | humanizeDuration}} of battery autonomy'
@@ -128,7 +128,7 @@ rules:
       for: 30s
       labels:
         severity: high
-        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsruntimeshort
+        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsruntimeshort/
     - alert: UPSMainPowerOutage
       annotations:
         message: '{{ $labels.ups }} has no main power and is running on backup.'
@@ -136,7 +136,7 @@ rules:
       for: 60s
       labels:
         severity: critical
-        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsmainpoweroutage
+        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsmainpoweroutage/
     - alert: UPSIndicatesWarningStatus
       annotations:
         message: '{{ $labels.ups }} is indicating a need for a battery replacement.'
@@ -144,5 +144,5 @@ rules:
       for: 60s
       labels:
         severity: warning
-        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsindicateswarningstatus
+        runbook_url: https://runbooks.s3.shivering-isles.com/runbooks/nut-exporter/upsindicateswarningstatus/
 
-- 
GitLab