From a4085adf10a285d89592f81a8b68573ab3ec119f Mon Sep 17 00:00:00 2001 From: ruanliang-hualun Date: Mon, 7 Oct 2024 20:14:05 +0800 Subject: [PATCH] [Bugfix]fix Topic level metric query --- .../src/pages/TopicList/ExpandPartition.tsx | 2 +- .../resources/es/dsl/TopicMetricESDAO/getAggListMetrics | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/km-console/packages/layout-clusters-fe/src/pages/TopicList/ExpandPartition.tsx b/km-console/packages/layout-clusters-fe/src/pages/TopicList/ExpandPartition.tsx index bf87fb59f..81ec21324 100644 --- a/km-console/packages/layout-clusters-fe/src/pages/TopicList/ExpandPartition.tsx +++ b/km-console/packages/layout-clusters-fe/src/pages/TopicList/ExpandPartition.tsx @@ -44,7 +44,7 @@ const ExpandPartition = (props: { record: any; onConfirm: () => void }) => { setLoading(true); const metricParams = { - aggType: 'avg', + aggType: 'sum', endTime: Math.round(endStamp), metricsNames: ['BytesIn', 'BytesOut'], startTime: Math.round(startStamp), diff --git a/km-persistence/src/main/resources/es/dsl/TopicMetricESDAO/getAggListMetrics b/km-persistence/src/main/resources/es/dsl/TopicMetricESDAO/getAggListMetrics index b76f2cb99..c93b4d5f1 100644 --- a/km-persistence/src/main/resources/es/dsl/TopicMetricESDAO/getAggListMetrics +++ b/km-persistence/src/main/resources/es/dsl/TopicMetricESDAO/getAggListMetrics @@ -17,6 +17,13 @@ } } }, + { + "term": { + "brokerAgg" : { + "value": "1" + } + } + }, { "range": { "timestamp": {