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

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


The following commit(s) were added to refs/heads/master by this push:
     new 48c13b8f8 [doc] update iotdb init document (#1948)
48c13b8f8 is described below

commit 48c13b8f87675a03d1cd675fba99ae4e4a43b561
Author: Jast <[email protected]>
AuthorDate: Thu May 9 22:59:53 2024 +0800

    [doc] update iotdb init document (#1948)
    
    Co-authored-by: zhangshenghang <[email protected]>
    Co-authored-by: zhangshenghang <[email protected]>
    Co-authored-by: crossoverJie <[email protected]>
    Co-authored-by: yqxxgh <[email protected]>
    Co-authored-by: Ceilzcx <[email protected]>
    Co-authored-by: aias00 <[email protected]>
    Co-authored-by: tomsun28 <[email protected]>
---
 home/docs/start/iotdb-init.md                      | 86 +++++++++++++++++-----
 .../current/start/iotdb-init.md                    | 83 ++++++++++++++++-----
 2 files changed, 130 insertions(+), 39 deletions(-)

diff --git a/home/docs/start/iotdb-init.md b/home/docs/start/iotdb-init.md
index f7796bd35..cb54c1bed 100644
--- a/home/docs/start/iotdb-init.md
+++ b/home/docs/start/iotdb-init.md
@@ -1,31 +1,33 @@
 ---
 id: iotdb-init  
 title: Use Time Series Database IoTDB to Store Metrics Data (Optional)  
-sidebar_label: Use IoTDB Store Metrics 
+sidebar_label: Use IoTDB Store Metrics
 ---
-
 Apache HertzBeat (incubating)'s historical data storage relies on the time 
series database, you can choose one of them to install and initialize, or not 
to install (note ⚠️ but it is strongly recommended to configure in the 
production environment)
 
 > It is recommended to use VictoriaMetrics as metrics storage.
 
-Apache IoTDB is a software system that integrates the collection, storage, 
management and analysis of time series data of the Internet of Things. We use 
it to store and analyze the historical data of monitoring metrics collected. 
Support V0.13+ version and V1.0.+ version.  
+Apache IoTDB is a software system that integrates the collection, storage, 
management and analysis of time series data of the Internet of Things. We use 
it to store and analyze the historical data of monitoring metrics collected. 
Support V0.13+ version and V1.0.+ version.
 
-**Note⚠️ Time series database is optional, but production environment 
configuration is strongly recommended to provide more complete historical chart 
functions and high performance**   
-**⚠️ If you do not configure a time series database, only the last hour of 
historical data is retained.**  
+**Note⚠️ Time series database is optional, but production environment 
configuration is strongly recommended to provide more complete historical chart 
functions and high performance**
 
-> If you already have an IoTDB environment, you can skip directly to the YML 
configuration step.  
+**⚠️ If you do not configure a time series database, only the last hour of 
historical data is retained.**
 
+> If you already have an IoTDB environment, you can skip directly to the YML 
configuration step.
 
 ### Install IoTDB via Docker
+
 > Refer to the official website [installation 
 > tutorial](https://iotdb.apache.org/UserGuide/V0.13.x/QuickStart/WayToGetIoTDB.html)
-1. Download and install Docker environment   
+
+1. Download and install Docker environment
    Docker tools download refer to [Docker official 
document](https://docs.docker.com/get-docker/).
    After the installation you can check if the Docker version normally output 
at the terminal.
+
    ```
    $ docker -v
    Docker version 20.10.12, build e91ed57
    ```
-2. Install IoTDB via Docker  
+2. Install IoTDB via Docker
 
 ```shell
 $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \
@@ -34,14 +36,14 @@ $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \
     apache/iotdb:1.2.2-standalone
 ```
 
-   `-v /opt/iotdb/data:/iotdb/data` is local persistent mount of IotDB data 
directory.`/iotdb/data` should be replaced with the actual local directory.
-   use```$ docker ps``` to check if the database started successfully
+`-v /opt/iotdb/data:/iotdb/data` is local persistent mount of IotDB data 
directory.`/iotdb/data` should be replaced with the actual local directory.
+use```$ docker ps``` to check if the database started successfully
 
-3. Configure the database connection in hertzbeat 
`application.yml`configuration file 
+3. Configure the database connection in hertzbeat 
`application.yml`configuration file
 
-   Modify `hertzbeat/config/application.yml` configuration file     
-   Note⚠️The docker container way need to mount application.yml file locally, 
while you can use installation package way to unzip and modify 
`hertzbeat/config/application.yml`      
-   Config the `warehouse.store.jpa.enabled` `false`. Replace 
`warehouse.store.iot-db` data source parameters, HOST account and password.  
+   Modify `hertzbeat/config/application.yml` configuration file
+   Note⚠️The docker container way need to mount application.yml file locally, 
while you can use installation package way to unzip and modify 
`hertzbeat/config/application.yml`
+   Config the `warehouse.store.jpa.enabled` `false`. Replace 
`warehouse.store.iot-db` data source parameters, HOST account and password.
 
 ```
 warehouse:
@@ -63,18 +65,62 @@ warehouse:
       expire-time: '7776000000'
 ```
 
-4. Restart HertzBeat   
+**IoTDB Cluster Configuration**
+
+If you are using IoTDB for clustering, please refer to the configuration below:
+
+```yaml
+warehouse:
+  store:
+    # Disable default JPA
+    jpa:
+      enabled: false
+    # Enable IoTDB
+    iot-db:
+      enabled: true
+      node-urls: ['127.0.0.1:6667','127.0.0.2:6667','127.0.0.3:6667']
+      username: root
+      password: root
+      # V_0_13 || V_1_0
+      version: V_1_0
+      # if iotdb version >= 0.13 use default queryTimeoutInMs = -1; else use 
default queryTimeoutInMs = 0
+      query-timeout-in-ms: -1
+      # Data storage time: default '7776000000' (90 days, in milliseconds, -1 
means never expire)
+      expire-time: '7776000000'
+```
+
+Configuration parameters:
+
 
-### FAQ   
+| Parameter Name      | Description                                            
                                   |
+| ------------------- | 
-----------------------------------------------------------------------------------------
 |
+| enabled             | Whether to enable                                      
                                   |
+| host                | IoTDB database address                                 
                                   |
+| rpc-port            | IoTDB database port                                    
                                   |
+| node-urls           | IoTDB cluster addresses                                
                                   |
+| username            | IoTDB database account                                 
                                   |
+| password            | IoTDB database password                                
                                   |
+| version             | IoTDB database version, V_0_13 or V_1_0                
                                   |
+| query-timeout-in-ms | Query timeout                                          
                                   |
+| expire-time         | Data storage time, default '7776000000' (90 days, in 
milliseconds, -1 means never expire) |
+
+> If both cluster configuration `node-urls` and standalone configuration are 
set simultaneously, the cluster `node-urls` configuration takes precedence.
+
+4. Restart HertzBeat
+
+### FAQ
 
 1. Do both the time series databases IoTDB and TDengine need to be configured? 
Can they both be used?
+
 > You don't need to configure all of them, you can choose one of them. Use the 
 > enable parameter to control whether it is used or not. You can also install 
 > and configure neither, which only affects the historical chart data.
 
 2. The historical chart of the monitoring page is not displayed, and pops up 
[Unable to provide historical chart data, please configure to rely on the time 
series database]
+
 > As shown in the pop-up window, the premise of displaying the history chart 
 > is to install and configure the dependent services of hertzbeat - IotDB 
 > database or TDengine database
 
 3. The TDengine database is installed and configured, but the page still 
displays a pop-up [Unable to provide historical chart data, please configure 
the dependent time series database]
-> Please check if the configuration parameters are correct  
-> Is td-engine enable set to true  
-> Note⚠️If both hertzbeat and TDengine are started under the same host for 
docker containers, 127.0.0.1 cannot be used for communication between 
containers by default, and the host IP is changed  
-> You can check the startup logs according to the logs directory  
+
+> Please check if the configuration parameters are correct
+> Is td-engine enable set to true
+> Note⚠️If both hertzbeat and TDengine are started under the same host for 
docker containers, 127.0.0.1 cannot be used for communication between 
containers by default, and the host IP is changed
+> You can check the startup logs according to the logs directory
diff --git 
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/iotdb-init.md 
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/iotdb-init.md
index 827b54e08..8d44d0c0a 100644
--- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/iotdb-init.md
+++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/iotdb-init.md
@@ -1,31 +1,33 @@
 ---
 id: iotdb-init  
-title: 依赖时序数据库服务IoTDB安装初始化        
-sidebar_label: 使用IoTDB存储指标数据(可选)    
+title: 依赖时序数据库服务IoTDB安装初始化  
+sidebar_label: 使用IoTDB存储指标数据(可选)
 ---
-
 Apache HertzBeat (incubating) 的历史数据存储依赖时序数据库,任选其一安装初始化即可,也可不安装(注意⚠️但强烈建议生产环境配置)
 
 > 我们推荐使用并长期支持 VictoriaMetrics 作为存储。
 
 Apache IoTDB是一体化收集、存储、管理与分析物联网时序数据的软件系统,我们使用其存储分析采集到的监控指标历史数据。支持V0.12 - 
V0.13版本,推荐使用V0.13.*版本。
 
-**注意⚠️ 时序数据库安装配置为可选项,但强烈建议生产环境配置,以提供更完善的历史图表功能,高性能和稳定性**   
-**⚠️ 若不配置时序数据库,则只会留最近一小时历史数据**  
+**注意⚠️ 时序数据库安装配置为可选项,但强烈建议生产环境配置,以提供更完善的历史图表功能,高性能和稳定性**
+
+**⚠️ 若不配置时序数据库,则只会留最近一小时历史数据**
 
 > 如果您已有IoTDB环境,可直接跳到YML配置那一步。
 
+### 通过Docker方式安装IoTDB
 
-### 通过Docker方式安装IoTDB 
-> 
可参考官方网站[安装教程](https://iotdb.apache.org/zh/UserGuide/V0.13.x/QuickStart/WayToGetIoTDB.html)
  
-1. 下载安装Docker环境   
+> 
可参考官方网站[安装教程](https://iotdb.apache.org/zh/UserGuide/V0.13.x/QuickStart/WayToGetIoTDB.html)
+
+1. 下载安装Docker环境
    Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。
-      安装完毕后终端查看Docker版本是否正常输出。
+   安装完毕后终端查看Docker版本是否正常输出。
+
    ```
    $ docker -v
    Docker version 20.10.12, build e91ed57
    ```
-2. Docker安装IoTDB  
+2. Docker安装IoTDB
 
 ```shell
 $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \
@@ -34,16 +36,16 @@ $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \
     apache/iotdb:1.2.2-standalone
 ```
 
-   `-v /opt/iotdb/data:/iotdb/data` 
为IoTDB数据目录本地持久化挂载,需将`/iotdb/data`替换为实际本地存在的目录
-   使用```$ docker ps```查看数据库是否启动成功
+`-v /opt/iotdb/data:/iotdb/data` 为IoTDB数据目录本地持久化挂载,需将`/iotdb/data`替换为实际本地存在的目录
+使用```$ docker ps```查看数据库是否启动成功
 
-3. 在hertzbeat的`application.yml`配置文件配置IoTDB数据库连接   
+3. 在hertzbeat的`application.yml`配置文件配置IoTDB数据库连接
 
-   配置HertzBeat的配置文件    
-   修改位于 `hertzbeat/config/application.yml` 的配置文件   
-   注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 
`hertzbeat/config/application.yml` 即可     
+   配置HertzBeat的配置文件
+   修改位于 `hertzbeat/config/application.yml` 的配置文件
+   注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 
`hertzbeat/config/application.yml` 即可
 
-**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 
配置`warehouse.store.iot-db`数据源参数,HOST账户密码等,并启用`enabled`为`true`**    
+**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 
配置`warehouse.store.iot-db`数据源参数,HOST账户密码等,并启用`enabled`为`true`**
 
 ```yaml
 warehouse:
@@ -66,17 +68,60 @@ warehouse:
       expire-time: '7776000000'
 ```
 
+**IoTDB集群版配置**
+如果您使用IoTDB为集群请参考下面配置
+
+```yaml
+warehouse:
+  store:
+    # 关闭默认JPA
+    jpa:
+      enabled: false
+    # 启用IotDB
+    iot-db:
+      enabled: true
+      node-urls: ['127.0.0.1:6667','127.0.0.2:6667','127.0.0.3:6667'']
+      username: root
+      password: root
+      # V_0_13 || V_1_0
+      version: V_1_0
+      # if iotdb version >= 0.13 use default queryTimeoutInMs = -1; else use 
default queryTimeoutInMs = 0
+      query-timeout-in-ms: -1
+      # 数据存储时间:默认'7776000000'(90天,单位为毫秒,-1代表永不过期)
+      expire-time: '7776000000'
+```
+
+参数说明:
+
+
+| 参数名称            | 参数说明                                                       
  |
+| ------------------- | 
---------------------------------------------------------------- |
+| enabled             | 是否启用                                                   
      |
+| host                | IoTDB数据库地址                                             
     |
+| rpc-port            | IoTDB数据库端口                                             
     |
+| node-urls           | IoTDB集群地址                                              
      |
+| username            | IoTDB数据库账户                                             
     |
+| password            | IoTDB数据库密码                                             
     |
+| version             | IoTDB数据库版本,V_0_13 、 V_1_0                              
   |
+| query-timeout-in-ms | 查询超时时间                                                 
    |
+| expire-time         | 数据存储时间,默认'7776000000'(90天,单位为毫秒,-1代表永不过期) |
+
+> 如果集群配置`node-urls`和单机配置同时设置,以集群`node-urls`配置稳准
+
 4. 重启 HertzBeat
 
-### 常见问题   
+### 常见问题
 
 1. 时序数据库IoTDB和TDengine是否都需要配置,能不能都用
+
 > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。
 
 2. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库]
+
 > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库
 
-3. 安装配置了IotDB数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] 
+3. 安装配置了IotDB数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库]
+
 > 请检查配置参数是否正确
 > iot-db enable是否设置为true
 > 注意⚠️若hertzbeat和IotDB都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to