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

wusheng 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 2f4f4a1275 Add hierarchy relations auto-matching for 
MYSQL/POSTGRESQL/SO11Y_OAP/VIRTUAL_DATABASE. Fix MQE in dashboards when using 
`Card widget`. (#11818)
2f4f4a1275 is described below

commit 2f4f4a12756eeebe9fed32fff2186edc35fa6144
Author: Wan Kai <wankai...@foxmail.com>
AuthorDate: Wed Jan 24 15:03:45 2024 +0800

    Add hierarchy relations auto-matching for 
MYSQL/POSTGRESQL/SO11Y_OAP/VIRTUAL_DATABASE. Fix MQE in dashboards when using 
`Card widget`. (#11818)
---
 docs/en/changes/changes.md                         | 13 ++-
 .../service-hierarchy-configuration.md             | 22 ++++-
 docs/en/concepts-and-designs/service-hierarchy.md  | 97 ++++++++++++++++++++--
 .../server/core/hierarchy/HierarchyService.java    | 57 +++++++++----
 .../src/main/resources/hierarchy-definition.yml    | 20 ++++-
 .../apisix/apisix-instance.json                    |  4 +-
 .../aws_s3/aws_s3-service.json                     |  8 +-
 .../elasticsearch/elasticsearch-cluster.json       | 50 ++++++-----
 .../elasticsearch/elasticsearch-index.json         | 50 +++++++----
 .../elasticsearch/elasticsearch-node.json          | 51 +++++++++---
 .../ui-initialized-templates/k8s/k8s-cluster.json  | 32 +++----
 .../mongodb/mongodb-cluster.json                   | 10 +--
 .../mongodb/mongodb-node.json                      | 10 +--
 .../mysql/mysql-instance.json                      | 65 +++++++++++----
 .../mysql/mysql-service.json                       | 32 ++++++-
 .../os_linux/linux-service.json                    | 10 +--
 .../os_windows/windows-service.json                |  6 +-
 .../postgresql/postgresql-instance.json            | 96 ++++++++++++++++-----
 .../postgresql/postgresql-root.json                |  5 +-
 .../postgresql/postgresql-service.json             | 30 ++++++-
 .../rabbitmq/rabbitmq-node.json                    | 60 ++++++-------
 .../redis/redis-instance.json                      | 18 ++--
 .../redis/redis-service.json                       |  8 +-
 .../so11y_oap/so11y-instance.json                  | 17 +++-
 .../so11y_oap/so11y-service.json                   |  3 +-
 .../virtual_database/virtual-database-service.json | 23 ++++-
 .../e2e-v2/cases/kafka/kafka-monitoring/Dockerfile |  2 +-
 .../kafka/kafka-monitoring/docker-compose.yml      |  6 +-
 28 files changed, 585 insertions(+), 220 deletions(-)

diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md
index bd70c2e44d..b1eed59df4 100644
--- a/docs/en/changes/changes.md
+++ b/docs/en/changes/changes.md
@@ -15,7 +15,11 @@
 * Support build Service/Instance Hierarchy and query.
 * Change the string field in Elasticsearch storage from **keyword** type to 
**text** type if it set more than `32766` length.
 * [Break Change] Change the configuration field of `ui_template` and `ui_menu` 
in Elasticsearch storage from **keyword** type to **text**.
-* Support Service Hierarchy auto matching.
+* Support Service Hierarchy auto matching, add auto matching layer 
relationships (upper -> lower) as following:
+  - MESH -> MESH_DP
+  - MESH -> K8S_SERVICE
+  - MESH_DP -> K8S_SERVICE
+  - GENERAL -> K8S_SERVICE
 * Add `namespace` suffix for `K8S_SERVICE_NAME_RULE/ISTIO_SERVICE_NAME_RULE` 
and `metadata-service-mapping.yaml` as default.
 * Allow using a dedicated port for ALS receiver.
 * Fix log query by traceId in `JDBCLogQueryDAO`.
@@ -24,6 +28,12 @@
 * Remove unnecessary annotations and functions from Meter Functions.
 * Add `max` and `min` functions for MAL down sampling.
 * Fix critical bug of uncontrolled memory cost of TopN statistics. Change topN 
group key from `StorageId` to `entityId + timeBucket`.
+* Add Service Hierarchy auto matching layer relationships (upper -> lower) as 
following:
+  - MYSQL -> K8S_SERVICE
+  - POSTGRESQL -> K8S_SERVICE
+  - SO11Y_OAP -> K8S_SERVICE
+  - VIRTUAL_DATABASE -> MYSQL
+  - VIRTUAL_DATABASE -> POSTGRESQL
 
 #### UI
 
@@ -40,6 +50,7 @@
 * Update Kubernetes related UI templates for adapt data from eBPF access log. 
 * Fix dashboard `K8S-Service-Root` metrics expression.
 * Add dashboards for Service/Instance Hierarchy.
+* Fix MQE in dashboards when using `Card widget`.
 
 #### Documentation
 
diff --git a/docs/en/concepts-and-designs/service-hierarchy-configuration.md 
b/docs/en/concepts-and-designs/service-hierarchy-configuration.md
index 9080d663e8..3daef37358 100644
--- a/docs/en/concepts-and-designs/service-hierarchy-configuration.md
+++ b/docs/en/concepts-and-designs/service-hierarchy-configuration.md
@@ -19,26 +19,39 @@ hierarchy:
     K8S_SERVICE: lower-short-name-remove-ns
 
   MYSQL:
-    K8S_SERVICE: ~
+    K8S_SERVICE: short-name
+
+  POSTGRESQL:
+    K8S_SERVICE: short-name
+
+  SO11Y_OAP:
+    K8S_SERVICE: short-name
 
   VIRTUAL_DATABASE:
-    MYSQL: ~
+    MYSQL: lower-short-name-with-fqdn
+    POSTGRESQL: lower-short-name-with-fqdn
 
 auto-matching-rules:
   # the name of the upper service is equal to the name of the lower service
   name: "{ (u, l) -> u.name == l.name }"
   # the short name of the upper service is equal to the short name of the 
lower service
   short-name: "{ (u, l) -> u.shortName == l.shortName }"
-  # remove the namespace from the lower service short name
+  # remove the k8s namespace from the lower service short name
+  # this rule is only works on k8s env.
   lower-short-name-remove-ns: "{ (u, l) -> u.shortName == 
l.shortName.substring(0, l.shortName.lastIndexOf('.')) }"
+  # the short name of the upper remove port is equal to the short name of the 
lower service with fqdn suffix
+  # this rule is only works on k8s env.
+  lower-short-name-with-fqdn: "{ (u, l) -> u.shortName.substring(0, 
u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }"
 
 layer-levels:
   # The hierarchy level of the service layer, the level is used to define the 
order of the service layer for UI presentation.
   # The level of the upper service should greater than the level of the lower 
service in `hierarchy` section.
   MESH: 3
   GENERAL: 3
+  SO11Y_OAP: 3
   VIRTUAL_DATABASE: 3
   MYSQL: 2
+  POSTGRESQL: 2
   MESH_DP: 1
   K8S_SERVICE: 0
 ```
@@ -51,11 +64,14 @@ layer-levels:
 - All the layers are defined in the file 
`org.apache.skywalking.oap.server.core.analysis.Layers.java`.
 - If the hierarchy is not defined, the service hierarchy relationship will not 
be built.
 - If you want to add a new relationship, you should certainly know they can be 
matched automatically by [Auto Matching Rules](#auto-matching-rules).
+- Notice: some hierarchy relations and auto matching rules are only works on 
k8s env.
 
 ### Auto Matching Rules
 - The auto matching rules are defined in the `auto-matching-rules` section.
 - Use Groovy script to define the matching rules, the input parameters are the 
upper service(u) and the lower service(l) and the return value is a boolean, 
 which are used to match the relation between the upper service(u) and the 
lower service(l) on the different layers.
+- The default matching rules required the service name configured as 
SkyWalking default and follow the 
[Showcase](https://github.com/apache/skywalking-showcase).
+If you customized the service name in any layer, you should customize the 
related matching rules according your service name rules.
 
 ### Layer Levels
 - Define the hierarchy level of the service layer in the `layer-levels` 
section.
diff --git a/docs/en/concepts-and-designs/service-hierarchy.md 
b/docs/en/concepts-and-designs/service-hierarchy.md
index 27ea733416..e1be329ef8 100644
--- a/docs/en/concepts-and-designs/service-hierarchy.md
+++ b/docs/en/concepts-and-designs/service-hierarchy.md
@@ -7,16 +7,97 @@ There 2 ways to detect the connections:
 1. Automatically matching through OAP internal mechanism, no extra work is 
required.
 2. Build the connections through specific agents.
 
-**Note:** All the relationships should be defined in the 
`config/hierarchy-definition.yml` file.
+**Note:** All the relationships and auto-matching rules should be defined in 
the `config/hierarchy-definition.yml` file.
+If you want to customize it according to your own needs, please refer to 
[Service Hierarchy Configuration](service-hierarchy-configuration.md).
 
-### Automatically Matching 
+### Automatically Matching
+| Upper layer       | Lower layer  | Matching rule                             
                        |
+|-------------------|--------------|-------------------------------------------------------------------|
+| MESH              | MESH_DP      | [MESH On MESH_DP](#mesh-on-mesh_dp)       
                        |
+| MESH              | K8S_SERVICE  | [MESH On 
K8S_SERVICE](#mesh-on-k8s_service)                       |
+| MESH_DP           | K8S_SERVICE  | [MESH_DP On 
K8S_SERVICE](#mesh_dp-on-k8s_service)                 |
+| GENERAL           | K8S_SERVICE  | [GENERAL On 
K8S_SERVICE](#general-on-k8s_service)                 |
+| MYSQL             | K8S_SERVICE  | [MYSQL On 
K8S_SERVICE](#mysql-on-k8s_service)                     |
+| POSTGRESQL        | K8S_SERVICE  | [POSTGRESQL On 
K8S_SERVICE](#postgresql-on-k8s_service)           |
+| SO11Y_OAP         | K8S_SERVICE  | [SO11Y_OAP On 
K8S_SERVICE](#so11y_oap-on-k8s_service)             |
+| VIRTUAL_DATABASE  | MYSQL        | [VIRTUAL_DATABASE On 
MYSQL](#virtual_database-on-mysql)           |
+| VIRTUAL_DATABASE  | POSTGRESQL   | [VIRTUAL_DATABASE On 
POSTGRESQL](#virtual_database-on-postgresql) |
+
+- The following sections will describe the **default matching rules** in 
detail and use the `upper-layer On lower-layer` format. 
+- The example service name are based on SkyWalking 
[Showcase](https://github.com/apache/skywalking-showcase) default deployment.
+- In SkyWalking the service name could be composed of `group` and `short name` 
with `::` separator.
+
+#### MESH On MESH_DP
+- Rule name: `name` 
+- Groovy script: `{ (u, l) -> u.name == l.name }`
+- Description: MESH.service.name == MESH_DP.service.name
+- Matched Example: 
+    - MESH.service.name: `mesh-svr::songs.sample-services`
+    - MESH_DP.service.name: `mesh-svr::songs.sample-services`
+
+#### MESH On K8S_SERVICE
+- Rule name: `short-name`
+- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
+- Description: MESH.service.shortName == K8S_SERVICE.service.shortName
+- Matched Example: 
+    - MESH.service.name: `mesh-svr::songs.sample-services`
+    - K8S_SERVICE.service.name: `skywalking-showcase::songs.sample-services`
+
+#### MESH_DP On K8S_SERVICE
+- Rule name: `short-name`
+- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
+- Description: MESH_DP.service.shortName == K8S_SERVICE.service.shortName
+- Matched Example: 
+    - MESH_DP.service.name: `mesh-svr::songs.sample-services`
+    - K8S_SERVICE.service.name: `skywalking-showcase::songs.sample-services`
+
+#### GENERAL On K8S_SERVICE
+- Rule name: `lower-short-name-remove-ns`
+- Groovy script: `{ (u, l) -> u.shortName == l.shortName.substring(0, 
l.shortName.lastIndexOf('.')) }`
+- Description: GENERAL.service.shortName == K8S_SERVICE.service.shortName 
without namespace
+- Matched Example: 
+    - GENERAL.service.name: `agent::songs`
+    - K8S_SERVICE.service.name: `skywalking-showcase::songs.sample-services`
+
+#### MYSQL On K8S_SERVICE
+- Rule name: `short-name`
+- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
+- Description: MYSQL.service.shortName == K8S_SERVICE.service.shortName
+- Matched Example: 
+    - MYSQL.service.name: `mysql::mysql.skywalking-showcase`
+    - K8S_SERVICE.service.name: 
`skywalking-showcase::mysql.skywalking-showcase`
+
+#### POSTGRESQL On K8S_SERVICE
+- Rule name: `short-name`
+- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
+- Description: POSTGRESQL.service.shortName == K8S_SERVICE.service.shortName
+- Matched Example: 
+    - POSTGRESQL.service.name: `postgresql::psql.skywalking-showcase`
+    - K8S_SERVICE.service.name: `skywalking-showcase::psql.skywalking-showcase`
+
+#### SO11Y_OAP On K8S_SERVICE
+- Rule name: `short-name`
+- Groovy script: `{ (u, l) -> u.shortName == l.shortName }`
+- Description: SO11Y_OAP.service.shortName == K8S_SERVICE.service.shortName
+- Matched Example: 
+    - SO11Y_OAP.service.name: `demo-oap.skywalking-showcase`
+    - K8S_SERVICE.service.name: 
`skywalking-showcase::demo-oap.skywalking-showcase`
+
+#### VIRTUAL_DATABASE On MYSQL
+- Rule name: `lower-short-name-with-fqdn`
+- Groovy script: `{ (u, l) -> u.shortName.substring(0, 
u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
+- Description: VIRTUAL_DATABASE.service.shortName remove port == 
MYSQL.service.shortName with fqdn suffix
+- Matched Example: 
+    - VIRTUAL_DATABASE.service.name: 
`mysql.skywalking-showcase.svc.cluster.local:3306`
+    - MYSQL.service.name: `mysql::mysql.skywalking-showcase`
 
-| Upper layer | Lower layer  | Matching rule                                   
                      |
-|-------------|--------------|-----------------------------------------------------------------------|
-| MESH        | MESH_DP      | upper service name equals lower service name    
                      |
-| MESH        | K8S_SERVICE  | upper service short name equals lower service 
short name              |
-| MESH_DP     | K8S_SERVICE  | upper service short name equals lower service 
short name              |
-| GENERAL     | K8S_SERVICE  | upper service short name equals lower service 
name without namespace  |
+#### VIRTUAL_DATABASE On POSTGRESQL
+- Rule name: `lower-short-name-with-fqdn`
+- Groovy script: `{ (u, l) -> u.shortName.substring(0, 
u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }`
+- Description: VIRTUAL_DATABASE.service.shortName remove port == 
POSTGRESQL.service.shortName with fqdn suffix
+- Matched Example: 
+    - VIRTUAL_DATABASE.service.name: 
`psql.skywalking-showcase.svc.cluster.local:5432`
+    - POSTGRESQL.service.name: `postgresql::psql.skywalking-showcase`
 
 ### Build Through Specific Agents
 Use agent tech involved(such as eBPF) and deployment tools(such as operator 
and agent injector) detect the service hierarchy relations.
diff --git 
a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/hierarchy/HierarchyService.java
 
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/hierarchy/HierarchyService.java
index 2d8e268676..f1ea6b17de 100644
--- 
a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/hierarchy/HierarchyService.java
+++ 
b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/hierarchy/HierarchyService.java
@@ -189,24 +189,45 @@ public class HierarchyService implements 
org.apache.skywalking.oap.server.librar
                         serviceLayer);
                     Map<String, HierarchyDefinitionService.MatchingRule> 
comparedLowerLayers = getHierarchyDefinition().get(
                         comparedServiceLayer);
-                    if (lowerLayers != null
-                        && lowerLayers.get(comparedServiceLayer) != null
-                        && lowerLayers.get(comparedServiceLayer)
-                                      .getClosure()
-                                      .call(service, comparedService)) {
-                        autoMatchingServiceRelation(service.getName(), 
Layer.nameOf(serviceLayer),
-                                                    comparedService.getName(),
-                                                    
Layer.nameOf(comparedServiceLayer)
-                        );
-                    } else if (comparedLowerLayers != null
-                        && comparedLowerLayers.get(serviceLayer) != null
-                        && comparedLowerLayers.get(serviceLayer)
-                                             .getClosure()
-                                             .call(comparedService, service)) {
-                        autoMatchingServiceRelation(comparedService.getName(), 
Layer.nameOf(comparedServiceLayer),
-                                                    service.getName(),
-                                                    Layer.nameOf(serviceLayer)
-                        );
+                    if (lowerLayers != null && 
lowerLayers.get(comparedServiceLayer) != null) {
+                        try {
+                            if (lowerLayers.get(comparedServiceLayer)
+                                           .getClosure()
+                                           .call(service, comparedService)) {
+                                autoMatchingServiceRelation(service.getName(), 
Layer.nameOf(serviceLayer),
+                                                            
comparedService.getName(),
+                                                            
Layer.nameOf(comparedServiceLayer)
+                                );
+                            }
+                        } catch (Throwable e) {
+                            log.error(
+                                "Auto matching service hierarchy from service 
traffic failure. Upper layer {}, lower layer {}, closure{}",
+                                serviceLayer,
+                                comparedServiceLayer,
+                                
lowerLayers.get(comparedServiceLayer).getExpression(), e
+                            );
+                        }
+
+                    } else if (comparedLowerLayers != null && 
comparedLowerLayers.get(serviceLayer) != null) {
+                        try {
+                            if (comparedLowerLayers.get(serviceLayer)
+                                                   .getClosure()
+                                                   .call(comparedService, 
service)) {
+                                autoMatchingServiceRelation(
+                                    comparedService.getName(),
+                                    Layer.nameOf(comparedServiceLayer),
+                                    service.getName(),
+                                    Layer.nameOf(serviceLayer)
+                                );
+                            }
+                        } catch (Throwable e) {
+                            log.error(
+                                "Auto matching service hierarchy from service 
traffic failure. Upper layer {}, lower layer {}, closure{}",
+                                comparedServiceLayer,
+                                serviceLayer,
+                                
comparedLowerLayers.get(serviceLayer).getExpression(), e
+                            );
+                        }
                     }
                 }
             }
diff --git 
a/oap-server/server-starter/src/main/resources/hierarchy-definition.yml 
b/oap-server/server-starter/src/main/resources/hierarchy-definition.yml
index eeffbb0e3a..1847c7f873 100644
--- a/oap-server/server-starter/src/main/resources/hierarchy-definition.yml
+++ b/oap-server/server-starter/src/main/resources/hierarchy-definition.yml
@@ -16,6 +16,7 @@
 # Define the hierarchy of service layers, the layers under the specific layer 
are related lower of the layer.
 # The relation could have a matching rule for auto matching, which are defined 
in the `auto-matching-rules` section.
 # All the layers are defined in the file 
`org.apache.skywalking.oap.server.core.analysis.Layers.java`.
+# Notice: some hierarchy relations and auto matching rules are only works on 
k8s env.
 
 hierarchy:
   MESH:
@@ -29,10 +30,17 @@ hierarchy:
     K8S_SERVICE: lower-short-name-remove-ns
 
   MYSQL:
-    K8S_SERVICE: ~
+    K8S_SERVICE: short-name
+
+  POSTGRESQL:
+    K8S_SERVICE: short-name
+
+  SO11Y_OAP:
+    K8S_SERVICE: short-name
 
   VIRTUAL_DATABASE:
-    MYSQL: ~
+    MYSQL: lower-short-name-with-fqdn
+    POSTGRESQL: lower-short-name-with-fqdn
 
 # Use Groovy script to define the matching rules, the input parameters are the 
upper service(u) and the lower service(l) and the return value is a boolean,
 # which are used to match the relation between the upper service(u) and the 
lower service(l) on the different layers.
@@ -41,17 +49,23 @@ auto-matching-rules:
   name: "{ (u, l) -> u.name == l.name }"
   # the short name of the upper service is equal to the short name of the 
lower service
   short-name: "{ (u, l) -> u.shortName == l.shortName }"
-  # remove the namespace from the lower service short name
+  # remove the k8s namespace from the lower service short name
+  # this rule is only works on k8s env.
   lower-short-name-remove-ns: "{ (u, l) -> u.shortName == 
l.shortName.substring(0, l.shortName.lastIndexOf('.')) }"
+  # the short name of the upper remove port is equal to the short name of the 
lower service with fqdn suffix
+  # this rule is only works on k8s env.
+  lower-short-name-with-fqdn: "{ (u, l) -> u.shortName.substring(0, 
u.shortName.lastIndexOf(':')) == l.shortName.concat('.svc.cluster.local') }"
 
 # The hierarchy level of the service layer, the level is used to define the 
order of the service layer for UI presentation.
 # The level of the upper service should greater than the level of the lower 
service in `hierarchy` section.
 layer-levels:
   MESH: 3
   GENERAL: 3
+  SO11Y_OAP: 3
   VIRTUAL_DATABASE: 3
 
   MYSQL: 2
+  POSTGRESQL: 2
 
   MESH_DP: 1
 
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 338c831952..65bf30a372 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
@@ -494,11 +494,11 @@
             "showUnit": true
           },
           "expressions": [
-            "meter_apisix_instance_etcd_reachable"
+            "latest(meter_apisix_instance_etcd_reachable)"
           ],
           "metricMode": "Expression",
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ],
           "associate": [
             {
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 798c19d4f0..81531bcd21 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
@@ -21,7 +21,7 @@
             "showUnit": true
           },
           "expressions": [
-            "aws_s3_4xx"
+            "latest(aws_s3_4xx)"
           ],
           "metricMode": "Expression",
           "typesOfMQE": [
@@ -45,7 +45,7 @@
             "showUnit": true
           },
           "expressions": [
-            "aws_s3_5xx"
+            "latest(aws_s3_5xx)"
           ],
           "metricMode": "Expression",
           "typesOfMQE": [
@@ -69,7 +69,7 @@
             "showUnit": true
           },
           "expressions": [
-            "aws_s3_all_requests"
+            "latest(aws_s3_all_requests)"
           ],
           "metricMode": "Expression",
           "typesOfMQE": [
@@ -93,7 +93,7 @@
             "showUnit": true
           },
           "expressions": [
-            "aws_s3_request_latency"
+            "avg(aws_s3_request_latency)"
           ],
           "metricMode": "Expression",
           "typesOfMQE": [
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-cluster.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-cluster.json
index fa6c8a877a..511cf83329 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-cluster.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-cluster.json
@@ -57,7 +57,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_nodes"
+                    "latest(meter_elasticsearch_cluster_nodes)"
                   ]
                 },
                 {
@@ -78,7 +78,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_nodes"
+                    "latest(meter_elasticsearch_cluster_nodes)"
                   ]
                 },
                 {
@@ -99,7 +99,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_pending_tasks_total"
+                    "avg(meter_elasticsearch_cluster_pending_tasks_total)"
                   ]
                 },
                 {
@@ -120,7 +120,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_primary_shards_total"
+                    "latest(meter_elasticsearch_cluster_primary_shards_total)"
                   ]
                 },
                 {
@@ -141,10 +141,10 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_shards_total"
+                    "latest(meter_elasticsearch_cluster_shards_total)"
                   ],
                   "typesOfMQE":[
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -165,7 +165,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_initializing_shards_total"
+                    
"latest(meter_elasticsearch_cluster_initializing_shards_total)"
                   ]
                 },
                 {
@@ -186,7 +186,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    
"meter_elasticsearch_cluster_delayed_unassigned_shards_total"
+                    
"latest(meter_elasticsearch_cluster_delayed_unassigned_shards_total)"
                   ]
                 },
                 {
@@ -207,7 +207,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_relocating_shards_total"
+                    
"latest(meter_elasticsearch_cluster_relocating_shards_total)"
                   ]
                 },
                 {
@@ -228,7 +228,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_unassigned_shards_total"
+                    
"latest(meter_elasticsearch_cluster_unassigned_shards_total)"
                   ]
                 },
                 {
@@ -249,10 +249,10 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_breakers_tripped"
+                    "latest(meter_elasticsearch_cluster_breakers_tripped)"
                   ],
                   "typesOfMQE":[
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -269,14 +269,19 @@
                     "showUnit":true
                   },
                   "widget":{
-                    "title":"CPU Usage Avg. (%)"
+                    "title":"CPU Usage Avg"
                   },
+                  "metricConfig": [
+                    {
+                      "unit": "%"
+                    }
+                  ],
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_cpu_usage_avg"
+                    "avg(meter_elasticsearch_cluster_cpu_usage_avg)"
                   ],
                   "typesOfMQE":[
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -293,14 +298,19 @@
                     "showUnit":true
                   },
                   "widget":{
-                    "title":"JVM Memory Used Avg. (%)"
+                    "title":"JVM Memory Used Avg"
                   },
+                  "metricConfig": [
+                    {
+                      "unit": "%"
+                    }
+                  ],
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_jvm_memory_used_avg"
+                    "avg(meter_elasticsearch_cluster_jvm_memory_used_avg)"
                   ],
                   "typesOfMQE":[
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -321,7 +331,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "meter_elasticsearch_cluster_open_file_count"
+                    "avg(meter_elasticsearch_cluster_open_file_count)"
                   ]
                 },
                 {
@@ -372,4 +382,4 @@
       "isRoot":false
     }
   }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-index.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-index.json
index 62e2b0abb9..d44f5e51da 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-index.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-index.json
@@ -534,7 +534,7 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_index_indices_docs_primary"
+            "latest(meter_elasticsearch_index_indices_docs_primary)"
           ]
         },
         {
@@ -551,11 +551,16 @@
             "showUnit":true
           },
           "widget":{
-            "title":"Data (GB)"
+            "title":"Data"
           },
+          "metricConfig": [
+            {
+              "unit": "GB"
+            }
+          ],
           "metricMode":"Expression",
           "expressions":[
-            
"meter_elasticsearch_index_indices_store_size_bytes_total/1024/1024/1024"
+            
"latest(meter_elasticsearch_index_indices_store_size_bytes_total)/1024/1024/1024"
           ]
         },
         {
@@ -572,14 +577,19 @@
             "showUnit":true
           },
           "widget":{
-            "title":"Data (Primary Shards) (GB)"
+            "title":"Data (Primary Shards)"
           },
+          "metricConfig": [
+            {
+              "unit": "GB"
+            }
+          ],
           "metricMode":"Expression",
           "expressions":[
-            
"meter_elasticsearch_index_indices_store_size_bytes_primary/1024/1024/1024"
+            
"latest(meter_elasticsearch_index_indices_store_size_bytes_primary)/1024/1024/1024"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -600,7 +610,7 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_index_indices_segment_count_total"
+            "latest(meter_elasticsearch_index_indices_segment_count_total)"
           ]
         },
         {
@@ -621,7 +631,7 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_index_indices_segment_count_primary"
+            "latest(meter_elasticsearch_index_indices_segment_count_primary)"
           ]
         },
         {
@@ -638,14 +648,19 @@
             "showUnit":true
           },
           "widget":{
-            "title":"Segments Memory (MB)"
+            "title":"Segments Memory"
           },
+          "metricConfig": [
+            {
+              "unit": "MB"
+            }
+          ],
           "metricMode":"Expression",
           "expressions":[
-            
"meter_elasticsearch_index_indices_segment_memory_bytes_primary/1024/1024"
+            
"latest(meter_elasticsearch_index_indices_segment_memory_bytes_primary)/1024/1024"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -666,7 +681,7 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_index_indices_docs_primary"
+            "latest(meter_elasticsearch_index_indices_docs_primary)"
           ]
         },
         {
@@ -683,11 +698,16 @@
             "showUnit":true
           },
           "widget":{
-            "title":"Segments Memory (Primary Shards) (MB)"
+            "title":"Segments Memory (Primary Shards)"
           },
+          "metricConfig": [
+            {
+              "unit": "MB"
+            }
+          ],
           "metricMode":"Expression",
           "expressions":[
-            
"meter_elasticsearch_index_indices_segment_memory_bytes_primary/1024/1024"
+            
"latest(meter_elasticsearch_index_indices_segment_memory_bytes_primary)/1024/1024"
           ]
         },
         {
@@ -721,4 +741,4 @@
       "isRoot":false
     }
   }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-node.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-node.json
index 8c5e8eb709..f020bc9f43 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-node.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/elasticsearch/elasticsearch-node.json
@@ -592,7 +592,7 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_node_indices_docs"
+            "latest(meter_elasticsearch_node_indices_docs)"
           ]
         },
         {
@@ -614,8 +614,13 @@
             }
           },
           "widget":{
-            "title":"OS CPU Usage Persent (%)"
+            "title":"OS CPU Usage Percent"
           },
+          "metricConfig": [
+            {
+              "unit": "%"
+            }
+          ],
           "metricMode":"Expression",
           "metricConfig":[
             {
@@ -751,7 +756,7 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_node_segment_count"
+            "latest(meter_elasticsearch_node_segment_count)"
           ]
         },
         {
@@ -772,7 +777,7 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_node_open_file_count"
+            "avg(meter_elasticsearch_node_open_file_count)"
           ]
         },
         {
@@ -794,8 +799,13 @@
             }
           },
           "widget":{
-            "title":"Disk Write (KBs)"
+            "title":"Disk Write"
           },
+          "metricConfig": [
+            {
+              "unit": "KB/s"
+            }
+          ],
           "metricMode":"Expression",
           "metricConfig":[
             {
@@ -825,12 +835,17 @@
           "widget":{
             "title":"JVM Memory Used (MB)"
           },
+          "metricConfig": [
+            {
+              "unit": "MB"
+            }
+          ],
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_node_jvm_memory_used/1024/1024"
+            "avg(meter_elasticsearch_node_jvm_memory_used)/1024/1024"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -847,11 +862,16 @@
             "showUnit":true
           },
           "widget":{
-            "title":"CPU Usage (%)"
+            "title":"CPU Usage"
           },
+          "metricConfig": [
+            {
+              "unit": "%"
+            }
+          ],
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_node_process_cpu_percent"
+            "avg(meter_elasticsearch_node_process_cpu_percent)"
           ]
         },
         {
@@ -868,14 +888,19 @@
             "showUnit":true
           },
           "widget":{
-            "title":"Disk Free Space (GB)"
+            "title":"Disk Free Space"
           },
+          "metricConfig": [
+            {
+              "unit": "GB"
+            }
+          ],
           "metricMode":"Expression",
           "expressions":[
-            "meter_elasticsearch_node_all_disk_free_space/1024/1024/1024"
+            
"latest(meter_elasticsearch_node_all_disk_free_space)/1024/1024/1024"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -1081,4 +1106,4 @@
       "isRoot":false
     }
   }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/k8s/k8s-cluster.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/k8s/k8s-cluster.json
index 36cc9aab0a..5505127928 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/k8s/k8s-cluster.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/k8s/k8s-cluster.json
@@ -298,11 +298,11 @@
                     "showUint": true
                   },
                   "expressions": [
-                    "k8s_cluster_container_total"
+                    "latest(k8s_cluster_container_total)"
                   ],
                   "metricMode": "Expression",
                   "typesOfMQE": [
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -322,11 +322,11 @@
                     "showUint": true
                   },
                   "expressions": [
-                    "k8s_cluster_pod_total"
+                    "latest(k8s_cluster_pod_total)"
                   ],
                   "metricMode": "Expression",
                   "typesOfMQE": [
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -346,11 +346,11 @@
                     "showUint": true
                   },
                   "expressions": [
-                    "k8s_cluster_service_total"
+                    "latest(k8s_cluster_service_total)"
                   ],
                   "metricMode": "Expression",
                   "typesOfMQE": [
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -370,11 +370,11 @@
                     "showUint": true
                   },
                   "expressions": [
-                    "k8s_cluster_node_total"
+                    "latest(k8s_cluster_node_total)"
                   ],
                   "metricMode": "Expression",
                   "typesOfMQE": [
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -394,11 +394,11 @@
                     "showUint": true
                   },
                   "expressions": [
-                    "k8s_cluster_namespace_total"
+                    "latest(k8s_cluster_namespace_total)"
                   ],
                   "metricMode": "Expression",
                   "typesOfMQE": [
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -418,11 +418,11 @@
                     "showUint": true
                   },
                   "expressions": [
-                    "k8s_cluster_deployment_total"
+                    "latest(k8s_cluster_deployment_total)"
                   ],
                   "metricMode": "Expression",
                   "typesOfMQE": [
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -442,11 +442,11 @@
                     "showUint": true
                   },
                   "expressions": [
-                    "k8s_cluster_statefulset_total"
+                    "latest(k8s_cluster_statefulset_total)"
                   ],
                   "metricMode": "Expression",
                   "typesOfMQE": [
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 },
                 {
@@ -466,11 +466,11 @@
                     "showUint": true
                   },
                   "expressions": [
-                    "k8s_cluster_daemonset_total"
+                    "latest(k8s_cluster_daemonset_total)"
                   ],
                   "metricMode": "Expression",
                   "typesOfMQE": [
-                    "TIME_SERIES_VALUES"
+                    "SINGLE_VALUE"
                   ]
                 }
               ]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mongodb/mongodb-cluster.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mongodb/mongodb-cluster.json
index 0379198b61..dc1d68d8e2 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mongodb/mongodb-cluster.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mongodb/mongodb-cluster.json
@@ -24,7 +24,7 @@
                   "type":"Widget",
                   "metricMode":"Expression",
                   "expressions":[
-                    
"aggregate_labels(meter_mongodb_cluster_uptime,max)/3600/24"
+                    
"latest(aggregate_labels(meter_mongodb_cluster_uptime,max))/3600/24"
                   ],
                   "typesOfMQE":[
                     "SINGLE_VALUE"
@@ -53,7 +53,7 @@
                   "type":"Widget",
                   "metricMode":"Expression",
                   "expressions":[
-                    
"aggregate_labels(meter_mongodb_cluster_data_size,sum)/1024/1024/1024"
+                    
"latest(aggregate_labels(meter_mongodb_cluster_data_size,sum))/1024/1024/1024"
                   ],
                   "typesOfMQE":[
                     "SINGLE_VALUE"
@@ -82,7 +82,7 @@
                   "type":"Widget",
                   "metricMode":"Expression",
                   "expressions":[
-                    
"aggregate_labels(meter_mongodb_cluster_collection_count,sum)"
+                    
"latest(aggregate_labels(meter_mongodb_cluster_collection_count,sum))"
                   ],
                   "typesOfMQE":[
                     "SINGLE_VALUE"
@@ -106,7 +106,7 @@
                   "type":"Widget",
                   "metricMode":"Expression",
                   "expressions":[
-                    "aggregate_labels(meter_mongodb_cluster_object_count,sum)"
+                    
"latest(aggregate_labels(meter_mongodb_cluster_object_count,sum))"
                   ],
                   "typesOfMQE":[
                     "SINGLE_VALUE"
@@ -396,4 +396,4 @@
       "isRoot":false
     }
   }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mongodb/mongodb-node.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mongodb/mongodb-node.json
index 548bf4070b..93c40d3bc2 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mongodb/mongodb-node.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mongodb/mongodb-node.json
@@ -27,7 +27,7 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_mongodb_node_uptime/3600/24"
+            "latest(meter_mongodb_node_uptime)/3600/24"
           ],
           "typesOfMQE":[
             "SINGLE_VALUE"
@@ -50,7 +50,7 @@
             "title":"QPS"
           },
           "expressions":[
-            "meter_mongodb_node_qps"
+            "avg(meter_mongodb_node_qps)"
           ],
           "typesOfMQE":[
             "SINGLE_VALUE"
@@ -74,7 +74,7 @@
             "title":"Latency"
           },
           "expressions":[
-            "meter_mongodb_node_latency"
+            "avg(meter_mongodb_node_latency)"
           ],
           "typesOfMQE":[
             "SINGLE_VALUE"
@@ -109,7 +109,7 @@
             "title":"Memory Usage"
           },
           "expressions":[
-            "meter_mongodb_node_memory_usage"
+            "avg(meter_mongodb_node_memory_usage)"
           ],
           "typesOfMQE":[
             "SINGLE_VALUE"
@@ -763,4 +763,4 @@
       "isRoot":false
     }
   }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-instance.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-instance.json
index 9f4223bec9..464ec6d755 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-instance.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-instance.json
@@ -1,7 +1,7 @@
 
 [
   {
-    "id":"mysql-instance                                                       
                                                     ",
+    "id":"MySQL-Instance",
     "configuration":{
       "children":[
         {
@@ -18,14 +18,19 @@
             "showUnit":true
           },
           "widget":{
-            "title":"MySQL Uptime (day)"
+            "title":"MySQL Uptime"
           },
+          "metricConfig": [
+            {
+              "unit": "day"
+            }
+          ],
           "metricMode":"Expression",
           "expressions":[
-            "meter_mysql_instance_uptime/3600/24"
+            "latest(meter_mysql_instance_uptime)/3600/24"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -53,7 +58,7 @@
             }
           ],
           "expressions":[
-            "meter_mysql_instance_qps"
+            "avg(meter_mysql_instance_qps)"
           ],
           "typesOfMQE":[
             "TIME_SERIES_VALUES"
@@ -73,14 +78,19 @@
             "showUnit":true
           },
           "widget":{
-            "title":"Innodb Buffer Pool Size (MB)"
+            "title":"Innodb Buffer Pool Size"
           },
+          "metricConfig": [
+            {
+              "unit": "MB"
+            }
+          ],
           "metricMode":"Expression",
           "expressions":[
-            "meter_mysql_instance_innodb_buffer_pool_size/1024/1024"
+            "latest(meter_mysql_instance_innodb_buffer_pool_size)/1024/1024"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -101,10 +111,10 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_mysql_instance_max_connections"
+            "latest(meter_mysql_instance_max_connections)"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -125,10 +135,10 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_mysql_instance_thread_cache_size"
+            "latest(meter_mysql_instance_thread_cache_size)"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -357,8 +367,33 @@
       "layer":"MYSQL",
       "entity":"ServiceInstance",
       "name":"MySQL-Instance",
-      "id":"mysql-instance                                                     
                                                       ",
-      "isRoot":false
+      "id":"mysql-instance",
+      "isRoot":false,
+      "isDefault": true,
+      "expressions": [
+        "avg(meter_mysql_instance_commands_select_rate)",
+        "avg(meter_mysql_instance_commands_insert_rate)",
+        "avg(meter_mysql_instance_commands_update_rate)",
+        "avg(meter_mysql_instance_commands_delete_rate)"
+      ],
+      "expressionsConfig": [
+        {
+          "unit": "rows / s",
+          "label": "Fetch"
+        },
+        {
+          "unit": "rows / s",
+          "label": "Insert"
+        },
+        {
+          "unit": "rows / s",
+          "label": "Update"
+        },
+        {
+          "unit": "rows / s",
+          "label": "Delete"
+        }
+      ]
     }
   }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-service.json
index 1f81ed0541..dc67b3d851 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/mysql/mysql-service.json
@@ -1,7 +1,7 @@
 
 [
    {
-      "id":"mysql-service",
+      "id":"MySQL-Service",
       "configuration":{
          "children":[
             {
@@ -340,8 +340,32 @@
          "layer":"MYSQL",
          "entity":"Service",
          "name":"MySQL-Service",
-         "id":"mysql-service",
-         "isRoot":false
+         "isRoot":false,
+         "isDefault": true,
+         "expressions": [
+            "avg(meter_mysql_commands_select_rate)",
+            "avg(meter_mysql_commands_insert_rate)",
+            "avg(meter_mysql_commands_update_rate)",
+            "avg(meter_mysql_commands_delete_rate)"
+         ],
+         "expressionsConfig": [
+            {
+               "unit": "rows / s",
+               "label": "Fetch"
+            },
+            {
+               "unit": "rows / s",
+               "label": "Insert"
+            },
+            {
+               "unit": "rows / s",
+               "label": "Update"
+            },
+            {
+               "unit": "rows / s",
+               "label": "Delete"
+            }
+         ]
       }
    }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json
index 001b4980ce..41e71be8fc 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_linux/linux-service.json
@@ -339,11 +339,11 @@
             "showUnit": true
           },
           "expressions": [
-            "meter_vm_memory_swap_percentage/100"
+            "avg(meter_vm_memory_swap_percentage)/100"
           ],
           "metricMode": "Expression",
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ],
           "metricConfig": [
             {
@@ -368,11 +368,11 @@
             "showUnit": true
           },
           "expressions": [
-            "meter_vm_memory_used/1024/1024"
+            "avg(meter_vm_memory_used)/1024/1024"
           ],
           "metricMode": "Expression",
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ],
           "metricConfig": [
             {
@@ -401,7 +401,7 @@
           ],
           "metricMode": "Expression",
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ],
           "metricConfig": [
             {
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_windows/windows-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_windows/windows-service.json
index 4e9ae60be5..8b5b299b99 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_windows/windows-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/os_windows/windows-service.json
@@ -182,7 +182,7 @@
         ],
         "metricMode": "Expression",
         "typesOfMQE": [
-          "TIME_SERIES_VALUES"
+          "SINGLE_VALUE"
         ],
         "metricConfig": [{
           "unit": "%"
@@ -209,7 +209,7 @@
         ],
         "metricMode": "Expression",
         "typesOfMQE": [
-          "TIME_SERIES_VALUES"
+          "SINGLE_VALUE"
         ],
         "metricConfig": [{
           "unit": "MB"
@@ -236,7 +236,7 @@
       ],
       "metricMode": "Expression",
       "typesOfMQE": [
-        "TIME_SERIES_VALUES"
+        "SINGLE_VALUE"
       ],
       "metricConfig": [{
         "unit": "%"
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-instance.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-instance.json
index 9377df5e62..a957d93ad8 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-instance.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-instance.json
@@ -1,7 +1,7 @@
 
 [
    {
-      "id":"postgresql-instance",
+      "id":"PostgreSQL-Instance",
       "configuration":{
          "children":[
             {
@@ -18,14 +18,19 @@
                   "showUnit":true
                },
                "widget":{
-                  "title":"Shared Buffers (MB)"
+                  "title":"Shared Buffers"
                },
+               "metricConfig": [
+                  {
+                     "unit": "MB"
+                  }
+               ],
                "metricMode":"Expression",
                "expressions":[
-                  "meter_pg_instance_shared_buffers/1024/1024"
+                  "latest(meter_pg_instance_shared_buffers)/1024/1024"
                ],
                "typesOfMQE":[
-                  "TIME_SERIES_VALUES"
+                  "SINGLE_VALUE"
                ]
             },
             {
@@ -42,14 +47,19 @@
                   "showUnit":true
                },
                "widget":{
-                  "title":"Effective Cache (GB)"
+                  "title":"Effective Cache"
                },
+               "metricConfig": [
+                  {
+                     "unit": "GB"
+                  }
+               ],
                "metricMode":"Expression",
                "expressions":[
-                  "meter_pg_instance_effective_cache/1024/1024/1024"
+                  "latest(meter_pg_instance_effective_cache)/1024/1024/1024"
                ],
                "typesOfMQE":[
-                  "TIME_SERIES_VALUES"
+                  "SINGLE_VALUE"
                ]
             },
             {
@@ -66,14 +76,19 @@
                   "showUnit":true
                },
                "widget":{
-                  "title":"Maintenance Work Mem (MB)"
+                  "title":"Maintenance Work Mem"
                },
+               "metricConfig": [
+                  {
+                     "unit": "MB"
+                  }
+               ],
                "metricMode":"Expression",
                "expressions":[
-                  "meter_pg_instance_maintenance_work_mem/1024/1024"
+                  "latest(meter_pg_instance_maintenance_work_mem)/1024/1024"
                ],
                "typesOfMQE":[
-                  "TIME_SERIES_VALUES"
+                  "SINGLE_VALUE"
                ]
             },
             {
@@ -90,11 +105,16 @@
                   "showUnit":true
                },
                "widget":{
-                  "title":"Work Mem (MB)"
+                  "title":"Work Mem"
                },
+               "metricConfig": [
+                  {
+                     "unit": "MB"
+                  }
+               ],
                "metricMode":"Expression",
                "expressions":[
-                  "meter_pg_instance_work_mem/1024/1024"
+                  "latest(meter_pg_instance_work_mem)/1024/1024"
                ]
             },
             {
@@ -115,7 +135,7 @@
                },
                "metricMode":"Expression",
                "expressions":[
-                  "meter_pg_instance_seq_page_cost"
+                  "latest(meter_pg_instance_seq_page_cost)"
                ],
                "typesOfMQE":[
                   "UNKNOWN"
@@ -139,10 +159,10 @@
                },
                "metricMode":"Expression",
                "expressions":[
-                  "meter_pg_instance_random_page_cost"
+                  "latest(meter_pg_instance_random_page_cost)"
                ],
                "typesOfMQE":[
-                  "TIME_SERIES_VALUES"
+                  "SINGLE_VALUE"
                ]
             },
             {
@@ -159,14 +179,19 @@
                   "showUnit":true
                },
                "widget":{
-                  "title":"Max WAL Size (GB)"
+                  "title":"Max WAL Size"
                },
+               "metricConfig": [
+                  {
+                     "unit": "GB"
+                  }
+               ],
                "metricMode":"Expression",
                "expressions":[
-                  "meter_pg_instance_max_wal_size/1024/1024/1024"
+                  "latest(meter_pg_instance_max_wal_size)/1024/1024/1024"
                ],
                "typesOfMQE":[
-                  "TIME_SERIES_VALUES"
+                  "SINGLE_VALUE"
                ]
             },
             {
@@ -187,10 +212,10 @@
                },
                "metricMode":"Expression",
                "expressions":[
-                  "meter_pg_instance_max_parallel_workers"
+                  "latest(meter_pg_instance_max_parallel_workers)"
                ],
                "typesOfMQE":[
-                  "TIME_SERIES_VALUES"
+                  "SINGLE_VALUE"
                ]
             },
             {
@@ -211,7 +236,7 @@
                },
                "metricMode":"Expression",
                "expressions":[
-                  "meter_pg_instance_max_worker_processes"
+                  "latest(meter_pg_instance_max_worker_processes)"
                ]
             },
             {
@@ -644,7 +669,32 @@
          "layer":"POSTGRESQL",
          "entity":"ServiceInstance",
          "name":"PostgreSQL-Instance",
-         "id":"postgresql-instance"
+         "isRoot": false,
+         "isDefault": true,
+         "expressions": [
+            "avg(aggregate_labels(meter_pg_instance_fetched_rows_rate,sum))",
+            "avg(aggregate_labels(meter_pg_instance_inserted_rows_rate,sum))",
+            "avg(aggregate_labels(meter_pg_instance_updated_rows_rate,sum))",
+            "avg(aggregate_labels(meter_pg_instance_deleted_rows_rate,sum))"
+         ],
+         "expressionsConfig": [
+            {
+               "unit": "rows / s",
+               "label": "Fetch"
+            },
+            {
+               "unit": "rows / s",
+               "label": "Insert"
+            },
+            {
+               "unit": "rows / s",
+               "label": "Update"
+            },
+            {
+               "unit": "rows / s",
+               "label": "Delete"
+            }
+         ]
       }
    }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-root.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-root.json
index 935f6ba15b..0a86acc393 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-root.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-root.json
@@ -1,7 +1,7 @@
 
 [
    {
-      "id":"postgresql-root",
+      "id":"PostgreSQL-Root",
       "configuration":{
          "children":[
             {
@@ -41,8 +41,7 @@
          "layer":"POSTGRESQL",
          "entity":"All",
          "name":"PostgreSQL-Root",
-         "id":"postgresql-root",
          "isRoot":true
       }
    }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json
index 3feb29c5e8..f48a8ad933 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/postgresql/postgresql-service.json
@@ -1,7 +1,7 @@
 
 [
    {
-      "id":"postgresql-service",
+      "id":"PostgreSQL-Service",
       "configuration":{
          "children":[
             {
@@ -498,7 +498,31 @@
          "layer":"POSTGRESQL",
          "entity":"Service",
          "name":"PostgreSQL-Service",
-         "id":"postgresql-service"
+         "isDefault": true,
+         "expressions": [
+            "avg(meter_pg_fetched_rows_rate)",
+            "avg(meter_pg_inserted_rows_rate)",
+            "avg(meter_pg_updated_rows_rate)",
+            "avg(meter_pg_deleted_rows_rate)"
+         ],
+         "expressionsConfig": [
+            {
+               "unit": "rows / s",
+               "label": "Fetch"
+            },
+            {
+               "unit": "rows / s",
+               "label": "Insert"
+            },
+            {
+               "unit": "rows / s",
+               "label": "Update"
+            },
+            {
+               "unit": "rows / s",
+               "label": "Delete"
+            }
+         ]
       }
    }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/rabbitmq/rabbitmq-node.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/rabbitmq/rabbitmq-node.json
index 2417331ee7..ee9eefde0f 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/rabbitmq/rabbitmq-node.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/rabbitmq/rabbitmq-node.json
@@ -26,10 +26,10 @@
           "metricMode": "Expression",
           "metricConfig": [],
           "expressions": [
-            "meter_rabbitmq_node_queue_messages_ready"
+            "latest(meter_rabbitmq_node_queue_messages_ready)"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -55,10 +55,10 @@
           "metricMode": "Expression",
           "metricConfig": [],
           "expressions": [
-            "meter_rabbitmq_node_incoming_messages"
+            "latest(meter_rabbitmq_node_incoming_messages)"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -84,10 +84,10 @@
           "metricMode": "Expression",
           "metricConfig": [],
           "expressions": [
-            "meter_rabbitmq_node_unacknowledged_messages"
+            "latest(meter_rabbitmq_node_unacknowledged_messages)"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -113,10 +113,10 @@
           "metricMode": "Expression",
           "metricConfig": [],
           "expressions": [
-            "meter_rabbitmq_node_outgoing_messages_total"
+            "latest(meter_rabbitmq_node_outgoing_messages_total)"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -142,10 +142,10 @@
           "metricMode": "Expression",
           "metricConfig": [],
           "expressions": [
-            "meter_rabbitmq_node_connections_total"
+            "latest(meter_rabbitmq_node_connections_total)"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -171,10 +171,10 @@
           "metricMode": "Expression",
           "metricConfig": [],
           "expressions": [
-            "meter_rabbitmq_node_publisher_total"
+            "latest(meter_rabbitmq_node_publisher_total)"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -200,10 +200,10 @@
           "metricMode": "Expression",
           "metricConfig": [],
           "expressions": [
-            "meter_rabbitmq_node_consumer_total"
+            "latest(meter_rabbitmq_node_consumer_total)"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -229,10 +229,10 @@
           "metricMode": "Expression",
           "metricConfig": [],
           "expressions": [
-            "meter_rabbitmq_node_channel_total"
+            "latest(meter_rabbitmq_node_channel_total)"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -258,10 +258,10 @@
           "metricMode": "Expression",
           "metricConfig": [],
           "expressions": [
-            "meter_rabbitmq_node_queue_total"
+            "latest(meter_rabbitmq_node_queue_total)"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -291,10 +291,10 @@
           ],
           "metricMode": "Expression",
           "expressions": [
-            "meter_rabbitmq_node_allocated_used_percent/100"
+            "latest(meter_rabbitmq_node_allocated_used_percent)/100"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -324,10 +324,10 @@
           ],
           "metricMode": "Expression",
           "expressions": [
-            "meter_rabbitmq_node_allocated_used_bytes/1024/1204"
+            "latest(meter_rabbitmq_node_allocated_used_bytes)/1024/1204"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -357,10 +357,10 @@
           ],
           "metricMode": "Expression",
           "expressions": [
-            "meter_rabbitmq_node_allocated_unused_bytes/1024/1024"
+            "latest(meter_rabbitmq_node_allocated_unused_bytes)/1024/1024"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -390,10 +390,10 @@
           ],
           "metricMode": "Expression",
           "expressions": [
-            "meter_rabbitmq_node_process_resident_memory_bytes/1024/1024"
+            
"latest(meter_rabbitmq_node_process_resident_memory_bytes)/1024/1024"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -423,10 +423,10 @@
           ],
           "metricMode": "Expression",
           "expressions": [
-            "meter_rabbitmq_node_allocated_unused_percent/100"
+            "latest(meter_rabbitmq_node_allocated_unused_percent)/100"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -456,10 +456,10 @@
           ],
           "metricMode": "Expression",
           "expressions": [
-            "meter_rabbitmq_node_allocated_total_bytes/1024/1024"
+            "latest(meter_rabbitmq_node_allocated_total_bytes)/1024/1024"
           ],
           "typesOfMQE": [
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-instance.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-instance.json
index e0c2596cb0..31a9b7f499 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-instance.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-instance.json
@@ -22,10 +22,10 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_redis_instance_uptime/3600/24"
+            "latest(meter_redis_instance_uptime)/3600/24"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -46,10 +46,10 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_redis_instance_connected_clients"
+            "latest(meter_redis_instance_connected_clients)"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -156,10 +156,10 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_redis_instance_memory_max_bytes/1000/1000"
+            "latest(meter_redis_instance_memory_max_bytes)/1000/1000"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -257,10 +257,10 @@
           },
           "metricMode":"Expression",
           "expressions":[
-            "meter_redis_instance_redis_blocked_clients"
+            "latest(meter_redis_instance_redis_blocked_clients)"
           ],
           "typesOfMQE":[
-            "TIME_SERIES_VALUES"
+            "SINGLE_VALUE"
           ]
         },
         {
@@ -323,4 +323,4 @@
       "isRoot":false
     }
   }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-service.json
index eba5756173..fef1f4dc4f 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/redis/redis-service.json
@@ -33,7 +33,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "max(meter_redis_uptime)/3600/24"
+                    "latest(meter_redis_uptime)/3600/24"
                   ],
                   "typesOfMQE":[
                     "SINGLE_VALUE"
@@ -57,7 +57,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "avg(meter_redis_connected_clients)"
+                    "latest(meter_redis_connected_clients)"
                   ],
                   "typesOfMQE":[
                     "TIME_SERIES_VALUES"
@@ -244,7 +244,7 @@
                   },
                   "metricMode":"Expression",
                   "expressions":[
-                    "avg(meter_redis_blocked_clients)"
+                    "latest(meter_redis_blocked_clients)"
                   ],
                   "typesOfMQE":[
                     "SINGLE_VALUE"
@@ -360,4 +360,4 @@
       "isRoot":false
     }
   }
-]
\ No newline at end of file
+]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-instance.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-instance.json
index 57f1fa9484..99d0edf1d1 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-instance.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-instance.json
@@ -561,7 +561,22 @@
       "entity": "ServiceInstance",
       "name": "Self-Observability-OAP-Instance",
       "id": "Self-Observability-OAP-Instance",
-      "isRoot": false
+      "isRoot": false,
+      "isDefault": true,
+      "expressions": [
+        "avg(meter_oap_instance_cpu_percentage)",
+        "avg(meter_oap_instance_persistence_execute_count)"
+      ],
+      "expressionsConfig": [
+        {
+          "unit": "%",
+          "label": "CPU Avg Usage"
+        },
+        {
+          "unit": "count / 5min",
+          "label": "Persistence Count"
+        }
+      ]
     }
   }
 ]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-service.json
index a85ab2a9ee..9c33fc8ab7 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/so11y_oap/so11y-service.json
@@ -63,7 +63,8 @@
       "layer": "SO11Y_OAP",
       "entity": "Service",
       "name": "Self-Observability-OAP-Service",
-      "isRoot": true
+      "isRoot": true,
+      "isDefault": true
     }
   }
 ]
diff --git 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/virtual_database/virtual-database-service.json
 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/virtual_database/virtual-database-service.json
index a57ff92c3c..9e861801e5 100644
--- 
a/oap-server/server-starter/src/main/resources/ui-initialized-templates/virtual_database/virtual-database-service.json
+++ 
b/oap-server/server-starter/src/main/resources/ui-initialized-templates/virtual_database/virtual-database-service.json
@@ -195,8 +195,27 @@
       "layer": "VIRTUAL_DATABASE",
       "entity": "Service",
       "name": "Virtual-Database-Service",
-      "id": "Virtual-Database-Service",
-      "isRoot": false
+      "isRoot": false,
+      "isDefault": true,
+      "expressions": [
+        "avg(database_access_resp_time)",
+        "avg(database_access_sla)/100",
+        "avg(database_access_cpm)"
+      ],
+      "expressionsConfig": [
+        {
+          "unit": "ms",
+          "label": "Latency"
+        },
+        {
+          "unit": "%",
+          "label": "Successful Rate"
+        },
+        {
+          "unit": "calls / min",
+          "label": "Traffic"
+        }
+      ]
     }
   }
 ]
diff --git a/test/e2e-v2/cases/kafka/kafka-monitoring/Dockerfile 
b/test/e2e-v2/cases/kafka/kafka-monitoring/Dockerfile
index 8c5a1906cb..eb1a99d4ad 100644
--- a/test/e2e-v2/cases/kafka/kafka-monitoring/Dockerfile
+++ b/test/e2e-v2/cases/kafka/kafka-monitoring/Dockerfile
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 # Use the Bitnami Kafka image as the base image
-FROM bitnami/kafka:latest
+FROM bitnami/kafka:2.4.1
 
 # Download the JMX Prometheus Java Agent and config file
 ADD 
https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.18.0/jmx_prometheus_javaagent-0.18.0.jar
 /etc/jmx_prometheus_javaagent-0.18.0.jar
diff --git a/test/e2e-v2/cases/kafka/kafka-monitoring/docker-compose.yml 
b/test/e2e-v2/cases/kafka/kafka-monitoring/docker-compose.yml
index d0c672b015..0655db4b90 100644
--- a/test/e2e-v2/cases/kafka/kafka-monitoring/docker-compose.yml
+++ b/test/e2e-v2/cases/kafka/kafka-monitoring/docker-compose.yml
@@ -26,7 +26,7 @@ services:
       - e2e
 
   zookeeper:
-    image: zookeeper:latest
+    image: zookeeper:3.4
     expose:
       - 2181
     networks:
@@ -94,7 +94,7 @@ services:
       retries: 120
 
   kafka-producer-perf-test:
-    image: bitnami/kafka:latest
+    image: bitnami/kafka:2.4.1
     networks:
       - e2e
     depends_on:
@@ -107,7 +107,7 @@ services:
         kafka-producer-perf-test.sh --topic perftest --num-records 100000 
--record-size 100 --throughput 500 --producer-props 
bootstrap.servers=broker1:9092,broker2:9093
 
   kafka-consumer-perf-test:
-    image: bitnami/kafka:latest
+    image: bitnami/kafka:2.4.1
     networks:
       - e2e
     depends_on:

Reply via email to