You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2022/11/23 02:44:54 UTC

[iotdb] branch master updated: [IOTDB-5002] Move metric related config into properties file and modify distribution structure (#8096)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 63182c1ee3 [IOTDB-5002] Move metric related config into properties file and modify distribution structure (#8096)
63182c1ee3 is described below

commit 63182c1ee3e3df05be9388899ade0259c88bd89e
Author: ZhangHongYin <46...@users.noreply.github.com>
AuthorDate: Wed Nov 23 10:44:48 2022 +0800

    [IOTDB-5002] Move metric related config into properties file and modify distribution structure (#8096)
---
 confignode/src/assembly/confignode.xml             |   4 -
 .../resources/conf/iotdb-confignode.properties     |  68 +++++++-
 .../confignode/conf/ConfigNodeDescriptor.java      |   1 +
 .../confignode1conf/iotdb-confignode-metric.yml    |  48 ------
 .../confignode1conf/iotdb-confignode.properties    |  10 +-
 .../confignode2conf/iotdb-confignode-metric.yml    |  48 ------
 .../confignode2conf/iotdb-confignode.properties    |  10 +-
 .../confignode3conf/iotdb-confignode-metric.yml    |  48 ------
 .../confignode3conf/iotdb-confignode.properties    |  10 +-
 distribution/src/assembly/all.xml                  |  12 --
 distribution/src/assembly/confignode.xml           |   6 -
 distribution/src/assembly/datanode.xml             |   8 -
 docs/UserGuide/Monitor-Alert/Metric-Tool.md        |  68 ++++----
 docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md     |  67 +++-----
 metrics/ReadMe.md                                  |  29 ++--
 .../reporter/DropwizardPrometheusReporter.java     |   2 +-
 .../resources/conf/iotdb-confignode-metric.yml     |  49 ------
 .../resources/conf/iotdb-datanode-metric.yml       |  49 ------
 .../iotdb/metrics/AbstractMetricService.java       |   6 +-
 .../apache/iotdb/metrics/config/MetricConfig.java  |  41 +++--
 .../metrics/config/MetricConfigDescriptor.java     | 186 +++++++++++----------
 .../iotdb/metrics/config/MetricConstant.java       |  37 ----
 .../{MonitorType.java => MetricFrameType.java}     |   2 +-
 .../iotdb/metrics/config/MetricConfigTest.java     |  79 +++++----
 .../interface/src/test/resources/iotdb-metric.yml  |  52 ------
 .../reporter/MicrometerPrometheusReporter.java     |   4 +-
 .../resources/conf/iotdb-datanode.properties       |  65 +++++++
 server/src/assembly/server.xml                     |   4 -
 .../org/apache/iotdb/db/conf/IoTDBDescriptor.java  |   3 +-
 .../apache/iotdb/db/metric/MetricServiceTest.java  |   6 +-
 .../datanode1conf/iotdb-datanode-metric.yml        |  48 ------
 .../datanode1conf/iotdb-datanode.properties        |   8 +
 .../datanode2conf/iotdb-datanode-metric.yml        |  48 ------
 .../datanode2conf/iotdb-datanode.properties        |   8 +
 .../datanode3conf/iotdb-datanode-metric.yml        |  48 ------
 .../datanode3conf/iotdb-datanode.properties        |  10 +-
 36 files changed, 436 insertions(+), 756 deletions(-)

diff --git a/confignode/src/assembly/confignode.xml b/confignode/src/assembly/confignode.xml
index 4b9613eb80..8743b4c7d2 100644
--- a/confignode/src/assembly/confignode.xml
+++ b/confignode/src/assembly/confignode.xml
@@ -43,10 +43,6 @@
         </fileSet>
     </fileSets>
     <files>
-        <file>
-            <source>${maven.multiModuleProjectDirectory}/metrics/interface/src/main/assembly/resources/conf/iotdb-confignode-metric.yml</source>
-            <destName>conf/iotdb-confignode-metric.yml</destName>
-        </file>
         <file>
             <source>${maven.multiModuleProjectDirectory}/node-commons/src/assembly/resources/conf/iotdb-common.properties</source>
             <destName>conf/iotdb-common.properties</destName>
diff --git a/confignode/src/assembly/resources/conf/iotdb-confignode.properties b/confignode/src/assembly/resources/conf/iotdb-confignode.properties
index a1919a054f..a997ce14eb 100644
--- a/confignode/src/assembly/resources/conf/iotdb-confignode.properties
+++ b/confignode/src/assembly/resources/conf/iotdb-confignode.properties
@@ -101,4 +101,70 @@ cn_target_config_node_list=127.0.0.1:22277
 
 # selector thread (TAsyncClientManager) nums for async thread in a clientManager
 # Datatype: int
-# cn_selector_thread_nums_of_client_manager=1
\ No newline at end of file
+# cn_selector_thread_nums_of_client_manager=1
+
+####################
+### Metric Configuration
+####################
+
+# Whether enable metric module
+# Datatype: boolean
+# cn_enable_metric=true
+
+# Whether statistic operation performance
+# Datatype: boolean
+# cn_enable_performance_stat=false
+
+# The reporters of metric module to report metrics
+# If there are more than one reporter, please separate them by commas ",".
+# Options: [JMX, PROMETHEUS, IOTDB]
+# Datatype: String
+# cn_metric_reporter_list=
+
+# The type of metric framework which manage metrics
+# Options: [MICROMETER, DROPWIZARD]
+# Datatype: String
+# cn_metric_frame_type=MICROMETER
+
+# The level of metric module
+# Options: [CORE, IMPORTANT, NORMAL, ALL]
+# Datatype: String
+# cn_metric_level=CORE
+
+# The period of async collection of some metrics in second
+# Datatype: int
+# cn_metric_async_collect_period=5
+
+# The port of prometheus reporter of metric module
+# Datatype: int
+# cn_metric_prometheus_reporter_port=9091
+
+# The host of IoTDB reporter of metric module
+# Could set 127.0.0.1(for local test) or ipv4 address
+# Datatype: String
+# cn_metric_iotdb_reporter_host=127.0.0.1
+
+# The port of IoTDB reporter of metric module
+# Datatype: int
+# cn_metric_iotdb_reporter_port=6667
+
+# The username of IoTDB reporter of metric module
+# Datatype: String
+# cn_metric_iotdb_reporter_username=root
+
+# The password of IoTDB reporter of metric module
+# Datatype: String
+# cn_metric_iotdb_reporter_password=root
+
+# The max connection number of IoTDB reporter of metric module
+# Datatype: int
+# cn_metric_iotdb_reporter_max_connection_number=3
+
+# The location of IoTDB reporter of metric module
+# The metrics will write into root.__system.${location}
+# Datatype: String
+# cn_metric_iotdb_reporter_location=metric
+
+# The push period of IoTDB reporter of metric module in second
+# Datatype: int
+# cn_metric_iotdb_reporter_push_period=15
\ No newline at end of file
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
index 25f298e47f..44b58731a6 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/conf/ConfigNodeDescriptor.java
@@ -128,6 +128,7 @@ public class ConfigNodeDescriptor {
         commonDescriptor
             .getConfig()
             .updatePath(System.getProperty(ConfigNodeConstant.CONFIGNODE_HOME, null));
+        MetricConfigDescriptor.getInstance().loadProps(commonProperties);
         MetricConfigDescriptor.getInstance()
             .getMetricConfig()
             .updateRpcInstance(conf.getInternalAddress(), conf.getInternalPort());
diff --git a/confignode/src/test/resources/confignode1conf/iotdb-confignode-metric.yml b/confignode/src/test/resources/confignode1conf/iotdb-confignode-metric.yml
deleted file mode 100644
index 7832a1f107..0000000000
--- a/confignode/src/test/resources/confignode1conf/iotdb-confignode-metric.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# 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.
-#
-
-# whether enable the module
-enableMetric: true
-
-# Is stat performance of operation latency
-enablePerformanceStat: false
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-  - JMX
-  - PROMETHEUS
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: IMPORTANT
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9091
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
diff --git a/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties b/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
index 33c4d08a8b..5d5ab67768 100644
--- a/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
+++ b/confignode/src/test/resources/confignode1conf/iotdb-confignode.properties
@@ -23,4 +23,12 @@ cn_consensus_port=22278
 cn_target_config_node_list=127.0.0.1:22277
 cn_system_dir=target/confignode1/system
 cn_data_dirs=target/confignode1/data
-cn_consensus_dir=target/confignode1/consensus
\ No newline at end of file
+cn_consensus_dir=target/confignode1/consensus
+
+cn_enable_metric=true
+cn_enable_performance_stat=false
+cn_metric_reporter_list=PROMETHEUS
+cn_metric_frame_type=MICROMETER
+cn_metric_level=CORE
+cn_metric_async_collect_period=5
+cn_metric_prometheus_reporter_port=9091
\ No newline at end of file
diff --git a/confignode/src/test/resources/confignode2conf/iotdb-confignode-metric.yml b/confignode/src/test/resources/confignode2conf/iotdb-confignode-metric.yml
deleted file mode 100644
index 6e8adbc779..0000000000
--- a/confignode/src/test/resources/confignode2conf/iotdb-confignode-metric.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# 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.
-#
-
-# whether enable the module
-enableMetric: true
-
-# Is stat performance of operation latency
-enablePerformanceStat: false
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-  - JMX
-  - PROMETHEUS
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: IMPORTANT
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9093
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
diff --git a/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties b/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
index 3db341089a..d824a2aa5c 100644
--- a/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
+++ b/confignode/src/test/resources/confignode2conf/iotdb-confignode.properties
@@ -23,4 +23,12 @@ cn_consensus_port=22280
 cn_target_config_node_list=127.0.0.1:22277
 cn_system_dir=target/confignode2/system
 cn_data_dirs=target/confignode2/data
-cn_consensus_dir=target/confignode2/consensus
\ No newline at end of file
+cn_consensus_dir=target/confignode2/consensus
+
+cn_enable_metric=true
+cn_enable_performance_stat=false
+cn_metric_reporter_list=PROMETHEUS
+cn_metric_frame_type=MICROMETER
+cn_metric_level=CORE
+cn_metric_async_collect_period=5
+cn_metric_prometheus_reporter_port=9093
\ No newline at end of file
diff --git a/confignode/src/test/resources/confignode3conf/iotdb-confignode-metric.yml b/confignode/src/test/resources/confignode3conf/iotdb-confignode-metric.yml
deleted file mode 100644
index e44518bfb6..0000000000
--- a/confignode/src/test/resources/confignode3conf/iotdb-confignode-metric.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# 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.
-#
-
-# whether enable the module
-enableMetric: true
-
-# Is stat performance of operation latency
-enablePerformanceStat: false
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-  - JMX
-  - PROMETHEUS
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: IMPORTANT
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9095
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
diff --git a/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties b/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
index c79e26c78b..bf3caa1bfa 100644
--- a/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
+++ b/confignode/src/test/resources/confignode3conf/iotdb-confignode.properties
@@ -23,4 +23,12 @@ cn_consensus_port=22282
 cn_target_config_node_list=127.0.0.1:22277
 cn_system_dir=target/confignode3/system
 cn_data_dirs=target/confignode3/data
-cn_consensus_dir=target/confignode3/consensus
\ No newline at end of file
+cn_consensus_dir=target/confignode3/consensus
+
+cn_enable_metric=true
+cn_enable_performance_stat=false
+cn_metric_reporter_list=PROMETHEUS
+cn_metric_frame_type=MICROMETER
+cn_metric_level=CORE
+cn_metric_async_collect_period=5
+cn_metric_prometheus_reporter_port=9095
\ No newline at end of file
diff --git a/distribution/src/assembly/all.xml b/distribution/src/assembly/all.xml
index 99c039ec5b..ebd9852be9 100644
--- a/distribution/src/assembly/all.xml
+++ b/distribution/src/assembly/all.xml
@@ -58,18 +58,6 @@
             <outputDirectory>conf</outputDirectory>
             <directory>${maven.multiModuleProjectDirectory}/node-commons/src/assembly/resources/conf</directory>
         </fileSet>
-        <fileSet>
-            <outputDirectory>conf</outputDirectory>
-            <directory>${maven.multiModuleProjectDirectory}/metrics/interface/src/main/assembly/resources/conf</directory>
-        </fileSet>
-        <fileSet>
-            <outputDirectory>conf</outputDirectory>
-            <directory>${maven.multiModuleProjectDirectory}/metrics/interface/src/main/assembly/resources/conf</directory>
-        </fileSet>
-        <fileSet>
-            <outputDirectory>grafana-metrics-example</outputDirectory>
-            <directory>${maven.multiModuleProjectDirectory}/grafana-metrics-example</directory>
-        </fileSet>
         <fileSet>
             <outputDirectory>sbin</outputDirectory>
             <directory>${maven.multiModuleProjectDirectory}/server/src/assembly/resources/sbin</directory>
diff --git a/distribution/src/assembly/confignode.xml b/distribution/src/assembly/confignode.xml
index 993cf7f3b4..1f3ca1bdd1 100644
--- a/distribution/src/assembly/confignode.xml
+++ b/distribution/src/assembly/confignode.xml
@@ -61,12 +61,6 @@
         <!--      <fileMode>0755</fileMode>-->
         <!--    </fileSet>-->
     </fileSets>
-    <files>
-        <file>
-            <source>${maven.multiModuleProjectDirectory}/metrics/interface/src/main/assembly/resources/conf/iotdb-confignode-metric.yml</source>
-            <destName>conf/iotdb-confignode-metric.yml</destName>
-        </file>
-    </files>
     <componentDescriptors>
         <componentDescriptor>common-files.xml</componentDescriptor>
     </componentDescriptors>
diff --git a/distribution/src/assembly/datanode.xml b/distribution/src/assembly/datanode.xml
index c7f07f271a..ee2554e54b 100644
--- a/distribution/src/assembly/datanode.xml
+++ b/distribution/src/assembly/datanode.xml
@@ -46,10 +46,6 @@
             <outputDirectory>conf</outputDirectory>
             <directory>${maven.multiModuleProjectDirectory}/node-commons/src/assembly/resources/conf</directory>
         </fileSet>
-        <fileSet>
-            <outputDirectory>grafana-metrics-example</outputDirectory>
-            <directory>${maven.multiModuleProjectDirectory}/grafana-metrics-example</directory>
-        </fileSet>
         <fileSet>
             <outputDirectory>sbin</outputDirectory>
             <directory>${maven.multiModuleProjectDirectory}/server/src/assembly/resources/sbin</directory>
@@ -82,10 +78,6 @@
             <destName>conf/datanode-env.sh</destName>
             <fileMode>0755</fileMode>
         </file>
-        <file>
-            <source>${maven.multiModuleProjectDirectory}/metrics/interface/src/main/assembly/resources/conf/iotdb-datanode-metric.yml</source>
-            <destName>conf/iotdb-datanode-metric.yml</destName>
-        </file>
     </files>
     <componentDescriptors>
         <componentDescriptor>common-files.xml</componentDescriptor>
diff --git a/docs/UserGuide/Monitor-Alert/Metric-Tool.md b/docs/UserGuide/Monitor-Alert/Metric-Tool.md
index 0f9c1dddd4..7f4bd41753 100644
--- a/docs/UserGuide/Monitor-Alert/Metric-Tool.md
+++ b/docs/UserGuide/Monitor-Alert/Metric-Tool.md
@@ -22,7 +22,7 @@
 
 Currently, users can use various methods to monitor the running IoTDB process, including using Java's Jconsole tool to monitor the system status of the running IoTDB process, using the interface developed by IoTDB for users to view data statistics, and using the monitor framework to monitor the system status of the running IoTDB process.
 
-# 1. Monitor Framework
+# 1. Metric Framework
 
 Along with IoTDB running, some metrics reflecting current system's status will be collected continuously, which will provide some useful information helping us resolving system problems and detecting potential system risks.
 
@@ -252,48 +252,38 @@ Next, we will choose Prometheus format data as samples to describe each kind of
 
 ## 1.4. How to get these metrics?
 
-The metrics collection switch is disabled by default,you need to enable it from ```conf/iotdb-{datanode/confignode}-metric.yml```, Currently, it also supports hot loading via `load configuration` after startup.
+The relevant configuration of the metric module is in `conf/iotdb-{datanode/confignode}.properties`, and all configuration items support hot loading through the `load configuration` command.
 
-### 1.4.1. Iotdb-metric.yml
+### 1.4.1. Config File
 
-```yaml
-# whether enable the module
-enableMetric: false
-
-# Is stat performance of operation latency
-enablePerformanceStat: false
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-  - JMX
-  - PROMETHEUS
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: IMPORTANT
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9091
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
+Take DataNode as example:
+
+```properties
+# Whether enable metric module
+# Datatype: boolean
+dn_enable_metric=true
+
+# The reporters of metric module to report metrics
+# If there are more than one reporter, please separate them by commas ",".
+# Options: [JMX, PROMETHEUS, IOTDB]
+# Datatype: String
+dn_metric_reporter_list=JMX,PROMETHEUS
+
+# The level of metric module
+# Options: [Core, Important, Normal, All]
+# Datatype: String
+dn_metric_level=CORE
+
+# The port of prometheus reporter of metric module
+# Datatype: int
+dn_metric_prometheus_reporter_port=9091
 ```
 
 Then you can get metrics data as follows
 
-1. Enable metrics switch in ```iotdb-{datanode/confignode}-metric.yml```
-2. You can just stay other config params as default.
-3. Start/Restart your IoTDB server/cluster
-4. Open your browser or use the ```curl``` command to request ```http://servier_ip:9091/metrics```,then you will get metrics data like follows:
+1. Modify parameters above in config file
+2. Start/Restart your IoTDB
+3. Open your browser or use the ```curl``` command to request ```http://servier_ip:9091/metrics```,then you will get metrics data like follows:
 
 ```
 ...
@@ -499,8 +489,8 @@ The performance monitoring module is used to monitor the time-consuming of each
 ## 4.2. Configuration parameter
 
 - location
-  - datanode:conf/iotdb-datanode-metric.yml
-  - confignode:conf/iotdb-confignode-metric.yml
+  - datanode:conf/iotdb-datanode.properties
+  - confignode:conf/iotdb-confignode.properties
 
 <center>
 
diff --git a/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md b/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md
index 5902062276..83b5f229db 100644
--- a/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md
+++ b/docs/zh/UserGuide/Monitor-Alert/Metric-Tool.md
@@ -252,48 +252,35 @@ IoTDB对外提供JMX和Prometheus格式的监控指标,对于JMX,可以通
 
 ## 1.4. 怎样获取这些系统监控指标?
 
-metric采集默认是关闭的,需要先到```conf/iotdb-{datanode/confignode}-metric.yml中打开后启动server,目前也支持启动后,通过`load configuration`热加载。
+监控模块的相关配置均在`conf/iotdb-{datanode/confignode}.properties`中,所有配置项支持通过`load configuration`命令热加载。
 
 ### 1.4.1. 配置文件
-
-```yaml
-# 是否启动监控模块,默认为false
-enableMetric: false
-
-# 是否启用操作延迟统计
-enablePerformanceStat: false
-
-# 数据提供方式,对外部通过jmx和prometheus协议提供metrics的数据, 可选参数:[JMX, PROMETHEUS, IOTDB], IOTDB是默认关闭的。
-metricReporterList:
-  - JMX
-  - PROMETHEUS
-
-# 底层使用的metric架构,可选参数:[MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# 初始化metric的级别,可选参数: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: IMPORTANT
-
-# Prometheus Reporter 使用的端口
-prometheusExporterPort: 9091
-
-# IoTDB Reporter相关的配置
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
+以DataNode为例
+
+```properties
+# Whether enable metric module
+# Datatype: boolean
+dn_enable_metric=true
+
+# The reporters of metric module to report metrics
+# If there are more than one reporter, please separate them by commas ",".
+# Options: [JMX, PROMETHEUS, IOTDB]
+# Datatype: String
+dn_metric_reporter_list=JMX,PROMETHEUS
+
+# The level of metric module
+# Options: [Core, Important, Normal, All]
+# Datatype: String
+dn_metric_level=CORE
+
+# The port of prometheus reporter of metric module
+# Datatype: int
+dn_metric_prometheus_reporter_port=9091
 ```
 
-然后按照下面的操作获取监控指标数据
-
-1. 打开配置文件中的metric开关
-2. 其他参数使用默认配置即可
-3. 启动IoTDB
-4. 打开浏览器或者用```curl``` 访问 ```http://servier_ip:9091/metrics```, 就能看到metric数据了:
+1. 在配置文件中修改如上配置
+2. 启动IoTDB
+3. 打开浏览器或者用```curl``` 访问 ```http://servier_ip:9091/metrics```, 就能看到metric数据了:
 
 ```
 ...
@@ -496,8 +483,8 @@ static_configs:
 ## 4.2. 配置参数
 
 - 配置文件位置
-  - datanode:conf/iotdb-datanode-metric.yml
-  - confignode:conf/iotdb-confignode-metric.yml
+  - datanode:conf/iotdb-datanode.properties
+  - confignode:conf/iotdb-confignode.properties
 
 <center>
 
diff --git a/metrics/ReadMe.md b/metrics/ReadMe.md
index 81b7305946..724729c670 100644
--- a/metrics/ReadMe.md
+++ b/metrics/ReadMe.md
@@ -96,20 +96,21 @@ System.setProperty("line.separator", "\n");
 System.setProperty("IOTDB_CONF", "metrics/dropwizard-metrics/src/test/resources");
 ```
 
-2. Then, you can modify `iotdb-metric.yml` as you like, some details:
-
-| properties                 | meaning                                                                                | example                             |
-| -------------------------- | -------------------------------------------------------------------------------------- | ----------------------------------- |
-| enableMetric               | whether enable the module                                                              | true                                |
-| enablePerformanceStat      | Is stat performance of operation latency                                               | true                                |
-| metricReporterList         | the list of reporter                                                                   | JMX, PROMETHEUS, IOTDB              |
-| monitorType                | The type of metric manager                                                             | DROPWIZARD, MICROMETER              |
-| metricLevel                | the init level of metrics                                                              | ALL, NORMAL, IMPORTANT, CORE        |
-| asyncCollectPeriodInSecond | The period of the collection of some metrics in asynchronous way, such as tsfile size. | 5                                   |
-| pushPeriodInSecond         | the period time of push(used for prometheus, unit: s)                                  | 5                                   |
+2. Then, you can modify `iotdb-datanode.properties(iotdb-confignode.properties)` as you like, some details:
+
+| properties                             | meaning                                                                                | example                             |
+|----------------------------------------| -------------------------------------------------------------------------------------- | ----------------------------------- |
+| dn(cn)_enable_metric                   | whether enable the module                                                              | true                                |
+| dn(cn)_enable_performance_stat         | Is stat performance of operation latency                                               | true                                |
+| dn(cn)_metric_reporter_list            | the list of reporter                                                                   | JMX, PROMETHEUS, IOTDB              |
+| dn(cn)_metric_frame_type               | The type of metric manager                                                             | DROPWIZARD, MICROMETER              |
+| dn(cn)_metric_level                    | the init level of metrics                                                              | ALL, NORMAL, IMPORTANT, CORE        |
+| dn(cn)_metric_async_collect_period     | The period of the collection of some metrics in asynchronous way, such as tsfile size. | 5                                   |
+
+3. More details, see User Doc.
 
 ## 3.2. Use Guide in IoTDB Server Module
-1. Now, MetricService is registered as IService in server and confignode module, you can simple set properties: `enableMetric: true` to use metric service.
+1. Now, MetricService is registered as IService in server and confignode module, you can simple set properties: `dn(cn)_enable_metric=true` to use metric service.
 2. In server module you can easily use these metric by `MetricService.getInstance()`, for example:
 
 ```java
@@ -120,11 +121,11 @@ MetricService.getInstance().count(1, "operation_count", MetricLevel.IMPORTANT, "
 1. implement your MetricService
    1. You need to implement `reloadProperties` to reload properties when running.
 2. implement your MetricManager
-   1. The name of MetricManager should start with `monitorType`, MetricService will init manager according to the prefix of class name.
+   1. The name of MetricManager should start with `metricFrameType`, MetricService will init manager according to the prefix of class name.
    2. You need to create `src/main/resources/META-INF/services/org.apache.iotdb.metrics.AbstractMetricManager`,and record your MetricManager class name in this file, such as `org.apache.iotdb.metrics.dropwizard.DropwizardMetricManager`
 3. implement your reporter
    1. You need to implement jmx reporter and prometheus reporter, notice that your jmx bean name should be unified as `org.apache.iotdb.metrics`
-   2. The name of your reporter should also start with `monitorType`
+   2. The name of your reporter should also start with `metricFrameType`
    3. You need to create `src/main/resources/META-INF/services/org.apache.iotdb.metrics.Reporter`,and record your MetricManager class name in this file, such as `org.apache.iotdb.metrics.dropwizard.reporter.DropwizardPrometheusReporter`
 4. implement your specific metric
    1. They are counter, gauge, histogram, histogramSnapshot, rate and timer.
diff --git a/metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/DropwizardPrometheusReporter.java b/metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/DropwizardPrometheusReporter.java
index 88183f7bef..9065468dac 100644
--- a/metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/DropwizardPrometheusReporter.java
+++ b/metrics/dropwizard-metrics/src/main/java/org/apache/iotdb/metrics/dropwizard/reporter/DropwizardPrometheusReporter.java
@@ -51,7 +51,7 @@ public class DropwizardPrometheusReporter implements Reporter {
     if (httpServer != null) {
       return false;
     }
-    int port = MetricConfigDescriptor.getInstance().getMetricConfig().getPrometheusExporterPort();
+    int port = MetricConfigDescriptor.getInstance().getMetricConfig().getPrometheusReporterPort();
     httpServer =
         HttpServer.create()
             .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 2000)
diff --git a/metrics/interface/src/main/assembly/resources/conf/iotdb-confignode-metric.yml b/metrics/interface/src/main/assembly/resources/conf/iotdb-confignode-metric.yml
deleted file mode 100644
index 7262a478da..0000000000
--- a/metrics/interface/src/main/assembly/resources/conf/iotdb-confignode-metric.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# 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.
-#
-
-# whether enable the module
-enableMetric: true
-
-# Is stat performance of operation latency
-enablePerformanceStat: false
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: CORE
-
-# The period of the collection of some metrics in asynchronous way, such as tsfile size.
-asyncCollectPeriodInSecond: 5
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9091
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
\ No newline at end of file
diff --git a/metrics/interface/src/main/assembly/resources/conf/iotdb-datanode-metric.yml b/metrics/interface/src/main/assembly/resources/conf/iotdb-datanode-metric.yml
deleted file mode 100644
index 7262a478da..0000000000
--- a/metrics/interface/src/main/assembly/resources/conf/iotdb-datanode-metric.yml
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# 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.
-#
-
-# whether enable the module
-enableMetric: true
-
-# Is stat performance of operation latency
-enablePerformanceStat: false
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: CORE
-
-# The period of the collection of some metrics in asynchronous way, such as tsfile size.
-asyncCollectPeriodInSecond: 5
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9091
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
\ No newline at end of file
diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricService.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricService.java
index eac64480ae..9040e85093 100644
--- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricService.java
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricService.java
@@ -110,7 +110,7 @@ public abstract class AbstractMetricService {
 
   /** Load metric manager according to configuration */
   private void loadManager() {
-    logger.info("Load metricManager, type: {}", metricConfig.getMonitorType());
+    logger.info("Load metricManager, type: {}", metricConfig.getMetricFrameType());
     ServiceLoader<AbstractMetricManager> metricManagers =
         ServiceLoader.load(AbstractMetricManager.class);
     int size = 0;
@@ -119,7 +119,7 @@ public abstract class AbstractMetricService {
       if (mf.getClass()
           .getName()
           .toLowerCase()
-          .contains(metricConfig.getMonitorType().name().toLowerCase())) {
+          .contains(metricConfig.getMetricFrameType().name().toLowerCase())) {
         metricManager = mf;
         break;
       }
@@ -146,7 +146,7 @@ public abstract class AbstractMetricService {
               .getClass()
               .getName()
               .toLowerCase()
-              .contains(metricConfig.getMonitorType().name().toLowerCase())) {
+              .contains(metricConfig.getMetricFrameType().name().toLowerCase())) {
         reporter.setMetricManager(metricManager);
         compositeReporter.addReporter(reporter);
       }
diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfig.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfig.java
index 311b3238ed..ec470f456f 100644
--- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfig.java
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfig.java
@@ -19,10 +19,11 @@
 
 package org.apache.iotdb.metrics.config;
 
+import org.apache.iotdb.metrics.utils.MetricFrameType;
 import org.apache.iotdb.metrics.utils.MetricLevel;
-import org.apache.iotdb.metrics.utils.MonitorType;
 import org.apache.iotdb.metrics.utils.ReporterType;
 
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
@@ -35,7 +36,7 @@ public class MetricConfig {
   private Boolean enablePerformanceStat = false;
 
   /** The type of the implementation of metric service */
-  private MonitorType monitorType = MonitorType.MICROMETER;
+  private MetricFrameType metricFrameType = MetricFrameType.MICROMETER;
 
   /** The list of reporters provide data for external system */
   private List<ReporterType> metricReporterList = Collections.emptyList();
@@ -46,7 +47,7 @@ public class MetricConfig {
   private Integer asyncCollectPeriodInSecond = 5;
 
   /** The http server's port for prometheus reporter to get metric data. */
-  private Integer prometheusExporterPort = 9091;
+  private Integer prometheusReporterPort = 9091;
 
   /** The config for iotdb reporter to push metric data */
   private IoTDBReporterConfig ioTDBReporterConfig = new IoTDBReporterConfig();
@@ -153,11 +154,12 @@ public class MetricConfig {
 
   public void copy(MetricConfig newMetricConfig) {
     enableMetric = newMetricConfig.getEnableMetric();
-    monitorType = newMetricConfig.getMonitorType();
+    enablePerformanceStat = newMetricConfig.getEnablePerformanceStat();
+    metricFrameType = newMetricConfig.getMetricFrameType();
     metricReporterList = newMetricConfig.getMetricReporterList();
     metricLevel = newMetricConfig.getMetricLevel();
     asyncCollectPeriodInSecond = newMetricConfig.getAsyncCollectPeriodInSecond();
-    prometheusExporterPort = newMetricConfig.getPrometheusExporterPort();
+    prometheusReporterPort = newMetricConfig.getPrometheusReporterPort();
     ioTDBReporterConfig = newMetricConfig.ioTDBReporterConfig;
   }
 
@@ -182,20 +184,25 @@ public class MetricConfig {
     this.enablePerformanceStat = enablePerformanceStat;
   }
 
-  public MonitorType getMonitorType() {
-    return monitorType;
+  public MetricFrameType getMetricFrameType() {
+    return metricFrameType;
   }
 
-  public void setMonitorType(MonitorType monitorType) {
-    this.monitorType = monitorType;
+  public void setMetricFrameType(MetricFrameType metricFrameType) {
+    this.metricFrameType = metricFrameType;
   }
 
   public List<ReporterType> getMetricReporterList() {
     return metricReporterList;
   }
 
-  public void setMetricReporterList(List<ReporterType> metricReporterList) {
-    this.metricReporterList = metricReporterList;
+  public void setMetricReporterList(String metricReporterList) {
+    this.metricReporterList = new ArrayList<>();
+    for (String type : metricReporterList.split(",")) {
+      if (type.trim().length() != 0) {
+        this.metricReporterList.add(ReporterType.valueOf(type));
+      }
+    }
   }
 
   public MetricLevel getMetricLevel() {
@@ -214,12 +221,12 @@ public class MetricConfig {
     this.asyncCollectPeriodInSecond = asyncCollectPeriodInSecond;
   }
 
-  public Integer getPrometheusExporterPort() {
-    return prometheusExporterPort;
+  public Integer getPrometheusReporterPort() {
+    return prometheusReporterPort;
   }
 
-  public void setPrometheusExporterPort(Integer prometheusExporterPort) {
-    this.prometheusExporterPort = prometheusExporterPort;
+  public void setPrometheusReporterPort(Integer prometheusReporterPort) {
+    this.prometheusReporterPort = prometheusReporterPort;
   }
 
   public IoTDBReporterConfig getIoTDBReporterConfig() {
@@ -245,11 +252,11 @@ public class MetricConfig {
     }
     MetricConfig anotherMetricConfig = (MetricConfig) obj;
     return enableMetric.equals(anotherMetricConfig.getEnableMetric())
-        && monitorType.equals(anotherMetricConfig.getMonitorType())
+        && metricFrameType.equals(anotherMetricConfig.getMetricFrameType())
         && metricReporterList.equals(anotherMetricConfig.getMetricReporterList())
         && metricLevel.equals(anotherMetricConfig.getMetricLevel())
         && asyncCollectPeriodInSecond.equals(anotherMetricConfig.getAsyncCollectPeriodInSecond())
-        && prometheusExporterPort.equals(anotherMetricConfig.getPrometheusExporterPort())
+        && prometheusReporterPort.equals(anotherMetricConfig.getPrometheusReporterPort())
         && ioTDBReporterConfig.equals(anotherMetricConfig.getIoTDBReporterConfig());
   }
 }
diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfigDescriptor.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfigDescriptor.java
index 2dd2396b45..9fa981753b 100644
--- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfigDescriptor.java
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConfigDescriptor.java
@@ -19,17 +19,15 @@
 
 package org.apache.iotdb.metrics.config;
 
+import org.apache.iotdb.metrics.utils.MetricFrameType;
+import org.apache.iotdb.metrics.utils.MetricLevel;
+import org.apache.iotdb.metrics.utils.ReporterType;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.yaml.snakeyaml.Yaml;
-import org.yaml.snakeyaml.constructor.Constructor;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.ArrayList;
+import java.util.Properties;
+import java.util.stream.Collectors;
 
 /** The utils class to load configure. Read from yaml file. */
 public class MetricConfigDescriptor {
@@ -38,38 +36,12 @@ public class MetricConfigDescriptor {
   private final MetricConfig metricConfig;
 
   private MetricConfigDescriptor() {
-    metricConfig = loadProps();
+    metricConfig = new MetricConfig();
   }
 
-  /**
-   * load property file into metric config. Use default values if not find.
-   *
-   * @return metric config
-   */
-  public MetricConfig loadProps() {
-    MetricConfig metricConfig;
-    String url = getPropsUrl();
-    Constructor constructor = new Constructor(MetricConfig.class);
-    Yaml yaml = new Yaml(constructor);
-    if (url != null) {
-      try (InputStream inputStream = Files.newInputStream(Paths.get(url))) {
-        logger.info("Start to read config file {}", url);
-        metricConfig = yaml.load(inputStream);
-      } catch (IOException e) {
-        logger.warn(
-            "Fail to find config file : {} because of {}, use default config.",
-            url,
-            e.getMessage());
-        metricConfig = new MetricConfig();
-      }
-    } else {
-      logger.warn("Fail to find config file, use default config.");
-      metricConfig = new MetricConfig();
-    }
-    if (null == metricConfig.getMetricReporterList()) {
-      metricConfig.setMetricReporterList(new ArrayList<>());
-    }
-    return metricConfig;
+  public void loadProps(Properties properties) {
+    MetricConfig loadConfig = generateFromProperties(properties);
+    metricConfig.copy(loadConfig);
   }
 
   /**
@@ -77,10 +49,10 @@ public class MetricConfigDescriptor {
    *
    * @return reload level of metric service
    */
-  public ReloadLevel loadHotProps() {
-    MetricConfig newMetricConfig = loadProps();
+  public ReloadLevel loadHotProps(Properties properties) {
+    MetricConfig newMetricConfig = generateFromProperties(properties);
     ReloadLevel reloadLevel = ReloadLevel.NOTHING;
-    if (newMetricConfig != null && !metricConfig.equals(newMetricConfig)) {
+    if (!metricConfig.equals(newMetricConfig)) {
       if (!metricConfig.getEnableMetric().equals(newMetricConfig.getEnableMetric())) {
         // start service or stop service.
         reloadLevel =
@@ -89,7 +61,7 @@ public class MetricConfigDescriptor {
                 : ReloadLevel.STOP_METRIC;
       } else if (metricConfig.getEnableMetric()) {
         // restart reporters or restart service
-        if (!metricConfig.getMonitorType().equals(newMetricConfig.getMonitorType())
+        if (!metricConfig.getMetricFrameType().equals(newMetricConfig.getMetricFrameType())
             || !metricConfig.getMetricLevel().equals(newMetricConfig.getMetricLevel())
             || !metricConfig
                 .getAsyncCollectPeriodInSecond()
@@ -104,56 +76,94 @@ public class MetricConfigDescriptor {
     return reloadLevel;
   }
 
-  /** get the path of metric config file. */
-  private String getPropsUrl() {
-    // first, try to get conf folder of standalone iotdb or datanode
-    String url = System.getProperty(MetricConstant.IOTDB_CONF, null);
-    if (url == null) {
-      // try to get conf folder from IOTDB_HOME
-      url = System.getProperty(MetricConstant.IOTDB_HOME, null);
-      if (url != null) {
-        url += File.separator + "conf";
-      }
-    }
+  /** load properties into metric config */
+  private MetricConfig generateFromProperties(Properties properties) {
+    MetricConfig loadConfig = new MetricConfig();
+    loadConfig.setEnableMetric(
+        Boolean.parseBoolean(
+            getProperty(
+                "enable_metric", String.valueOf(loadConfig.getEnableMetric()), properties)));
 
-    if (url == null) {
-      logger.warn(
-          "Cannot find IOTDB_CONF environment variable when loading "
-              + "config file {}, use default configuration",
-          MetricConstant.DATANODE_CONFIG_NAME);
-    } else {
-      url += (File.separatorChar + MetricConstant.DATANODE_CONFIG_NAME);
-      if (new File(url).exists()) {
-        return url;
-      } else {
-        url = null;
-      }
-    }
+    loadConfig.setEnablePerformanceStat(
+        Boolean.parseBoolean(
+            getProperty(
+                "enable_performance_stat",
+                String.valueOf(loadConfig.getEnablePerformanceStat()),
+                properties)));
 
-    // second, try to get conf folder of confignode
-    if (url == null) {
-      url = System.getProperty(MetricConstant.CONFIGNODE_CONF, null);
-      if (url == null) {
-        // try to get conf folder from CONFIGNODE_HOME
-        url = System.getProperty(MetricConstant.CONFIGNODE_HOME, null);
-        if (url != null) {
-          url += File.separator + "conf";
-        }
-      }
-    }
+    String reporterList =
+        getProperty(
+            "metric_reporter_list",
+            String.join(
+                ",",
+                loadConfig.getMetricReporterList().stream()
+                    .map(ReporterType::toString)
+                    .collect(Collectors.toSet())),
+            properties);
+    loadConfig.setMetricReporterList(reporterList);
 
-    // finally, return null when not find
-    if (url == null) {
-      logger.warn(
-          "Cannot find CONFIGNODE_CONF environment variable when loading "
-              + "config file {}, use default configuration",
-          MetricConstant.CONFIG_NODE_CONFIG_NAME);
-      return null;
-    } else {
-      url += (File.separatorChar + MetricConstant.CONFIG_NODE_CONFIG_NAME);
-    }
+    loadConfig.setMetricFrameType(
+        MetricFrameType.valueOf(
+            getProperty(
+                "metric_frame_type", String.valueOf(loadConfig.getMetricFrameType()), properties)));
+
+    loadConfig.setMetricLevel(
+        MetricLevel.valueOf(
+            getProperty("metric_level", String.valueOf(loadConfig.getMetricLevel()), properties)));
+
+    loadConfig.setAsyncCollectPeriodInSecond(
+        Integer.parseInt(
+            getProperty(
+                "metric_async_collect_period",
+                String.valueOf(loadConfig.getAsyncCollectPeriodInSecond()),
+                properties)));
+
+    loadConfig.setPrometheusReporterPort(
+        Integer.parseInt(
+            getProperty(
+                "metric_prometheus_reporter_port",
+                String.valueOf(loadConfig.getPrometheusReporterPort()),
+                properties)));
+
+    MetricConfig.IoTDBReporterConfig reporterConfig = loadConfig.getIoTDBReporterConfig();
+    reporterConfig.setHost(
+        getProperty("iotdb_reporter_host", reporterConfig.getHost(), properties));
+
+    reporterConfig.setPort(
+        Integer.valueOf(
+            getProperty(
+                "iotdb_reporter_port", String.valueOf(reporterConfig.getPort()), properties)));
+
+    reporterConfig.setUsername(
+        getProperty("iotdb_reporter_username", reporterConfig.getUsername(), properties));
+
+    reporterConfig.setPassword(
+        getProperty("iotdb_reporter_password", reporterConfig.getPassword(), properties));
+
+    reporterConfig.setMaxConnectionNumber(
+        Integer.valueOf(
+            getProperty(
+                "iotdb_reporter_max_connection_number",
+                String.valueOf(reporterConfig.getMaxConnectionNumber()),
+                properties)));
+
+    reporterConfig.setLocation(
+        getProperty("iotdb_reporter_location", reporterConfig.getLocation(), properties));
+
+    reporterConfig.setPushPeriodInSecond(
+        Integer.valueOf(
+            getProperty(
+                "iotdb_reporter_push_period",
+                String.valueOf(reporterConfig.getPushPeriodInSecond()),
+                properties)));
+
+    return loadConfig;
+  }
 
-    return url;
+  /** Try to get property from confignode or datanode */
+  private String getProperty(String target, String defaultValue, Properties properties) {
+    return properties.getProperty(
+        "dn_" + target, properties.getProperty("cn_" + target, defaultValue));
   }
 
   private static class MetricConfigDescriptorHolder {
diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConstant.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConstant.java
deleted file mode 100644
index 8398d92385..0000000000
--- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/config/MetricConstant.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.
- */
-
-package org.apache.iotdb.metrics.config;
-
-public class MetricConstant {
-
-  private MetricConstant() {}
-
-  static final String IOTDB_CONF = "IOTDB_CONF";
-
-  static final String IOTDB_HOME = "IOTDB_HOME";
-
-  static final String CONFIGNODE_CONF = "CONFIGNODE_CONF";
-
-  static final String CONFIGNODE_HOME = "CONFIGNODE_HOME";
-
-  static final String DATANODE_CONFIG_NAME = "iotdb-datanode-metric.yml";
-
-  static final String CONFIG_NODE_CONFIG_NAME = "iotdb-confignode-metric.yml";
-}
diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MonitorType.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MetricFrameType.java
similarity index 96%
rename from metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MonitorType.java
rename to metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MetricFrameType.java
index 956b19a5b8..472c9b119a 100644
--- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MonitorType.java
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/utils/MetricFrameType.java
@@ -19,7 +19,7 @@
 
 package org.apache.iotdb.metrics.utils;
 
-public enum MonitorType {
+public enum MetricFrameType {
   DROPWIZARD,
   MICROMETER;
 
diff --git a/metrics/interface/src/test/java/org/apache/iotdb/metrics/config/MetricConfigTest.java b/metrics/interface/src/test/java/org/apache/iotdb/metrics/config/MetricConfigTest.java
index 1fb2edd3af..d275a04a35 100644
--- a/metrics/interface/src/test/java/org/apache/iotdb/metrics/config/MetricConfigTest.java
+++ b/metrics/interface/src/test/java/org/apache/iotdb/metrics/config/MetricConfigTest.java
@@ -19,17 +19,15 @@
 
 package org.apache.iotdb.metrics.config;
 
+import org.apache.iotdb.metrics.utils.MetricFrameType;
 import org.apache.iotdb.metrics.utils.MetricLevel;
-import org.apache.iotdb.metrics.utils.MonitorType;
 
-import org.junit.Assert;
 import org.junit.Test;
-import org.yaml.snakeyaml.Yaml;
-import org.yaml.snakeyaml.constructor.Constructor;
 
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -37,35 +35,50 @@ import static org.junit.Assert.assertTrue;
 public class MetricConfigTest {
 
   @Test
-  public void testYamlConfig() {
-    String url = this.getClass().getClassLoader().getResource("iotdb-metric.yml").getPath();
+  public void testConfig() {
+    List<String> prefixes = Arrays.asList("cn_", "dn_");
+    List<Properties> propertiesList = new ArrayList<>();
+    for (String prefix : prefixes) {
+      Properties properties = new Properties();
+      properties.setProperty(prefix + "enable_metric", "true");
+      properties.setProperty(prefix + "enable_performance_stat", "true");
+      properties.setProperty(prefix + "metric_reporter_list", "JMX,PROMETHEUS,IOTDB");
+      properties.setProperty(prefix + "metric_frame_type", "DROPWIZARD");
+      properties.setProperty(prefix + "metric_level", "ALL");
+      properties.setProperty(prefix + "metric_async_collect_period", "10");
+      properties.setProperty(prefix + "metric_prometheus_reporter_port", "9090");
+      properties.setProperty(prefix + "iotdb_reporter_host", "0.0.0.0");
+      properties.setProperty(prefix + "iotdb_reporter_port", "6669");
+      properties.setProperty(prefix + "iotdb_reporter_username", "user");
+      properties.setProperty(prefix + "iotdb_reporter_password", "password");
+      properties.setProperty(prefix + "iotdb_reporter_max_connection_number", "1");
+      properties.setProperty(prefix + "iotdb_reporter_location", "metric");
+      properties.setProperty(prefix + "iotdb_reporter_push_period", "5");
 
-    MetricConfig metricConfig = MetricConfigDescriptor.getInstance().getMetricConfig();
-    Constructor constructor = new Constructor(MetricConfig.class);
-    Yaml yaml = new Yaml(constructor);
-    if (url != null) {
-      try (InputStream inputStream = new FileInputStream(url)) {
-        metricConfig = (MetricConfig) yaml.load(inputStream);
-      } catch (IOException e) {
-        Assert.fail();
-      }
+      propertiesList.add(properties);
     }
 
-    assertTrue(metricConfig.getEnableMetric());
-    assertTrue(metricConfig.getEnablePerformanceStat());
-    assertEquals(3, metricConfig.getMetricReporterList().size());
-    assertEquals(MonitorType.DROPWIZARD, metricConfig.getMonitorType());
-    assertEquals(MetricLevel.ALL, metricConfig.getMetricLevel());
-    assertEquals(10, (int) metricConfig.getAsyncCollectPeriodInSecond());
-    assertEquals(9090, (int) metricConfig.getPrometheusExporterPort());
+    for (Properties properties : propertiesList) {
+      MetricConfigDescriptor.getInstance().loadProps(properties);
 
-    MetricConfig.IoTDBReporterConfig reporterConfig = metricConfig.getIoTDBReporterConfig();
-    assertEquals("0.0.0.0", reporterConfig.getHost());
-    assertEquals(6669, (int) reporterConfig.getPort());
-    assertEquals("user", reporterConfig.getUsername());
-    assertEquals("password", reporterConfig.getPassword());
-    assertEquals(1, (int) reporterConfig.getMaxConnectionNumber());
-    assertEquals("metric", reporterConfig.getLocation());
-    assertEquals(5, (int) reporterConfig.getPushPeriodInSecond());
+      MetricConfig metricConfig = MetricConfigDescriptor.getInstance().getMetricConfig();
+
+      assertTrue(metricConfig.getEnableMetric());
+      assertTrue(metricConfig.getEnablePerformanceStat());
+      assertEquals(3, metricConfig.getMetricReporterList().size());
+      assertEquals(MetricFrameType.DROPWIZARD, metricConfig.getMetricFrameType());
+      assertEquals(MetricLevel.ALL, metricConfig.getMetricLevel());
+      assertEquals(10, (int) metricConfig.getAsyncCollectPeriodInSecond());
+      assertEquals(9090, (int) metricConfig.getPrometheusReporterPort());
+
+      MetricConfig.IoTDBReporterConfig reporterConfig = metricConfig.getIoTDBReporterConfig();
+      assertEquals("0.0.0.0", reporterConfig.getHost());
+      assertEquals(6669, (int) reporterConfig.getPort());
+      assertEquals("user", reporterConfig.getUsername());
+      assertEquals("password", reporterConfig.getPassword());
+      assertEquals(1, (int) reporterConfig.getMaxConnectionNumber());
+      assertEquals("metric", reporterConfig.getLocation());
+      assertEquals(5, (int) reporterConfig.getPushPeriodInSecond());
+    }
   }
 }
diff --git a/metrics/interface/src/test/resources/iotdb-metric.yml b/metrics/interface/src/test/resources/iotdb-metric.yml
deleted file mode 100644
index 8887afc6c1..0000000000
--- a/metrics/interface/src/test/resources/iotdb-metric.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# 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.
-#
-
-# whether enable the module
-enableMetric: true
-
-# Is stat performance of operation latency
-enablePerformanceStat: true
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-  - JMX
-  - PROMETHEUS
-  - IOTDB
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: DROPWIZARD
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: ALL
-
-# The period of the collection of some metrics in asynchronous way, such as tsfile size.
-asyncCollectPeriodInSecond: 10
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9090
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 0.0.0.0
-  port: 6669
-  username: user
-  password: password
-  maxConnectionNumber: 1
-  location: metric
-  pushPeriodInSecond: 5
\ No newline at end of file
diff --git a/metrics/micrometer-metrics/src/main/java/org/apache/iotdb/metrics/micrometer/reporter/MicrometerPrometheusReporter.java b/metrics/micrometer-metrics/src/main/java/org/apache/iotdb/metrics/micrometer/reporter/MicrometerPrometheusReporter.java
index 752e70cc4a..aca7b22a1a 100644
--- a/metrics/micrometer-metrics/src/main/java/org/apache/iotdb/metrics/micrometer/reporter/MicrometerPrometheusReporter.java
+++ b/metrics/micrometer-metrics/src/main/java/org/apache/iotdb/metrics/micrometer/reporter/MicrometerPrometheusReporter.java
@@ -71,7 +71,7 @@ public class MicrometerPrometheusReporter implements Reporter {
         HttpServer.create()
             .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 2000)
             .channelGroup(new DefaultChannelGroup(GlobalEventExecutor.INSTANCE))
-            .port(metricConfig.getPrometheusExporterPort())
+            .port(metricConfig.getPrometheusReporterPort())
             .route(
                 routes ->
                     routes.get(
@@ -80,7 +80,7 @@ public class MicrometerPrometheusReporter implements Reporter {
                             response.sendString(Mono.just(prometheusMeterRegistry.scrape()))))
             .bindNow();
     LOGGER.info(
-        "http server for metrics started, listen on {}", metricConfig.getPrometheusExporterPort());
+        "http server for metrics started, listen on {}", metricConfig.getPrometheusReporterPort());
     return true;
   }
 
diff --git a/server/src/assembly/resources/conf/iotdb-datanode.properties b/server/src/assembly/resources/conf/iotdb-datanode.properties
index 019be9bad9..f0bffd4806 100644
--- a/server/src/assembly/resources/conf/iotdb-datanode.properties
+++ b/server/src/assembly/resources/conf/iotdb-datanode.properties
@@ -159,3 +159,68 @@ dn_target_config_node_list=127.0.0.1:22277
 # If its prefix is "/", then the path is absolute. Otherwise, it is relative.
 # dn_sync_dir=data/datanode/sync
 
+####################
+### Metric Configuration
+####################
+
+# Whether enable metric module
+# Datatype: boolean
+# dn_enable_metric=true
+
+# Whether statistic operation performance
+# Datatype: boolean
+# dn_enable_performance_stat=false
+
+# The reporters of metric module to report metrics
+# If there are more than one reporter, please separate them by commas ",".
+# Options: [JMX, PROMETHEUS, IOTDB]
+# Datatype: String
+# dn_metric_reporter_list=
+
+# The type of metric framework which manage metrics
+# Options: [MICROMETER, DROPWIZARD]
+# Datatype: String
+# dn_metric_frame_type=MICROMETER
+
+# The level of metric module
+# Options: [Core, Important, Normal, All]
+# Datatype: String
+# dn_metric_level=CORE
+
+# The period of async collection of some metrics in second
+# Datatype: int
+# dn_metric_async_collect_period=5
+
+# The port of prometheus reporter of metric module
+# Datatype: int
+# dn_metric_prometheus_reporter_port=9091
+
+# The host of IoTDB reporter of metric module
+# Could set 127.0.0.1(for local test) or ipv4 address
+# Datatype: String
+# dn_metric_iotdb_reporter_host=127.0.0.1
+
+# The port of IoTDB reporter of metric module
+# Datatype: int
+# dn_metric_iotdb_reporter_port=6667
+
+# The username of IoTDB reporter of metric module
+# Datatype: String
+# dn_metric_iotdb_reporter_username=root
+
+# The password of IoTDB reporter of metric module
+# Datatype: String
+# dn_metric_iotdb_reporter_password=root
+
+# The max connection number of IoTDB reporter of metric module
+# Datatype: int
+# dn_metric_iotdb_reporter_max_connection_number=3
+
+# The location of IoTDB reporter of metric module
+# The metrics will write into root.__system.${location}
+# Datatype: String
+# dn_metric_iotdb_reporter_location=metric
+
+# The push period of IoTDB reporter of metric module in second
+# Datatype: int
+# dn_metric_iotdb_reporter_push_period=15
\ No newline at end of file
diff --git a/server/src/assembly/server.xml b/server/src/assembly/server.xml
index 39f66a62da..71e885c285 100644
--- a/server/src/assembly/server.xml
+++ b/server/src/assembly/server.xml
@@ -38,10 +38,6 @@
         </fileSet>
     </fileSets>
     <files>
-        <file>
-            <source>${maven.multiModuleProjectDirectory}/metrics/interface/src/main/assembly/resources/conf/iotdb-datanode-metric.yml</source>
-            <destName>conf/iotdb-datanode-metric.yml</destName>
-        </file>
         <file>
             <source>${maven.multiModuleProjectDirectory}/node-commons/src/assembly/resources/conf/iotdb-common.properties</source>
             <destName>conf/iotdb-common.properties</destName>
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
index dfd82a5ee0..640fa96767 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
@@ -186,6 +186,7 @@ public class IoTDBDescriptor {
         // update all data seriesPath
         conf.updatePath();
         commonDescriptor.getConfig().updatePath(System.getProperty(IoTDBConstant.IOTDB_HOME, null));
+        MetricConfigDescriptor.getInstance().loadProps(commonProperties);
         MetricConfigDescriptor.getInstance()
             .getMetricConfig()
             .updateRpcInstance(conf.getRpcAddress(), conf.getRpcPort());
@@ -1535,7 +1536,7 @@ public class IoTDBDescriptor {
       throw new QueryProcessException(
           String.format("Fail to reload config file %s because %s", url, e.getMessage()));
     }
-    ReloadLevel reloadLevel = MetricConfigDescriptor.getInstance().loadHotProps();
+    ReloadLevel reloadLevel = MetricConfigDescriptor.getInstance().loadHotProps(commonProperties);
     MetricService.getInstance().reloadProperties(reloadLevel);
   }
 
diff --git a/server/src/test/java/org/apache/iotdb/db/metric/MetricServiceTest.java b/server/src/test/java/org/apache/iotdb/db/metric/MetricServiceTest.java
index a034e2d0d5..77352671e8 100644
--- a/server/src/test/java/org/apache/iotdb/db/metric/MetricServiceTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/metric/MetricServiceTest.java
@@ -29,9 +29,9 @@ import org.apache.iotdb.metrics.type.Gauge;
 import org.apache.iotdb.metrics.type.Histogram;
 import org.apache.iotdb.metrics.type.Rate;
 import org.apache.iotdb.metrics.type.Timer;
+import org.apache.iotdb.metrics.utils.MetricFrameType;
 import org.apache.iotdb.metrics.utils.MetricLevel;
 import org.apache.iotdb.metrics.utils.MetricType;
-import org.apache.iotdb.metrics.utils.MonitorType;
 
 import org.junit.Test;
 
@@ -54,10 +54,10 @@ public class MetricServiceTest {
 
   @Test
   public void testMetricService() {
-    for (MonitorType type : MonitorType.values()) {
+    for (MetricFrameType type : MetricFrameType.values()) {
       // init metric service
       metricConfig.setEnableMetric(true);
-      metricConfig.setMonitorType(type);
+      metricConfig.setMetricFrameType(type);
       metricConfig.setMetricLevel(MetricLevel.IMPORTANT);
       metricService = new DoNothingMetricService();
       metricService.startService();
diff --git a/server/src/test/resources/datanode1conf/iotdb-datanode-metric.yml b/server/src/test/resources/datanode1conf/iotdb-datanode-metric.yml
deleted file mode 100644
index 26559e999e..0000000000
--- a/server/src/test/resources/datanode1conf/iotdb-datanode-metric.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# 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.
-#
-
-# whether enable the module
-enableMetric: true
-
-# Is stat performance of operation latency
-enablePerformanceStat: false
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-  - JMX
-  - PROMETHEUS
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: IMPORTANT
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9097
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
diff --git a/server/src/test/resources/datanode1conf/iotdb-datanode.properties b/server/src/test/resources/datanode1conf/iotdb-datanode.properties
index 87f10978bf..1f385ef5ff 100644
--- a/server/src/test/resources/datanode1conf/iotdb-datanode.properties
+++ b/server/src/test/resources/datanode1conf/iotdb-datanode.properties
@@ -34,3 +34,11 @@ dn_wal_dirs=target/datanode1/wal
 dn_tracing_dir=target/datanode1/data/tracing
 dn_consensus_dir=target/datanode1/consensus
 dn_sync_dir=target/datanode1/sync
+
+dn_enable_metric=true
+dn_enable_performance_stat=false
+dn_metric_reporter_list=PROMETHEUS
+dn_metric_frame_type=MICROMETER
+dn_metric_level=CORE
+dn_metric_async_collect_period=5
+dn_metric_prometheus_reporter_port=9097
\ No newline at end of file
diff --git a/server/src/test/resources/datanode2conf/iotdb-datanode-metric.yml b/server/src/test/resources/datanode2conf/iotdb-datanode-metric.yml
deleted file mode 100644
index 6491d67811..0000000000
--- a/server/src/test/resources/datanode2conf/iotdb-datanode-metric.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# 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.
-#
-
-# whether enable the module
-enableMetric: true
-
-# Is stat performance of operation latency
-enablePerformanceStat: false
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-  - JMX
-  - PROMETHEUS
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: IMPORTANT
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9099
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
diff --git a/server/src/test/resources/datanode2conf/iotdb-datanode.properties b/server/src/test/resources/datanode2conf/iotdb-datanode.properties
index 591713bd0c..b0775e88eb 100644
--- a/server/src/test/resources/datanode2conf/iotdb-datanode.properties
+++ b/server/src/test/resources/datanode2conf/iotdb-datanode.properties
@@ -34,3 +34,11 @@ dn_wal_dirs=target/datanode2/wal
 dn_tracing_dir=target/datanode2/data/tracing
 dn_consensus_dir=target/datanode2/consensus
 dn_sync_dir=target/datanode2/sync
+
+dn_enable_metric=true
+dn_enable_performance_stat=false
+dn_metric_reporter_list=PROMETHEUS
+dn_metric_frame_type=MICROMETER
+dn_metric_level=CORE
+dn_metric_async_collect_period=5
+dn_metric_prometheus_reporter_port=9099
diff --git a/server/src/test/resources/datanode3conf/iotdb-datanode-metric.yml b/server/src/test/resources/datanode3conf/iotdb-datanode-metric.yml
deleted file mode 100644
index b82fa3faa5..0000000000
--- a/server/src/test/resources/datanode3conf/iotdb-datanode-metric.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# 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.
-#
-
-# whether enable the module
-enableMetric: true
-
-# Is stat performance of operation latency
-enablePerformanceStat: false
-
-# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default
-metricReporterList:
-  - JMX
-  - PROMETHEUS
-
-# Type of monitor frame, options: [MICROMETER, DROPWIZARD]
-monitorType: MICROMETER
-
-# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]
-metricLevel: IMPORTANT
-
-# The http server's port for prometheus exporter to get metric data.
-prometheusExporterPort: 9101
-
-# The config of iotdb reporter
-ioTDBReporterConfig:
-  host: 127.0.0.1
-  port: 6667
-  username: root
-  password: root
-  maxConnectionNumber: 3
-  location: metric
-  pushPeriodInSecond: 15
diff --git a/server/src/test/resources/datanode3conf/iotdb-datanode.properties b/server/src/test/resources/datanode3conf/iotdb-datanode.properties
index 11cf8c4bd5..e295344219 100644
--- a/server/src/test/resources/datanode3conf/iotdb-datanode.properties
+++ b/server/src/test/resources/datanode3conf/iotdb-datanode.properties
@@ -33,4 +33,12 @@ dn_data_dirs=target/datanode3/data
 dn_wal_dirs=target/datanode3/wal
 dn_tracing_dir=target/datanode3/data/tracing
 dn_consensus_dir=target/datanode3/consensus
-dn_sync_dir=target/datanode3/sync
\ No newline at end of file
+dn_sync_dir=target/datanode3/sync
+
+dn_enable_metric=true
+dn_enable_performance_stat=false
+dn_metric_reporter_list=PROMETHEUS
+dn_metric_frame_type=MICROMETER
+dn_metric_level=CORE
+dn_metric_async_collect_period=5
+dn_metric_prometheus_reporter_port=9101
\ No newline at end of file