From 014e7ccdc424f3b45fed44b454a123a33ffec41a Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Fri, 25 Oct 2024 14:08:32 +0100 Subject: [PATCH] Updated `cluster_release_version` to support CAPI clusters (#1402) Signed-off-by: Marcus Noble --- CHANGELOG.md | 4 ++++ .../platform/atlas/recording-rules/grafana-cloud.rules.yml | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de99a9f6..bb1ddeed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Updated `aggregation:giantswarm:cluster_release_version` expression to support CAPI clusters + ## [4.21.0] - 2024-10-25 ### Changed diff --git a/helm/prometheus-rules/templates/platform/atlas/recording-rules/grafana-cloud.rules.yml b/helm/prometheus-rules/templates/platform/atlas/recording-rules/grafana-cloud.rules.yml index a4e22112..3ebe0897 100644 --- a/helm/prometheus-rules/templates/platform/atlas/recording-rules/grafana-cloud.rules.yml +++ b/helm/prometheus-rules/templates/platform/atlas/recording-rules/grafana-cloud.rules.yml @@ -121,7 +121,10 @@ spec: {{- end }} ) record: aggregation:giantswarm:cluster_info - - expr: sum(cluster_service_cluster_info) by (release_version, cluster_id, cluster_type, customer, installation, pipeline, provider, region) / 2 or sum(cluster_operator_cluster_status{release_version!=""}) by (release_version, cluster_id, cluster_type, customer, installation, pipeline, provider, region) + - expr: |- + sum(cluster_service_cluster_info) by (release_version, cluster_id, cluster_type, customer, installation, pipeline, provider, region) / 2 + or sum(cluster_operator_cluster_status{release_version!=""}) by (release_version, cluster_id, cluster_type, customer, installation, pipeline, provider, region) + or sum(capi_cluster_info) by (release_version, cluster_id, cluster_type, customer, installation, pipeline, provider, region) record: aggregation:giantswarm:cluster_release_version - expr: avg_over_time(cluster_operator_cluster_create_transition[1w]) record: aggregation:giantswarm:cluster_transition_create