Skip to content

Commit

Permalink
add team in SLO alert (#971)
Browse files Browse the repository at this point in the history
Signed-off-by: QuentinBisson <[email protected]>
  • Loading branch information
QuentinBisson authored Nov 27, 2023
1 parent 2ae6cf7 commit 13553dc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Relabel team in `ServiceLevelBurnRateTooHigh` alert.

## [2.143.2] - 2023-11-22

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,30 @@ spec:
opsrecipe: service-level-burn-rate-too-high/
dashboard: https://giantswarm.grafana.net/d/service-level/service-level?orgId=1
expr: |
(
slo_errors_per_request:ratio_rate1h{service!~"efk-.*|.*external-dns.*|kong-.*|.*(ingress-nginx|nginx-ingress-controller).*"} > on (service) group_left slo_threshold_high
and
slo_errors_per_request:ratio_rate5m{service!~"efk-.*|.*external-dns.*|kong-.*|.*(ingress-nginx|nginx-ingress-controller).*"} > on (service) group_left slo_threshold_high
)
or
(
slo_errors_per_request:ratio_rate6h{service!~"efk-.*|.*external-dns.*|kong-.*|.*(ingress-nginx|nginx-ingress-controller).*"} > on (service) group_left slo_threshold_low
and
slo_errors_per_request:ratio_rate30m{service!~"efk-.*|.*external-dns.*|kong-.*|.*(ingress-nginx|nginx-ingress-controller).*"} > on (service) group_left slo_threshold_low
label_replace(
(
slo_errors_per_request:ratio_rate1h{service!~"efk-.*|.*external-dns.*|kong-.*|.*(ingress-nginx|nginx-ingress-controller).*"}
> on (service) group_left ()
slo_threshold_high
and
slo_errors_per_request:ratio_rate5m{service!~"efk-.*|.*external-dns.*|kong-.*|.*(ingress-nginx|nginx-ingress-controller).*"}
> on (service) group_left ()
slo_threshold_high
)
or
(
slo_errors_per_request:ratio_rate6h{service!~"efk-.*|.*external-dns.*|kong-.*|.*(ingress-nginx|nginx-ingress-controller).*"}
> on (service) group_left ()
slo_threshold_low
and
slo_errors_per_request:ratio_rate30m{service!~"efk-.*|.*external-dns.*|kong-.*|.*(ingress-nginx|nginx-ingress-controller).*"}
> on (service) group_left ()
slo_threshold_low
),
"team",
"$1",
"label_application_giantswarm_io_team",
"(.*)"
)
for: 5m
labels:
Expand All @@ -35,4 +49,4 @@ spec:
cancel_if_cluster_has_no_workers: "true"
cancel_if_outside_working_hours: {{ include "workingHoursOnly" . }}
severity: page
team: '{{`{{ $labels.label_application_giantswarm_io_team }}`}}'
team: '{{`{{ $labels.team }}`}}'

0 comments on commit 13553dc

Please sign in to comment.