From fffb6b1474e5bf32441e5fbe0e729a7cb939aa7a Mon Sep 17 00:00:00 2001 From: "avi@robusta.dev" Date: Tue, 30 Jul 2024 17:21:51 +0300 Subject: [PATCH] fixing krr scan --- .../prometheus/metrics_service/prometheus_metrics_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py b/robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py index ff1ad1d..4702001 100644 --- a/robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py +++ b/robusta_krr/core/integrations/prometheus/metrics_service/prometheus_metrics_service.py @@ -235,10 +235,10 @@ async def get_cluster_summary(self) -> Dict[str, Any]: sum(max by (instance) (machine_cpu_cores{{ {cluster_label} }})) """ kube_system_requests_mem = f""" - sum(max(kube_pod_container_resource_requests{{ namespace='kube-system', resource='memory' {cluster_label} }}) by (job) ) + sum(max(kube_pod_container_resource_requests{{ namespace='kube-system', resource='memory' {cluster_label} }}) by (job, pod, container) ) """ kube_system_requests_cpu = f""" - sum(max(kube_pod_container_resource_requests{{ namespace='kube-system', resource='cpu' {cluster_label} }}) by (job) ) + sum(max(kube_pod_container_resource_requests{{ namespace='kube-system', resource='cpu' {cluster_label} }}) by (job, pod, container) ) """ try: cluster_memory_result = await self.query_and_validate(memory_query)