From c3b6b0f7ab2314b841c01abef0fc6961a85e7623 Mon Sep 17 00:00:00 2001 From: qdsordinarydream <66229105+qdsordinarydream@users.noreply.github.com> Date: Mon, 9 Oct 2023 15:12:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=A7=82?= =?UTF-8?q?=E6=B5=8B=E6=80=A7=E4=B8=AD=E8=AF=B7=E6=B1=82=E6=97=B6=E5=BB=B6?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E6=8C=87=E6=A0=87=E5=BC=82=E5=B8=B8=20(#248)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../polaris/monitor/registryMonitor/types.ts | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/web/src/polaris/monitor/registryMonitor/types.ts b/web/src/polaris/monitor/registryMonitor/types.ts index 8aaba484..2288d182 100644 --- a/web/src/polaris/monitor/registryMonitor/types.ts +++ b/web/src/polaris/monitor/registryMonitor/types.ts @@ -115,12 +115,12 @@ export const getQueryMap = { name: '均值', query: interfaceName && podName - ? `avg(client_rq_timeout{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` + ? `avg(client_rq_timeout_avg{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` : interfaceName - ? `avg(client_rq_timeout{api=~"${interfaceName}"}) or on() vector(0)` + ? `avg(client_rq_timeout_avg{api=~"${interfaceName}"}) or on() vector(0)` : podName - ? `avg(client_rq_timeout{polaris_server_instance="${podName}"}) or on() vector(0)` - : `avg(client_rq_timeout) or on() vector(0)`, + ? `avg(client_rq_timeout_avg{polaris_server_instance="${podName}"}) or on() vector(0)` + : `avg(client_rq_timeout_avg) or on() vector(0)`, boardFunction: AvgReduceFunction, unit: 'ms', minStep: 60, @@ -130,12 +130,12 @@ export const getQueryMap = { name: '最大值', query: interfaceName && podName - ? `max(client_rq_timeout{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` + ? `max(client_rq_timeout_avg{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` : interfaceName - ? `max(client_rq_timeout{api=~"${interfaceName}"}) or on() vector(0)` + ? `max(client_rq_timeout_avg{api=~"${interfaceName}"}) or on() vector(0)` : podName - ? `max(client_rq_timeout{polaris_server_instance="${podName}"}) or on() vector(0)` - : `max(client_rq_timeout) or on() vector(0)`, + ? `max(client_rq_timeout_avg{polaris_server_instance="${podName}"}) or on() vector(0)` + : `max(client_rq_timeout_avg) or on() vector(0)`, boardFunction: MaxReduceFunction, unit: 'ms', minStep: 60, @@ -145,12 +145,12 @@ export const getQueryMap = { name: '最小值', query: interfaceName && podName - ? `min(client_rq_timeout{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` + ? `min(client_rq_timeout_avg{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` : interfaceName - ? `min(client_rq_timeout{api=~"${interfaceName}"}) or on() vector(0)` + ? `min(client_rq_timeout_avg{api=~"${interfaceName}"}) or on() vector(0)` : podName - ? `min(client_rq_timeout{polaris_server_instance="${podName}"}) or on() vector(0)` - : `min(client_rq_timeout) or on() vector(0)`, + ? `min(client_rq_timeout_avg{polaris_server_instance="${podName}"}) or on() vector(0)` + : `min(client_rq_timeout_avg) or on() vector(0)`, boardFunction: MinReduceFunction, unit: 'ms', minStep: 60, @@ -160,12 +160,12 @@ export const getQueryMap = { name: 'P99', query: interfaceName && podName - ? `quantile(0.99, client_rq_timeout{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` + ? `quantile(0.99, client_rq_timeout_avg{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` : interfaceName - ? `quantile(0.99, client_rq_timeout{api=~"${interfaceName}"}) or on() vector(0)` + ? `quantile(0.99, client_rq_timeout_avg{api=~"${interfaceName}"}) or on() vector(0)` : podName - ? `quantile(0.99, client_rq_timeout{polaris_server_instance="${podName}"}) or on() vector(0)` - : `quantile(0.99, client_rq_timeout) or on() vector(0)`, + ? `quantile(0.99, client_rq_timeout_avg{polaris_server_instance="${podName}"}) or on() vector(0)` + : `quantile(0.99, client_rq_timeout_avg) or on() vector(0)`, asyncBoardFunction: async () => { const res = await getMonitorData({ start, @@ -173,12 +173,12 @@ export const getQueryMap = { step: interval, query: interfaceName && podName - ? `quantile(0.99, client_rq_timeout{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` + ? `quantile(0.99, client_rq_timeout_avg{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` : interfaceName - ? `quantile(0.99, client_rq_timeout{api=~"${interfaceName}"}) or on() vector(0)` + ? `quantile(0.99, client_rq_timeout_avg{api=~"${interfaceName}"}) or on() vector(0)` : podName - ? `quantile(0.99, client_rq_timeout{polaris_server_instance="${podName}"}) or on() vector(0)` - : `quantile(0.99, client_rq_timeout) or on() vector(0)`, + ? `quantile(0.99, client_rq_timeout_avg{polaris_server_instance="${podName}"}) or on() vector(0)` + : `quantile(0.99, client_rq_timeout_avg) or on() vector(0)`, }) const point = res?.[0]?.values?.[0] if (!point) return '-' @@ -193,12 +193,12 @@ export const getQueryMap = { name: 'P95', query: interfaceName && podName - ? `quantile(0.95, client_rq_timeout{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` + ? `quantile(0.95, client_rq_timeout_avg{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` : interfaceName - ? `quantile(0.95, client_rq_timeout{api=~"${interfaceName}"}) or on() vector(0)` + ? `quantile(0.95, client_rq_timeout_avg{api=~"${interfaceName}"}) or on() vector(0)` : podName - ? `quantile(0.95, client_rq_timeout{polaris_server_instance="${podName}"}) or on() vector(0)` - : `quantile(0.95, client_rq_timeout) or on() vector(0)`, + ? `quantile(0.95, client_rq_timeout_avg{polaris_server_instance="${podName}"}) or on() vector(0)` + : `quantile(0.95, client_rq_timeout_avg) or on() vector(0)`, asyncBoardFunction: async () => { const res = await getMonitorData({ start, @@ -206,12 +206,12 @@ export const getQueryMap = { step: interval, query: interfaceName && podName - ? `quantile(0.95, client_rq_timeout{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` + ? `quantile(0.95, client_rq_timeout_avg{api=~"${interfaceName}",polaris_server_instance="${podName}"}) or on() vector(0)` : interfaceName - ? `quantile(0.95, client_rq_timeout{api=~"${interfaceName}"}) or on() vector(0)` + ? `quantile(0.95, client_rq_timeout_avg{api=~"${interfaceName}"}) or on() vector(0)` : podName - ? `quantile(0.95, client_rq_timeout{polaris_server_instance="${podName}"}) or on() vector(0)` - : `quantile(0.95, client_rq_timeout) or on() vector(0)`, + ? `quantile(0.95, client_rq_timeout_avg{polaris_server_instance="${podName}"}) or on() vector(0)` + : `quantile(0.95, client_rq_timeout_avg) or on() vector(0)`, }) const point = res?.[0]?.values?.[0] if (!point) return '-'