From 5f4feb001fbde7814e4327a58bbbe6ed69b90b23 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Wed, 3 Dec 2025 10:17:43 +0700 Subject: [PATCH 1/8] add 'runbook' field --- CHANGELOG.md | 6 ++++++ examples/_gen/getting-started.yml | 2 ++ examples/_gen/home-wifi.yml | 4 ++++ examples/_gen/k8s-getting-started.yml | 2 ++ examples/_gen/k8s-home-wifi.yml | 4 ++++ examples/_gen/k8s-multifile.yml | 4 ++++ examples/_gen/kubernetes-apiserver.yml | 8 ++++---- examples/_gen/multifile.yml | 4 ++++ examples/_gen/plugin-getting-started.yml | 2 ++ examples/_gen/plugin-k8s-getting-started.yml | 2 ++ examples/_gen/raw-home-wifi.yml | 2 ++ internal/app/generate/prometheus_test.go | 2 ++ internal/prometheus/alert_rules.go | 1 + internal/prometheus/alert_rules_test.go | 4 ++++ test/integration/k8scontroller/exp_base_28d_test.go | 2 ++ test/integration/k8scontroller/exp_base_7d_test.go | 2 ++ test/integration/k8scontroller/exp_base_test.go | 2 ++ .../integration/prometheus/testdata/out-base-28d.yaml.tpl | 2 ++ .../testdata/out-base-custom-windows-7d.yaml.tpl | 2 ++ .../prometheus/testdata/out-base-extra-labels.yaml.tpl | 2 ++ .../integration/prometheus/testdata/out-base-k8s.yaml.tpl | 2 ++ .../prometheus/testdata/out-base-no-recordings.yaml.tpl | 2 ++ test/integration/prometheus/testdata/out-base.yaml.tpl | 2 ++ .../prometheus/testdata/out-multifile-k8s.yaml.tpl | 4 ++++ .../prometheus/testdata/out-multifile.yaml.tpl | 4 ++++ 25 files changed, 69 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de96abee..9bb343b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [0.17.0] - 2025-12-03 +### Added +- `./internal/prometheus/alert_rules.go` add `runbook` field to `extraAnnotations` map. +- `./examples/_gen/*.yml`, `./internal/app/generate/prometheus_test.go`, `./internal/prometheus/alert_rules_test.go`, `./test/integration/*` configure tests, templates and examples with new `runbook` field. + ## [0.16.0] - 2025-07-04 ### Added - `./internal/prometheus/alert_rules.go` add `description` field to `extraAnnotations` map. diff --git a/examples/_gen/getting-started.yml b/examples/_gen/getting-started.yml index c6ef630c..bcb3921a 100644 --- a/examples/_gen/getting-started.yml +++ b/examples/_gen/getting-started.yml @@ -227,6 +227,7 @@ groups: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: - alert: MyServiceHighErrorRate expr: | ( @@ -251,3 +252,4 @@ groups: burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: diff --git a/examples/_gen/home-wifi.yml b/examples/_gen/home-wifi.yml index 73c2405b..49f50fa4 100644 --- a/examples/_gen/home-wifi.yml +++ b/examples/_gen/home-wifi.yml @@ -226,6 +226,7 @@ groups: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: - alert: GoodWifiClientSatisfaction expr: | ( @@ -249,6 +250,7 @@ groups: burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: - name: sloth-slo-sli-recordings-home-wifi-risk-wifi-client-satisfaction rules: - record: slo:sli_error:ratio_rate5m @@ -471,6 +473,7 @@ groups: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: - alert: RiskWifiClientSatisfaction expr: | ( @@ -494,3 +497,4 @@ groups: burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: diff --git a/examples/_gen/k8s-getting-started.yml b/examples/_gen/k8s-getting-started.yml index 72d1b16b..dc5416c5 100644 --- a/examples/_gen/k8s-getting-started.yml +++ b/examples/_gen/k8s-getting-started.yml @@ -220,6 +220,7 @@ spec: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) @@ -244,6 +245,7 @@ spec: budget burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) diff --git a/examples/_gen/k8s-home-wifi.yml b/examples/_gen/k8s-home-wifi.yml index 0ca9e1ec..edb9cb68 100644 --- a/examples/_gen/k8s-home-wifi.yml +++ b/examples/_gen/k8s-home-wifi.yml @@ -224,6 +224,7 @@ spec: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (14.4 * 0.05)) without (sloth_window) @@ -247,6 +248,7 @@ spec: budget burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate2h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (3 * 0.05)) without (sloth_window) @@ -469,6 +471,7 @@ spec: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (14.4 * 0.0009999999999999432)) without (sloth_window) @@ -492,6 +495,7 @@ spec: budget burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate2h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (3 * 0.0009999999999999432)) without (sloth_window) diff --git a/examples/_gen/k8s-multifile.yml b/examples/_gen/k8s-multifile.yml index 3b62666b..8e90f23b 100644 --- a/examples/_gen/k8s-multifile.yml +++ b/examples/_gen/k8s-multifile.yml @@ -220,6 +220,7 @@ spec: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) @@ -244,6 +245,7 @@ spec: budget burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) @@ -483,6 +485,7 @@ spec: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (14.4 * 0.00010000000000005117)) without (sloth_window) @@ -507,6 +510,7 @@ spec: budget burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (3 * 0.00010000000000005117)) without (sloth_window) diff --git a/examples/_gen/kubernetes-apiserver.yml b/examples/_gen/kubernetes-apiserver.yml index 8fdc2151..1e9d086b 100644 --- a/examples/_gen/kubernetes-apiserver.yml +++ b/examples/_gen/kubernetes-apiserver.yml @@ -221,13 +221,13 @@ groups: severity: critical sloth_severity: page annotations: - runbook: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh summary: '{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.' title: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh - alert: K8sApiserverAvailabilityAlert expr: | ( @@ -246,13 +246,13 @@ groups: severity: warning sloth_severity: ticket annotations: - runbook: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh summary: '{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.' title: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapierrorshigh - name: sloth-slo-sli-recordings-k8s-apiserver-requests-latency rules: - record: slo:sli_error:ratio_rate5m @@ -505,13 +505,13 @@ groups: severity: critical sloth_severity: page annotations: - runbook: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh summary: '{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.' title: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh - alert: K8sApiserverLatencyAlert expr: | ( @@ -530,10 +530,10 @@ groups: severity: warning sloth_severity: ticket annotations: - runbook: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh summary: '{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.' title: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-kubeapilatencyhigh diff --git a/examples/_gen/multifile.yml b/examples/_gen/multifile.yml index 4f727ebe..671e0da1 100644 --- a/examples/_gen/multifile.yml +++ b/examples/_gen/multifile.yml @@ -227,6 +227,7 @@ groups: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: - alert: MyServiceHighErrorRate expr: | ( @@ -251,6 +252,7 @@ groups: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: --- # Code generated by Sloth (dev): https://github.com/ostrovok-tech/sloth. @@ -480,6 +482,7 @@ groups: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: - alert: MyServiceHighErrorRate expr: | ( @@ -504,3 +507,4 @@ groups: burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: diff --git a/examples/_gen/plugin-getting-started.yml b/examples/_gen/plugin-getting-started.yml index a13cdc93..c2e3e9d0 100644 --- a/examples/_gen/plugin-getting-started.yml +++ b/examples/_gen/plugin-getting-started.yml @@ -234,6 +234,7 @@ groups: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: - alert: MyServiceHighErrorRate expr: | ( @@ -258,3 +259,4 @@ groups: burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: diff --git a/examples/_gen/plugin-k8s-getting-started.yml b/examples/_gen/plugin-k8s-getting-started.yml index c63240da..cb5d5b2c 100644 --- a/examples/_gen/plugin-k8s-getting-started.yml +++ b/examples/_gen/plugin-k8s-getting-started.yml @@ -230,6 +230,7 @@ spec: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) @@ -252,6 +253,7 @@ spec: budget burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: expr: | ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) diff --git a/examples/_gen/raw-home-wifi.yml b/examples/_gen/raw-home-wifi.yml index cdf43708..50d2fc93 100644 --- a/examples/_gen/raw-home-wifi.yml +++ b/examples/_gen/raw-home-wifi.yml @@ -247,6 +247,7 @@ groups: burn rate is too fast. description: (page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: - alert: WifiClientSatisfaction expr: | ( @@ -270,3 +271,4 @@ groups: burn rate is too fast. description: (ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast. + runbook: diff --git a/internal/app/generate/prometheus_test.go b/internal/app/generate/prometheus_test.go index f206af2d..8008cc2d 100644 --- a/internal/app/generate/prometheus_test.go +++ b/internal/app/generate/prometheus_test.go @@ -363,6 +363,7 @@ or "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, { @@ -388,6 +389,7 @@ or "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, }, diff --git a/internal/prometheus/alert_rules.go b/internal/prometheus/alert_rules.go index 83fdc33f..f0e4bda2 100644 --- a/internal/prometheus/alert_rules.go +++ b/internal/prometheus/alert_rules.go @@ -90,6 +90,7 @@ func defaultSLOAlertGenerator(slo SLO, sloAlert AlertMeta, quick, slow alert.MWM "title": fmt.Sprintf("(%s) {{$labels.%s}} {{$labels.%s}} SLO error budget burn rate is too fast.", severity, sloServiceLabelName, sloNameLabelName), "summary": fmt.Sprintf("{{$labels.%s}} {{$labels.%s}} SLO error budget burn rate is over expected.", sloServiceLabelName, sloNameLabelName), "description": fmt.Sprintf("(%s) {{$labels.%s}} {{$labels.%s}} SLO error budget burn rate is too fast.", severity, sloServiceLabelName, sloNameLabelName), + "runbook": "", } // Add specific labels. We don't add the labels from the rules because we will diff --git a/internal/prometheus/alert_rules_test.go b/internal/prometheus/alert_rules_test.go index 79af458d..d71c663e 100644 --- a/internal/prometheus/alert_rules_test.go +++ b/internal/prometheus/alert_rules_test.go @@ -97,6 +97,7 @@ or "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, { @@ -122,6 +123,7 @@ or "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, }, @@ -166,6 +168,7 @@ or "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, }, @@ -209,6 +212,7 @@ or "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, }, diff --git a/test/integration/k8scontroller/exp_base_28d_test.go b/test/integration/k8scontroller/exp_base_28d_test.go index b7bb960e..4b5e3a03 100644 --- a/test/integration/k8scontroller/exp_base_28d_test.go +++ b/test/integration/k8scontroller/exp_base_28d_test.go @@ -228,6 +228,7 @@ func getBase28DayPromOpPrometheusRule(slothVersion string) *monitoringv1.Prometh "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, { @@ -242,6 +243,7 @@ func getBase28DayPromOpPrometheusRule(slothVersion string) *monitoringv1.Prometh "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, }, diff --git a/test/integration/k8scontroller/exp_base_7d_test.go b/test/integration/k8scontroller/exp_base_7d_test.go index eb020d26..1db3785e 100644 --- a/test/integration/k8scontroller/exp_base_7d_test.go +++ b/test/integration/k8scontroller/exp_base_7d_test.go @@ -228,6 +228,7 @@ func getBase7DayPromOpPrometheusRule(slothVersion string) *monitoringv1.Promethe "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, { @@ -242,6 +243,7 @@ func getBase7DayPromOpPrometheusRule(slothVersion string) *monitoringv1.Promethe "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, }, diff --git a/test/integration/k8scontroller/exp_base_test.go b/test/integration/k8scontroller/exp_base_test.go index 80b538c3..3dc49f70 100644 --- a/test/integration/k8scontroller/exp_base_test.go +++ b/test/integration/k8scontroller/exp_base_test.go @@ -285,6 +285,7 @@ func getBasePromOpPrometheusRule(slothVersion string) *monitoringv1.PrometheusRu "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(page) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, { @@ -299,6 +300,7 @@ func getBasePromOpPrometheusRule(slothVersion string) *monitoringv1.PrometheusRu "summary": "{{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is over expected.", "title": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", "description": "(ticket) {{$labels.sloth_service}} {{$labels.sloth_slo}} SLO error budget burn rate is too fast.", + "runbook": "", }, }, }, diff --git a/test/integration/prometheus/testdata/out-base-28d.yaml.tpl b/test/integration/prometheus/testdata/out-base-28d.yaml.tpl index 0f485b8e..72b5acc9 100644 --- a/test/integration/prometheus/testdata/out-base-28d.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-28d.yaml.tpl @@ -194,6 +194,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -219,6 +220,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl b/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl index 79d494da..aeb89dcf 100644 --- a/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl @@ -194,6 +194,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -219,6 +220,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl b/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl index 0e4e9541..e34d09c1 100644 --- a/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl @@ -224,6 +224,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -249,6 +250,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl b/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl index 8012c108..966bf010 100644 --- a/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl @@ -188,6 +188,7 @@ spec: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -213,6 +214,7 @@ spec: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error diff --git a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl index 17064cbb..d070829d 100644 --- a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl @@ -27,6 +27,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -52,6 +53,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base.yaml.tpl b/test/integration/prometheus/testdata/out-base.yaml.tpl index 8c49e37c..58bcba12 100644 --- a/test/integration/prometheus/testdata/out-base.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base.yaml.tpl @@ -194,6 +194,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -219,6 +220,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl b/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl index 6938cfb5..dbfc79be 100644 --- a/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl +++ b/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl @@ -188,6 +188,7 @@ spec: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -213,6 +214,7 @@ spec: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error @@ -597,6 +599,7 @@ spec: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -622,6 +625,7 @@ spec: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error diff --git a/test/integration/prometheus/testdata/out-multifile.yaml.tpl b/test/integration/prometheus/testdata/out-multifile.yaml.tpl index 50f16558..7e63c478 100644 --- a/test/integration/prometheus/testdata/out-multifile.yaml.tpl +++ b/test/integration/prometheus/testdata/out-multifile.yaml.tpl @@ -194,6 +194,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -219,6 +220,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -593,6 +595,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -618,6 +621,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget From 70707a0b4536a769cf471ef89c0c776a0626b2d5 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Wed, 3 Dec 2025 11:04:37 +0700 Subject: [PATCH 2/8] remove 'runbook' from integration tests templates --- CHANGELOG.md | 2 +- test/integration/prometheus/testdata/out-base-28d.yaml.tpl | 2 -- .../prometheus/testdata/out-base-custom-windows-7d.yaml.tpl | 2 -- .../prometheus/testdata/out-base-extra-labels.yaml.tpl | 2 -- test/integration/prometheus/testdata/out-base-k8s.yaml.tpl | 2 -- .../prometheus/testdata/out-base-no-recordings.yaml.tpl | 2 -- test/integration/prometheus/testdata/out-base.yaml.tpl | 2 -- .../prometheus/testdata/out-multifile-k8s.yaml.tpl | 4 ---- test/integration/prometheus/testdata/out-multifile.yaml.tpl | 4 ---- 9 files changed, 1 insertion(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bb343b2..6e6e1971 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [0.17.0] - 2025-12-03 ### Added - `./internal/prometheus/alert_rules.go` add `runbook` field to `extraAnnotations` map. -- `./examples/_gen/*.yml`, `./internal/app/generate/prometheus_test.go`, `./internal/prometheus/alert_rules_test.go`, `./test/integration/*` configure tests, templates and examples with new `runbook` field. +- `./examples/_gen/*.yml`, `./internal/app/generate/prometheus_test.go`, `./internal/prometheus/alert_rules_test.go`, configure tests, templates and examples with new `runbook` field. ## [0.16.0] - 2025-07-04 ### Added diff --git a/test/integration/prometheus/testdata/out-base-28d.yaml.tpl b/test/integration/prometheus/testdata/out-base-28d.yaml.tpl index 72b5acc9..0f485b8e 100644 --- a/test/integration/prometheus/testdata/out-base-28d.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-28d.yaml.tpl @@ -194,7 +194,6 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -220,7 +219,6 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl b/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl index aeb89dcf..79d494da 100644 --- a/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl @@ -194,7 +194,6 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -220,7 +219,6 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl b/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl index e34d09c1..0e4e9541 100644 --- a/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl @@ -224,7 +224,6 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -250,7 +249,6 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl b/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl index 966bf010..8012c108 100644 --- a/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl @@ -188,7 +188,6 @@ spec: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -214,7 +213,6 @@ spec: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error diff --git a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl index d070829d..17064cbb 100644 --- a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl @@ -27,7 +27,6 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -53,7 +52,6 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base.yaml.tpl b/test/integration/prometheus/testdata/out-base.yaml.tpl index 58bcba12..8c49e37c 100644 --- a/test/integration/prometheus/testdata/out-base.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base.yaml.tpl @@ -194,7 +194,6 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -220,7 +219,6 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl b/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl index dbfc79be..6938cfb5 100644 --- a/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl +++ b/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl @@ -188,7 +188,6 @@ spec: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -214,7 +213,6 @@ spec: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error @@ -599,7 +597,6 @@ spec: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -625,7 +622,6 @@ spec: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error diff --git a/test/integration/prometheus/testdata/out-multifile.yaml.tpl b/test/integration/prometheus/testdata/out-multifile.yaml.tpl index 7e63c478..50f16558 100644 --- a/test/integration/prometheus/testdata/out-multifile.yaml.tpl +++ b/test/integration/prometheus/testdata/out-multifile.yaml.tpl @@ -194,7 +194,6 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -220,7 +219,6 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -595,7 +593,6 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -621,7 +618,6 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget From 5435f85b02f60acdcf2e1998ec5987f9df4d538a Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Wed, 3 Dec 2025 11:22:31 +0700 Subject: [PATCH 3/8] check Generate_without_recordings_should_generate_the_correct_alert_rules_for_all_the_SLOs test --- .../prometheus/testdata/out-base-no-recordings.yaml.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl index 17064cbb..40459e25 100644 --- a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl @@ -27,6 +27,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -52,6 +53,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. + runbook: summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget From 2dde875eaae75e8c290a4df284207e37f16ce3ae Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Wed, 3 Dec 2025 11:28:18 +0700 Subject: [PATCH 4/8] another check for Generate_without_recordings_should_generate_the_correct_alert_rules_for_all_the_SLOs test --- .../prometheus/testdata/out-base-no-recordings.yaml.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl index 40459e25..1dc473a4 100644 --- a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl @@ -27,7 +27,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -53,7 +53,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget From 659e4d57661f8a7021651de7dbf4f8f5897e76da Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Wed, 3 Dec 2025 11:42:48 +0700 Subject: [PATCH 5/8] fix 'runbook' in template files --- .../integration/prometheus/testdata/out-base-28d.yaml.tpl | 4 ++-- .../testdata/out-base-custom-windows-7d.yaml.tpl | 4 ++-- .../prometheus/testdata/out-base-extra-labels.yaml.tpl | 4 ++-- .../integration/prometheus/testdata/out-base-k8s.yaml.tpl | 2 +- .../prometheus/testdata/out-base-no-recordings.yaml.tpl | 4 ++-- test/integration/prometheus/testdata/out-base.yaml.tpl | 4 ++-- .../prometheus/testdata/out-multifile-k8s.yaml.tpl | 8 ++++---- .../prometheus/testdata/out-multifile.yaml.tpl | 8 ++++---- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/integration/prometheus/testdata/out-base-28d.yaml.tpl b/test/integration/prometheus/testdata/out-base-28d.yaml.tpl index 72b5acc9..d57e558f 100644 --- a/test/integration/prometheus/testdata/out-base-28d.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-28d.yaml.tpl @@ -194,7 +194,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -220,7 +220,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl b/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl index aeb89dcf..d7826c8a 100644 --- a/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-custom-windows-7d.yaml.tpl @@ -194,7 +194,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -220,7 +220,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl b/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl index e34d09c1..2179cc66 100644 --- a/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-extra-labels.yaml.tpl @@ -224,7 +224,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -250,7 +250,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl b/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl index 966bf010..41772804 100644 --- a/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl @@ -214,7 +214,7 @@ spec: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error diff --git a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl index d070829d..1dc473a4 100644 --- a/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-no-recordings.yaml.tpl @@ -27,7 +27,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -53,7 +53,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base.yaml.tpl b/test/integration/prometheus/testdata/out-base.yaml.tpl index 58bcba12..69d519d0 100644 --- a/test/integration/prometheus/testdata/out-base.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base.yaml.tpl @@ -194,7 +194,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -220,7 +220,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl b/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl index dbfc79be..ab102a0c 100644 --- a/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl +++ b/test/integration/prometheus/testdata/out-multifile-k8s.yaml.tpl @@ -188,7 +188,7 @@ spec: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -214,7 +214,7 @@ spec: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error @@ -599,7 +599,7 @@ spec: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -625,7 +625,7 @@ spec: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error diff --git a/test/integration/prometheus/testdata/out-multifile.yaml.tpl b/test/integration/prometheus/testdata/out-multifile.yaml.tpl index 7e63c478..ebcb46ae 100644 --- a/test/integration/prometheus/testdata/out-multifile.yaml.tpl +++ b/test/integration/prometheus/testdata/out-multifile.yaml.tpl @@ -194,7 +194,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -220,7 +220,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -595,7 +595,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget @@ -621,7 +621,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget From bedc108eb8750750cd6fd68ea41484050e20f1f9 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Wed, 3 Dec 2025 11:49:09 +0700 Subject: [PATCH 6/8] fix some tests --- CHANGELOG.md | 2 +- test/integration/prometheus/testdata/out-base-k8s.yaml.tpl | 2 +- test/integration/prometheus/testdata/out-base.yaml.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e6e1971..9bb343b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [0.17.0] - 2025-12-03 ### Added - `./internal/prometheus/alert_rules.go` add `runbook` field to `extraAnnotations` map. -- `./examples/_gen/*.yml`, `./internal/app/generate/prometheus_test.go`, `./internal/prometheus/alert_rules_test.go`, configure tests, templates and examples with new `runbook` field. +- `./examples/_gen/*.yml`, `./internal/app/generate/prometheus_test.go`, `./internal/prometheus/alert_rules_test.go`, `./test/integration/*` configure tests, templates and examples with new `runbook` field. ## [0.16.0] - 2025-07-04 ### Added diff --git a/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl b/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl index 41772804..64c93a49 100644 --- a/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base-k8s.yaml.tpl @@ -188,7 +188,7 @@ spec: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget diff --git a/test/integration/prometheus/testdata/out-base.yaml.tpl b/test/integration/prometheus/testdata/out-base.yaml.tpl index 58bcba12..28d53951 100644 --- a/test/integration/prometheus/testdata/out-base.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base.yaml.tpl @@ -220,7 +220,7 @@ groups: alert02k1: alert02k2 description: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (ticket) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget From 434fa2fb48d72cd6963f6dee796ea8c97d2936bb Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Wed, 3 Dec 2025 11:52:30 +0700 Subject: [PATCH 7/8] fix another one test --- test/integration/prometheus/testdata/out-base.yaml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/prometheus/testdata/out-base.yaml.tpl b/test/integration/prometheus/testdata/out-base.yaml.tpl index 28d53951..69d519d0 100644 --- a/test/integration/prometheus/testdata/out-base.yaml.tpl +++ b/test/integration/prometheus/testdata/out-base.yaml.tpl @@ -194,7 +194,7 @@ groups: alert02k1: alert02k2 description: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is too fast. - runbook: '' + runbook: "" summary: '{{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget burn rate is over expected.' title: (page) {{"{{$labels.sloth_service}}"}} {{"{{$labels.sloth_slo}}"}} SLO error budget From f5e02895b8b7a5ca7c7ea16c988e9ec9e968fd65 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Thu, 4 Dec 2025 15:43:41 +0700 Subject: [PATCH 8/8] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bb343b2..f5d56b05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - `./internal/prometheus/alert_rules.go` add `runbook` field to `extraAnnotations` map. - `./examples/_gen/*.yml`, `./internal/app/generate/prometheus_test.go`, `./internal/prometheus/alert_rules_test.go`, `./test/integration/*` configure tests, templates and examples with new `runbook` field. +- Dependencies updated. ## [0.16.0] - 2025-07-04 ### Added