From 8e92389c8a9e77efdfe1362428dd0d6f89e9b6db Mon Sep 17 00:00:00 2001 From: Thibault Mange <22740367+thibaultmg@users.noreply.github.com> Date: Thu, 7 Dec 2023 17:35:21 +0100 Subject: [PATCH] update jsonnet Signed-off-by: Thibault Mange <22740367+thibaultmg@users.noreply.github.com> --- jsonnetfile.lock.json | 2 +- .../observatorium-metrics-ruler-telemeter-template.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jsonnetfile.lock.json b/jsonnetfile.lock.json index 5b17f03f4d5..c4e2d07d64c 100644 --- a/jsonnetfile.lock.json +++ b/jsonnetfile.lock.json @@ -230,7 +230,7 @@ "subdir": "configuration" } }, - "version": "54ed3ca4ce0d9b6d05abdc44c0a5abcb91045419", + "version": "73cf41804053c961ac776f5b2ee375ef67f23f64", "sum": "QMVHXmQ6fFl5Cg9XZ/5KgUwwEqyHwA9PGUfhxRLWp+E=" }, { diff --git a/resources/services/app-sre-stage-01/rhobs/telemeter/observatorium-metrics-ruler-telemeter-template.yaml b/resources/services/app-sre-stage-01/rhobs/telemeter/observatorium-metrics-ruler-telemeter-template.yaml index d9f15eb2445..f66f46428b2 100755 --- a/resources/services/app-sre-stage-01/rhobs/telemeter/observatorium-metrics-ruler-telemeter-template.yaml +++ b/resources/services/app-sre-stage-01/rhobs/telemeter/observatorium-metrics-ruler-telemeter-template.yaml @@ -59,7 +59,7 @@ objects: tenant_id: FB870BF3-9F3A-44FF-9BF7-D7A047A52F43 record: id_version:cluster_available - expr: | - topk by (_id) (1, max by (_id, managed, ebs_account, internal) (label_replace(label_replace((subscription_labels{support=~"Standard|Premium|Layered"} * 0 + 1) or subscription_labels * 0, "internal", "true", "email_domain", "redhat.com|(.*\\.|^)ibm.com"), "managed", "", "managed", "false")) + on(_id) group_left(version) (topk by (_id) (1, id_version*0)) + on(_id) group_left(install_type) (topk by (_id) (1, id_install_type*0)) + on(_id) group_left(host_type) (topk by (_id) (1, id_primary_host_type*0)) + on(_id) group_left(provider) (topk by (_id) (1, id_provider*0))) + topk by (_id) (1, max by (_id, managed, ebs_account, internal) (label_replace(label_replace((ocm_subscription{support=~"Standard|Premium|Layered"} * 0 + 1) or ocm_subscription * 0, "internal", "true", "email_domain", "redhat.com|(.*\\.|^)ibm.com"), "managed", "", "managed", "false")) + on(_id) group_left(version) (topk by (_id) (1, id_version*0)) + on(_id) group_left(install_type) (topk by (_id) (1, id_install_type*0)) + on(_id) group_left(host_type) (topk by (_id) (1, id_primary_host_type*0)) + on(_id) group_left(provider) (topk by (_id) (1, id_provider*0))) labels: tenant_id: FB870BF3-9F3A-44FF-9BF7-D7A047A52F43 record: id_version_ebs_account_internal:cluster_subscribed @@ -127,7 +127,7 @@ objects: tenant_id: FB870BF3-9F3A-44FF-9BF7-D7A047A52F43 record: id_network_type - expr: | - 0 * topk by (ebs_account) (1, max by (ebs_account,account_type,internal,email_domain) (label_replace(label_replace(label_replace(subscription_labels{email_domain="redhat.com"}*0+5, "class", "Internal", "class", ".*") or label_replace(subscription_labels{class!="Customer",email_domain=~"(.*\\.|^)ibm.com"}*0+4, "class", "Internal", "class", ".*") or (subscription_labels{class="Customer"}*0+3) or (subscription_labels{class="Partner"}*0+2) or (subscription_labels{class="Evaluation"}*0+1) or label_replace(subscription_labels{class!~"Evaluation|Customer|Partner"}*0+0, "class", "", "class", ".*"), "account_type", "$1", "class", "(.+)"), "internal", "true", "email_domain", "redhat.com|(.*\\.|^)ibm.com") )) + 0 * topk by (ebs_account) (1, max by (ebs_account,account_type,internal,email_domain) (label_replace(label_replace(label_replace(ocm_subscription{email_domain="redhat.com"}*0+5, "class", "Internal", "class", ".*") or label_replace(ocm_subscription{class!="Customer",email_domain=~"(.*\\.|^)ibm.com"}*0+4, "class", "Internal", "class", ".*") or (ocm_subscription{class="Customer"}*0+3) or (ocm_subscription{class="Partner"}*0+2) or (ocm_subscription{class="Evaluation"}*0+1) or label_replace(ocm_subscription{class!~"Evaluation|Customer|Partner"}*0+0, "class", "", "class", ".*"), "account_type", "$1", "class", "(.+)"), "internal", "true", "email_domain", "redhat.com|(.*\\.|^)ibm.com") )) labels: tenant_id: FB870BF3-9F3A-44FF-9BF7-D7A047A52F43 record: ebs_account_account_type_email_domain_internal