From 6b414fbb2012f94f806f1362aa6b2fcfaa3f5b9d Mon Sep 17 00:00:00 2001 From: avi robusta Date: Sun, 17 Mar 2024 19:17:49 +0200 Subject: fix history range query --- .../prometheus/metrics_service/prometheus_metrics_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 939dc6e..0db59c2 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 @@ -158,7 +158,7 @@ class PrometheusMetricsService(MetricsService): now = datetime.now() result = await self.query_range( - "prometheus_tsdb_head_series", + "max(prometheus_tsdb_head_series)", start=now - history_duration, end=now, step=timedelta(hours=1), -- cgit v1.2.3