From a12f0aa0ac04d0048aa22baec531187dcdb6f250 Mon Sep 17 00:00:00 2001 From: mahmod jabareen Date: Tue, 26 Dec 2023 13:21:29 +0200 Subject: [PATCH] fixing rules --- pkg/monitoring/tmpl/prometheus/instance/ccp/rules.tpl | 4 ++-- pkg/monitoring/tmpl/prometheus/instance/infra/rules.tpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/monitoring/tmpl/prometheus/instance/ccp/rules.tpl b/pkg/monitoring/tmpl/prometheus/instance/ccp/rules.tpl index 6e3c2a58..85235405 100644 --- a/pkg/monitoring/tmpl/prometheus/instance/ccp/rules.tpl +++ b/pkg/monitoring/tmpl/prometheus/instance/ccp/rules.tpl @@ -614,7 +614,7 @@ spec: ) ) ) - record: sum(kube_pod_container_resource_requests{resource="memory"}) by (namespace) + record: namespace:kube_pod_container_resource_requests_memory_bytes:sum - expr: | sum by (namespace) ( sum by (namespace, pod) ( @@ -625,7 +625,7 @@ spec: ) ) ) - record: sum(kube_pod_container_resource_requests{resource="cpu"}) by (namespace) + record: namespace:kube_pod_container_resource_requests_cpu_cores:sum - expr: | max by (cluster, namespace, workload, pod) ( label_replace( diff --git a/pkg/monitoring/tmpl/prometheus/instance/infra/rules.tpl b/pkg/monitoring/tmpl/prometheus/instance/infra/rules.tpl index 776c7623..9b53c03b 100644 --- a/pkg/monitoring/tmpl/prometheus/instance/infra/rules.tpl +++ b/pkg/monitoring/tmpl/prometheus/instance/infra/rules.tpl @@ -614,7 +614,7 @@ spec: ) ) ) - record: sum(kube_pod_container_resource_requests{resource="memory"}) by (namespace) + record: namespace:kube_pod_container_resource_requests_memory_bytes:sum - expr: | sum by (namespace) ( sum by (namespace, pod) ( @@ -625,7 +625,7 @@ spec: ) ) ) - record: sum(kube_pod_container_resource_requests{resource="cpu"}) by (namespace) + record: namespace:kube_pod_container_resource_requests_cpu_cores:sum - expr: | max by (cluster, namespace, workload, pod) ( label_replace(