This is an automated email from the ASF dual-hosted git repository.

wankai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 33ea0f1347 Apply MQE on APISIX, AWS_EKS, AWS_GATEWAY and AWS_S3 layer 
UI templates (#11148)
33ea0f1347 is described below

commit 33ea0f1347c6dc99837efb67664ba886cdc5063e
Author: pg.yang <[email protected]>
AuthorDate: Sun Jul 30 14:33:09 2023 +0800

    Apply MQE on APISIX, AWS_EKS, AWS_GATEWAY and AWS_S3 layer UI templates 
(#11148)
---
 docs/en/changes/changes.md                         |   1 +
 .../apisix/apisix-endpoint.json                    |  28 ++---
 .../apisix/apisix-instance.json                    | 112 ++++++++---------
 .../apisix/apisix-service.json                     |  72 ++++++-----
 .../aws_eks/aws_eks-cluster.json                   | 122 +++++++++---------
 .../aws_eks/aws_eks-node.json                      | 140 ++++++++++-----------
 .../aws_eks/aws_eks-service.json                   |  56 ++++-----
 .../aws_gateway/aws_gateway_endpoint.json          |  63 +++++-----
 .../aws_gateway/aws_gateway_service.json           | 103 ++++++++-------
 .../aws_s3/aws_s3-service.json                     | 102 ++++++++-------
 test/e2e-v2/cases/apisix/apisix-cases.yaml         |  14 +--
 .../metrics-has-connection-value-label.yml}        |  41 ++++--
 .../expected/metrics-has-latency-value-label.yml   |  59 +++++++++
 ...abel.yml => metrics-has-status-value-label.yml} |  32 ++---
 .../aws/api-gateway/expected/metrics-has-value.yml |  27 ++--
 .../cases/aws/api-gateway/gateway-cases.yaml       |  10 +-
 test/e2e-v2/cases/aws/eks/eks-cases.yaml           |   4 +-
 .../cases/aws/eks/expected/metrics-has-value.yml   |  26 ++--
 .../cases/aws/s3/expected/metrics-has-value.yml    |  26 ++--
 test/e2e-v2/cases/aws/s3/s3-cases.yaml             |   8 +-
 20 files changed, 574 insertions(+), 472 deletions(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index b625fc3adf..9f841a8292 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -57,6 +57,7 @@
 * Add component ID for Lock (ID=5016).
 * [Breaking change] Adjust the structure of hooks in the `alarm-settings.yml`. 
Support multiple configs for each hook types and specifying the hooks in the 
alarm rule.
 * Bump up Armeria to 1.24.3.
+* Apply MQE on APISIX, AWS_EKS, AWS_GATEWAY and AWS_S3 layer UI templates
 
 #### UI
 
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-endpoint.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-endpoint.json
index c5b1b7c2fc..7a7a1da398 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-endpoint.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-endpoint.json
@@ -38,11 +38,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_endpoint_http_status"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -74,11 +75,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_endpoint_http_latency"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -111,11 +113,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "meter_apisix_endpoint_bandwidth"
+          "expressions": [
+            "meter_apisix_endpoint_bandwidth/1024"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -127,11 +130,6 @@
             {
               "widgetId": "3"
             }
-          ],
-          "metricConfig": [
-            {
-              "calculation": "byteToKB"
-            }
           ]
         }
       ],
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-instance.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-instance.json
index a8b6a27703..672e1f4aaa 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-instance.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-instance.json
@@ -38,11 +38,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_instance_http_requests"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
 
@@ -64,11 +65,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_instance_http_status_matched"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -112,11 +114,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_instance_http_latency_matched"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -161,11 +164,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "meter_apisix_instance_bandwidth_matched"
+          "expressions": [
+            "meter_apisix_instance_bandwidth_matched/1024"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -189,11 +193,6 @@
             {
               "widgetId": "8"
             }
-          ],
-          "metricConfig": [
-            {
-              "calculation": "byteToKB"
-            }
           ]
         },
         {
@@ -203,10 +202,11 @@
           "h": 13,
           "i": "5",
           "type": "Widget",
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
-          "metrics": [
+          "expressions": [
             "meter_apisix_instance_http_connections"
           ],
           "graph": {
@@ -263,11 +263,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_instance_http_status_unmatched"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -311,11 +312,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_instance_http_latency_unmatched"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -360,11 +362,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "meter_apisix_instance_bandwidth_unmatched"
+          "expressions": [
+            "meter_apisix_instance_bandwidth_unmatched/1024"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -388,11 +391,6 @@
             {
               "widgetId": "8"
             }
-          ],
-          "metricConfig": [
-            {
-              "calculation": "byteToKB"
-            }
           ]
         },
 
@@ -414,16 +412,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "meter_apisix_instance_shared_dict_capacity_bytes"
+          "expressions": [
+            "meter_apisix_instance_shared_dict_capacity_bytes/1024/1024"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
-          ],
-          "metricConfig": [
-            {
-              "calculation": "byteToMB"
-            }
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -453,16 +447,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "meter_apisix_instance_shared_dict_free_space_bytes"
+          "expressions": [
+            "meter_apisix_instance_shared_dict_free_space_bytes/1024/1024"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
-          ],
-          "metricConfig": [
-            {
-              "calculation": "byteToMB"
-            }
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -491,11 +481,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_instance_etcd_indexes"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
           ]
@@ -518,11 +509,12 @@
             "textAlign": "center",
             "showUnit": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_instance_etcd_reachable"
           ],
-          "metricTypes": [
-            "readMetricsValue"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-service.json
index 9e8e9ce187..a913a2a683 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/apisix/apisix-service.json
@@ -38,11 +38,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_sv_http_requests"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
 
@@ -64,11 +65,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_sv_http_status_matched"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -112,11 +114,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_sv_http_latency_matched"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -161,11 +164,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "meter_apisix_sv_bandwidth_matched"
+          "expressions": [
+            "meter_apisix_sv_bandwidth_matched/1024"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -189,11 +193,6 @@
             {
               "widgetId": "8"
             }
-          ],
-          "metricConfig": [
-            {
-              "calculation": "byteToKB"
-            }
           ]
         },
         {
@@ -203,12 +202,13 @@
           "h": 13,
           "i": "5",
           "type": "Widget",
-          "metricTypes": [
-            "readLabeledMetricsValues"
-          ],
-          "metrics": [
+          "expressions": [
             "meter_apisix_sv_http_connections"
           ],
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
+          ],
           "graph": {
             "type": "Line",
             "step": false,
@@ -263,11 +263,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_sv_http_status_unmatched"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -311,11 +312,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "meter_apisix_sv_http_latency_unmatched"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -360,11 +362,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "meter_apisix_sv_bandwidth_unmatched"
+          "expressions": [
+            "meter_apisix_sv_bandwidth_unmatched/1024"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -388,11 +391,6 @@
             {
               "widgetId": "8"
             }
-          ],
-          "metricConfig": [
-            {
-              "calculation": "byteToKB"
-            }
           ]
         },
         {
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-cluster.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-cluster.json
index c9dad39c58..8411668c75 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-cluster.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-cluster.json
@@ -38,11 +38,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "eks_cluster_node_count"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -89,11 +90,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "eks_cluster_failed_node_count"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -140,11 +142,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "eks_cluster_namespace_count"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -191,11 +194,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "eks_cluster_service_count"
           ],
-          "metricTypes": [
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -242,11 +246,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "eks_cluster_net_rx_dropped"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -293,11 +298,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "eks_cluster_net_rx_error"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -344,11 +350,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "eks_cluster_net_tx_dropped"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -395,11 +402,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "eks_cluster_net_tx_error"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "associate": [
             {
@@ -443,38 +451,35 @@
             "dashboardName": "AWS_EKS-node",
             "fontSize": 12
           },
-          "metrics": [
-            "eks_cluster_node_cpu_utilization",
-            "eks_cluster_node_memory_utilization",
-            "eks_cluster_node_network_tx_errors",
-            "eks_cluster_node_network_rx_errors"
+          "expressions": [
+            "avg(eks_cluster_node_cpu_utilization)",
+            "avg(eks_cluster_node_memory_utilization)",
+            "avg(eks_cluster_node_network_tx_errors)",
+            "avg(eks_cluster_node_network_rx_errors)"
           ],
-          "metricTypes": [
-            "readMetricsValues",
-            "readMetricsValues",
-            "readLabeledMetricsValues",
-            "readLabeledMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "SINGLE_VALUE",
+            "SINGLE_VALUE",
+            "SINGLE_VALUE",
+            "SINGLE_VALUE"
           ],
           "metricConfig": [
             {
               "label": "CPU Usage",
-              "unit": "%",
-              "calculation": "average"
+              "unit": "%"
             },
             {
               "label": "Memory Usage",
-              "unit": "%",
-              "calculation": "average"
+              "unit": "%"
             },
             {
               "label": "Network TX Errors",
-              "unit": "count/s",
-              "calculation": "average"
+              "unit": "count/s"
             },
             {
               "label": "Network RX Errors",
-              "unit": "count/s",
-              "calculation": "average"
+              "unit": "count/s"
             }
           ],
           "moved": false
@@ -497,38 +502,35 @@
             "showYAxis": false,
             "showGroup": true
           },
-          "metrics": [
-            "eks_cluster_service_pod_cpu_utilization",
-            "eks_cluster_service_pod_memory_utilization",
-            "eks_cluster_service_pod_net_tx_error",
-            "eks_cluster_service_pod_net_rx_error"
+          "expressions": [
+            "avg(eks_cluster_service_pod_cpu_utilization)",
+            "avg(eks_cluster_service_pod_memory_utilization)",
+            "avg(eks_cluster_service_pod_net_tx_error)",
+            "avg(eks_cluster_service_pod_net_rx_error)"
           ],
-          "metricTypes": [
-            "readMetricsValues",
-            "readMetricsValues",
-            "readMetricsValues",
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "SINGLE_VALUE",
+            "SINGLE_VALUE",
+            "SINGLE_VALUE",
+            "SINGLE_VALUE"
           ],
           "metricConfig": [
             {
               "label": "CPU Usage",
-              "unit": "%",
-              "calculation": "average"
+              "unit": "%"
             },
             {
               "label": "Memory Usage",
-              "unit": "%",
-              "calculation": "average"
+              "unit": "%"
             },
             {
               "label": "Network TX Errors",
-              "unit": "count/s",
-              "calculation": "average"
+              "unit": "count/s"
             },
             {
               "label": "Network RX Errors",
-              "unit": "count/s",
-              "calculation": "average"
+              "unit": "count/s"
             }
           ]
         }
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-node.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-node.json
index cf21cae126..0f9d29a662 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-node.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-node.json
@@ -49,11 +49,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_pod_number"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -106,11 +107,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_cpu_utilization"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -163,11 +165,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_memory_utilization"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -221,16 +224,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
-                    "eks_cluster_node_net_rx_bytes"
+                  "expressions": [
+                    "eks_cluster_node_net_rx_bytes/1024"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
-                  ],
-                  "metricConfig": [
-                    {
-                      "calculation": "byteToKB"
-                    }
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -283,11 +282,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_net_rx_error"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -340,16 +340,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
-                    "eks_cluster_node_net_tx_bytes"
+                  "expressions": [
+                    "eks_cluster_node_net_tx_bytes/1024"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
-                  ],
-                  "metricConfig": [
-                    {
-                      "calculation": "byteToKB"
-                    }
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -402,11 +398,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_net_tx_error"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -459,11 +456,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_disk_io_write"
                   ],
-                  "metricTypes": [
-                    "readLabeledMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -516,11 +514,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_disk_io_read"
                   ],
-                  "metricTypes": [
-                    "readLabeledMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -573,11 +572,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_fs_utilization"
                   ],
-                  "metricTypes": [
-                    "readLabeledMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -635,11 +635,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_pod_cpu_utilization"
                   ],
-                  "metricTypes": [
-                    "readLabeledMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -680,11 +681,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_pod_memory_utilization"
                   ],
-                  "metricTypes": [
-                    "readLabeledMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -725,16 +727,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
-                    "eks_cluster_node_pod_net_rx_bytes"
+                  "expressions": [
+                    "eks_cluster_node_pod_net_rx_bytes/1024"
                   ],
-                  "metricTypes": [
-                    "readLabeledMetricsValues"
-                  ],
-                  "metricConfig": [
-                    {
-                      "calculation": "byteToKB"
-                    }
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -775,11 +773,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_pod_net_rx_error"
                   ],
-                  "metricTypes": [
-                    "readLabeledMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -820,16 +819,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
-                    "eks_cluster_node_pod_net_tx_bytes"
+                  "expressions": [
+                    "eks_cluster_node_pod_net_tx_bytes/1024"
                   ],
-                  "metricTypes": [
-                    "readLabeledMetricsValues"
-                  ],
-                  "metricConfig": [
-                    {
-                      "calculation": "byteToKB"
-                    }
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -870,11 +865,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_node_pod_net_tx_error"
                   ],
-                  "metricTypes": [
-                    "readLabeledMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-service.json
index 2c44a40cbe..a1bff06702 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_eks/aws_eks-service.json
@@ -49,11 +49,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_service_pod_cpu_utilization"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -94,11 +95,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_service_pod_memory_utilization"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -139,16 +141,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
-                    "eks_cluster_service_pod_net_rx_bytes"
+                  "expressions": [
+                    "eks_cluster_service_pod_net_rx_bytes/1024"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
-                  ],
-                  "metricConfig": [
-                    {
-                      "calculation": "byteToKB"
-                    }
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -189,11 +187,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_service_pod_net_rx_error"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -234,16 +233,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
-                    "eks_cluster_service_pod_net_tx_bytes"
+                  "expressions": [
+                    "eks_cluster_service_pod_net_tx_bytes/1024"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
-                  ],
-                  "metricConfig": [
-                    {
-                      "calculation": "byteToKB"
-                    }
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
@@ -284,11 +279,12 @@
                     "showXAxis": true,
                     "showYAxis": true
                   },
-                  "metrics": [
+                  "expressions": [
                     "eks_cluster_service_pod_net_tx_error"
                   ],
-                  "metricTypes": [
-                    "readMetricsValues"
+                  "metricMode": "Expression",
+                  "typesOfMQE": [
+                    "TIME_SERIES_VALUES"
                   ],
                   "associate": [
                     {
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_gateway/aws_gateway_endpoint.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_gateway/aws_gateway_endpoint.json
index 57a8d0e437..e492a8f463 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_gateway/aws_gateway_endpoint.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_gateway/aws_gateway_endpoint.json
@@ -38,11 +38,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_endpoint_count"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -63,11 +64,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_endpoint_4xx"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -88,11 +90,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_endpoint_5xx"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -113,11 +116,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_endpoint_latency"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -138,11 +142,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_endpoint_integration_latency"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -163,16 +168,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "aws_gateway_endpoint_data_processed"
+          "expressions": [
+            "aws_gateway_endpoint_data_processed/1024"
           ],
-          "metricTypes": [
-            "readMetricsValues"
-          ],
-          "metricConfig": [
-            {
-              "calculation": "byteToKB"
-            }
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
 
@@ -194,11 +195,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_endpoint_cache_hit_rate"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -219,11 +221,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_endpoint_cache_miss_rate"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         }
       ],
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_gateway/aws_gateway_service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_gateway/aws_gateway_service.json
index 058ff3a872..9f1d4b5c6b 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_gateway/aws_gateway_service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_gateway/aws_gateway_service.json
@@ -38,11 +38,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_service_count"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -63,11 +64,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_service_4xx"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -88,11 +90,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_service_5xx"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -113,11 +116,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_service_latency"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -138,11 +142,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_service_integration_latency"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -163,16 +168,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "aws_gateway_service_data_processed"
+          "expressions": [
+            "aws_gateway_service_data_processed/1024"
           ],
-          "metricTypes": [
-            "readMetricsValues"
-          ],
-          "metricConfig": [
-            {
-              "calculation": "byteToKB"
-            }
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
 
@@ -194,11 +195,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_service_cache_hit_rate"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -219,11 +221,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_gateway_service_cache_miss_rate"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -241,42 +244,38 @@
             "showYAxis": false,
             "showGroup": true
           },
-          "metrics": [
-            "aws_gateway_endpoint_count",
-            "aws_gateway_endpoint_4xx",
-            "aws_gateway_endpoint_5xx",
-            "aws_gateway_endpoint_latency",
-            "aws_gateway_endpoint_integration_latency"
+          "expressions": [
+            "avg(aws_gateway_endpoint_count)",
+            "avg(aws_gateway_endpoint_4xx)",
+            "avg(aws_gateway_endpoint_5xx)",
+            "avg(aws_gateway_endpoint_latency)",
+            "avg(aws_gateway_endpoint_integration_latency)"
           ],
-          "metricTypes": [
-            "readMetricsValues",
-            "readMetricsValues",
-            "readMetricsValues",
-            "readMetricsValues",
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "SINGLE_VALUE",
+            "SINGLE_VALUE",
+            "SINGLE_VALUE",
+            "SINGLE_VALUE",
+            "SINGLE_VALUE"
           ],
           "metricConfig": [
             {
-              "label": "Request Count",
-              "calculation": "average"
+              "label": "Request Count"
             },
             {
-              "label": "4xx Count",
-              "calculation": "average"
+              "label": "4xx Count"
             },
             {
-              "label": "5xx Count",
-              "calculation": "average"
+              "label": "5xx Count"
             },
             {
               "label": "Latency",
-              "unit": "ms",
-              "calculation": "average"
+              "unit": "ms"
             },
             {
               "label": "Integration Latency",
-              "unit": "ms",
-              "calculation": "average"
+              "unit": "ms"
             }
           ]
         }
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_s3/aws_s3-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_s3/aws_s3-service.json
index ecdbf40c22..5a5455d7a9 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_s3/aws_s3-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/aws_s3/aws_s3-service.json
@@ -36,11 +36,12 @@
             "textAlign": "center",
             "showUnit": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_4xx"
           ],
-          "metricTypes": [
-            "readMetricsValue"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -59,11 +60,12 @@
             "textAlign": "center",
             "showUnit": true
           },
-          "metrics": [
-            "aws_s3_4xx"
+          "expressions": [
+            "aws_s3_5xx"
           ],
-          "metricTypes": [
-            "readMetricsValue"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -82,11 +84,12 @@
             "textAlign": "center",
             "showUnit": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_all_requests"
           ],
-          "metricTypes": [
-            "readMetricsValue"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -105,11 +108,12 @@
             "textAlign": "center",
             "showUnit": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_request_latency"
           ],
-          "metricTypes": [
-            "readMetricsValue"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -130,11 +134,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_4xx"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -155,11 +160,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
-            "aws_s3_4xx"
+          "expressions": [
+            "aws_s3_5xx"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -180,11 +186,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_request_latency"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -205,11 +212,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_first_latency_bytes"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -230,11 +238,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_all_requests"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -255,11 +264,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_get_requests"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -280,11 +290,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_put_requests"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -305,11 +316,12 @@
             "showXAxis": true,
             "showYAxis": true
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_delete_requests"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ]
         },
         {
@@ -338,11 +350,12 @@
               "total": true
             }
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_downloaded_bytes"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "metricConfig": [
             {
@@ -376,11 +389,12 @@
               "total": true
             }
           },
-          "metrics": [
+          "expressions": [
             "aws_s3_uploaded_bytes"
           ],
-          "metricTypes": [
-            "readMetricsValues"
+          "metricMode": "Expression",
+          "typesOfMQE": [
+            "TIME_SERIES_VALUES"
           ],
           "metricConfig": [
             {
diff --git a/test/e2e-v2/cases/apisix/apisix-cases.yaml 
b/test/e2e-v2/cases/apisix/apisix-cases.yaml
index 42666d8277..8f95770e13 100644
--- a/test/e2e-v2/cases/apisix/apisix-cases.yaml
+++ b/test/e2e-v2/cases/apisix/apisix-cases.yaml
@@ -22,14 +22,14 @@
     - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql instance ls 
--service-name=APISIX::showcase-apisix-service
       expected:  expected/instance.yml
     # service metrics
-    - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics multiple-linear 
--name=meter_apisix_sv_http_connections 
--service-name=APISIX::showcase-apisix-service |yq e 'to_entries | with(.[] ; 
.value=(.value | to_entries))' -
-      expected: expected/metrics-has-value-label.yml
+    - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec 
--expression=meter_apisix_sv_http_connections 
--service-name=APISIX::showcase-apisix-service
+      expected: expected/metrics-has-connection-value-label.yml
     # instance metrics
     - query: |
-        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics multiple-linear 
--name=meter_apisix_instance_http_status_matched 
--service-name=APISIX::showcase-apisix-service --instance-name=$(
+        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec 
--expression=meter_apisix_instance_http_status_matched 
--service-name=APISIX::showcase-apisix-service --instance-name=$(
               swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql instance ls 
--service-name=APISIX::showcase-apisix-service |yq e '.[0].name' -
-        ) | yq e 'to_entries | with(.[] ; .value=(.value | to_entries))' -
-      expected: expected/metrics-has-value-label.yml
+        )
+      expected: expected/metrics-has-status-value-label.yml
     # endpoint metrics
-    - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics multiple-linear 
--name=meter_apisix_endpoint_http_latency --endpoint-name='route/routes#1' 
--service-name=APISIX::showcase-apisix-service |yq e 'to_entries | with(.[] ; 
.value=(.value | to_entries))' -
-      expected: expected/metrics-has-value-label.yml
\ No newline at end of file
+    - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec 
--expression=meter_apisix_endpoint_http_latency 
--endpoint-name='route/routes#1' --service-name=APISIX::showcase-apisix-service
+      expected: expected/metrics-has-latency-value-label.yml
diff --git a/test/e2e-v2/cases/aws/eks/expected/metrics-has-value.yml 
b/test/e2e-v2/cases/apisix/expected/metrics-has-connection-value-label.yml
similarity index 56%
copy from test/e2e-v2/cases/aws/eks/expected/metrics-has-value.yml
copy to test/e2e-v2/cases/apisix/expected/metrics-has-connection-value-label.yml
index 04b077dd98..66c1e871d4 100644
--- a/test/e2e-v2/cases/aws/eks/expected/metrics-has-value.yml
+++ b/test/e2e-v2/cases/apisix/expected/metrics-has-connection-value-label.yml
@@ -13,13 +13,34 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
-- key: {{ notEmpty .key }}
-  value:
-    value: 0
-    isemptyvalue: true
-- key: {{ notEmpty .key }}
-  value:
-    value: {{ ge .value.value 1 }}
-    isemptyvalue: false
-{{- end }}
+type: TIME_SERIES_VALUES
+results:
+  {{- contains .results }}
+- metric:
+    labels:
+      - key: _
+        value: "accepted"
+  values:
+    {{- contains .values }}
+    - id: {{ notEmpty .id }}
+      value: {{ .value }}
+      traceid: null
+    - id: {{ notEmpty .id }}
+      value: null
+      traceid: null
+    {{- end}}
+- metric:
+    labels:
+      - key: _
+        value: "handled"
+  values:
+    {{- contains .values }}
+    - id: {{ notEmpty .id }}
+      value: {{ .value }}
+      traceid: null
+    - id: {{ notEmpty .id }}
+      value: null
+      traceid: null
+    {{- end}}
+{{- end}}
+error: null
diff --git 
a/test/e2e-v2/cases/apisix/expected/metrics-has-latency-value-label.yml 
b/test/e2e-v2/cases/apisix/expected/metrics-has-latency-value-label.yml
new file mode 100644
index 0000000000..d335184b84
--- /dev/null
+++ b/test/e2e-v2/cases/apisix/expected/metrics-has-latency-value-label.yml
@@ -0,0 +1,59 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+type: TIME_SERIES_VALUES
+results:
+  {{- contains .results }}
+- metric:
+    labels:
+      - key: _
+        value: "apisix:50"
+  values:
+    {{- contains .values }}
+    - id: {{ notEmpty .id }}
+      value: {{ .value }}
+      traceid: null
+    - id: {{ notEmpty .id }}
+      value: null
+      traceid: null
+    {{- end}}
+- metric:
+    labels:
+      - key: _
+        value: "apisix:99"
+  values:
+    {{- contains .values }}
+    - id: {{ notEmpty .id }}
+      value: {{ .value }}
+      traceid: null
+    - id: {{ notEmpty .id }}
+      value: null
+      traceid: null
+    {{- end}}
+- metric:
+    labels:
+      - key: _
+        value: "request:99"
+  values:
+    {{- contains .values }}
+    - id: {{ notEmpty .id }}
+      value: {{ .value }}
+      traceid: null
+    - id: {{ notEmpty .id }}
+      value: null
+      traceid: null
+    {{- end}}
+{{- end}}
+error: null
diff --git a/test/e2e-v2/cases/apisix/expected/metrics-has-value-label.yml 
b/test/e2e-v2/cases/apisix/expected/metrics-has-status-value-label.yml
similarity index 70%
rename from test/e2e-v2/cases/apisix/expected/metrics-has-value-label.yml
rename to test/e2e-v2/cases/apisix/expected/metrics-has-status-value-label.yml
index fb38843650..5b3701534a 100644
--- a/test/e2e-v2/cases/apisix/expected/metrics-has-value-label.yml
+++ b/test/e2e-v2/cases/apisix/expected/metrics-has-status-value-label.yml
@@ -13,17 +13,21 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
-- key: {{ notEmpty .key }}
-  value:
-  {{- contains .value }}
-  - key: {{ notEmpty .key }}
-    value:
-      value: 0
-      isemptyvalue: true
-  - key: {{ notEmpty .key }}
-    value:
-      value: {{ ge .value.value 1 }}
-      isemptyvalue: false
-  {{- end }}
-{{- end }}
+type: TIME_SERIES_VALUES
+results:
+  {{- contains .results }}
+- metric:
+    labels:
+      - key: _
+        value: "200"
+  values:
+    {{- contains .values }}
+    - id: {{ notEmpty .id }}
+      value: {{ .value }}
+      traceid: null
+    - id: {{ notEmpty .id }}
+      value: null
+      traceid: null
+    {{- end}}
+{{- end}}
+error: null
diff --git a/test/e2e-v2/cases/aws/api-gateway/expected/metrics-has-value.yml 
b/test/e2e-v2/cases/aws/api-gateway/expected/metrics-has-value.yml
index 247a7cafc8..dc71f56632 100644
--- a/test/e2e-v2/cases/aws/api-gateway/expected/metrics-has-value.yml
+++ b/test/e2e-v2/cases/aws/api-gateway/expected/metrics-has-value.yml
@@ -12,13 +12,20 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-  {{- contains . }}
-- key: {{ notEmpty .key }}
-  value:
-    value: 0
-    isemptyvalue: true
-- key: {{ notEmpty .key }}
-  value:
-    value: {{ gt .value.value 0 }}
-    isemptyvalue: false
-  {{- end }}
+
+type: TIME_SERIES_VALUES
+results:
+  {{- contains .results }}
+  - metric:
+      labels: []
+    values:
+      {{- contains .values }}
+      - id: {{ notEmpty .id }}
+        value: {{ .value }}
+        traceid: null
+      - id: {{ notEmpty .id }}
+        value: null
+        traceid: null
+      {{- end}}
+  {{- end}}
+error: null
diff --git a/test/e2e-v2/cases/aws/api-gateway/gateway-cases.yaml 
b/test/e2e-v2/cases/aws/api-gateway/gateway-cases.yaml
index f28f8729a6..742c09f79b 100644
--- a/test/e2e-v2/cases/aws/api-gateway/gateway-cases.yaml
+++ b/test/e2e-v2/cases/aws/api-gateway/gateway-cases.yaml
@@ -19,11 +19,11 @@
     - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql service ls
       expected: expected/service.yml
     - query: |
-        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics linear \
-          --name=aws_gateway_service_4xx 
--service-name='aws-api-gateway::$default:6m85d5acx7' |yq e 'to_entries' -
+        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec \
+          --expression=aws_gateway_service_4xx 
--service-name='aws-api-gateway::$default:6m85d5acx7'
       expected: expected/metrics-has-value.yml
     - query: |
-        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics linear \
-          --name=aws_gateway_endpoint_latency --endpoint-name='ANY:/graphql' \
-          --service-name='aws-api-gateway::$default:6m85d5acx7' |yq e 
'to_entries' -
+        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec \
+          --expression=aws_gateway_endpoint_latency 
--endpoint-name='ANY:/graphql' \
+          --service-name='aws-api-gateway::$default:6m85d5acx7'
       expected: expected/metrics-has-value.yml
diff --git a/test/e2e-v2/cases/aws/eks/eks-cases.yaml 
b/test/e2e-v2/cases/aws/eks/eks-cases.yaml
index b377583ac2..d918897b56 100644
--- a/test/e2e-v2/cases/aws/eks/eks-cases.yaml
+++ b/test/e2e-v2/cases/aws/eks/eks-cases.yaml
@@ -22,7 +22,7 @@
       expected:  expected/instance.yml
     - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql endpoint ls 
--service-name=aws-eks-cluster::SkyWalking
       expected:  expected/endpoint.yml
-    - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics linear 
--name=eks_cluster_node_memory_utilization 
--service-name=aws-eks-cluster::SkyWalking 
--instance-name=ip-172-31-10-158.ap-northeast-1.compute.internal | yq e 
'to_entries' -
+    - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec 
--expression=eks_cluster_node_memory_utilization 
--service-name=aws-eks-cluster::SkyWalking 
--instance-name=ip-172-31-10-158.ap-northeast-1.compute.internal
       expected: expected/metrics-has-value.yml
-    - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics linear 
--name=eks_cluster_service_pod_net_rx_bytes 
--service-name=aws-eks-cluster::SkyWalking --endpoint-name=kube-dns  | yq e 
'to_entries' -
+    - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec 
--expression="eks_cluster_service_pod_net_rx_bytes/1024" 
--service-name=aws-eks-cluster::SkyWalking --endpoint-name=kube-dns
       expected: expected/metrics-has-value.yml
diff --git a/test/e2e-v2/cases/aws/eks/expected/metrics-has-value.yml 
b/test/e2e-v2/cases/aws/eks/expected/metrics-has-value.yml
index 04b077dd98..dc71f56632 100644
--- a/test/e2e-v2/cases/aws/eks/expected/metrics-has-value.yml
+++ b/test/e2e-v2/cases/aws/eks/expected/metrics-has-value.yml
@@ -13,13 +13,19 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
-- key: {{ notEmpty .key }}
-  value:
-    value: 0
-    isemptyvalue: true
-- key: {{ notEmpty .key }}
-  value:
-    value: {{ ge .value.value 1 }}
-    isemptyvalue: false
-{{- end }}
+type: TIME_SERIES_VALUES
+results:
+  {{- contains .results }}
+  - metric:
+      labels: []
+    values:
+      {{- contains .values }}
+      - id: {{ notEmpty .id }}
+        value: {{ .value }}
+        traceid: null
+      - id: {{ notEmpty .id }}
+        value: null
+        traceid: null
+      {{- end}}
+  {{- end}}
+error: null
diff --git a/test/e2e-v2/cases/aws/s3/expected/metrics-has-value.yml 
b/test/e2e-v2/cases/aws/s3/expected/metrics-has-value.yml
index 04b077dd98..dc71f56632 100644
--- a/test/e2e-v2/cases/aws/s3/expected/metrics-has-value.yml
+++ b/test/e2e-v2/cases/aws/s3/expected/metrics-has-value.yml
@@ -13,13 +13,19 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-{{- contains . }}
-- key: {{ notEmpty .key }}
-  value:
-    value: 0
-    isemptyvalue: true
-- key: {{ notEmpty .key }}
-  value:
-    value: {{ ge .value.value 1 }}
-    isemptyvalue: false
-{{- end }}
+type: TIME_SERIES_VALUES
+results:
+  {{- contains .results }}
+  - metric:
+      labels: []
+    values:
+      {{- contains .values }}
+      - id: {{ notEmpty .id }}
+        value: {{ .value }}
+        traceid: null
+      - id: {{ notEmpty .id }}
+        value: null
+        traceid: null
+      {{- end}}
+  {{- end}}
+error: null
diff --git a/test/e2e-v2/cases/aws/s3/s3-cases.yaml 
b/test/e2e-v2/cases/aws/s3/s3-cases.yaml
index 1c6ebb8c87..2d8cc46603 100644
--- a/test/e2e-v2/cases/aws/s3/s3-cases.yaml
+++ b/test/e2e-v2/cases/aws/s3/s3-cases.yaml
@@ -19,10 +19,10 @@
     - query: swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql service ls
       expected: expected/service.yml
     - query: |
-        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics linear \
-          --name=aws_s3_4xx --service-name aws-s3::skywalking |yq e 
'to_entries' -
+        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec \
+          --expression=aws_s3_4xx --service-name aws-s3::skywalking
       expected: expected/metrics-has-value.yml
     - query: |
-        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics linear \
-          --name=aws_s3_5xx --service-name aws-s3::skywalking |yq e 
'to_entries' -
+        swctl --display yaml 
--base-url=http://${oap_host}:${oap_12800}/graphql metrics exec \
+          --expression=aws_s3_5xx --service-name aws-s3::skywalking
       expected: expected/metrics-has-value.yml

Reply via email to