Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send sloth slos to grafana cloud #1348

Merged
merged 7 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add aggregations for slo metrics to export them to grafana cloud
- Add `MimirHPAReachedMaxReplicas` alert, to detect when Mimir's HPAs have reached maximum capacity.

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,3 +547,110 @@ spec:
- expr: sum(capi_crd_info{resource_name=~".*infrastructure.cluster.x-k8s.io.*"}) by (cluster_id, cluster_type, customer, installation, pipeline, provider, version)
record: aggregation:capi_infrastructure_crd_versions
{{- end }}
- name: slos.grafana-cloud.recording
rules:
# Let's not send any of the slo:sli_error:ratio_ratexxx metrics but the slo:sli_error:ratio_rate5m rule to Grafana Cloud as it's not useful for the SLOs dashboard.
- expr: sum(slo:current_burn_rate:ratio) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region, slo, service)
record: aggregation:slo:current_burn_rate:ratio
- expr: |-
sum(
label_replace(
label_replace(
slo:error_budget:ratio,
"slo",
"$1",
"sloth_id",
"(.*)"
),
"service",
"$1",
"sloth_service",
"(.*)"
)
) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region, slo, service)
record: aggregation:slo:error_budget:ratio
- expr: |-
sum(
label_replace(
label_replace(
slo:objective:ratio,
"slo",
"$1",
"sloth_id",
"(.*)"
),
"service",
"$1",
"sloth_service",
"(.*)"
)
) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region, slo, service)
record: aggregation:slo:objective:ratio
- expr: |-
sum(
label_replace(
label_replace(
slo:period_burn_rate:ratio,
"slo",
"$1",
"sloth_id",
"(.*)"
),
"service",
"$1",
"sloth_service",
"(.*)"
)
) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region, slo, service)
record: aggregation:slo:period_burn_rate:ratio
- expr: |-
sum(
label_replace(
label_replace(
slo:period_error_budget_remaining:ratio,
"slo",
"$1",
"sloth_id",
"(.*)"
),
"service",
"$1",
"sloth_service",
"(.*)"
)
) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region, slo, service)
record: aggregation:slo:period_error_budget_remaining:ratio
- expr: |-
sum(
label_replace(
label_replace(
slo:sli_error:ratio_rate5m,
"slo",
"$1",
"sloth_id",
"(.*)"
),
"service",
"$1",
"sloth_service",
"(.*)"
)
) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region, slo, service)
record: aggregation:slo:sli_error:ratio_rate5m
- expr: |-
sum(
label_replace(
label_replace(
slo:time_period:days,
"slo",
"$1",
"sloth_id",
"(.*)"
),
"service",
"$1",
"sloth_service",
"(.*)"
)
) by (cluster_id, cluster_type, customer, installation, pipeline, provider, region, slo, service)
record: aggregation:slo:time_period:days