Skip to content

Commit

Permalink
[IOTDB-5002] Move metric related config into properties file and modi…
Browse files Browse the repository at this point in the history
…fy distribution structure (apache#8096)
  • Loading branch information
SpriCoder authored Nov 23, 2022
1 parent b9e50cb commit 63182c1
Show file tree
Hide file tree
Showing 36 changed files with 436 additions and 756 deletions.
4 changes: 0 additions & 4 deletions confignode/src/assembly/confignode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
# 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
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ private void loadProps() {
commonDescriptor
.getConfig()
.updatePath(System.getProperty(ConfigNodeConstant.CONFIGNODE_HOME, null));
MetricConfigDescriptor.getInstance().loadProps(commonProperties);
MetricConfigDescriptor.getInstance()
.getMetricConfig()
.updateRpcInstance(conf.getInternalAddress(), conf.getInternalPort());
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
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
12 changes: 0 additions & 12 deletions distribution/src/assembly/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 0 additions & 6 deletions distribution/src/assembly/confignode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 0 additions & 8 deletions distribution/src/assembly/datanode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Loading

0 comments on commit 63182c1

Please sign in to comment.