From 48e03ce9d93e24827e0914aa83ee2082fa343ff5 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 4 Nov 2021 10:08:52 +0100 Subject: [PATCH] Rename prometheus metrics namespace to k8up --- config/samples/prometheus/rules.yaml | 4 ++-- .../ROOT/pages/explanations/what-has-changed-in-v2.adoc | 1 + docs/modules/ROOT/pages/how-tos/restore.adoc | 2 +- restic/cli/stats.go | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/samples/prometheus/rules.yaml b/config/samples/prometheus/rules.yaml index 340defbbc..302284331 100644 --- a/config/samples/prometheus/rules.yaml +++ b/config/samples/prometheus/rules.yaml @@ -1,8 +1,8 @@ groups: - name: K8up rules: - - alert: baas_last_errors - expr: baas_backup_restic_last_errors > 0 + - alert: K8upBackupLastErrors + expr: k8up_backup_restic_last_errors > 0 for: 1m labels: severity: critical diff --git a/docs/modules/ROOT/pages/explanations/what-has-changed-in-v2.adoc b/docs/modules/ROOT/pages/explanations/what-has-changed-in-v2.adoc index 25b6656f4..57c6e3592 100644 --- a/docs/modules/ROOT/pages/explanations/what-has-changed-in-v2.adoc +++ b/docs/modules/ROOT/pages/explanations/what-has-changed-in-v2.adoc @@ -25,3 +25,4 @@ We have big plans for future versions of K8up, but they all require a solid foun We believe that K8up v2 is that solid foundation. Going forward, K8up v2 drops support for very old Kubernetes versions, for example OpenShift 3.11. +If you are using Prometheus for alerting, note that metrics names changed their prefix from `baas` to `k8up`. diff --git a/docs/modules/ROOT/pages/how-tos/restore.adoc b/docs/modules/ROOT/pages/how-tos/restore.adoc index 41fd7a0b9..61d24c685 100644 --- a/docs/modules/ROOT/pages/how-tos/restore.adoc +++ b/docs/modules/ROOT/pages/how-tos/restore.adoc @@ -125,7 +125,7 @@ You’ll need the credentials from the secrets and the encryption key. With that [source,bash] ---- -export RESTIC_REPOSITORY=s3:http://localhost/baas +export RESTIC_REPOSITORY=s3:http://localhost/k8up export RESTIC_PASSWORD=p@assword export AWS_ACCESS_KEY_ID=8U0UDNYPNUDTUS1LIAF3 export AWS_SECRET_ACCESS_KEY=ip3cdrkXcHmH4S7if7erKPNoxDn27V0vrg6CHHem diff --git a/restic/cli/stats.go b/restic/cli/stats.go index 6466b2c51..389143cb9 100644 --- a/restic/cli/stats.go +++ b/restic/cli/stats.go @@ -11,7 +11,7 @@ import ( ) const ( - prometheusNamespace = "baas" + prometheusNamespace = "k8up" prometheusSubsystem = "backup_restic" )