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

zhaoqingran 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 2076693a1 [doc] help doc for mqtt (#2645)
2076693a1 is described below

commit 2076693a166940d76e2379de899d498cffd40bc1
Author: liutianyou <[email protected]>
AuthorDate: Sun Sep 1 17:37:11 2024 +0800

    [doc] help doc for mqtt (#2645)
---
 home/docs/help/guide.md                            |  1 +
 home/docs/help/mqtt.md                             | 44 ++++++++++++++++++++++
 .../current/help/guide.md                          |  1 +
 .../current/help/mqtt.md                           | 43 +++++++++++++++++++++
 home/sidebars.json                                 |  3 +-
 manager/src/main/resources/define/app-mqtt.yml     |  3 ++
 6 files changed, 94 insertions(+), 1 deletion(-)

diff --git a/home/docs/help/guide.md b/home/docs/help/guide.md
index 8728b7f8e..1b07c0424 100644
--- a/home/docs/help/guide.md
+++ b/home/docs/help/guide.md
@@ -23,6 +23,7 @@ sidebar_label: Help Center
 &emsp;&#x1F449;&emsp;[DNS monitoring](dns) <br />
 &emsp;&#x1F449;&emsp;[FTP monitoring](ftp) <br />
 &emsp;&#x1F449;&emsp;[Websocket monitoring](websocket) <br />
+&emsp;&#x1F449;&emsp;[MQTT connection monitoring](mqtt) <br />
 
 ### Program monitoring
 
diff --git a/home/docs/help/mqtt.md b/home/docs/help/mqtt.md
new file mode 100644
index 000000000..2843366d0
--- /dev/null
+++ b/home/docs/help/mqtt.md
@@ -0,0 +1,44 @@
+---
+id: mqtt
+title: Monitoring MQTT Connection
+sidebar_label: MQTT Connection
+keywords: [ Open Source Monitoring System, MQTT Connection Monitoring ]
+---
+
+> Monitor MQTT connection status, supporting MQTT5 and MQTT3.1.1 protocols.
+
+**Protocol used: mqtt**
+
+:::tip
+To check if topics can be subscribed to normally, HertzBeat will subscribe to 
a topic and then immediately unsubscribe; to verify if messages can be 
published correctly, HertzBeat will send a test
+message to a topic (if the test message parameter is empty, this check will 
not be performed).  
+Please ensure that these operations will not affect your system.
+:::
+
+### Configuration Parameters
+
+| Parameter Name         | Parameter Description                               
                                                                               |
+|------------------------|------------------------------------------------------------------------------------------------------------------------------------|
+| Target Host            | The monitored target's IPv4, IPv6, or domain name. 
Note ⚠️: Do not include protocol headers (e.g., https://, http://).             
|
+| Task Name              | The name of this monitoring task, which needs to be 
unique.                                                                        |
+| Port                   | The port where the MQTT service is open, default is 
1883.                                                                          |
+| Protocol Version       | The MQTT protocol version, supporting MQTT5 and 
MQTT3.1.1.                                                                      
   |
+| Connection Timeout(ms) | Connection timeout in milliseconds, default is 6000 
ms.                                                                            |
+| Client Id              | MQTT client ID, default is `hertzbeat-mqtt-client`. 
                                                                               |
+| Topic                  | The topic to be monitored.                          
                                                                               |
+| Test Message           | Message content used to test whether a topic can be 
published to normally (optional; if empty, `canPublish` will always be false). |
+| Username               | MQTT authentication username (optional).            
                                                                               |
+| Password               | MQTT authentication password (optional).            
                                                                               |
+| Intervals              | Interval for periodic data collection, in seconds; 
the minimum interval that can be set is 30 seconds.                             
|
+| Binding Tag            | Used for classification and management of 
monitoring resources.                                                           
         |
+| Description            | Additional notes to identify and describe this 
monitoring task, users can leave notes here.                                    
    |
+
+### Collected Metrics
+
+#### Metric Set: Summary
+
+| Metric Name  | Unit | Metric Description                                     
 |
+|--------------|------|---------------------------------------------------------|
+| responseTime | none | Response time                                          
 |
+| canPublish   | none | Whether messages can be published to the topic 
normally |
+| canSubscribe | none | Whether the topic can be subscribed to normally        
 |
diff --git 
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/guide.md 
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/guide.md
index 0b5bfada4..d0dacd5b6 100644
--- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/guide.md
+++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/guide.md
@@ -25,6 +25,7 @@ sidebar_label: 帮助入门
 &emsp;&#x1F449;&emsp;[DNS服务器](dns) <br />
 &emsp;&#x1F449;&emsp;[FTP服务器](ftp) <br />
 &emsp;&#x1F449;&emsp;[Websocket](websocket) <br />
+&emsp;&#x1F449;&emsp;[MQTT连接](mqtt) <br />
 
 ### 应用程序监控
 
diff --git 
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/mqtt.md 
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/mqtt.md
new file mode 100644
index 000000000..ade0bd0a0
--- /dev/null
+++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/mqtt.md
@@ -0,0 +1,43 @@
+---
+id: mqtt
+title: 监控:MQTT 连接
+sidebar_label: MQTT 连接
+keywords: [ 开源监控系统, MQTT连接监控 ]
+---
+
+> 对MQTT连接状态进行监控,支持 MQTT5 和 MQTT3.1.1 协议。
+
+**协议使用:mqtt**
+
+:::tip
+为了检测是否可以正常订阅主题,HertzBeat 会订阅主题,然后立即取消订阅;为了检测是否可以正常推送消息,HertzBeat 
会推送一条测试消息到主题(如果测试消息参数为空则不作检测)。
+请确保这些操作不会对你的系统产生影响。
+:::
+
+### 配置参数
+
+| 参数名称      | 参数帮助描述                                                  |
+|-----------|---------------------------------------------------------|
+| MQTT的Host | 被监控的对端 IPV4,IPV6 或域名。注意⚠️不带协议头(eg: https://, http://)。  |
+| 任务名称      | 标识此监控的名称,名称需要保证唯一性。                                     |
+| 端口        | MQTT 服务开放端口,默认为1883。                                    |
+| 协议版本      | MQTT 协议版本,支持 MQTT5 和 MQTT3.1.1。                         |
+| 连接超时时间    | 连接超时时间,单位ms毫秒,默认6000毫秒。                                 |
+| 客户端ID     | MQTT 客户端 ID,默认为 `hertzbeat-mqtt-client`。                |
+| 主题        | 监控的主题。                                                  |
+| 测试消息      | 测试主题是否可以正常推送消息使用的消息内容。(可选,如果为空则 `canPublish` 一直为false ) |
+| 用户名       | MQTT 认证用户名(可选)。                                         |
+| 密码        | MQTT 认证密码(可选)。                                          |
+| 采集间隔      | 监控周期性采集数据间隔时间,单位秒,可设置的最小间隔为30秒                          |
+| 绑定标签      | 用于对监控资源进行分类管理                                           |
+| 描述备注      | 更多标识和描述此监控的备注信息,用户可以在这里备注信息                             |
+
+### 采集指标
+
+#### 指标集合:概要
+
+| 指标名称         | 指标单位 | 指标帮助描述        |
+|--------------|------|---------------|
+| responseTime | 无    | 响应时间          |
+| canPublish   | 无    | 是否可以正常推送消息到主题 |
+| canDescribe  | 无    | 主题是否可以正常被订阅   |
diff --git a/home/sidebars.json b/home/sidebars.json
index 0b76a6d6d..67ca4d7f0 100755
--- a/home/sidebars.json
+++ b/home/sidebars.json
@@ -185,7 +185,8 @@
             "help/ntp",
             "help/dns",
             "help/ftp",
-            "help/websocket"
+            "help/websocket",
+            "help/mqtt"
           ]
         },
         {
diff --git a/manager/src/main/resources/define/app-mqtt.yml 
b/manager/src/main/resources/define/app-mqtt.yml
index c8f985327..3cfbe758a 100644
--- a/manager/src/main/resources/define/app-mqtt.yml
+++ b/manager/src/main/resources/define/app-mqtt.yml
@@ -26,6 +26,9 @@ help:
   zh-CN: HertzBeat 对 MQTT 连接进行监测。<br>您可以点击 “<i>新建 MQTT 连接</i>” 
并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
   en-US: HertzBeat monitors MQTT connections. <br>You can click "<i>New MQTT 
connection</i>" and configure it, or select "<i>More actions</i>" to import an 
existing configuration.
   zh-TW: HertzBeat 對 MQTT 連接進行監測。 <br>您可以點選 “<i>新建 MQTT 連線</i>” 
並進行配置,或選擇“<i>更多操作</i>”,匯入已有配置。
+helpLink:
+  zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/mqtt
+  en-US: https://hertzbeat.apache.org/docs/help/mqtt
 # Input params define for monitoring(render web ui by the definition)
 params:
   # field-param field key


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

Reply via email to