wu-sheng commented on pull request #4843:
URL: https://github.com/apache/skywalking/pull/4843#issuecomment-636322268


   @Fine0830 I did a simulation testing by using the current format. The 
template looks like this
   ```YAML
   # 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.
   
   # UI templates initialized file includes the default template when the 
SkyWalking OAP starts up at the first time.
   #
   # Also, SkyWalking would detect the existing templates in the database, once 
they are missing, all templates in this file
   # could be added automatically.
   
   templates:
     - name: "APM (Agent based)"
       # The type includes DASHBOARD, TOPOLOGY_INSTANCE, TOPOLOGY_ENDPOINT.
       # DASHBOARD type templates could have multiple definitions, by using 
different names.
       # TOPOLOGY_INSTANCE, TOPOLOGY_ENDPOINT type templates should be defined 
once, as they are used in the topology page only.
       type: "DASHBOARD"
       # Configuration could be defined through UI, and use `export` to format 
in the standard JSON.
       configuration: |-
         [
           {
             "name": "Service Dashboard",
             "type": "service",
             "query": {
               "service": {},
               "endpoint": {},
               "instance": {},
               "database": {}
             },
             "children": [
               {
                 "name": "Global",
                 "children": [
                   {
                     "chartType": "ChartHeatmap",
                     "title": "Global Heatmap",
                     "width": 6,
                     "height": 250,
                     "metricName": "all_heatmap",
                     "queryMetricType": "readHeatMap",
                     "entityType": "All",
                     "independentSelector": false,
                     "metricType": "HEATMAP",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Global Response Time Percentile ",
                     "width": 6,
                     "height": "248",
                     "metricName": "all_percentile",
                     "queryMetricType": "readLabeledMetricsValues",
                     "entityType": "All",
                     "independentSelector": false,
                     "metricType": "LABELED_VALUE",
                     "metricLabels": "p50, p75, p90, p95, p99",
                     "labelsIndex": "0, 1, 2, 3, 4",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "normal": true
                   },
                   {
                     "chartType": "ChartTrace",
                     "title": "Global Top Throughput",
                     "width": "6",
                     "height": 250,
                     "metricName": "service_cpm",
                     "queryMetricType": "sortMetrics",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "cpm",
                     "parentService": false,
                     "normal": true
                   },
                   {
                     "chartType": "ChartSlow",
                     "title": "Global Top Slow Endpoint",
                     "width": 6,
                     "height": 250,
                     "metricName": "endpoint_avg",
                     "queryMetricType": "sortMetrics",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "parentService": false,
                     "normal": true
                   }
                 ],
                 "type": "Global"
               },
               {
                 "name": "Service",
                 "children": [
                   {
                     "chartType": "ChartNum",
                     "title": "Service Avg ApdexScore",
                     "width": 3,
                     "height": 80,
                     "metricName": "service_apdex",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "version": "1.0",
                     "unit": "",
                     "aggregation": "/",
                     "aggregationNum": 10000,
                     "normal": true
                   },
                   {
                     "chartType": "ChartNum",
                     "title": "Service Avg ResponseTime",
                     "width": 3,
                     "height": 80,
                     "metricName": "service_resp_time",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "normal": true
                   },
                   {
                     "chartType": "ChartNum",
                     "title": "Service Avg Throughput",
                     "width": 3,
                     "height": 80,
                     "metricName": "service_cpm",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "normal": true
                   },
                   {
                     "chartType": "ChartNum",
                     "title": "Service Avg SLA",
                     "width": 3,
                     "height": 80,
                     "metricName": "service_sla",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "%",
                     "aggregation": "/",
                     "aggregationNum": 100,
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Service ApdexScore",
                     "width": 3,
                     "height": 170,
                     "metricName": "service_apdex",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "",
                     "aggregation": "/",
                     "aggregationNum": 10000,
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Service ResponseTime",
                     "width": 3,
                     "height": 170,
                     "metricName": "service_resp_time",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Service Throughput",
                     "width": 3,
                     "height": 170,
                     "metricName": "service_cpm",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Service SLA",
                     "width": 3,
                     "height": 170,
                     "metricName": "service_sla",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "%",
                     "aggregation": "/",
                     "aggregationNum": 100,
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Global Response Time Percentile",
                     "width": 3,
                     "height": 250,
                     "metricName": "all_percentile",
                     "queryMetricType": "readLabeledMetricsValues",
                     "entityType": "All",
                     "independentSelector": false,
                     "metricType": "LABELED_VALUE",
                     "metricLabels": "p50, p75, p90, p95, p99",
                     "labelsIndex": "0, 1, 2, 3, 4",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Service Response Time Percentile",
                     "width": 3,
                     "height": 250,
                     "metricName": "service_percentile",
                     "queryMetricType": "readLabeledMetricsValues",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "LABELED_VALUE",
                     "metricLabels": "p50, p75, p90, p95, p99",
                     "labelsIndex": "0, 1, 2, 3, 4",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartSlow",
                     "title": "Service Slow Endpoint",
                     "width": 3,
                     "height": 250,
                     "metricName": "endpoint_avg",
                     "queryMetricType": "sortMetrics",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "parentService": true,
                     "normal": true
                   },
                   {
                     "chartType": "ChartTrace",
                     "title": "Running ServiceInstance",
                     "width": 3,
                     "height": 250,
                     "metricName": "service_instance_cpm",
                     "queryMetricType": "sortMetrics",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "cpm",
                     "parentService": true,
                     "normal": true
                   }
                 ],
                 "type": "Service"
               },
               {
                 "name": "Endpoint",
                 "children": [
                   {
                     "chartType": "ChartNum",
                     "title": "Endpoint Avg ResponseTime",
                     "width": 3,
                     "height": 80,
                     "metricName": "endpoint_avg",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "normal": true
                   },
                   {
                     "chartType": "ChartNum",
                     "title": "Endpoint Avg Throughput",
                     "width": 3,
                     "height": 80,
                     "metricName": "endpoint_cpm",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "normal": true
                   },
                   {
                     "chartType": "ChartNum",
                     "title": "Endpoint Avg SLA",
                     "width": 3,
                     "height": 80,
                     "metricName": "endpoint_sla",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "version": "1.0",
                     "unit": "%",
                     "aggregation": "/",
                     "aggregationNum": 100,
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Endpoint ResponseTime",
                     "width": 3,
                     "height": 170,
                     "metricName": "endpoint_avg",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Endpoint Throughput",
                     "width": 3,
                     "height": 170,
                     "metricName": "endpoint_cpm",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Endpoint SLA",
                     "width": 3,
                     "height": 170,
                     "metricName": "endpoint_sla",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "version": "1.0",
                     "unit": "%",
                     "aggregation": "/",
                     "aggregationNum": 100,
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Global Response Time Percentile",
                     "width": 3,
                     "height": 250,
                     "metricName": "all_percentile",
                     "queryMetricType": "readLabeledMetricsValues",
                     "entityType": "All",
                     "independentSelector": false,
                     "metricType": "LABELED_VALUE",
                     "metricLabels": "p50, p75, p90, p95, p99",
                     "labelsIndex": "0, 1, 2, 3, 4",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Endpoint Response Time Percentile",
                     "width": 3,
                     "height": 250,
                     "metricName": "endpoint_percentile",
                     "queryMetricType": "readLabeledMetricsValues",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "LABELED_VALUE",
                     "metricLabels": "p50, p75, p90, p95, p99",
                     "labelsIndex": "0, 1, 2, 3, 4",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartSlow",
                     "title": "Global Top Slow Endpoint",
                     "width": 6,
                     "height": 250,
                     "metricName": "endpoint_avg",
                     "queryMetricType": "sortMetrics",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "parentService": false,
                     "normal": true
                   }
                 ],
                 "type": "Endpoint"
               },
               {
                 "name": "Instance",
                 "children": [
                   {
                     "chartType": "ChartNum",
                     "title": "Instance Avg ResponseTime",
                     "width": 3,
                     "height": 80,
                     "metricName": "service_instance_resp_time",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "normal": true
                   },
                   {
                     "chartType": "ChartNum",
                     "title": "Instance Avg Throughput",
                     "width": 3,
                     "height": 80,
                     "metricName": "service_instance_cpm",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "normal": true
                   },
                   {
                     "chartType": "ChartNum",
                     "title": "Instance Avg SLA",
                     "width": 3,
                     "height": 80,
                     "metricName": "service_instance_sla",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "%",
                     "aggregation": "/",
                     "aggregationNum": 100,
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Instance ResponseTime",
                     "width": 3,
                     "height": 170,
                     "metricName": "service_instance_resp_time",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Instance Throughput",
                     "width": 3,
                     "height": 170,
                     "metricName": "service_instance_cpm",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Instance SLA",
                     "width": 3,
                     "height": 170,
                     "metricName": "service_instance_sla",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "%",
                     "aggregation": "/",
                     "aggregationNum": 100,
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "JVM Heap (MB)",
                     "width": 3,
                     "height": 250,
                     "metricName": "instance_jvm_memory_heap, 
instance_jvm_memory_heap_max",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "/",
                     "aggregationNum": "1048580",
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "JVM Non-Heap (MB)",
                     "width": 3,
                     "height": 250,
                     "metricName": "instance_jvm_memory_noheap, 
instance_jvm_memory_noheap_max",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "/",
                     "aggregationNum": "1048576",
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "JVM GC (ms)",
                     "width": 3,
                     "height": 250,
                     "metricName": "instance_jvm_young_gc_time, 
instance_jvm_old_gc_time",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartCount",
                     "title": "JVM GC Count",
                     "width": 3,
                     "height": 250,
                     "metricName": "instance_jvm_young_gc_count, 
instance_jvm_old_gc_count",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "JVM CPU (%)",
                     "width": 3,
                     "height": 250,
                     "metricName": "instance_jvm_cpu",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "CLR CPU (%)",
                     "width": 3,
                     "height": 250,
                     "metricName": "instance_clr_cpu",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "CLR GC (Count)",
                     "width": 3,
                     "height": 250,
                     "metricName": "instance_clr_gen0_collect_count, 
instance_clr_gen1_collect_count, instance_clr_gen2_collect_count",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "CLR HeapMemory (MB)",
                     "width": 3,
                     "height": 250,
                     "metricName": "instance_clr_heap_memory",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Envoy Count",
                     "width": 3,
                     "height": 250,
                     "metricName": "envoy_total_connections_used, 
envoy_parent_connections_used",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Envoy Heap Memory Max Used",
                     "width": 3,
                     "height": 250,
                     "metricName": "envoy_heap_memory_max_used",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "ServiceInstance",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   }
                 ],
                 "type": "Instance"
               }
             ]
           },
           {
             "name": "Database Dashboard",
             "type": "database",
             "query": {
               "service": {},
               "endpoint": {},
               "instance": {},
               "database": {}
             },
             "children": [
               {
                 "name": "Global",
                 "children": [
                   {
                     "chartType": "ChartHeatmap",
                     "title": "Global Heatmap",
                     "width": 6,
                     "height": 250,
                     "metricName": "all_heatmap",
                     "queryMetricType": "readHeatMap",
                     "entityType": "All",
                     "independentSelector": false,
                     "metricType": "HEATMAP",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Global Response Time Percentile ",
                     "width": 6,
                     "height": "248",
                     "metricName": "all_percentile",
                     "queryMetricType": "readLabeledMetricsValues",
                     "entityType": "All",
                     "independentSelector": false,
                     "metricType": "LABELED_VALUE",
                     "metricLabels": "p50, p75, p90, p95, p99",
                     "labelsIndex": "0, 1, 2, 3, 4",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "normal": true
                   },
                   {
                     "chartType": "ChartTrace",
                     "title": "Global Top Throughput",
                     "width": 3,
                     "height": 250,
                     "metricName": "service_cpm",
                     "queryMetricType": "sortMetrics",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "cpm",
                     "parentService": false,
                     "normal": true
                   },
                   {
                     "chartType": "ChartSlow",
                     "title": "Global Top Slow Endpoint",
                     "width": 6,
                     "height": 250,
                     "metricName": "endpoint_avg",
                     "queryMetricType": "sortMetrics",
                     "entityType": "Endpoint",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "ms",
                     "parentService": false,
                     "normal": true
                   }
                 ],
                 "type": "All"
               },
               {
                 "name": "Database",
                 "children": [
                   {
                     "chartType": "ChartNum",
                     "title": "Database Avg ResponseTime",
                     "width": 3,
                     "height": 250,
                     "metricName": "database_access_resp_time",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "ms",
                     "aggregation": "",
                     "aggregationNum": 0,
                     "normal": false
                   },
                   {
                     "chartType": "ChartNum",
                     "title": "Database Avg Throughput",
                     "width": 3,
                     "height": 250,
                     "metricName": "database_access_cpm",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "ms",
                     "aggregation": "",
                     "aggregationNum": null,
                     "normal": false
                   },
                   {
                     "chartType": "ChartNum",
                     "title": "Database Avg SLA",
                     "width": 3,
                     "height": 250,
                     "metricName": "database_access_sla",
                     "queryMetricType": "readMetricsValue",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "%",
                     "aggregation": "/",
                     "aggregationNum": 100,
                     "normal": false
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Database ResponseTime",
                     "width": 3,
                     "height": 250,
                     "metricName": "database_access_resp_time",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "ms",
                     "aggregation": "",
                     "aggregationNum": null,
                     "normal": false
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Database Throughput",
                     "width": 3,
                     "height": 250,
                     "metricName": "database_access_cpm",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "ms",
                     "aggregation": "",
                     "aggregationNum": null,
                     "normal": false
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Database SLA",
                     "width": 3,
                     "height": 250,
                     "metricName": "database_access_sla",
                     "queryMetricType": "readMetricsValues",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "REGULAR_VALUE",
                     "unit": "%",
                     "aggregation": "/",
                     "aggregationNum": 100,
                     "normal": false
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Global Response Time Percentile",
                     "width": 6,
                     "height": 250,
                     "metricName": "all_percentile",
                     "queryMetricType": "readLabeledMetricsValues",
                     "entityType": "All",
                     "independentSelector": false,
                     "metricType": "LABELED_VALUE",
                     "metricLabels": "p50, p75, p90, p95, p99",
                     "labelsIndex": "0, 1, 2, 3, 4",
                     "unit": "",
                     "aggregation": "",
                     "aggregationNum": null,
                     "normal": true
                   },
                   {
                     "chartType": "ChartLine",
                     "title": "Database Response Time Percentile",
                     "width": 3,
                     "height": 250,
                     "metricName": "database_access_percentile",
                     "queryMetricType": "readLabeledMetricsValues",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "LABELED_VALUE",
                     "metricLabels": "p50, p75, p90, p95, p99",
                     "labelsIndex": "0, 1, 2, 3, 4",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "normal": false
                   },
                   {
                     "chartType": "ChartSlow",
                     "title": "Database TopN Records",
                     "width": 6,
                     "height": 250,
                     "metricName": "top_n_database_statement",
                     "queryMetricType": "readSampledRecords",
                     "entityType": "Service",
                     "independentSelector": false,
                     "metricType": "SAMPLED_RECORD",
                     "aggregation": "",
                     "aggregationNum": null,
                     "unit": "",
                     "parentService": true,
                     "normal": false
                   }
                 ],
                 "type": "Database"
               }
             ]
           }
         ]
       # Activated as the DASHBOARD type, makes this templates added into the 
UI page automatically.
       # False means providing a basic template, user needs to add it manually.
       activated: true
       # True means wouldn't show up on the dashboard. Only keeps the 
definition in the storage.
       disable: false
   ```
   
   When we use `getAllTemplates` GraphQL to query the template, could get this
   ```graphql
   query {
     getAllTemplates {
       name,
       type
       configuration,
       activated,
       disabled,
     }
   }
   ```
   
   ```graphql
   {
     "data": {
       "getAllTemplates": [
         {
           "name": "APM (Agent based)",
           "type": "DASHBOARD",
           "configuration": "[\n  {\n    \"name\": \"Service Dashboard\",\n    
\"type\": \"service\",\n    \"query\": {\n      \"service\": {},\n      
\"endpoint\": {},\n      \"instance\": {},\n      \"database\": {}\n    },\n    
\"children\": [\n      {\n        \"name\": \"Global\",\n        \"children\": 
[\n          {\n            \"chartType\": \"ChartHeatmap\",\n            
\"title\": \"Global Heatmap\",\n            \"width\": 6,\n            
\"height\": 250,\n            \"metricName\": \"all_heatmap\",\n            
\"queryMetricType\": \"readHeatMap\",\n            \"entityType\": \"All\",\n   
         \"independentSelector\": false,\n            \"metricType\": 
\"HEATMAP\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"\",\n            \"normal\": 
true\n          },\n          {\n            \"chartType\": \"ChartLine\",\n    
        \"title\": \"Global Response Time Percentile \",\n            
\"width\": 6,\n            \"height\": \"248\",\n            \"metricName\": 
\"all_percentile\",\n            \"queryMetricType\": 
\"readLabeledMetricsValues\",\n            \"entityType\": \"All\",\n           
 \"independentSelector\": false,\n            \"metricType\": 
\"LABELED_VALUE\",\n            \"metricLabels\": \"p50, p75, p90, p95, 
p99\",\n            \"labelsIndex\": \"0, 1, 2, 3, 4\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"ms\",\n            \"normal\": true\n          },\n          {\n    
        \"chartType\": \"ChartTrace\",\n            \"title\": \"Global Top 
Throughput\",\n            \"width\": \"6\",\n            \"height\": 250,\n    
        \"metricName\": \"service_cpm\",\n            \"queryMetricType\": 
\"sortMetrics\",\n            \"entityType\": \"Service\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"cpm\",\n            
\"parentService\": false,\n            \"normal\": true\n          },\n         
 {\n            \"chartType\": \"ChartSlow\",\n            \"title\": \"Global 
Top Slow Endpoint\",\n            \"width\": 6,\n            \"height\": 250,\n 
           \"metricName\": \"endpoint_avg\",\n            \"queryMetricType\": 
\"sortMetrics\",\n            \"entityType\": \"Endpoint\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"ms\",\n            
\"parentService\": false,\n            \"normal\": true\n          }\n        
],\n        \"type\": \"Global\"\n      },\n      {\n        \"name\": 
\"Service\",\n        \"children\": [\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Service Avg ApdexScore\",\n            
\"width\": 3,\n            \"height\": 80,\n            \"metricName\": 
\"service_apdex\",\n            \"queryMetricType\": \"readMetricsValue\",\n    
        \"entityType\": \"Service\",\n            \"independentSelector\": 
false,\n            \"metricType\": \"REGULAR_VALUE\",\n            
\"version\": \"1.0\",\n            \"unit\": \"\",\n            
\"aggregation\": \"/\",\n            \"aggregationNum\": 10000,\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Service Avg ResponseTime\",\n           
 \"width\": 3,\n            \"height\": 80,\n            \"metricName\": 
\"service_resp_time\",\n            \"queryMetricType\": 
\"readMetricsValue\",\n            \"entityType\": \"Service\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"ms\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Service Avg Throughput\",\n            
\"width\": 3,\n            \"height\": 80,\n            \"metricName\": 
\"service_cpm\",\n            \"queryMetricType\": \"readMetricsValue\",\n      
      \"entityType\": \"Service\",\n            \"independentSelector\": 
false,\n            \"metricType\": \"REGULAR_VALUE\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"ms\",\n            \"normal\": true\n          },\n          {\n    
        \"chartType\": \"ChartNum\",\n            \"title\": \"Service Avg 
SLA\",\n            \"width\": 3,\n            \"height\": 80,\n            
\"metricName\": \"service_sla\",\n            \"queryMetricType\": 
\"readMetricsValue\",\n            \"entityType\": \"Service\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"unit\": \"%\",\n            \"aggregation\": 
\"/\",\n            \"aggregationNum\": 100,\n            \"normal\": true\n    
      },\n          {\n            \"chartType\": \"ChartLine\",\n            
\"title\": \"Service ApdexScore\",\n            \"width\": 3,\n            
\"height\": 170,\n            \"metricName\": \"service_apdex\",\n            
\"queryMetricType\": \"readMetricsValues\",\n            \"entityType\": 
\"Service\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"unit\": \"\",\n            
\"aggregation\": \"/\",\n            \"aggregationNum\": 10000,\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"Service ResponseTime\",\n            
\"width\": 3,\n            \"height\": 170,\n            \"metricName\": 
\"service_resp_time\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"Service\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"\",\n            \"normal\": 
true\n          },\n          {\n            \"chartType\": \"ChartLine\",\n    
        \"title\": \"Service Throughput\",\n            \"width\": 3,\n         
   \"height\": 170,\n            \"metricName\": \"service_cpm\",\n            
\"queryMetricType\": \"readMetricsValues\",\n            \"entityType\": 
\"Service\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n        
    \"aggregationNum\": null,\n            \"unit\": \"\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"Service SLA\",\n            \"width\": 
3,\n            \"height\": 170,\n            \"metricName\": 
\"service_sla\",\n            \"queryMetricType\": \"readMetricsValues\",\n     
       \"entityType\": \"Service\",\n            \"independentSelector\": 
false,\n            \"metricType\": \"REGULAR_VALUE\",\n            \"unit\": 
\"%\",\n            \"aggregation\": \"/\",\n            \"aggregationNum\": 
100,\n            \"normal\": true\n          },\n          {\n            
\"chartType\": \"ChartLine\",\n            \"title\": \"Global Response Time 
Percentile\",\n            \"width\": 3,\n            \"height\": 250,\n        
    \"metricName\": \"all_percentile\",\n            \"queryMetricType\": 
\"readLabeledMetricsValues\",\n            \"entityType\": \"All\",\n           
 \"independentSelector\": false,\n            \"metricType\": 
\"LABELED_VALUE\",\n            \"metricLabels\": \"p50, p75, p90, p95, 
p99\",\n            \"labelsIndex\": \"0, 1, 2, 3, 4\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"\",\n            \"normal\": true\n          },\n          {\n      
      \"chartType\": \"ChartLine\",\n            \"title\": \"Service Response 
Time Percentile\",\n            \"width\": 3,\n            \"height\": 250,\n   
         \"metricName\": \"service_percentile\",\n            
\"queryMetricType\": \"readLabeledMetricsValues\",\n            \"entityType\": 
\"Service\",\n            \"independentSelector\": false,\n            
\"metricType\": \"LABELED_VALUE\",\n            \"metricLabels\": \"p50, p75, 
p90, p95, p99\",\n            \"labelsIndex\": \"0, 1, 2, 3, 4\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"\",\n            \"normal\": true\n          },\n          {\n      
      \"chartType\": \"ChartSlow\",\n            \"title\": \"Service Slow 
Endpoint\",\n            \"width\": 3,\n            \"height\": 250,\n          
  \"metricName\": \"endpoint_avg\",\n            \"queryMetricType\": 
\"sortMetrics\",\n            \"entityType\": \"Endpoint\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"ms\",\n            
\"parentService\": true,\n            \"normal\": true\n          },\n          
{\n            \"chartType\": \"ChartTrace\",\n            \"title\": \"Running 
ServiceInstance\",\n            \"width\": 3,\n            \"height\": 250,\n   
         \"metricName\": \"service_instance_cpm\",\n            
\"queryMetricType\": \"sortMetrics\",\n            \"entityType\": 
\"ServiceInstance\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n        
    \"aggregationNum\": null,\n            \"unit\": \"cpm\",\n            
\"parentService\": true,\n            \"normal\": true\n          }\n        
],\n        \"type\": \"Service\"\n      },\n      {\n        \"name\": 
\"Endpoint\",\n        \"children\": [\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Endpoint Avg ResponseTime\",\n          
  \"width\": 3,\n            \"height\": 80,\n            \"metricName\": 
\"endpoint_avg\",\n            \"queryMetricType\": \"readMetricsValue\",\n     
       \"entityType\": \"Endpoint\",\n            \"independentSelector\": 
false,\n            \"metricType\": \"REGULAR_VALUE\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"ms\",\n            \"normal\": true\n          },\n          {\n    
        \"chartType\": \"ChartNum\",\n            \"title\": \"Endpoint Avg 
Throughput\",\n            \"width\": 3,\n            \"height\": 80,\n         
   \"metricName\": \"endpoint_cpm\",\n            \"queryMetricType\": 
\"readMetricsValue\",\n            \"entityType\": \"Endpoint\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"ms\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Endpoint Avg SLA\",\n            
\"width\": 3,\n            \"height\": 80,\n            \"metricName\": 
\"endpoint_sla\",\n            \"queryMetricType\": \"readMetricsValue\",\n     
       \"entityType\": \"Endpoint\",\n            \"independentSelector\": 
false,\n            \"metricType\": \"REGULAR_VALUE\",\n            
\"version\": \"1.0\",\n            \"unit\": \"%\",\n            
\"aggregation\": \"/\",\n            \"aggregationNum\": 100,\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"Endpoint ResponseTime\",\n            
\"width\": 3,\n            \"height\": 170,\n            \"metricName\": 
\"endpoint_avg\",\n            \"queryMetricType\": \"readMetricsValues\",\n    
        \"entityType\": \"Endpoint\",\n            \"independentSelector\": 
false,\n            \"metricType\": \"REGULAR_VALUE\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"\",\n            \"normal\": true\n          },\n          {\n      
      \"chartType\": \"ChartLine\",\n            \"title\": \"Endpoint 
Throughput\",\n            \"width\": 3,\n            \"height\": 170,\n        
    \"metricName\": \"endpoint_cpm\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"Endpoint\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"\",\n            \"normal\": 
true\n          },\n          {\n            \"chartType\": \"ChartLine\",\n    
        \"title\": \"Endpoint SLA\",\n            \"width\": 3,\n            
\"height\": 170,\n            \"metricName\": \"endpoint_sla\",\n            
\"queryMetricType\": \"readMetricsValues\",\n            \"entityType\": 
\"Endpoint\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"version\": \"1.0\",\n         
   \"unit\": \"%\",\n            \"aggregation\": \"/\",\n            
\"aggregationNum\": 100,\n            \"normal\": true\n          },\n          
{\n            \"chartType\": \"ChartLine\",\n            \"title\": \"Global 
Response Time Percentile\",\n            \"width\": 3,\n            \"height\": 
250,\n            \"metricName\": \"all_percentile\",\n            
\"queryMetricType\": \"readLabeledMetricsValues\",\n            \"entityType\": 
\"All\",\n            \"independentSelector\": false,\n            
\"metricType\": \"LABELED_VALUE\",\n            \"metricLabels\": \"p50, p75, 
p90, p95, p99\",\n            \"labelsIndex\": \"0, 1, 2, 3, 4\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"\",\n            \"normal\": true\n          },\n          {\n      
      \"chartType\": \"ChartLine\",\n            \"title\": \"Endpoint Response 
Time Percentile\",\n            \"width\": 3,\n            \"height\": 250,\n   
         \"metricName\": \"endpoint_percentile\",\n            
\"queryMetricType\": \"readLabeledMetricsValues\",\n            \"entityType\": 
\"Endpoint\",\n            \"independentSelector\": false,\n            
\"metricType\": \"LABELED_VALUE\",\n            \"metricLabels\": \"p50, p75, 
p90, p95, p99\",\n            \"labelsIndex\": \"0, 1, 2, 3, 4\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"\",\n            \"normal\": true\n          },\n          {\n      
      \"chartType\": \"ChartSlow\",\n            \"title\": \"Global Top Slow 
Endpoint\",\n            \"width\": 6,\n            \"height\": 250,\n          
  \"metricName\": \"endpoint_avg\",\n            \"queryMetricType\": 
\"sortMetrics\",\n            \"entityType\": \"Endpoint\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"ms\",\n            
\"parentService\": false,\n            \"normal\": true\n          }\n        
],\n        \"type\": \"Endpoint\"\n      },\n      {\n        \"name\": 
\"Instance\",\n        \"children\": [\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Instance Avg ResponseTime\",\n          
  \"width\": 3,\n            \"height\": 80,\n            \"metricName\": 
\"service_instance_resp_time\",\n            \"queryMetricType\": 
\"readMetricsValue\",\n            \"entityType\": \"ServiceInstance\",\n       
     \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"ms\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Instance Avg Throughput\",\n            
\"width\": 3,\n            \"height\": 80,\n            \"metricName\": 
\"service_instance_cpm\",\n            \"queryMetricType\": 
\"readMetricsValue\",\n            \"entityType\": \"ServiceInstance\",\n       
     \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"ms\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Instance Avg SLA\",\n            
\"width\": 3,\n            \"height\": 80,\n            \"metricName\": 
\"service_instance_sla\",\n            \"queryMetricType\": 
\"readMetricsValue\",\n            \"entityType\": \"ServiceInstance\",\n       
     \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"unit\": \"%\",\n            \"aggregation\": 
\"/\",\n            \"aggregationNum\": 100,\n            \"normal\": true\n    
      },\n          {\n            \"chartType\": \"ChartLine\",\n            
\"title\": \"Instance ResponseTime\",\n            \"width\": 3,\n            
\"height\": 170,\n            \"metricName\": \"service_instance_resp_time\",\n 
           \"queryMetricType\": \"readMetricsValues\",\n            
\"entityType\": \"ServiceInstance\",\n            \"independentSelector\": 
false,\n            \"metricType\": \"REGULAR_VALUE\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"\",\n            \"normal\": true\n          },\n          {\n      
      \"chartType\": \"ChartLine\",\n            \"title\": \"Instance 
Throughput\",\n            \"width\": 3,\n            \"height\": 170,\n        
    \"metricName\": \"service_instance_cpm\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"ServiceInstance\",\n      
      \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"ms\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"Instance SLA\",\n            
\"width\": 3,\n            \"height\": 170,\n            \"metricName\": 
\"service_instance_sla\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"ServiceInstance\",\n      
      \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"unit\": \"%\",\n            \"aggregation\": 
\"/\",\n            \"aggregationNum\": 100,\n            \"normal\": true\n    
      },\n          {\n            \"chartType\": \"ChartLine\",\n            
\"title\": \"JVM Heap (MB)\",\n            \"width\": 3,\n            
\"height\": 250,\n            \"metricName\": \"instance_jvm_memory_heap, 
instance_jvm_memory_heap_max\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"ServiceInstance\",\n      
      \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"/\",\n            
\"aggregationNum\": \"1048580\",\n            \"unit\": \"\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"JVM Non-Heap (MB)\",\n            
\"width\": 3,\n            \"height\": 250,\n            \"metricName\": 
\"instance_jvm_memory_noheap, instance_jvm_memory_noheap_max\",\n            
\"queryMetricType\": \"readMetricsValues\",\n            \"entityType\": 
\"ServiceInstance\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"aggregation\": \"/\",\n       
     \"aggregationNum\": \"1048576\",\n            \"unit\": \"\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"JVM GC (ms)\",\n            \"width\": 
3,\n            \"height\": 250,\n            \"metricName\": 
\"instance_jvm_young_gc_time, instance_jvm_old_gc_time\",\n            
\"queryMetricType\": \"readMetricsValues\",\n            \"entityType\": 
\"ServiceInstance\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n        
    \"aggregationNum\": null,\n            \"unit\": \"\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartCount\",\n            \"title\": \"JVM GC Count\",\n            
\"width\": 3,\n            \"height\": 250,\n            \"metricName\": 
\"instance_jvm_young_gc_count, instance_jvm_old_gc_count\",\n            
\"queryMetricType\": \"readMetricsValues\",\n            \"entityType\": 
\"ServiceInstance\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n        
    \"aggregationNum\": null,\n            \"unit\": \"\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"JVM CPU (%)\",\n            \"width\": 
3,\n            \"height\": 250,\n            \"metricName\": 
\"instance_jvm_cpu\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"ServiceInstance\",\n      
      \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"\",\n            \"normal\": 
true\n          },\n          {\n            \"chartType\": \"ChartLine\",\n    
        \"title\": \"CLR CPU (%)\",\n            \"width\": 3,\n            
\"height\": 250,\n            \"metricName\": \"instance_clr_cpu\",\n           
 \"queryMetricType\": \"readMetricsValues\",\n            \"entityType\": 
\"ServiceInstance\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n        
    \"aggregationNum\": null,\n            \"unit\": \"\",\n            
\"normal\": true\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"CLR GC (Count)\",\n            
\"width\": 3,\n            \"height\": 250,\n            \"metricName\": 
\"instance_clr_gen0_collect_count, instance_clr_gen1_collect_count, 
instance_clr_gen2_collect_count\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"ServiceInstance\",\n      
      \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"\",\n            \"normal\": 
true\n          },\n          {\n            \"chartType\": \"ChartLine\",\n    
        \"title\": \"CLR HeapMemory (MB)\",\n            \"width\": 3,\n        
    \"height\": 250,\n            \"metricName\": 
\"instance_clr_heap_memory\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"ServiceInstance\",\n      
      \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"\",\n            \"normal\": 
true\n          },\n          {\n            \"chartType\": \"ChartLine\",\n    
        \"title\": \"Envoy Count\",\n            \"width\": 3,\n            
\"height\": 250,\n            \"metricName\": \"envoy_total_connections_used, 
envoy_parent_connections_used\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"ServiceInstance\",\n      
      \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"\",\n            \"normal\": 
true\n          },\n          {\n            \"chartType\": \"ChartLine\",\n    
        \"title\": \"Envoy Heap Memory Max Used\",\n            \"width\": 3,\n 
           \"height\": 250,\n            \"metricName\": 
\"envoy_heap_memory_max_used\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"ServiceInstance\",\n      
      \"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"\",\n            \"normal\": 
true\n          }\n        ],\n        \"type\": \"Instance\"\n      }\n    ]\n 
 },\n  {\n    \"name\": \"Database Dashboard\",\n    \"type\": \"database\",\n  
  \"query\": {\n      \"service\": {},\n      \"endpoint\": {},\n      
\"instance\": {},\n      \"database\": {}\n    },\n    \"children\": [\n      
{\n        \"name\": \"Global\",\n        \"children\": [\n          {\n        
    \"chartType\": \"ChartHeatmap\",\n            \"title\": \"Global 
Heatmap\",\n            \"width\": 6,\n            \"height\": 250,\n           
 \"metricName\": \"all_heatmap\",\n            \"queryMetricType\": 
\"readHeatMap\",\n            \"entityType\": \"All\",\n            
\"independentSelector\": false,\n            \"metricType\": \"HEATMAP\",\n     
       \"aggregation\": \"\",\n            \"aggregationNum\": null,\n          
  \"unit\": \"\",\n            \"normal\": true\n          },\n          {\n    
        \"chartType\": \"ChartLine\",\n            \"title\": \"Global Response 
Time Percentile \",\n            \"width\": 6,\n            \"height\": 
\"248\",\n            \"metricName\": \"all_percentile\",\n            
\"queryMetricType\": \"readLabeledMetricsValues\",\n            \"entityType\": 
\"All\",\n            \"independentSelector\": false,\n            
\"metricType\": \"LABELED_VALUE\",\n            \"metricLabels\": \"p50, p75, 
p90, p95, p99\",\n            \"labelsIndex\": \"0, 1, 2, 3, 4\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"ms\",\n            \"normal\": true\n          },\n          {\n    
        \"chartType\": \"ChartTrace\",\n            \"title\": \"Global Top 
Throughput\",\n            \"width\": 3,\n            \"height\": 250,\n        
    \"metricName\": \"service_cpm\",\n            \"queryMetricType\": 
\"sortMetrics\",\n            \"entityType\": \"Service\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"cpm\",\n            
\"parentService\": false,\n            \"normal\": true\n          },\n         
 {\n            \"chartType\": \"ChartSlow\",\n            \"title\": \"Global 
Top Slow Endpoint\",\n            \"width\": 6,\n            \"height\": 250,\n 
           \"metricName\": \"endpoint_avg\",\n            \"queryMetricType\": 
\"sortMetrics\",\n            \"entityType\": \"Endpoint\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"aggregation\": \"\",\n            
\"aggregationNum\": null,\n            \"unit\": \"ms\",\n            
\"parentService\": false,\n            \"normal\": true\n          }\n        
],\n        \"type\": \"All\"\n      },\n      {\n        \"name\": 
\"Database\",\n        \"children\": [\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Database Avg ResponseTime\",\n          
  \"width\": 3,\n            \"height\": 250,\n            \"metricName\": 
\"database_access_resp_time\",\n            \"queryMetricType\": 
\"readMetricsValue\",\n            \"entityType\": \"Service\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"unit\": \"ms\",\n            \"aggregation\": 
\"\",\n            \"aggregationNum\": 0,\n            \"normal\": false\n      
    },\n          {\n            \"chartType\": \"ChartNum\",\n            
\"title\": \"Database Avg Throughput\",\n            \"width\": 3,\n            
\"height\": 250,\n            \"metricName\": \"database_access_cpm\",\n        
    \"queryMetricType\": \"readMetricsValue\",\n            \"entityType\": 
\"Service\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"unit\": \"ms\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"normal\": false\n          },\n          {\n            \"chartType\": 
\"ChartNum\",\n            \"title\": \"Database Avg SLA\",\n            
\"width\": 3,\n            \"height\": 250,\n            \"metricName\": 
\"database_access_sla\",\n            \"queryMetricType\": 
\"readMetricsValue\",\n            \"entityType\": \"Service\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"unit\": \"%\",\n            \"aggregation\": 
\"/\",\n            \"aggregationNum\": 100,\n            \"normal\": false\n   
       },\n          {\n            \"chartType\": \"ChartLine\",\n            
\"title\": \"Database ResponseTime\",\n            \"width\": 3,\n            
\"height\": 250,\n            \"metricName\": \"database_access_resp_time\",\n  
          \"queryMetricType\": \"readMetricsValues\",\n            
\"entityType\": \"Service\",\n            \"independentSelector\": false,\n     
       \"metricType\": \"REGULAR_VALUE\",\n            \"unit\": \"ms\",\n      
      \"aggregation\": \"\",\n            \"aggregationNum\": null,\n           
 \"normal\": false\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"Database Throughput\",\n            
\"width\": 3,\n            \"height\": 250,\n            \"metricName\": 
\"database_access_cpm\",\n            \"queryMetricType\": 
\"readMetricsValues\",\n            \"entityType\": \"Service\",\n            
\"independentSelector\": false,\n            \"metricType\": 
\"REGULAR_VALUE\",\n            \"unit\": \"ms\",\n            \"aggregation\": 
\"\",\n            \"aggregationNum\": null,\n            \"normal\": false\n   
       },\n          {\n            \"chartType\": \"ChartLine\",\n            
\"title\": \"Database SLA\",\n            \"width\": 3,\n            
\"height\": 250,\n            \"metricName\": \"database_access_sla\",\n        
    \"queryMetricType\": \"readMetricsValues\",\n            \"entityType\": 
\"Service\",\n            \"independentSelector\": false,\n            
\"metricType\": \"REGULAR_VALUE\",\n            \"unit\": \"%\",\n            
\"aggregation\": \"/\",\n            \"aggregationNum\": 100,\n            
\"normal\": false\n          },\n          {\n            \"chartType\": 
\"ChartLine\",\n            \"title\": \"Global Response Time Percentile\",\n   
         \"width\": 6,\n            \"height\": 250,\n            
\"metricName\": \"all_percentile\",\n            \"queryMetricType\": 
\"readLabeledMetricsValues\",\n            \"entityType\": \"All\",\n           
 \"independentSelector\": false,\n            \"metricType\": 
\"LABELED_VALUE\",\n            \"metricLabels\": \"p50, p75, p90, p95, 
p99\",\n            \"labelsIndex\": \"0, 1, 2, 3, 4\",\n            \"unit\": 
\"\",\n            \"aggregation\": \"\",\n            \"aggregationNum\": 
null,\n            \"normal\": true\n          },\n          {\n            
\"chartType\": \"ChartLine\",\n            \"title\": \"Database Response Time 
Percentile\",\n            \"width\": 3,\n            \"height\": 250,\n        
    \"metricName\": \"database_access_percentile\",\n            
\"queryMetricType\": \"readLabeledMetricsValues\",\n            \"entityType\": 
\"Service\",\n            \"independentSelector\": false,\n            
\"metricType\": \"LABELED_VALUE\",\n            \"metricLabels\": \"p50, p75, 
p90, p95, p99\",\n            \"labelsIndex\": \"0, 1, 2, 3, 4\",\n            
\"aggregation\": \"\",\n            \"aggregationNum\": null,\n            
\"unit\": \"\",\n            \"normal\": false\n          },\n          {\n     
       \"chartType\": \"ChartSlow\",\n            \"title\": \"Database TopN 
Records\",\n            \"width\": 6,\n            \"height\": 250,\n           
 \"metricName\": \"top_n_database_statement\",\n            
\"queryMetricType\": \"readSampledRecords\",\n            \"entityType\": 
\"Service\",\n            \"independentSelector\": false,\n            
\"metricType\": \"SAMPLED_RECORD\",\n            \"aggregation\": \"\",\n       
     \"aggregationNum\": null,\n            \"unit\": \"\",\n            
\"parentService\": true,\n            \"normal\": false\n          }\n        
],\n        \"type\": \"Database\"\n      }\n    ]\n  }\n]",
           "activated": true,
           "disabled": false
         }
       ]
     }
   }
   ```
   
   @Fine0830 The value of `configuration` is the configuration UI provided and 
used.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to