From 2b342fdf6a98b7ab0f69ef307ef221e3c801570a Mon Sep 17 00:00:00 2001 From: LiuTianyou Date: Sun, 1 Sep 2024 13:40:59 +0800 Subject: [PATCH 1/2] doc: help doc for mqtt --- home/docs/help/guide.md | 1 + home/docs/help/mqtt.md | 44 +++++++++++++++++++ .../current/help/guide.md | 2 + .../current/help/mqtt.md | 44 +++++++++++++++++++ home/sidebars.json | 3 +- .../src/main/resources/define/app-mqtt.yml | 3 ++ 6 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 home/docs/help/mqtt.md create mode 100644 home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/mqtt.md diff --git a/home/docs/help/guide.md b/home/docs/help/guide.md index 8728b7f8e37..1b07c0424bd 100644 --- a/home/docs/help/guide.md +++ b/home/docs/help/guide.md @@ -23,6 +23,7 @@ sidebar_label: Help Center  👉 [DNS monitoring](dns)
 👉 [FTP monitoring](ftp)
 👉 [Websocket monitoring](websocket)
+ 👉 [MQTT connection monitoring](mqtt)
### Program monitoring diff --git a/home/docs/help/mqtt.md b/home/docs/help/mqtt.md new file mode 100644 index 00000000000..2843366d0cc --- /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 0b5bfada4e7..d9737114d02 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,8 @@ sidebar_label: 帮助入门  👉 [DNS服务器](dns)
 👉 [FTP服务器](ftp)
 👉 [Websocket](websocket)
+ 👉 [MQTT连接](mqtt)
+ ### 应用程序监控 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 00000000000..0ffaea97aca --- /dev/null +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/mqtt.md @@ -0,0 +1,44 @@ +--- +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 0b76a6d6d52..67ca4d7f076 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 c8f98532777..3cfbe758a72 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 连接进行监测。
您可以点击 “新建 MQTT 连接” 并进行配置,或者选择“更多操作”,导入已有配置。 en-US: HertzBeat monitors MQTT connections.
You can click "New MQTT connection" and configure it, or select "More actions" to import an existing configuration. zh-TW: HertzBeat 對 MQTT 連接進行監測。
您可以點選 “新建 MQTT 連線” 並進行配置,或選擇“更多操作”,匯入已有配置。 +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 From 019ff38bc1c642acd64f1bc8da7772bff8d20cbe Mon Sep 17 00:00:00 2001 From: LiuTianyou Date: Sun, 1 Sep 2024 14:24:06 +0800 Subject: [PATCH 2/2] fix:ci --- .../zh-cn/docusaurus-plugin-content-docs/current/help/guide.md | 1 - .../zh-cn/docusaurus-plugin-content-docs/current/help/mqtt.md | 1 - 2 files changed, 2 deletions(-) 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 d9737114d02..d0dacd5b61d 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 @@ -27,7 +27,6 @@ sidebar_label: 帮助入门  👉 [Websocket](websocket)
 👉 [MQTT连接](mqtt)
- ### 应用程序监控  👉 [Linux进程](process)
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 index 0ffaea97aca..ade0bd0a049 100644 --- 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 @@ -41,4 +41,3 @@ keywords: [ 开源监控系统, MQTT连接监控 ] | responseTime | 无 | 响应时间 | | canPublish | 无 | 是否可以正常推送消息到主题 | | canDescribe | 无 | 主题是否可以正常被订阅 | -