diff --git a/.markdownlint-cli2.jsonc b/.markdownlint-cli2.jsonc index 1c5c7e73949..844b297a9d1 100644 --- a/.markdownlint-cli2.jsonc +++ b/.markdownlint-cli2.jsonc @@ -29,7 +29,7 @@ "siblings_only": true }, "MD025": true, - "MD029": false, + "MD029": true, "MD033": false, "MD036": false, "MD040": false, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8b88edf477d..d75b6de2042 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,23 +68,23 @@ Of course, if you have a good idea, you can also propose it directly on GitHub D 1. First you need to fork your target [hertzbeat repository](https://github.com/apache/hertzbeat). 2. Then download the code locally with git command: -```shell -git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended -``` + ```shell + git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended + ``` 3. After the download is complete, please refer to the getting started guide or README file of the target repository to initialize the project. 4. Then, you can refer to the following command to submit the code: -```shell -git checkout -b a-feature-branch #Recommended -``` + ```shell + git checkout -b a-feature-branch #Recommended + ``` 5. Submit the coed as a commit, the commit message format specification required: [module name or type name]feature or bugfix or doc: custom message. -```shell -git add -git commit -m '[docs]feature: necessary instructions' #Recommended -``` + ```shell + git add + git commit -m '[docs]feature: necessary instructions' #Recommended + ``` 6. Push to the remote repository -```shell -git push origin a-feature-branch -``` + ```shell + git push origin a-feature-branch + ``` 7. Then you can initiate a new PR (Pull Request) on GitHub. Please note that the title of the PR needs to conform to our spec, and write the necessary description in the PR to facilitate code review by Committers and other contributors. @@ -218,23 +218,23 @@ Add WeChat account `ahertzbeat` to pull you into the WeChat group. 1. 首先您需要 Fork 目标仓库 [hertzbeat repository](https://github.com/apache/hertzbeat). 2. 然后 用git命令 将代码下载到本地: -```shell -git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended -``` + ```shell + git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended + ``` 3. 下载完成后,请参考目标仓库的入门指南或者 README 文件对项目进行初始化。 4. 接着,您可以参考如下命令进行代码的提交, 切换新的分支, 进行开发: -```shell -git checkout -b a-feature-branch #Recommended -``` + ```shell + git checkout -b a-feature-branch #Recommended + ``` 5. 提交 commit , commit 描述信息需要符合约定格式: [module name or type name]feature or bugfix or doc: custom message. -```shell -git add -git commit -m '[docs]feature: necessary instructions' #Recommended -``` + ```shell + git add + git commit -m '[docs]feature: necessary instructions' #Recommended + ``` 6. 推送到远程仓库 -```shell -git push origin a-feature-branch -``` + ```shell + git push origin a-feature-branch + ``` 7. 然后您就可以在 GitHub 上发起新的 PR (Pull Request)。 请注意 PR 的标题需要符合我们的规范,并且在 PR 中写上必要的说明,来方便 Committer 和其他贡献者进行代码审查。 diff --git a/home/blog/2022-09-10-ssl-practice.md b/home/blog/2022-09-10-ssl-practice.md index 340a87b3149..aae58d34db2 100644 --- a/home/blog/2022-09-10-ssl-practice.md +++ b/home/blog/2022-09-10-ssl-practice.md @@ -28,7 +28,7 @@ gitee: 2. The `docker` environment can be installed with a single command -`docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` + `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` 3. Installation success browser visit `localhost:1157` to start, the default account password `admin/hertzbeat @@ -36,63 +36,63 @@ gitee: 1. Click Add SSL Certificate Monitor -> System Page -> Monitor Menu -> SSL Certificates -> New SSL Certificate + > System Page -> Monitor Menu -> SSL Certificates -> New SSL Certificate -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/bd53f343a5b54feab62e71458d076441~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/bd53f343a5b54feab62e71458d076441~tplv-k3u1fbpfcp-zoom-1.image) 2. Configure monitoring website -> Here is an example to monitor Baidu website, configure the host domain name, name, collection interval, etc. > Click OK. -> Click OK. Note that ⚠️ will test the connectivity of the website before adding it by default, and it will add it only if the connection is successful, of course, you can also gray out the **Whether to test** button. + > Here is an example to monitor Baidu website, configure the host domain name, name, collection interval, etc. > Click OK. + > Click OK. Note that ⚠️ will test the connectivity of the website before adding it by default, and it will add it only if the connection is successful, of course, you can also gray out the **Whether to test** button. -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ad1154670648413bb82c8bdeb5b13609~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ad1154670648413bb82c8bdeb5b13609~tplv-k3u1fbpfcp-zoom-1.image) 3. Viewing Test Indicator Data -> You can view the task status in the monitor list, and go into the monitor details to view the metrics data graphs etc. + > You can view the task status in the monitor list, and go into the monitor details to view the metrics data graphs etc. -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f874b45e909c4bb0acdd28b3fb034a61~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f874b45e909c4bb0acdd28b3fb034a61~tplv-k3u1fbpfcp-zoom-1.image) -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ef5d7443f8c04818ae5aa28d421203be~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ef5d7443f8c04818ae5aa28d421203be~tplv-k3u1fbpfcp-zoom-1.image) 4. Set the threshold (triggered when the certificate expires) -> System Page -> Alarms -> Alarm Thresholds -> Add Thresholds + > System Page -> Alarms -> Alarm Thresholds -> Add Thresholds -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/8d6205172d43463aa34e534477f132f1~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/8d6205172d43463aa34e534477f132f1~tplv-k3u1fbpfcp-zoom-1.image) -> Configure thresholds, select SSL certificate indicator object, configure alert expression - triggered when indicator `expired` is `true`, i.e. `equals(expired, "true")` , set alert level notification template message etc. + > Configure thresholds, select SSL certificate indicator object, configure alert expression - triggered when indicator `expired` is `true`, i.e. `equals(expired, "true")` , set alert level notification template message etc. -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/83d17b381d994f26a6240e01915b2001~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/83d17b381d994f26a6240e01915b2001~tplv-k3u1fbpfcp-zoom-1.image) -> Associate thresholds with monitors, set which monitors this threshold should be applied to in the threshold list. + > Associate thresholds with monitors, set which monitors this threshold should be applied to in the threshold list. -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/9b9063d7bcf9454387be0491fc382bd1~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/9b9063d7bcf9454387be0491fc382bd1~tplv-k3u1fbpfcp-zoom-1.image) 5. set the threshold (triggered one week before certificate expiration) -> Same as above, add a new configuration threshold, configure the alert expression - when the indicator validity timestamp `end_timestamp`, `now()` function for the current timestamp, if you configure to trigger the alert one week in advance i.e.: `end_timestamp <= (now() + 604800000)` , where `604800000` is the total time difference of 7 days. milliseconds. + > Same as above, add a new configuration threshold, configure the alert expression - when the indicator validity timestamp `end_timestamp`, `now()` function for the current timestamp, if you configure to trigger the alert one week in advance i.e.: `end_timestamp <= (now() + 604800000)` , where `604800000` is the total time difference of 7 days. milliseconds. -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0d6f837f57c247e09f668f60eff4a0ff~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0d6f837f57c247e09f668f60eff4a0ff~tplv-k3u1fbpfcp-zoom-1.image) -> Eventually you can see the triggered alarms in the alarm center. + > Eventually you can see the triggered alarms in the alarm center. -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5a61b23127524976b2c209ce0ca6a339~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5a61b23127524976b2c209ce0ca6a339~tplv-k3u1fbpfcp-zoom-1.image) 6. Alarm notification (timely notification via NailWeChatFlysheet, etc.) -> Monitoring System -> Alert Notification -> Add Recipients + > Monitoring System -> Alert Notification -> Add Recipients -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7f36956060ef410a82bbecafcbb2957f~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7f36956060ef410a82bbecafcbb2957f~tplv-k3u1fbpfcp-zoom-1.image) -You can refer to the help file for the token configuration of Nail WeChat Flying Book, etc. + You can refer to the help file for the token configuration of Nail WeChat Flying Book, etc. - - + + -> Alert Notification -> Add new alert notification policy -> Enable notification for the recipients you just configured + > Alert Notification -> Add new alert notification policy -> Enable notification for the recipients you just configured -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d976343e81f843138344a039f3aff8a3~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d976343e81f843138344a039f3aff8a3~tplv-k3u1fbpfcp-zoom-1.image) 7. OK When the threshold is triggered, we can receive the corresponding alarm message, if there is no notification, you can also view the alarm information in the alarm center. diff --git a/home/blog/2023-01-05-monitor-iotdb.md b/home/blog/2023-01-05-monitor-iotdb.md index 0f105d8fe53..6ab4d25f11e 100644 --- a/home/blog/2023-01-05-monitor-iotdb.md +++ b/home/blog/2023-01-05-monitor-iotdb.md @@ -31,15 +31,15 @@ tags: [opensource, practice] 1. The metric collection is disabled by default, you need to modify the parameters in `conf/iotdb-metric.yml` first, then restart the server -``` -# Whether to start the monitoring module, the default is false -enableMetric: true - -# Data provision method, externally provide metrics data through jmx and prometheus protocol, optional parameters: [JMX, PROMETHEUS, IOTDB], IOTDB is closed by default. -metricReporterList: - - JMX - - PROMETHEUS -``` + ```yaml + # Whether to start the monitoring module, the default is false + enableMetric: true + + # Data provision method, externally provide metrics data through jmx and prometheus protocol, optional parameters: [JMX, PROMETHEUS, IOTDB], IOTDB is closed by default. + metricReporterList: + - JMX + - PROMETHEUS + ``` 2. Restart IoTDB, open a browser or use curl to access , and you can see the metric data. @@ -47,28 +47,28 @@ metricReporterList: 1. Click Add IoTDB Monitoring -Path: Menu -> Database Monitoring -> IoTDB Monitoring -> Add IoTDB Monitoring + Path: Menu -> Database Monitoring -> IoTDB Monitoring -> Add IoTDB Monitoring -![hertzbeat](/img/blog/monitor-iotdb-1.png) + ![hertzbeat](/img/blog/monitor-iotdb-1.png) 2. Configure the parameters required for monitoring IoTDB -Fill in the IoTDB **service IP** and **monitoring port** (default 9091) on the monitoring page, and finally click OK to add. -For other parameters such as **collection interval**, **timeout period**, etc., please refer to [Help Documentation](https://hertzbeat.com/docs/help/iotdb/) /iotdb/ + Fill in the IoTDB **service IP** and **monitoring port** (default 9091) on the monitoring page, and finally click OK to add. + For other parameters such as **collection interval**, **timeout period**, etc., please refer to [Help Documentation](https://hertzbeat.com/docs/help/iotdb/) /iotdb/ -![hertzbeat](/img/blog/monitor-iotdb-2.png) + ![hertzbeat](/img/blog/monitor-iotdb-2.png) 3. Complete ✅, now we have added the monitoring of IoTDB, check the monitoring list to see our added items. -![hertzbeat](/img/blog/monitor-iotdb-3.png) + ![hertzbeat](/img/blog/monitor-iotdb-3.png) 4. Click **Operation**->**Monitoring Details Icon** of the monitoring list item to browse the real-time monitoring metric data of IoTDB. -![hertzbeat](/img/blog/monitor-iotdb-4.png) + ![hertzbeat](/img/blog/monitor-iotdb-4.png) 5. Click **Monitoring History Details TAB** to browse IoTDB's historical monitoring metric data chart📈. -![hertzbeat](/img/blog/monitor-iotdb-5.png) + ![hertzbeat](/img/blog/monitor-iotdb-5.png) **Complete DONE! Through the above steps, it is actually two steps to sum up** @@ -83,29 +83,29 @@ For other parameters such as **collection interval**, **timeout period**, etc., 1. Configure a threshold alarm for an important metric -Path: Menu -> Alarm Threshold -> Add Threshold + Path: Menu -> Alarm Threshold -> Add Threshold -- Select the configured metric object. IotDB monitors many metrics, one of which is related to the status of the node `cluster_node_status` -> `status` (node status, 1=online 2=offline). -- Here we configure to send an alarm when the metric `status==2`, the alarm level is **Critical Alarm**, which is triggered once, as shown in the figure below. + - Select the configured metric object. IotDB monitors many metrics, one of which is related to the status of the node `cluster_node_status` -> `status` (node status, 1=online 2=offline). + - Here we configure to send an alarm when the metric `status==2`, the alarm level is **Critical Alarm**, which is triggered once, as shown in the figure below. -![hertzbeat](/img/blog/monitor-iotdb-6.png) + ![hertzbeat](/img/blog/monitor-iotdb-6.png) 2. Add message notification recipients -Path: Menu -> Alarm Notification -> Alarm Recipient -> Add New Recipient + Path: Menu -> Alarm Notification -> Alarm Recipient -> Add New Recipient -Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example. + Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example. -- Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value. -- Configure the receiver parameters in HertzBeat as follows. + - Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value. + - Configure the receiver parameters in HertzBeat as follows. -【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】 + 【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. Configure the associated alarm notification strategy ⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK] -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### Finished, now wait for the warning message to come. ding ding ding ding diff --git a/home/blog/2023-01-08-monitor-shenyu.md b/home/blog/2023-01-08-monitor-shenyu.md index 37681ff86b8..c271fa9a231 100644 --- a/home/blog/2023-01-08-monitor-shenyu.md +++ b/home/blog/2023-01-08-monitor-shenyu.md @@ -42,27 +42,27 @@ tags: [opensource, practice] 1. Add the `metrics plugin` dependency to the `pom.xml` file of the gateway. -```xml - - org.apache.shenyu - shenyu-spring-boot-starter-plugin-metrics - ${project.version} - -``` + ```xml + + org.apache.shenyu + shenyu-spring-boot-starter-plugin-metrics + ${project.version} + + ``` 2. `metric` plugin Capture is turned off by default, edit the following in the gateway's configuration `yaml` file: -```yaml -shenyu: - metrics: - enabled: true #Set to true to enable - name: prometheus - host: 127.0.0.1 #exposed ip - port: 8090 #Exposed port - jmxConfig: #jmx configuration - props: #jvm_enabled: true - jvm_enabled: true #Enable monitoring metrics for jvm -``` + ```yaml + shenyu: + metrics: + enabled: true #Set to true to enable + name: prometheus + host: 127.0.0.1 #exposed ip + port: 8090 #Exposed port + jmxConfig: #jmx configuration + props: #jvm_enabled: true + jvm_enabled: true #Enable monitoring metrics for jvm + ``` 3. Restart ShenYu Gateway, open a browser or use curl to access `http://ip:8090`, you can see the metric data. @@ -70,30 +70,30 @@ shenyu: 1. Click Add ShenYu Monitor -Path: Menu -> Middleware Monitor -> ShenYu Monitor -> Add ShenYu Monitor + Path: Menu -> Middleware Monitor -> ShenYu Monitor -> Add ShenYu Monitor -![hertzbeat](/img/blog/monitor-shenyu-1.png) + ![hertzbeat](/img/blog/monitor-shenyu-1.png) 2. Configure the parameters required for monitoring ShenYu -On the monitor page, fill in ShenYu **service IP**, **monitor port** (default 8090), and click OK to add. -For other parameters such as **collection interval**, **timeout**, etc., you can refer to the [help file](https://hertzbeat.com/docs/help/shenyu/) + On the monitor page, fill in ShenYu **service IP**, **monitor port** (default 8090), and click OK to add. + For other parameters such as **collection interval**, **timeout**, etc., you can refer to the [help file](https://hertzbeat.com/docs/help/shenyu/) -![hertzbeat](/img/blog/monitor-shenyu-1.png) + ![hertzbeat](/img/blog/monitor-shenyu-1.png) 3. Done ✅, now we have added monitoring for ShenYu, check the monitor list to see our additions. -![hertzbeat](/img/blog/monitor-shenyu-3.png) + ![hertzbeat](/img/blog/monitor-shenyu-3.png) 4. Click **Options**->**Monitoring Details icon** in the monitor list to view ShenYu's real-time monitoring metrics. -![hertzbeat](/img/blog/monitor-shenyu-4.png) + ![hertzbeat](/img/blog/monitor-shenyu-4.png) 5. Click the **Monitor History TAB** to view ShenYu's historical monitoring metrics graphs 📈. -![hertzbeat](/img/blog/monitor-shenyu-5.png) + ![hertzbeat](/img/blog/monitor-shenyu-5.png) -![hertzbeat](/img/blog/monitor-shenyu-6.png) + ![hertzbeat](/img/blog/monitor-shenyu-6.png) **DONE! With the above steps, it's really only two steps** @@ -111,33 +111,33 @@ Of course, just looking at it is not perfect, monitoring is often accompanied by 1. Configure an alarm threshold for an important metric. -Path: Menu -> Alert Thresholds -> Add Thresholds + Path: Menu -> Alert Thresholds -> Add Thresholds -- There are a lot of metrics in ShenYu monitoring, for example, we will set the threshold for the `number of open file descriptors` `process_open_fds` -> `value` metric, which will alert you when the number of open file descriptors on the server side is greater than 3,000. -- Here we configure an alert to be issued when the `value' of`process_open_fds` exceeds 3000, with an alert level of **Warning alert**, which is triggered three times, as shown in the following figure. + - There are a lot of metrics in ShenYu monitoring, for example, we will set the threshold for the `number of open file descriptors` `process_open_fds` -> `value` metric, which will alert you when the number of open file descriptors on the server side is greater than 3,000. + - Here we configure an alert to be issued when the `value' of`process_open_fds` exceeds 3000, with an alert level of **Warning alert**, which is triggered three times, as shown in the following figure. -![hertzbeat](/img/blog/monitor-shenyu-7.png) + ![hertzbeat](/img/blog/monitor-shenyu-7.png) 2. Add message notification recipients -> Configure recipients to let alert message know who to send to and in what way. + > Configure recipients to let alert message know who to send to and in what way. -Path: Menu -> Alert Notification -> Alert Recipients -> Add New Recipient. + Path: Menu -> Alert Notification -> Alert Recipients -> Add New Recipient. -Message notification methods support **Email, Nail, WeChat, Flybook, WebHook, SMS**, etc. Here we take the commonly used Nail as an example. + Message notification methods support **Email, Nail, WeChat, Flybook, WebHook, SMS**, etc. Here we take the commonly used Nail as an example. -- Refer to this [help document](https://hertzbeat.com/docs/help/alert_dingtalk) Configure the bot on the pinning side, set the security customization keyword `HertzBeat`, get the corresponding `access_token` value. -- Configure the recipient parameters in HertzBeat as follows. + - Refer to this [help document](https://hertzbeat.com/docs/help/alert_dingtalk) Configure the bot on the pinning side, set the security customization keyword `HertzBeat`, get the corresponding `access_token` value. + - Configure the recipient parameters in HertzBeat as follows. -[Alert Notification] -> [Add Recipient] -> [Select Nailed Bot Notification Method] -> [Set Nailed Bot ACCESS_TOKEN] -> [OK] + [Alert Notification] -> [Add Recipient] -> [Select Nailed Bot Notification Method] -> [Set Nailed Bot ACCESS_TOKEN] -> [OK] -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. Configure the associated alert notification policy ⚠️ [Add Notification Policy] -> [Associate the recipient you just set] -> [OK] ! -> Configure the alert notification policy to bind alert messages to recipients so that you can decide which alerts go to which person. + > Configure the alert notification policy to bind alert messages to recipients so that you can decide which alerts go to which person. -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### Over and out, now wait for the alert message to come through. Ding, ding, ding, ding diff --git a/home/blog/2023-02-02-monitor-dynamic-tp.md b/home/blog/2023-02-02-monitor-dynamic-tp.md index 83980106d3c..9cc7d45a3ca 100644 --- a/home/blog/2023-02-02-monitor-dynamic-tp.md +++ b/home/blog/2023-02-02-monitor-dynamic-tp.md @@ -36,76 +36,76 @@ tags: [opensource, practice] 1. Enable the SpringBoot Actuator Endpoint to expose the `DynamicTp` metrics interface. -```yaml -management: - endpoints: - web: - exposure: - include: '*' -``` + ```yaml + management: + endpoints: + web: + exposure: + include: '*' + ``` 2. Reboot and test access to the metrics interface `ip:port/actuator/dynamic-tp` to see if it responds with json data as follows. -```json -[ - { - "poolName": "commonExecutor", - "corePoolSize": 1, - "maximumPoolSize": 1, - "queueType": "LinkedBlockingQueue", - "queueCapacity": 2147483647, - "queueSize": 0, - "fair": false, - "queueRemainingCapacity": 2147483647, - "activeCount": 0, - "taskCount": 0, - "completedTaskCount": 0, - "largestPoolSize": 0, - "poolSize": 0, - "waitTaskCount": 0, - "rejectCount": 0, - "rejectHandlerName": null, - "dynamic": false, - "runTimeoutCount": 0, - "queueTimeoutCount": 0 - }, - { - "maxMemory": "4 GB", - "totalMemory": "444 MB", - "freeMemory": "250.34 MB", - "usableMemory": "3.81 GB" - } -] -``` + ```json + [ + { + "poolName": "commonExecutor", + "corePoolSize": 1, + "maximumPoolSize": 1, + "queueType": "LinkedBlockingQueue", + "queueCapacity": 2147483647, + "queueSize": 0, + "fair": false, + "queueRemainingCapacity": 2147483647, + "activeCount": 0, + "taskCount": 0, + "completedTaskCount": 0, + "largestPoolSize": 0, + "poolSize": 0, + "waitTaskCount": 0, + "rejectCount": 0, + "rejectHandlerName": null, + "dynamic": false, + "runTimeoutCount": 0, + "queueTimeoutCount": 0 + }, + { + "maxMemory": "4 GB", + "totalMemory": "444 MB", + "freeMemory": "250.34 MB", + "usableMemory": "3.81 GB" + } + ] + ``` #### ii. To add DynamicTp thread pool monitoring to the HertzBeat monitoring page 1. Click Add DynamicTp Monitor -Path: Menu -> Middleware Monitor -> DynamicTp Monitor -> Add DynamicTp Monitor + Path: Menu -> Middleware Monitor -> DynamicTp Monitor -> Add DynamicTp Monitor -![hertzbeat](/img/blog/monitor-dynamic-tp-1.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-1.png) 2. Configure the parameters required for monitoring DynamicTp. -On the monitor page, fill in DynamicTp **service IP**, **monitoring port** (default 8080), and finally click OK to add it. -For other parameters such as **collection interval**, **timeout**, etc., you can refer to [help](https://hertzbeat.com/docs/help/dynamic_tp/) + On the monitor page, fill in DynamicTp **service IP**, **monitoring port** (default 8080), and finally click OK to add it. + For other parameters such as **collection interval**, **timeout**, etc., you can refer to [help](https://hertzbeat.com/docs/help/dynamic_tp/) -![hertzbeat](/img/blog/monitor-dynamic-tp-2.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-2.png) 3. Done ✅, now we have added monitoring for DynamicTp, check the monitor list to see our additions. -![hertzbeat](/img/blog/monitor-dynamic-tp-1.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-1.png) 4. Click **Options**->**Monitor Details icon** in the Monitor list to view the real-time monitoring metrics of the DynamicTp thread pool. -![hertzbeat](/img/blog/monitor-dynamic-tp-3.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-3.png) 5. Click the **Monitoring History TAB** to view a graphical representation of the historical monitoring metrics for the DynamicTp thread pool 📈. -![hertzbeat](/img/blog/monitor-dynamic-tp-4.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-4.png) -![hertzbeat](/img/blog/monitor-dynamic-tp-5.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-5.png) **DONE! With the above steps, it's really just two steps** @@ -123,33 +123,33 @@ Of course, just watching is not perfect, monitoring is often accompanied by alar 1. Configure an alarm threshold for an important metric. -Path: Menu -> Alert Thresholds -> Add Thresholds + Path: Menu -> Alert Thresholds -> Add Thresholds -- DynamicTp monitors some thread pool related metrics, for example, we set the threshold for the `run_timeout_count` `thread_pool_running` -> `run_timeout_count` metric, which will raise an alarm when the thread_timeout_count is greater than one. -- Here we configure an alert to be issued when `thread_pool_running` has a `run_timeout_count>1`, with an alert level of **Serious Alert**, which is triggered three times, as shown in the following figure. + - DynamicTp monitors some thread pool related metrics, for example, we set the threshold for the `run_timeout_count` `thread_pool_running` -> `run_timeout_count` metric, which will raise an alarm when the thread_timeout_count is greater than one. + - Here we configure an alert to be issued when `thread_pool_running` has a `run_timeout_count>1`, with an alert level of **Serious Alert**, which is triggered three times, as shown in the following figure. -![hertzbeat](/img/blog/monitor-dynamic-tp-6.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-6.png) 2. Add message notification recipients -> Configure recipients to let alert message know who to send to and in what way. + > Configure recipients to let alert message know who to send to and in what way. -Path: Menu -> Alert Notification -> Alert Recipient -> Add Recipient. + Path: Menu -> Alert Notification -> Alert Recipient -> Add Recipient. -Message notification methods support **Email, Dingtalk, WeChat, Flybook, WebHook, SMS**, etc. We take the commonly used Dingtalk as an example. + Message notification methods support **Email, Dingtalk, WeChat, Flybook, WebHook, SMS**, etc. We take the commonly used Dingtalk as an example. -- Refer to this [help document](https://hertzbeat.com/docs/help/alert_dingtalk) Configure the bot on Dingtalk side, set the security customization keyword `HertzBeat`, get the corresponding `access_token` value. -- Configure the recipient parameters in HertzBeat as follows. + - Refer to this [help document](https://hertzbeat.com/docs/help/alert_dingtalk) Configure the bot on Dingtalk side, set the security customization keyword `HertzBeat`, get the corresponding `access_token` value. + - Configure the recipient parameters in HertzBeat as follows. -[Alert Notification] -> [Add Recipient] -> [Choose Dingtalk bot notification method] -> [Set Dingtalk bot ACCESS_TOKEN] -> [OK] + [Alert Notification] -> [Add Recipient] -> [Choose Dingtalk bot notification method] -> [Set Dingtalk bot ACCESS_TOKEN] -> [OK] -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. Configure the associated alert notification policy ⚠️ [Add Notification Policy] -> [Associate the recipient you just set] -> [OK] ! -> Configure the alert notification policy to bind alert messages to recipients so that you can decide which alerts go to which person. + > Configure the alert notification policy to bind alert messages to recipients so that you can decide which alerts go to which person. -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### Over and out, now wait for the alert message to come through. Ding, ding, ding, ding diff --git a/home/blog/2023-02-11-monitor-mysql.md b/home/blog/2023-02-11-monitor-mysql.md index fa0519a7cde..485855fa814 100644 --- a/home/blog/2023-02-11-monitor-mysql.md +++ b/home/blog/2023-02-11-monitor-mysql.md @@ -33,28 +33,28 @@ Keywords: [Open source monitoring tool, open source database monitoring, Mysql d 1. Click Add Mysql Monitoring -Path: Menu -> Database Monitoring -> Mysql Database -> Add Mysql Database Monitoring + Path: Menu -> Database Monitoring -> Mysql Database -> Add Mysql Database Monitoring -![hertzbeat](/img/blog/monitor-mysql-1.png) + ![hertzbeat](/img/blog/monitor-mysql-1.png) 2. Configure the parameters required for the new monitoring Mysql database -On the monitoring page, fill in Mysql **service IP**, **monitoring port** (default 3306), **account password, etc.**, and finally click OK to add. -For other parameters such as **collection interval**, **timeout period**, etc., please refer to [Help Documentation](https://hertzbeat.com/docs/help/mysql/) /mysql/ + On the monitoring page, fill in Mysql **service IP**, **monitoring port** (default 3306), **account password, etc.**, and finally click OK to add. + For other parameters such as **collection interval**, **timeout period**, etc., please refer to [Help Documentation](https://hertzbeat.com/docs/help/mysql/) /mysql/ -![hertzbeat](/img/blog/monitor-mysql-2.png) + ![hertzbeat](/img/blog/monitor-mysql-2.png) 3. Complete ✅, now we have added the monitoring of the Mysql database, check the monitoring list to see our added items. -![hertzbeat](/img/blog/monitor-mysql-1.png) + ![hertzbeat](/img/blog/monitor-mysql-1.png) 4. Click **Operation**->**Monitoring Details Icon** of the monitoring list item to browse the real-time monitoring metric data of the Mysql database. -![hertzbeat](/img/blog/monitor-mysql-3.png) + ![hertzbeat](/img/blog/monitor-mysql-3.png) 5. Click **Monitoring History Details TAB** to browse the historical monitoring metric data chart of Mysql database📈. -![hertzbeat](/img/blog/monitor-mysql-4.png) + ![hertzbeat](/img/blog/monitor-mysql-4.png) **DONE! Done! Through the above steps, in fact, it only takes one step to sum up** @@ -71,35 +71,35 @@ Of course, just looking at it is definitely not perfect. Monitoring is often acc 1. Configure an alarm threshold for an important metric -Path: Menu -> Threshold Rules -> Add Threshold + Path: Menu -> Threshold Rules -> Add Threshold -- Select the configured metric object. Mysql database monitoring is mainly about database performance and other related metrics. For example, we set the threshold for the metric `query cache hit rate` `cache` -> `query_cache_hit_rate`. When the query cache hit rate of Mysql is very low An alarm is issued when it is less than 30%. -- Here we configure to send an alarm when the `query_cache_hit_rate<30` of this metric `cache`, the alarm level is **serious alarm**, and it will be triggered after three times, as shown in the figure below. + - Select the configured metric object. Mysql database monitoring is mainly about database performance and other related metrics. For example, we set the threshold for the metric `query cache hit rate` `cache` -> `query_cache_hit_rate`. When the query cache hit rate of Mysql is very low An alarm is issued when it is less than 30%. + - Here we configure to send an alarm when the `query_cache_hit_rate<30` of this metric `cache`, the alarm level is **serious alarm**, and it will be triggered after three times, as shown in the figure below. -![hertzbeat](/img/blog/monitor-mysql-5.png) + ![hertzbeat](/img/blog/monitor-mysql-5.png) -![hertzbeat](/img/blog/monitor-mysql-6.png) + ![hertzbeat](/img/blog/monitor-mysql-6.png) 2. Add message notification recipients -> Configure the receiver to let the alarm message know who to send and how to send it. + > Configure the receiver to let the alarm message know who to send and how to send it. -Path: Menu -> Alarm Notification -> Alarm Recipient -> Add New Recipient + Path: Menu -> Alarm Notification -> Alarm Recipient -> Add New Recipient -Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example. + Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example. -- Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value. -- Configure the receiver parameters in HertzBeat as follows. + - Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value. + - Configure the receiver parameters in HertzBeat as follows. -【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】 + 【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. Configure the associated alarm notification strategy ⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK] -> Configure the alarm notification policy to bind the alarm message with the receiver, so that you can decide which alarms to send to whom. + > Configure the alarm notification policy to bind the alarm message with the receiver, so that you can decide which alarms to send to whom. -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### Finished, now wait for the warning message to come. ding ding ding ding diff --git a/home/blog/2023-02-15-monitor-linux.md b/home/blog/2023-02-15-monitor-linux.md index 5b41eefc41b..9128c72f40f 100644 --- a/home/blog/2023-02-15-monitor-linux.md +++ b/home/blog/2023-02-15-monitor-linux.md @@ -30,32 +30,32 @@ Github: 1. Click Add Linux Monitoring -Path: Menu -> Operating System Monitoring -> Linux Operating System -> Add Linux Operating System Monitoring + Path: Menu -> Operating System Monitoring -> Linux Operating System -> Add Linux Operating System Monitoring -![hertzbeat](/img/blog/monitor-linux-1.png) + ![hertzbeat](/img/blog/monitor-linux-1.png) 2. Configure the parameters required for new monitoring Linux -Fill in the Linux **peer IP**, **SSH port** (default 22), **account password, etc.** on the monitoring page, and finally click OK to add. -For other parameters such as **collection interval**, **timeout period**, etc., please refer to the help document + Fill in the Linux **peer IP**, **SSH port** (default 22), **account password, etc.** on the monitoring page, and finally click OK to add. + For other parameters such as **collection interval**, **timeout period**, etc., please refer to the help document -![hertzbeat](/img/blog/monitor-linux-2.png) + ![hertzbeat](/img/blog/monitor-linux-2.png) 3. Complete ✅, now we have added the monitoring of Linux, check the monitoring list to see our added items. -![hertzbeat](/img/blog/monitor-linux-3.png) + ![hertzbeat](/img/blog/monitor-linux-3.png) 4. Click **Operation**->**Monitoring Details Icon** of the monitoring list item to browse the real-time monitoring metric data of Linux. -![hertzbeat](/img/blog/monitor-linux-4.png) + ![hertzbeat](/img/blog/monitor-linux-4.png) -![hertzbeat](/img/blog/monitor-linux-7.png) + ![hertzbeat](/img/blog/monitor-linux-7.png) 5. Click **Monitoring History Details TAB** to browse the historical monitoring metric data chart of Linux📈. -![hertzbeat](/img/blog/monitor-linux-5.png) + ![hertzbeat](/img/blog/monitor-linux-5.png) -![hertzbeat](/img/blog/monitor-linux-6.png) + ![hertzbeat](/img/blog/monitor-linux-6.png) **DONE! Done! To sum up, it only takes one step** @@ -72,35 +72,35 @@ Of course, just looking at it is definitely not perfect. Monitoring is often acc 1. Configure an alarm threshold for an important metric -Path: Menu -> Threshold Rules -> Add Threshold + Path: Menu -> Threshold Rules -> Add Threshold -- Select the configured metric object. Linux monitors mainly related metrics such as cpu, memory, disk, network performance, etc. For example, we set the threshold for the metric `CPU utilization` `cpu` -> `usage`. When the Linux cpu utilization is greater than 90% When a warning is issued. -- Here we configure to send an alarm when the `usage>90` of this metric `cpu`, the alarm level is **Warning Alarm**, which will be triggered after three times, as shown in the figure below. + - Select the configured metric object. Linux monitors mainly related metrics such as cpu, memory, disk, network performance, etc. For example, we set the threshold for the metric `CPU utilization` `cpu` -> `usage`. When the Linux cpu utilization is greater than 90% When a warning is issued. + - Here we configure to send an alarm when the `usage>90` of this metric `cpu`, the alarm level is **Warning Alarm**, which will be triggered after three times, as shown in the figure below. -![hertzbeat](/img/blog/monitor-linux-8.png) + ![hertzbeat](/img/blog/monitor-linux-8.png) -![hertzbeat](/img/blog/monitor-linux-9.png) + ![hertzbeat](/img/blog/monitor-linux-9.png) 2. Add message notification recipients -> Configure the receiver to let the alarm message know who to send and how to send it. + > Configure the receiver to let the alarm message know who to send and how to send it. -Path: Menu -> Alarm Notification -> Alarm Recipient -> Add New Recipient + Path: Menu -> Alarm Notification -> Alarm Recipient -> Add New Recipient -Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example. + Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example. -- Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value. -- Configure the receiver parameters in HertzBeat as follows. + - Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value. + - Configure the receiver parameters in HertzBeat as follows. -【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】 + 【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. Configure the associated alarm notification strategy ⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK] -> Configure the alarm notification policy to bind the alarm message with the receiver, so that you can decide which alarms to send to whom. + > Configure the alarm notification policy to bind the alarm message with the receiver, so that you can decide which alarms to send to whom. -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### Finished, now wait for the warning message to come. ding ding ding ding diff --git a/home/blog/2023-03-22-monitor-springboot2.md b/home/blog/2023-03-22-monitor-springboot2.md index 6c669bfc9fb..2772d358420 100644 --- a/home/blog/2023-03-22-monitor-springboot2.md +++ b/home/blog/2023-03-22-monitor-springboot2.md @@ -34,81 +34,81 @@ Github: 1. Open SpringBoot Actuator Endpoint to expose `metrics health env` metric interface -```yaml -management: - endpoints: - web: - exposure: - include: - - 'metrics' - - 'health' - - 'env' - enabled-by-default: on -``` + ```yaml + management: + endpoints: + web: + exposure: + include: + - 'metrics' + - 'health' + - 'env' + enabled-by-default: on + ``` 2. After restarting, test whether the access metric interface `ip:port/actuator` has response json data as follows: -```json -{ - "_links": { - "self": { - "href": "http://localhost:1157/actuator", - "templated": false - }, - "health-path": { - "href": "http://localhost:1157/actuator/health/{*path}", - "templated": true - }, - "health": { - "href": "http://localhost:1157/actuator/health", - "templated": false - }, - "env": { - "href": "http://localhost:1157/actuator/env", - "templated": false - }, - "env-toMatch": { - "href": "http://localhost:1157/actuator/env/{toMatch}", - "templated": true - }, - "metrics-requiredMetricName": { - "href": "http://localhost:1157/actuator/metrics/{requiredMetricName}", - "templated": true - }, - "metrics": { - "href": "http://localhost:1157/actuator/metrics", - "templated": false - } - } -} -``` + ```json + { + "_links": { + "self": { + "href": "http://localhost:1157/actuator", + "templated": false + }, + "health-path": { + "href": "http://localhost:1157/actuator/health/{*path}", + "templated": true + }, + "health": { + "href": "http://localhost:1157/actuator/health", + "templated": false + }, + "env": { + "href": "http://localhost:1157/actuator/env", + "templated": false + }, + "env-toMatch": { + "href": "http://localhost:1157/actuator/env/{toMatch}", + "templated": true + }, + "metrics-requiredMetricName": { + "href": "http://localhost:1157/actuator/metrics/{requiredMetricName}", + "templated": true + }, + "metrics": { + "href": "http://localhost:1157/actuator/metrics", + "templated": false + } + } + } + ``` #### Add SpringBoot2 application monitoring in the HertzBeat monitoring ui 1. Click to add SpringBoot2 monitoring -Path: Menu -> Application Service Monitoring -> SpringBoot2 -> Add SpringBoot2 Monitoring + Path: Menu -> Application Service Monitoring -> SpringBoot2 -> Add SpringBoot2 Monitoring -![hertzbeat](/img/blog/monitor-springboot2-1.png) + ![hertzbeat](/img/blog/monitor-springboot2-1.png) 2. Configure the parameters required for new monitoring SpringBoot2 -Fill in the SpringBoot2 application **peer IP**, **service port** (default 8080), **account password, etc.** on the monitoring page, and finally click OK to add. -For other parameters such as **collection interval**, **timeout period**, etc., please refer to the help document + Fill in the SpringBoot2 application **peer IP**, **service port** (default 8080), **account password, etc.** on the monitoring page, and finally click OK to add. + For other parameters such as **collection interval**, **timeout period**, etc., please refer to the help document -![hertzbeat](/img/blog/monitor-springboot2-2.png) + ![hertzbeat](/img/blog/monitor-springboot2-2.png) 3. Complete ✅, now we have added the monitoring of the SpringBoot2 application, check the monitoring list to see our additions. -![hertzbeat](/img/blog/monitor-springboot2-3.png) + ![hertzbeat](/img/blog/monitor-springboot2-3.png) 4. Click **Operation**->**Monitoring Details Icon** of the monitoring list item to browse the real-time monitoring metric data of the SpringBoot2 application. -![hertzbeat](/img/blog/monitor-springboot2-4.png) + ![hertzbeat](/img/blog/monitor-springboot2-4.png) 5. Click **Monitoring History Details TAB** to browse the historical monitoring metric data chart of the SpringBoot2 application📈. -![hertzbeat](/img/blog/monitor-springboot2-5.png) + ![hertzbeat](/img/blog/monitor-springboot2-5.png) **DONE! Done! It doesn't require us to deploy agents or various cumbersome operations, isn't it very simple** @@ -125,35 +125,35 @@ Of course, it is impossible to manually check the metrics in real time. Monitori 1. Configure an alarm threshold for an important metric -Path: Menu -> Threshold Rules -> Add Threshold + Path: Menu -> Threshold Rules -> Add Threshold -- Select the configured metric object. SpringBoot2 application monitoring mainly focuses on stack memory threads and other related metrics. For example, we set the threshold for the metric `threads` -> `threads`. When the number of threads in the `runnable` state is greater than At 300 an alert is issued. -- Here we configure to send an alarm when `size`, `state` of `equals(state, "runnable"") && size>300` of this metric, the alarm level is **warning alarm**, which will be triggered three times, specifically As shown below. + - Select the configured metric object. SpringBoot2 application monitoring mainly focuses on stack memory threads and other related metrics. For example, we set the threshold for the metric `threads` -> `threads`. When the number of threads in the `runnable` state is greater than At 300 an alert is issued. + - Here we configure to send an alarm when `size`, `state` of `equals(state, "runnable"") && size>300` of this metric, the alarm level is **warning alarm**, which will be triggered three times, specifically As shown below. -![hertzbeat](/img/blog/monitor-springboot2-6.png) + ![hertzbeat](/img/blog/monitor-springboot2-6.png) -![hertzbeat](/img/blog/monitor-springboot2-7.png) + ![hertzbeat](/img/blog/monitor-springboot2-7.png) 2. Add message notification recipients -> Configure the receiver to let the alarm message know who to send and how to send it. + > Configure the receiver to let the alarm message know who to send and how to send it. -Path: Menu -> Alarm Notification -> Alarm Recipient -> Add New Recipient + Path: Menu -> Alarm Notification -> Alarm Recipient -> Add New Recipient -Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example. + Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example. -- Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value. -- Configure the receiver parameters in HertzBeat as follows. + - Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value. + - Configure the receiver parameters in HertzBeat as follows. -【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】 + 【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. Configure the associated alarm notification strategy ⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK] -> Configure the alarm notification policy to bind the alarm message with the receiver, so that you can decide which alarms to send to whom. + > Configure the alarm notification policy to bind the alarm message with the receiver, so that you can decide which alarms to send to whom. -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### Finished, now wait for the warning message to come. ding ding ding ding diff --git a/home/blog/2023-05-11-greptimedb-store.md b/home/blog/2023-05-11-greptimedb-store.md index 210a41f5420..24e3bb07a83 100644 --- a/home/blog/2023-05-11-greptimedb-store.md +++ b/home/blog/2023-05-11-greptimedb-store.md @@ -43,16 +43,16 @@ You can refer to the [official documentation](https://docs.greptime.com/getting- 1. Docker installation of GreptimeDB -```shell -$ docker run -p 4000-4004:4000-4004 \ - -p 4242:4242 -v "$(pwd)/greptimedb:/tmp/greptimedb" \ - --name greptime \ - greptime/greptimedb:0.2.0 standalone start \ - --http-addr 0.0.0.0.0:4000 \ - --rpc-addr 0.0.0.0:4001 -``` + ```shell + $ docker run -p 4000-4004:4000-4004 \ + -p 4242:4242 -v "$(pwd)/greptimedb:/tmp/greptimedb" \ + --name greptime \ + greptime/greptimedb:0.2.0 standalone start \ + --http-addr 0.0.0.0.0:4000 \ + --rpc-addr 0.0.0.0:4001 + ``` -- `-v "$(pwd)/greptimedb:/tmp/greptimedb"` is the local persistent mount for the greptimeDB data directory, it is recommended to replace `$(pwd)/greptimedb` with the actual local directory you want to specify for storage. + - `-v "$(pwd)/greptimedb:/tmp/greptimedb"` is the local persistent mount for the greptimeDB data directory, it is recommended to replace `$(pwd)/greptimedb` with the actual local directory you want to specify for storage. 2. Use ``$ docker ps | grep greptime`` to see if GreptimeDB started successfully. @@ -62,21 +62,21 @@ See the [official documentation](https://hertzbeat.com/zh-cn/docs/start/docker-d 1. Docker installs HertzBeat. -```shell -$ docker run -d -p 1157:1157 \ - -e LANG=zh_CN.UTF-8 \ - -e TZ=Asia/Shanghai \ - -v /opt/data:/opt/hertzbeat/data \ - -v /opt/application.yml:/opt/hertzbeat/config/application.yml \ - --restart=always \ - --name hertzbeat apache/hertzbeat -``` + ```shell + $ docker run -d -p 1157:1157 \ + -e LANG=zh_CN.UTF-8 \ + -e TZ=Asia/Shanghai \ + -v /opt/data:/opt/hertzbeat/data \ + -v /opt/application.yml:/opt/hertzbeat/config/application.yml \ + --restart=always \ + --name hertzbeat apache/hertzbeat + ``` -- `-v /opt/data:/opt/hertzbeat/data` : (Optional, data persistence) Important ⚠️ Mount the H2 database files to the local host to ensure that the data will not be lost due to the creation and deletion of the container + - `-v /opt/data:/opt/hertzbeat/data` : (Optional, data persistence) Important ⚠️ Mount the H2 database files to the local host to ensure that the data will not be lost due to the creation and deletion of the container -- `-v /opt/application.yml:/opt/hertzbeat/config/application.yml` : Mount customized local configuration files to the container, i.e. use local configuration files to overwrite the container configuration files. + - `-v /opt/application.yml:/opt/hertzbeat/config/application.yml` : Mount customized local configuration files to the container, i.e. use local configuration files to overwrite the container configuration files. -Note that the ⚠️ local mount configuration file `application.yml` needs to exist in advance, and the full contents of the file can be found in the project repository [/script/application.yml]( application.yml) + Note that the ⚠️ local mount configuration file `application.yml` needs to exist in advance, and the full contents of the file can be found in the project repository [/script/application.yml]( application.yml) 2. Go to with the default account and password admin/hertzbeat to see if HertzBeat starts successfully. @@ -84,25 +84,25 @@ Note that the ⚠️ local mount configuration file `application.yml` needs to e 1. Modify the HertzBeat configuration file. -Modify the locally mounted HertzBeat configuration file [application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml), in package mode modify `hertzbeat/ config/application.yml + Modify the locally mounted HertzBeat configuration file [application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml), in package mode modify `hertzbeat/ config/application.yml -**Modify the `warehouse.store.jpa.enabled` parameter in there to `false`, configure the `warehouse.store.greptime` datasource parameter in there, the URL account password, and enable `enabled` to `true`**. + **Modify the `warehouse.store.jpa.enabled` parameter in there to `false`, configure the `warehouse.store.greptime` datasource parameter in there, the URL account password, and enable `enabled` to `true`**. -```yaml -warehouse: - store: - jpa: - enabled: false - greptime: - enabled: true - endpoint: localhost:4001 -``` + ```yaml + warehouse: + store: + jpa: + enabled: false + greptime: + enabled: true + endpoint: localhost:4001 + ``` 2. Restart HertzBeat. -```shell -docker restart hertzbeat -``` + ```shell + docker restart hertzbeat + ``` #### Observe the authentication effect diff --git a/home/blog/2023-08-14-hertzbeat-v1.4.0.md b/home/blog/2023-08-14-hertzbeat-v1.4.0.md index 3e3762b91b4..b769ec923b3 100644 --- a/home/blog/2023-08-14-hertzbeat-v1.4.0.md +++ b/home/blog/2023-08-14-hertzbeat-v1.4.0.md @@ -75,23 +75,23 @@ As for open source commercialization, the premise of open source commercializati 1. Just one command to get started: -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```or use quay.io (if dockerhub network connect timeout)``` + ```or use quay.io (if dockerhub network connect timeout)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. Access `http://localhost:1157` to start, default account: `admin/hertzbeat` 3. Deploy collector clusters -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_IP=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ``` + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_IP=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -* `-e IDENTITY=custom-collector-name` : set the collector unique identity name. -* `-e MANAGER_IP=127.0.0.1` : set the main hertzbeat server ip. -* `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. + * `-e IDENTITY=custom-collector-name` : set the collector unique identity name. + * `-e MANAGER_IP=127.0.0.1` : set the main hertzbeat server ip. + * `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/blog/2023-09-26-hertzbeat-v1.4.1.md b/home/blog/2023-09-26-hertzbeat-v1.4.1.md index cbb1d74324d..e04b55bc71f 100644 --- a/home/blog/2023-09-26-hertzbeat-v1.4.1.md +++ b/home/blog/2023-09-26-hertzbeat-v1.4.1.md @@ -58,23 +58,23 @@ keywords: [open source monitoring system, alerting system, Linux monitoring] 1. Just one command to get started: -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```or use quay.io (if dockerhub network connect timeout)``` + ```or use quay.io (if dockerhub network connect timeout)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. Access `http://localhost:1157` to start, default account: `admin/hertzbeat` 3. Deploy collector clusters -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ``` + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -* `-e IDENTITY=custom-collector-name` : set the collector unique identity name. -* `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. -* `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. + * `-e IDENTITY=custom-collector-name` : set the collector unique identity name. + * `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. + * `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/blog/2023-11-12-hertzbeat-v1.4.2.md b/home/blog/2023-11-12-hertzbeat-v1.4.2.md index 76747ce3989..d59e5076d4c 100644 --- a/home/blog/2023-11-12-hertzbeat-v1.4.2.md +++ b/home/blog/2023-11-12-hertzbeat-v1.4.2.md @@ -40,23 +40,23 @@ keywords: [open source monitoring system, alerting system, Linux monitoring] 1. Just one command to get started: -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```or use quay.io (if dockerhub network connect timeout)``` + ```or use quay.io (if dockerhub network connect timeout)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. Access `http://localhost:1157` to start, default account: `admin/hertzbeat` 3. Deploy collector clusters -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ``` + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -* `-e IDENTITY=custom-collector-name` : set the collector unique identity name. -* `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. -* `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. + * `-e IDENTITY=custom-collector-name` : set the collector unique identity name. + * `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. + * `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/blog/2023-12-11-hertzbeat-v1.4.3.md b/home/blog/2023-12-11-hertzbeat-v1.4.3.md index 14a01fb4153..966946b4f81 100644 --- a/home/blog/2023-12-11-hertzbeat-v1.4.3.md +++ b/home/blog/2023-12-11-hertzbeat-v1.4.3.md @@ -46,23 +46,23 @@ Compatible with the Prometheus ecosystem, now we can monitor what Prometheus can 1. Just one command to get started: -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```or use quay.io (if dockerhub network connect timeout)``` + ```or use quay.io (if dockerhub network connect timeout)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. Access `http://localhost:1157` to start, default account: `admin/hertzbeat` 3. Deploy collector clusters -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ``` + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -* `-e IDENTITY=custom-collector-name` : set the collector unique identity name. -* `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. -* `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. + * `-e IDENTITY=custom-collector-name` : set the collector unique identity name. + * `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. + * `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/blog/2024-01-18-hertzbeat-v1.4.4.md b/home/blog/2024-01-18-hertzbeat-v1.4.4.md index a69c099723e..420d9e1457f 100644 --- a/home/blog/2024-01-18-hertzbeat-v1.4.4.md +++ b/home/blog/2024-01-18-hertzbeat-v1.4.4.md @@ -47,23 +47,23 @@ keywords: [open source monitoring system, alerting system] 1. Just one command to get started: -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```or use quay.io (if dockerhub network connect timeout)``` + ```or use quay.io (if dockerhub network connect timeout)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. Access `http://localhost:1157` to start, default account: `admin/hertzbeat` 3. Deploy collector clusters -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ``` + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -* `-e IDENTITY=custom-collector-name` : set the collector unique identity name. -* `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. -* `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. + * `-e IDENTITY=custom-collector-name` : set the collector unique identity name. + * `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. + * `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/docs/community/code-style-and-quality-guide.md b/home/docs/community/code-style-and-quality-guide.md index 8be58aa2d84..7e65b0c0a92 100644 --- a/home/docs/community/code-style-and-quality-guide.md +++ b/home/docs/community/code-style-and-quality-guide.md @@ -206,9 +206,9 @@ Error code description: 2. Ensure code readability and intuitiveness -- The string in the `annotation` symbol doesn't need to be extracted as constant. + - The string in the `annotation` symbol doesn't need to be extracted as constant. -- The referenced `package` or `resource` name doesn't need to be extracted as constant. + - The referenced `package` or `resource` name doesn't need to be extracted as constant. 3. Variables that have not been reassigned must also be declared as final types. @@ -250,17 +250,17 @@ Error code description: - returns Set if use `HashSet` 2. If there are multiple threads, the following declaration or returned types can be used: -```java -private CurrentHashMap map; -public CurrentHashMap funName(); -``` + ```java + private CurrentHashMap map; + public CurrentHashMap funName(); + ``` 3. Use `isEmpty()` instead of `length() == 0` or `size() == 0` - Negative demo: ```java if (pathPart.length() == 0) { - return; + return; } ``` @@ -268,7 +268,7 @@ public CurrentHashMap funName(); ```java if (pathPart.isEmpty()) { - return; + return; } ``` @@ -295,89 +295,89 @@ Generally speaking, if a method's code line depth exceeds `2+ Tabs` due to conti to reduce code line depth and improve readability like follows: - Union or merge the logic into the next level calling -- Negative demo: + - Negative demo: -```java -if (isInsert) { -save(platform); -} else { -updateById(platform); -} -``` + ```java + if (isInsert) { + save(platform); + } else { + updateById(platform); + } + ``` -- Positive demo: + - Positive demo: -```java -saveOrUpdate(platform); -``` + ```java + saveOrUpdate(platform); + ``` - Merge the conditions -- Negative demo: + - Negative demo: -```java -if (expression1) { -if(expression2) { -...... -} -} - -``` + ```java + if (expression1) { + if (expression2) { + ...... + } + } + + ``` -- Positive demo: + - Positive demo: - ```java - if (expression1 && expression2) { - ...... - } - ``` + ```java + if (expression1 && expression2) { + ...... + } + ``` - Reverse the condition -- Negative demo: - - ```java - public void doSomething() { - // Ignored more deeper block lines - // ..... - if (condition1) { - ... - } else { - ... - } - } - ``` - -- Positive demo: - - ```java - public void doSomething() { - // Ignored more deeper block lines - // ..... - if (!condition1) { - ... - return; - } - // ... - } - ``` + - Negative demo: + + ```java + public void doSomething() { + // Ignored more deeper block lines + // ..... + if (condition1) { + // ... + } else { + // ... + } + } + ``` + + - Positive demo: + + ```java + public void doSomething() { + // Ignored more deeper block lines + // ..... + if (!condition1) { + // ... + return; + } + // ... + } + ``` - Using a single variable or method to reduce the complex conditional expression -- Negative demo: + - Negative demo: - ```java - if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { - ... - } - ``` + ```java + if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { + // ... + } + ``` -- Positive demo: + - Positive demo: - ```java - if (containsSqlServer(dbType)) { - .... - } - //..... - // definition of the containsSqlServer - ``` + ```java + if (containsSqlServer(dbType)) { + // .... + } + //..... + // definition of the containsSqlServer + ``` > Using `sonarlint` and `better highlights` to check code depth looks like good in the future. @@ -385,20 +385,20 @@ if(expression2) { 1. Method lacks comments: -- `When`: When can the method be called -- `How`: How to use this method and how to pass parameters, etc. -- `What`: What functions does this method achieve -- `Note`: What should developers pay attention to when calling this method + - `When`: When can the method be called + - `How`: How to use this method and how to pass parameters, etc. + - `What`: What functions does this method achieve + - `Note`: What should developers pay attention to when calling this method 2. Missing necessary class header description comments. -Add `What`, `Note`, etc. like mentioned in the `1`. + Add `What`, `Note`, etc. like mentioned in the `1`. 3. The method declaration in the interface must be annotated. -- If the semantics of the implementation and the annotation content at the interface declaration are inconsistent, the specific implementation method also needs to be rewritten with annotations. + - If the semantics of the implementation and the annotation content at the interface declaration are inconsistent, the specific implementation method also needs to be rewritten with annotations. -- If the semantics of the method implementation are consistent with the annotation content at the interface declaration, it is not recommended to write annotations to avoid duplicate annotations. + - If the semantics of the method implementation are consistent with the annotation content at the interface declaration, it is not recommended to write annotations to avoid duplicate annotations. 4. The first word in the comment lines need to be capitalized, like `param` lines, `return` lines. If a special reference as a subject does not need to be capitalized, special symbols such as quotation marks need to be noted. @@ -408,31 +408,31 @@ Add `What`, `Note`, etc. like mentioned in the `1`. 1. Prefer `non-capturing` lambdas (lambdas that do not contain references to the outer scope). Capturing lambdas need to create a new object instance for every call. `Non-capturing` lambdas can use the same instance for each invocation. -- Negative demo: + - Negative demo: - ```java - map.computeIfAbsent(key, x -> key.toLowerCase()) - ``` + ```java + map.computeIfAbsent(key, x -> key.toLowerCase()) + ``` -- Positive demo: + - Positive demo: - ```java - map.computeIfAbsent(key, k -> k.toLowerCase()); - ``` + ```java + map.computeIfAbsent(key, k -> k.toLowerCase()); + ``` 2. Consider method references instead of inline lambdas -- Negative demo: + - Negative demo: - ```java - map.computeIfAbsent(key, k-> Loader.load(k)); - ``` + ```java + map.computeIfAbsent(key, k-> Loader.load(k)); + ``` -- Positive demo: + - Positive demo: - ```java - map.computeIfAbsent(key, Loader::load); - ``` + ```java + map.computeIfAbsent(key, Loader::load); + ``` ### 3.9 Java Streams @@ -450,127 +450,127 @@ Add `What`, `Note`, etc. like mentioned in the `1`. 1. Use `StringUtils.isBlank` instead of `StringUtils.isEmpty` -- Negative demo: + - Negative demo: - ```java - if (StringUtils.isEmpty(name)) { - return; - } - ``` + ```java + if (StringUtils.isEmpty(name)) { + return; + } + ``` -- Positive demo: + - Positive demo: - ```java - if (StringUtils.isBlank(name)) { - return; - } - ``` + ```java + if (StringUtils.isBlank(name)) { + return; + } + ``` 2. Use `StringUtils.isNotBlank` instead of `StringUtils.isNotEmpty` -- Negative demo: + - Negative demo: - ```java - if (StringUtils.isNotEmpty(name)) { - return; - } - ``` + ```java + if (StringUtils.isNotEmpty(name)) { + return; + } + ``` -- Positive demo: + - Positive demo: - ```java - if (StringUtils.isNotBlank(name)) { - return; - } - ``` + ```java + if (StringUtils.isNotBlank(name)) { + return; + } + ``` 3. Use `StringUtils.isAllBlank` instead of `StringUtils.isAllEmpty` -- Negative demo: + - Negative demo: - ```java - if (StringUtils.isAllEmpty(name, age)) { - return; - } - ``` + ```java + if (StringUtils.isAllEmpty(name, age)) { + return; + } + ``` -- Positive demo: + - Positive demo: - ```java - if (StringUtils.isAllBlank(name, age)) { - return; - } - ``` + ```java + if (StringUtils.isAllBlank(name, age)) { + return; + } + ``` ### 3.12 `Enum` Class 1. Enumeration value comparison -- Negative demo: + - Negative demo: - ```java - if (status.equals(JobStatus.RUNNING)) { - return; - } - ``` + ```java + if (status.equals(JobStatus.RUNNING)) { + return; + } + ``` -- Positive demo: + - Positive demo: - ```java - if (status == JobStatus.RUNNING) { - return; - } - ``` + ```java + if (status == JobStatus.RUNNING) { + return; + } + ``` 2. Enumeration classes do not need to implement Serializable -- Negative demo: + - Negative demo: - ```java - public enum JobStatus implements Serializable { - ... - } - ``` + ```java + public enum JobStatus implements Serializable { + // ... + } + ``` -- Positive demo: + - Positive demo: - ```java - public enum JobStatus { - ... - } - ``` + ```java + public enum JobStatus { + // ... + } + ``` 3. Use `Enum.name()` instead of `Enum.toString()` -- Negative demo: + - Negative demo: - ```java - System.out.println(JobStatus.RUNNING.toString()); - ``` + ```java + System.out.println(JobStatus.RUNNING.toString()); + ``` -- Positive demo: + - Positive demo: - ```java - System.out.println(JobStatus.RUNNING.name()); - ``` + ```java + System.out.println(JobStatus.RUNNING.name()); + ``` 4. Enumeration class names uniformly use the Enum suffix -- Negative demo: + - Negative demo: - ```java - public enum JobStatus { - ... - } - ``` + ```java + public enum JobStatus { + // ... + } + ``` -- Positive demo: + - Positive demo: - ```java - public enum JobStatusEnum { - ... - } - ``` + ```java + public enum JobStatusEnum { + // ... + } + ``` ### 3.13 `Deprecated` Annotation @@ -579,7 +579,7 @@ Add `What`, `Note`, etc. like mentioned in the `1`. ```java @deprecated public void process(String input) { - ... + // ... } ``` @@ -588,7 +588,7 @@ public void process(String input) { ```java @Deprecated public void process(String input) { - ... + // ... } ``` @@ -596,43 +596,43 @@ public void process(String input) { 1. Use `placeholders` for log output: -- Negative demo + - Negative demo - ```java - log.info("Deploy cluster request " + deployRequest); - ``` + ```java + log.info("Deploy cluster request " + deployRequest); + ``` -- Positive demo + - Positive demo - ```java - log.info("load plugin:{} to {}", file.getName(), appPlugins); - ``` + ```java + log.info("load plugin:{} to {}", file.getName(), appPlugins); + ``` 2. Pay attention to the selection of `log level` when printing logs -When printing the log content, if the actual parameters of the log placeholder are passed, it is necessary to avoid premature evaluation to avoid unnecessary evaluation caused by the log level. + When printing the log content, if the actual parameters of the log placeholder are passed, it is necessary to avoid premature evaluation to avoid unnecessary evaluation caused by the log level. -- Negative demo: + - Negative demo: - Assuming the current log level is `INFO`: + Assuming the current log level is `INFO`: - ```java - // ignored declaration lines. - List userList = getUsersByBatch(1000); - LOG.debug("All users: {}", getAllUserIds(userList)); - ``` + ```java + // ignored declaration lines. + List userList = getUsersByBatch(1000); + LOG.debug("All users: {}", getAllUserIds(userList)); + ``` -- Positive demo: + - Positive demo: - In this case, we should determine the log level in advance before making actual log calls as follows: + In this case, we should determine the log level in advance before making actual log calls as follows: - ```java - // ignored declaration lines. - List userList = getUsersByBatch(1000); - if (LOG.isDebugEnabled()) { - LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); - } - ``` + ```java + // ignored declaration lines. + List userList = getUsersByBatch(1000); + if (LOG.isDebugEnabled()) { + LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); + } + ``` ## 5 Testing diff --git a/home/docs/community/contribution.md b/home/docs/community/contribution.md index 9a634ffffed..af7d20bfec7 100644 --- a/home/docs/community/contribution.md +++ b/home/docs/community/contribution.md @@ -88,33 +88,33 @@ Of course, if you have a good idea, you can also propose it directly on GitHub D 1. First you need to fork your target [hertzbeat repository](https://github.com/apache/hertzbeat). 2. Then download the code locally with git command: -```shell -git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended -``` + ```shell + git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended + ``` 3. After the download is complete, please refer to the getting started guide or README file of the target repository to initialize the project. 4. Then, you can refer to the following command to submit the code: -```shell -git checkout -b a-feature-branch #Recommended -``` + ```shell + git checkout -b a-feature-branch #Recommended + ``` 5. Submit the coed as a commit, the commit message format specification required: [module name or type name]feature or bugfix or doc: custom message. -```shell -git add -git commit -m '[docs]feature: necessary instructions' #Recommended -``` + ```shell + git add + git commit -m '[docs]feature: necessary instructions' #Recommended + ``` 6. Push to the remote repository -```shell -git push origin a-feature-branch -``` + ```shell + git push origin a-feature-branch + ``` 7. Then you can initiate a new PR (Pull Request) on GitHub. -Please note that the title of the PR needs to conform to our spec, and write the necessary description in the PR to facilitate code review by Committers and other contributors. + Please note that the title of the PR needs to conform to our spec, and write the necessary description in the PR to facilitate code review by Committers and other contributors. ### Wait for the code to be merged diff --git a/home/docs/help/activemq.md b/home/docs/help/activemq.md index ef3cc911969..ee014e7ce8c 100644 --- a/home/docs/help/activemq.md +++ b/home/docs/help/activemq.md @@ -15,40 +15,40 @@ keywords: [open source monitoring tool, monitoring Apache ActiveMQ metrics] 1. Modify the `conf/activemq.xml` file in the installation directory to enable JMX -> Add `userJmx="true"` attribute in `broker` tag + > Add `userJmx="true"` attribute in `broker` tag -```xml - - - -``` + ```xml + + + + ``` 2. Modify the `bin/env` file in the installation directory, configure the JMX port IP, etc. -The original configuration information will be as follows - -```text -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" -``` - -Update to the following configuration, ⚠️ pay attention to modify `local external IP` - -```text -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" -``` + The original configuration information will be as follows + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` + + Update to the following configuration, ⚠️ pay attention to modify `local external IP` + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` 3. Restart the ACTIVEMQ service, and add the corresponding ActiveMQ monitoring in HertzBeat. The parameters use the IP port configured by JMX. diff --git a/home/docs/help/alert_dingtalk.md b/home/docs/help/alert_dingtalk.md index 36e332d9b21..fdac2211c74 100644 --- a/home/docs/help/alert_dingtalk.md +++ b/home/docs/help/alert_dingtalk.md @@ -11,31 +11,31 @@ keywords: [open source monitoring tool, open source alerter, open source DingDin 1. **【DingDing desktop client】-> 【Group settings】-> 【Intelligent group assistant】-> 【Add new robot-select custom】-> 【Set robot name and avatar】-> 【Note⚠️Set custom keywords: HertzBeat】 ->【Copy its webhook address after adding successfully】** -> Note⚠️ When adding a robot, its custom keywords need to be set in the security setting block: HertzBeat. Other security settings or the IP segment don't need to be filled in. + > Note⚠️ When adding a robot, its custom keywords need to be set in the security setting block: HertzBeat. Other security settings or the IP segment don't need to be filled in. -![email](/img/docs/help/alert-notice-8.png) + ![email](/img/docs/help/alert-notice-8.png) 2. **【Save access_token value of the WebHook address of the robot】** -> eg: webHook address:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` -> Its robot access_token value is `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > eg: webHook address:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > Its robot access_token value is `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` 3. **【Alarm notification】->【Add new recipient】 ->【Select DingDing robot notification method】->【Set DingDing robot ACCESS_TOKEN】-> 【Confirm】** -![email](/img/docs/help/alert-notice-9.png) + ![email](/img/docs/help/alert-notice-9.png) 4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### DingDing robot common issues 1. DingDing group did not receive the robot alarm notification. -> Please check whether there is any triggered alarm information in the alarm center. -> Please check whether DingDing robot is configured with security custom keywords :HertzBeat. -> Please check whether the robot ACCESS_TOKEN is configured correctly and whether the alarm strategy association is configured. + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether DingDing robot is configured with security custom keywords :HertzBeat. + > Please check whether the robot ACCESS_TOKEN is configured correctly and whether the alarm strategy association is configured. Other issues can be fed back through the communication group ISSUE! diff --git a/home/docs/help/alert_discord.md b/home/docs/help/alert_discord.md index 68296148f22..6eb18982dba 100644 --- a/home/docs/help/alert_discord.md +++ b/home/docs/help/alert_discord.md @@ -13,56 +13,56 @@ keywords: [open source monitoring tool, open source alerter, open source Discord 1. Visit [https://discord.com/developers/applications](https://discord.com/developers/applications) to create an application -![bot](/img/docs/help/discord-bot-1.png) + ![bot](/img/docs/help/discord-bot-1.png) 2. Create a robot under the application and get the robot Token -![bot](/img/docs/help/discord-bot-2.png) + ![bot](/img/docs/help/discord-bot-2.png) -![bot](/img/docs/help/discord-bot-3.png) + ![bot](/img/docs/help/discord-bot-3.png) 3. Authorize the bot to the chat server -> Authorize the robot under the OAuth2 menu, select `bot` for `SCOPES`, `BOT PERMISSIONS` select `Send Messages` + > Authorize the robot under the OAuth2 menu, select `bot` for `SCOPES`, `BOT PERMISSIONS` select `Send Messages` -![bot](/img/docs/help/discord-bot-4.png) + ![bot](/img/docs/help/discord-bot-4.png) -> Obtain the URL generated at the bottom, and the browser accesses this URL to officially authorize the robot, that is, to set which chat server the robot will join. + > Obtain the URL generated at the bottom, and the browser accesses this URL to officially authorize the robot, that is, to set which chat server the robot will join. 4. Check if your chat server has joined robot members -![bot](/img/docs/help/discord-bot-5.png) + ![bot](/img/docs/help/discord-bot-5.png) ### Enable developer mode and get Channel ID 1. Personal Settings -> Advanced Settings -> Enable Developer Mode -![bot](/img/docs/help/discord-bot-6.png) + ![bot](/img/docs/help/discord-bot-6.png) 2. Get channel Channel ID -> Right-click the chat channel you want to send the robot message to, click the COPY ID button to get the Channel ID + > Right-click the chat channel you want to send the robot message to, click the COPY ID button to get the Channel ID -![bot](/img/docs/help/discord-bot-7.png) + ![bot](/img/docs/help/discord-bot-7.png) ### Add an alarm notification person in HertzBeat, the notification method is Discord Bot 1. **[Alarm notification] -> [Add recipient] -> [Select Discord robot notification method] -> [Set robot Token and ChannelId] -> [OK]** -![email](/img/docs/help/discord-bot-8.png) + ![email](/img/docs/help/discord-bot-8.png) -4. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** +2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** -> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Discord Bot Notification FAQ 1. Discord doesn't receive bot alert notifications -> Please check whether the alarm information has been triggered in the alarm center -> Please check whether the robot Token and ChannelId are configured correctly, and whether the alarm policy association has been configured -> Please check whether the bot is properly authorized by the Discord chat server + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the robot Token and ChannelId are configured correctly, and whether the alarm policy association has been configured + > Please check whether the bot is properly authorized by the Discord chat server Other questions can be fed back through the communication group ISSUE! diff --git a/home/docs/help/alert_email.md b/home/docs/help/alert_email.md index 1fc45db80f4..fd12b4eb164 100644 --- a/home/docs/help/alert_email.md +++ b/home/docs/help/alert_email.md @@ -11,23 +11,23 @@ keywords: [open source monitoring tool, open source alerter, open source email n 1. **【Alarm notification】->【Add new recipient】 ->【Select email notification method】** -![email](/img/docs/help/alert-notice-1.png) + ![email](/img/docs/help/alert-notice-1.png) 2. **【Get verification code】-> 【Enter email verification code】-> 【Confirm】** ![email](/img/docs/help/alert-notice-2.png) -![email](/img/docs/help/alert-notice-3.png) + ![email](/img/docs/help/alert-notice-3.png) 3. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### Email notification common issues 1. Hertzbeat deployed on its own intranet cannot receive email notifications -> Hertzbeat needs to configure its own mail server. Please confirm whether you have configured its own mail server in application.yml + > Hertzbeat needs to configure its own mail server. Please confirm whether you have configured its own mail server in application.yml Other issues can be fed back through the communication group ISSUE! diff --git a/home/docs/help/alert_enterprise_wechat_app.md b/home/docs/help/alert_enterprise_wechat_app.md index 1d5d41a15bc..352981b7d85 100644 --- a/home/docs/help/alert_enterprise_wechat_app.md +++ b/home/docs/help/alert_enterprise_wechat_app.md @@ -11,24 +11,24 @@ keywords: [open source monitoring tool, open source alerter, open source Enterpr 1. **【Enterprise Wechat backstage】-> 【App Management】-> 【Create an app】-> 【Set App message】->【Copy AgentId and Secret adding successfully】** -![email](/img/docs/help/alert-wechat-1.jpg) + ![email](/img/docs/help/alert-wechat-1.jpg) 2. **【Alarm notification】->【Add new recipient】 ->【Select Enterprise WeChat App notification method】->【Set Enterprise WeChat ID,Enterprise App ID and Enterprise App Secret 】-> 【Confirm】** -![email](/img/docs/help/alert-wechat-2.jpg) + ![email](/img/docs/help/alert-wechat-2.jpg) 3. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-wechat-3.jpg) + ![email](/img/docs/help/alert-wechat-3.jpg) ### Enterprise WeChat App common issues 1. Enterprise WeChat App did not receive the alarm notification. -> Please check if the user has application permissions. -> Please check if the enterprise application callback address settings are normal. -> Please check if the server IP is on the enterprise application whitelist. + > Please check if the user has application permissions. + > Please check if the enterprise application callback address settings are normal. + > Please check if the server IP is on the enterprise application whitelist. Other issues can be fed back through the communication group ISSUE! diff --git a/home/docs/help/alert_feishu.md b/home/docs/help/alert_feishu.md index 38f7c72cf03..80efffd0305 100644 --- a/home/docs/help/alert_feishu.md +++ b/home/docs/help/alert_feishu.md @@ -13,22 +13,22 @@ keywords: [open source monitoring tool, open source alerter, open source feishu 2. **【Save the key value of the WebHook address of the robot】** -> eg: webHook address:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` -> Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > eg: webHook address:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` 3. **【Alarm notification】->【Add new recipient】 ->【Select FeiShu robot notification method】->【Set FeiShu robot KEY】-> 【Confirm】** 4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### FeiShu robot notification common issues 1. FeiShu group did not receive the robot alarm notification. -> Please check whether there is any triggered alarm information in the alarm center. -> Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. Other issues can be fed back through the communication group ISSUE! diff --git a/home/docs/help/alert_slack.md b/home/docs/help/alert_slack.md index 26bde4ed2e5..7b5c395c729 100644 --- a/home/docs/help/alert_slack.md +++ b/home/docs/help/alert_slack.md @@ -17,19 +17,19 @@ Refer to the official website document [Sending messages using Incoming Webhooks 1. **【Alarm Notification】->【Add Recipient】->【Select Slack Webhook Notification Method】->【Set Webhook URL】-> 【OK】** -![email](/img/docs/help/slack-bot-1.png) + ![email](/img/docs/help/slack-bot-1.png) 2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** -> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Slack Notification FAQ 1. Slack did not receive the robot warning notification -> Please check whether the alarm information has been triggered in the alarm center -> Please check whether the slack webhook url are configured correctly, and whether the alarm policy association has been configured + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the slack webhook url are configured correctly, and whether the alarm policy association has been configured Other questions can be fed back through the communication group ISSUE! diff --git a/home/docs/help/alert_smn.md b/home/docs/help/alert_smn.md index 53774315561..a49ff926801 100644 --- a/home/docs/help/alert_smn.md +++ b/home/docs/help/alert_smn.md @@ -11,33 +11,33 @@ keywords: [ open source monitoring tool, open source alerter, open source Huawei 1. **According to [Huawei Cloud SMN Official Document](https://support.huaweicloud.com/qs-smn/smn_json.html) activate the SMN service and configure SMN** -![alert-notice-10](/img/docs/help/alert-notice-10.png) + ![alert-notice-10](/img/docs/help/alert-notice-10.png) 2. **Save topic URN for SMN** -![alert-notice-11](/img/docs/help/alert-notice-11.png) + ![alert-notice-11](/img/docs/help/alert-notice-11.png) 3. **According to [Huawei Cloud Signature Document](https://support.huaweicloud.com/devg-apisign/api-sign-provide.html) obtain AK, SK, and project ID** -![alert-notice-12](/img/docs/help/alert-notice-12.png) + ![alert-notice-12](/img/docs/help/alert-notice-12.png) -![alert-notice-13](/img/docs/help/alert-notice-13.png) + ![alert-notice-13](/img/docs/help/alert-notice-13.png) 4. **【Alarm Notification】->【Add Recipient】->【Select Slack Webhook Notification Method】->【Set Huawei Cloud SMN AK, SK and other configurations】-> 【OK】** -![alert-notice-14](/img/docs/help/alert-notice-14.png) + ![alert-notice-14](/img/docs/help/alert-notice-14.png) 5. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** -> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### Huawei Cloud SMN Notification FAQ 1. Huawei Cloud SMN did not receive the robot warning notification -> Please check whether the alarm information has been triggered in the alarm center -> Please check whether the Huawei Cloud SMN AK, SK and other configurations are configured correctly, and whether the alarm policy association has been configured + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the Huawei Cloud SMN AK, SK and other configurations are configured correctly, and whether the alarm policy association has been configured Other questions can be fed back through the communication group ISSUE! diff --git a/home/docs/help/alert_telegram.md b/home/docs/help/alert_telegram.md index 1689788f0f4..c33d2b0c72b 100644 --- a/home/docs/help/alert_telegram.md +++ b/home/docs/help/alert_telegram.md @@ -13,32 +13,32 @@ keywords: [open source monitoring tool, open source alerter, open source Telegra 1. Use [@BotFather](https://t.me/BotFather) to create your own bot and get an access token `Token` -![telegram-bot](/img/docs/help/telegram-bot-1.png) + ![telegram-bot](/img/docs/help/telegram-bot-1.png) 2. Get the `User ID` of the recipient -**Use the recipient account you want to notify to send a message to the newly created Bot account**, -Visit ```https://api.telegram.org/bot/getUpdates```, **`use the Bot Token from the previous step to replace the `**, and respond to the first in the `Json` data A `result.message.from.id` value is the recipient's `User ID` - -```json -{ - "ok": true, - "result": [ - { - "update_id": 632299191, - "message": { - "from":{ - "id": "User ID" - }, - "chat":{ - }, - "date": 1673858065, - "text": "111" + **Use the recipient account you want to notify to send a message to the newly created Bot account**, + Visit ```https://api.telegram.org/bot/getUpdates```, **`use the Bot Token from the previous step to replace the `**, and respond to the first in the `Json` data A `result.message.from.id` value is the recipient's `User ID` + + ```json + { + "ok": true, + "result": [ + { + "update_id": 632299191, + "message": { + "from":{ + "id": "User ID" + }, + "chat":{ + }, + "date": 1673858065, + "text": "111" + } } - } - ] -} -``` + ] + } + ``` 3. Record and save the `Token` and `User Id` we got @@ -46,20 +46,20 @@ Visit ```https://api.telegram.org/bot/getUpdates```, **`use the Bot Token 1. **【Alarm Notification】->【Add Recipient】->【Select Telegram Robot Notification Method】->【Set Robot Token and UserId】-> 【OK】** -![email](/img/docs/help/telegram-bot-2.png) + ![email](/img/docs/help/telegram-bot-2.png) -4. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** +2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** -> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Telegram Bot Notification FAQ 1. Telegram did not receive the robot warning notification -> Please check whether the alarm information has been triggered in the alarm center -> Please check whether the robot Token and UserId are configured correctly, and whether the alarm policy association has been configured -> UserId should be the UserId of the recipient of the message + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the robot Token and UserId are configured correctly, and whether the alarm policy association has been configured + > UserId should be the UserId of the recipient of the message Other questions can be fed back through the communication group ISSUE! diff --git a/home/docs/help/alert_webhook.md b/home/docs/help/alert_webhook.md index d1741d71481..9d0db1f9ed3 100644 --- a/home/docs/help/alert_webhook.md +++ b/home/docs/help/alert_webhook.md @@ -11,13 +11,13 @@ keywords: [open source monitoring tool, open source alerter, open source webhook 1. **【Alarm notification】->【Add new recipient】 ->【Select WebHook notification method】-> 【Set WebHook callback address】 -> 【Confirm】** -![email](/img/docs/help/alert-notice-5.png) + ![email](/img/docs/help/alert-notice-5.png) 2. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### WebHook callback POST body BODY content @@ -60,7 +60,7 @@ Content format:JSON 1. WebHook callback did not take effect -> Please check whether there is any triggered alarm information in the alarm center. -> Please check whether the configured webhook callback address is correct. + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the configured webhook callback address is correct. Other issues can be fed back through the communication group ISSUE! diff --git a/home/docs/help/alert_wework.md b/home/docs/help/alert_wework.md index ce344200301..db0b0061757 100644 --- a/home/docs/help/alert_wework.md +++ b/home/docs/help/alert_wework.md @@ -11,20 +11,20 @@ keywords: [open source monitoring tool, open source alerter, open source WeWork 1. **【Enterprise Wechat】-> 【Group settings】-> 【Group robot】-> 【Add new robot】-> 【Set robot name and avatar】-> 【Copy its webhook address after adding successfully】** -![email](/img/docs/help/alert-notice-6.jpg) + ![email](/img/docs/help/alert-notice-6.jpg) 2. **【Save the key value of the WebHook address of the robot】** -> eg: webHook address:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` -> Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > eg: webHook address:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` 3. **【Alarm notification】->【Add new recipient】 ->【Select enterprise Wechat robot notification method】->【Set enterprise Wechat robot KEY】-> 【Confirm】** -![email](/img/docs/help/alert-notice-7.png) + ![email](/img/docs/help/alert-notice-7.png) 4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** ![email](/img/docs/help/alert-notice-4.png) @@ -32,7 +32,7 @@ keywords: [open source monitoring tool, open source alerter, open source WeWork 1. The enterprise wechat group did not receive the robot alarm notification. -> Please check whether there is any triggered alarm information in the alarm center. -> Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. Other issues can be fed back through the communication group ISSUE! diff --git a/home/docs/help/dynamic_tp.md b/home/docs/help/dynamic_tp.md index 332767b2a39..72e6389fdde 100644 --- a/home/docs/help/dynamic_tp.md +++ b/home/docs/help/dynamic_tp.md @@ -11,53 +11,53 @@ keywords: [open source monitoring tool, open source dynamicTp monitoring tool, m 1. Integration Using `DynamicTp` -`DynamicTp` is a lightweight dynamic thread pool based on the configuration center of the Jvm language. It has built-in monitoring and alarm functions, which can be realized through SPI custom extensions. + `DynamicTp` is a lightweight dynamic thread pool based on the configuration center of the Jvm language. It has built-in monitoring and alarm functions, which can be realized through SPI custom extensions. -For integrated use, please refer to the document [Quick Start](https://dynamictp.cn/guide/use/quick-start.html) + For integrated use, please refer to the document [Quick Start](https://dynamictp.cn/guide/use/quick-start.html) 2. Open SpringBoot Actuator Endpoint to expose `DynamicTp` Metric interface -```yaml -management: - endpoints: - web: - exposure: - include: '*' -``` + ```yaml + management: + endpoints: + web: + exposure: + include: '*' + ``` -Test whether the access Metric interface `ip:port/actuator/dynamic-tp` has response json data as follows: + Test whether the access Metric interface `ip:port/actuator/dynamic-tp` has response json data as follows: -```json -[ - { - "poolName": "commonExecutor", - "corePoolSize": 1, - "maximumPoolSize": 1, - "queueType": "LinkedBlockingQueue", - "queueCapacity": 2147483647, - "queueSize": 0, - "fair": false, - "queueRemainingCapacity": 2147483647, - "activeCount": 0, - "taskCount": 0, - "completedTaskCount": 0, - "largestPoolSize": 0, - "poolSize": 0, - "waitTaskCount": 0, - "rejectCount": 0, - "rejectHandlerName": null, - "dynamic": false, - "runTimeoutCount": 0, - "queueTimeoutCount": 0 - }, - { - "maxMemory": "4GB", - "totalMemory": "444MB", - "freeMemory": "250.34 MB", - "usableMemory": "3.81GB" - } -] -``` + ```json + [ + { + "poolName": "commonExecutor", + "corePoolSize": 1, + "maximumPoolSize": 1, + "queueType": "LinkedBlockingQueue", + "queueCapacity": 2147483647, + "queueSize": 0, + "fair": false, + "queueRemainingCapacity": 2147483647, + "activeCount": 0, + "taskCount": 0, + "completedTaskCount": 0, + "largestPoolSize": 0, + "poolSize": 0, + "waitTaskCount": 0, + "rejectCount": 0, + "rejectHandlerName": null, + "dynamic": false, + "runTimeoutCount": 0, + "queueTimeoutCount": 0 + }, + { + "maxMemory": "4GB", + "totalMemory": "444MB", + "freeMemory": "250.34 MB", + "usableMemory": "3.81GB" + } + ] + ``` 3. Add DynamicTp monitoring under HertzBeat middleware monitoring diff --git a/home/docs/help/iotdb.md b/home/docs/help/iotdb.md index 011b9cbec12..c87f4fba7d6 100644 --- a/home/docs/help/iotdb.md +++ b/home/docs/help/iotdb.md @@ -17,29 +17,29 @@ The main steps are as follows: 1. The metric collection is disabled by default, you need to modify the parameters in `conf/iotdb-metric.yml` first, then restart the server -``` -# Whether to start the monitoring module, the default is false -enableMetric: true - -# Whether to enable operation delay statistics -enablePerformanceStat: false - -# Data provision method, externally provide metrics data through jmx and prometheus protocol, optional parameters: [JMX, PROMETHEUS, IOTDB], IOTDB is closed by default. -metricReporterList: - - JMX - - PROMETHEUS - -# The metric architecture used at the bottom layer, optional parameters: [MICROMETER, DROPWIZARD] -monitorType: MICROMETER - -# Initialize the level of the metric, optional parameters: [CORE, IMPORTANT, NORMAL, ALL] -metricLevel: IMPORTANT - -# Predefined metrics set, optional parameters: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] -predefinedMetrics: - - JVM - - FILE -``` + ``` + # Whether to start the monitoring module, the default is false + enableMetric: true + + # Whether to enable operation delay statistics + enablePerformanceStat: false + + # Data provision method, externally provide metrics data through jmx and prometheus protocol, optional parameters: [JMX, PROMETHEUS, IOTDB], IOTDB is closed by default. + metricReporterList: + - JMX + - PROMETHEUS + + # The metric architecture used at the bottom layer, optional parameters: [MICROMETER, DROPWIZARD] + monitorType: MICROMETER + + # Initialize the level of the metric, optional parameters: [CORE, IMPORTANT, NORMAL, ALL] + metricLevel: IMPORTANT + + # Predefined metrics set, optional parameters: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] + predefinedMetrics: + - JVM + - FILE + ``` 2. Restart IoTDB, open a browser or use curl to access http://servier_ip:9091/metrics, and you can see the metric data. diff --git a/home/docs/help/issue.md b/home/docs/help/issue.md index 9904fab6551..baa62af2101 100644 --- a/home/docs/help/issue.md +++ b/home/docs/help/issue.md @@ -8,50 +8,49 @@ sidebar_label: Common issues 1. **Page feedback:monitor.host: Monitoring Host must be ipv4, ipv6 or domain name** -> As shown in the information, the entered monitoring Host must be ipv4, ipv6 or domain name, and cannot carry a protocol header, such as http + > As shown in the information, the entered monitoring Host must be ipv4, ipv6 or domain name, and cannot carry a protocol header, such as http 2. **The website API and other monitoring feedback statusCode:403 or 401, but the opposite end service itself does not need authentication, and the direct access of the browser is OK** -> Please check whether it is blocked by the firewall. For example, BaoTa/aaPanel have set the blocking of `User-Agent=Apache-HttpClient` in the request header by default. If it is blocked, please delete this blocking rule. (user-agent has been simulated as a browser in the v1.0.beat5 version. This problem does not exist) + > Please check whether it is blocked by the firewall. For example, BaoTa/aaPanel have set the blocking of `User-Agent=Apache-HttpClient` in the request header by default. If it is blocked, please delete this blocking rule. (user-agent has been simulated as a browser in the v1.0.beat5 version. This problem does not exist) 3. Ping connectivity monitoring exception when installing hertzbeat for package deployment. The hertzbeat installed and deployed by the installation package is not available for ping connectivity monitoring, but local direct ping is available 。 -> The deployment of the installation package requires configuring the root permission of the Java virtual machine to start hertzbeat to use ICMP. If the root permission is not enabled, judge whether port 7 of telnet opposite end is opened. -> When you install HertzBeat via DockerDocker root is enabled by default. No such problem. -> See + > The deployment of the installation package requires configuring the root permission of the Java virtual machine to start hertzbeat to use ICMP. If the root permission is not enabled, judge whether port 7 of telnet opposite end is opened. + > When you install HertzBeat via DockerDocker root is enabled by default. No such problem. + > See ### Docker Deployment common issues 1. **MYSQL, TDENGINE and HertzBeat are deployed on the same host by Docker,HertzBeat use localhost or 127.0.0.1 connect to the database but fail** The problems lies in Docker container failed to visit and connect localhost port. Because the docker default network mode is Bridge mode which can't access local machine through localhost. -> Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. -> Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + > Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. + > Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` 2. **According to the process deploy,visit no interface** Please refer to the following points to troubleshoot issues: -> one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. -> two:Check whether dependent service, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. -> ->> three:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. + > one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. + > two:Check whether dependent service, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. + > three:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. 3. **Log an error TDengine connection or insert SQL failed** -> one:Check whether database account and password configured is correct, the database is created. -> two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. + > one:Check whether database account and password configured is correct, the database is created. + > two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. ### Package Deployment common issues 1. **According to the process deploy,visit no interface** Please refer to the following points to troubleshoot issues: -> one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. -> two:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. -> three: Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. + > one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. + > two:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. + > three: Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. 2. **Log an error TDengine connection or insert SQL failed** -> one:Check whether database account and password configured is correct, the database is created. -> two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. + > one:Check whether database account and password configured is correct, the database is created. + > two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. diff --git a/home/docs/help/jetty.md b/home/docs/help/jetty.md index ccec65b5559..2a3f69c13e4 100644 --- a/home/docs/help/jetty.md +++ b/home/docs/help/jetty.md @@ -19,33 +19,33 @@ keywords: [open source monitoring tool, open source jetty web server monitoring 1. Start the JMX JMX-REMOTE module in Jetty -```shell -java -jar $JETTY_HOME/start.jar --add-module=jmx -java -jar $JETTY_HOME/start.jar --add-module=jmx-remote -``` + ```shell + java -jar $JETTY_HOME/start.jar --add-module=jmx + java -jar $JETTY_HOME/start.jar --add-module=jmx-remote + ``` -Successful command execution will create `${JETTY_BASE}/start.d/jmx-remote.ini` configuration file + Successful command execution will create `${JETTY_BASE}/start.d/jmx-remote.ini` configuration file 2. Edit the `${JETTY_BASE}/start.d/jmx-remote.ini` configuration file to modify the JMX IP port and other parameters. -**`localhost` needs to be modified to expose the IP** - -```text -## The host/address to bind the RMI server to. -# jetty.jmxremote.rmiserverhost=localhost - -## The port the RMI server listens to (0 means a random port is chosen). -# jetty.jmxremote.rmiserverport=1099 - -## The host/address to bind the RMI registry to. -# jetty.jmxremote.rmiregistryhost=localhost - -## The port the RMI registry listens to. -# jetty.jmxremote.rmiregistryport=1099 - -## The host name exported in the RMI stub. --Djava.rmi.server.hostname=localhost -``` + **`localhost` needs to be modified to expose the IP** + + ```text + ## The host/address to bind the RMI server to. + # jetty.jmxremote.rmiserverhost=localhost + + ## The port the RMI server listens to (0 means a random port is chosen). + # jetty.jmxremote.rmiserverport=1099 + + ## The host/address to bind the RMI registry to. + # jetty.jmxremote.rmiregistryhost=localhost + + ## The port the RMI registry listens to. + # jetty.jmxremote.rmiregistryport=1099 + + ## The host name exported in the RMI stub. + -Djava.rmi.server.hostname=localhost + ``` 3. Restart Jetty Server. diff --git a/home/docs/help/kubernetes.md b/home/docs/help/kubernetes.md index d7e6b657ea6..836c84f3818 100644 --- a/home/docs/help/kubernetes.md +++ b/home/docs/help/kubernetes.md @@ -17,15 +17,15 @@ Refer to the steps to obtain token 1. Create a service account and bind the default cluster-admin administrator cluster role -```kubectl create serviceaccount dashboard-admin -n kube-system``` + ```kubectl create serviceaccount dashboard-admin -n kube-system``` 2. User Authorization -```shell -kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin -kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' -kubectl describe secret {secret} -n kube-system -``` + ```shell + kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin + kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' + kubectl describe secret {secret} -n kube-system + ``` ### method two diff --git a/home/docs/help/nacos.md b/home/docs/help/nacos.md index f7c8815521f..3eeafc9ac47 100644 --- a/home/docs/help/nacos.md +++ b/home/docs/help/nacos.md @@ -14,9 +14,9 @@ keywords: [open source monitoring tool, open source middleware monitoring tool, 1. Deploy the Nacos cluster according to [deployment document](https://nacos.io/en-us/docs/deployment.html). 2. Configure the application. properties file to expose metrics data. -``` -management.endpoints.web.exposure.include=* -``` + ``` + management.endpoints.web.exposure.include=* + ``` 3. Access ```{ip}:8848/nacos/actuator/prometheus``` to see if metrics data can be accessed. diff --git a/home/docs/help/nginx.md b/home/docs/help/nginx.md index a5662be985f..ce7ccf536a4 100644 --- a/home/docs/help/nginx.md +++ b/home/docs/help/nginx.md @@ -17,95 +17,97 @@ If you want to monitor information in 'Nginx' with this monitoring type, you nee 1. Check if `ngx_http_stub_status_module` has been added -```shell -nginx -V -``` + ```shell + nginx -V + ``` -View whether it contains `--with-http_stub_status_module`, if not, you need to recompile and install Nginx. + View whether it contains `--with-http_stub_status_module`, if not, you need to recompile and install Nginx. 2. Compile and install Nginx, add `ngx_http_stub_status_module` module -Download Nginx and unzip it, execute the following command in the directory + Download Nginx and unzip it, execute the following command in the directory -```shell - -./configure --prefix=/usr/local/nginx --with-http_stub_status_module - -make && make install -``` + ```shell + + ./configure --prefix=/usr/local/nginx --with-http_stub_status_module + + make && make install + ``` 3. Modify Nginx configure file -Modify the `nginx.conf` file and add the monitoring module exposed endpoint, as follows: + Modify the `nginx.conf` file and add the monitoring module exposed endpoint, as follows: -```shell -# modify nginx.conf -server { - listen 80; # port - server_name localhost; - location /nginx-status { - stub_status on; - access_log on; - #allow 127.0.0.1; #only allow requests from localhost - #deny all; #deny all other hosts - } -} -``` + ```shell + # modify nginx.conf + server { + listen 80; # port + server_name localhost; + location /nginx-status { + stub_status on; + access_log on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } + } + ``` 4. Reload Nginx -```shell - -nginx -s reload -``` + ```shell + + nginx -s reload + ``` 5. Access `http://localhost/nginx-status` in the browser to view the Nginx monitoring status information. ### Enable `ngx_http_reqstat_module` -```shell -# install `ngx_http_reqstat_module` -wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip - -unzip ngx_req_status.zip - -patch -p1 < ../ngx_req_status-master/write_filter.patch - -./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master - -make -j2 - -make install -``` +1. Install `ngx_http_reqstat_module` + + ```shell + # install `ngx_http_reqstat_module` + wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip + + unzip ngx_req_status.zip + + patch -p1 < ../ngx_req_status-master/write_filter.patch + + ./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master + + make -j2 + + make install + ``` 2. Modify Nginx configure file -update `nginx.conf` file, add status module exposed endpoint, as follows: - -```shell -# modify nginx.conf -http { - req_status_zone server_name $server_name 256k; - req_status_zone server_addr $server_addr 256k; - - req_status server_name server_addr; - - server { - location /req-status { - req_status_show on; - #allow 127.0.0.1; #only allow requests from localhost - #deny all; #deny all other hosts + update `nginx.conf` file, add status module exposed endpoint, as follows: + + ```shell + # modify nginx.conf + http { + req_status_zone server_name $server_name 256k; + req_status_zone server_addr $server_addr 256k; + + req_status server_name server_addr; + + server { + location /req-status { + req_status_show on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } } } -} -``` + ``` 3. Reload Nginx -```shell - -nginx -s reload -``` + ```shell + + nginx -s reload + ``` 4. Access `http://localhost/req-status` in the browser to view the Nginx monitoring status information. diff --git a/home/docs/help/rabbitmq.md b/home/docs/help/rabbitmq.md index e49d572ee72..91fad16ff1e 100644 --- a/home/docs/help/rabbitmq.md +++ b/home/docs/help/rabbitmq.md @@ -14,9 +14,9 @@ keywords: [open source monitoring tool, open source rabbitmq monitoring tool, mo 1. Open the Management plugin, or use the self-opening version -```shell -rabbitmq-plugins enable rabbitmq_management -``` + ```shell + rabbitmq-plugins enable rabbitmq_management + ``` 2. Access with a browser, and the default account password is `guest/guest`. Successful login means that it is successfully opened. diff --git a/home/docs/help/shenyu.md b/home/docs/help/shenyu.md index aa4a43a8d5c..7bc5f61bdc0 100644 --- a/home/docs/help/shenyu.md +++ b/home/docs/help/shenyu.md @@ -17,27 +17,27 @@ Two Steps Mainly: 1. add metrics plugin dependency in gateway's pom.xml. -```xml - - org.apache.shenyu - shenyu-spring-boot-starter-plugin-metrics - ${project.version} - -``` + ```xml + + org.apache.shenyu + shenyu-spring-boot-starter-plugin-metrics + ${project.version} + + ``` 2. modify this config in shenyu gateway yaml. -```yaml -shenyu: - metrics: - enabled: false #false is close, true is open - name : prometheus - host: 127.0.0.1 - port: 8090 - jmxConfig: - props: - jvm_enabled: true #enable jvm monitoring -``` + ```yaml + shenyu: + metrics: + enabled: false #false is close, true is open + name : prometheus + host: 127.0.0.1 + port: 8090 + jmxConfig: + props: + jvm_enabled: true #enable jvm monitoring + ``` Finally, restart the access gateway metrics endpoint `http://ip:8090` to respond to prometheus format data. diff --git a/home/docs/start/custom-config.md b/home/docs/start/custom-config.md index 7f45b5dd27d..b88a2ff4af4 100644 --- a/home/docs/start/custom-config.md +++ b/home/docs/start/custom-config.md @@ -16,44 +16,44 @@ The installation package can be decompressed and modified in `hertzbeat/config/a 1. Configure the SMS sending server -> Only when your own SMS server is successfully configured, the alarm SMS triggered in the monitoring tool will be sent normally. + > Only when your own SMS server is successfully configured, the alarm SMS triggered in the monitoring tool will be sent normally. -Add the following Tencent platform SMS server configuration in `application.yml` (parameters need to be replaced with your SMS server configuration) + Add the following Tencent platform SMS server configuration in `application.yml` (parameters need to be replaced with your SMS server configuration) -```yaml -common: - sms: - tencent: - secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY - secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA - app-id: 1435441637 - sign-name: XX Technology - template-id: 1343434 -``` + ```yaml + common: + sms: + tencent: + secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY + secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA + app-id: 1435441637 + sign-name: XX Technology + template-id: 1343434 + ``` 2. Configure alarm custom parameters -```yaml -alerter: - # Custom console address - console-url: https://console.tancloud.io -``` + ```yaml + alerter: + # Custom console address + console-url: https://console.tancloud.io + ``` 3. Use external redis instead of memory to store real-time metric data -> By default, the real-time data of our metrics is stored in memory, which can be configured as follows to use redis instead of memory storage. - -Note ⚠️ `memory.enabled: false, redis.enabled: true` - -```yaml -warehouse: - store: - memory: - enabled: false - init-size: 1024 - redis: - enabled: true - host: 127.0.0.1 - port: 6379 - password: 123456 -``` + > By default, the real-time data of our metrics is stored in memory, which can be configured as follows to use redis instead of memory storage. + + Note ⚠️ `memory.enabled: false, redis.enabled: true` + + ```yaml + warehouse: + store: + memory: + enabled: false + init-size: 1024 + redis: + enabled: true + host: 127.0.0.1 + port: 6379 + password: 123456 + ``` diff --git a/home/docs/start/docker-compose-deploy.md b/home/docs/start/docker-compose-deploy.md index f365eff86a2..9caefdbf626 100644 --- a/home/docs/start/docker-compose-deploy.md +++ b/home/docs/start/docker-compose-deploy.md @@ -15,47 +15,47 @@ Run the `docker compose version` command to check if you have a Docker Compose e 1. Download the startup script package -Download the installation script package `apache-hertzbeat-xxx-incubating-docker-compose.tar.gz` from the [download](https://github.com/apache/hertzbeat/releases/download/v1.6.0/apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz) + Download the installation script package `apache-hertzbeat-xxx-incubating-docker-compose.tar.gz` from the [download](https://github.com/apache/hertzbeat/releases/download/v1.6.0/apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz) 2. Choose to use the HertzBeat + PostgreSQL + VictoriaMetrics solution -:::tip + :::tip -- `apache-hertzbeat-xxx-incubating-docker-compose.tar.gz` contains multiple deployment solutions after decompression. Here we recommend choosing the `hertzbeat-postgresql-victoria-metrics` solution. -- Other deployment methods, please read the README.md file of each deployment solution in detail. The MySQL solution requires you to prepare the MySQL driver package yourself. + - `apache-hertzbeat-xxx-incubating-docker-compose.tar.gz` contains multiple deployment solutions after decompression. Here we recommend choosing the `hertzbeat-postgresql-victoria-metrics` solution. + - Other deployment methods, please read the README.md file of each deployment solution in detail. The MySQL solution requires you to prepare the MySQL driver package yourself. -::: + ::: -- Unzip the script package + - Unzip the script package -``` -tar zxvf apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz -``` + ``` + tar zxvf apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz + ``` -- Enter the decompression directory and select `HertzBeat + PostgreSQL + VictoriaMetrics` for one-click deployment + - Enter the decompression directory and select `HertzBeat + PostgreSQL + VictoriaMetrics` for one-click deployment -``` -cd apache-hertzbeat-1.6.0-incubating-docker-compose -cd hertzbeat-postgresql-victoria-metrics -``` + ``` + cd apache-hertzbeat-1.6.0-incubating-docker-compose + cd hertzbeat-postgresql-victoria-metrics + ``` -- One-click start + - One-click start -> Run script in `hertzbeat-postgresql-victoria-metrics` directory + > Run script in `hertzbeat-postgresql-victoria-metrics` directory -``` -docker-compose up -d -``` + ``` + docker-compose up -d + ``` -- View service status + - View service status -> View the running status of each container, up is the normal running status + > View the running status of each container, up is the normal running status -``` -docker-compose ps -``` + ``` + docker-compose ps + ``` -4. Start exploring HertzBeat +3. Start exploring HertzBeat Access in the browser to start exploring and using it. The default account password is admin/hertzbeat. **HAVE FUN** diff --git a/home/docs/start/docker-deploy.md b/home/docs/start/docker-deploy.md index cc4670c16f6..dbc6cd35f85 100644 --- a/home/docs/start/docker-deploy.md +++ b/home/docs/start/docker-deploy.md @@ -17,39 +17,39 @@ It is necessary to have Docker environment in your environment. If not installed 1. Execute the following command -```shell -$ docker run -d -p 1157:1157 -p 1158:1158 \ - -v $(pwd)/data:/opt/hertzbeat/data \ - -v $(pwd)/logs:/opt/hertzbeat/logs \ - -v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml \ - -v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml \ - --restart=always \ - --name hertzbeat apache/hertzbeat -``` - -> Command parameter explanation - -- `docker run -d` : Run a container in the background via Docker -- `-p 1157:1157 -p 1158:1158` : Mapping container ports to the host, 1157 is web-ui port, 1158 is cluster port. -- `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due creating or deleting container. -- `-v $(pwd)/logs:/opt/hertzbeat/logs` : (optional) Mount the log file to the local host to facilitate viewing. -- `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (optional) Mount the configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/application.yml) -- `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (optional) Mount the account configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) -- `-v $(pwd)/ext-lib:/opt/hertzbeat/ext-lib` : (optional) Mount external third-party JAR package [mysql-jdbc](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip) [oracle-jdbc](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) [oracle-i18n](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar) -- `--name hertzbeat` : (optional) Naming container name hertzbeat -- `--restart=always` : (optional) Configure the container to restart automatically. -- `apache/hertzbeat` : Use the [official application mirror](https://hub.docker.com/r/apache/hertzbeat) to start the container, if the network times out, use `quay.io/tancloud/hertzbeat` instead. -- `--network host` : (optional) Use the host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` - -:::tip - -- Marked as optional parameters, non-mandatory items, if not needed, delete them. -- This maps the 1157,1158 ports of the container to the 1157,1158 ports of the host. If the port on the host is already occupied, you need to modify the host mapping port. -- When mounting files, the first parameter is your custom local file address, and the second parameter is the container file address. Make sure you have this file locally when mounting. -- You can execute `docker update --restart=always hertzbeat` to configure the container to restart automatically. -- If you want to use the host network mode to start Docker, you can use `docker run -d --network host .....` - -::: + ```shell + $ docker run -d -p 1157:1157 -p 1158:1158 \ + -v $(pwd)/data:/opt/hertzbeat/data \ + -v $(pwd)/logs:/opt/hertzbeat/logs \ + -v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml \ + -v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml \ + --restart=always \ + --name hertzbeat apache/hertzbeat + ``` + + > Command parameter explanation + + - `docker run -d` : Run a container in the background via Docker + - `-p 1157:1157 -p 1158:1158` : Mapping container ports to the host, 1157 is web-ui port, 1158 is cluster port. + - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due creating or deleting container. + - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (optional) Mount the log file to the local host to facilitate viewing. + - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (optional) Mount the configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (optional) Mount the account configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) + - `-v $(pwd)/ext-lib:/opt/hertzbeat/ext-lib` : (optional) Mount external third-party JAR package [mysql-jdbc](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip) [oracle-jdbc](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) [oracle-i18n](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar) + - `--name hertzbeat` : (optional) Naming container name hertzbeat + - `--restart=always` : (optional) Configure the container to restart automatically. + - `apache/hertzbeat` : Use the [official application mirror](https://hub.docker.com/r/apache/hertzbeat) to start the container, if the network times out, use `quay.io/tancloud/hertzbeat` instead. + - `--network host` : (optional) Use the host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + + :::tip + + - Marked as optional parameters, non-mandatory items, if not needed, delete them. + - This maps the 1157,1158 ports of the container to the 1157,1158 ports of the host. If the port on the host is already occupied, you need to modify the host mapping port. + - When mounting files, the first parameter is your custom local file address, and the second parameter is the container file address. Make sure you have this file locally when mounting. + - You can execute `docker update --restart=always hertzbeat` to configure the container to restart automatically. + - If you want to use the host network mode to start Docker, you can use `docker run -d --network host .....` + + ::: 2. Start to explore HertzBeat Access using browser. You can explore HertzBeat with default account `admin/hertzbeat` now! @@ -65,36 +65,36 @@ By deploying multiple HertzBeat Collectors, high availability, load balancing, a 1. Execute the following command -```shell -$ docker run -d \ - -e IDENTITY=custom-collector-name \ - -e MODE=public \ - -e MANAGER_HOST=127.0.0.1 \ - -e MANAGER_PORT=1158 \ - --name hertzbeat-collector apache/hertzbeat-collector -``` - -> Command parameter explanation - -- `docker run -d` : Run a container in the background via Docker -- `-e IDENTITY=custom-collector-name` : (optional) Set the collector unique identity name. Attention the clusters collector name must unique. -- `-e MODE=public` : set the running mode(public or private), public cluster or private -- `-e MANAGER_HOST=127.0.0.1` : Important, Set the main hertzbeat server ip host, must use the server host instead of 127.0.0.1. -- `-e MANAGER_PORT=1158` : (optional) Set the main hertzbeat server port, default 1158. -- `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (optional) Mount the log file to the local host to facilitate viewing. -- `--name hertzbeat-collector` : Naming container name hertzbeat-collector -- `apache/hertzbeat-collector` : Use the [official application mirror](https://hub.docker.com/r/apache/hertzbeat-collector) to start the container, if the network times out, use `quay.io/tancloud/hertzbeat-collector` instead. -- `--network host` : (optional) Use the host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` - -:::tip - -- Marked as optional parameters, non-mandatory items, if not needed, delete them. -- The `127.0.0.1` in `MANAGER_HOST` needs to be replaced with the external IP address of the HertzBeat Server. -- When mounting files, the first parameter is your custom local file address, and the second parameter is the container file address. Make sure you have this file locally when mounting. -- You can execute `docker update --restart=always hertzbeat-collector` to configure the container to restart automatically. -- If you want to use the host network mode to start Docker, you can use `docker run -d --network host .....` - -::: + ```shell + $ docker run -d \ + -e IDENTITY=custom-collector-name \ + -e MODE=public \ + -e MANAGER_HOST=127.0.0.1 \ + -e MANAGER_PORT=1158 \ + --name hertzbeat-collector apache/hertzbeat-collector + ``` + + > Command parameter explanation + + - `docker run -d` : Run a container in the background via Docker + - `-e IDENTITY=custom-collector-name` : (optional) Set the collector unique identity name. Attention the clusters collector name must unique. + - `-e MODE=public` : set the running mode(public or private), public cluster or private + - `-e MANAGER_HOST=127.0.0.1` : Important, Set the main hertzbeat server ip host, must use the server host instead of 127.0.0.1. + - `-e MANAGER_PORT=1158` : (optional) Set the main hertzbeat server port, default 1158. + - `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (optional) Mount the log file to the local host to facilitate viewing. + - `--name hertzbeat-collector` : Naming container name hertzbeat-collector + - `apache/hertzbeat-collector` : Use the [official application mirror](https://hub.docker.com/r/apache/hertzbeat-collector) to start the container, if the network times out, use `quay.io/tancloud/hertzbeat-collector` instead. + - `--network host` : (optional) Use the host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + + :::tip + + - Marked as optional parameters, non-mandatory items, if not needed, delete them. + - The `127.0.0.1` in `MANAGER_HOST` needs to be replaced with the external IP address of the HertzBeat Server. + - When mounting files, the first parameter is your custom local file address, and the second parameter is the container file address. Make sure you have this file locally when mounting. + - You can execute `docker update --restart=always hertzbeat-collector` to configure the container to restart automatically. + - If you want to use the host network mode to start Docker, you can use `docker run -d --network host .....` + + ::: 2. Access `http://localhost:1157` and you will see the registered new collector in dashboard. @@ -109,49 +109,49 @@ $ docker run -d \ 1. MYSQL, TDENGINE, IoTDB and HertzBeat are deployed on the same host by Docker,HertzBeat use localhost or 127.0.0.1 connect to the database but fail The problems lies in Docker container failed to visit and connect localhost port. Because the docker default network mode is Bridge mode which can't access local machine through localhost. -> Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. -> Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + > Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. + > Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` 2. According to the process deploy,visit no interface Please refer to the following points to troubleshoot issues: -> 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. -> 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. -> 3:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. + > 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. + > 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. + > 3:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. 3. Historical monitoring charts have been missing data for a long time -> 1:Check whether you configure victoria-metrics or Tdengine or IoTDB. No configuration means no historical chart data. -> 2: Check whether IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. + > 1:Check whether you configure victoria-metrics or Tdengine or IoTDB. No configuration means no historical chart data. + > 2: Check whether IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. 4. If the history chart on the monitoring page is not displayed,popup [please configure time series database] -> As shown in the popup window,the premise of history chart display is that you need install and configure hertzbeat's dependency service database. -> Installation and initialization this database, please refer to [Using victoria-metrics to store metrics data](victoria-metrics-init) + > As shown in the popup window,the premise of history chart display is that you need install and configure hertzbeat's dependency service database. + > Installation and initialization this database, please refer to [Using victoria-metrics to store metrics data](victoria-metrics-init) 5. The time series database is installed and configured, but the page still displays a pop-up [Unable to provide historical chart data, please configure dependent time series database] -> Please check if the configuration parameters are correct -> Is time-series database enable set to true -> Note⚠️If both hertzbeat and time-series database 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 time-series database enable set to true + > Note⚠️If both hertzbeat and time-series database 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 6. What is the purpose of application.yml -> This file is the configuration file of HertzBeat, used to configure various parameters of HertzBeat, such as database connection information, time series database configuration, etc. -> Download `application.yml` file to the host directory, for example: $(pwd)/application.yml -> Download source [github/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) -> You can modify the configuration yml file according to your needs. -> -> - If you need to use email to send alarms, you need to replace the email server parameters `spring.mail` in `application.yml` -> - **Recommended** If you need to use an external Mysql database to replace the built-in H2 database, you need to replace the `spring.datasource` parameter in `application.yml` For specific steps, see [Using Mysql to replace H2 database](mysql-change) -> - **Recommended** If you need to use the time series database victoria-metrics to store metric data, you need to replace the `warehouse.store.victoria-metrics` parameter in `application.yml` for specific steps, see [Using victoria-metrics to store metrics data](victoria-metrics-init) + > This file is the configuration file of HertzBeat, used to configure various parameters of HertzBeat, such as database connection information, time series database configuration, etc. + > Download `application.yml` file to the host directory, for example: $(pwd)/application.yml + > Download source [github/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + > You can modify the configuration yml file according to your needs. + > + > - If you need to use email to send alarms, you need to replace the email server parameters `spring.mail` in `application.yml` + > - **Recommended** If you need to use an external Mysql database to replace the built-in H2 database, you need to replace the `spring.datasource` parameter in `application.yml` For specific steps, see [Using Mysql to replace H2 database](mysql-change) + > - **Recommended** If you need to use the time series database victoria-metrics to store metric data, you need to replace the `warehouse.store.victoria-metrics` parameter in `application.yml` for specific steps, see [Using victoria-metrics to store metrics data](victoria-metrics-init) 7. What is the purpose of sureness.yml -> This file is the user configuration file of HertzBeat, used to configure user information of HertzBeat, such as account password, etc. -> HertzBeat default built-in three user accounts, respectively `admin/hertzbeat tom/hertzbeat guest/hertzbeat` -> If you need update account or password, configure `sureness.yml`. Ignore this step without this demand. -> Download and config `sureness.yml` in the host directory,eg:`$(pwd)/sureness.yml` -> Download from [github/script/sureness.yml](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) -> For detail steps, please refer to [Configure Account Password](account-modify) + > This file is the user configuration file of HertzBeat, used to configure user information of HertzBeat, such as account password, etc. + > HertzBeat default built-in three user accounts, respectively `admin/hertzbeat tom/hertzbeat guest/hertzbeat` + > If you need update account or password, configure `sureness.yml`. Ignore this step without this demand. + > Download and config `sureness.yml` in the host directory,eg:`$(pwd)/sureness.yml` + > Download from [github/script/sureness.yml](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) + > For detail steps, please refer to [Configure Account Password](account-modify) diff --git a/home/docs/start/greptime-init.md b/home/docs/start/greptime-init.md index 881e6faa0e2..57b4e9504b8 100644 --- a/home/docs/start/greptime-init.md +++ b/home/docs/start/greptime-init.md @@ -17,28 +17,28 @@ It's designed to work on infrastructure of the cloud era, and users benefit from ### Install GreptimeDB via Docker > Refer to the official website [installation tutorial](https://docs.greptime.com/getting-started/overview) -> -> 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 GreptimeDB with Docker - -```shell -$ docker run -p 127.0.0.1:4000-4003:4000-4003 \ - -v "$(pwd)/greptimedb:/tmp/greptimedb" \ - --name greptime --rm \ - greptime/greptimedb:latest standalone start \ - --http-addr 0.0.0.0:4000 \ - --rpc-addr 0.0.0.0:4001 \ - --mysql-addr 0.0.0.0:4002 \ - --postgres-addr 0.0.0.0:4003 -``` + +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. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install GreptimeDB with Docker + + ```shell + $ docker run -p 127.0.0.1:4000-4003:4000-4003 \ + v "$(pwd)/greptimedb:/tmp/greptimedb" \ + --name greptime --rm \ + greptime/greptimedb:latest standalone start \ + --http-addr 0.0.0.0:4000 \ + --rpc-addr 0.0.0.0:4001 \ + --mysql-addr 0.0.0.0:4002 \ + --postgres-addr 0.0.0.0:4003 + ``` `-v "$(pwd)/greptimedb:/tmp/greptimedb"` is local persistent mount of greptimedb data directory. `$(pwd)/greptimedb` should be replaced with the actual local directory, default is the `greptimedb` directory under the current directory. use```$ docker ps``` to check if the database started successfully @@ -50,24 +50,24 @@ use```$ docker ps``` to check if the database started successfully 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` Replace `warehouse.store.greptime` data source parameters, URL account and password. -```yaml -warehouse: - store: - # disable jpa - jpa: - enabled: false - # enable greptime - greptime: - enabled: true - grpc-endpoints: localhost:4001 - url: jdbc:mysql://localhost:4002/hertzbeat?connectionTimeZone=Asia/Shanghai&forceConnectionTimeZoneToSession=true - driver-class-name: com.mysql.cj.jdbc.Driver - username: greptime - password: greptime - expire-time: 30d -``` - -The default database is `hertzbeat` in the `url`, and it will be created automatically. The `expire-time` specifies the TTL(time-to-live) of the auto-created database, it's 30 days by default. + ```yaml + warehouse: + store: + # disable jpa + jpa: + enabled: false + # enable greptime + greptime: + enabled: true + grpc-endpoints: localhost:4001 + url: jdbc:mysql://localhost:4002/hertzbeat?connectionTimeZone=Asia/Shanghai&forceConnectionTimeZoneToSession=true + driver-class-name: com.mysql.cj.jdbc.Driver + username: greptime + password: greptime + expire-time: 30d + ``` + + The default database is `hertzbeat` in the `url`, and it will be created automatically. The `expire-time` specifies the TTL(time-to-live) of the auto-created database, it's 30 days by default. 2. Restart HertzBeat @@ -75,4 +75,4 @@ The default database is `hertzbeat` in the `url`, and it will be created automat 1. Do both the time series databases Greptime, IoTDB or 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. + > 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. diff --git a/home/docs/start/influxdb-init.md b/home/docs/start/influxdb-init.md index 50b86344279..8f11e9c4c91 100644 --- a/home/docs/start/influxdb-init.md +++ b/home/docs/start/influxdb-init.md @@ -23,26 +23,26 @@ Note⚠️ Need InfluxDB 1.x Version. ### 2. Install TDengine via Docker > Refer to the official website [installation tutorial](https://hub.docker.com/_/influxdb) -> -> 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 InfluxDB with Docker -> -> ``` -> $ docker run -p 8086:8086 \ -> -v /opt/influxdb:/var/lib/influxdb \ -> influxdb:1.8 -> ``` -> -> `-v /opt/influxdb:/var/lib/influxdb` is local persistent mount of InfluxDB data directory. `/opt/influxdb` should be replaced with the actual local directory. -> use```$ docker ps``` to check if the database started successfully + +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. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install InfluxDB with Docker + + ```shell + $ docker run -p 8086:8086 \ + -v /opt/influxdb:/var/lib/influxdb \ + influxdb:1.8 + ``` + + `-v /opt/influxdb:/var/lib/influxdb` is local persistent mount of InfluxDB data directory. `/opt/influxdb` should be replaced with the actual local directory. + use```$ docker ps``` to check if the database started successfully ### Configure the database connection in hertzbeat `application.yml` configuration file @@ -51,21 +51,21 @@ Note⚠️ Need InfluxDB 1.x Version. 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` Replace `warehouse.store.influxdb` data source parameters, URL account and password. -```yaml -warehouse: - store: - # disable jpa - jpa: - enabled: false - # enable influxdb - influxdb: - enabled: true - server-url: http://localhost:8086 - username: root - password: root - expire-time: '30d' - replication: 1 -``` + ```yaml + warehouse: + store: + # disable jpa + jpa: + enabled: false + # enable influxdb + influxdb: + enabled: true + server-url: http://localhost:8086 + username: root + password: root + expire-time: '30d' + replication: 1 + ``` 2. Restart HertzBeat @@ -73,4 +73,4 @@ warehouse: 1. Do both the time series databases InfluxDB, 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. + > 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. diff --git a/home/docs/start/iotdb-init.md b/home/docs/start/iotdb-init.md index d2838a83a6d..db3a6233f0e 100644 --- a/home/docs/start/iotdb-init.md +++ b/home/docs/start/iotdb-init.md @@ -24,22 +24,22 @@ Apache IoTDB is a software system that integrates the collection, storage, manag 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. - ``` + ```shell $ docker -v Docker version 20.10.12, build e91ed57 ``` 2. Install IoTDB via Docker -```shell -$ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ - -v /opt/iotdb/data:/iotdb/data \ - --name iotdb \ - apache/iotdb:1.2.2-standalone -``` + ```shell + $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ + -v /opt/iotdb/data:/iotdb/data \ + --name iotdb \ + 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 @@ -47,61 +47,61 @@ use```$ docker ps``` to check if the database started successfully 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: - store: - # disable JPA - jpa: - enabled: false - # enable iot-db - iot-db: - enabled: true - host: 127.0.0.1 - rpc-port: 6667 - username: root - password: root - query-timeout-in-ms: -1 - # default '7776000000'(90days,unit:ms,-1:no-expire) - expire-time: '7776000000' -``` - -**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 - # 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: - -| 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 | deprecated | -| 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. + ```yml + warehouse: + store: + # disable JPA + jpa: + enabled: false + # enable iot-db + iot-db: + enabled: true + host: 127.0.0.1 + rpc-port: 6667 + username: root + password: root + query-timeout-in-ms: -1 + # default '7776000000'(90days,unit:ms,-1:no-expire) + expire-time: '7776000000' + ``` + + **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 + # 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: + + | 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 | deprecated | + | 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 @@ -109,15 +109,15 @@ Configuration parameters: 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. + > 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 + > 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/docs/start/package-deploy.md b/home/docs/start/package-deploy.md index 6280b634a59..56a7313ed91 100644 --- a/home/docs/start/package-deploy.md +++ b/home/docs/start/package-deploy.md @@ -24,15 +24,15 @@ Deployment via package relies on Java runtime environment, ensure you have Java1 tar zxvf apache-hertzbeat-xxx-incubating-bin.tar.gz ``` -:::tip -The configuration file is located in `config/application.yml`, you can modify the configuration file according to your needs to configure external dependent services, such as databases, time series databases, etc. -HertzBeat defaults to using internal services when started, but it is recommended to switch to external database services in production environments. -::: + :::tip + The configuration file is located in `config/application.yml`, you can modify the configuration file according to your needs to configure external dependent services, such as databases, time series databases, etc. + HertzBeat defaults to using internal services when started, but it is recommended to switch to external database services in production environments. + ::: -It is recommended to use [PostgreSQL](postgresql-change) for metadata storage and [VictoriaMetrics](victoria-metrics-init) for metric data storage. Specific steps are as follows + It is recommended to use [PostgreSQL](postgresql-change) for metadata storage and [VictoriaMetrics](victoria-metrics-init) for metric data storage. Specific steps are as follows -- [Switch built-in H2 database to PostgreSQL](postgresql-change) -- [Using VictoriaMetrics to store metric data](victoria-metrics-init) + - [Switch built-in H2 database to PostgreSQL](postgresql-change) + - [Using VictoriaMetrics to store metric data](victoria-metrics-init) 3. Configure the account file(optional) @@ -68,32 +68,32 @@ Deploying multiple HertzBeat Collectors can achieve high availability, load bala 2. Configure the collector configuration file -Unzip the installation package to the host eg: /opt/hertzbeat-collector - -``` -tar zxvf apache-hertzbeat-collector-xxx-incubating-bin.tar.gz -``` + Unzip the installation package to the host eg: /opt/hertzbeat-collector -Configure the collector configuration yml file `config/application.yml`: unique `identity` name, running `mode` (public or private), hertzbeat `manager-host`, hertzbeat `manager-port` + ``` + tar zxvf apache-hertzbeat-collector-xxx-incubating-bin.tar.gz + ``` -```yaml -collector: - dispatch: - entrance: - netty: - enabled: true - identity: ${IDENTITY:} - mode: ${MODE:public} - manager-host: ${MANAGER_HOST:127.0.0.1} - manager-port: ${MANAGER_PORT:1158} -``` + Configure the collector configuration yml file `config/application.yml`: unique `identity` name, running `mode` (public or private), hertzbeat `manager-host`, hertzbeat `manager-port` + + ```yaml + collector: + dispatch: + entrance: + netty: + enabled: true + identity: ${IDENTITY:} + mode: ${MODE:public} + manager-host: ${MANAGER_HOST:127.0.0.1} + manager-port: ${MANAGER_PORT:1158} + ``` -> Parameters detailed explanation + > Parameters detailed explanation -- `identity` : (optional) Set the unique identifier name of the collector. Note that the name of the collector must be unique when there are multiple collectors. -- `mode` : Configure the running mode (public or private), public cluster mode or private cloud-edge mode. -- `manager-host` : Important, configure the address of the connected HertzBeat Server, -- `manager-port` : (optional) Configure the port of the connected HertzBeat Server, default 1158. + - `identity` : (optional) Set the unique identifier name of the collector. Note that the name of the collector must be unique when there are multiple collectors. + - `mode` : Configure the running mode (public or private), public cluster mode or private cloud-edge mode. + - `manager-host` : Important, configure the address of the connected HertzBeat Server, + - `manager-port` : (optional) Configure the port of the connected HertzBeat Server, default 1158. 3. Start the service @@ -127,6 +127,6 @@ collector: 2. According to the process deploy,visit no interface Please refer to the following points to troubleshoot issues: -> 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. -> 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. -> 3:Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. + > 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. + > 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. + > 3:Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. diff --git a/home/docs/start/quickstart.md b/home/docs/start/quickstart.md index 0911ef7a32c..830fc8f9d64 100644 --- a/home/docs/start/quickstart.md +++ b/home/docs/start/quickstart.md @@ -16,20 +16,20 @@ sidebar_label: Quick Start 1. Just one command to get started: -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` 2. Access `http://localhost:1157` to start, default account: `admin/hertzbeat` 3. Deploy collector clusters(Optional) -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ``` + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -- `-e IDENTITY=custom-collector-name` : set the collector unique identity name. -- `-e MODE=public` : set the running mode(public or private), public cluster or private cloud-edge. -- `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. -- `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. + - `-e IDENTITY=custom-collector-name` : set the collector unique identity name. + - `-e MODE=public` : set the running mode(public or private), public cluster or private cloud-edge. + - `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. + - `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.apache.org/docs/start/docker-deploy) diff --git a/home/docs/start/sslcert-practice.md b/home/docs/start/sslcert-practice.md index ecd1b8bbe12..d02a4da679c 100644 --- a/home/docs/start/sslcert-practice.md +++ b/home/docs/start/sslcert-practice.md @@ -18,7 +18,7 @@ github: 1. The `docker` environment can be installed with just one command -`docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` + `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` 2. After the installation is successful, the browser can access `localhost:1157` to start, the default account password is `admin/hertzbeat` @@ -26,62 +26,62 @@ github: 1. Click Add SSL Certificate Monitor -> System Page -> Monitor Menu -> SSL Certificate -> Add SSL Certificate + > System Page -> Monitor Menu -> SSL Certificate -> Add SSL Certificate -![](/img/docs/start/ssl_1.png) + ![](/img/docs/start/ssl_1.png) 2. Configure the monitoring website -> Here we take the example of monitoring Baidu website, configure monitoring host domain name, name, collection interval, etc. -> Click OK Note ⚠️Before adding, it will test the connectivity of the website by default, and the connection will be successful before adding. Of course, you can also gray out the **Test or not** button. + > Here we take the example of monitoring Baidu website, configure monitoring host domain name, name, collection interval, etc. + > Click OK Note ⚠️Before adding, it will test the connectivity of the website by default, and the connection will be successful before adding. Of course, you can also gray out the **Test or not** button. -![](/img/docs/start/ssl_2.png) + ![](/img/docs/start/ssl_2.png) 3. View the detection index data -> In the monitoring list, you can view the monitoring status, and in the monitoring details, you can view the metric data chart, etc. + > In the monitoring list, you can view the monitoring status, and in the monitoring details, you can view the metric data chart, etc. -![](/img/docs/start/ssl_3.png) + ![](/img/docs/start/ssl_3.png) -![](/img/docs/start/ssl_11.png) + ![](/img/docs/start/ssl_11.png) 4. Set the threshold (triggered when the certificate expires) -> System Page -> Alarms -> Alarm Thresholds -> New Thresholds + > System Page -> Alarms -> Alarm Thresholds -> New Thresholds -![](/img/docs/start/ssl_4.png) + ![](/img/docs/start/ssl_4.png) -> Configure the threshold, select the SSL certificate metric object, configure the alarm expression-triggered when the metric `expired` is `true`, that is, `equals(expired,"true")`, set the alarm level notification template information, etc. + > Configure the threshold, select the SSL certificate metric object, configure the alarm expression-triggered when the metric `expired` is `true`, that is, `equals(expired,"true")`, set the alarm level notification template information, etc. -![](/img/docs/start/ssl_5.png) + ![](/img/docs/start/ssl_5.png) -> Associating thresholds with monitoring, in the threshold list, set which monitoring this threshold applies to. + > Associating thresholds with monitoring, in the threshold list, set which monitoring this threshold applies to. -![](/img/docs/start/ssl_6.png) + ![](/img/docs/start/ssl_6.png) 5. Set the threshold (triggered one week before the certificate expires) -> In the same way, add a new configuration threshold and configure an alarm expression - when the metric expires timestamp `end_timestamp`, the `now()` function is the current timestamp, if the configuration triggers an alarm one week in advance: `end_timestamp <= (now( ) + 604800000)` , where `604800000` is the 7-day total time difference in milliseconds. + > In the same way, add a new configuration threshold and configure an alarm expression - when the metric expires timestamp `end_timestamp`, the `now()` function is the current timestamp, if the configuration triggers an alarm one week in advance: `end_timestamp <= (now( ) + 604800000)` , where `604800000` is the 7-day total time difference in milliseconds. -![](/img/docs/start/ssl_7.png) + ![](/img/docs/start/ssl_7.png) -> Finally, you can see the triggered alarm in the alarm center. + > Finally, you can see the triggered alarm in the alarm center. -![](/img/docs/start/ssl_8.png) + ![](/img/docs/start/ssl_8.png) 6. Alarm notification (in time notification via Dingding WeChat Feishu, etc.) -> Monitoring Tool -> Alarm Notification -> New Receiver + > Monitoring Tool -> Alarm Notification -> New Receiver -![](/img/docs/start/ssl_10.png) + ![](/img/docs/start/ssl_10.png) -For token configuration such as Dingding WeChat Feishu, please refer to the help document + For token configuration such as Dingding WeChat Feishu, please refer to the help document - + -> Alarm Notification -> New Alarm Notification Policy -> Enable Notification for the Recipient Just Configured + > Alarm Notification -> New Alarm Notification Policy -> Enable Notification for the Recipient Just Configured -![](/img/docs/start/ssl_11.png) + ![](/img/docs/start/ssl_11.png) 7. OK When the threshold is triggered, we can receive the corresponding alarm message. If there is no notification, you can also view the alarm information in the alarm center. diff --git a/home/docs/start/tdengine-init.md b/home/docs/start/tdengine-init.md index 29ea511c6d3..82f269cb0f1 100644 --- a/home/docs/start/tdengine-init.md +++ b/home/docs/start/tdengine-init.md @@ -19,28 +19,28 @@ Note⚠️ Need TDengine 3.x Version. ### Install TDengine via Docker > Refer to the official website [installation tutorial](https://docs.taosdata.com/get-started/docker/) -> -> 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 TDengine with Docker -> -> ```shell -> $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ -> -v /opt/taosdata:/var/lib/taos \ -> --name tdengine -e TZ=Asia/Shanghai \ -> tdengine/tdengine:3.0.4.0 -> ``` -> -> `-v /opt/taosdata:/var/lib/taos` is local persistent mount of TDengine data directory. `/opt/taosdata` should be replaced with the actual local directory. -> `-e TZ="Asia/Shanghai"` can set time zone for TDengine.Set up the corresponding time zone you want. -> use```$ docker ps``` to check if the database started successfully + +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. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install TDengine with Docker + + ```shell + $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ + -v /opt/taosdata:/var/lib/taos \ + --name tdengine -e TZ=Asia/Shanghai \ + tdengine/tdengine:3.0.4.0 + ``` + + `-v /opt/taosdata:/var/lib/taos` is local persistent mount of TDengine data directory. `/opt/taosdata` should be replaced with the actual local directory. + `-e TZ="Asia/Shanghai"` can set time zone for TDengine.Set up the corresponding time zone you want. + use```$ docker ps``` to check if the database started successfully ### Create database instance @@ -88,20 +88,20 @@ Note⚠️ Need TDengine 3.x Version. 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` Replace `warehouse.store.td-engine` data source parameters, URL account and password. -```yaml -warehouse: - store: - # disable jpa - jpa: - enabled: false - # enable td-engine - td-engine: - enabled: true - driver-class-name: com.taosdata.jdbc.rs.RestfulDriver - url: jdbc:TAOS-RS://localhost:6041/hertzbeat - username: root - password: taosdata -``` + ```yaml + warehouse: + store: + # disable jpa + jpa: + enabled: false + # enable td-engine + td-engine: + enabled: true + driver-class-name: com.taosdata.jdbc.rs.RestfulDriver + url: jdbc:TAOS-RS://localhost:6041/hertzbeat + username: root + password: taosdata + ``` 2. Restart HertzBeat @@ -109,19 +109,19 @@ warehouse: 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. + > 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 + > 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 historical picture of monitoring details is not displayed or has no data, and TDengine has been deployed -> Please confirm whether the installed TDengine version is 3.x, version 2.x are not compatible. + > Please confirm whether the installed TDengine version is 3.x, version 2.x are not compatible. 4. 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/docs/start/victoria-metrics-init.md b/home/docs/start/victoria-metrics-init.md index f9ca1c86216..b89b26a8fa3 100644 --- a/home/docs/start/victoria-metrics-init.md +++ b/home/docs/start/victoria-metrics-init.md @@ -18,27 +18,27 @@ VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and t ### Install VictoriaMetrics via Docker > Refer to the official website [installation tutorial](https://docs.victoriametrics.com/Quick-Start.html#how-to-install) -> -> 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 -> ``` + +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 VictoriaMetrics via Docker -```shell -$ docker run -d -p 8428:8428 \ - -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ - --name victoria-metrics \ - victoriametrics/victoria-metrics:v1.95.1 -``` + ```shell + $ docker run -d -p 8428:8428 \ + -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ + --name victoria-metrics \ + victoriametrics/victoria-metrics:v1.95.1 + ``` -`-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` is local persistent mount of VictoriaMetrics data directory -use```$ docker ps``` to check if the database started successfully + `-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` is local persistent mount of VictoriaMetrics data directory + use```$ docker ps``` to check if the database started successfully 3. Configure the database connection in hertzbeat `application.yml`configuration file @@ -46,19 +46,19 @@ use```$ docker ps``` to check if the database started successfully 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.victoria-metrics` data source parameters, HOST account and password. -```yaml -warehouse: - store: - # disable JPA - jpa: - enabled: false - # enable victoria-metrics - victoria-metrics: - enabled: true - url: http://localhost:8428 - username: root - password: root -``` + ```yaml + warehouse: + store: + # disable JPA + jpa: + enabled: false + # enable victoria-metrics + victoria-metrics: + enabled: true + url: http://localhost:8428 + username: root + password: root + ``` 4. Restart HertzBeat @@ -66,4 +66,4 @@ warehouse: 1. Do both the time series databases 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 can affects the historical chart data. + > 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 can affects the historical chart data. diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2022-09-10-ssl-practice.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2022-09-10-ssl-practice.md index 9acd22c2e76..2569c5bd33e 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2022-09-10-ssl-practice.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2022-09-10-ssl-practice.md @@ -24,11 +24,11 @@ gitee: #### 安装 HertzBeat -1.如果不想安装可以直接使用云服务 [TanCloud探云 console.tancloud.cn](https://console.tancloud.cn) +1. 如果不想安装可以直接使用云服务 [TanCloud探云 console.tancloud.cn](https://console.tancloud.cn) 2. `docker` 环境仅需一条命令即可安装 -`docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` + `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` 3. 安装成功浏览器访问 `localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` @@ -36,63 +36,63 @@ gitee: 1. 点击新增SSL证书监控 -> 系统页面 -> 监控菜单 -> SSL证书 -> 新增SSL证书 + > 系统页面 -> 监控菜单 -> SSL证书 -> 新增SSL证书 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/bd53f343a5b54feab62e71458d076441~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/bd53f343a5b54feab62e71458d076441~tplv-k3u1fbpfcp-zoom-1.image) 2. 配置监控网站 -> 我们这里举例监控百度网站, 配置监控host域名,名称,采集间隔等。 -> 点击确定 注意⚠️新增前默认会先去测试网站连接性,连接成功才会新增,当然也可以把**是否测试**按钮置灰。 + > 我们这里举例监控百度网站, 配置监控host域名,名称,采集间隔等。 + > 点击确定 注意⚠️新增前默认会先去测试网站连接性,连接成功才会新增,当然也可以把**是否测试**按钮置灰。 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ad1154670648413bb82c8bdeb5b13609~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ad1154670648413bb82c8bdeb5b13609~tplv-k3u1fbpfcp-zoom-1.image) 3. 查看检测指标数据 -> 在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。 + > 在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f874b45e909c4bb0acdd28b3fb034a61~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/f874b45e909c4bb0acdd28b3fb034a61~tplv-k3u1fbpfcp-zoom-1.image) -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ef5d7443f8c04818ae5aa28d421203be~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/ef5d7443f8c04818ae5aa28d421203be~tplv-k3u1fbpfcp-zoom-1.image) 4. 设置阈值(证书过期时触发) -> 系统页面 -> 告警 -> 告警阈值 -> 新增阈值 + > 系统页面 -> 告警 -> 告警阈值 -> 新增阈值 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/8d6205172d43463aa34e534477f132f1~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/8d6205172d43463aa34e534477f132f1~tplv-k3u1fbpfcp-zoom-1.image) -> 配置阈值,选择SSL证书指标对象,配置告警表达式-当指标`expired`为`true`触发,即`equals(expired,"true")` , 设置告警级别通知模版信息等。 + > 配置阈值,选择SSL证书指标对象,配置告警表达式-当指标`expired`为`true`触发,即`equals(expired,"true")` , 设置告警级别通知模版信息等。 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/83d17b381d994f26a6240e01915b2001~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/83d17b381d994f26a6240e01915b2001~tplv-k3u1fbpfcp-zoom-1.image) -> 关联阈值与监控, 在阈值列表设置此阈值应用于哪些监控。 + > 关联阈值与监控, 在阈值列表设置此阈值应用于哪些监控。 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/9b9063d7bcf9454387be0491fc382bd1~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/9b9063d7bcf9454387be0491fc382bd1~tplv-k3u1fbpfcp-zoom-1.image) 5. 设置阈值(证书过期前一周触发) -> 同理如上,新增配置阈值,配置告警表达式-当指标有效期时间戳 `end_timestamp`,`now()`函数为当前时间戳,若配置提前一周触发告警即:`end_timestamp <= (now() + 604800000)` , 其中 `604800000` 为7天总时间差毫秒值。 + > 同理如上,新增配置阈值,配置告警表达式-当指标有效期时间戳 `end_timestamp`,`now()`函数为当前时间戳,若配置提前一周触发告警即:`end_timestamp <= (now() + 604800000)` , 其中 `604800000` 为7天总时间差毫秒值。 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0d6f837f57c247e09f668f60eff4a0ff~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/0d6f837f57c247e09f668f60eff4a0ff~tplv-k3u1fbpfcp-zoom-1.image) -> 最终可以在告警中心看到已触发的告警。 + > 最终可以在告警中心看到已触发的告警。 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5a61b23127524976b2c209ce0ca6a339~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/5a61b23127524976b2c209ce0ca6a339~tplv-k3u1fbpfcp-zoom-1.image) 6. 告警通知(通过钉钉微信飞书等及时通知) -> 监控系统 -> 告警通知 -> 新增接收人 + > 监控系统 -> 告警通知 -> 新增接收人 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7f36956060ef410a82bbecafcbb2957f~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/7f36956060ef410a82bbecafcbb2957f~tplv-k3u1fbpfcp-zoom-1.image) -钉钉微信飞书等token配置可以参考帮助文档 + 钉钉微信飞书等token配置可以参考帮助文档 - - + + -> 告警通知 -> 新增告警通知策略 -> 将刚才配置的接收人启用通知 + > 告警通知 -> 新增告警通知策略 -> 将刚才配置的接收人启用通知 -![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d976343e81f843138344a039f3aff8a3~tplv-k3u1fbpfcp-zoom-1.image) + ![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/d976343e81f843138344a039f3aff8a3~tplv-k3u1fbpfcp-zoom-1.image) 7. OK 当阈值触发后我们就可以收到对应告警消息啦,如果没有配通知,也可以在告警中心查看告警信息。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-01-05-monitor-iotdb.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-01-05-monitor-iotdb.md index 54f307891f3..519b35f1287 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-01-05-monitor-iotdb.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-01-05-monitor-iotdb.md @@ -32,15 +32,15 @@ keywords: [开源监控系统, 开源数据库监控, IotDB数据库监控] 1. metric 采集默认是关闭的,需要先到 `conf/iotdb-metric.yml` 中修改参数打开后重启 server -``` -# 是否启动监控模块,默认为false -enableMetric: true - -# 数据提供方式,对外部通过jmx和prometheus协议提供metrics的数据, 可选参数:[JMX, PROMETHEUS, IOTDB],IOTDB是默认关闭的。 -metricReporterList: - - JMX - - PROMETHEUS -``` + ``` + # 是否启动监控模块,默认为false + enableMetric: true + + # 数据提供方式,对外部通过jmx和prometheus协议提供metrics的数据, 可选参数:[JMX, PROMETHEUS, IOTDB],IOTDB是默认关闭的。 + metricReporterList: + - JMX + - PROMETHEUS + ``` 2. 重启 IoTDB, 打开浏览器或者用curl 访问 , 就能看到metric数据了。 @@ -48,28 +48,28 @@ metricReporterList: 1. 点击新增IoTDB监控 -路径:菜单 -> 数据库监控 -> IoTDB监控 -> 新增IoTDB监控 + 路径:菜单 -> 数据库监控 -> IoTDB监控 -> 新增IoTDB监控 -![hertzbeat](/img/blog/monitor-iotdb-1.png) + ![hertzbeat](/img/blog/monitor-iotdb-1.png) 2. 配置监控IoTDB所需参数 -在监控页面填写 IoTDB **服务IP**,**监控端口**(默认9091),最后点击确定添加即可。 -其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/iotdb/) + 在监控页面填写 IoTDB **服务IP**,**监控端口**(默认9091),最后点击确定添加即可。 + 其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/iotdb/) -![hertzbeat](/img/blog/monitor-iotdb-2.png) + ![hertzbeat](/img/blog/monitor-iotdb-2.png) 3. 完成✅,现在我们已经添加好对 IoTDB 的监控了,查看监控列表即可看到我们的添加项。 -![hertzbeat](/img/blog/monitor-iotdb-3.png) + ![hertzbeat](/img/blog/monitor-iotdb-3.png) 4. 点击监控列表项的**操作**->**监控详情图标** 即可浏览 IoTDB的实时监控指标数据。 -![hertzbeat](/img/blog/monitor-iotdb-4.png) + ![hertzbeat](/img/blog/monitor-iotdb-4.png) 5. 点击**监控历史详情TAB** 即可浏览 IoTDB的历史监控指标数据图表📈。 -![hertzbeat](/img/blog/monitor-iotdb-5.png) + ![hertzbeat](/img/blog/monitor-iotdb-5.png) **完成DONE!通过上面几步,总结起来其实也就是两步** @@ -84,29 +84,29 @@ metricReporterList: 1. 对某个重要指标配置阈值告警 -路径:菜单 -> 告警阈值 -> 新增阈值 + 路径:菜单 -> 告警阈值 -> 新增阈值 -- 选择配置的指标对象,IotDB监控有非常多的指标,其中有个指标关系到节点的状态 `cluster_node_status` -> `status` (节点状态,1=online 2=offline)。 -- 这里我们就配置当此指标 `status==2` 时发出告警,告警级别为**紧急告警**,一次即触发,具体如下图。 + - 选择配置的指标对象,IotDB监控有非常多的指标,其中有个指标关系到节点的状态 `cluster_node_status` -> `status` (节点状态,1=online 2=offline)。 + - 这里我们就配置当此指标 `status==2` 时发出告警,告警级别为**紧急告警**,一次即触发,具体如下图。 -![hertzbeat](/img/blog/monitor-iotdb-6.png) + ![hertzbeat](/img/blog/monitor-iotdb-6.png) 2. 新增消息通知接收人 -路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 + 路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 -消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 + 消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 -- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 -- 在 HertzBeat 配置接收人参数如下。 + - 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 + - 在 HertzBeat 配置接收人参数如下。 -【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 + 【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. 配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】 -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### 完毕,现在坐等告警消息过来了。叮叮叮叮 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-01-08-monitor-shenyu.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-01-08-monitor-shenyu.md index bf6a47a7e8e..74e87d11991 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-01-08-monitor-shenyu.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-01-08-monitor-shenyu.md @@ -42,27 +42,27 @@ tags: [opensource, practice] 1. 在网关的 `pom.xml` 文件中添加 `metrics插件` 的依赖。 -```xml - - org.apache.shenyu - shenyu-spring-boot-starter-plugin-metrics - ${project.version} - -``` + ```xml + + org.apache.shenyu + shenyu-spring-boot-starter-plugin-metrics + ${project.version} + + ``` 2. `metric`插件 采集默认是关闭的, 在网关的配置`yaml`文件中编辑如下内容: -```yaml -shenyu: - metrics: - enabled: true #设置为 true 表示开启 - name : prometheus - host: 127.0.0.1 #暴露的ip - port: 8090 #暴露的端口 - jmxConfig: #jmx配置 - props: - jvm_enabled: true #开启jvm的监控指标 -``` + ```yaml + shenyu: + metrics: + enabled: true #设置为 true 表示开启 + name : prometheus + host: 127.0.0.1 #暴露的ip + port: 8090 #暴露的端口 + jmxConfig: #jmx配置 + props: + jvm_enabled: true #开启jvm的监控指标 + ``` 3. 重启 ShenYu网关, 打开浏览器或者用curl 访问 `http://ip:8090`, 就能看到metric数据了。 @@ -70,30 +70,30 @@ shenyu: 1. 点击新增 ShenYu 监控 -路径:菜单 -> 中间件监控 -> ShenYu监控 -> 新增ShenYu监控 + 路径:菜单 -> 中间件监控 -> ShenYu监控 -> 新增ShenYu监控 -![hertzbeat](/img/blog/monitor-shenyu-1.png) + ![hertzbeat](/img/blog/monitor-shenyu-1.png) 2. 配置监控 ShenYu 所需参数 -在监控页面填写 ShenYu **服务IP**,**监控端口**(默认8090),最后点击确定添加即可。 -其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/shenyu/) + 在监控页面填写 ShenYu **服务IP**,**监控端口**(默认8090),最后点击确定添加即可。 + 其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/shenyu/) -![hertzbeat](/img/blog/monitor-shenyu-1.png) + ![hertzbeat](/img/blog/monitor-shenyu-1.png) 3. 完成✅,现在我们已经添加好对 ShenYu 的监控了,查看监控列表即可看到我们的添加项。 -![hertzbeat](/img/blog/monitor-shenyu-3.png) + ![hertzbeat](/img/blog/monitor-shenyu-3.png) 4. 点击监控列表项的**操作**->**监控详情图标** 即可浏览 ShenYu 的实时监控指标数据。 -![hertzbeat](/img/blog/monitor-shenyu-4.png) + ![hertzbeat](/img/blog/monitor-shenyu-4.png) 5. 点击**监控历史详情TAB** 即可浏览 ShenYu 的历史监控指标数据图表📈。 -![hertzbeat](/img/blog/monitor-shenyu-5.png) + ![hertzbeat](/img/blog/monitor-shenyu-5.png) -![hertzbeat](/img/blog/monitor-shenyu-6.png) + ![hertzbeat](/img/blog/monitor-shenyu-6.png) **DONE!完成啦!通过上面几步,总结起来其实也就只用两步** @@ -111,33 +111,33 @@ shenyu: 1. 对某个重要指标配置告警阈值 -路径:菜单 -> 告警阈值 -> 新增阈值 + 路径:菜单 -> 告警阈值 -> 新增阈值 -- 选择配置的指标对象,ShenYu 监控有非常多的指标,我们举例对 `打开的文件描述符的数量` `process_open_fds` -> `value` 这个指标进行阈值设置, 当服务端打开文件描述符数量大于3000时发出告警。 -- 这里我们就配置当此指标`process_open_fds` 的 `value>3000` 时发出告警,告警级别为**警告告警**,三次即触发,具体如下图。 + - 选择配置的指标对象,ShenYu 监控有非常多的指标,我们举例对 `打开的文件描述符的数量` `process_open_fds` -> `value` 这个指标进行阈值设置, 当服务端打开文件描述符数量大于3000时发出告警。 + - 这里我们就配置当此指标`process_open_fds` 的 `value>3000` 时发出告警,告警级别为**警告告警**,三次即触发,具体如下图。 -![hertzbeat](/img/blog/monitor-shenyu-7.png) + ![hertzbeat](/img/blog/monitor-shenyu-7.png) 2. 新增消息通知接收人 -> 配置接收人,让告警消息知道要发给谁,用什么方式发。 + > 配置接收人,让告警消息知道要发给谁,用什么方式发。 -路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 + 路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 -消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 + 消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 -- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 -- 在 HertzBeat 配置接收人参数如下。 + - 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 + - 在 HertzBeat 配置接收人参数如下。 -【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 + 【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. 配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】 -> 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 + > 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### 完毕,现在坐等告警消息过来啦。叮叮叮叮 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-02-monitor-dynamic-tp.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-02-monitor-dynamic-tp.md index 576ace519e3..6fcb608a759 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-02-monitor-dynamic-tp.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-02-monitor-dynamic-tp.md @@ -36,76 +36,76 @@ tags: [opensource, practice] 1. 开启 SpringBoot Actuator Endpoint 暴露出`DynamicTp`指标接口 -```yaml -management: - endpoints: - web: - exposure: - include: '*' -``` + ```yaml + management: + endpoints: + web: + exposure: + include: '*' + ``` 2. 重启后测试访问指标接口 `ip:port/actuator/dynamic-tp` 是否有响应json数据如下: -```json -[ - { - "poolName": "commonExecutor", - "corePoolSize": 1, - "maximumPoolSize": 1, - "queueType": "LinkedBlockingQueue", - "queueCapacity": 2147483647, - "queueSize": 0, - "fair": false, - "queueRemainingCapacity": 2147483647, - "activeCount": 0, - "taskCount": 0, - "completedTaskCount": 0, - "largestPoolSize": 0, - "poolSize": 0, - "waitTaskCount": 0, - "rejectCount": 0, - "rejectHandlerName": null, - "dynamic": false, - "runTimeoutCount": 0, - "queueTimeoutCount": 0 - }, - { - "maxMemory": "4 GB", - "totalMemory": "444 MB", - "freeMemory": "250.34 MB", - "usableMemory": "3.81 GB" - } -] -``` + ```json + [ + { + "poolName": "commonExecutor", + "corePoolSize": 1, + "maximumPoolSize": 1, + "queueType": "LinkedBlockingQueue", + "queueCapacity": 2147483647, + "queueSize": 0, + "fair": false, + "queueRemainingCapacity": 2147483647, + "activeCount": 0, + "taskCount": 0, + "completedTaskCount": 0, + "largestPoolSize": 0, + "poolSize": 0, + "waitTaskCount": 0, + "rejectCount": 0, + "rejectHandlerName": null, + "dynamic": false, + "runTimeoutCount": 0, + "queueTimeoutCount": 0 + }, + { + "maxMemory": "4 GB", + "totalMemory": "444 MB", + "freeMemory": "250.34 MB", + "usableMemory": "3.81 GB" + } + ] + ``` #### 二. 在 HertzBeat 监控页面添加 DynamicTp 线程池监控 1. 点击新增 DynamicTp 监控 -路径:菜单 -> 中间件监控 -> DynamicTp监控 -> 新增DynamicTp监控 + 路径:菜单 -> 中间件监控 -> DynamicTp监控 -> 新增DynamicTp监控 -![hertzbeat](/img/blog/monitor-dynamic-tp-1.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-1.png) 2. 配置监控 DynamicTp 所需参数 -在监控页面填写 DynamicTp **服务IP**,**监控端口**(默认8080),最后点击确定添加即可。 -其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/dynamic_tp/) + 在监控页面填写 DynamicTp **服务IP**,**监控端口**(默认8080),最后点击确定添加即可。 + 其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/dynamic_tp/) -![hertzbeat](/img/blog/monitor-dynamic-tp-2.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-2.png) 3. 完成✅,现在我们已经添加好对 DynamicTp 的监控了,查看监控列表即可看到我们的添加项。 -![hertzbeat](/img/blog/monitor-dynamic-tp-1.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-1.png) 4. 点击监控列表项的**操作**->**监控详情图标** 即可浏览 DynamicTp线程池 的实时监控指标数据。 -![hertzbeat](/img/blog/monitor-dynamic-tp-3.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-3.png) 5. 点击**监控历史详情TAB** 即可浏览 DynamicTp线程池 的历史监控指标数据图表📈。 -![hertzbeat](/img/blog/monitor-dynamic-tp-4.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-4.png) -![hertzbeat](/img/blog/monitor-dynamic-tp-5.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-5.png) **DONE!完成啦!通过上面几步,总结起来其实也就只用两步** @@ -123,33 +123,33 @@ management: 1. 对某个重要指标配置告警阈值 -路径:菜单 -> 告警阈值 -> 新增阈值 + 路径:菜单 -> 告警阈值 -> 新增阈值 -- 选择配置的指标对象,DynamicTp监控主要是一些线程池相关指标,我们举例对 `运行超时线程数量` `thread_pool_running` -> `run_timeout_count` 这个指标进行阈值设置, 当线程运行超时数量大于1时发出告警。 -- 这里我们就配置当此指标`thread_pool_running` 的 `run_timeout_count>1` 时发出告警,告警级别为**严重告警**,三次即触发,具体如下图。 + - 选择配置的指标对象,DynamicTp监控主要是一些线程池相关指标,我们举例对 `运行超时线程数量` `thread_pool_running` -> `run_timeout_count` 这个指标进行阈值设置, 当线程运行超时数量大于1时发出告警。 + - 这里我们就配置当此指标`thread_pool_running` 的 `run_timeout_count>1` 时发出告警,告警级别为**严重告警**,三次即触发,具体如下图。 -![hertzbeat](/img/blog/monitor-dynamic-tp-6.png) + ![hertzbeat](/img/blog/monitor-dynamic-tp-6.png) 2. 新增消息通知接收人 -> 配置接收人,让告警消息知道要发给谁,用什么方式发。 + > 配置接收人,让告警消息知道要发给谁,用什么方式发。 -路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 + 路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 -消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 + 消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 -- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 -- 在 HertzBeat 配置接收人参数如下。 + - 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 + - 在 HertzBeat 配置接收人参数如下。 -【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 + 【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. 配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】 -> 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 + > 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### 完毕,现在坐等告警消息过来啦。叮叮叮叮 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-11-monitor-mysql.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-11-monitor-mysql.md index 748a3f09d53..4ec31b3926e 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-11-monitor-mysql.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-11-monitor-mysql.md @@ -33,28 +33,28 @@ keywords: [开源监控系统, 开源数据库监控, Mysql数据库监控] 1. 点击新增 Mysql 监控 -路径:菜单 -> 数据库监控 -> Mysql数据库 -> 新增Mysql数据库监控 + 路径:菜单 -> 数据库监控 -> Mysql数据库 -> 新增Mysql数据库监控 -![hertzbeat](/img/blog/monitor-mysql-1.png) + ![hertzbeat](/img/blog/monitor-mysql-1.png) 2. 配置新增监控 Mysql 数据库所需参数 -在监控页面填写 Mysql **服务IP**,**监控端口**(默认3306),**账户密码等**,最后点击确定添加即可。 -其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/mysql/) + 在监控页面填写 Mysql **服务IP**,**监控端口**(默认3306),**账户密码等**,最后点击确定添加即可。 + 其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/mysql/) -![hertzbeat](/img/blog/monitor-mysql-2.png) + ![hertzbeat](/img/blog/monitor-mysql-2.png) 3. 完成✅,现在我们已经添加好对 Mysql数据库 的监控了,查看监控列表即可看到我们的添加项。 -![hertzbeat](/img/blog/monitor-mysql-1.png) + ![hertzbeat](/img/blog/monitor-mysql-1.png) 4. 点击监控列表项的**操作**->**监控详情图标** 即可浏览 Mysql数据库 的实时监控指标数据。 -![hertzbeat](/img/blog/monitor-mysql-3.png) + ![hertzbeat](/img/blog/monitor-mysql-3.png) 5. 点击**监控历史详情TAB** 即可浏览 Mysql数据库 的历史监控指标数据图表📈。 -![hertzbeat](/img/blog/monitor-mysql-4.png) + ![hertzbeat](/img/blog/monitor-mysql-4.png) **DONE!完成啦!通过上面几步,总结起来其实也就只用一步即可** @@ -71,35 +71,35 @@ keywords: [开源监控系统, 开源数据库监控, Mysql数据库监控] 1. 对某个重要指标配置告警阈值 -路径:菜单 -> 阈值规则 -> 新增阈值 + 路径:菜单 -> 阈值规则 -> 新增阈值 -- 选择配置的指标对象,Mysql 数据库监控主要是数据库性能等相关指标,我们举例对 `查询缓存命中率` `cache` -> `query_cache_hit_rate` 这个指标进行阈值设置, 当Mysql的查询缓存命中率很低小于30%时发出告警。 -- 这里我们就配置当此指标`cache` 的 `query_cache_hit_rate<30` 时发出告警,告警级别为**严重告警**,三次即触发,具体如下图。 + - 选择配置的指标对象,Mysql 数据库监控主要是数据库性能等相关指标,我们举例对 `查询缓存命中率` `cache` -> `query_cache_hit_rate` 这个指标进行阈值设置, 当Mysql的查询缓存命中率很低小于30%时发出告警。 + - 这里我们就配置当此指标`cache` 的 `query_cache_hit_rate<30` 时发出告警,告警级别为**严重告警**,三次即触发,具体如下图。 -![hertzbeat](/img/blog/monitor-mysql-5.png) + ![hertzbeat](/img/blog/monitor-mysql-5.png) -![hertzbeat](/img/blog/monitor-mysql-6.png) + ![hertzbeat](/img/blog/monitor-mysql-6.png) 2. 新增消息通知接收人 -> 配置接收人,让告警消息知道要发给谁,用什么方式发。 + > 配置接收人,让告警消息知道要发给谁,用什么方式发。 -路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 + 路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 -消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 + 消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 -- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 -- 在 HertzBeat 配置接收人参数如下。 + - 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 + - 在 HertzBeat 配置接收人参数如下。 -【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 + 【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. 配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】 -> 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 + > 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### 完毕,现在坐等告警消息过来啦。叮叮叮叮 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-15-monitor-linux.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-15-monitor-linux.md index 8df57dee476..2734281bbf1 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-15-monitor-linux.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-02-15-monitor-linux.md @@ -30,32 +30,32 @@ Github: 1. 点击新增 Linux 监控 -路径:菜单 -> 操作系统监控 -> Linux操作系统 -> 新增Linux操作系统监控 + 路径:菜单 -> 操作系统监控 -> Linux操作系统 -> 新增Linux操作系统监控 -![hertzbeat](/img/blog/monitor-linux-1.png) + ![hertzbeat](/img/blog/monitor-linux-1.png) 2. 配置新增监控 Linux 所需参数 -在监控页面填写 Linux **对端IP**,**SSH端口**(默认22),**账户密码等**,最后点击确定添加即可。 -其他参数如**采集间隔**,**超时时间**等可以参考帮助文档 + 在监控页面填写 Linux **对端IP**,**SSH端口**(默认22),**账户密码等**,最后点击确定添加即可。 + 其他参数如**采集间隔**,**超时时间**等可以参考帮助文档 -![hertzbeat](/img/blog/monitor-linux-2.png) + ![hertzbeat](/img/blog/monitor-linux-2.png) 3. 完成✅,现在我们已经添加好对 Linux 的监控了,查看监控列表即可看到我们的添加项。 -![hertzbeat](/img/blog/monitor-linux-3.png) + ![hertzbeat](/img/blog/monitor-linux-3.png) 4. 点击监控列表项的**操作**->**监控详情图标** 即可浏览 Linux 的实时监控指标数据。 -![hertzbeat](/img/blog/monitor-linux-4.png) + ![hertzbeat](/img/blog/monitor-linux-4.png) -![hertzbeat](/img/blog/monitor-linux-7.png) + ![hertzbeat](/img/blog/monitor-linux-7.png) 5. 点击**监控历史详情TAB** 即可浏览 Linux 的历史监控指标数据图表📈。 -![hertzbeat](/img/blog/monitor-linux-5.png) + ![hertzbeat](/img/blog/monitor-linux-5.png) -![hertzbeat](/img/blog/monitor-linux-6.png) + ![hertzbeat](/img/blog/monitor-linux-6.png) **DONE!完成啦!不需要我们去部署agent或者各种繁琐操作,是不是很简单** @@ -132,35 +132,35 @@ Github: 1. 对某个重要指标配置告警阈值 -路径:菜单 -> 阈值规则 -> 新增阈值 + 路径:菜单 -> 阈值规则 -> 新增阈值 -- 选择配置的指标对象,Linux 监控主要是cpu 内存 磁盘 网络性能等相关指标,我们举例对 `CPU利用率` `cpu` -> `usage` 这个指标进行阈值设置, 当Linux cpu利用率大于90%时发出告警。 -- 这里我们就配置当此指标`cpu` 的 `usage>90` 时发出告警,告警级别为**警告告警**,三次即触发,具体如下图。 + - 选择配置的指标对象,Linux 监控主要是cpu 内存 磁盘 网络性能等相关指标,我们举例对 `CPU利用率` `cpu` -> `usage` 这个指标进行阈值设置, 当Linux cpu利用率大于90%时发出告警。 + - 这里我们就配置当此指标`cpu` 的 `usage>90` 时发出告警,告警级别为**警告告警**,三次即触发,具体如下图。 -![hertzbeat](/img/blog/monitor-linux-8.png) + ![hertzbeat](/img/blog/monitor-linux-8.png) -![hertzbeat](/img/blog/monitor-linux-9.png) + ![hertzbeat](/img/blog/monitor-linux-9.png) 2. 新增消息通知接收人 -> 配置接收人,让告警消息知道要发给谁,用什么方式发。 + > 配置接收人,让告警消息知道要发给谁,用什么方式发。 -路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 + 路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 -消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 + 消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 -- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 -- 在 HertzBeat 配置接收人参数如下。 + - 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 + - 在 HertzBeat 配置接收人参数如下。 -【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 + 【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. 配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】 -> 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 + > 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### 完毕,现在坐等告警消息过来啦。叮叮叮叮 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-03-22-monitor-springboot2.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-03-22-monitor-springboot2.md index b03359eb1ec..413e9a7d019 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-03-22-monitor-springboot2.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-03-22-monitor-springboot2.md @@ -30,81 +30,81 @@ Github: 1. 开启 SpringBoot Actuator Endpoint 暴露出`metrics health env`指标接口 -```yaml -management: - endpoints: - web: - exposure: - include: - - 'metrics' - - 'health' - - 'env' - enabled-by-default: on -``` + ```yaml + management: + endpoints: + web: + exposure: + include: + - 'metrics' + - 'health' + - 'env' + enabled-by-default: on + ``` 2. 重启后测试访问指标接口 `ip:port/actuator` 是否有响应json数据如下: -```json -{ - "_links": { - "self": { - "href": "http://localhost:1157/actuator", - "templated": false - }, - "health-path": { - "href": "http://localhost:1157/actuator/health/{*path}", - "templated": true - }, - "health": { - "href": "http://localhost:1157/actuator/health", - "templated": false - }, - "env": { - "href": "http://localhost:1157/actuator/env", - "templated": false - }, - "env-toMatch": { - "href": "http://localhost:1157/actuator/env/{toMatch}", - "templated": true - }, - "metrics-requiredMetricName": { - "href": "http://localhost:1157/actuator/metrics/{requiredMetricName}", - "templated": true - }, - "metrics": { - "href": "http://localhost:1157/actuator/metrics", - "templated": false + ```json + { + "_links": { + "self": { + "href": "http://localhost:1157/actuator", + "templated": false + }, + "health-path": { + "href": "http://localhost:1157/actuator/health/{*path}", + "templated": true + }, + "health": { + "href": "http://localhost:1157/actuator/health", + "templated": false + }, + "env": { + "href": "http://localhost:1157/actuator/env", + "templated": false + }, + "env-toMatch": { + "href": "http://localhost:1157/actuator/env/{toMatch}", + "templated": true + }, + "metrics-requiredMetricName": { + "href": "http://localhost:1157/actuator/metrics/{requiredMetricName}", + "templated": true + }, + "metrics": { + "href": "http://localhost:1157/actuator/metrics", + "templated": false + } + } } - } -} -``` + ``` #### 在开源监控系统 HertzBeat 监控页面添加对 SpringBoot2 应用监控 1. 点击新增 SpringBoot2 监控 -路径:菜单 -> 应用服务监控 -> SpringBoot2 -> 新增SpringBoot2监控 + 路径:菜单 -> 应用服务监控 -> SpringBoot2 -> 新增SpringBoot2监控 -![hertzbeat](/img/blog/monitor-springboot2-1.png) + ![hertzbeat](/img/blog/monitor-springboot2-1.png) 2. 配置新增监控 SpringBoot2 所需参数 -在监控页面填写 SpringBoot2应用 **对端IP**,**服务端口**(默认8080),**账户密码等**,最后点击确定添加即可。 -其他参数如**采集间隔**,**超时时间**等可以参考帮助文档 + 在监控页面填写 SpringBoot2应用 **对端IP**,**服务端口**(默认8080),**账户密码等**,最后点击确定添加即可。 + 其他参数如**采集间隔**,**超时时间**等可以参考帮助文档 -![hertzbeat](/img/blog/monitor-springboot2-2.png) + ![hertzbeat](/img/blog/monitor-springboot2-2.png) 3. 完成✅,现在我们已经添加好对 SpringBoot2应用 的监控了,查看监控列表即可看到我们的添加项。 -![hertzbeat](/img/blog/monitor-springboot2-3.png) + ![hertzbeat](/img/blog/monitor-springboot2-3.png) 4. 点击监控列表项的**操作**->**监控详情图标** 即可浏览 SpringBoot2应用 的实时监控指标数据。 -![hertzbeat](/img/blog/monitor-springboot2-4.png) + ![hertzbeat](/img/blog/monitor-springboot2-4.png) 5. 点击**监控历史详情TAB** 即可浏览 SpringBoot2应用 的历史监控指标数据图表📈。 -![hertzbeat](/img/blog/monitor-springboot2-5.png) + ![hertzbeat](/img/blog/monitor-springboot2-5.png) **DONE!完成啦!不需要我们去部署agent或者各种繁琐操作,是不是很简单** @@ -121,35 +121,35 @@ management: 1. 对某个重要指标配置告警阈值 -路径:菜单 -> 阈值规则 -> 新增阈值 + 路径:菜单 -> 阈值规则 -> 新增阈值 -- 选择配置的指标对象,SpringBoot2应用 监控主要是 堆栈内存 线程等相关指标,我们举例对 `状态线程数` `threads` -> `threads` 这个指标进行阈值设置, 当`runnable`状态的线程数量大于300时发出告警。 -- 这里我们就配置当此指标`size`,`state` 的 `equals(state,"runnable"") && size>300` 时发出告警,告警级别为**警告告警**,三次即触发,具体如下图。 + - 选择配置的指标对象,SpringBoot2应用 监控主要是 堆栈内存 线程等相关指标,我们举例对 `状态线程数` `threads` -> `threads` 这个指标进行阈值设置, 当`runnable`状态的线程数量大于300时发出告警。 + - 这里我们就配置当此指标`size`,`state` 的 `equals(state,"runnable"") && size>300` 时发出告警,告警级别为**警告告警**,三次即触发,具体如下图。 -![hertzbeat](/img/blog/monitor-springboot2-6.png) + ![hertzbeat](/img/blog/monitor-springboot2-6.png) -![hertzbeat](/img/blog/monitor-springboot2-7.png) + ![hertzbeat](/img/blog/monitor-springboot2-7.png) 2. 新增消息通知接收人 -> 配置接收人,让告警消息知道要发给谁,用什么方式发。 + > 配置接收人,让告警消息知道要发给谁,用什么方式发。 -路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 + 路径:菜单 -> 告警通知 -> 告警接收人 -> 新增接收人 -消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 + 消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。 -- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 -- 在 HertzBeat 配置接收人参数如下。 + - 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。 + - 在 HertzBeat 配置接收人参数如下。 -【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 + 【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】 -![hertzbeat](/img/blog/alert-notice-1.png) + ![hertzbeat](/img/blog/alert-notice-1.png) 3. 配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】 -> 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 + > 配置告警通知策略,让告警消息与接收人绑定,这样就能决定哪些告警发给哪个人。 -![hertzbeat](/img/blog/alert-notice-2.png) + ![hertzbeat](/img/blog/alert-notice-2.png) ### 完毕,现在坐等告警消息过来啦。叮叮叮叮 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-05-11-greptimedb-store.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-05-11-greptimedb-store.md index 5a6170fa4a0..40f5348910d 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-05-11-greptimedb-store.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-05-11-greptimedb-store.md @@ -43,16 +43,16 @@ Cloud: **[TanCloud](https://console.tancloud.cn/)** 1. Docker 安装 GreptimeDB -```shell -$ docker run -p 4000-4004:4000-4004 \ - -p 4242:4242 -v "$(pwd)/greptimedb:/tmp/greptimedb" \ - --name greptime \ - greptime/greptimedb:0.2.0 standalone start \ - --http-addr 0.0.0.0:4000 \ - --rpc-addr 0.0.0.0:4001 -``` + ```shell + $ docker run -p 4000-4004:4000-4004 \ + -p 4242:4242 -v "$(pwd)/greptimedb:/tmp/greptimedb" \ + --name greptime \ + greptime/greptimedb:0.2.0 standalone start \ + --http-addr 0.0.0.0:4000 \ + --rpc-addr 0.0.0.0:4001 + ``` -- `-v "$(pwd)/greptimedb:/tmp/greptimedb"` 为 greptimeDB 数据目录本地持久化挂载,建议将`$(pwd)/greptimedb`替换为您想指定存放的实际本地目录 + - `-v "$(pwd)/greptimedb:/tmp/greptimedb"` 为 greptimeDB 数据目录本地持久化挂载,建议将`$(pwd)/greptimedb`替换为您想指定存放的实际本地目录 2. 使用```$ docker ps | grep greptime```查看 GreptimeDB 是否启动成功 @@ -62,21 +62,21 @@ $ docker run -p 4000-4004:4000-4004 \ 1. Docker 安装 HertzBeat -```shell -$ docker run -d -p 1157:1157 \ - -e LANG=zh_CN.UTF-8 \ - -e TZ=Asia/Shanghai \ - -v /opt/data:/opt/hertzbeat/data \ - -v /opt/application.yml:/opt/hertzbeat/config/application.yml \ - --restart=always \ - --name hertzbeat apache/hertzbeat -``` + ```shell + $ docker run -d -p 1157:1157 \ + -e LANG=zh_CN.UTF-8 \ + -e TZ=Asia/Shanghai \ + -v /opt/data:/opt/hertzbeat/data \ + -v /opt/application.yml:/opt/hertzbeat/config/application.yml \ + --restart=always \ + --name hertzbeat apache/hertzbeat + ``` -- `-v /opt/data:/opt/hertzbeat/data` : (可选,数据持久化)重要⚠️ 挂载H2数据库文件到本地主机,保证数据不会因为容器的创建删除而丢失 + - `-v /opt/data:/opt/hertzbeat/data` : (可选,数据持久化)重要⚠️ 挂载H2数据库文件到本地主机,保证数据不会因为容器的创建删除而丢失 -- `-v /opt/application.yml:/opt/hertzbeat/config/application.yml` : 挂载自定义本地配置文件到容器中,即使用本地配置文件覆盖容器配置文件。 + - `-v /opt/application.yml:/opt/hertzbeat/config/application.yml` : 挂载自定义本地配置文件到容器中,即使用本地配置文件覆盖容器配置文件。 -注意⚠️ 本地挂载配置文件 `application.yml` 需提前存在,文件完整内容见项目仓库[/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + 注意⚠️ 本地挂载配置文件 `application.yml` 需提前存在,文件完整内容见项目仓库[/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) 2. 浏览器访问 默认账户密码 admin/hertzbeat,查看 HertzBeat 是否启动成功。 @@ -84,26 +84,26 @@ $ docker run -d -p 1157:1157 \ 1. 修改 HertzBeat 端配置文件 -修改挂载到本地的 HertzBeat 配置文件 [application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml), 安装包模式下修改 `hertzbeat/config/application.yml` + 修改挂载到本地的 HertzBeat 配置文件 [application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml), 安装包模式下修改 `hertzbeat/config/application.yml` -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.greptime`数据源参数,URL账户密码,并启用`enabled`为`true`** + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.greptime`数据源参数,URL账户密码,并启用`enabled`为`true`** -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - greptime: - enabled: true - endpoint: localhost:4001 -``` + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + greptime: + enabled: true + endpoint: localhost:4001 + ``` 2. 重启 HertzBeat -```shell -docker restart hertzbeat -``` + ```shell + docker restart hertzbeat + ``` #### 观察验证效果 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-08-14-hertzbeat-v1.4.0.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-08-14-hertzbeat-v1.4.0.md index bd69544d028..b937eff35ca 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-08-14-hertzbeat-v1.4.0.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-08-14-hertzbeat-v1.4.0.md @@ -77,23 +77,23 @@ HertzBeat 提供云边协同能力,可以在多个隔离网络部署边缘采 1. `docker` 环境仅需一条命令即可开始 -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```或者使用 quay.io (若 dockerhub 网络链接超时)``` + ```或者使用 quay.io (若 dockerhub 网络链接超时)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` 3. 部署采集器集群 -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_IP=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_IP=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -- `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 -- `-e MANAGER_IP=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 -- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 + - `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 + - `-e MANAGER_IP=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 + - `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-09-26-hertzbeat-v1.4.1.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-09-26-hertzbeat-v1.4.1.md index a0f73af7921..054f7fa9975 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-09-26-hertzbeat-v1.4.1.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-09-26-hertzbeat-v1.4.1.md @@ -70,23 +70,23 @@ keywords: [open source monitoring system, alerting system, Linux monitoring] 1. `docker` 环境仅需一条命令即可开始 -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```或者使用 quay.io (若 dockerhub 网络链接超时)``` + ```或者使用 quay.io (若 dockerhub 网络链接超时)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` 3. 部署采集器集群 -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -- `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 -- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 -- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 + - `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 + - `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 + - `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-11-12-hertzbeat-v1.4.2.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-11-12-hertzbeat-v1.4.2.md index db282b4feee..2ffa09c2f1a 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-11-12-hertzbeat-v1.4.2.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-11-12-hertzbeat-v1.4.2.md @@ -47,23 +47,23 @@ keywords: [open source monitoring system, alerting system, Linux monitoring] 1. `docker` 环境仅需一条命令即可开始 -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```或者使用 quay.io (若 dockerhub 网络链接超时)``` + ```或者使用 quay.io (若 dockerhub 网络链接超时)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` 3. 部署采集器集群 -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -- `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 -- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 -- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 + - `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 + - `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 + - `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-12-11-hertzbeat-v1.4.3.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-12-11-hertzbeat-v1.4.3.md index a5f0cdd27c6..3a07c44a9a3 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-12-11-hertzbeat-v1.4.3.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-12-11-hertzbeat-v1.4.3.md @@ -42,23 +42,23 @@ keywords: [open source monitoring system, alerting system] 1. `docker` 环境仅需一条命令即可开始 -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```或者使用 quay.io (若 dockerhub 网络链接超时)``` + ```或者使用 quay.io (若 dockerhub 网络链接超时)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` 3. 部署采集器集群 -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -- `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 -- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 -- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 + - `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 + - `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 + - `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-01-18-hertzbeat-v1.4.4.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-01-18-hertzbeat-v1.4.4.md index 1067f96fe51..f233e3dc7c4 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-01-18-hertzbeat-v1.4.4.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-01-18-hertzbeat-v1.4.4.md @@ -43,23 +43,23 @@ keywords: [open source monitoring system, alerting system] 1. `docker` 环境仅需一条命令即可开始 -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```或者使用 quay.io (若 dockerhub 网络链接超时)``` + ```或者使用 quay.io (若 dockerhub 网络链接超时)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` 3. 部署采集器集群 -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -- `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 -- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 -- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 + - `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 + - `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 + - `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-05-09-hertzbeat-ospp-subject-introduction.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-05-09-hertzbeat-ospp-subject-introduction.md index 5d64d7933a9..cb7c0af9d48 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-05-09-hertzbeat-ospp-subject-introduction.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-05-09-hertzbeat-ospp-subject-introduction.md @@ -81,10 +81,7 @@ **要求:** 1. 使⽤ Java 基于 UDP 协议实现原⽣的 IPMI2 协议(查询部分),不依赖任何第三⽅包。 -2. 利⽤实现的 IPMI2 协议查询开启 IPMI 的服务器的各项指标信息,包括主板信息、⽹卡信息、电源信息、⻛扇信 - -息、温度传感器信息和时钟信息。 - +2. 利⽤实现的 IPMI2 协议查询开启 IPMI 的服务器的各项指标信息,包括主板信息、⽹卡信息、电源信息、⻛扇信息、温度传感器信息和时钟信息。 3. 对查询到的指标信息进⾏抽象和规范化处理,实现配置化管理(可选)。 4. 输出详细的项⽬⽂档,包括设计思路、实现细节、使⽤说明等。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-06-11-hertzbeat-v1.6.0-update.md b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-06-11-hertzbeat-v1.6.0-update.md index b75648284ff..708d6d7b9e3 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-06-11-hertzbeat-v1.6.0-update.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-blog/2024-06-11-hertzbeat-v1.6.0-update.md @@ -8,184 +8,184 @@ 1. 升级Java环境 -由于1.6.0版本使用Java17,且安装包不再提供内置jdk的版本,参考以下情况使用新版Hertzbeat。 + 由于1.6.0版本使用Java17,且安装包不再提供内置jdk的版本,参考以下情况使用新版Hertzbeat。 -- 当你的服务器中默认环境变量为Java17时,这一步你无需任何操作。 -- 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**没有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并在搜索引擎搜索如何设置新的环境变量指向新的Java17。 -- 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并将解压后的文件夹重命名为java,复制到Hertzbeat的解压目录下。 + - 当你的服务器中默认环境变量为Java17时,这一步你无需任何操作。 + - 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**没有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并在搜索引擎搜索如何设置新的环境变量指向新的Java17。 + - 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并将解压后的文件夹重命名为java,复制到Hertzbeat的解压目录下。 2. 升级数据库 -打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), -选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件执行升级sql。 + 打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), + 选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件执行升级sql。 3. 升级配置文件 -由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接使用新的yml配置文件,然后在自己的需求基础上进行修改。 - -- `application.yml`一般需要修改以下部分 - - 默认为: - -```yaml - datasource: - driver-class-name: org.h2.Driver - username: sa - password: 123456 - url: jdbc:h2:./data/hertzbeat;MODE=MYSQL - hikari: - max-lifetime: 120000 - - jpa: - show-sql: false - database-platform: org.eclipse.persistence.platform.database.MySQLPlatform - database: h2 - properties: - eclipselink: - logging: - level: SEVERE -``` - -如若修改为mysql数据库,给出一个示例: - -```yaml - datasource: - driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: root - url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai - hikari: - max-lifetime: 120000 - - jpa: - show-sql: false - database-platform: org.eclipse.persistence.platform.database.MySQLPlatform - database: mysql - properties: - eclipselink: - logging: - level: SEVERE -``` - -- `sureness.yml`修改是可选的,一般在你需要修改账号密码时 - -```yaml -# account info config -# eg: admin has role [admin,user], password is hertzbeat -# eg: tom has role [user], password is hertzbeat -# eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 -account: - - appId: admin - credential: hertzbeat - role: [admin] - - appId: tom - credential: hertzbeat - role: [user] - - appId: guest - credential: hertzbeat - role: [guest] - - appId: lili - # credential = MD5(password + salt) - # plain password: hertzbeat - # attention: digest authentication does not support salted encrypted password accounts - credential: 94C6B34E7A199A9F9D4E1F208093B489 - salt: 123 - role: [user] -``` + 由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接使用新的yml配置文件,然后在自己的需求基础上进行修改。 + + - `application.yml`一般需要修改以下部分 + + 默认为: + + ```yaml + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: h2 + properties: + eclipselink: + logging: + level: SEVERE + ``` + + 如若修改为mysql数据库,给出一个示例: + + ```yaml + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: mysql + properties: + eclipselink: + logging: + level: SEVERE + ``` + + - `sureness.yml`修改是可选的,一般在你需要修改账号密码时 + + ```yaml + # account info config + # eg: admin has role [admin,user], password is hertzbeat + # eg: tom has role [user], password is hertzbeat + # eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 + account: + - appId: admin + credential: hertzbeat + role: [admin] + - appId: tom + credential: hertzbeat + role: [user] + - appId: guest + credential: hertzbeat + role: [guest] + - appId: lili + # credential = MD5(password + salt) + # plain password: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] + ``` 4. 添加相应的数据库驱动 由于apache基金会对于license合规的要求,HertzBeat的安装包不能包含mysql,oracle等gpl许可的依赖,需要用户自行添加,用户可通过以下链接自行下载驱动,复制到安装目录下`ext-lib`中。 -mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) -oracle(如果你要监控oracle,这两个驱动是必须的) -[https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) -[https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) -接下来,像之前那样运行启动脚本,即可体验最新的HertzBeat1.6.0! + mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) + oracle(如果你要监控oracle,这两个驱动是必须的): + [https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) + [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) + 接下来,像之前那样运行启动脚本,即可体验最新的HertzBeat1.6.0! ### Docker 方式升级 - Mysql数据库 1. 关闭 HertzBeat 容器 -``` -docker stop hertzbeat -``` + ```shell + docker stop hertzbeat + ``` 2. 升级数据库脚本 -打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), -选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 Mysql 执行升级sql。 + 打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), + 选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 Mysql 执行升级sql。 3. 升级配置文件 -由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 - -- `application.yml`一般需要修改以下部分 - - 默认为: - -```yaml - datasource: - driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: root - url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai - hikari: - max-lifetime: 120000 - - jpa: - show-sql: false - database-platform: org.eclipse.persistence.platform.database.MySQLPlatform - database: mysql - properties: - eclipselink: - logging: - level: SEVERE -``` - -- `sureness.yml`修改是可选的,一般在你需要修改账号密码时 - -```yaml -# account info config -# eg: admin has role [admin,user], password is hertzbeat -# eg: tom has role [user], password is hertzbeat -# eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 -account: - - appId: admin - credential: hertzbeat - role: [admin] - - appId: tom - credential: hertzbeat - role: [user] - - appId: guest - credential: hertzbeat - role: [guest] - - appId: lili - # credential = MD5(password + salt) - # plain password: hertzbeat - # attention: digest authentication does not support salted encrypted password accounts - credential: 94C6B34E7A199A9F9D4E1F208093B489 - salt: 123 - role: [user] -``` + 由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 + + - `application.yml`一般需要修改以下部分 + + 默认为: + + ```yaml + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: mysql + properties: + eclipselink: + logging: + level: SEVERE + ``` + + - `sureness.yml`修改是可选的,一般在你需要修改账号密码时 + + ```yaml + # account info config + # eg: admin has role [admin,user], password is hertzbeat + # eg: tom has role [user], password is hertzbeat + # eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 + account: + - appId: admin + credential: hertzbeat + role: [admin] + - appId: tom + credential: hertzbeat + role: [user] + - appId: guest + credential: hertzbeat + role: [guest] + - appId: lili + # credential = MD5(password + salt) + # plain password: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] + ``` 4. 添加相应的数据库驱动 由于apache基金会对于license合规的要求,HertzBeat的安装包不能包含mysql,oracle等gpl许可的依赖,需要用户自行添加,用户可通过以下链接自行下载驱动 jar 放到本地 `ext-lib`目录下,然后启动时将`ext-lib`挂载到容器的 `/opt/hertzbeat/ext-lib`目录。 -mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) -oracle(如果你要监控oracle,这两个驱动是必须的) -[https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) -[https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) -接下来,像之前那样 Docker 运行启动 HertzBeat,即可体验最新的HertzBeat1.6.0! + mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) + oracle(如果你要监控oracle,这两个驱动是必须的): + [https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) + [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) + 接下来,像之前那样 Docker 运行启动 HertzBeat,即可体验最新的HertzBeat1.6.0! ### Docker安装升级 - H2内置数据库(生产环境不推荐使用H2) 1. 关闭 HertzBeat 容器 -``` -docker stop hertzbeat -``` + ```shell + docker stop hertzbeat + ``` 2. 编辑H2数据库文件 @@ -193,75 +193,75 @@ docker stop hertzbeat 下载 h2 驱动 jar [https://mvnrepository.com/artifact/com.h2database/h2/2.2.220](https://mvnrepository.com/artifact/com.h2database/h2/2.2.220) 使用 h2 驱动 jar 本地启动数据库 -``` -java -jar h2-2.2.220.jar -url jdbc:h2:file:./hertzbeat -user sa -password 123456 -``` + ```shell + java -jar h2-2.2.220.jar -url jdbc:h2:file:./hertzbeat -user sa -password 123456 + ``` -打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), -选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 H2 执行升级sql。 + 打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), + 选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 H2 执行升级sql。 3. 升级配置文件 -由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 - -- `application.yml`一般需要修改以下部分 - - 默认为: - -```yaml - datasource: - driver-class-name: org.h2.Driver - username: sa - password: 123456 - url: jdbc:h2:./data/hertzbeat;MODE=MYSQL - hikari: - max-lifetime: 120000 - - jpa: - show-sql: false - database-platform: org.eclipse.persistence.platform.database.MySQLPlatform - database: h2 - properties: - eclipselink: - logging: - level: SEVERE -``` - -- `sureness.yml`修改是可选的,一般在你需要修改账号密码时 - -```yaml -# account info config -# eg: admin has role [admin,user], password is hertzbeat -# eg: tom has role [user], password is hertzbeat -# eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 -account: - - appId: admin - credential: hertzbeat - role: [admin] - - appId: tom - credential: hertzbeat - role: [user] - - appId: guest - credential: hertzbeat - role: [guest] - - appId: lili - # credential = MD5(password + salt) - # plain password: hertzbeat - # attention: digest authentication does not support salted encrypted password accounts - credential: 94C6B34E7A199A9F9D4E1F208093B489 - salt: 123 - role: [user] -``` + 由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 + + - `application.yml`一般需要修改以下部分 + + 默认为: + + ```yaml + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: h2 + properties: + eclipselink: + logging: + level: SEVERE + ``` + + - `sureness.yml`修改是可选的,一般在你需要修改账号密码时 + + ```yaml + # account info config + # eg: admin has role [admin,user], password is hertzbeat + # eg: tom has role [user], password is hertzbeat + # eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 + account: + - appId: admin + credential: hertzbeat + role: [admin] + - appId: tom + credential: hertzbeat + role: [user] + - appId: guest + credential: hertzbeat + role: [guest] + - appId: lili + # credential = MD5(password + salt) + # plain password: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] + ``` 4. 添加相应的数据库驱动 由于apache基金会对于license合规的要求,HertzBeat的安装包不能包含mysql,oracle等gpl许可的依赖,需要用户自行添加,用户可通过以下链接自行下载驱动 jar 放到本地 `ext-lib`目录下,然后启动时将`ext-lib`挂载到容器的 `/opt/hertzbeat/ext-lib`目录。 -mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) -oracle(如果你要监控oracle,这两个驱动是必须的) -[https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) -[https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) -接下来,像之前那样 Docker 运行启动,即可体验最新的HertzBeat1.6.0! + mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) + oracle(如果你要监控oracle,这两个驱动是必须的): + [https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) + [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) + 接下来,像之前那样 Docker 运行启动,即可体验最新的HertzBeat1.6.0! ### 通过导出导入升级 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/code-style-and-quality-guide.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/code-style-and-quality-guide.md index 361b4103011..eb1d4e1bd46 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/code-style-and-quality-guide.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/code-style-and-quality-guide.md @@ -208,9 +208,9 @@ limitations under the License. 2. 确保代码的可读性和直观性 -- `annotation` 符号中的字符串不需要提取为常量。 + - `annotation` 符号中的字符串不需要提取为常量。 -- 被引用的 `package` 或 `resource` 名称不需要提取为常量。 + - 被引用的 `package` 或 `resource` 名称不需要提取为常量。 3. 未被重新分配的变量也必须声明为 final 类型。 @@ -252,17 +252,17 @@ limitations under the License. - 如果使用 `HashSet`,则返回 Set 2. 如果存在多线程,可以使用以下声明或返回类型: -```java -private CurrentHashMap map; -public CurrentHashMap funName(); -``` + ```java + private CurrentHashMap map; + public CurrentHashMap funName(); + ``` 3. 使用 `isEmpty()` 而不是 `length() == 0` 或者 `size() == 0` - 负面示例: ```java if (pathPart.length() == 0) { - return; + return; } ``` @@ -270,7 +270,7 @@ public CurrentHashMap funName(); ```java if (pathPart.isEmpty()) { - return; + return; } ``` @@ -297,89 +297,88 @@ public CurrentHashMap funName(); 以减少代码行深度并提高可读性,例如: - 联合或将逻辑合并到下一级调用中 -- 负面示例: + - 负面示例: -```java -if (isInsert) { -save(platform); -} else { -updateById(platform); -} -``` + ```java + if (isInsert) { + save(platform); + } else { + updateById(platform); + } + ``` -- 正面示例: + - 正面示例: -```java -saveOrUpdate(platform); -``` + ```java + saveOrUpdate(platform); + ``` - 合并条件 -- 负面示例: - -```java -if (expression1) { -if(expression2) { -...... -} -} + - 负面示例: -``` + ```java + if (expression1) { + if(expression2) { + // ...... + } + } + ``` -- 正面示例: + - 正面示例: - ```java - if (expression1 && expression2) { - ...... - } - ``` + ```java + if (expression1 && expression2) { + // ...... + } + ``` - 反转条件 -- 负面示例: - - ```java - public void doSomething() { - // 忽略更深的代码块行 - // ..... - if (condition1) { - ... - } else { - ... - } - } - ``` - -- 正面示例: - - ```java - public void doSomething() { - // 忽略更深的代码块行 - // ..... - if (!condition1) { - ... - return; - } - // ... - } - ``` + - 负面示例: + + ```java + public void doSomething() { + // 忽略更深的代码块行 + // ..... + if (condition1) { + // ... + } else { + // ... + } + } + ``` + + - 正面示例: + + ```java + public void doSomething() { + // 忽略更深的代码块行 + // ..... + if (!condition1) { + // ... + return; + } + // ... + } + ``` - 使用单一变量或方法减少复杂的条件表达式 -- 负面示例: + - 负面示例: - ```java - if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { - ... - } - ``` + ```java + if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { + // ... + } + ``` -- 正面示例: + - 正面示例: - ```java - if (containsSqlServer(dbType)) { - .... - } - //..... - // containsSqlServer的定义 - ``` + ```java + if (containsSqlServer(dbType)) { + // .... + } + //..... + // containsSqlServer的定义 + ``` > 在未来,使用 `sonarlint` 和 `better highlights` 检查代码深度看起来是个不错的选择。 @@ -387,20 +386,20 @@ if(expression2) { 1. 方法缺少注释: -- `When`:该方法何时可以被调用 -- `How`:如何使用此方法以及如何传递参数等 -- `What`:此方法实现了哪些功能 -- `Note`:在调用此方法时开发人员应注意什么 + - `When`:该方法何时可以被调用 + - `How`:如何使用此方法以及如何传递参数等 + - `What`:此方法实现了哪些功能 + - `Note`:在调用此方法时开发人员应注意什么 2. 缺少必要的类头部描述注释。 -添加 `What`,`Note` 等,如上述 `1` 中提到的。 + 添加 `What`,`Note` 等,如上述 `1` 中提到的。 3. 在接口中的方法声明必须被注释。 -- 如果实现的语义和接口声明的注释内容不一致,则具体的实现方法也需要用注释重写。 + - 如果实现的语义和接口声明的注释内容不一致,则具体的实现方法也需要用注释重写。 -- 如果方法实现的语义与接口声明的注释内容一致,则建议不写注释以避免重复的注释。 + - 如果方法实现的语义与接口声明的注释内容一致,则建议不写注释以避免重复的注释。 4. 在注释行中的第一个词需要大写,如 `param` 行,`return` 行。 如果特殊引用作为主题不需要大写,需要注意特殊符号,例如引号。 @@ -410,31 +409,31 @@ if(expression2) { 1. 更倾向于使用 `non-capturing` lambda(不包含对外部范围的引用的lambda)。 Capturing lambda 在每次调用时都需要创建一个新的对象实例。`Non-capturing` lambda 可以为每次调用使用相同的实例。 -- 负面示例: + - 负面示例: - ```java - map.computeIfAbsent(key, x -> key.toLowerCase()) - ``` + ```java + map.computeIfAbsent(key, x -> key.toLowerCase()) + ``` -- 正面示例: + - 正面示例: - ```java - map.computeIfAbsent(key, k -> k.toLowerCase()); - ``` + ```java + map.computeIfAbsent(key, k -> k.toLowerCase()); + ``` 2. 考虑使用方法引用而不是内联lambda -- 负面示例: + - 负面示例: - ```java - map.computeIfAbsent(key, k-> Loader.load(k)); - ``` + ```java + map.computeIfAbsent(key, k-> Loader.load(k)); + ``` -- 正面示例: + - 正面示例: - ```java - map.computeIfAbsent(key, Loader::load); - ``` + ```java + map.computeIfAbsent(key, Loader::load); + ``` ### 3.9 Java Streams @@ -452,127 +451,127 @@ if(expression2) { 1. 使用 `StringUtils.isBlank` 而不是 `StringUtils.isEmpty` -- 负面示例: + - 负面示例: - ```java - if (StringUtils.isEmpty(name)) { - return; - } - ``` + ```java + if (StringUtils.isEmpty(name)) { + return; + } + ``` -- 正面示例: + - 正面示例: - ```java - if (StringUtils.isBlank(name)) { - return; - } - ``` + ```java + if (StringUtils.isBlank(name)) { + return; + } + ``` 2. 使用 `StringUtils.isNotBlank` 而不是 `StringUtils.isNotEmpty` -- 负面示例: + - 负面示例: - ```java - if (StringUtils.isNotEmpty(name)) { - return; - } - ``` + ```java + if (StringUtils.isNotEmpty(name)) { + return; + } + ``` -- 正面示例: + - 正面示例: - ```java - if (StringUtils.isNotBlank(name)) { - return; - } - ``` + ```java + if (StringUtils.isNotBlank(name)) { + return; + } + ``` 3. 使用 `StringUtils.isAllBlank` 而不是 `StringUtils.isAllEmpty` -- 负面示例: + - 负面示例: - ```java - if (StringUtils.isAllEmpty(name, age)) { - return; - } - ``` + ```java + if (StringUtils.isAllEmpty(name, age)) { + return; + } + ``` -- 正面示例: + - 正面示例: - ```java - if (StringUtils.isAllBlank(name, age)) { - return; - } - ``` + ```java + if (StringUtils.isAllBlank(name, age)) { + return; + } + ``` ### 3.12 `Enum` 类 1. 枚举值比较 -- 负面示例: + - 负面示例: - ```java - if (status.equals(JobStatus.RUNNING)) { - return; - } - ``` + ```java + if (status.equals(JobStatus.RUNNING)) { + return; + } + ``` -- 正面示例: + - 正面示例: - ```java - if (status == JobStatus.RUNNING) { - return; - } - ``` + ```java + if (status == JobStatus.RUNNING) { + return; + } + ``` 2. 枚举类不需要实现 Serializable -- 负面示例: + - 负面示例: - ```java - public enum JobStatus implements Serializable { - ... - } - ``` + ```java + public enum JobStatus implements Serializable { + // ... + } + ``` -- 正面示例: + - 正面示例: - ```java - public enum JobStatus { - ... - } - ``` + ```java + public enum JobStatus { + // ... + } + ``` 3. 使用 `Enum.name()` 而不是 `Enum.toString()` -- 负面示例: + - 负面示例: - ```java - System.out.println(JobStatus.RUNNING.toString()); - ``` + ```java + System.out.println(JobStatus.RUNNING.toString()); + ``` -- 正面示例: + - 正面示例: - ```java - System.out.println(JobStatus.RUNNING.name()); - ``` + ```java + System.out.println(JobStatus.RUNNING.name()); + ``` 4. 枚举类名称统一使用 Enum 后缀 -- 负面示例: + - 负面示例: - ```java - public enum JobStatus { - ... - } - ``` + ```java + public enum JobStatus { + // ... + } + ``` -- 正面示例: + - 正面示例: - ```java - public enum JobStatusEnum { - ... - } - ``` + ```java + public enum JobStatusEnum { + // ... + } + ``` ### 3.13 `Deprecated` 注解 @@ -581,7 +580,7 @@ if(expression2) { ```java @deprecated public void process(String input) { - ... + // ... } ``` @@ -590,7 +589,7 @@ public void process(String input) { ```java @Deprecated public void process(String input) { - ... + // ... } ``` @@ -598,43 +597,43 @@ public void process(String input) { 1. 使用 `占位符` 进行日志输出: -- 负面示例 + - 负面示例 - ```java - log.info("Deploy cluster request " + deployRequest); - ``` + ```java + log.info("Deploy cluster request " + deployRequest); + ``` -- 正面示例 + - 正面示例 - ```java - log.info("load plugin:{} to {}", file.getName(), appPlugins); - ``` + ```java + log.info("load plugin:{} to {}", file.getName(), appPlugins); + ``` 2. 打印日志时,注意选择 `日志级别` -当打印日志内容时,如果传递了日志占位符的实际参数,必须避免过早评估,以避免由日志级别导致的不必要评估。 + 当打印日志内容时,如果传递了日志占位符的实际参数,必须避免过早评估,以避免由日志级别导致的不必要评估。 -- 负面示例: + - 负面示例: - 假设当前日志级别为 `INFO`: + 假设当前日志级别为 `INFO`: - ```java - // 忽略声明行。 - List userList = getUsersByBatch(1000); - LOG.debug("All users: {}", getAllUserIds(userList)); - ``` + ```java + // 忽略声明行。 + List userList = getUsersByBatch(1000); + LOG.debug("All users: {}", getAllUserIds(userList)); + ``` -- 正面示例: + - 正面示例: - 在这种情况下,我们应该在进行实际的日志调用之前提前确定日志级别,如下所示: + 在这种情况下,我们应该在进行实际的日志调用之前提前确定日志级别,如下所示: - ```java - // 忽略声明行。 - List userList = getUsersByBatch(1000); - if (LOG.isDebugEnabled()) { - LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); - } - ``` + ```java + // 忽略声明行。 + List userList = getUsersByBatch(1000); + if (LOG.isDebugEnabled()) { + LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); + } + ``` ## 5 测试 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/contribution.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/contribution.md index 7fe9bc2e194..776fcb96a5d 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/contribution.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/contribution.md @@ -88,33 +88,33 @@ limitations under the License. 1. 首先您需要 Fork 目标仓库 [hertzbeat repository](https://github.com/apache/hertzbeat). 2. 然后 用 git 命令 将代码下载到本地: -```shell -git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended -``` + ```shell + git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended + ``` 3. 下载完成后,请参考目标仓库的入门指南或者 README 文件对项目进行初始化。 4. 接着,您可以参考如下命令进行代码的提交, 切换新的分支, 进行开发: -```shell -git checkout -b a-feature-branch #Recommended -``` + ```shell + git checkout -b a-feature-branch #Recommended + ``` 5. 提交 commit, commit 描述信息需要符合约定格式: [module name or type name]feature or bugfix or doc: custom message. -```shell -git add -git commit -m '[docs]feature: necessary instructions' #Recommended -``` + ```shell + git add + git commit -m '[docs]feature: necessary instructions' #Recommended + ``` 6. 推送到远程仓库 -```shell -git push origin a-feature-branch -``` + ```shell + git push origin a-feature-branch + ``` 7. 然后您就可以在 GitHub 上发起新的 PR (Pull Request)。 -请注意 PR 的标题需要符合我们的规范,并且在 PR 中写上必要的说明,来方便 Committer 和其他贡献者进行代码审查。 + 请注意 PR 的标题需要符合我们的规范,并且在 PR 中写上必要的说明,来方便 Committer 和其他贡献者进行代码审查。 ### 等待PR代码被合并 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/new_committer_process.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/new_committer_process.md index 3e79960877c..f931dc556b8 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/new_committer_process.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/community/new_committer_process.md @@ -348,73 +348,73 @@ hi, i accept. Thanks for invitaion. 1. 下载iCLA申请表 -打开访问:[https://www.apache.org/licenses/#clas](https://www.apache.org/licenses/#clas) + 打开访问:[https://www.apache.org/licenses/#clas](https://www.apache.org/licenses/#clas) -找到`CLAs`点击进入页面 + 找到`CLAs`点击进入页面 -![](/img/docs/community/clas-web.png) + ![](/img/docs/community/clas-web.png) -找到`ICLA(个人贡献者许可协议)`,点击[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) + 找到`ICLA(个人贡献者许可协议)`,点击[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) -![](/img/docs/community/icla-web.png) + ![](/img/docs/community/icla-web.png) -跳转后,会显示需要签署的协议,这里可以在网页上直接填写,也可以下载后填写。 + 跳转后,会显示需要签署的协议,这里可以在网页上直接填写,也可以下载后填写。 -![](/img/docs/community/icla-pdf.png) + ![](/img/docs/community/icla-pdf.png) 2. 填写iCLA -> tips: 签名时需要手写签名,其他的可以直接填写后打印。 + > tips: 签名时需要手写签名,其他的可以直接填写后打印。 -需要填写的内容: + 需要填写的内容: -![](/img/docs/community/icla-content-1.png) -![](/img/docs/community/icla-content-2.png) + ![](/img/docs/community/icla-content-1.png) + ![](/img/docs/community/icla-content-2.png) -在PDF中需要填写的字段: + 在PDF中需要填写的字段: -- `Full name` -- `Public name` -- `Postal Address` -- `Country` -- `E-Mail` -- `(optional) preferred Apache id(s)` -- `(optional) notify project` -- `Date` + - `Full name` + - `Public name` + - `Postal Address` + - `Country` + - `E-Mail` + - `(optional) preferred Apache id(s)` + - `(optional) notify project` + - `Date` -> 填写样例 -> ![](/img/docs/community/icla-content-3.png) -> ![](/img/docs/community/icla-content-4.png) + > 填写样例 + > ![](/img/docs/community/icla-content-3.png) + > ![](/img/docs/community/icla-content-4.png) 3. 打印并签署 -![](/img/docs/community/icla-content-5.png) + ![](/img/docs/community/icla-content-5.png) -`Please sign`字段需要将文件打印出来然后手写签名,内容为自己姓名的全拼。 + `Please sign`字段需要将文件打印出来然后手写签名,内容为自己姓名的全拼。 4. 将签名后的文件拍照或扫描转为PDF,并重命名为`姓名拼音-icla.pdf` 5. 发送邮件到指定邮箱 -邮件发送到`secretary@apache.org`,抄送到`private@hertzbeat.apache.org`。 + 邮件发送到`secretary@apache.org`,抄送到`private@hertzbeat.apache.org`。 -注意⚠️此邮件内容需要附加上之前的 committer 邀请邮件信息, 建议在之前的往来邮件点击回复然后修改标题和收件人等。 + 注意⚠️此邮件内容需要附加上之前的 committer 邀请邮件信息, 建议在之前的往来邮件点击回复然后修改标题和收件人等。 -**发送模板** + **发送模板** -主题:`Accept to become a Hertzbeat(incubating) committer` + 主题:`Accept to become a Hertzbeat(incubating) committer` -正文: + 正文: -``` -Hello Apache, - I am willing contribute to the ASF. The attachment is my ICLA information. My Github account is : https://github.com/xxxx. -Thanks ! -``` + ``` + Hello Apache, + I am willing contribute to the ASF. The attachment is my ICLA information. My Github account is : https://github.com/xxxx. + Thanks ! + ``` -大概1-5个工作日你就会收到一封来自`root@apache.org`的邮件。 + 大概1-5个工作日你就会收到一封来自`root@apache.org`的邮件。 -当您收到邮件标题为:`Welcome to the Apache Software Foundation`的邮件,恭喜你,你已经获取到Apache ID了! + 当您收到邮件标题为:`Welcome to the Apache Software Foundation`的邮件,恭喜你,你已经获取到Apache ID了! ### 设置Apache密码 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/activemq.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/activemq.md index 94e2ad54899..a6c741ba2e7 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/activemq.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/activemq.md @@ -15,40 +15,40 @@ keywords: [开源监控系统, 开源中间件监控, ActiveMQ消息中间件监 1. 修改安装目录下的 `conf/activemq.xml` 文件,开启JMX -> 在 `broker` 标签中添加 `userJmx="true"` 属性 + > 在 `broker` 标签中添加 `userJmx="true"` 属性 -```xml - - - -``` + ```xml + + + + ``` 2. 修改安装目录下的 `bin/env` 文件,配置JMX 端口 IP等 -将如下原配置信息 - -```text -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" -``` - -更新为如下配置,⚠️注意修改`本机对外IP` - -```text -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" -``` + 将如下原配置信息 + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` + + 更新为如下配置,⚠️注意修改`本机对外IP` + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` 3. 重启 ACTIVEMQ 服务,在 HertzBeat 添加对应 ActiveMQ 监控即可,参数使用 JMX 配置的 IP 端口。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_dingtalk.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_dingtalk.md index ba6b49bc58a..44e78f392da 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_dingtalk.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_dingtalk.md @@ -11,24 +11,24 @@ keywords: [告警钉钉机器人通知, 开源告警系统, 开源监控告警 1. **【钉钉桌面客户端】-> 【群设置】-> 【智能群助手】-> 【添加新建机器人-选自定义】-> 【设置机器人名称头像】-> 【注意⚠️设置自定义关键字: HertzBeat】 ->【添加成功后复制其WebHook地址】** -> 注意⚠️ 新增机器人时需在安全设置块需设置其自定义关键字: HertzBeat ,其它安全设置加签或IP段不填写 + > 注意⚠️ 新增机器人时需在安全设置块需设置其自定义关键字: HertzBeat ,其它安全设置加签或IP段不填写 -![email](/img/docs/help/alert-notice-8.png) + ![email](/img/docs/help/alert-notice-8.png) 2. **【保存机器人的WebHook地址access_token值】** -> 例如: webHook地址:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` -> 其机器人access_token值为 `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > 例如: webHook地址:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > 其机器人access_token值为 `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` 3. **【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】** -![email](/img/docs/help/alert-notice-9.png) + ![email](/img/docs/help/alert-notice-9.png) 4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 钉钉机器人通知常见问题 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_discord.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_discord.md index bb3c6287cd4..469b9596cbe 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_discord.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_discord.md @@ -15,31 +15,31 @@ keywords: [告警 Discord 机器人通知, 开源告警系统, 开源监控告 1. 访问 [https://discord.com/developers/applications](https://discord.com/developers/applications) 创建应用 -![bot](/img/docs/help/discord-bot-1.png) + ![bot](/img/docs/help/discord-bot-1.png) 2. 在应用下创建机器人,获取机器人 Token -![bot](/img/docs/help/discord-bot-2.png) + ![bot](/img/docs/help/discord-bot-2.png) -![bot](/img/docs/help/discord-bot-3.png) + ![bot](/img/docs/help/discord-bot-3.png) 3. 授权机器人到聊天服务器 -> 在 OAuth2 菜单下给此机器人授权,`SCOPES` 范围选 `bot`, `BOT PERMISSIONS` 选发送消息 `Send Messages` + > 在 OAuth2 菜单下给此机器人授权,`SCOPES` 范围选 `bot`, `BOT PERMISSIONS` 选发送消息 `Send Messages` -![bot](/img/docs/help/discord-bot-4.png) + ![bot](/img/docs/help/discord-bot-4.png) -> 获取到最下方生成的 URL, 浏览器访问此 URL 给机器人正式授权,即设置将机器人加入哪个聊天服务器。 + > 获取到最下方生成的 URL, 浏览器访问此 URL 给机器人正式授权,即设置将机器人加入哪个聊天服务器。 4. 查看您的聊天服务器是否已经加入机器人成员 -![bot](/img/docs/help/discord-bot-5.png) + ![bot](/img/docs/help/discord-bot-5.png) ### 开启开发者模式,获取频道 Channel ID 1. 个人设置 -> 高级设置 -> 开启开发者模式 -![bot](/img/docs/help/discord-bot-6.png) + ![bot](/img/docs/help/discord-bot-6.png) 2. 获取频道 Channel ID @@ -51,13 +51,13 @@ keywords: [告警 Discord 机器人通知, 开源告警系统, 开源监控告 1. **【告警通知】->【新增接收人】 ->【选择 Discord 机器人通知方式】->【设置机器人Token和ChannelId】-> 【确定】** -![email](/img/docs/help/discord-bot-8.png) + ![email](/img/docs/help/discord-bot-8.png) -4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** +2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Discord 机器人通知常见问题 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_email.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_email.md index 0f53b58e71d..7e4f59e7900 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_email.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_email.md @@ -11,29 +11,29 @@ keywords: [告警邮件通知, 开源告警系统, 开源监控告警系统] 1. **【告警通知】->【新增接收人】 ->【选择邮件通知方式】** -![email](/img/docs/help/alert-notice-1.png) + ![email](/img/docs/help/alert-notice-1.png) 2. **【获取验证码】-> 【输入邮箱验证码】-> 【确定】** ![email](/img/docs/help/alert-notice-2.png) -![email](/img/docs/help/alert-notice-3.png) + ![email](/img/docs/help/alert-notice-3.png) 3. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 邮件通知常见问题 1. 自己内网部署的HertzBeat无法接收到邮件通知 -> HertzBeat需要自己配置邮件服务器,TanCloud无需,请确认是否在application.yml配置了自己的邮件服务器 + > HertzBeat需要自己配置邮件服务器,TanCloud无需,请确认是否在application.yml配置了自己的邮件服务器 2. 云环境TanCloud无法接收到邮件通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查是否配置正确邮箱,是否已配置告警策略关联 -> 请查询邮箱的垃圾箱里是否把告警邮件拦截 + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确邮箱,是否已配置告警策略关联 + > 请查询邮箱的垃圾箱里是否把告警邮件拦截 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_enterprise_wechat_app.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_enterprise_wechat_app.md index b70c8b10c40..cc146c4f257 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_enterprise_wechat_app.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_enterprise_wechat_app.md @@ -11,17 +11,17 @@ keywords: [开源告警系统, 开源监控告警系统, 企业微信应用告 1. **【企业微信后台管理】-> 【App管理】-> 【创建一个新的应用】-> 【设置应用信息】->【添加成功后复制应用的AgentId和Secret】** -![email](/img/docs/help/alert-wechat-1.jpg) + ![email](/img/docs/help/alert-wechat-1.jpg) 2. **【告警通知】->【新增接收人】 ->【选择企业微信应用通知方式】->【设置企业ID,企业应用id和应用的secret 】-> 【确定】** -![email](/img/docs/help/alert-wechat-2.jpg) + ![email](/img/docs/help/alert-wechat-2.jpg) 3. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人。** + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人。** -![email](/img/docs/help/alert-wechat-3.jpg) + ![email](/img/docs/help/alert-wechat-3.jpg) ### 企业微信应用通知常见问题 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_feishu.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_feishu.md index 5a6e95d7067..bc6f3672df4 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_feishu.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_feishu.md @@ -13,16 +13,17 @@ keywords: [告警飞书机器人通知, 开源告警系统, 开源监控告警 2. **【保存机器人的WebHook地址的KEY值】** -> 例如: webHook地址:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` -> 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > 例如: webHook地址:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > + > 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` 3. **【告警通知】->【新增接收人】 ->【选择飞书机器人通知方式】->【设置飞书机器人KEY】-> 【确定】** 4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 飞书机器人通知常见问题 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_slack.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_slack.md index 5c5c38c56be..f4ef1913fcd 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_slack.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_slack.md @@ -19,19 +19,19 @@ keywords: [告警 Slack Webhook 通知, 开源告警系统, 开源监控告警 1. **【告警通知】->【新增接收人】 ->【选择 Slack Webhook 通知方式】->【设置 Webhook URL】-> 【确定】** -![email](/img/docs/help/slack-bot-1.png) + ![email](/img/docs/help/slack-bot-1.png) 2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Slack 机器人通知常见问题 1. Slack 未收到机器人告警通知 -> 请排查在告警中心是否已有触发的告警信息 +> 请排查在告警中心是否已有触发的告警信息 > 请排查是否配置正确 Slack Webhook URL,是否已配置告警策略关联 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_smn.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_smn.md index d6bca9843a4..bcfe5d71a79 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_smn.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_smn.md @@ -11,33 +11,33 @@ keywords: [ 告警华为云SMN通知, 开源告警系统, 开源监控告警系 1. **按照[华为云SMN官方文档](https://support.huaweicloud.com/qs-smn/smn_json.html)开通SMN服务并配置SMN** -![alert-notice-10](/img/docs/help/alert-notice-10.png) + ![alert-notice-10](/img/docs/help/alert-notice-10.png) 2. **保存SMN的主题URN** -![alert-notice-11](/img/docs/help/alert-notice-11.png) + ![alert-notice-11](/img/docs/help/alert-notice-11.png) 3. **按照[华为云签名文档](https://support.huaweicloud.com/devg-apisign/api-sign-provide.html)获取AK、SK和项目ID** -![alert-notice-12](/img/docs/help/alert-notice-12.png) + ![alert-notice-12](/img/docs/help/alert-notice-12.png) -![alert-notice-13](/img/docs/help/alert-notice-13.png) + ![alert-notice-13](/img/docs/help/alert-notice-13.png) 4. **【告警通知】->【新增接收人】 ->【选择华为云SMN通知方式】->【设置华为云SMN AK、SK等配置】-> 【确定】** -![alert-notice-14](/img/docs/help/alert-notice-14.png) + ![alert-notice-14](/img/docs/help/alert-notice-14.png) 5. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 华为云SMN通知常见问题 1. 华为云SMN群未收到告警通知 -> 请排查在告警中心是否已有触发的告警信息 +> 请排查在告警中心是否已有触发的告警信息 > 请排查是否正确配置华为云SMN AK、SK等配置,是否已配置告警策略关联 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_telegram.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_telegram.md index dfb1aa48d8a..9760660bdff 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_telegram.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_telegram.md @@ -15,32 +15,32 @@ keywords: [告警 Telegram 通知, 开源告警系统, 开源监控告警系统] 1. 使用 [@BotFather](https://t.me/BotFather) 创建自己的机器人并获取访问令牌`Token` -![telegram-bot](/img/docs/help/telegram-bot-1.png) + ![telegram-bot](/img/docs/help/telegram-bot-1.png) 2. 获取接收人的 `User ID` -**使用您要通知的接收人账户给刚创建 Bot 账户随便发送一个信息**, -访问 ```https://api.telegram.org/bot/getUpdates``` , **`使用上一步的 Bot Token 替换其中的`**, 响应`Json`数据中第一个`result.message.from.id` 值即为接收人的 `User ID` - -```json -{ - "ok":true, - "result":[ - { - "update_id":632299191, - "message":{ - "from":{ - "id": "User ID" - }, - "chat":{ - }, - "date":1673858065, - "text":"111" + **使用您要通知的接收人账户给刚创建 Bot 账户随便发送一个信息**, + 访问 ```https://api.telegram.org/bot/getUpdates``` , **`使用上一步的 Bot Token 替换其中的`**, 响应`Json`数据中第一个`result.message.from.id` 值即为接收人的 `User ID` + + ```json + { + "ok":true, + "result":[ + { + "update_id":632299191, + "message":{ + "from":{ + "id": "User ID" + }, + "chat":{ + }, + "date":1673858065, + "text":"111" + } } - } - ] -} -``` + ] + } + ``` 3. 记录保存我们获得的 `Token` 和 `User Id` @@ -48,20 +48,20 @@ keywords: [告警 Telegram 通知, 开源告警系统, 开源监控告警系统] 1. **【告警通知】->【新增接收人】 ->【选择 Telegram 机器人通知方式】->【设置机器人Token和UserId】-> 【确定】** -![email](/img/docs/help/telegram-bot-2.png) + ![email](/img/docs/help/telegram-bot-2.png) -4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** +2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Telegram 机器人通知常见问题 1. Telegram 未收到机器人告警通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查是否配置正确机器人Token, UserId,是否已配置告警策略关联 +> 请排查在告警中心是否已有触发的告警信息 +> 请排查是否配置正确机器人Token, UserId,是否已配置告警策略关联 > UserId 应为消息接收对象的UserId 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_webhook.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_webhook.md index 272c59cfd4c..e07a3e61cce 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_webhook.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_webhook.md @@ -11,13 +11,13 @@ keywords: [告警 Webhook 回调通知, 开源告警系统, 开源监控告警 1. **【告警通知】->【新增接收人】 ->【选择WebHook通知方式】-> 【设置WebHook回调地址】 -> 【确定】** -![email](/img/docs/help/alert-notice-5.png) + ![email](/img/docs/help/alert-notice-5.png) 2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### WebHook回调POST请求体BODY内容 @@ -60,7 +60,7 @@ keywords: [告警 Webhook 回调通知, 开源告警系统, 开源监控告警 1. WebHook回调未生效 -> 请查看告警中心是否已经产生此条告警信息 +> 请查看告警中心是否已经产生此条告警信息 > 请排查配置的WebHook回调地址是否正确 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_wework.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_wework.md index 5c73ffee2a6..2fa9ae6ea0e 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_wework.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/alert_wework.md @@ -11,28 +11,29 @@ keywords: [告警企业微信通知, 开源告警系统, 开源监控告警系 1. **【企业微信端】-> 【群设置】-> 【群机器人】-> 【添加新建机器人】-> 【设置机器人名称头像】-> 【添加成功后复制其WebHook地址】** -![email](/img/docs/help/alert-notice-6.jpg) + ![email](/img/docs/help/alert-notice-6.jpg) 2. **【保存机器人的WebHook地址的KEY值】** -> 例如: webHook地址:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` -> 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > 例如: webHook地址:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > + > 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` 3. **【告警通知】->【新增接收人】 ->【选择企业微信机器人通知方式】->【设置企业微信机器人KEY】-> 【确定】** -![email](/img/docs/help/alert-notice-7.png) + ![email](/img/docs/help/alert-notice-7.png) 4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 企业微信机器人通知常见问题 1. 企业微信群未收到机器人告警通知 -> 请排查在告警中心是否已有触发的告警信息 +> 请排查在告警中心是否已有触发的告警信息 > 请排查是否配置正确机器人KEY,是否已配置告警策略关联 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/dynamic_tp.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/dynamic_tp.md index 1abcb732289..ba5aecde81b 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/dynamic_tp.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/dynamic_tp.md @@ -11,53 +11,53 @@ keywords: [开源监控系统, 开源中间件监控, DynamicTp线程池监控] 1. 集成使用 `DynamicTp` -`DynamicTp` 是Jvm语言的基于配置中心的轻量级动态线程池,内置监控告警功能,可通过SPI自定义扩展实现。 + `DynamicTp` 是Jvm语言的基于配置中心的轻量级动态线程池,内置监控告警功能,可通过SPI自定义扩展实现。 -集成使用,请参考文档 [快速接入](https://dynamictp.cn/guide/use/quick-start.html) + 集成使用,请参考文档 [快速接入](https://dynamictp.cn/guide/use/quick-start.html) 2. 开启SpringBoot Actuator Endpoint 暴露出`DynamicTp`指标接口 -```yaml -management: - endpoints: - web: - exposure: - include: '*' -``` + ```yaml + management: + endpoints: + web: + exposure: + include: '*' + ``` -测试访问指标接口 `ip:port/actuator/dynamic-tp` 是否有响应json数据如下: + 测试访问指标接口 `ip:port/actuator/dynamic-tp` 是否有响应json数据如下: -```json -[ - { - "poolName": "commonExecutor", - "corePoolSize": 1, - "maximumPoolSize": 1, - "queueType": "LinkedBlockingQueue", - "queueCapacity": 2147483647, - "queueSize": 0, - "fair": false, - "queueRemainingCapacity": 2147483647, - "activeCount": 0, - "taskCount": 0, - "completedTaskCount": 0, - "largestPoolSize": 0, - "poolSize": 0, - "waitTaskCount": 0, - "rejectCount": 0, - "rejectHandlerName": null, - "dynamic": false, - "runTimeoutCount": 0, - "queueTimeoutCount": 0 - }, - { - "maxMemory": "4 GB", - "totalMemory": "444 MB", - "freeMemory": "250.34 MB", - "usableMemory": "3.81 GB" - } -] -``` + ```json + [ + { + "poolName": "commonExecutor", + "corePoolSize": 1, + "maximumPoolSize": 1, + "queueType": "LinkedBlockingQueue", + "queueCapacity": 2147483647, + "queueSize": 0, + "fair": false, + "queueRemainingCapacity": 2147483647, + "activeCount": 0, + "taskCount": 0, + "completedTaskCount": 0, + "largestPoolSize": 0, + "poolSize": 0, + "waitTaskCount": 0, + "rejectCount": 0, + "rejectHandlerName": null, + "dynamic": false, + "runTimeoutCount": 0, + "queueTimeoutCount": 0 + }, + { + "maxMemory": "4 GB", + "totalMemory": "444 MB", + "freeMemory": "250.34 MB", + "usableMemory": "3.81 GB" + } + ] + ``` 3. 在HertzBeat中间件监控下添加DynamicTp监控即可 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/iotdb.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/iotdb.md index 8bb3bbb25e0..e266fa96feb 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/iotdb.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/iotdb.md @@ -17,29 +17,29 @@ keywords: [开源监控系统, 开源数据库监控, IoTDB数据库监控] 1. metric 采集默认是关闭的,需要先到 `conf/iotdb-metric.yml` 中修改参数打开后重启 server -``` -# 是否启动监控模块,默认为false -enableMetric: true - -# 是否启用操作延迟统计 -enablePerformanceStat: false - -# 数据提供方式,对外部通过jmx和prometheus协议提供metrics的数据, 可选参数:[JMX, PROMETHEUS, IOTDB],IOTDB是默认关闭的。 -metricReporterList: - - JMX - - PROMETHEUS - -# 底层使用的metric架构,可选参数:[MICROMETER, DROPWIZARD] -monitorType: MICROMETER - -# 初始化metric的级别,可选参数: [CORE, IMPORTANT, NORMAL, ALL] -metricLevel: IMPORTANT - -# 预定义的指标集, 可选参数: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] -predefinedMetrics: - - JVM - - FILE -``` + ``` + # 是否启动监控模块,默认为false + enableMetric: true + + # 是否启用操作延迟统计 + enablePerformanceStat: false + + # 数据提供方式,对外部通过jmx和prometheus协议提供metrics的数据, 可选参数:[JMX, PROMETHEUS, IOTDB],IOTDB是默认关闭的。 + metricReporterList: + - JMX + - PROMETHEUS + + # 底层使用的metric架构,可选参数:[MICROMETER, DROPWIZARD] + monitorType: MICROMETER + + # 初始化metric的级别,可选参数: [CORE, IMPORTANT, NORMAL, ALL] + metricLevel: IMPORTANT + + # 预定义的指标集, 可选参数: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] + predefinedMetrics: + - JVM + - FILE + ``` 2. 重启 IoTDB, 打开浏览器或者用curl 访问 , 就能看到metric数据了。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/issue.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/issue.md index f17a60a9b9f..27e9c63b3ba 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/issue.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/issue.md @@ -8,25 +8,25 @@ sidebar_label: 常见问题 1. **页面反馈:monitor.host:监控Host必须是ipv4,ipv6或域名** -> 如信息所示,输入的监控Host须是ipv4,ipv6或域名,不能携带协议头,例如协议头http + > 如信息所示,输入的监控Host须是ipv4,ipv6或域名,不能携带协议头,例如协议头http 2. **网站API等监控反馈statusCode:403或401,但对端服务本身无需认证,浏览器直接访问是OK** -> 请排查是否是被防火墙拦截,如宝塔等默认设置了对请求header中`User-Agent=Apache-HttpClient`的拦截,若被拦截请删除此拦截规则。(v1.0.beat5版本已将user-agent模拟成浏览器此问题不存在) + > 请排查是否是被防火墙拦截,如宝塔等默认设置了对请求header中`User-Agent=Apache-HttpClient`的拦截,若被拦截请删除此拦截规则。(v1.0.beat5版本已将user-agent模拟成浏览器此问题不存在) 3. 安装包部署的hertzbeat下ping连通性监控异常 安装包安装部署的hertzbeat,对ping连通性监控不可用,但本地直接ping是可用的。 -> 安装包部署需要配置java虚拟机root权限启动hertzbeat从而使用ICMP,若未启用root权限则是判断telnet对端7号端口是否开通 -> docker安装默认启用无此问题 -> 详见 + > 安装包部署需要配置java虚拟机root权限启动hertzbeat从而使用ICMP,若未启用root权限则是判断telnet对端7号端口是否开通 + > docker安装默认启用无此问题 + > 详见 4. 配置了k8s监控,但是实际监控时间并未按照正确间隔时间执行 请参考下面几点排查问题: -> 一:首先查看hertzbeat的错误日志,如果出现了'desc: SQL statement too long, check maxSQLLength config',信息 -> 二:需要调整tdengine配置文件,可在服务器创建taos.cfg文件,调整# max length of an SQL : maxSQLLength 654800,然后重启tdengine,需要加入配置文件的挂载 -> 三:如果遇到了重启tdengine失败,需要调整挂载数据文件中的配置,见 .../taosdata/dnode/dnodeEps.json,中dnodeFqdn调整为启动失败的dockerId即可,然后docker restart tdengine + > 一:首先查看hertzbeat的错误日志,如果出现了'desc: SQL statement too long, check maxSQLLength config',信息 + > 二:需要调整tdengine配置文件,可在服务器创建taos.cfg文件,调整# max length of an SQL : maxSQLLength 654800,然后重启tdengine,需要加入配置文件的挂载 + > 三:如果遇到了重启tdengine失败,需要调整挂载数据文件中的配置,见 .../taosdata/dnode/dnodeEps.json,中dnodeFqdn调整为启动失败的dockerId即可,然后docker restart tdengine 5. 配置http api监控,用于进行业务接口探测,确保业务可以用,另外接口有进行token鉴权校验,"Authorization:Bearer eyJhbGciOiJIUzI1....",配置后测试,提示“StatusCode 401”。服务端应用收到的token为"Authorization:Bearer%20eyJhbGciOiJIUzI1....",hertzbeat对空格进行转义为“%20”,服务器没有转义导致鉴权失败,建议转义功能作为可选项。 @@ -35,31 +35,31 @@ sidebar_label: 常见问题 1. **MYSQL,TDENGINE和HertzBeat都Docker部署在同一主机上,HertzBeat使用localhost或127.0.0.1连接数据库失败** 此问题本质为Docker容器访问宿主机端口连接失败,由于docker默认网络模式为Bridge模式,其通过localhost访问不到宿主机。 -> 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP -> 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` + > 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP + > 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` 2. **按照流程部署,访问 无界面** 请参考下面几点排查问题: -> 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 -> 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 -> 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 + > 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 + > 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 3. **日志报错TDengine连接或插入SQL失败** -> 一:排查配置的数据库账户密码是否正确,数据库是否创建 -> 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter + > 一:排查配置的数据库账户密码是否正确,数据库是否创建 + > 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter ### 安装包部署常见问题 1. **按照流程部署,访问 无界面** 请参考下面几点排查问题: -> 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 -> 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 -> 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 + > 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 + > 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 2. **日志报错TDengine连接或插入SQL失败** -> 一:排查配置的数据库账户密码是否正确,数据库是否创建 -> 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter + > 一:排查配置的数据库账户密码是否正确,数据库是否创建 + > 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/jetty.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/jetty.md index 31e297703fc..5e5603783cc 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/jetty.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/jetty.md @@ -19,33 +19,33 @@ keywords: [开源监控系统, 开源中间件监控, Jetty应用服务器监控 1. 在 Jetty 启动 JMX JMX-REMOTE 模块 -```shell -java -jar $JETTY_HOME/start.jar --add-module=jmx -java -jar $JETTY_HOME/start.jar --add-module=jmx-remote -``` + ```shell + java -jar $JETTY_HOME/start.jar --add-module=jmx + java -jar $JETTY_HOME/start.jar --add-module=jmx-remote + ``` -命令执行成功会创建出 `${JETTY_BASE}/start.d/jmx-remote.ini` 配置文件 + 命令执行成功会创建出 `${JETTY_BASE}/start.d/jmx-remote.ini` 配置文件 2. 编辑 `${JETTY_BASE}/start.d/jmx-remote.ini` 配置文件,修改 JMX 的 IP 端口等参数。 -**`localhost` 需修改为对外暴露 IP** - -```text -## The host/address to bind the RMI server to. -# jetty.jmxremote.rmiserverhost=localhost - -## The port the RMI server listens to (0 means a random port is chosen). -# jetty.jmxremote.rmiserverport=1099 - -## The host/address to bind the RMI registry to. -# jetty.jmxremote.rmiregistryhost=localhost - -## The port the RMI registry listens to. -# jetty.jmxremote.rmiregistryport=1099 - -## The host name exported in the RMI stub. --Djava.rmi.server.hostname=localhost -``` + **`localhost` 需修改为对外暴露 IP** + + ```text + ## The host/address to bind the RMI server to. + # jetty.jmxremote.rmiserverhost=localhost + + ## The port the RMI server listens to (0 means a random port is chosen). + # jetty.jmxremote.rmiserverport=1099 + + ## The host/address to bind the RMI registry to. + # jetty.jmxremote.rmiregistryhost=localhost + + ## The port the RMI registry listens to. + # jetty.jmxremote.rmiregistryport=1099 + + ## The host name exported in the RMI stub. + -Djava.rmi.server.hostname=localhost + ``` 3. 重启 Jetty Server 即可。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kafka.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kafka.md index a79bb0e91c2..8663360a9ad 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kafka.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kafka.md @@ -17,16 +17,16 @@ keywords: [开源监控系统, 开源消息中间件监控, Kafka监控] 2. 修改 Kafka 启动脚本 -修改 Kafka 安装目录下的启动脚本 `/bin/kafka-server-start.sh` -在脚本正文(即非注释行)的第一行前添加如下内容, ⚠️注意替换您自己的端口和对外 IP 地址 - -```shell -export JMX_PORT=9999; -export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=ip地址 -Dcom.sun.management.jmxremote.rmi.port=9999 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"; - -# 这是最后一行本来就存在的 -# exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@" -``` + 修改 Kafka 安装目录下的启动脚本 `/bin/kafka-server-start.sh` + 在脚本正文(即非注释行)的第一行前添加如下内容, ⚠️注意替换您自己的端口和对外 IP 地址 + + ```shell + export JMX_PORT=9999; + export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=ip地址 -Dcom.sun.management.jmxremote.rmi.port=9999 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"; + + # 这是最后一行本来就存在的 + # exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@" + ``` 3. 重启 Kafka 服务 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kubernetes.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kubernetes.md index cc4c7254afe..162262ab8cd 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kubernetes.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/kubernetes.md @@ -17,15 +17,15 @@ keywords: [开源监控系统, 开源Kubernetes监控] 1. 创建service account并绑定默认cluster-admin管理员集群角色 -```kubectl create serviceaccount dashboard-admin -n kube-system``` + ```kubectl create serviceaccount dashboard-admin -n kube-system``` 2. 用户授权 -```shell -kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin -kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' -kubectl describe secret {secret} -n kube-system -``` + ```shell + kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin + kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' + kubectl describe secret {secret} -n kube-system + ``` ### 方式二 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/nacos.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/nacos.md index 0b9b96b6099..0b3cf704589 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/nacos.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/nacos.md @@ -14,9 +14,9 @@ keywords: [开源监控系统, 中间件监控, Nacos分布式监控] 1. 按照[部署文档](https://nacos.io/zh-cn/docs/deployment.html)搭建好Nacos集群。 2. 配置application.properties文件,暴露metrics数据。 -``` -management.endpoints.web.exposure.include=* -``` + ``` + management.endpoints.web.exposure.include=* + ``` 3. 访问```{ip}:8848/nacos/actuator/prometheus```,查看是否能访问到metrics数据。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/nginx.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/nginx.md index 8c81c5a82c2..50837f79394 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/nginx.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/nginx.md @@ -17,45 +17,45 @@ keywords: [开源监控工具, 开源Java监控工具, 监控Nginx指标] 1. 检查是否已添加 `ngx_http_stub_status_module` -```shell -nginx -V -``` + ```shell + nginx -V + ``` -查看是否包含 `--with-http_stub_status_module`,如果没有则需要重新编译安装 Nginx。 + 查看是否包含 `--with-http_stub_status_module`,如果没有则需要重新编译安装 Nginx。 2. 编译安装 Nginx, 添加 `ngx_http_stub_status_module` 模块 -下载 Nginx 并解压,在目录下执行 + 下载 Nginx 并解压,在目录下执行 -```shell -./configure --prefix=/usr/local/nginx --with-http_stub_status_module - -make && make install -``` + ```shell + ./configure --prefix=/usr/local/nginx --with-http_stub_status_module + + make && make install + ``` 3. 修改 Nginx 配置文件 -修改 `nginx.conf` 文件,添加监控模块暴露端点,如下配置: + 修改 `nginx.conf` 文件,添加监控模块暴露端点,如下配置: -```shell -# modify nginx.conf -server { - listen 80; # port - server_name localhost; - location /nginx-status { - stub_status on; - access_log on; - #allow 127.0.0.1; #only allow requests from localhost - #deny all; #deny all other hosts - } -} -``` + ```shell + # modify nginx.conf + server { + listen 80; # port + server_name localhost; + location /nginx-status { + stub_status on; + access_log on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } + } + ``` 4. 重新加载 Nginx -```shell -nginx -s reload -``` + ```shell + nginx -s reload + ``` 5. 在浏览器访问 `http://localhost/nginx-status` 即可查看 Nginx 监控状态信息。 @@ -63,48 +63,48 @@ nginx -s reload 1. 安装 `ngx_http_reqstat_module` 模块 -```shell -# install `ngx_http_reqstat_module` -wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip - -unzip ngx_req_status.zip - -patch -p1 < ../ngx_req_status-master/write_filter.patch - -./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master - -make -j2 - -make install -``` + ```shell + # install `ngx_http_reqstat_module` + wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip + + unzip ngx_req_status.zip + + patch -p1 < ../ngx_req_status-master/write_filter.patch + + ./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master + + make -j2 + + make install + ``` 2. 修改 Nginx 配置文件 -修改 `nginx.conf` 文件,添加状态模块暴露端点,如下配置: - -```shell -# modify nginx.conf -http { - req_status_zone server_name $server_name 256k; - req_status_zone server_addr $server_addr 256k; - - req_status server_name server_addr; - - server { - location /req-status { - req_status_show on; - #allow 127.0.0.1; #only allow requests from localhost - #deny all; #deny all other hosts + 修改 `nginx.conf` 文件,添加状态模块暴露端点,如下配置: + + ```shell + # modify nginx.conf + http { + req_status_zone server_name $server_name 256k; + req_status_zone server_addr $server_addr 256k; + + req_status server_name server_addr; + + server { + location /req-status { + req_status_show on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } } } -} -``` + ``` 3. 重新加载 Nginx -```shell -nginx -s reload -``` + ```shell + nginx -s reload + ``` 4. 在浏览器访问 `http://localhost/req-status` 即可查看 Nginx 监控状态信息。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/rabbitmq.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/rabbitmq.md index 2210a2452e0..7e4ff6383d7 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/rabbitmq.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/rabbitmq.md @@ -14,9 +14,9 @@ keywords: [开源监控系统, 开源消息中间件监控, RabbitMQ消息中间 1. 开启 Management 插件,或使用自开启版本 -```shell -rabbitmq-plugins enable rabbitmq_management -``` + ```shell + rabbitmq-plugins enable rabbitmq_management + ``` 2. 浏览器访问 ,默认账户密码 `guest/guest`. 成功登录即开启成功。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/shenyu.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/shenyu.md index 87bb81b7800..40710bb3986 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/shenyu.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/shenyu.md @@ -17,27 +17,27 @@ keywords: [开源监控系统, 开源消息中间件监控, ShenYu网关监控 1. 在网关的 pom.xml 文件中添加 metrics 的依赖。 -```xml - - org.apache.shenyu - shenyu-spring-boot-starter-plugin-metrics - ${project.version} - -``` + ```xml + + org.apache.shenyu + shenyu-spring-boot-starter-plugin-metrics + ${project.version} + + ``` 2. 在网关的配置yaml文件中编辑如下内容: -```yaml -shenyu: - metrics: - enabled: true #设置为 true 表示开启 - name : prometheus - host: 127.0.0.1 #暴露的ip - port: 8090 #暴露的端口 - jmxConfig: #jmx配置 - props: - jvm_enabled: true #开启jvm的监控指标 -``` + ```yaml + shenyu: + metrics: + enabled: true #设置为 true 表示开启 + name : prometheus + host: 127.0.0.1 #暴露的ip + port: 8090 #暴露的端口 + jmxConfig: #jmx配置 + props: + jvm_enabled: true #开启jvm的监控指标 + ``` 最后重启访问网关指标接口 `http://ip:8090` 响应 prometheus 格式数据即可。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/zookeeper.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/zookeeper.md index db6043f104a..9b8e3427f6b 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/zookeeper.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/zookeeper.md @@ -14,23 +14,23 @@ keywords: [开源监控系统, Zookeeper监控监控] 1. 加白名单步骤 -> 1.找到我们 zookeeper 的配置文件,一般是 `zoo.cfg` -> -> 2.配置文件中加入以下命令 + 1. 找到我们 zookeeper 的配置文件,一般是 `zoo.cfg` -```shell -# 将需要的命令添加到白名单中 -4lw.commands.whitelist=stat, ruok, conf, isro + 2. 配置文件中加入以下命令 -# 将所有命令添加到白名单中 -4lw.commands.whitelist=* -``` + ```shell + # 将需要的命令添加到白名单中 + 4lw.commands.whitelist=stat, ruok, conf, isro + + # 将所有命令添加到白名单中 + 4lw.commands.whitelist=* + ``` -> 3.重启服务 + 3. 重启服务 -```shell -zkServer.sh restart -``` + ```shell + zkServer.sh restart + ``` 2. netcat 协议 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/custom-config.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/custom-config.md index 95bedddc350..6c30086e1b8 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/custom-config.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/custom-config.md @@ -16,61 +16,61 @@ sidebar_label: 常见参数配置 1. 配置短信发送服务器 -> 只有成功配置了您自己的短信服务器,监控系统内触发的告警短信才会正常发送。 + > 只有成功配置了您自己的短信服务器,监控系统内触发的告警短信才会正常发送。 -在`application.yml`新增如下腾讯平台短信服务器配置(参数需替换为您的短信服务器配置) + 在`application.yml`新增如下腾讯平台短信服务器配置(参数需替换为您的短信服务器配置) -```yaml -common: - sms: - tencent: - secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY - secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA - app-id: 1435441637 - sign-name: 赫兹跳动 - template-id: 1343434 -``` + ```yaml + common: + sms: + tencent: + secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY + secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA + app-id: 1435441637 + sign-name: 赫兹跳动 + template-id: 1343434 + ``` -1.1 腾讯云短信创建签名(sign-name) -![image](https://github.com/apache/hertzbeat/assets/40455946/3a4c287d-b23d-4398-8562-4894296af485) + 1.1 腾讯云短信创建签名(sign-name) + ![image](https://github.com/apache/hertzbeat/assets/40455946/3a4c287d-b23d-4398-8562-4894296af485) -1.2 腾讯云短信创建正文模板(template-id) + 1.2 腾讯云短信创建正文模板(template-id) -``` -监控:{1},告警级别:{2}。内容:{3} -``` + ``` + 监控:{1},告警级别:{2}。内容:{3} + ``` -![image](https://github.com/apache/hertzbeat/assets/40455946/face71a6-46d5-452c-bed3-59d2a975afeb) + ![image](https://github.com/apache/hertzbeat/assets/40455946/face71a6-46d5-452c-bed3-59d2a975afeb) -1.3 腾讯云短信创建应用(app-id) -![image](https://github.com/apache/hertzbeat/assets/40455946/2732d710-37fa-4455-af64-48bba273c2f8) + 1.3 腾讯云短信创建应用(app-id) + ![image](https://github.com/apache/hertzbeat/assets/40455946/2732d710-37fa-4455-af64-48bba273c2f8) -1.4 腾讯云访问管理(secret-id、secret-key) -![image](https://github.com/apache/hertzbeat/assets/40455946/36f056f0-94e7-43db-8f07-82893c98024e) + 1.4 腾讯云访问管理(secret-id、secret-key) + ![image](https://github.com/apache/hertzbeat/assets/40455946/36f056f0-94e7-43db-8f07-82893c98024e) 2. 配置告警自定义参数 -```yaml -alerter: - # 自定义控制台地址 - console-url: https://console.tancloud.io -``` + ```yaml + alerter: + # 自定义控制台地址 + console-url: https://console.tancloud.io + ``` 3. 使用外置redis代替内存存储实时指标数据 -> 默认我们的指标实时数据存储在内存中,可以配置如下来使用redis代替内存存储。 - -注意⚠️ `memory.enabled: false, redis.enabled: true` - -```yaml -warehouse: - store: - memory: - enabled: false - init-size: 1024 - redis: - enabled: true - host: 127.0.0.1 - port: 6379 - password: 123456 -``` + > 默认我们的指标实时数据存储在内存中,可以配置如下来使用redis代替内存存储。 + + 注意⚠️ `memory.enabled: false, redis.enabled: true` + + ```yaml + warehouse: + store: + memory: + enabled: false + init-size: 1024 + redis: + enabled: true + host: 127.0.0.1 + port: 6379 + password: 123456 + ``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/docker-compose-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/docker-compose-deploy.md index 06ae9bc2f29..ff2f22d3adc 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/docker-compose-deploy.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/docker-compose-deploy.md @@ -15,47 +15,47 @@ sidebar_label: Docker Compose方式安装 1. 下载启动脚本包 -从 [下载地址](https://github.com/apache/hertzbeat/releases/download/v1.6.0/apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz) 下载安装脚本包 `apache-hertzbeat-xxx-incubating-docker-compose.tar.gz` + 从 [下载地址](https://github.com/apache/hertzbeat/releases/download/v1.6.0/apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz) 下载安装脚本包 `apache-hertzbeat-xxx-incubating-docker-compose.tar.gz` 2. 选择使用 HertzBeat + PostgreSQL + VictoriaMetrics 方案 -:::tip + :::tip -- `apache-hertzbeat-xxx-incubating-docker-compose.tar.gz` 解压后包含多个部署方案,这里我们推荐选择 `hertzbeat-postgresql-victoria-metrics` 方案。 -- 其它部署方式请详细阅读各个部署方案的 README.md 文件, MySQL 方案需要自行准备 MySQL 驱动包。 + - `apache-hertzbeat-xxx-incubating-docker-compose.tar.gz` 解压后包含多个部署方案,这里我们推荐选择 `hertzbeat-postgresql-victoria-metrics` 方案。 + - 其它部署方式请详细阅读各个部署方案的 README.md 文件, MySQL 方案需要自行准备 MySQL 驱动包。 -::: + ::: -- 解压脚本包 + - 解压脚本包 -``` -tar zxvf apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz -``` + ``` + tar zxvf apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz + ``` -- 进入解压目录, 选择 `HertzBeat + PostgreSQL + VictoriaMetrics` 一键部署 + - 进入解压目录, 选择 `HertzBeat + PostgreSQL + VictoriaMetrics` 一键部署 -``` -cd apache-hertzbeat-1.6.0-incubating-docker-compose -cd hertzbeat-postgresql-victoria-metrics -``` + ``` + cd apache-hertzbeat-1.6.0-incubating-docker-compose + cd hertzbeat-postgresql-victoria-metrics + ``` -- 一键启动 + - 一键启动 -> 在 `hertzbeat-postgresql-victoria-metrics` 目录下执行以下命令 + > 在 `hertzbeat-postgresql-victoria-metrics` 目录下执行以下命令 -``` -docker-compose up -d -``` + ``` + docker-compose up -d + ``` -- 查看服务状态 + - 查看服务状态 -> 查看各个容器的运行状态,up 为正常运行状态 + > 查看各个容器的运行状态,up 为正常运行状态 -``` -docker-compose ps -``` + ``` + docker-compose ps + ``` -4. 开始探索 HertzBeat +3. 开始探索 HertzBeat 浏览器访问 即可开始探索使用,默认账户密码 admin/hertzbeat。 **HAVE FUN** diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/docker-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/docker-deploy.md index caf412441d7..894b8b79684 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/docker-deploy.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/docker-deploy.md @@ -17,37 +17,37 @@ sidebar_label: Docker方式安装 1. 执行以下命令 -```shell -$ docker run -d -p 1157:1157 -p 1158:1158 \ - -v $(pwd)/data:/opt/hertzbeat/data \ - -v $(pwd)/logs:/opt/hertzbeat/logs \ - -v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml \ - -v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml \ - --restart=always \ - --name hertzbeat apache/hertzbeat -``` - -> 命令参数详解 - -- `docker run -d` : 通过 Docker 后台运行容器 -- `-p 1157:1157 -p 1158:1158` : 映射容器端口到主机端口(前面是宿主机的端口号,后面是容器的端口号)。1157是页面端口,1158是集群端口。 -- `-v $(pwd)/data:/opt/hertzbeat/data` : (可选,数据持久化) 重要,挂载数据库文件到本地主机,保证数据不会因为容器的创建删除而丢失 -- `-v $(pwd)/logs:/opt/hertzbeat/logs` : (可选) 挂载日志文件到本地主机方便查看 -- `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (可选) 挂载配置文件到容器中(请确保本地已有此文件)。[下载源](https://github.com/apache/hertzbeat/raw/master/script/application.yml) -- `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (可选) 挂载账户配置文件到容器中(请确保本地已有此文件)。[下载源](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) -- `-v $(pwd)/ext-lib:/opt/hertzbeat/ext-lib` : (可选) 挂载外部的第三方 JAR 包 [mysql-jdbc](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip) [oracle-jdbc](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) [oracle-i18n](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar) -- `--name hertzbeat` : (可选) 命名容器名称为 hertzbeat -- `--restart=always` : (可选) 配置容器自动重启。 -- `apache/hertzbeat` : 使用[官方应用镜像](https://hub.docker.com/r/apache/hertzbeat)来启动容器, 若网络超时可用`quay.io/tancloud/hertzbeat`代替。 - -:::tip - -- 标记为可选的参数,非必填项,若不需要则删除。 -- 此将容器的 1157,1158 端口映射到宿主机的 1157,1158 端口上。若宿主机该端口已被占用,则需修改主机映射端口。 -- 挂载文件时,前面参数为你自定义本地文件地址,后面参数为容器内文件地址。挂载时请确保你本地已有此文件。 -- 可执行```docker update --restart=always hertzbeat```配置容器自动重启。 - -::: + ```shell + $ docker run -d -p 1157:1157 -p 1158:1158 \ + -v $(pwd)/data:/opt/hertzbeat/data \ + -v $(pwd)/logs:/opt/hertzbeat/logs \ + -v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml \ + -v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml \ + --restart=always \ + --name hertzbeat apache/hertzbeat + ``` + + > 命令参数详解 + + - `docker run -d` : 通过 Docker 后台运行容器 + - `-p 1157:1157 -p 1158:1158` : 映射容器端口到主机端口(前面是宿主机的端口号,后面是容器的端口号)。1157是页面端口,1158是集群端口。 + - `-v $(pwd)/data:/opt/hertzbeat/data` : (可选,数据持久化) 重要,挂载数据库文件到本地主机,保证数据不会因为容器的创建删除而丢失 + - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (可选) 挂载日志文件到本地主机方便查看 + - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (可选) 挂载配置文件到容器中(请确保本地已有此文件)。[下载源](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (可选) 挂载账户配置文件到容器中(请确保本地已有此文件)。[下载源](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) + - `-v $(pwd)/ext-lib:/opt/hertzbeat/ext-lib` : (可选) 挂载外部的第三方 JAR 包 [mysql-jdbc](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip) [oracle-jdbc](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) [oracle-i18n](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar) + - `--name hertzbeat` : (可选) 命名容器名称为 hertzbeat + - `--restart=always` : (可选) 配置容器自动重启。 + - `apache/hertzbeat` : 使用[官方应用镜像](https://hub.docker.com/r/apache/hertzbeat)来启动容器, 若网络超时可用`quay.io/tancloud/hertzbeat`代替。 + + :::tip + + - 标记为可选的参数,非必填项,若不需要则删除。 + - 此将容器的 1157,1158 端口映射到宿主机的 1157,1158 端口上。若宿主机该端口已被占用,则需修改主机映射端口。 + - 挂载文件时,前面参数为你自定义本地文件地址,后面参数为容器内文件地址。挂载时请确保你本地已有此文件。 + - 可执行```docker update --restart=always hertzbeat```配置容器自动重启。 + + ::: 2. 开始探索 HertzBeat 浏览器访问 即可开始探索使用HertzBeat,默认账户密码 admin/hertzbeat。 @@ -63,34 +63,34 @@ HertzBeat Collector 是一个轻量级的数据采集器,用于采集并将数 1. 执行以下命令 -```shell -$ docker run -d \ - -e IDENTITY=custom-collector-name \ - -e MODE=public \ - -e MANAGER_HOST=127.0.0.1 \ - -e MANAGER_PORT=1158 \ - --name hertzbeat-collector apache/hertzbeat-collector -``` - -> 命令参数详解 - -- `docker run -d` : 通过 Docker 后台运行容器 -- `-e IDENTITY=custom-collector-name` : (可选) 设置采集器的唯一标识名称。注意多采集器时名称需保证唯一性。 -- `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 -- `-e MANAGER_HOST=127.0.0.1` : 重要, 配置连接的 HertzBeat Server 地址,127.0.0.1 需替换为 HertzBeat Server 对外 IP 地址。 -- `-e MANAGER_PORT=1158` : (可选) 配置连接的 HertzBeat Server 端口,默认 1158. -- `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (可选)挂载日志文件到本地主机方便查看 -- `--name hertzbeat-collector` : 命名容器名称为 hertzbeat-collector -- `apache/hertzbeat-collector` : 使用[官方应用镜像](https://hub.docker.com/r/apache/hertzbeat-collector)来启动容器, 若网络超时可用`quay.io/tancloud/hertzbeat-collector`代替。 + ```shell + $ docker run -d \ + -e IDENTITY=custom-collector-name \ + -e MODE=public \ + -e MANAGER_HOST=127.0.0.1 \ + -e MANAGER_PORT=1158 \ + --name hertzbeat-collector apache/hertzbeat-collector + ``` -:::tip + > 命令参数详解 -- `MANAGER_HOST=127.0.0.1` 中的 `127.0.0.1` 需被替换为 HertzBeat Server 对外 IP 地址。 -- 标记为可选的参数,非必填项,若不需要则删除。 -- 挂载文件时,前面参数为你自定义本地文件地址,后面参数为容器内文件地址。挂载时请确保你本地已有此文件。 -- 可执行```docker update --restart=always hertzbeat-collector```配置容器自动重启。 + - `docker run -d` : 通过 Docker 后台运行容器 + - `-e IDENTITY=custom-collector-name` : (可选) 设置采集器的唯一标识名称。注意多采集器时名称需保证唯一性。 + - `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 + - `-e MANAGER_HOST=127.0.0.1` : 重要, 配置连接的 HertzBeat Server 地址,127.0.0.1 需替换为 HertzBeat Server 对外 IP 地址。 + - `-e MANAGER_PORT=1158` : (可选) 配置连接的 HertzBeat Server 端口,默认 1158. + - `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (可选)挂载日志文件到本地主机方便查看 + - `--name hertzbeat-collector` : 命名容器名称为 hertzbeat-collector + - `apache/hertzbeat-collector` : 使用[官方应用镜像](https://hub.docker.com/r/apache/hertzbeat-collector)来启动容器, 若网络超时可用`quay.io/tancloud/hertzbeat-collector`代替。 -::: + :::tip + + - `MANAGER_HOST=127.0.0.1` 中的 `127.0.0.1` 需被替换为 HertzBeat Server 对外 IP 地址。 + - 标记为可选的参数,非必填项,若不需要则删除。 + - 挂载文件时,前面参数为你自定义本地文件地址,后面参数为容器内文件地址。挂载时请确保你本地已有此文件。 + - 可执行```docker update --restart=always hertzbeat-collector```配置容器自动重启。 + + ::: 2. 开始探索 HertzBeat Collector 浏览器访问 即可开始探索使用,默认账户密码 admin/hertzbeat。 @@ -106,45 +106,45 @@ $ docker run -d \ 1. MYSQL,TDENGINE或IotDB和HertzBeat都Docker部署在同一主机上,HertzBeat使用localhost或127.0.0.1连接数据库失败 此问题本质为Docker容器访问宿主机端口连接失败,由于docker默认网络模式为Bridge模式,其通过localhost访问不到宿主机。 -> 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP -> 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` + > 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP + > 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` 2. 按照流程部署,访问 无界面 请参考下面几点排查问题: -> 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 -> 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 -> 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 + > 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 + > 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 3. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - -> 安装初始化此时序数据库 + > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - + > 安装初始化此时序数据库 4. 安装配置了时序数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 请检查配置的时许数据库参数是否正确 -> 时序数据库对应的 enable 是否设置为true -> 注意⚠️若hertzbeat和外置数据库都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP -> 可根据logs目录下启动日志排查 + > 请检查配置的时许数据库参数是否正确 + > 时序数据库对应的 enable 是否设置为true + > 注意⚠️若hertzbeat和外置数据库都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP + > 可根据logs目录下启动日志排查 5. application.yml 是干什么用的 -> 此文件是HertzBeat的配置文件,用于配置HertzBeat的各种参数,如数据库连接信息,时序数据库配置等。 + > 此文件是HertzBeat的配置文件,用于配置HertzBeat的各种参数,如数据库连接信息,时序数据库配置等。 -下载 `application.yml` 文件到主机目录下,例如: $(pwd)/application.yml -下载源 [github/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) + 下载 `application.yml` 文件到主机目录下,例如: $(pwd)/application.yml + 下载源 [github/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) -- 若需使用邮件发送告警,需替换 `application.yml` 里面的邮件服务器参数 -- 若需使用外置Mysql数据库替换内置H2数据库,需替换`application.yml`里面的`spring.datasource`参数 具体步骤参见 [H2数据库切换为MYSQL](mysql-change)) -- 若需使用时序数据库TDengine来存储指标数据,需替换`application.yml`里面的`warehouse.store.victoria-metrics`参数 具体步骤参见 [使用victoria-metrics存储指标数据](victoria-metrics-init) + - 若需使用邮件发送告警,需替换 `application.yml` 里面的邮件服务器参数 + - 若需使用外置Mysql数据库替换内置H2数据库,需替换`application.yml`里面的`spring.datasource`参数 具体步骤参见 [H2数据库切换为MYSQL](mysql-change)) + - 若需使用时序数据库TDengine来存储指标数据,需替换`application.yml`里面的`warehouse.store.victoria-metrics`参数 具体步骤参见 [使用victoria-metrics存储指标数据](victoria-metrics-init) 6. sureness.yml 是干什么用的 -> 此文件是HertzBeat的用户配置文件,用于配置HertzBeat的用户信息,如账户密码等。 + > 此文件是HertzBeat的用户配置文件,用于配置HertzBeat的用户信息,如账户密码等。 -HertzBeat默认内置三个用户账户,分别为 admin/hertzbeat tom/hertzbeat guest/hertzbeat -若需要新增删除修改账户或密码,可以通过配置 `sureness.yml` 实现,若无此需求可忽略此步骤 -下载 `sureness.yml` 文件到主机目录下,例如: $(pwd)/sureness.yml -下载源 [github/script/sureness.yml](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) -具体修改步骤参考 [配置修改账户密码](account-modify) + HertzBeat默认内置三个用户账户,分别为 admin/hertzbeat tom/hertzbeat guest/hertzbeat + 若需要新增删除修改账户或密码,可以通过配置 `sureness.yml` 实现,若无此需求可忽略此步骤 + 下载 `sureness.yml` 文件到主机目录下,例如: $(pwd)/sureness.yml + 下载源 [github/script/sureness.yml](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) + 具体修改步骤参考 [配置修改账户密码](account-modify) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/greptime-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/greptime-init.md index 5928c7b826a..1f24f70f3e5 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/greptime-init.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/greptime-init.md @@ -16,32 +16,32 @@ It's designed to work on infrastructure of the cloud era, and users benefit from ### 通过Docker方式安装GreptimeDB > 可参考官方网站[安装教程](https://docs.greptime.com/getting-started/overview) -> -> 1. 下载安装Docker环境 -> Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 -> 安装完毕后终端查看Docker版本是否正常输出。 -> -> ``` -> $ docker -v -> Docker version 20.10.12, build e91ed57 -> ``` -> -> 2. Docker安装GreptimeDB - -```shell -$ docker run -p 127.0.0.1:4000-4003:4000-4003 \ - -v "$(pwd)/greptimedb:/tmp/greptimedb" \ - --name greptime --rm \ - greptime/greptimedb:latest standalone start \ - --http-addr 0.0.0.0:4000 \ - --rpc-addr 0.0.0.0:4001 \ - --mysql-addr 0.0.0.0:4002 \ - --postgres-addr 0.0.0.0:4003 -``` - -`-v "$(pwd)/greptimedb:/tmp/greptimedb` 为 greptimedb 数据目录本地持久化挂载,需将 `$(pwd)/greptimedb` 替换为实际本地存在的目录,默认使用执行命令的当前目录下的 `greptimedb` 目录作为数据目录。 - -使用```$ docker ps```查看数据库是否启动成功 + +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装GreptimeDB + + ```shell + $ docker run -p 127.0.0.1:4000-4003:4000-4003 \ + -v "$(pwd)/greptimedb:/tmp/greptimedb" \ + --name greptime --rm \ + greptime/greptimedb:latest standalone start \ + --http-addr 0.0.0.0:4000 \ + --rpc-addr 0.0.0.0:4001 \ + --mysql-addr 0.0.0.0:4002 \ + --postgres-addr 0.0.0.0:4003 + ``` + + `-v "$(pwd)/greptimedb:/tmp/greptimedb` 为 greptimedb 数据目录本地持久化挂载,需将 `$(pwd)/greptimedb` 替换为实际本地存在的目录,默认使用执行命令的当前目录下的 `greptimedb` 目录作为数据目录。 + + 使用```$ docker ps```查看数据库是否启动成功 ### 在hertzbeat的`application.yml`配置文件配置此数据库连接 @@ -49,25 +49,25 @@ $ docker run -p 127.0.0.1:4000-4003:4000-4003 \ 修改位于 `hertzbeat/config/application.yml` 的配置文件 [/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.greptime`数据源参数,URL账户密码,并启用`enabled`为`true`** - -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - greptime: - enabled: true - grpc-endpoints: localhost:4001 - url: jdbc:mysql://localhost:4002/hertzbeat?connectionTimeZone=Asia/Shanghai&forceConnectionTimeZoneToSession=true - driver-class-name: com.mysql.cj.jdbc.Driver - username: greptime - password: greptime - expire-time: 30d -``` - -默认数据库是 URL 中配置的 `hertzbeat` ,将自动创建。 `expire-time` 是自动创建的数据库的 TTL (数据过期)时间,默认为 30 天。 + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.greptime`数据源参数,URL账户密码,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + greptime: + enabled: true + grpc-endpoints: localhost:4001 + url: jdbc:mysql://localhost:4002/hertzbeat?connectionTimeZone=Asia/Shanghai&forceConnectionTimeZoneToSession=true + driver-class-name: com.mysql.cj.jdbc.Driver + username: greptime + password: greptime + expire-time: 30d + ``` + + 默认数据库是 URL 中配置的 `hertzbeat` ,将自动创建。 `expire-time` 是自动创建的数据库的 TTL (数据过期)时间,默认为 30 天。 2. 重启 HertzBeat @@ -75,4 +75,4 @@ warehouse: 1. 时序数据库 GreptimeDB 或者 IoTDB 或者 TDengine 是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/influxdb-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/influxdb-init.md index c21d02e9e6b..1c97c2ccfb9 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/influxdb-init.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/influxdb-init.md @@ -24,26 +24,26 @@ InfluxDB是一个由InfluxData开发的开源时序型数据库,专注于海 ### 2. 通过Docker方式安装InfluxDB > 可参考官方网站[安装教程](https://hub.docker.com/_/influxdb) -> -> 1. 下载安装Docker环境 -> Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 -> 安装完毕后终端查看Docker版本是否正常输出。 -> -> ``` -> $ docker -v -> Docker version 20.10.12, build e91ed57 -> ``` -> -> 2. Docker安装InfluxDB 1.x -```shell -$ docker run -p 8086:8086 \ - -v /opt/influxdb:/var/lib/influxdb \ - influxdb:1.8 -``` +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装InfluxDB 1.x + + ```shell + $ docker run -p 8086:8086 \ + -v /opt/influxdb:/var/lib/influxdb \ + influxdb:1.8 + ``` -`-v /opt/influxdb:/var/lib/influxdb` 为influxdb数据目录本地持久化挂载,需将`/opt/influxdb`替换为实际本地存在的目录 -使用```$ docker ps```查看数据库是否启动成功 + `-v /opt/influxdb:/var/lib/influxdb` 为influxdb数据目录本地持久化挂载,需将`/opt/influxdb`替换为实际本地存在的目录 + 使用```$ docker ps```查看数据库是否启动成功 ### 在hertzbeat的`application.yml`配置文件配置此数据库连接 @@ -51,22 +51,22 @@ $ docker run -p 8086:8086 \ 修改位于 `hertzbeat/config/application.yml` 的配置文件 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.influxdb`数据源参数,URL账户密码,并启用`enabled`为`true`** - -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - influxdb: - enabled: true - server-url: http://localhost:8086 - username: root - password: root - expire-time: '30d' - replication: 1 -``` + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.influxdb`数据源参数,URL账户密码,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + influxdb: + enabled: true + server-url: http://localhost:8086 + username: root + password: root + expire-time: '30d' + replication: 1 + ``` 2. 重启 HertzBeat @@ -74,4 +74,4 @@ warehouse: 1. 时序数据库InfluxDb, IoTDB和TDengine是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 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 2132e24b010..f2ce6087dc5 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 @@ -31,15 +31,15 @@ Apache IoTDB是一体化收集、存储、管理与分析物联网时序数据 2. Docker安装IoTDB -```shell -$ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ - -v /opt/iotdb/data:/iotdb/data \ - --name iotdb \ - apache/iotdb:1.2.2-standalone -``` + ```shell + $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ + -v /opt/iotdb/data:/iotdb/data \ + --name iotdb \ + 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数据库连接 @@ -47,63 +47,63 @@ $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ 修改位于 `hertzbeat/config/application.yml` 的配置文件 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置`warehouse.store.iot-db`数据源参数,HOST账户密码等,并启用`enabled`为`true`** - -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - # 启用IotDB - iot-db: - enabled: true - host: 127.0.0.1 - rpc-port: 6667 - username: root - password: root - # use default queryTimeoutInMs = -1 - query-timeout-in-ms: -1 - # 数据存储时间:默认'7776000000'(90天,单位为毫秒,-1代表永不过期) - 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 - # 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数据库版本,已废弃,仅支持V1.* | -| query-timeout-in-ms | 查询超时时间 | -| expire-time | 数据存储时间,默认'7776000000'(90天,单位为毫秒,-1代表永不过期) | - -> 如果集群配置`node-urls`和单机配置同时设置,以集群`node-urls`配置稳准 + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置`warehouse.store.iot-db`数据源参数,HOST账户密码等,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + # 启用IotDB + iot-db: + enabled: true + host: 127.0.0.1 + rpc-port: 6667 + username: root + password: root + # use default queryTimeoutInMs = -1 + query-timeout-in-ms: -1 + # 数据存储时间:默认'7776000000'(90天,单位为毫秒,-1代表永不过期) + 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 + # 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数据库版本,已废弃,仅支持V1.* | + | query-timeout-in-ms | 查询超时时间 | + | expire-time | 数据存储时间,默认'7776000000'(90天,单位为毫秒,-1代表永不过期) | + + > 如果集群配置`node-urls`和单机配置同时设置,以集群`node-urls`配置稳准 4. 重启 HertzBeat @@ -111,15 +111,15 @@ warehouse: 1. 时序数据库IoTDB和TDengine是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 2. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 + > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 3. 安装配置了IotDB数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 请检查配置参数是否正确 -> iot-db enable是否设置为true -> 注意⚠️若hertzbeat和IotDB都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP -> 可根据logs目录下启动日志排查 + > 请检查配置参数是否正确 + > iot-db enable是否设置为true + > 注意⚠️若hertzbeat和IotDB都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP + > 可根据logs目录下启动日志排查 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/package-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/package-deploy.md index ea90a2ed9d5..bd758bc1502 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/package-deploy.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/package-deploy.md @@ -13,40 +13,40 @@ Apache HertzBeat (incubating) 支持在Linux Windows Mac系统安装运行,CPU 1. 下载安装包 -从 [下载页面](/docs/download) 下载您系统环境对应的安装包版本 `apache-hertzbeat-xxx-incubating-bin.tar.gz` + 从 [下载页面](/docs/download) 下载您系统环境对应的安装包版本 `apache-hertzbeat-xxx-incubating-bin.tar.gz` 2. 设置配置文件(可选) -解压安装包到主机 eg: /opt/hertzbeat + 解压安装包到主机 eg: /opt/hertzbeat -``` -tar zxvf apache-hertzbeat-xxx-incubating-bin.tar.gz -``` + ```shell + tar zxvf apache-hertzbeat-xxx-incubating-bin.tar.gz + ``` -:::tip -位于 `config/application.yml` 的配置文件,您可以根据需求修改配置文件来配置外部依赖的服务,如数据库,时序数据库等参数。 -HertzBeat 启动时默认全使用内部服务,但生产环境建议切换为外部数据库服务。 -::: + :::tip + 位于 `config/application.yml` 的配置文件,您可以根据需求修改配置文件来配置外部依赖的服务,如数据库,时序数据库等参数。 + HertzBeat 启动时默认全使用内部服务,但生产环境建议切换为外部数据库服务。 + ::: -建议元数据存储使用 [PostgreSQL](postgresql-change), 指标数据存储使用 [VictoriaMetrics](victoria-metrics-init), 具体步骤参见 + 建议元数据存储使用 [PostgreSQL](postgresql-change), 指标数据存储使用 [VictoriaMetrics](victoria-metrics-init), 具体步骤参见 -- [内置 H2 数据库切换为 PostgreSQL](postgresql-change) -- [使用 VictoriaMetrics 存储指标数据](victoria-metrics-init) + - [内置 H2 数据库切换为 PostgreSQL](postgresql-change) + - [使用 VictoriaMetrics 存储指标数据](victoria-metrics-init) 3. 配置账户文件(可选) -HertzBeat 默认内置三个用户账户,分别为 admin/hertzbeat tom/hertzbeat guest/hertzbeat -若需要新增删除修改账户或密码,可以通过修改位于 `config/sureness.yml` 的配置文件实现,具体参考 + HertzBeat 默认内置三个用户账户,分别为 admin/hertzbeat tom/hertzbeat guest/hertzbeat + 若需要新增删除修改账户或密码,可以通过修改位于 `config/sureness.yml` 的配置文件实现,具体参考 -- [配置修改账户密码](account-modify) + - [配置修改账户密码](account-modify) 4. 启动 -执行位于安装目录 bin 下的启动脚本 startup.sh, windows 环境下为 startup.bat + 执行位于安装目录 bin 下的启动脚本 startup.sh, windows 环境下为 startup.bat -``` -./startup.sh -``` + ```shell + ./startup.sh + ``` 5. 开始探索HertzBeat 浏览器访问 即刻开始探索使用HertzBeat,默认账户密码 admin/hertzbeat。 @@ -62,44 +62,44 @@ HertzBeat Collector 是一个轻量级的数据采集器,用于采集并将数 1. 下载安装包 -从 [下载页面](/docs/download) 下载您系统环境对应的安装包版本 `apache-hertzbeat-collector-xxx-incubating-bin.tar.gz` + 从 [下载页面](/docs/download) 下载您系统环境对应的安装包版本 `apache-hertzbeat-collector-xxx-incubating-bin.tar.gz` 2. 设置配置文件 -解压安装包到主机 eg: /opt/hertzbeat-collector + 解压安装包到主机 eg: /opt/hertzbeat-collector -``` -tar zxvf apache-hertzbeat-collector-xxx-incubating-bin.tar.gz -``` + ```shell + tar zxvf apache-hertzbeat-collector-xxx-incubating-bin.tar.gz + ``` -配置采集器的配置文件 `config/application.yml` 里面的 HertzBeat Server 连接 IP, 端口, 采集器名称(需保证唯一性)等参数。 + 配置采集器的配置文件 `config/application.yml` 里面的 HertzBeat Server 连接 IP, 端口, 采集器名称(需保证唯一性)等参数。 -```yaml -collector: - dispatch: - entrance: - netty: - enabled: true - identity: ${IDENTITY:} - mode: ${MODE:public} - manager-host: ${MANAGER_HOST:127.0.0.1} - manager-port: ${MANAGER_PORT:1158} -``` + ```yaml + collector: + dispatch: + entrance: + netty: + enabled: true + identity: ${IDENTITY:} + mode: ${MODE:public} + manager-host: ${MANAGER_HOST:127.0.0.1} + manager-port: ${MANAGER_PORT:1158} + ``` -> 参数详解 + > 参数详解 -- `identity` : (可选) 设置采集器的唯一标识名称。注意多采集器时名称需保证唯一性。 -- `mode` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 -- `manager-host` : 重要, 配置连接的 HertzBeat Server 地址, -- `manager-port` : (可选) 配置连接的 HertzBeat Server 端口,默认 1158. + - `identity` : (可选) 设置采集器的唯一标识名称。注意多采集器时名称需保证唯一性。 + - `mode` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 + - `manager-host` : 重要, 配置连接的 HertzBeat Server 地址, + - `manager-port` : (可选) 配置连接的 HertzBeat Server 端口,默认 1158. 3. 启动 -执行位于安装目录 hertzbeat-collector/bin/ 下的启动脚本 startup.sh, windows 环境下为 startup.bat + 执行位于安装目录 hertzbeat-collector/bin/ 下的启动脚本 startup.sh, windows 环境下为 startup.bat -``` -./startup.sh -``` + ```shell + ./startup.sh + ``` 4. 开始探索 HertzBeat Collector 浏览器访问 即可开始探索使用,默认账户密码 admin/hertzbeat。 @@ -114,22 +114,22 @@ collector: 1. 启动失败,需您提前准备JAVA运行环境 -安装JAVA运行环境-可参考[官方网站](http://www.oracle.com/technetwork/java/javase/downloads/index.html) -要求:JAVA17环境 -下载JAVA安装包: [镜像站](https://repo.huaweicloud.com/java/jdk/) -安装后命令行检查是否成功安装 - -``` -$ java -version -java version "17.0.9" -Java(TM) SE Runtime Environment 17.0.9 (build 17.0.9+8-LTS-237) -Java HotSpot(TM) 64-Bit Server VM 17.0.9 (build 17.0.9+8-LTS-237, mixed mode) + 安装JAVA运行环境-可参考[官方网站](http://www.oracle.com/technetwork/java/javase/downloads/index.html) + 要求:JAVA17环境 + 下载JAVA安装包: [镜像站](https://repo.huaweicloud.com/java/jdk/) + 安装后命令行检查是否成功安装 -``` + ```shell + $ java -version + java version "17.0.9" + Java(TM) SE Runtime Environment 17.0.9 (build 17.0.9+8-LTS-237) + Java HotSpot(TM) 64-Bit Server VM 17.0.9 (build 17.0.9+8-LTS-237, mixed mode) + + ``` 2. 按照流程部署,访问 无界面 请参考下面几点排查问题: -> 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 -> 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 -> 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 + > 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 + > 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/quickstart.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/quickstart.md index 570d21dbc35..310bc9e2f71 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/quickstart.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/quickstart.md @@ -16,24 +16,24 @@ sidebar_label: 快速开始 1. `docker` 环境仅需一条命令即可开始 -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```或者使用 quay.io (若 dockerhub 网络链接超时)``` + ```或者使用 quay.io (若 dockerhub 网络链接超时)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` 3. 部署采集器集群(可选) -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -- `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 -- `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 -- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 -- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 + - `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 + - `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 + - `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 + - `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 更多配置详细步骤参考 [通过Docker方式安装HertzBeat](docker-deploy) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/sslcert-practice.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/sslcert-practice.md index b18881b7b93..f8c604c2924 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/sslcert-practice.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/sslcert-practice.md @@ -18,7 +18,7 @@ github: 1. `docker` 环境仅需一条命令即可安装 -`docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` + `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` 2. 安装成功浏览器访问 `localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` @@ -26,63 +26,64 @@ github: 1. 点击新增SSL证书监控 -> 系统页面 -> 监控菜单 -> SSL证书 -> 新增SSL证书 + > 系统页面 -> 监控菜单 -> SSL证书 -> 新增SSL证书 -![](/img/docs/start/ssl_1.png) + ![](/img/docs/start/ssl_1.png) 2. 配置监控网站 -> 我们这里举例监控百度网站, 配置监控host域名,名称,采集间隔等。 -> 点击确定 注意⚠️新增前默认会先去测试网站连接性,连接成功才会新增,当然也可以把**是否测试**按钮置灰。 + > 我们这里举例监控百度网站, 配置监控host域名,名称,采集间隔等。 + > + > 点击确定 注意⚠️新增前默认会先去测试网站连接性,连接成功才会新增,当然也可以把**是否测试**按钮置灰。 -![](/img/docs/start/ssl_2.png) + ![](/img/docs/start/ssl_2.png) 3. 查看检测指标数据 -> 在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。 + > 在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。 -![](/img/docs/start/ssl_3.png) + ![](/img/docs/start/ssl_3.png) -![](/img/docs/start/ssl_11.png) + ![](/img/docs/start/ssl_11.png) 4. 设置阈值(证书过期时触发) -> 系统页面 -> 告警 -> 告警阈值 -> 新增阈值 + > 系统页面 -> 告警 -> 告警阈值 -> 新增阈值 -![](/img/docs/start/ssl_4.png) + ![](/img/docs/start/ssl_4.png) -> 配置阈值,选择SSL证书指标对象,配置告警表达式-当指标`expired`为`true`触发,即`equals(expired,"true")` , 设置告警级别通知模版信息等。 + > 配置阈值,选择SSL证书指标对象,配置告警表达式-当指标`expired`为`true`触发,即`equals(expired,"true")` , 设置告警级别通知模版信息等。 -![](/img/docs/start/ssl_5.png) + ![](/img/docs/start/ssl_5.png) -> 关联阈值与监控, 在阈值列表设置此阈值应用于哪些监控。 + > 关联阈值与监控, 在阈值列表设置此阈值应用于哪些监控。 -![](/img/docs/start/ssl_6.png) + ![](/img/docs/start/ssl_6.png) 5. 设置阈值(证书过期前一周触发) -> 同理如上,新增配置阈值,配置告警表达式-当指标有效期时间戳 `end_timestamp`,`now()`函数为当前时间戳,若配置提前一周触发告警即:`end_timestamp <= (now() + 604800000)` , 其中 `604800000` 为7天总时间差毫秒值。 + > 同理如上,新增配置阈值,配置告警表达式-当指标有效期时间戳 `end_timestamp`,`now()`函数为当前时间戳,若配置提前一周触发告警即:`end_timestamp <= (now() + 604800000)` , 其中 `604800000` 为7天总时间差毫秒值。 -![](/img/docs/start/ssl_7.png) + ![](/img/docs/start/ssl_7.png) -> 最终可以在告警中心看到已触发的告警。 + > 最终可以在告警中心看到已触发的告警。 -![](/img/docs/start/ssl_8.png) + ![](/img/docs/start/ssl_8.png) 6. 告警通知(通过钉钉微信飞书等及时通知) -> 监控系统 -> 告警通知 -> 新增接收人 + > 监控系统 -> 告警通知 -> 新增接收人 -![](/img/docs/start/ssl_9.png) + ![](/img/docs/start/ssl_9.png) -钉钉微信飞书等token配置可以参考帮助文档 + 钉钉微信飞书等token配置可以参考帮助文档 - - + + -> 告警通知 -> 新增告警通知策略 -> 将刚才配置的接收人启用通知 + > 告警通知 -> 新增告警通知策略 -> 将刚才配置的接收人启用通知 -![](/img/docs/start/ssl_10.png) + ![](/img/docs/start/ssl_10.png) 7. OK 当阈值触发后我们就可以收到对应告警消息啦,如果没有配通知,也可以在告警中心查看告警信息。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/tdengine-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/tdengine-init.md index d85ca355bd9..ee447e1be7d 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/tdengine-init.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/tdengine-init.md @@ -18,28 +18,28 @@ TDengine是一款开源物联网时序型数据库,我们用其存储采集到 ### 通过Docker方式安装TDengine > 可参考官方网站[安装教程](https://docs.taosdata.com/get-started/docker/) -> -> 1. 下载安装Docker环境 -> Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 -> 安装完毕后终端查看Docker版本是否正常输出。 -> -> ``` -> $ docker -v -> Docker version 20.10.12, build e91ed57 -> ``` -> -> 2. Docker安装TDengine - -```shell -$ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ - -v /opt/taosdata:/var/lib/taos \ - --name tdengine -e TZ=Asia/Shanghai \ - tdengine/tdengine:3.0.4.0 -``` - -`-v /opt/taosdata:/var/lib/taos` 为tdengine数据目录本地持久化挂载,需将`/opt/taosdata`替换为实际本地存在的目录 -`-e TZ="Asia/Shanghai"` 为tdengine设置时区,这里可选设置对应的时区 -使用```$ docker ps```查看数据库是否启动成功 + +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装TDengine + + ```shell + $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ + -v /opt/taosdata:/var/lib/taos \ + --name tdengine -e TZ=Asia/Shanghai \ + tdengine/tdengine:3.0.4.0 + ``` + + `-v /opt/taosdata:/var/lib/taos` 为tdengine数据目录本地持久化挂载,需将`/opt/taosdata`替换为实际本地存在的目录 + `-e TZ="Asia/Shanghai"` 为tdengine设置时区,这里可选设置对应的时区 + 使用```$ docker ps```查看数据库是否启动成功 ### 创建数据库实例 @@ -47,7 +47,7 @@ $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ 1. 进入数据库Docker容器 - ``` + ```shell docker exec -it tdengine /bin/bash ``` @@ -69,7 +69,7 @@ $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ 执行创建数据库命令 - ``` + ```shell taos> show databases; taos> CREATE DATABASE hertzbeat KEEP 90 DURATION 10 BUFFER 16; ``` @@ -78,7 +78,7 @@ $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ 4. 查看hertzbeat数据库是否成功创建 - ``` + ```shell taos> show databases; taos> use hertzbeat; ``` @@ -99,21 +99,21 @@ $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ 修改位于 `hertzbeat/config/application.yml` 的配置文件 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.td-engine`数据源参数,URL账户密码,并启用`enabled`为`true`** - -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - td-engine: - enabled: true - driver-class-name: com.taosdata.jdbc.rs.RestfulDriver - url: jdbc:TAOS-RS://localhost:6041/hertzbeat - username: root - password: taosdata -``` + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.td-engine`数据源参数,URL账户密码,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + td-engine: + enabled: true + driver-class-name: com.taosdata.jdbc.rs.RestfulDriver + url: jdbc:TAOS-RS://localhost:6041/hertzbeat + username: root + password: taosdata + ``` 2. 重启 HertzBeat @@ -121,19 +121,19 @@ warehouse: 1. 时序数据库IoTDB和TDengine是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 2. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 + > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 3. 监控详情历史图片不展示或无数据,已经配置了TDengine -> 请确认是否安装的TDengine版本为3.0以上,版本2.x不支持兼容 + > 请确认是否安装的TDengine版本为3.0以上,版本2.x不支持兼容 4. 安装配置了TDengine数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 请检查配置参数是否正确 -> td-engine enable是否设置为true -> 注意⚠️若hertzbeat和TDengine都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP -> 可根据logs目录下启动日志排查 + > 请检查配置参数是否正确 + > td-engine enable是否设置为true + > 注意⚠️若hertzbeat和TDengine都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP + > 可根据logs目录下启动日志排查 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/update-1.6.0.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/update-1.6.0.md index 7b1a30c7f06..f0d04a18726 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/update-1.6.0.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/update-1.6.0.md @@ -14,184 +14,184 @@ sidebar_label: 1.6.0升级指南 1. 升级Java环境 -由于1.6.0版本使用Java17,且安装包不再提供内置jdk的版本,参考以下情况使用新版Hertzbeat。 + 由于1.6.0版本使用Java17,且安装包不再提供内置jdk的版本,参考以下情况使用新版Hertzbeat。 -- 当你的服务器中默认环境变量为Java17时,这一步你无需任何操作。 -- 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**没有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并在搜索引擎搜索如何设置新的环境变量指向新的Java17。 -- 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并将解压后的文件夹重命名为java,复制到Hertzbeat的解压目录下。 + - 当你的服务器中默认环境变量为Java17时,这一步你无需任何操作。 + - 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**没有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并在搜索引擎搜索如何设置新的环境变量指向新的Java17。 + - 当你的服务器中默认环境变量不为Java17时,如Java8、Java11,若你服务器中**有**其他应用需要低版本Java,根据你的系统,到 [https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html) 选择相应的发行版下载,并将解压后的文件夹重命名为java,复制到Hertzbeat的解压目录下。 2. 升级数据库 -打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), -选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件执行升级sql。 + 打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), + 选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件执行升级sql。 3. 升级配置文件 -由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接使用新的yml配置文件,然后在自己的需求基础上进行修改。 - -- `application.yml`一般需要修改以下部分 - - 默认为: - -```yaml - datasource: - driver-class-name: org.h2.Driver - username: sa - password: 123456 - url: jdbc:h2:./data/hertzbeat;MODE=MYSQL - hikari: - max-lifetime: 120000 - - jpa: - show-sql: false - database-platform: org.eclipse.persistence.platform.database.MySQLPlatform - database: h2 - properties: - eclipselink: - logging: - level: SEVERE -``` - -如若修改为mysql数据库,给出一个示例: - -```yaml - datasource: - driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: root - url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai - hikari: - max-lifetime: 120000 - - jpa: - show-sql: false - database-platform: org.eclipse.persistence.platform.database.MySQLPlatform - database: mysql - properties: - eclipselink: - logging: - level: SEVERE -``` - -- `sureness.yml`修改是可选的,一般在你需要修改账号密码时 - -```yaml -# account info config -# eg: admin has role [admin,user], password is hertzbeat -# eg: tom has role [user], password is hertzbeat -# eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 -account: - - appId: admin - credential: hertzbeat - role: [admin] - - appId: tom - credential: hertzbeat - role: [user] - - appId: guest - credential: hertzbeat - role: [guest] - - appId: lili - # credential = MD5(password + salt) - # plain password: hertzbeat - # attention: digest authentication does not support salted encrypted password accounts - credential: 94C6B34E7A199A9F9D4E1F208093B489 - salt: 123 - role: [user] -``` + 由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接使用新的yml配置文件,然后在自己的需求基础上进行修改。 + + - `application.yml`一般需要修改以下部分 + + 默认为: + + ```yaml + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: h2 + properties: + eclipselink: + logging: + level: SEVERE + ``` + + 如若修改为mysql数据库,给出一个示例: + + ```yaml + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: mysql + properties: + eclipselink: + logging: + level: SEVERE + ``` + + - `sureness.yml`修改是可选的,一般在你需要修改账号密码时 + + ```yaml + # account info config + # eg: admin has role [admin,user], password is hertzbeat + # eg: tom has role [user], password is hertzbeat + # eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 + account: + - appId: admin + credential: hertzbeat + role: [admin] + - appId: tom + credential: hertzbeat + role: [user] + - appId: guest + credential: hertzbeat + role: [guest] + - appId: lili + # credential = MD5(password + salt) + # plain password: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] + ``` 4. 添加相应的数据库驱动 由于apache基金会对于license合规的要求,HertzBeat的安装包不能包含mysql,oracle等gpl许可的依赖,需要用户自行添加,用户可通过以下链接自行下载驱动,复制到安装目录下`ext-lib`中。 -mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) -oracle(如果你要监控oracle,这两个驱动是必须的) -[https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) -[https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) -接下来,像之前那样运行启动脚本,即可体验最新的HertzBeat1.6.0! + mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) + oracle(如果你要监控oracle,这两个驱动是必须的): + [https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) + [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) + 接下来,像之前那样运行启动脚本,即可体验最新的HertzBeat1.6.0! ### Docker 方式升级 - Mysql数据库 1. 关闭 HertzBeat 容器 -``` -docker stop hertzbeat -``` + ```shell + docker stop hertzbeat + ``` 2. 升级数据库脚本 -打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), -选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 Mysql 执行升级sql。 + 打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), + 选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 Mysql 执行升级sql。 3. 升级配置文件 -由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 - -- `application.yml`一般需要修改以下部分 - - 默认为: - -```yaml - datasource: - driver-class-name: com.mysql.cj.jdbc.Driver - username: root - password: root - url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai - hikari: - max-lifetime: 120000 - - jpa: - show-sql: false - database-platform: org.eclipse.persistence.platform.database.MySQLPlatform - database: mysql - properties: - eclipselink: - logging: - level: SEVERE -``` - -- `sureness.yml`修改是可选的,一般在你需要修改账号密码时 - -```yaml -# account info config -# eg: admin has role [admin,user], password is hertzbeat -# eg: tom has role [user], password is hertzbeat -# eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 -account: - - appId: admin - credential: hertzbeat - role: [admin] - - appId: tom - credential: hertzbeat - role: [user] - - appId: guest - credential: hertzbeat - role: [guest] - - appId: lili - # credential = MD5(password + salt) - # plain password: hertzbeat - # attention: digest authentication does not support salted encrypted password accounts - credential: 94C6B34E7A199A9F9D4E1F208093B489 - salt: 123 - role: [user] -``` + 由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 + + - `application.yml`一般需要修改以下部分 + + 默认为: + + ```yaml + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + url: jdbc:mysql://localhost:3306/hertzbeat?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: mysql + properties: + eclipselink: + logging: + level: SEVERE + ``` + + - `sureness.yml`修改是可选的,一般在你需要修改账号密码时 + + ```yaml + # account info config + # eg: admin has role [admin,user], password is hertzbeat + # eg: tom has role [user], password is hertzbeat + # eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 + account: + - appId: admin + credential: hertzbeat + role: [admin] + - appId: tom + credential: hertzbeat + role: [user] + - appId: guest + credential: hertzbeat + role: [guest] + - appId: lili + # credential = MD5(password + salt) + # plain password: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] + ``` 4. 添加相应的数据库驱动 由于apache基金会对于license合规的要求,HertzBeat的安装包不能包含mysql,oracle等gpl许可的依赖,需要用户自行添加,用户可通过以下链接自行下载驱动 jar 放到本地 `ext-lib`目录下,然后启动时将`ext-lib`挂载到容器的 `/opt/hertzbeat/ext-lib`目录。 -mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) -oracle(如果你要监控oracle,这两个驱动是必须的) -[https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) -[https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) -接下来,像之前那样 Docker 运行启动 HertzBeat,即可体验最新的HertzBeat1.6.0! + mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) + oracle(如果你要监控oracle,这两个驱动是必须的): + [https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) + [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) + 接下来,像之前那样 Docker 运行启动 HertzBeat,即可体验最新的HertzBeat1.6.0! ### Docker安装升级 - H2内置数据库(生产环境不推荐使用H2) 1. 关闭 HertzBeat 容器 -``` -docker stop hertzbeat -``` + ```shell + docker stop hertzbeat + ``` 2. 编辑H2数据库文件 @@ -199,75 +199,75 @@ docker stop hertzbeat 下载 h2 驱动 jar [https://mvnrepository.com/artifact/com.h2database/h2/2.2.220](https://mvnrepository.com/artifact/com.h2database/h2/2.2.220) 使用 h2 驱动 jar 本地启动数据库 -``` -java -jar h2-2.2.220.jar -url jdbc:h2:file:./hertzbeat -user sa -password 123456 -``` + ```shell + java -jar h2-2.2.220.jar -url jdbc:h2:file:./hertzbeat -user sa -password 123456 + ``` -打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), -选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 H2 执行升级sql。 + 打开[https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration](https://github.com/apache/hertzbeat/tree/master/manager/src/main/resources/db/migration), + 选择你使用的数据库的目录下相应的 `V160__update_column.sql`文件在 H2 执行升级sql。 3. 升级配置文件 -由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 - -- `application.yml`一般需要修改以下部分 - - 默认为: - -```yaml - datasource: - driver-class-name: org.h2.Driver - username: sa - password: 123456 - url: jdbc:h2:./data/hertzbeat;MODE=MYSQL - hikari: - max-lifetime: 120000 - - jpa: - show-sql: false - database-platform: org.eclipse.persistence.platform.database.MySQLPlatform - database: h2 - properties: - eclipselink: - logging: - level: SEVERE -``` - -- `sureness.yml`修改是可选的,一般在你需要修改账号密码时 - -```yaml -# account info config -# eg: admin has role [admin,user], password is hertzbeat -# eg: tom has role [user], password is hertzbeat -# eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 -account: - - appId: admin - credential: hertzbeat - role: [admin] - - appId: tom - credential: hertzbeat - role: [user] - - appId: guest - credential: hertzbeat - role: [guest] - - appId: lili - # credential = MD5(password + salt) - # plain password: hertzbeat - # attention: digest authentication does not support salted encrypted password accounts - credential: 94C6B34E7A199A9F9D4E1F208093B489 - salt: 123 - role: [user] -``` + 由于 `application.yml`和 `sureness.yml`更新变动较大,建议直接挂载使用新的yml配置文件,然后在自己的需求基础上进行修改。 + + - `application.yml`一般需要修改以下部分 + + 默认为: + + ```yaml + datasource: + driver-class-name: org.h2.Driver + username: sa + password: 123456 + url: jdbc:h2:./data/hertzbeat;MODE=MYSQL + hikari: + max-lifetime: 120000 + + jpa: + show-sql: false + database-platform: org.eclipse.persistence.platform.database.MySQLPlatform + database: h2 + properties: + eclipselink: + logging: + level: SEVERE + ``` + + - `sureness.yml`修改是可选的,一般在你需要修改账号密码时 + + ```yaml + # account info config + # eg: admin has role [admin,user], password is hertzbeat + # eg: tom has role [user], password is hertzbeat + # eg: lili has role [guest], plain password is lili, salt is 123, salted password is 1A676730B0C7F54654B0E09184448289 + account: + - appId: admin + credential: hertzbeat + role: [admin] + - appId: tom + credential: hertzbeat + role: [user] + - appId: guest + credential: hertzbeat + role: [guest] + - appId: lili + # credential = MD5(password + salt) + # plain password: hertzbeat + # attention: digest authentication does not support salted encrypted password accounts + credential: 94C6B34E7A199A9F9D4E1F208093B489 + salt: 123 + role: [user] + ``` 4. 添加相应的数据库驱动 由于apache基金会对于license合规的要求,HertzBeat的安装包不能包含mysql,oracle等gpl许可的依赖,需要用户自行添加,用户可通过以下链接自行下载驱动 jar 放到本地 `ext-lib`目录下,然后启动时将`ext-lib`挂载到容器的 `/opt/hertzbeat/ext-lib`目录。 -mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) -oracle(如果你要监控oracle,这两个驱动是必须的) -[https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) -[https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) -接下来,像之前那样 Docker 运行启动,即可体验最新的HertzBeat1.6.0! + mysql:[https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.25.zip](https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.18.zip) + oracle(如果你要监控oracle,这两个驱动是必须的): + [https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar](https://download.oracle.com/otn-pub/otn_software/jdbc/234/ojdbc8.jar) + [https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar](https://repo.mavenlibs.com/maven/com/oracle/database/nls/orai18n/21.5.0.0/orai18n-21.5.0.0.jar?utm_source=mavenlibs.com) + 接下来,像之前那样 Docker 运行启动,即可体验最新的HertzBeat1.6.0! ### 通过导出导入升级 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/victoria-metrics-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/victoria-metrics-init.md index 253fe909107..24cb43f7b24 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/victoria-metrics-init.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/victoria-metrics-init.md @@ -18,49 +18,49 @@ VictoriaMetrics,是一个快速高效、经济并且可扩展的监控解决 ### 通过Docker方式安装VictoriaMetrics > 可参考官方网站[安装教程](https://docs.victoriametrics.com/Quick-Start.html#how-to-install) -> -> 1. 下载安装Docker环境 -> Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 -> 安装完毕后终端查看Docker版本是否正常输出。 -> -> ``` -> $ docker -v -> Docker version 20.10.12, build e91ed57 -> ``` -> -> 2. Docker安装VictoriaMetrics - -```shell -$ docker run -d -p 8428:8428 \ - -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ - --name victoria-metrics \ - victoriametrics/victoria-metrics:v1.95.1 -``` - -`-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` 为VictoriaMetrics数据目录本地持久化挂载 -使用```$ docker ps```查看数据库是否启动成功 + +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装VictoriaMetrics + + ```shell + $ docker run -d -p 8428:8428 \ + -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ + --name victoria-metrics \ + victoriametrics/victoria-metrics:v1.95.1 + ``` + + `-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` 为VictoriaMetrics数据目录本地持久化挂载 + 使用```$ docker ps```查看数据库是否启动成功 3. 在hertzbeat的`application.yml`配置文件配置VictoriaMetrics数据库连接 - 配置HertzBeat的配置文件 - 修改位于 `hertzbeat/config/application.yml` 的配置文件 + 配置HertzBeat的配置文件 + 修改位于 `hertzbeat/config/application.yml` 的配置文件 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置`warehouse.store.victoria-metrics`数据源参数,HOST账户密码等,并启用`enabled`为`true`** - -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - # 启用 victoria-metrics - victoria-metrics: - enabled: true - url: http://localhost:8428 - username: root - password: root -``` + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置`warehouse.store.victoria-metrics`数据源参数,HOST账户密码等,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + # 启用 victoria-metrics + victoria-metrics: + enabled: true + url: http://localhost:8428 + username: root + password: root + ``` 4. 重启 HertzBeat @@ -68,4 +68,4 @@ warehouse: 1. 时序数据库是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,但会影响历史图表数据和存储时长等。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,但会影响历史图表数据和存储时长等。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/community/code-style-and-quality-guide.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/community/code-style-and-quality-guide.md index 042e33f0558..d3e6a1aa780 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/community/code-style-and-quality-guide.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/community/code-style-and-quality-guide.md @@ -145,9 +145,9 @@ limitations under the License. 2. 确保代码的可读性和直观性 -- `annotation` 符号中的字符串不需要提取为常量。 + - `annotation` 符号中的字符串不需要提取为常量。 -- 被引用的 `package` 或 `resource` 名称不需要提取为常量。 + - 被引用的 `package` 或 `resource` 名称不需要提取为常量。 3. 未被重新分配的变量也必须声明为 final 类型。 @@ -189,17 +189,17 @@ limitations under the License. - 如果使用 `HashSet`,则返回 Set 2. 如果存在多线程,可以使用以下声明或返回类型: -```java -private CurrentHashMap map; -public CurrentHashMap funName(); -``` + ```java + private CurrentHashMap map; + public CurrentHashMap funName(); + ``` 3. 使用 `isEmpty()` 而不是 `length() == 0` 或者 `size() == 0` - 负面示例: ```java if (pathPart.length() == 0) { - return; + return; } ``` @@ -207,7 +207,7 @@ public CurrentHashMap funName(); ```java if (pathPart.isEmpty()) { - return; + return; } ``` @@ -225,98 +225,97 @@ public CurrentHashMap funName(); - 多个代码行的 `深度` 为 `n+1` - 多余的行 -一般来说,如果一个方法的代码行深度由于连续嵌套的 `if... else..` 超过了 `2+ Tabs`,那么应该考虑试图 + 一般来说,如果一个方法的代码行深度由于连续嵌套的 `if... else..` 超过了 `2+ Tabs`,那么应该考虑试图 -- `合并分支`, -- `反转分支条件` -- `提取私有方法` + - `合并分支`, + - `反转分支条件` + - `提取私有方法` -以减少代码行深度并提高可读性,例如: + 以减少代码行深度并提高可读性,例如: -- 联合或将逻辑合并到下一级调用中 -- 负面示例: + - 联合或将逻辑合并到下一级调用中 + - 负面示例: -```java -if (isInsert) { -save(platform); -} else { -updateById(platform); -} -``` + ```java + if (isInsert) { + save(platform); + } else { + updateById(platform); + } + ``` -- 正面示例: + - 正面示例: -```java -saveOrUpdate(platform); -``` + ```java + saveOrUpdate(platform); + ``` -- 合并条件 -- 负面示例: + - 合并条件 + - 负面示例: -```java -if (expression1) { -if(expression2) { -...... -} -} + ```java + if (expression1) { + if(expression2) { + // ...... + } + } + ``` -``` + - 正面示例: -- 正面示例: - - ```java - if (expression1 && expression2) { - ...... - } - ``` - -- 反转条件 -- 负面示例: - - ```java - public void doSomething() { - // 忽略更深的代码块行 - // ..... - if (condition1) { - ... - } else { - ... - } - } - ``` - -- 正面示例: - - ```java - public void doSomething() { - // 忽略更深的代码块行 - // ..... - if (!condition1) { - ... - return; - } - // ... - } - ``` - -- 使用单一变量或方法减少复杂的条件表达式 -- 负面示例: - - ```java - if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { - ... - } - ``` - -- 正面示例: - - ```java - if (containsSqlServer(dbType)) { - .... - } - //..... - // containsSqlServer的定义 - ``` + ```java + if (expression1 && expression2) { + // ...... + } + ``` + + - 反转条件 + - 负面示例: + + ```java + public void doSomething() { + // 忽略更深的代码块行 + // ..... + if (condition1) { + // ... + } else { + // ... + } + } + ``` + + - 正面示例: + + ```java + public void doSomething() { + // 忽略更深的代码块行 + // ..... + if (!condition1) { + // ... + return; + } + // ... + } + ``` + + - 使用单一变量或方法减少复杂的条件表达式 + - 负面示例: + + ```java + if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { + // ... + } + ``` + + - 正面示例: + + ```java + if (containsSqlServer(dbType)) { + // .... + } + //..... + // containsSqlServer的定义 + ``` > 在未来,使用 `sonarlint` 和 `better highlights` 检查代码深度看起来是个不错的选择。 @@ -324,20 +323,20 @@ if(expression2) { 1. 方法缺少注释: -- `When`:该方法何时可以被调用 -- `How`:如何使用此方法以及如何传递参数等 -- `What`:此方法实现了哪些功能 -- `Note`:在调用此方法时开发人员应注意什么 + - `When`:该方法何时可以被调用 + - `How`:如何使用此方法以及如何传递参数等 + - `What`:此方法实现了哪些功能 + - `Note`:在调用此方法时开发人员应注意什么 2. 缺少必要的类头部描述注释。 -添加 `What`,`Note` 等,如上述 `1` 中提到的。 + 添加 `What`,`Note` 等,如上述 `1` 中提到的。 3. 在接口中的方法声明必须被注释。 -- 如果实现的语义和接口声明的注释内容不一致,则具体的实现方法也需要用注释重写。 + - 如果实现的语义和接口声明的注释内容不一致,则具体的实现方法也需要用注释重写。 -- 如果方法实现的语义与接口声明的注释内容一致,则建议不写注释以避免重复的注释。 + - 如果方法实现的语义与接口声明的注释内容一致,则建议不写注释以避免重复的注释。 4. 在注释行中的第一个词需要大写,如 `param` 行,`return` 行。 如果特殊引用作为主题不需要大写,需要注意特殊符号,例如引号。 @@ -347,31 +346,31 @@ if(expression2) { 1. 更倾向于使用 `non-capturing` lambda(不包含对外部范围的引用的lambda)。 Capturing lambda 在每次调用时都需要创建一个新的对象实例。`Non-capturing` lambda 可以为每次调用使用相同的实例。 -- 负面示例: + - 负面示例: - ```java - map.computeIfAbsent(key, x -> key.toLowerCase()) - ``` + ```java + map.computeIfAbsent(key, x -> key.toLowerCase()) + ``` -- 正面示例: + - 正面示例: - ```java - map.computeIfAbsent(key, k -> k.toLowerCase()); - ``` + ```java + map.computeIfAbsent(key, k -> k.toLowerCase()); + ``` 2. 考虑使用方法引用而不是内联lambda -- 负面示例: + - 负面示例: - ```java - map.computeIfAbsent(key, k-> Loader.load(k)); - ``` + ```java + map.computeIfAbsent(key, k-> Loader.load(k)); + ``` -- 正面示例: + - 正面示例: - ```java - map.computeIfAbsent(key, Loader::load); - ``` + ```java + map.computeIfAbsent(key, Loader::load); + ``` ### 3.9 Java Streams @@ -389,127 +388,127 @@ if(expression2) { 1. 使用 `StringUtils.isBlank` 而不是 `StringUtils.isEmpty` -- 负面示例: + - 负面示例: - ```java - if (StringUtils.isEmpty(name)) { - return; - } - ``` + ```java + if (StringUtils.isEmpty(name)) { + return; + } + ``` -- 正面示例: + - 正面示例: - ```java - if (StringUtils.isBlank(name)) { - return; - } - ``` + ```java + if (StringUtils.isBlank(name)) { + return; + } + ``` 2. 使用 `StringUtils.isNotBlank` 而不是 `StringUtils.isNotEmpty` -- 负面示例: + - 负面示例: - ```java - if (StringUtils.isNotEmpty(name)) { - return; - } - ``` + ```java + if (StringUtils.isNotEmpty(name)) { + return; + } + ``` -- 正面示例: + - 正面示例: - ```java - if (StringUtils.isNotBlank(name)) { - return; - } - ``` + ```java + if (StringUtils.isNotBlank(name)) { + return; + } + ``` 3. 使用 `StringUtils.isAllBlank` 而不是 `StringUtils.isAllEmpty` -- 负面示例: + - 负面示例: - ```java - if (StringUtils.isAllEmpty(name, age)) { - return; - } - ``` + ```java + if (StringUtils.isAllEmpty(name, age)) { + return; + } + ``` -- 正面示例: + - 正面示例: - ```java - if (StringUtils.isAllBlank(name, age)) { - return; - } - ``` + ```java + if (StringUtils.isAllBlank(name, age)) { + return; + } + ``` ### 3.12 `Enum` 类 1. 枚举值比较 -- 负面示例: + - 负面示例: - ```java - if (status.equals(JobStatus.RUNNING)) { - return; - } - ``` + ```java + if (status.equals(JobStatus.RUNNING)) { + return; + } + ``` -- 正面示例: + - 正面示例: - ```java - if (status == JobStatus.RUNNING) { - return; - } - ``` + ```java + if (status == JobStatus.RUNNING) { + return; + } + ``` 2. 枚举类不需要实现 Serializable -- 负面示例: + - 负面示例: - ```java - public enum JobStatus implements Serializable { - ... - } - ``` + ```java + public enum JobStatus implements Serializable { + // ... + } + ``` -- 正面示例: + - 正面示例: - ```java - public enum JobStatus { - ... - } - ``` + ```java + public enum JobStatus { + // ... + } + ``` 3. 使用 `Enum.name()` 而不是 `Enum.toString()` -- 负面示例: + - 负面示例: - ```java - System.out.println(JobStatus.RUNNING.toString()); - ``` + ```java + System.out.println(JobStatus.RUNNING.toString()); + ``` -- 正面示例: + - 正面示例: - ```java - System.out.println(JobStatus.RUNNING.name()); - ``` + ```java + System.out.println(JobStatus.RUNNING.name()); + ``` 4. 枚举类名称统一使用 Enum 后缀 -- 负面示例: + - 负面示例: - ```java - public enum JobStatus { - ... - } - ``` + ```java + public enum JobStatus { + // ... + } + ``` -- 正面示例: + - 正面示例: - ```java - public enum JobStatusEnum { - ... - } - ``` + ```java + public enum JobStatusEnum { + // ... + } + ``` ### 3.13 `Deprecated` 注解 @@ -518,7 +517,7 @@ if(expression2) { ```java @deprecated public void process(String input) { - ... + // ... } ``` @@ -527,7 +526,7 @@ public void process(String input) { ```java @Deprecated public void process(String input) { - ... + // ... } ``` @@ -535,43 +534,43 @@ public void process(String input) { 1. 使用 `占位符` 进行日志输出: -- 负面示例 + - 负面示例 - ```java - log.info("Deploy cluster request " + deployRequest); - ``` + ```java + log.info("Deploy cluster request " + deployRequest); + ``` -- 正面示例 + - 正面示例 - ```java - log.info("load plugin:{} to {}", file.getName(), appPlugins); - ``` + ```java + log.info("load plugin:{} to {}", file.getName(), appPlugins); + ``` 2. 打印日志时,注意选择 `日志级别` -当打印日志内容时,如果传递了日志占位符的实际参数,必须避免过早评估,以避免由日志级别导致的不必要评估。 + 当打印日志内容时,如果传递了日志占位符的实际参数,必须避免过早评估,以避免由日志级别导致的不必要评估。 -- 负面示例: + - 负面示例: - 假设当前日志级别为 `INFO`: + 假设当前日志级别为 `INFO`: - ```java - // 忽略声明行。 - List userList = getUsersByBatch(1000); - LOG.debug("All users: {}", getAllUserIds(userList)); - ``` + ```java + // 忽略声明行。 + List userList = getUsersByBatch(1000); + LOG.debug("All users: {}", getAllUserIds(userList)); + ``` -- 正面示例: + - 正面示例: - 在这种情况下,我们应该在进行实际的日志调用之前提前确定日志级别,如下所示: + 在这种情况下,我们应该在进行实际的日志调用之前提前确定日志级别,如下所示: - ```java - // 忽略声明行。 - List userList = getUsersByBatch(1000); - if (LOG.isDebugEnabled()) { - LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); - } - ``` + ```java + // 忽略声明行。 + List userList = getUsersByBatch(1000); + if (LOG.isDebugEnabled()) { + LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); + } + ``` ## 5 测试 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/community/contribution.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/community/contribution.md index 8a353d72ba7..8b2a17fd1d6 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/community/contribution.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/community/contribution.md @@ -88,29 +88,29 @@ limitations under the License. 1. 首先您需要 Fork 目标仓库 [hertzbeat repository](https://github.com/apache/hertzbeat). 2. 然后 用git命令 将代码下载到本地: -```shell -git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended -``` + ```shell + git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended + ``` 3. 下载完成后,请参考目标仓库的入门指南或者 README 文件对项目进行初始化。 4. 接着,您可以参考如下命令进行代码的提交, 切换新的分支, 进行开发: -```shell -git checkout -b a-feature-branch #Recommended -``` + ```shell + git checkout -b a-feature-branch #Recommended + ``` 5. 提交 commit , commit 描述信息需要符合约定格式: [module name or type name]feature or bugfix or doc: custom message. -```shell -git add -git commit -m '[docs]feature: necessary instructions' #Recommended -``` + ```shell + git add + git commit -m '[docs]feature: necessary instructions' #Recommended + ``` 6. 推送到远程仓库 -```shell -git push origin a-feature-branch -``` + ```shell + git push origin a-feature-branch + ``` 7. 然后您就可以在 GitHub 上发起新的 PR (Pull Request)。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/activemq.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/activemq.md index 94e2ad54899..a6c741ba2e7 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/activemq.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/activemq.md @@ -15,40 +15,40 @@ keywords: [开源监控系统, 开源中间件监控, ActiveMQ消息中间件监 1. 修改安装目录下的 `conf/activemq.xml` 文件,开启JMX -> 在 `broker` 标签中添加 `userJmx="true"` 属性 + > 在 `broker` 标签中添加 `userJmx="true"` 属性 -```xml - - - -``` + ```xml + + + + ``` 2. 修改安装目录下的 `bin/env` 文件,配置JMX 端口 IP等 -将如下原配置信息 - -```text -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" -``` - -更新为如下配置,⚠️注意修改`本机对外IP` - -```text -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" -``` + 将如下原配置信息 + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` + + 更新为如下配置,⚠️注意修改`本机对外IP` + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` 3. 重启 ACTIVEMQ 服务,在 HertzBeat 添加对应 ActiveMQ 监控即可,参数使用 JMX 配置的 IP 端口。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_dingtalk.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_dingtalk.md index ba6b49bc58a..dbc7c583921 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_dingtalk.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_dingtalk.md @@ -11,31 +11,31 @@ keywords: [告警钉钉机器人通知, 开源告警系统, 开源监控告警 1. **【钉钉桌面客户端】-> 【群设置】-> 【智能群助手】-> 【添加新建机器人-选自定义】-> 【设置机器人名称头像】-> 【注意⚠️设置自定义关键字: HertzBeat】 ->【添加成功后复制其WebHook地址】** -> 注意⚠️ 新增机器人时需在安全设置块需设置其自定义关键字: HertzBeat ,其它安全设置加签或IP段不填写 + > 注意⚠️ 新增机器人时需在安全设置块需设置其自定义关键字: HertzBeat ,其它安全设置加签或IP段不填写 -![email](/img/docs/help/alert-notice-8.png) + ![email](/img/docs/help/alert-notice-8.png) 2. **【保存机器人的WebHook地址access_token值】** -> 例如: webHook地址:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` -> 其机器人access_token值为 `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > 例如: webHook地址:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > 其机器人access_token值为 `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` 3. **【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】** -![email](/img/docs/help/alert-notice-9.png) + ![email](/img/docs/help/alert-notice-9.png) 4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 钉钉机器人通知常见问题 1. 钉钉群未收到机器人告警通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查钉钉机器人是否配置了安全自定义关键字:HertzBeat -> 请排查是否配置正确机器人ACCESS_TOKEN,是否已配置告警策略关联 + > 请排查在告警中心是否已有触发的告警信息 + > 请排查钉钉机器人是否配置了安全自定义关键字:HertzBeat + > 请排查是否配置正确机器人ACCESS_TOKEN,是否已配置告警策略关联 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_discord.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_discord.md index bb3c6287cd4..675c606928a 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_discord.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_discord.md @@ -15,56 +15,56 @@ keywords: [告警 Discord 机器人通知, 开源告警系统, 开源监控告 1. 访问 [https://discord.com/developers/applications](https://discord.com/developers/applications) 创建应用 -![bot](/img/docs/help/discord-bot-1.png) + ![bot](/img/docs/help/discord-bot-1.png) 2. 在应用下创建机器人,获取机器人 Token -![bot](/img/docs/help/discord-bot-2.png) + ![bot](/img/docs/help/discord-bot-2.png) -![bot](/img/docs/help/discord-bot-3.png) + ![bot](/img/docs/help/discord-bot-3.png) 3. 授权机器人到聊天服务器 -> 在 OAuth2 菜单下给此机器人授权,`SCOPES` 范围选 `bot`, `BOT PERMISSIONS` 选发送消息 `Send Messages` + > 在 OAuth2 菜单下给此机器人授权,`SCOPES` 范围选 `bot`, `BOT PERMISSIONS` 选发送消息 `Send Messages` -![bot](/img/docs/help/discord-bot-4.png) + ![bot](/img/docs/help/discord-bot-4.png) -> 获取到最下方生成的 URL, 浏览器访问此 URL 给机器人正式授权,即设置将机器人加入哪个聊天服务器。 + > 获取到最下方生成的 URL, 浏览器访问此 URL 给机器人正式授权,即设置将机器人加入哪个聊天服务器。 4. 查看您的聊天服务器是否已经加入机器人成员 -![bot](/img/docs/help/discord-bot-5.png) + ![bot](/img/docs/help/discord-bot-5.png) ### 开启开发者模式,获取频道 Channel ID 1. 个人设置 -> 高级设置 -> 开启开发者模式 -![bot](/img/docs/help/discord-bot-6.png) + ![bot](/img/docs/help/discord-bot-6.png) 2. 获取频道 Channel ID -> 右键选中您想要发送机器人消息的聊天频道,点击 COPY ID 按钮获取 Channel ID + > 右键选中您想要发送机器人消息的聊天频道,点击 COPY ID 按钮获取 Channel ID -![bot](/img/docs/help/discord-bot-7.png) + ![bot](/img/docs/help/discord-bot-7.png) ### 在 HertzBeat 新增告警通知人,通知方式为 Discord Bot 1. **【告警通知】->【新增接收人】 ->【选择 Discord 机器人通知方式】->【设置机器人Token和ChannelId】-> 【确定】** -![email](/img/docs/help/discord-bot-8.png) + ![email](/img/docs/help/discord-bot-8.png) -4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** +2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Discord 机器人通知常见问题 1. Discord 未收到机器人告警通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查是否配置正确机器人Token, ChannelId,是否已配置告警策略关联 -> 请排查机器人是否被 Discord聊天服务器正确赋权 + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确机器人Token, ChannelId,是否已配置告警策略关联 + > 请排查机器人是否被 Discord聊天服务器正确赋权 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_email.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_email.md index 0f53b58e71d..7e4f59e7900 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_email.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_email.md @@ -11,29 +11,29 @@ keywords: [告警邮件通知, 开源告警系统, 开源监控告警系统] 1. **【告警通知】->【新增接收人】 ->【选择邮件通知方式】** -![email](/img/docs/help/alert-notice-1.png) + ![email](/img/docs/help/alert-notice-1.png) 2. **【获取验证码】-> 【输入邮箱验证码】-> 【确定】** ![email](/img/docs/help/alert-notice-2.png) -![email](/img/docs/help/alert-notice-3.png) + ![email](/img/docs/help/alert-notice-3.png) 3. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 邮件通知常见问题 1. 自己内网部署的HertzBeat无法接收到邮件通知 -> HertzBeat需要自己配置邮件服务器,TanCloud无需,请确认是否在application.yml配置了自己的邮件服务器 + > HertzBeat需要自己配置邮件服务器,TanCloud无需,请确认是否在application.yml配置了自己的邮件服务器 2. 云环境TanCloud无法接收到邮件通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查是否配置正确邮箱,是否已配置告警策略关联 -> 请查询邮箱的垃圾箱里是否把告警邮件拦截 + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确邮箱,是否已配置告警策略关联 + > 请查询邮箱的垃圾箱里是否把告警邮件拦截 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_enterprise_wechat_app.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_enterprise_wechat_app.md index b70c8b10c40..1c6f18cfeb0 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_enterprise_wechat_app.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_enterprise_wechat_app.md @@ -11,24 +11,24 @@ keywords: [开源告警系统, 开源监控告警系统, 企业微信应用告 1. **【企业微信后台管理】-> 【App管理】-> 【创建一个新的应用】-> 【设置应用信息】->【添加成功后复制应用的AgentId和Secret】** -![email](/img/docs/help/alert-wechat-1.jpg) + ![email](/img/docs/help/alert-wechat-1.jpg) 2. **【告警通知】->【新增接收人】 ->【选择企业微信应用通知方式】->【设置企业ID,企业应用id和应用的secret 】-> 【确定】** -![email](/img/docs/help/alert-wechat-2.jpg) + ![email](/img/docs/help/alert-wechat-2.jpg) 3. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人。** + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人。** -![email](/img/docs/help/alert-wechat-3.jpg) + ![email](/img/docs/help/alert-wechat-3.jpg) ### 企业微信应用通知常见问题 1. 企业微信应用未收到告警通知. -> 请检查用户是否具有应用程序权限. -> 请检查企业应用程序回调地址设置是否正常. -> 请检查服务器IP是否在企业应用程序白名单上. + > 请检查用户是否具有应用程序权限. + > 请检查企业应用程序回调地址设置是否正常. + > 请检查服务器IP是否在企业应用程序白名单上. 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_feishu.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_feishu.md index 5a6e95d7067..dd5c9e0c519 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_feishu.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_feishu.md @@ -13,22 +13,22 @@ keywords: [告警飞书机器人通知, 开源告警系统, 开源监控告警 2. **【保存机器人的WebHook地址的KEY值】** -> 例如: webHook地址:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` -> 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > 例如: webHook地址:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` 3. **【告警通知】->【新增接收人】 ->【选择飞书机器人通知方式】->【设置飞书机器人KEY】-> 【确定】** 4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 飞书机器人通知常见问题 1. 飞书群未收到机器人告警通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查是否配置正确机器人KEY,是否已配置告警策略关联 + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确机器人KEY,是否已配置告警策略关联 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_slack.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_slack.md index 5c5c38c56be..05dbcd4f9e3 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_slack.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_slack.md @@ -19,19 +19,19 @@ keywords: [告警 Slack Webhook 通知, 开源告警系统, 开源监控告警 1. **【告警通知】->【新增接收人】 ->【选择 Slack Webhook 通知方式】->【设置 Webhook URL】-> 【确定】** -![email](/img/docs/help/slack-bot-1.png) + ![email](/img/docs/help/slack-bot-1.png) 2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Slack 机器人通知常见问题 1. Slack 未收到机器人告警通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查是否配置正确 Slack Webhook URL,是否已配置告警策略关联 + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确 Slack Webhook URL,是否已配置告警策略关联 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_smn.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_smn.md index d6bca9843a4..5bd4aeec219 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_smn.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_smn.md @@ -11,33 +11,33 @@ keywords: [ 告警华为云SMN通知, 开源告警系统, 开源监控告警系 1. **按照[华为云SMN官方文档](https://support.huaweicloud.com/qs-smn/smn_json.html)开通SMN服务并配置SMN** -![alert-notice-10](/img/docs/help/alert-notice-10.png) + ![alert-notice-10](/img/docs/help/alert-notice-10.png) 2. **保存SMN的主题URN** -![alert-notice-11](/img/docs/help/alert-notice-11.png) + ![alert-notice-11](/img/docs/help/alert-notice-11.png) 3. **按照[华为云签名文档](https://support.huaweicloud.com/devg-apisign/api-sign-provide.html)获取AK、SK和项目ID** -![alert-notice-12](/img/docs/help/alert-notice-12.png) + ![alert-notice-12](/img/docs/help/alert-notice-12.png) -![alert-notice-13](/img/docs/help/alert-notice-13.png) + ![alert-notice-13](/img/docs/help/alert-notice-13.png) 4. **【告警通知】->【新增接收人】 ->【选择华为云SMN通知方式】->【设置华为云SMN AK、SK等配置】-> 【确定】** -![alert-notice-14](/img/docs/help/alert-notice-14.png) + ![alert-notice-14](/img/docs/help/alert-notice-14.png) 5. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 华为云SMN通知常见问题 1. 华为云SMN群未收到告警通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查是否正确配置华为云SMN AK、SK等配置,是否已配置告警策略关联 + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否正确配置华为云SMN AK、SK等配置,是否已配置告警策略关联 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_telegram.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_telegram.md index dfb1aa48d8a..6b1c6427335 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_telegram.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_telegram.md @@ -15,32 +15,32 @@ keywords: [告警 Telegram 通知, 开源告警系统, 开源监控告警系统] 1. 使用 [@BotFather](https://t.me/BotFather) 创建自己的机器人并获取访问令牌`Token` -![telegram-bot](/img/docs/help/telegram-bot-1.png) + ![telegram-bot](/img/docs/help/telegram-bot-1.png) 2. 获取接收人的 `User ID` -**使用您要通知的接收人账户给刚创建 Bot 账户随便发送一个信息**, -访问 ```https://api.telegram.org/bot/getUpdates``` , **`使用上一步的 Bot Token 替换其中的`**, 响应`Json`数据中第一个`result.message.from.id` 值即为接收人的 `User ID` - -```json -{ - "ok":true, - "result":[ - { - "update_id":632299191, - "message":{ - "from":{ - "id": "User ID" - }, - "chat":{ - }, - "date":1673858065, - "text":"111" + **使用您要通知的接收人账户给刚创建 Bot 账户随便发送一个信息**, + 访问 ```https://api.telegram.org/bot/getUpdates``` , **`使用上一步的 Bot Token 替换其中的`**, 响应`Json`数据中第一个`result.message.from.id` 值即为接收人的 `User ID` + + ```json + { + "ok":true, + "result":[ + { + "update_id":632299191, + "message":{ + "from":{ + "id": "User ID" + }, + "chat":{ + }, + "date":1673858065, + "text":"111" + } } - } - ] -} -``` + ] + } + ``` 3. 记录保存我们获得的 `Token` 和 `User Id` @@ -48,20 +48,20 @@ keywords: [告警 Telegram 通知, 开源告警系统, 开源监控告警系统] 1. **【告警通知】->【新增接收人】 ->【选择 Telegram 机器人通知方式】->【设置机器人Token和UserId】-> 【确定】** -![email](/img/docs/help/telegram-bot-2.png) + ![email](/img/docs/help/telegram-bot-2.png) -4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** +2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Telegram 机器人通知常见问题 1. Telegram 未收到机器人告警通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查是否配置正确机器人Token, UserId,是否已配置告警策略关联 -> UserId 应为消息接收对象的UserId + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确机器人Token, UserId,是否已配置告警策略关联 + > UserId 应为消息接收对象的UserId 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_webhook.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_webhook.md index 272c59cfd4c..267fd1770ab 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_webhook.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_webhook.md @@ -11,13 +11,13 @@ keywords: [告警 Webhook 回调通知, 开源告警系统, 开源监控告警 1. **【告警通知】->【新增接收人】 ->【选择WebHook通知方式】-> 【设置WebHook回调地址】 -> 【确定】** -![email](/img/docs/help/alert-notice-5.png) + ![email](/img/docs/help/alert-notice-5.png) 2. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### WebHook回调POST请求体BODY内容 @@ -60,7 +60,7 @@ keywords: [告警 Webhook 回调通知, 开源告警系统, 开源监控告警 1. WebHook回调未生效 -> 请查看告警中心是否已经产生此条告警信息 -> 请排查配置的WebHook回调地址是否正确 + > 请查看告警中心是否已经产生此条告警信息 + > 请排查配置的WebHook回调地址是否正确 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_wework.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_wework.md index 5c73ffee2a6..c8ad278707c 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_wework.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/alert_wework.md @@ -11,28 +11,28 @@ keywords: [告警企业微信通知, 开源告警系统, 开源监控告警系 1. **【企业微信端】-> 【群设置】-> 【群机器人】-> 【添加新建机器人】-> 【设置机器人名称头像】-> 【添加成功后复制其WebHook地址】** -![email](/img/docs/help/alert-notice-6.jpg) + ![email](/img/docs/help/alert-notice-6.jpg) 2. **【保存机器人的WebHook地址的KEY值】** -> 例如: webHook地址:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` -> 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > 例如: webHook地址:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > 其机器人KEY值为 `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` 3. **【告警通知】->【新增接收人】 ->【选择企业微信机器人通知方式】->【设置企业微信机器人KEY】-> 【确定】** -![email](/img/docs/help/alert-notice-7.png) + ![email](/img/docs/help/alert-notice-7.png) 4. **配置关联的告警通知策略⚠️ 【新增通知策略】-> 【将刚设置的接收人关联】-> 【确定】** -> **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 + > **注意⚠️ 新增了接收人并不代表已经生效可以接收告警信息,还需配置关联的告警通知策略,即指定哪些消息发给哪些接收人**。 -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### 企业微信机器人通知常见问题 1. 企业微信群未收到机器人告警通知 -> 请排查在告警中心是否已有触发的告警信息 -> 请排查是否配置正确机器人KEY,是否已配置告警策略关联 + > 请排查在告警中心是否已有触发的告警信息 + > 请排查是否配置正确机器人KEY,是否已配置告警策略关联 其它问题可以通过交流群ISSUE反馈哦! diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/dynamic_tp.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/dynamic_tp.md index 1abcb732289..b88627eaa35 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/dynamic_tp.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/dynamic_tp.md @@ -11,53 +11,53 @@ keywords: [开源监控系统, 开源中间件监控, DynamicTp线程池监控] 1. 集成使用 `DynamicTp` -`DynamicTp` 是Jvm语言的基于配置中心的轻量级动态线程池,内置监控告警功能,可通过SPI自定义扩展实现。 + `DynamicTp` 是Jvm语言的基于配置中心的轻量级动态线程池,内置监控告警功能,可通过SPI自定义扩展实现。 -集成使用,请参考文档 [快速接入](https://dynamictp.cn/guide/use/quick-start.html) + 集成使用,请参考文档 [快速接入](https://dynamictp.cn/guide/use/quick-start.html) 2. 开启SpringBoot Actuator Endpoint 暴露出`DynamicTp`指标接口 -```yaml -management: - endpoints: - web: - exposure: - include: '*' -``` + ```yaml + management: + endpoints: + web: + exposure: + include: '*' + ``` -测试访问指标接口 `ip:port/actuator/dynamic-tp` 是否有响应json数据如下: + 测试访问指标接口 `ip:port/actuator/dynamic-tp` 是否有响应json数据如下: -```json -[ - { - "poolName": "commonExecutor", - "corePoolSize": 1, - "maximumPoolSize": 1, - "queueType": "LinkedBlockingQueue", - "queueCapacity": 2147483647, - "queueSize": 0, - "fair": false, - "queueRemainingCapacity": 2147483647, - "activeCount": 0, - "taskCount": 0, - "completedTaskCount": 0, - "largestPoolSize": 0, - "poolSize": 0, - "waitTaskCount": 0, - "rejectCount": 0, - "rejectHandlerName": null, - "dynamic": false, - "runTimeoutCount": 0, - "queueTimeoutCount": 0 - }, - { - "maxMemory": "4 GB", - "totalMemory": "444 MB", - "freeMemory": "250.34 MB", - "usableMemory": "3.81 GB" - } -] -``` + ```json + [ + { + "poolName": "commonExecutor", + "corePoolSize": 1, + "maximumPoolSize": 1, + "queueType": "LinkedBlockingQueue", + "queueCapacity": 2147483647, + "queueSize": 0, + "fair": false, + "queueRemainingCapacity": 2147483647, + "activeCount": 0, + "taskCount": 0, + "completedTaskCount": 0, + "largestPoolSize": 0, + "poolSize": 0, + "waitTaskCount": 0, + "rejectCount": 0, + "rejectHandlerName": null, + "dynamic": false, + "runTimeoutCount": 0, + "queueTimeoutCount": 0 + }, + { + "maxMemory": "4 GB", + "totalMemory": "444 MB", + "freeMemory": "250.34 MB", + "usableMemory": "3.81 GB" + } + ] + ``` 3. 在HertzBeat中间件监控下添加DynamicTp监控即可 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/iotdb.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/iotdb.md index 8bb3bbb25e0..8170aaad0aa 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/iotdb.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/iotdb.md @@ -17,29 +17,29 @@ keywords: [开源监控系统, 开源数据库监控, IoTDB数据库监控] 1. metric 采集默认是关闭的,需要先到 `conf/iotdb-metric.yml` 中修改参数打开后重启 server -``` -# 是否启动监控模块,默认为false -enableMetric: true - -# 是否启用操作延迟统计 -enablePerformanceStat: false - -# 数据提供方式,对外部通过jmx和prometheus协议提供metrics的数据, 可选参数:[JMX, PROMETHEUS, IOTDB],IOTDB是默认关闭的。 -metricReporterList: - - JMX - - PROMETHEUS - -# 底层使用的metric架构,可选参数:[MICROMETER, DROPWIZARD] -monitorType: MICROMETER - -# 初始化metric的级别,可选参数: [CORE, IMPORTANT, NORMAL, ALL] -metricLevel: IMPORTANT - -# 预定义的指标集, 可选参数: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] -predefinedMetrics: - - JVM - - FILE -``` + ```yml + # 是否启动监控模块,默认为false + enableMetric: true + + # 是否启用操作延迟统计 + enablePerformanceStat: false + + # 数据提供方式,对外部通过jmx和prometheus协议提供metrics的数据, 可选参数:[JMX, PROMETHEUS, IOTDB],IOTDB是默认关闭的。 + metricReporterList: + - JMX + - PROMETHEUS + + # 底层使用的metric架构,可选参数:[MICROMETER, DROPWIZARD] + monitorType: MICROMETER + + # 初始化metric的级别,可选参数: [CORE, IMPORTANT, NORMAL, ALL] + metricLevel: IMPORTANT + + # 预定义的指标集, 可选参数: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] + predefinedMetrics: + - JVM + - FILE + ``` 2. 重启 IoTDB, 打开浏览器或者用curl 访问 , 就能看到metric数据了。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/issue.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/issue.md index f17a60a9b9f..27e9c63b3ba 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/issue.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/issue.md @@ -8,25 +8,25 @@ sidebar_label: 常见问题 1. **页面反馈:monitor.host:监控Host必须是ipv4,ipv6或域名** -> 如信息所示,输入的监控Host须是ipv4,ipv6或域名,不能携带协议头,例如协议头http + > 如信息所示,输入的监控Host须是ipv4,ipv6或域名,不能携带协议头,例如协议头http 2. **网站API等监控反馈statusCode:403或401,但对端服务本身无需认证,浏览器直接访问是OK** -> 请排查是否是被防火墙拦截,如宝塔等默认设置了对请求header中`User-Agent=Apache-HttpClient`的拦截,若被拦截请删除此拦截规则。(v1.0.beat5版本已将user-agent模拟成浏览器此问题不存在) + > 请排查是否是被防火墙拦截,如宝塔等默认设置了对请求header中`User-Agent=Apache-HttpClient`的拦截,若被拦截请删除此拦截规则。(v1.0.beat5版本已将user-agent模拟成浏览器此问题不存在) 3. 安装包部署的hertzbeat下ping连通性监控异常 安装包安装部署的hertzbeat,对ping连通性监控不可用,但本地直接ping是可用的。 -> 安装包部署需要配置java虚拟机root权限启动hertzbeat从而使用ICMP,若未启用root权限则是判断telnet对端7号端口是否开通 -> docker安装默认启用无此问题 -> 详见 + > 安装包部署需要配置java虚拟机root权限启动hertzbeat从而使用ICMP,若未启用root权限则是判断telnet对端7号端口是否开通 + > docker安装默认启用无此问题 + > 详见 4. 配置了k8s监控,但是实际监控时间并未按照正确间隔时间执行 请参考下面几点排查问题: -> 一:首先查看hertzbeat的错误日志,如果出现了'desc: SQL statement too long, check maxSQLLength config',信息 -> 二:需要调整tdengine配置文件,可在服务器创建taos.cfg文件,调整# max length of an SQL : maxSQLLength 654800,然后重启tdengine,需要加入配置文件的挂载 -> 三:如果遇到了重启tdengine失败,需要调整挂载数据文件中的配置,见 .../taosdata/dnode/dnodeEps.json,中dnodeFqdn调整为启动失败的dockerId即可,然后docker restart tdengine + > 一:首先查看hertzbeat的错误日志,如果出现了'desc: SQL statement too long, check maxSQLLength config',信息 + > 二:需要调整tdengine配置文件,可在服务器创建taos.cfg文件,调整# max length of an SQL : maxSQLLength 654800,然后重启tdengine,需要加入配置文件的挂载 + > 三:如果遇到了重启tdengine失败,需要调整挂载数据文件中的配置,见 .../taosdata/dnode/dnodeEps.json,中dnodeFqdn调整为启动失败的dockerId即可,然后docker restart tdengine 5. 配置http api监控,用于进行业务接口探测,确保业务可以用,另外接口有进行token鉴权校验,"Authorization:Bearer eyJhbGciOiJIUzI1....",配置后测试,提示“StatusCode 401”。服务端应用收到的token为"Authorization:Bearer%20eyJhbGciOiJIUzI1....",hertzbeat对空格进行转义为“%20”,服务器没有转义导致鉴权失败,建议转义功能作为可选项。 @@ -35,31 +35,31 @@ sidebar_label: 常见问题 1. **MYSQL,TDENGINE和HertzBeat都Docker部署在同一主机上,HertzBeat使用localhost或127.0.0.1连接数据库失败** 此问题本质为Docker容器访问宿主机端口连接失败,由于docker默认网络模式为Bridge模式,其通过localhost访问不到宿主机。 -> 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP -> 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` + > 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP + > 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` 2. **按照流程部署,访问 无界面** 请参考下面几点排查问题: -> 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 -> 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 -> 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 + > 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 + > 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 3. **日志报错TDengine连接或插入SQL失败** -> 一:排查配置的数据库账户密码是否正确,数据库是否创建 -> 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter + > 一:排查配置的数据库账户密码是否正确,数据库是否创建 + > 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter ### 安装包部署常见问题 1. **按照流程部署,访问 无界面** 请参考下面几点排查问题: -> 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 -> 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 -> 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 + > 一:依赖服务MYSQL数据库,TDENGINE数据库是否已按照启动成功,对应hertzbeat数据库是否已创建,SQL脚本是否执行 + > 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 2. **日志报错TDengine连接或插入SQL失败** -> 一:排查配置的数据库账户密码是否正确,数据库是否创建 -> 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter + > 一:排查配置的数据库账户密码是否正确,数据库是否创建 + > 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/jetty.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/jetty.md index 31e297703fc..5e5603783cc 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/jetty.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/jetty.md @@ -19,33 +19,33 @@ keywords: [开源监控系统, 开源中间件监控, Jetty应用服务器监控 1. 在 Jetty 启动 JMX JMX-REMOTE 模块 -```shell -java -jar $JETTY_HOME/start.jar --add-module=jmx -java -jar $JETTY_HOME/start.jar --add-module=jmx-remote -``` + ```shell + java -jar $JETTY_HOME/start.jar --add-module=jmx + java -jar $JETTY_HOME/start.jar --add-module=jmx-remote + ``` -命令执行成功会创建出 `${JETTY_BASE}/start.d/jmx-remote.ini` 配置文件 + 命令执行成功会创建出 `${JETTY_BASE}/start.d/jmx-remote.ini` 配置文件 2. 编辑 `${JETTY_BASE}/start.d/jmx-remote.ini` 配置文件,修改 JMX 的 IP 端口等参数。 -**`localhost` 需修改为对外暴露 IP** - -```text -## The host/address to bind the RMI server to. -# jetty.jmxremote.rmiserverhost=localhost - -## The port the RMI server listens to (0 means a random port is chosen). -# jetty.jmxremote.rmiserverport=1099 - -## The host/address to bind the RMI registry to. -# jetty.jmxremote.rmiregistryhost=localhost - -## The port the RMI registry listens to. -# jetty.jmxremote.rmiregistryport=1099 - -## The host name exported in the RMI stub. --Djava.rmi.server.hostname=localhost -``` + **`localhost` 需修改为对外暴露 IP** + + ```text + ## The host/address to bind the RMI server to. + # jetty.jmxremote.rmiserverhost=localhost + + ## The port the RMI server listens to (0 means a random port is chosen). + # jetty.jmxremote.rmiserverport=1099 + + ## The host/address to bind the RMI registry to. + # jetty.jmxremote.rmiregistryhost=localhost + + ## The port the RMI registry listens to. + # jetty.jmxremote.rmiregistryport=1099 + + ## The host name exported in the RMI stub. + -Djava.rmi.server.hostname=localhost + ``` 3. 重启 Jetty Server 即可。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/kafka.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/kafka.md index a79bb0e91c2..9268c920e5d 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/kafka.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/kafka.md @@ -17,16 +17,16 @@ keywords: [开源监控系统, 开源消息中间件监控, Kafka监控] 2. 修改 Kafka 启动脚本 -修改 Kafka 安装目录下的启动脚本 `/bin/kafka-server-start.sh` -在脚本正文(即非注释行)的第一行前添加如下内容, ⚠️注意替换您自己的端口和对外 IP 地址 - -```shell -export JMX_PORT=9999; -export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=ip地址 -Dcom.sun.management.jmxremote.rmi.port=9999 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"; - -# 这是最后一行本来就存在的 -# exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@" -``` + 修改 Kafka 安装目录下的启动脚本 `/bin/kafka-server-start.sh` + 在脚本正文(即非注释行)的第一行前添加如下内容, ⚠️注意替换您自己的端口和对外 IP 地址 + + ```shell + export JMX_PORT=9999; + export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=ip地址 -Dcom.sun.management.jmxremote.rmi.port=9999 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"; + + # 这是最后一行本来就存在的 + # exec $base_dir/kafka-run-class.sh $EXTRA_ARGS kafka.Kafka "$@" + ``` 3. 重启 Kafka 服务 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/kubernetes.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/kubernetes.md index cc4c7254afe..58ed7e3fcf3 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/kubernetes.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/kubernetes.md @@ -17,19 +17,19 @@ keywords: [开源监控系统, 开源Kubernetes监控] 1. 创建service account并绑定默认cluster-admin管理员集群角色 -```kubectl create serviceaccount dashboard-admin -n kube-system``` + ```kubectl create serviceaccount dashboard-admin -n kube-system``` 2. 用户授权 -```shell -kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin -kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' -kubectl describe secret {secret} -n kube-system -``` + ```shell + kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin + kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' + kubectl describe secret {secret} -n kube-system + ``` ### 方式二 -``` +```shell kubectl create serviceaccount cluster-admin kubectl create clusterrolebinding cluster-admin-manual --clusterrole=cluster-admin --serviceaccount=default:cluster-admin diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/nacos.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/nacos.md index 0b9b96b6099..f95da705d58 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/nacos.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/nacos.md @@ -14,9 +14,9 @@ keywords: [开源监控系统, 中间件监控, Nacos分布式监控] 1. 按照[部署文档](https://nacos.io/zh-cn/docs/deployment.html)搭建好Nacos集群。 2. 配置application.properties文件,暴露metrics数据。 -``` -management.endpoints.web.exposure.include=* -``` + ```properties + management.endpoints.web.exposure.include=* + ``` 3. 访问```{ip}:8848/nacos/actuator/prometheus```,查看是否能访问到metrics数据。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/nginx.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/nginx.md index 8c81c5a82c2..50837f79394 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/nginx.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/nginx.md @@ -17,45 +17,45 @@ keywords: [开源监控工具, 开源Java监控工具, 监控Nginx指标] 1. 检查是否已添加 `ngx_http_stub_status_module` -```shell -nginx -V -``` + ```shell + nginx -V + ``` -查看是否包含 `--with-http_stub_status_module`,如果没有则需要重新编译安装 Nginx。 + 查看是否包含 `--with-http_stub_status_module`,如果没有则需要重新编译安装 Nginx。 2. 编译安装 Nginx, 添加 `ngx_http_stub_status_module` 模块 -下载 Nginx 并解压,在目录下执行 + 下载 Nginx 并解压,在目录下执行 -```shell -./configure --prefix=/usr/local/nginx --with-http_stub_status_module - -make && make install -``` + ```shell + ./configure --prefix=/usr/local/nginx --with-http_stub_status_module + + make && make install + ``` 3. 修改 Nginx 配置文件 -修改 `nginx.conf` 文件,添加监控模块暴露端点,如下配置: + 修改 `nginx.conf` 文件,添加监控模块暴露端点,如下配置: -```shell -# modify nginx.conf -server { - listen 80; # port - server_name localhost; - location /nginx-status { - stub_status on; - access_log on; - #allow 127.0.0.1; #only allow requests from localhost - #deny all; #deny all other hosts - } -} -``` + ```shell + # modify nginx.conf + server { + listen 80; # port + server_name localhost; + location /nginx-status { + stub_status on; + access_log on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } + } + ``` 4. 重新加载 Nginx -```shell -nginx -s reload -``` + ```shell + nginx -s reload + ``` 5. 在浏览器访问 `http://localhost/nginx-status` 即可查看 Nginx 监控状态信息。 @@ -63,48 +63,48 @@ nginx -s reload 1. 安装 `ngx_http_reqstat_module` 模块 -```shell -# install `ngx_http_reqstat_module` -wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip - -unzip ngx_req_status.zip - -patch -p1 < ../ngx_req_status-master/write_filter.patch - -./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master - -make -j2 - -make install -``` + ```shell + # install `ngx_http_reqstat_module` + wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip + + unzip ngx_req_status.zip + + patch -p1 < ../ngx_req_status-master/write_filter.patch + + ./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master + + make -j2 + + make install + ``` 2. 修改 Nginx 配置文件 -修改 `nginx.conf` 文件,添加状态模块暴露端点,如下配置: - -```shell -# modify nginx.conf -http { - req_status_zone server_name $server_name 256k; - req_status_zone server_addr $server_addr 256k; - - req_status server_name server_addr; - - server { - location /req-status { - req_status_show on; - #allow 127.0.0.1; #only allow requests from localhost - #deny all; #deny all other hosts + 修改 `nginx.conf` 文件,添加状态模块暴露端点,如下配置: + + ```shell + # modify nginx.conf + http { + req_status_zone server_name $server_name 256k; + req_status_zone server_addr $server_addr 256k; + + req_status server_name server_addr; + + server { + location /req-status { + req_status_show on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } } } -} -``` + ``` 3. 重新加载 Nginx -```shell -nginx -s reload -``` + ```shell + nginx -s reload + ``` 4. 在浏览器访问 `http://localhost/req-status` 即可查看 Nginx 监控状态信息。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/rabbitmq.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/rabbitmq.md index 2210a2452e0..7e4ff6383d7 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/rabbitmq.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/rabbitmq.md @@ -14,9 +14,9 @@ keywords: [开源监控系统, 开源消息中间件监控, RabbitMQ消息中间 1. 开启 Management 插件,或使用自开启版本 -```shell -rabbitmq-plugins enable rabbitmq_management -``` + ```shell + rabbitmq-plugins enable rabbitmq_management + ``` 2. 浏览器访问 ,默认账户密码 `guest/guest`. 成功登录即开启成功。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/shenyu.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/shenyu.md index 87bb81b7800..40710bb3986 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/shenyu.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/shenyu.md @@ -17,27 +17,27 @@ keywords: [开源监控系统, 开源消息中间件监控, ShenYu网关监控 1. 在网关的 pom.xml 文件中添加 metrics 的依赖。 -```xml - - org.apache.shenyu - shenyu-spring-boot-starter-plugin-metrics - ${project.version} - -``` + ```xml + + org.apache.shenyu + shenyu-spring-boot-starter-plugin-metrics + ${project.version} + + ``` 2. 在网关的配置yaml文件中编辑如下内容: -```yaml -shenyu: - metrics: - enabled: true #设置为 true 表示开启 - name : prometheus - host: 127.0.0.1 #暴露的ip - port: 8090 #暴露的端口 - jmxConfig: #jmx配置 - props: - jvm_enabled: true #开启jvm的监控指标 -``` + ```yaml + shenyu: + metrics: + enabled: true #设置为 true 表示开启 + name : prometheus + host: 127.0.0.1 #暴露的ip + port: 8090 #暴露的端口 + jmxConfig: #jmx配置 + props: + jvm_enabled: true #开启jvm的监控指标 + ``` 最后重启访问网关指标接口 `http://ip:8090` 响应 prometheus 格式数据即可。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/zookeeper.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/zookeeper.md index 9752c22bc4e..7ff88b21f13 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/zookeeper.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/help/zookeeper.md @@ -14,23 +14,23 @@ keywords: [开源监控系统, Zookeeper监控监控] 1. 加白名单步骤 -> 1.找到我们 zookeeper 的配置文件,一般是 `zoo.cfg` -> -> 2.配置文件中加入以下命令 + 1. 找到我们 zookeeper 的配置文件,一般是 `zoo.cfg` -```shell -# 将需要的命令添加到白名单中 -4lw.commands.whitelist=stat, ruok, conf, isro + 2. 配置文件中加入以下命令 -# 将所有命令添加到白名单中 -4lw.commands.whitelist=* -``` + ```shell + # 将需要的命令添加到白名单中 + 4lw.commands.whitelist=stat, ruok, conf, isro + + # 将所有命令添加到白名单中 + 4lw.commands.whitelist=* + ``` -> 3.重启服务 + 3. 重启服务 -```shell -zkServer.sh restart -``` + ```shell + zkServer.sh restart + ``` 2. netcat 协议 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/custom-config.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/custom-config.md index 95bedddc350..6c30086e1b8 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/custom-config.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/custom-config.md @@ -16,61 +16,61 @@ sidebar_label: 常见参数配置 1. 配置短信发送服务器 -> 只有成功配置了您自己的短信服务器,监控系统内触发的告警短信才会正常发送。 + > 只有成功配置了您自己的短信服务器,监控系统内触发的告警短信才会正常发送。 -在`application.yml`新增如下腾讯平台短信服务器配置(参数需替换为您的短信服务器配置) + 在`application.yml`新增如下腾讯平台短信服务器配置(参数需替换为您的短信服务器配置) -```yaml -common: - sms: - tencent: - secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY - secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA - app-id: 1435441637 - sign-name: 赫兹跳动 - template-id: 1343434 -``` + ```yaml + common: + sms: + tencent: + secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY + secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA + app-id: 1435441637 + sign-name: 赫兹跳动 + template-id: 1343434 + ``` -1.1 腾讯云短信创建签名(sign-name) -![image](https://github.com/apache/hertzbeat/assets/40455946/3a4c287d-b23d-4398-8562-4894296af485) + 1.1 腾讯云短信创建签名(sign-name) + ![image](https://github.com/apache/hertzbeat/assets/40455946/3a4c287d-b23d-4398-8562-4894296af485) -1.2 腾讯云短信创建正文模板(template-id) + 1.2 腾讯云短信创建正文模板(template-id) -``` -监控:{1},告警级别:{2}。内容:{3} -``` + ``` + 监控:{1},告警级别:{2}。内容:{3} + ``` -![image](https://github.com/apache/hertzbeat/assets/40455946/face71a6-46d5-452c-bed3-59d2a975afeb) + ![image](https://github.com/apache/hertzbeat/assets/40455946/face71a6-46d5-452c-bed3-59d2a975afeb) -1.3 腾讯云短信创建应用(app-id) -![image](https://github.com/apache/hertzbeat/assets/40455946/2732d710-37fa-4455-af64-48bba273c2f8) + 1.3 腾讯云短信创建应用(app-id) + ![image](https://github.com/apache/hertzbeat/assets/40455946/2732d710-37fa-4455-af64-48bba273c2f8) -1.4 腾讯云访问管理(secret-id、secret-key) -![image](https://github.com/apache/hertzbeat/assets/40455946/36f056f0-94e7-43db-8f07-82893c98024e) + 1.4 腾讯云访问管理(secret-id、secret-key) + ![image](https://github.com/apache/hertzbeat/assets/40455946/36f056f0-94e7-43db-8f07-82893c98024e) 2. 配置告警自定义参数 -```yaml -alerter: - # 自定义控制台地址 - console-url: https://console.tancloud.io -``` + ```yaml + alerter: + # 自定义控制台地址 + console-url: https://console.tancloud.io + ``` 3. 使用外置redis代替内存存储实时指标数据 -> 默认我们的指标实时数据存储在内存中,可以配置如下来使用redis代替内存存储。 - -注意⚠️ `memory.enabled: false, redis.enabled: true` - -```yaml -warehouse: - store: - memory: - enabled: false - init-size: 1024 - redis: - enabled: true - host: 127.0.0.1 - port: 6379 - password: 123456 -``` + > 默认我们的指标实时数据存储在内存中,可以配置如下来使用redis代替内存存储。 + + 注意⚠️ `memory.enabled: false, redis.enabled: true` + + ```yaml + warehouse: + store: + memory: + enabled: false + init-size: 1024 + redis: + enabled: true + host: 127.0.0.1 + port: 6379 + password: 123456 + ``` diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/docker-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/docker-deploy.md index 76efdf8f5d0..d72d068562e 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/docker-deploy.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/docker-deploy.md @@ -12,7 +12,7 @@ sidebar_label: Docker方式部署 [菜鸟教程-Docker教程](https://www.runoob.com/docker/docker-tutorial.html) 安装完毕后终端查看Docker版本是否正常输出。 - ``` + ```shell $ docker -v Docker version 20.10.12, build e91ed57 ``` @@ -64,64 +64,64 @@ sidebar_label: Docker方式部署 具体修改步骤参考 [配置修改账户密码](account-modify) 6. 启动HertzBeat Docker容器 -```shell -$ docker run -d -p 1157:1157 -p 1158:1158 \ - -e LANG=zh_CN.UTF-8 \ - -e TZ=Asia/Shanghai \ - -v $(pwd)/data:/opt/hertzbeat/data \ - -v $(pwd)/logs:/opt/hertzbeat/logs \ - -v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml \ - -v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml \ - --restart=always \ - --name hertzbeat apache/hertzbeat -``` + ```shell + $ docker run -d -p 1157:1157 -p 1158:1158 \ + -e LANG=zh_CN.UTF-8 \ + -e TZ=Asia/Shanghai \ + -v $(pwd)/data:/opt/hertzbeat/data \ + -v $(pwd)/logs:/opt/hertzbeat/logs \ + -v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml \ + -v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml \ + --restart=always \ + --name hertzbeat apache/hertzbeat + ``` 这条命令启动一个运行HertzBeat的Docker容器,并且将容器的1157端口映射到宿主机的1157端口上。若宿主机已有进程占用该端口,则需要修改主机映射端口。 -- `docker run -d` : 通过Docker运行一个容器,使其在后台运行 -- `-e LANG=zh_CN.UTF-8` : 设置系统语言 -- `-e TZ=Asia/Shanghai` : 设置系统时区 -- `-p 1157:1157 -p 1158:1158` : 映射容器端口到主机端口,请注意,前面是宿主机的端口号,后面是容器的端口号。1157是WEB端口,1158是集群端口。 -- `-v $(pwd)/data:/opt/hertzbeat/data` : (可选,数据持久化)重要⚠️ 挂载H2数据库文件到本地主机,保证数据不会因为容器的创建删除而丢失 -- `-v $(pwd)/logs:/opt/hertzbeat/logs` : (可选,不需要可删除)挂载日志文件到本地主机,保证日志不会因为容器的创建删除而丢失,方便查看 -- `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (可选,不需要可删除)挂载上上一步修改的本地配置文件到容器中,即使用本地配置文件覆盖容器配置文件。我们需要修改此配置文件的MYSQL,TDengine配置信息来连接外部服务。 -- `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (可选,不需要可删除)挂载上一步修改的账户配置文件到容器中,若无修改账户需求可删除此命令参数。 -- 注意⚠️ 挂载文件时,前面参数为你自定义本地文件地址,后面参数为docker容器内文件地址(固定) -- `--name hertzbeat` : 命名容器名称 hertzbeat -- `--restart=always`:(可选,不需要可删除)使容器在Docker启动后自动重启。若您未在容器创建时指定该参数,可通过以下命令实现该容器自启。 + - `docker run -d` : 通过Docker运行一个容器,使其在后台运行 + - `-e LANG=zh_CN.UTF-8` : 设置系统语言 + - `-e TZ=Asia/Shanghai` : 设置系统时区 + - `-p 1157:1157 -p 1158:1158` : 映射容器端口到主机端口,请注意,前面是宿主机的端口号,后面是容器的端口号。1157是WEB端口,1158是集群端口。 + - `-v $(pwd)/data:/opt/hertzbeat/data` : (可选,数据持久化)重要⚠️ 挂载H2数据库文件到本地主机,保证数据不会因为容器的创建删除而丢失 + - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (可选,不需要可删除)挂载日志文件到本地主机,保证日志不会因为容器的创建删除而丢失,方便查看 + - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (可选,不需要可删除)挂载上上一步修改的本地配置文件到容器中,即使用本地配置文件覆盖容器配置文件。我们需要修改此配置文件的MYSQL,TDengine配置信息来连接外部服务。 + - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (可选,不需要可删除)挂载上一步修改的账户配置文件到容器中,若无修改账户需求可删除此命令参数。 + - 注意⚠️ 挂载文件时,前面参数为你自定义本地文件地址,后面参数为docker容器内文件地址(固定) + - `--name hertzbeat` : 命名容器名称 hertzbeat + - `--restart=always`:(可选,不需要可删除)使容器在Docker启动后自动重启。若您未在容器创建时指定该参数,可通过以下命令实现该容器自启。 - ```shell - docker update --restart=always hertzbeat - ``` + ```shell + docker update --restart=always hertzbeat + ``` -- `apache/hertzbeat` : 使用拉取最新的的HertzBeat官方发布的应用镜像来启动容器,**若使用`quay.io`镜像需用参数`quay.io/tancloud/hertzbeat`代替。** + - `apache/hertzbeat` : 使用拉取最新的的HertzBeat官方发布的应用镜像来启动容器,**若使用`quay.io`镜像需用参数`quay.io/tancloud/hertzbeat`代替。** 7. 开始探索HertzBeat 浏览器访问 即可开始探索使用HertzBeat,默认账户密码 admin/hertzbeat。 8. 部署采集器集群(可选) -```shell -$ docker run -d \ - -e IDENTITY=custom-collector-name \ - -e MODE=public \ - -e MANAGER_HOST=127.0.0.1 \ - -e MANAGER_PORT=1158 \ - --name hertzbeat-collector apache/hertzbeat-collector -``` + ```shell + $ docker run -d \ + -e IDENTITY=custom-collector-name \ + -e MODE=public \ + -e MANAGER_HOST=127.0.0.1 \ + -e MANAGER_PORT=1158 \ + --name hertzbeat-collector apache/hertzbeat-collector + ``` -这条命令启动一个运行HertzBeat采集器的Docker容器,并直连上了HertzBeat主服务节点。 + 这条命令启动一个运行HertzBeat采集器的Docker容器,并直连上了HertzBeat主服务节点。 -- `docker run -d` : 通过Docker运行一个容器,使其在后台运行 -- `-e IDENTITY=custom-collector-name` : (可选) 设置采集器的唯一标识名称。⚠️注意多采集器时采集器名称需保证唯一性。 -- `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 -- `-e MANAGER_HOST=127.0.0.1` : 重要⚠️ 设置连接的主HertzBeat服务地址IP。 -- `-e MANAGER_PORT=1158` : (可选) 设置连接的主HertzBeat服务地址端口,默认 1158. -- `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (可选,不需要可删除)挂载日志文件到本地主机,保证日志不会因为容器的创建删除而丢失,方便查看 -- `--name hertzbeat-collector` : 命名容器名称 hertzbeat-collector -- `apache/hertzbeat-collector` : 使用拉取最新的的HertzBeat采集器官方发布的应用镜像来启动容器,**若使用`quay.io`镜像需用参数`quay.io/tancloud/hertzbeat-collector`代替。** + - `docker run -d` : 通过Docker运行一个容器,使其在后台运行 + - `-e IDENTITY=custom-collector-name` : (可选) 设置采集器的唯一标识名称。⚠️注意多采集器时采集器名称需保证唯一性。 + - `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 + - `-e MANAGER_HOST=127.0.0.1` : 重要⚠️ 设置连接的主HertzBeat服务地址IP。 + - `-e MANAGER_PORT=1158` : (可选) 设置连接的主HertzBeat服务地址端口,默认 1158. + - `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (可选,不需要可删除)挂载日志文件到本地主机,保证日志不会因为容器的创建删除而丢失,方便查看 + - `--name hertzbeat-collector` : 命名容器名称 hertzbeat-collector + - `apache/hertzbeat-collector` : 使用拉取最新的的HertzBeat采集器官方发布的应用镜像来启动容器,**若使用`quay.io`镜像需用参数`quay.io/tancloud/hertzbeat-collector`代替。** -8. 浏览器访问主HertzBeat服务 `http://localhost:1157` 查看概览页面即可看到注册上来的新采集器 +9. 浏览器访问主HertzBeat服务 `http://localhost:1157` 查看概览页面即可看到注册上来的新采集器 **HAVE FUN** @@ -132,35 +132,35 @@ $ docker run -d \ 1. **MYSQL,TDENGINE或IotDB和HertzBeat都Docker部署在同一主机上,HertzBeat使用localhost或127.0.0.1连接数据库失败** 此问题本质为Docker容器访问宿主机端口连接失败,由于docker默认网络模式为Bridge模式,其通过localhost访问不到宿主机。 -> 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP -> 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` + > 解决办法一:配置application.yml将数据库的连接地址由localhost修改为宿主机的对外IP + > 解决办法二:使用Host网络模式启动Docker,即使Docker容器和宿主机共享网络 `docker run -d --network host .....` 2. **按照流程部署,访问 无界面** 请参考下面几点排查问题: -> 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 -> 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 -> 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 + > 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 + > 二:HertzBeat的配置文件 `application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以 `docker logs hertzbeat` 查看容器日志是否有明显错误,提issue或交流群或社区反馈 3. **日志报错TDengine连接或插入SQL失败** -> 一:排查配置的数据库账户密码是否正确,数据库是否创建 -> 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter + > 一:排查配置的数据库账户密码是否正确,数据库是否创建 + > 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter 4. **监控历史图表长时间都一直无数据** -> 一:Tdengine或IoTDB是否配置,未配置则无历史图表数据 -> 二:Tdengine的数据库`hertzbeat`是否创建 -> 三: HertzBeat的配置文件 `application.yml` 里面的依赖服务 IotDB或Tdengine IP账户密码等配置是否正确 + > 一:Tdengine或IoTDB是否配置,未配置则无历史图表数据 + > 二:Tdengine的数据库`hertzbeat`是否创建 + > 三: HertzBeat的配置文件 `application.yml` 里面的依赖服务 IotDB或Tdengine IP账户密码等配置是否正确 5. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - -> 安装初始化此数据库参考 [TDengine安装初始化](tdengine-init) 或 [IoTDB安装初始化](iotdb-init) + > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - + > 安装初始化此数据库参考 [TDengine安装初始化](tdengine-init) 或 [IoTDB安装初始化](iotdb-init) 6. 安装配置了时序数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 请检查配置参数是否正确 -> iot-db 或td-engine enable 是否设置为true -> 注意⚠️若hertzbeat和IotDB,TDengine都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP -> 可根据logs目录下启动日志排查 + > 请检查配置参数是否正确 + > iot-db 或td-engine enable 是否设置为true + > 注意⚠️若hertzbeat和IotDB,TDengine都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP + > 可根据logs目录下启动日志排查 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/greptime-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/greptime-init.md index ed69d93bfba..d8a86a88acd 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/greptime-init.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/greptime-init.md @@ -17,28 +17,28 @@ It's designed to work on infrastructure of the cloud era, and users benefit from > 可参考官方网站[安装教程](https://docs.greptime.com/getting-started/overview) > -> 1. 下载安装Docker环境 -> Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 -> 安装完毕后终端查看Docker版本是否正常输出。 -> -> ``` -> $ docker -v -> Docker version 20.10.12, build e91ed57 -> ``` -> -> 2. Docker安装GreptimeDB +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装GreptimeDB -```shell -$ docker run -p 4000-4004:4000-4004 \ - -p 4242:4242 -v /opt/greptimedb:/tmp/greptimedb \ - --name greptime \ - greptime/greptimedb standalone start \ - --http-addr 0.0.0.0:4000 \ - --rpc-addr 0.0.0.0:4001 -``` + ```shell + $ docker run -p 4000-4004:4000-4004 \ + -p 4242:4242 -v /opt/greptimedb:/tmp/greptimedb \ + --name greptime \ + greptime/greptimedb standalone start \ + --http-addr 0.0.0.0:4000 \ + --rpc-addr 0.0.0.0:4001 + ``` -`-v /opt/greptimedb:/tmp/greptimedb` 为greptimedb数据目录本地持久化挂载,需将`/opt/greptimedb`替换为实际本地存在的目录 -使用```$ docker ps```查看数据库是否启动成功 + `-v /opt/greptimedb:/tmp/greptimedb` 为greptimedb数据目录本地持久化挂载,需将`/opt/greptimedb`替换为实际本地存在的目录 + 使用```$ docker ps```查看数据库是否启动成功 ### 在hertzbeat的`application.yml`配置文件配置此数据库连接 @@ -46,18 +46,18 @@ $ docker run -p 4000-4004:4000-4004 \ 修改位于 `hertzbeat/config/application.yml` 的配置文件 [/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.greptime`数据源参数,URL账户密码,并启用`enabled`为`true`** + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.greptime`数据源参数,URL账户密码,并启用`enabled`为`true`** -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - greptime: - enabled: true - endpoint: localhost:4001 -``` + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + greptime: + enabled: true + endpoint: localhost:4001 + ``` 2. 重启 HertzBeat @@ -65,4 +65,4 @@ warehouse: 1. 时序数据库 GreptimeDB 或者 IoTDB 或者 TDengine 是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/influxdb-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/influxdb-init.md index d1d4b3f241f..bbba8a1df89 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/influxdb-init.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/influxdb-init.md @@ -24,26 +24,26 @@ InfluxDB是一个由InfluxData开发的开源时序型数据库,专注于海 ### 2. 通过Docker方式安装InfluxDB > 可参考官方网站[安装教程](https://hub.docker.com/_/influxdb) -> -> 1. 下载安装Docker环境 -> Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 -> 安装完毕后终端查看Docker版本是否正常输出。 -> -> ``` -> $ docker -v -> Docker version 20.10.12, build e91ed57 -> ``` -> -> 2. Docker安装InfluxDB 1.x -```shell -$ docker run -p 8086:8086 \ - -v /opt/influxdb:/var/lib/influxdb \ - influxdb:1.8 -``` +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装InfluxDB 1.x + + ```shell + $ docker run -p 8086:8086 \ + -v /opt/influxdb:/var/lib/influxdb \ + influxdb:1.8 + ``` -`-v /opt/influxdb:/var/lib/influxdb` 为influxdb数据目录本地持久化挂载,需将`/opt/influxdb`替换为实际本地存在的目录 -使用```$ docker ps```查看数据库是否启动成功 + `-v /opt/influxdb:/var/lib/influxdb` 为influxdb数据目录本地持久化挂载,需将`/opt/influxdb`替换为实际本地存在的目录 + 使用```$ docker ps```查看数据库是否启动成功 ### 在hertzbeat的`application.yml`配置文件配置此数据库连接 @@ -51,22 +51,22 @@ $ docker run -p 8086:8086 \ 修改位于 `hertzbeat/config/application.yml` 的配置文件 [/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.influxdb`数据源参数,URL账户密码,并启用`enabled`为`true`** - -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - influxdb: - enabled: true - server-url: http://localhost:8086 - username: root - password: root - expire-time: '30d' - replication: 1 -``` + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.influxdb`数据源参数,URL账户密码,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + influxdb: + enabled: true + server-url: http://localhost:8086 + username: root + password: root + expire-time: '30d' + replication: 1 + ``` 2. 重启 HertzBeat @@ -74,4 +74,4 @@ warehouse: 1. 时序数据库InfluxDb, IoTDB和TDengine是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/iotdb-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/iotdb-init.md index c5286af5330..7bf90831333 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/iotdb-init.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/iotdb-init.md @@ -24,22 +24,22 @@ Apache IoTDB是一体化收集、存储、管理与分析物联网时序数据 Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 安装完毕后终端查看Docker版本是否正常输出。 - ``` + ```shell $ docker -v Docker version 20.10.12, build e91ed57 ``` 2. Docker安装IoTDB -```shell -$ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ - -v /opt/iotdb/data:/iotdb/data \ - --name iotdb \ - apache/iotdb:1.2.2-standalone -``` + ```shell + $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ + -v /opt/iotdb/data:/iotdb/data \ + --name iotdb \ + 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数据库连接 @@ -47,63 +47,63 @@ $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ 修改位于 `hertzbeat/config/application.yml` 的配置文件 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置`warehouse.store.iot-db`数据源参数,HOST账户密码等,并启用`enabled`为`true`** - -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - # 启用IotDB - iot-db: - enabled: true - host: 127.0.0.1 - rpc-port: 6667 - username: root - password: root - # use default queryTimeoutInMs = -1 - query-timeout-in-ms: -1 - # 数据存储时间:默认'7776000000'(90天,单位为毫秒,-1代表永不过期) - 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 - # 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数据库版本,已废弃,仅支持V1.* | -| query-timeout-in-ms | 查询超时时间 | -| expire-time | 数据存储时间,默认'7776000000'(90天,单位为毫秒,-1代表永不过期) | - -> 如果集群配置`node-urls`和单机配置同时设置,以集群`node-urls`配置稳准 + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置`warehouse.store.iot-db`数据源参数,HOST账户密码等,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + # 启用IotDB + iot-db: + enabled: true + host: 127.0.0.1 + rpc-port: 6667 + username: root + password: root + # use default queryTimeoutInMs = -1 + query-timeout-in-ms: -1 + # 数据存储时间:默认'7776000000'(90天,单位为毫秒,-1代表永不过期) + 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 + # 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数据库版本,已废弃,仅支持V1.* | + | query-timeout-in-ms | 查询超时时间 | + | expire-time | 数据存储时间,默认'7776000000'(90天,单位为毫秒,-1代表永不过期) | + + > 如果集群配置`node-urls`和单机配置同时设置,以集群`node-urls`配置稳准 4. 重启 HertzBeat @@ -111,15 +111,15 @@ warehouse: 1. 时序数据库IoTDB和TDengine是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 2. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 + > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 3. 安装配置了IotDB数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 请检查配置参数是否正确 -> iot-db enable是否设置为true -> 注意⚠️若hertzbeat和IotDB都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP -> 可根据logs目录下启动日志排查 + > 请检查配置参数是否正确 + > iot-db enable是否设置为true + > 注意⚠️若hertzbeat和IotDB都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP + > 可根据logs目录下启动日志排查 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/package-deploy.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/package-deploy.md index e89cabd8b10..39744f8ef23 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/package-deploy.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/package-deploy.md @@ -66,33 +66,33 @@ sidebar_label: 安装包方式部署 1. **若您使用的是不含JDK的安装包,需您提前准备JAVA运行环境** -安装JAVA运行环境-可参考[官方网站](http://www.oracle.com/technetwork/java/javase/downloads/index.html) -要求:JAVA17环境 -下载JAVA安装包: [镜像站](https://repo.huaweicloud.com/java/jdk/) -安装后命令行检查是否成功安装 - -``` -$ java -version -java version "17.0.9" -Java(TM) SE Runtime Environment 17.0.9 (build 17.0.9+8-LTS-237) -Java HotSpot(TM) 64-Bit Server VM 17.0.9 (build 17.0.9+8-LTS-237, mixed mode) - -``` + 安装JAVA运行环境-可参考[官方网站](http://www.oracle.com/technetwork/java/javase/downloads/index.html) + 要求:JAVA17环境 + 下载JAVA安装包: [镜像站](https://repo.huaweicloud.com/java/jdk/) + 安装后命令行检查是否成功安装 + + ```shell + $ java -version + java version "17.0.9" + Java(TM) SE Runtime Environment 17.0.9 (build 17.0.9+8-LTS-237) + Java HotSpot(TM) 64-Bit Server VM 17.0.9 (build 17.0.9+8-LTS-237, mixed mode) + + ``` 2. **按照流程部署,访问 无界面** 请参考下面几点排查问题: -> 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 -> 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 -> 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 + > 一:若切换了依赖服务MYSQL数据库,排查数据库是否成功创建,是否启动成功 + > 二:HertzBeat的配置文件 `hertzbeat/config/application.yml` 里面的依赖服务IP账户密码等配置是否正确 + > 三:若都无问题可以查看 `hertzbeat/logs/` 目录下面的运行日志是否有明显错误,提issue或交流群或社区反馈 3. **日志报错TDengine连接或插入SQL失败** -> 一:排查配置的数据库账户密码是否正确,数据库是否创建 -> 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter + > 一:排查配置的数据库账户密码是否正确,数据库是否创建 + > 二:若是安装包安装的TDengine2.3+,除了启动server外,还需执行 `systemctl start taosadapter` 启动 adapter 4. **监控历史图表长时间都一直无数据** -> 一:时序数据库是否配置,未配置则无历史图表数据 -> 二:若使用了Tdengine,排查Tdengine的数据库`hertzbeat`是否创建 -> 三: HertzBeat的配置文件 `application.yml` 里面的依赖服务 时序数据库 IP账户密码等配置是否正确 + > 一:时序数据库是否配置,未配置则无历史图表数据 + > 二:若使用了Tdengine,排查Tdengine的数据库`hertzbeat`是否创建 + > 三: HertzBeat的配置文件 `application.yml` 里面的依赖服务 时序数据库 IP账户密码等配置是否正确 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/quickstart.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/quickstart.md index 07d5a8b8ed3..9f405dd061a 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/quickstart.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/quickstart.md @@ -16,24 +16,24 @@ sidebar_label: 快速开始 1. `docker` 环境仅需一条命令即可开始 -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```或者使用 quay.io (若 dockerhub 网络链接超时)``` + ```或者使用 quay.io (若 dockerhub 网络链接超时)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` 3. 部署采集器集群(可选) -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -- `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 -- `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 -- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 -- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 + - `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。 + - `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。 + - `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。 + - `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。 更多配置详细步骤参考 [通过Docker方式安装HertzBeat](docker-deploy) diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/sslcert-practice.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/sslcert-practice.md index 1a0bc9a39f6..c2e7bb9314c 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/sslcert-practice.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/sslcert-practice.md @@ -18,7 +18,7 @@ github: 1. `docker` 环境仅需一条命令即可安装 -`docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` + `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` 2. 安装成功浏览器访问 `localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat` @@ -26,63 +26,63 @@ github: 1. 点击新增SSL证书监控 -> 系统页面 -> 监控菜单 -> SSL证书 -> 新增SSL证书 + > 系统页面 -> 监控菜单 -> SSL证书 -> 新增SSL证书 -![](/img/docs/start/ssl_1.png) + ![](/img/docs/start/ssl_1.png) 2. 配置监控网站 -> 我们这里举例监控百度网站, 配置监控host域名,名称,采集间隔等。 -> 点击确定 注意⚠️新增前默认会先去测试网站连接性,连接成功才会新增,当然也可以把**是否测试**按钮置灰。 + > 我们这里举例监控百度网站, 配置监控host域名,名称,采集间隔等。 + > 点击确定 注意⚠️新增前默认会先去测试网站连接性,连接成功才会新增,当然也可以把**是否测试**按钮置灰。 -![](/img/docs/start/ssl_2.png) + ![](/img/docs/start/ssl_2.png) 3. 查看检测指标数据 -> 在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。 + > 在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。 -![](/img/docs/start/ssl_3.png) + ![](/img/docs/start/ssl_3.png) -![](/img/docs/start/ssl_11.png) + ![](/img/docs/start/ssl_11.png) 4. 设置阈值(证书过期时触发) -> 系统页面 -> 告警 -> 告警阈值 -> 新增阈值 + > 系统页面 -> 告警 -> 告警阈值 -> 新增阈值 -![](/img/docs/start/ssl_4.png) + ![](/img/docs/start/ssl_4.png) -> 配置阈值,选择SSL证书指标对象,配置告警表达式-当指标`expired`为`true`触发,即`equals(expired,"true")` , 设置告警级别通知模版信息等。 + > 配置阈值,选择SSL证书指标对象,配置告警表达式-当指标`expired`为`true`触发,即`equals(expired,"true")` , 设置告警级别通知模版信息等。 -![](/img/docs/start/ssl_5.png) + ![](/img/docs/start/ssl_5.png) -> 关联阈值与监控, 在阈值列表设置此阈值应用于哪些监控。 + > 关联阈值与监控, 在阈值列表设置此阈值应用于哪些监控。 -![](/img/docs/start/ssl_6.png) + ![](/img/docs/start/ssl_6.png) 5. 设置阈值(证书过期前一周触发) -> 同理如上,新增配置阈值,配置告警表达式-当指标有效期时间戳 `end_timestamp`,`now()`函数为当前时间戳,若配置提前一周触发告警即:`end_timestamp <= (now() + 604800000)` , 其中 `604800000` 为7天总时间差毫秒值。 + > 同理如上,新增配置阈值,配置告警表达式-当指标有效期时间戳 `end_timestamp`,`now()`函数为当前时间戳,若配置提前一周触发告警即:`end_timestamp <= (now() + 604800000)` , 其中 `604800000` 为7天总时间差毫秒值。 -![](/img/docs/start/ssl_7.png) + ![](/img/docs/start/ssl_7.png) -> 最终可以在告警中心看到已触发的告警。 + > 最终可以在告警中心看到已触发的告警。 -![](/img/docs/start/ssl_8.png) + ![](/img/docs/start/ssl_8.png) 6. 告警通知(通过钉钉微信飞书等及时通知) -> 监控系统 -> 告警通知 -> 新增接收人 + > 监控系统 -> 告警通知 -> 新增接收人 -![](/img/docs/start/ssl_9.png) + ![](/img/docs/start/ssl_9.png) -钉钉微信飞书等token配置可以参考帮助文档 + 钉钉微信飞书等token配置可以参考帮助文档 - - + + -> 告警通知 -> 新增告警通知策略 -> 将刚才配置的接收人启用通知 + > 告警通知 -> 新增告警通知策略 -> 将刚才配置的接收人启用通知 -![](/img/docs/start/ssl_10.png) + ![](/img/docs/start/ssl_10.png) 7. OK 当阈值触发后我们就可以收到对应告警消息啦,如果没有配通知,也可以在告警中心查看告警信息。 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/tdengine-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/tdengine-init.md index 3daaa5fa17d..813eb94ad1a 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/tdengine-init.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/tdengine-init.md @@ -18,28 +18,28 @@ TDengine是一款开源物联网时序型数据库,我们用其存储采集到 ### 通过Docker方式安装TDengine > 可参考官方网站[安装教程](https://docs.taosdata.com/get-started/docker/) -> -> 1. 下载安装Docker环境 -> Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 -> 安装完毕后终端查看Docker版本是否正常输出。 -> -> ``` -> $ docker -v -> Docker version 20.10.12, build e91ed57 -> ``` -> -> 2. Docker安装TDengine - -```shell -$ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ - -v /opt/taosdata:/var/lib/taos \ - --name tdengine -e TZ=Asia/Shanghai \ - tdengine/tdengine:3.0.4.0 -``` - -`-v /opt/taosdata:/var/lib/taos` 为tdengine数据目录本地持久化挂载,需将`/opt/taosdata`替换为实际本地存在的目录 -`-e TZ="Asia/Shanghai"` 为tdengine设置时区,这里可选设置对应的时区 -使用```$ docker ps```查看数据库是否启动成功 + +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装TDengine + + ```shell + $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ + -v /opt/taosdata:/var/lib/taos \ + --name tdengine -e TZ=Asia/Shanghai \ + tdengine/tdengine:3.0.4.0 + ``` + + `-v /opt/taosdata:/var/lib/taos` 为tdengine数据目录本地持久化挂载,需将`/opt/taosdata`替换为实际本地存在的目录 + `-e TZ="Asia/Shanghai"` 为tdengine设置时区,这里可选设置对应的时区 + 使用```$ docker ps```查看数据库是否启动成功 ### 创建数据库实例 @@ -99,21 +99,21 @@ $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ 修改位于 `hertzbeat/config/application.yml` 的配置文件 [/script/application.yml](https://github.com/apache/hertzbeat/raw/master/script/application.yml) 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.td-engine`数据源参数,URL账户密码,并启用`enabled`为`true`** - -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - td-engine: - enabled: true - driver-class-name: com.taosdata.jdbc.rs.RestfulDriver - url: jdbc:TAOS-RS://localhost:6041/hertzbeat - username: root - password: taosdata -``` + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置里面的`warehouse.store.td-engine`数据源参数,URL账户密码,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + td-engine: + enabled: true + driver-class-name: com.taosdata.jdbc.rs.RestfulDriver + url: jdbc:TAOS-RS://localhost:6041/hertzbeat + username: root + password: taosdata + ``` 2. 重启 HertzBeat @@ -121,19 +121,19 @@ warehouse: 1. 时序数据库IoTDB和TDengine是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,只影响历史图表数据。 2. 监控页面历史图表不显示,弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 + > 如弹窗所示,历史图表展示的前提是需要安装配置hertzbeat的依赖服务 - IotDB数据库或TDengine数据库 3. 监控详情历史图片不展示或无数据,已经配置了TDengine -> 请确认是否安装的TDengine版本为3.0以上,版本2.x不支持兼容 + > 请确认是否安装的TDengine版本为3.0以上,版本2.x不支持兼容 4. 安装配置了TDengine数据库,但页面依旧显示弹出 [无法提供历史图表数据,请配置依赖时序数据库] -> 请检查配置参数是否正确 -> td-engine enable是否设置为true -> 注意⚠️若hertzbeat和TDengine都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP -> 可根据logs目录下启动日志排查 + > 请检查配置参数是否正确 + > td-engine enable是否设置为true + > 注意⚠️若hertzbeat和TDengine都为docker容器在同一主机下启动,容器之间默认不能用127.0.0.1通讯,改为主机IP + > 可根据logs目录下启动日志排查 diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/victoria-metrics-init.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/victoria-metrics-init.md index 1b07dd1c789..c38e59b3198 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/victoria-metrics-init.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/version-v1.5.x/start/victoria-metrics-init.md @@ -18,27 +18,27 @@ VictoriaMetrics,是一个快速高效、经济并且可扩展的监控解决 ### 通过Docker方式安装VictoriaMetrics > 可参考官方网站[安装教程](https://docs.victoriametrics.com/Quick-Start.html#how-to-install) -> -> 1. 下载安装Docker环境 -> Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 -> 安装完毕后终端查看Docker版本是否正常输出。 -> -> ``` -> $ docker -v -> Docker version 20.10.12, build e91ed57 -> ``` -> -> 2. Docker安装VictoriaMetrics - -```shell -$ docker run -d -p 8428:8428 \ - -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ - --name victoria-metrics \ - victoriametrics/victoria-metrics:v1.95.1 -``` - -`-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` 为VictoriaMetrics数据目录本地持久化挂载 -使用```$ docker ps```查看数据库是否启动成功 + +1. 下载安装Docker环境 +Docker 工具自身的下载请参考 [Docker官网文档](https://docs.docker.com/get-docker/)。 +安装完毕后终端查看Docker版本是否正常输出。 + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Docker安装VictoriaMetrics + + ```shell + $ docker run -d -p 8428:8428 \ + -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ + --name victoria-metrics \ + victoriametrics/victoria-metrics:v1.95.1 + ``` + + `-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` 为VictoriaMetrics数据目录本地持久化挂载 + 使用```$ docker ps```查看数据库是否启动成功 3. 在hertzbeat的`application.yml`配置文件配置VictoriaMetrics数据库连接 @@ -46,21 +46,21 @@ $ docker run -d -p 8428:8428 \ 修改位于 `hertzbeat/config/application.yml` 的配置文件 注意⚠️docker容器方式需要将application.yml文件挂载到主机本地,安装包方式解压修改位于 `hertzbeat/config/application.yml` 即可 -**修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置`warehouse.store.victoria-metrics`数据源参数,HOST账户密码等,并启用`enabled`为`true`** - -```yaml -warehouse: - store: - # 关闭默认JPA - jpa: - enabled: false - # 启用 victoria-metrics - victoria-metrics: - enabled: true - url: http://localhost:8428 - username: root - password: root -``` + **修改里面的`warehouse.store.jpa.enabled`参数为`false`, 配置`warehouse.store.victoria-metrics`数据源参数,HOST账户密码等,并启用`enabled`为`true`** + + ```yaml + warehouse: + store: + # 关闭默认JPA + jpa: + enabled: false + # 启用 victoria-metrics + victoria-metrics: + enabled: true + url: http://localhost:8428 + username: root + password: root + ``` 4. 重启 HertzBeat @@ -68,4 +68,4 @@ warehouse: 1. 时序数据库是否都需要配置,能不能都用 -> 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,但会影响历史图表数据和存储时长等。 + > 不需要都配置,任选其一即可,用enable参数控制其是否使用,也可都不安装配置,但会影响历史图表数据和存储时长等。 diff --git a/home/versioned_docs/version-v1.5.x/community/code-style-and-quality-guide.md b/home/versioned_docs/version-v1.5.x/community/code-style-and-quality-guide.md index 5b87ee9bf49..342c176673e 100644 --- a/home/versioned_docs/version-v1.5.x/community/code-style-and-quality-guide.md +++ b/home/versioned_docs/version-v1.5.x/community/code-style-and-quality-guide.md @@ -145,9 +145,9 @@ limitations under the License. 2. Ensure code readability and intuitiveness -- The string in the `annotation` symbol doesn't need to be extracted as constant. + - The string in the `annotation` symbol doesn't need to be extracted as constant. -- The referenced `package` or `resource` name doesn't need to be extracted as constant. + - The referenced `package` or `resource` name doesn't need to be extracted as constant. 3. Variables that have not been reassigned must also be declared as final types. @@ -189,10 +189,10 @@ limitations under the License. - returns Set if use `HashSet` 2. If there are multiple threads, the following declaration or returned types can be used: -```java -private CurrentHashMap map; -public CurrentHashMap funName(); -``` + ```java + private CurrentHashMap map; + public CurrentHashMap funName(); + ``` 3. Use `isEmpty()` instead of `length() == 0` or `size() == 0` - Negative demo: @@ -225,98 +225,97 @@ public CurrentHashMap funName(); - Multiple code line `depths` of `n+1` - Redundant lines -Generally speaking, if a method's code line depth exceeds `2+ Tabs` due to continuous nested `if... else..`, it should be considered to try + Generally speaking, if a method's code line depth exceeds `2+ Tabs` due to continuous nested `if... else..`, it should be considered to try -- `merging branches`, -- `inverting branch conditions` -- `extracting private methods` + - `merging branches`, + - `inverting branch conditions` + - `extracting private methods` -to reduce code line depth and improve readability like follows: + to reduce code line depth and improve readability like follows: -- Union or merge the logic into the next level calling -- Negative demo: + - Union or merge the logic into the next level calling + - Negative demo: -```java -if (isInsert) { -save(platform); -} else { -updateById(platform); -} -``` + ```java + if (isInsert) { + save(platform); + } else { + updateById(platform); + } + ``` -- Positive demo: + - Positive demo: -```java -saveOrUpdate(platform); -``` + ```java + saveOrUpdate(platform); + ``` -- Merge the conditions -- Negative demo: - -```java -if (expression1) { -if(expression2) { -...... -} -} - -``` + - Merge the conditions + - Negative demo: -- Positive demo: - - ```java - if (expression1 && expression2) { - ...... - } - ``` - -- Reverse the condition -- Negative demo: + ```java + if (expression1) { + if(expression2) { + // ...... + } + } + ``` - ```java - public void doSomething() { - // Ignored more deeper block lines - // ..... - if (condition1) { - ... - } else { - ... - } - } - ``` + - Positive demo: -- Positive demo: + ```java + if (expression1 && expression2) { + // ...... + } + ``` + + - Reverse the condition + - Negative demo: + + ```java + public void doSomething() { + // Ignored more deeper block lines + // ..... + if (condition1) { + // ... + } else { + // ... + } + } + ``` + + - Positive demo: + + ```java + public void doSomething() { + // Ignored more deeper block lines + // ..... + if (!condition1) { + // ... + return; + } + // ... + } + ``` - ```java - public void doSomething() { - // Ignored more deeper block lines - // ..... - if (!condition1) { - ... - return; - } - // ... - } - ``` - -- Using a single variable or method to reduce the complex conditional expression -- Negative demo: + - Using a single variable or method to reduce the complex conditional expression + - Negative demo: - ```java - if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { - ... - } - ``` + ```java + if (dbType.indexOf("sqlserver") >= 0 || dbType.indexOf("sql server") >= 0) { + // ... + } + ``` -- Positive demo: + - Positive demo: - ```java - if (containsSqlServer(dbType)) { - .... - } - //..... - // definition of the containsSqlServer - ``` + ```java + if (containsSqlServer(dbType)) { + // .... + } + //..... + // definition of the containsSqlServer + ``` > Using `sonarlint` and `better highlights` to check code depth looks like good in the future. @@ -324,20 +323,20 @@ if(expression2) { 1. Method lacks comments: -- `When`: When can the method be called -- `How`: How to use this method and how to pass parameters, etc. -- `What`: What functions does this method achieve -- `Note`: What should developers pay attention to when calling this method + - `When`: When can the method be called + - `How`: How to use this method and how to pass parameters, etc. + - `What`: What functions does this method achieve + - `Note`: What should developers pay attention to when calling this method 2. Missing necessary class header description comments. -Add `What`, `Note`, etc. like mentioned in the `1`. + Add `What`, `Note`, etc. like mentioned in the `1`. 3. The method declaration in the interface must be annotated. -- If the semantics of the implementation and the annotation content at the interface declaration are inconsistent, the specific implementation method also needs to be rewritten with annotations. + - If the semantics of the implementation and the annotation content at the interface declaration are inconsistent, the specific implementation method also needs to be rewritten with annotations. -- If the semantics of the method implementation are consistent with the annotation content at the interface declaration, it is not recommended to write annotations to avoid duplicate annotations. + - If the semantics of the method implementation are consistent with the annotation content at the interface declaration, it is not recommended to write annotations to avoid duplicate annotations. 4. The first word in the comment lines need to be capitalized, like `param` lines, `return` lines. If a special reference as a subject does not need to be capitalized, special symbols such as quotation marks need to be noted. @@ -347,31 +346,31 @@ Add `What`, `Note`, etc. like mentioned in the `1`. 1. Prefer `non-capturing` lambdas (lambdas that do not contain references to the outer scope). Capturing lambdas need to create a new object instance for every call. `Non-capturing` lambdas can use the same instance for each invocation. -- Negative demo: + - Negative demo: - ```java - map.computeIfAbsent(key, x -> key.toLowerCase()) - ``` + ```java + map.computeIfAbsent(key, x -> key.toLowerCase()) + ``` -- Positive demo: + - Positive demo: - ```java - map.computeIfAbsent(key, k -> k.toLowerCase()); - ``` + ```java + map.computeIfAbsent(key, k -> k.toLowerCase()); + ``` 2. Consider method references instead of inline lambdas -- Negative demo: + - Negative demo: - ```java - map.computeIfAbsent(key, k-> Loader.load(k)); - ``` + ```java + map.computeIfAbsent(key, k-> Loader.load(k)); + ``` -- Positive demo: + - Positive demo: - ```java - map.computeIfAbsent(key, Loader::load); - ``` + ```java + map.computeIfAbsent(key, Loader::load); + ``` ### 3.9 Java Streams @@ -389,127 +388,127 @@ Add `What`, `Note`, etc. like mentioned in the `1`. 1. Use `StringUtils.isBlank` instead of `StringUtils.isEmpty` -- Negative demo: + - Negative demo: - ```java - if (StringUtils.isEmpty(name)) { - return; - } - ``` + ```java + if (StringUtils.isEmpty(name)) { + return; + } + ``` -- Positive demo: + - Positive demo: - ```java - if (StringUtils.isBlank(name)) { - return; - } - ``` + ```java + if (StringUtils.isBlank(name)) { + return; + } + ``` 2. Use `StringUtils.isNotBlank` instead of `StringUtils.isNotEmpty` -- Negative demo: + - Negative demo: - ```java - if (StringUtils.isNotEmpty(name)) { - return; - } - ``` + ```java + if (StringUtils.isNotEmpty(name)) { + return; + } + ``` -- Positive demo: + - Positive demo: - ```java - if (StringUtils.isNotBlank(name)) { - return; - } - ``` + ```java + if (StringUtils.isNotBlank(name)) { + return; + } + ``` 3. Use `StringUtils.isAllBlank` instead of `StringUtils.isAllEmpty` -- Negative demo: + - Negative demo: - ```java - if (StringUtils.isAllEmpty(name, age)) { - return; - } - ``` + ```java + if (StringUtils.isAllEmpty(name, age)) { + return; + } + ``` -- Positive demo: + - Positive demo: - ```java - if (StringUtils.isAllBlank(name, age)) { - return; - } - ``` + ```java + if (StringUtils.isAllBlank(name, age)) { + return; + } + ``` ### 3.12 `Enum` Class 1. Enumeration value comparison -- Negative demo: + - Negative demo: - ```java - if (status.equals(JobStatus.RUNNING)) { - return; - } - ``` + ```java + if (status.equals(JobStatus.RUNNING)) { + return; + } + ``` -- Positive demo: + - Positive demo: - ```java - if (status == JobStatus.RUNNING) { - return; - } - ``` + ```java + if (status == JobStatus.RUNNING) { + return; + } + ``` 2. Enumeration classes do not need to implement Serializable -- Negative demo: + - Negative demo: - ```java - public enum JobStatus implements Serializable { - ... - } - ``` + ```java + public enum JobStatus implements Serializable { + ... + } + ``` -- Positive demo: + - Positive demo: - ```java - public enum JobStatus { - ... - } - ``` + ```java + public enum JobStatus { + ... + } + ``` 3. Use `Enum.name()` instead of `Enum.toString()` -- Negative demo: + - Negative demo: - ```java - System.out.println(JobStatus.RUNNING.toString()); - ``` + ```java + System.out.println(JobStatus.RUNNING.toString()); + ``` -- Positive demo: + - Positive demo: - ```java - System.out.println(JobStatus.RUNNING.name()); - ``` + ```java + System.out.println(JobStatus.RUNNING.name()); + ``` 4. Enumeration class names uniformly use the Enum suffix -- Negative demo: + - Negative demo: - ```java - public enum JobStatus { - ... - } - ``` + ```java + public enum JobStatus { + // ... + } + ``` -- Positive demo: + - Positive demo: - ```java - public enum JobStatusEnum { - ... - } - ``` + ```java + public enum JobStatusEnum { + // ... + } + ``` ### 3.13 `Deprecated` Annotation @@ -518,7 +517,7 @@ Add `What`, `Note`, etc. like mentioned in the `1`. ```java @deprecated public void process(String input) { - ... + // ... } ``` @@ -527,7 +526,7 @@ public void process(String input) { ```java @Deprecated public void process(String input) { - ... + // ... } ``` @@ -535,43 +534,43 @@ public void process(String input) { 1. Use `placeholders` for log output: -- Negative demo + - Negative demo - ```java - log.info("Deploy cluster request " + deployRequest); - ``` + ```java + log.info("Deploy cluster request " + deployRequest); + ``` -- Positive demo + - Positive demo - ```java - log.info("load plugin:{} to {}", file.getName(), appPlugins); - ``` + ```java + log.info("load plugin:{} to {}", file.getName(), appPlugins); + ``` 2. Pay attention to the selection of `log level` when printing logs -When printing the log content, if the actual parameters of the log placeholder are passed, it is necessary to avoid premature evaluation to avoid unnecessary evaluation caused by the log level. + When printing the log content, if the actual parameters of the log placeholder are passed, it is necessary to avoid premature evaluation to avoid unnecessary evaluation caused by the log level. -- Negative demo: + - Negative demo: - Assuming the current log level is `INFO`: + Assuming the current log level is `INFO`: - ```java - // ignored declaration lines. - List userList = getUsersByBatch(1000); - LOG.debug("All users: {}", getAllUserIds(userList)); - ``` + ```java + // ignored declaration lines. + List userList = getUsersByBatch(1000); + LOG.debug("All users: {}", getAllUserIds(userList)); + ``` -- Positive demo: + - Positive demo: - In this case, we should determine the log level in advance before making actual log calls as follows: + In this case, we should determine the log level in advance before making actual log calls as follows: - ```java - // ignored declaration lines. - List userList = getUsersByBatch(1000); - if (LOG.isDebugEnabled()) { - LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); - } - ``` + ```java + // ignored declaration lines. + List userList = getUsersByBatch(1000); + if (LOG.isDebugEnabled()) { + LOG.debug("All ids of users: {}", getAllIDsOfUsers(userList)); + } + ``` ## 5 Testing diff --git a/home/versioned_docs/version-v1.5.x/community/contribution.md b/home/versioned_docs/version-v1.5.x/community/contribution.md index 9a634ffffed..fcbd25ceffa 100644 --- a/home/versioned_docs/version-v1.5.x/community/contribution.md +++ b/home/versioned_docs/version-v1.5.x/community/contribution.md @@ -88,29 +88,29 @@ Of course, if you have a good idea, you can also propose it directly on GitHub D 1. First you need to fork your target [hertzbeat repository](https://github.com/apache/hertzbeat). 2. Then download the code locally with git command: -```shell -git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended -``` + ```shell + git clone git@github.com:${YOUR_USERNAME}/hertzbeat.git #Recommended + ``` 3. After the download is complete, please refer to the getting started guide or README file of the target repository to initialize the project. 4. Then, you can refer to the following command to submit the code: -```shell -git checkout -b a-feature-branch #Recommended -``` + ```shell + git checkout -b a-feature-branch #Recommended + ``` 5. Submit the coed as a commit, the commit message format specification required: [module name or type name]feature or bugfix or doc: custom message. -```shell -git add -git commit -m '[docs]feature: necessary instructions' #Recommended -``` + ```shell + git add + git commit -m '[docs]feature: necessary instructions' #Recommended + ``` 6. Push to the remote repository -```shell -git push origin a-feature-branch -``` + ```shell + git push origin a-feature-branch + ``` 7. Then you can initiate a new PR (Pull Request) on GitHub. diff --git a/home/versioned_docs/version-v1.5.x/help/activemq.md b/home/versioned_docs/version-v1.5.x/help/activemq.md index ef3cc911969..ee014e7ce8c 100644 --- a/home/versioned_docs/version-v1.5.x/help/activemq.md +++ b/home/versioned_docs/version-v1.5.x/help/activemq.md @@ -15,40 +15,40 @@ keywords: [open source monitoring tool, monitoring Apache ActiveMQ metrics] 1. Modify the `conf/activemq.xml` file in the installation directory to enable JMX -> Add `userJmx="true"` attribute in `broker` tag + > Add `userJmx="true"` attribute in `broker` tag -```xml - - - -``` + ```xml + + + + ``` 2. Modify the `bin/env` file in the installation directory, configure the JMX port IP, etc. -The original configuration information will be as follows - -```text -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" -``` - -Update to the following configuration, ⚠️ pay attention to modify `local external IP` - -```text -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" -# ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" - -ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" -``` + The original configuration information will be as follows + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` + + Update to the following configuration, ⚠️ pay attention to modify `local external IP` + + ```text + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password" + # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=11099" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.authenticate=false" + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Djava.rmi.server.hostname=本机对外IP" + + ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote" + ``` 3. Restart the ACTIVEMQ service, and add the corresponding ActiveMQ monitoring in HertzBeat. The parameters use the IP port configured by JMX. diff --git a/home/versioned_docs/version-v1.5.x/help/alert_dingtalk.md b/home/versioned_docs/version-v1.5.x/help/alert_dingtalk.md index 36e332d9b21..57efd130881 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_dingtalk.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_dingtalk.md @@ -11,31 +11,31 @@ keywords: [open source monitoring tool, open source alerter, open source DingDin 1. **【DingDing desktop client】-> 【Group settings】-> 【Intelligent group assistant】-> 【Add new robot-select custom】-> 【Set robot name and avatar】-> 【Note⚠️Set custom keywords: HertzBeat】 ->【Copy its webhook address after adding successfully】** -> Note⚠️ When adding a robot, its custom keywords need to be set in the security setting block: HertzBeat. Other security settings or the IP segment don't need to be filled in. + > Note⚠️ When adding a robot, its custom keywords need to be set in the security setting block: HertzBeat. Other security settings or the IP segment don't need to be filled in. -![email](/img/docs/help/alert-notice-8.png) + ![email](/img/docs/help/alert-notice-8.png) 2. **【Save access_token value of the WebHook address of the robot】** -> eg: webHook address:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` -> Its robot access_token value is `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > eg: webHook address:`https://oapi.dingtalk.com/robot/send?access_token=43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` + > Its robot access_token value is `43aac28a236e001285ed84e473f8eabee70f63c7a70287acb0e0f8b65fade64f` 3. **【Alarm notification】->【Add new recipient】 ->【Select DingDing robot notification method】->【Set DingDing robot ACCESS_TOKEN】-> 【Confirm】** -![email](/img/docs/help/alert-notice-9.png) + ![email](/img/docs/help/alert-notice-9.png) 4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### DingDing robot common issues 1. DingDing group did not receive the robot alarm notification. -> Please check whether there is any triggered alarm information in the alarm center. -> Please check whether DingDing robot is configured with security custom keywords :HertzBeat. -> Please check whether the robot ACCESS_TOKEN is configured correctly and whether the alarm strategy association is configured. + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether DingDing robot is configured with security custom keywords :HertzBeat. + > Please check whether the robot ACCESS_TOKEN is configured correctly and whether the alarm strategy association is configured. Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/alert_discord.md b/home/versioned_docs/version-v1.5.x/help/alert_discord.md index 68296148f22..7d38b18b1dd 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_discord.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_discord.md @@ -13,56 +13,56 @@ keywords: [open source monitoring tool, open source alerter, open source Discord 1. Visit [https://discord.com/developers/applications](https://discord.com/developers/applications) to create an application -![bot](/img/docs/help/discord-bot-1.png) + ![bot](/img/docs/help/discord-bot-1.png) 2. Create a robot under the application and get the robot Token -![bot](/img/docs/help/discord-bot-2.png) + ![bot](/img/docs/help/discord-bot-2.png) -![bot](/img/docs/help/discord-bot-3.png) + ![bot](/img/docs/help/discord-bot-3.png) 3. Authorize the bot to the chat server -> Authorize the robot under the OAuth2 menu, select `bot` for `SCOPES`, `BOT PERMISSIONS` select `Send Messages` + > Authorize the robot under the OAuth2 menu, select `bot` for `SCOPES`, `BOT PERMISSIONS` select `Send Messages` -![bot](/img/docs/help/discord-bot-4.png) + ![bot](/img/docs/help/discord-bot-4.png) -> Obtain the URL generated at the bottom, and the browser accesses this URL to officially authorize the robot, that is, to set which chat server the robot will join. + > Obtain the URL generated at the bottom, and the browser accesses this URL to officially authorize the robot, that is, to set which chat server the robot will join. 4. Check if your chat server has joined robot members -![bot](/img/docs/help/discord-bot-5.png) + ![bot](/img/docs/help/discord-bot-5.png) ### Enable developer mode and get Channel ID 1. Personal Settings -> Advanced Settings -> Enable Developer Mode -![bot](/img/docs/help/discord-bot-6.png) + ![bot](/img/docs/help/discord-bot-6.png) 2. Get channel Channel ID -> Right-click the chat channel you want to send the robot message to, click the COPY ID button to get the Channel ID + > Right-click the chat channel you want to send the robot message to, click the COPY ID button to get the Channel ID -![bot](/img/docs/help/discord-bot-7.png) + ![bot](/img/docs/help/discord-bot-7.png) ### Add an alarm notification person in HertzBeat, the notification method is Discord Bot 1. **[Alarm notification] -> [Add recipient] -> [Select Discord robot notification method] -> [Set robot Token and ChannelId] -> [OK]** -![email](/img/docs/help/discord-bot-8.png) + ![email](/img/docs/help/discord-bot-8.png) -4. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** +2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** -> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Discord Bot Notification FAQ 1. Discord doesn't receive bot alert notifications -> Please check whether the alarm information has been triggered in the alarm center -> Please check whether the robot Token and ChannelId are configured correctly, and whether the alarm policy association has been configured -> Please check whether the bot is properly authorized by the Discord chat server + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the robot Token and ChannelId are configured correctly, and whether the alarm policy association has been configured + > Please check whether the bot is properly authorized by the Discord chat server Other questions can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/alert_email.md b/home/versioned_docs/version-v1.5.x/help/alert_email.md index c507a970bae..10f15a6bfb9 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_email.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_email.md @@ -11,29 +11,29 @@ keywords: [open source monitoring tool, open source alerter, open source email n 1. **【Alarm notification】->【Add new recipient】 ->【Select email notification method】** -![email](/img/docs/help/alert-notice-1.png) + ![email](/img/docs/help/alert-notice-1.png) 2. **【Get verification code】-> 【Enter email verification code】-> 【Confirm】** ![email](/img/docs/help/alert-notice-2.png) -![email](/img/docs/help/alert-notice-3.png) + ![email](/img/docs/help/alert-notice-3.png) 3. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### Email notification common issues 1. Hertzbeat deployed on its own intranet cannot receive email notifications -> Hertzbeat needs to configure its own mail server, not tancloud. Please confirm whether you have configured its own mail server in application.yml + > Hertzbeat needs to configure its own mail server, not tancloud. Please confirm whether you have configured its own mail server in application.yml 2. Cloud environment tancloud cannot receive email notification -> Please check whether there is any triggered alarm information in the alarm center. -> Please check whether the mailbox is configured correctly and whether the alarm strategy association is configured. -> Please check whether the warning email is blocked in the trash can of the mailbox. + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the mailbox is configured correctly and whether the alarm strategy association is configured. + > Please check whether the warning email is blocked in the trash can of the mailbox. Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/alert_enterprise_wechat_app.md b/home/versioned_docs/version-v1.5.x/help/alert_enterprise_wechat_app.md index 1d5d41a15bc..352981b7d85 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_enterprise_wechat_app.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_enterprise_wechat_app.md @@ -11,24 +11,24 @@ keywords: [open source monitoring tool, open source alerter, open source Enterpr 1. **【Enterprise Wechat backstage】-> 【App Management】-> 【Create an app】-> 【Set App message】->【Copy AgentId and Secret adding successfully】** -![email](/img/docs/help/alert-wechat-1.jpg) + ![email](/img/docs/help/alert-wechat-1.jpg) 2. **【Alarm notification】->【Add new recipient】 ->【Select Enterprise WeChat App notification method】->【Set Enterprise WeChat ID,Enterprise App ID and Enterprise App Secret 】-> 【Confirm】** -![email](/img/docs/help/alert-wechat-2.jpg) + ![email](/img/docs/help/alert-wechat-2.jpg) 3. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-wechat-3.jpg) + ![email](/img/docs/help/alert-wechat-3.jpg) ### Enterprise WeChat App common issues 1. Enterprise WeChat App did not receive the alarm notification. -> Please check if the user has application permissions. -> Please check if the enterprise application callback address settings are normal. -> Please check if the server IP is on the enterprise application whitelist. + > Please check if the user has application permissions. + > Please check if the enterprise application callback address settings are normal. + > Please check if the server IP is on the enterprise application whitelist. Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/alert_feishu.md b/home/versioned_docs/version-v1.5.x/help/alert_feishu.md index 38f7c72cf03..da5a2674133 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_feishu.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_feishu.md @@ -13,22 +13,22 @@ keywords: [open source monitoring tool, open source alerter, open source feishu 2. **【Save the key value of the WebHook address of the robot】** -> eg: webHook address:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` -> Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > eg: webHook address:`https://open.feishu.cn/open-apis/bot/v2/hook/3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` 3. **【Alarm notification】->【Add new recipient】 ->【Select FeiShu robot notification method】->【Set FeiShu robot KEY】-> 【Confirm】** 4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### FeiShu robot notification common issues 1. FeiShu group did not receive the robot alarm notification. -> Please check whether there is any triggered alarm information in the alarm center. -> Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/alert_slack.md b/home/versioned_docs/version-v1.5.x/help/alert_slack.md index 26bde4ed2e5..7b5c395c729 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_slack.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_slack.md @@ -17,19 +17,19 @@ Refer to the official website document [Sending messages using Incoming Webhooks 1. **【Alarm Notification】->【Add Recipient】->【Select Slack Webhook Notification Method】->【Set Webhook URL】-> 【OK】** -![email](/img/docs/help/slack-bot-1.png) + ![email](/img/docs/help/slack-bot-1.png) 2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** -> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Slack Notification FAQ 1. Slack did not receive the robot warning notification -> Please check whether the alarm information has been triggered in the alarm center -> Please check whether the slack webhook url are configured correctly, and whether the alarm policy association has been configured + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the slack webhook url are configured correctly, and whether the alarm policy association has been configured Other questions can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/alert_smn.md b/home/versioned_docs/version-v1.5.x/help/alert_smn.md index 53774315561..6d049dfbe39 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_smn.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_smn.md @@ -11,33 +11,33 @@ keywords: [ open source monitoring tool, open source alerter, open source Huawei 1. **According to [Huawei Cloud SMN Official Document](https://support.huaweicloud.com/qs-smn/smn_json.html) activate the SMN service and configure SMN** -![alert-notice-10](/img/docs/help/alert-notice-10.png) + ![alert-notice-10](/img/docs/help/alert-notice-10.png) 2. **Save topic URN for SMN** -![alert-notice-11](/img/docs/help/alert-notice-11.png) + ![alert-notice-11](/img/docs/help/alert-notice-11.png) 3. **According to [Huawei Cloud Signature Document](https://support.huaweicloud.com/devg-apisign/api-sign-provide.html) obtain AK, SK, and project ID** -![alert-notice-12](/img/docs/help/alert-notice-12.png) + ![alert-notice-12](/img/docs/help/alert-notice-12.png) -![alert-notice-13](/img/docs/help/alert-notice-13.png) + ![alert-notice-13](/img/docs/help/alert-notice-13.png) 4. **【Alarm Notification】->【Add Recipient】->【Select Slack Webhook Notification Method】->【Set Huawei Cloud SMN AK, SK and other configurations】-> 【OK】** -![alert-notice-14](/img/docs/help/alert-notice-14.png) + ![alert-notice-14](/img/docs/help/alert-notice-14.png) 5. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** -> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### Huawei Cloud SMN Notification FAQ 1. Huawei Cloud SMN did not receive the robot warning notification -> Please check whether the alarm information has been triggered in the alarm center -> Please check whether the Huawei Cloud SMN AK, SK and other configurations are configured correctly, and whether the alarm policy association has been configured + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the Huawei Cloud SMN AK, SK and other configurations are configured correctly, and whether the alarm policy association has been configured Other questions can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/alert_telegram.md b/home/versioned_docs/version-v1.5.x/help/alert_telegram.md index 1689788f0f4..9cf2c84bdc2 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_telegram.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_telegram.md @@ -13,32 +13,32 @@ keywords: [open source monitoring tool, open source alerter, open source Telegra 1. Use [@BotFather](https://t.me/BotFather) to create your own bot and get an access token `Token` -![telegram-bot](/img/docs/help/telegram-bot-1.png) + ![telegram-bot](/img/docs/help/telegram-bot-1.png) 2. Get the `User ID` of the recipient -**Use the recipient account you want to notify to send a message to the newly created Bot account**, -Visit ```https://api.telegram.org/bot/getUpdates```, **`use the Bot Token from the previous step to replace the `**, and respond to the first in the `Json` data A `result.message.from.id` value is the recipient's `User ID` - -```json -{ - "ok": true, - "result": [ - { - "update_id": 632299191, - "message": { - "from":{ - "id": "User ID" - }, - "chat":{ - }, - "date": 1673858065, - "text": "111" + **Use the recipient account you want to notify to send a message to the newly created Bot account**, + Visit ```https://api.telegram.org/bot/getUpdates```, **`use the Bot Token from the previous step to replace the `**, and respond to the first in the `Json` data A `result.message.from.id` value is the recipient's `User ID` + + ```json + { + "ok": true, + "result": [ + { + "update_id": 632299191, + "message": { + "from":{ + "id": "User ID" + }, + "chat":{ + }, + "date": 1673858065, + "text": "111" + } } - } - ] -} -``` + ] + } + ``` 3. Record and save the `Token` and `User Id` we got @@ -46,20 +46,20 @@ Visit ```https://api.telegram.org/bot/getUpdates```, **`use the Bot Token 1. **【Alarm Notification】->【Add Recipient】->【Select Telegram Robot Notification Method】->【Set Robot Token and UserId】-> 【OK】** -![email](/img/docs/help/telegram-bot-2.png) + ![email](/img/docs/help/telegram-bot-2.png) -4. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** +2. **Configure the associated alarm notification strategy⚠️ [Add notification strategy] -> [Associate the recipient just set] -> [OK]** -> **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. + > **Note ⚠️ Adding a new recipient does not mean that it has taken effect and can receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, specify which messages are sent to which recipients**. -![email](/img/docs/help/alert-notice-policy.png) + ![email](/img/docs/help/alert-notice-policy.png) ### Telegram Bot Notification FAQ 1. Telegram did not receive the robot warning notification -> Please check whether the alarm information has been triggered in the alarm center -> Please check whether the robot Token and UserId are configured correctly, and whether the alarm policy association has been configured -> UserId should be the UserId of the recipient of the message + > Please check whether the alarm information has been triggered in the alarm center + > Please check whether the robot Token and UserId are configured correctly, and whether the alarm policy association has been configured + > UserId should be the UserId of the recipient of the message Other questions can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/alert_webhook.md b/home/versioned_docs/version-v1.5.x/help/alert_webhook.md index d1741d71481..7768dcf29d4 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_webhook.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_webhook.md @@ -11,13 +11,13 @@ keywords: [open source monitoring tool, open source alerter, open source webhook 1. **【Alarm notification】->【Add new recipient】 ->【Select WebHook notification method】-> 【Set WebHook callback address】 -> 【Confirm】** -![email](/img/docs/help/alert-notice-5.png) + ![email](/img/docs/help/alert-notice-5.png) 2. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### WebHook callback POST body BODY content @@ -60,7 +60,7 @@ Content format:JSON 1. WebHook callback did not take effect -> Please check whether there is any triggered alarm information in the alarm center. -> Please check whether the configured webhook callback address is correct. + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the configured webhook callback address is correct. Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/alert_wework.md b/home/versioned_docs/version-v1.5.x/help/alert_wework.md index ce344200301..1e72ad5d401 100644 --- a/home/versioned_docs/version-v1.5.x/help/alert_wework.md +++ b/home/versioned_docs/version-v1.5.x/help/alert_wework.md @@ -11,28 +11,28 @@ keywords: [open source monitoring tool, open source alerter, open source WeWork 1. **【Enterprise Wechat】-> 【Group settings】-> 【Group robot】-> 【Add new robot】-> 【Set robot name and avatar】-> 【Copy its webhook address after adding successfully】** -![email](/img/docs/help/alert-notice-6.jpg) + ![email](/img/docs/help/alert-notice-6.jpg) 2. **【Save the key value of the WebHook address of the robot】** -> eg: webHook address:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` -> Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > eg: webHook address:`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` + > Its robot KEY value is `3adafc96-23d0-4cd5-8feb-17f6e0b5fcs4` 3. **【Alarm notification】->【Add new recipient】 ->【Select enterprise Wechat robot notification method】->【Set enterprise Wechat robot KEY】-> 【Confirm】** -![email](/img/docs/help/alert-notice-7.png) + ![email](/img/docs/help/alert-notice-7.png) 4. **Configure the associated alarm notification strategy⚠️ 【Add new notification strategy】-> 【Associate the recipient just set】-> 【Confirm】** -> **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** + > **Note⚠️ Adding a new recipient does not mean that it is effective to receive alarm information. It is also necessary to configure the associated alarm notification strategy, that is, to specify which messages are sent to which recipients.** -![email](/img/docs/help/alert-notice-4.png) + ![email](/img/docs/help/alert-notice-4.png) ### Enterprise Wechat robot common issues 1. The enterprise wechat group did not receive the robot alarm notification. -> Please check whether there is any triggered alarm information in the alarm center. -> Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. + > Please check whether there is any triggered alarm information in the alarm center. + > Please check whether the robot key is configured correctly and whether the alarm strategy association is configured. Other issues can be fed back through the communication group ISSUE! diff --git a/home/versioned_docs/version-v1.5.x/help/dynamic_tp.md b/home/versioned_docs/version-v1.5.x/help/dynamic_tp.md index 332767b2a39..72e6389fdde 100644 --- a/home/versioned_docs/version-v1.5.x/help/dynamic_tp.md +++ b/home/versioned_docs/version-v1.5.x/help/dynamic_tp.md @@ -11,53 +11,53 @@ keywords: [open source monitoring tool, open source dynamicTp monitoring tool, m 1. Integration Using `DynamicTp` -`DynamicTp` is a lightweight dynamic thread pool based on the configuration center of the Jvm language. It has built-in monitoring and alarm functions, which can be realized through SPI custom extensions. + `DynamicTp` is a lightweight dynamic thread pool based on the configuration center of the Jvm language. It has built-in monitoring and alarm functions, which can be realized through SPI custom extensions. -For integrated use, please refer to the document [Quick Start](https://dynamictp.cn/guide/use/quick-start.html) + For integrated use, please refer to the document [Quick Start](https://dynamictp.cn/guide/use/quick-start.html) 2. Open SpringBoot Actuator Endpoint to expose `DynamicTp` Metric interface -```yaml -management: - endpoints: - web: - exposure: - include: '*' -``` + ```yaml + management: + endpoints: + web: + exposure: + include: '*' + ``` -Test whether the access Metric interface `ip:port/actuator/dynamic-tp` has response json data as follows: + Test whether the access Metric interface `ip:port/actuator/dynamic-tp` has response json data as follows: -```json -[ - { - "poolName": "commonExecutor", - "corePoolSize": 1, - "maximumPoolSize": 1, - "queueType": "LinkedBlockingQueue", - "queueCapacity": 2147483647, - "queueSize": 0, - "fair": false, - "queueRemainingCapacity": 2147483647, - "activeCount": 0, - "taskCount": 0, - "completedTaskCount": 0, - "largestPoolSize": 0, - "poolSize": 0, - "waitTaskCount": 0, - "rejectCount": 0, - "rejectHandlerName": null, - "dynamic": false, - "runTimeoutCount": 0, - "queueTimeoutCount": 0 - }, - { - "maxMemory": "4GB", - "totalMemory": "444MB", - "freeMemory": "250.34 MB", - "usableMemory": "3.81GB" - } -] -``` + ```json + [ + { + "poolName": "commonExecutor", + "corePoolSize": 1, + "maximumPoolSize": 1, + "queueType": "LinkedBlockingQueue", + "queueCapacity": 2147483647, + "queueSize": 0, + "fair": false, + "queueRemainingCapacity": 2147483647, + "activeCount": 0, + "taskCount": 0, + "completedTaskCount": 0, + "largestPoolSize": 0, + "poolSize": 0, + "waitTaskCount": 0, + "rejectCount": 0, + "rejectHandlerName": null, + "dynamic": false, + "runTimeoutCount": 0, + "queueTimeoutCount": 0 + }, + { + "maxMemory": "4GB", + "totalMemory": "444MB", + "freeMemory": "250.34 MB", + "usableMemory": "3.81GB" + } + ] + ``` 3. Add DynamicTp monitoring under HertzBeat middleware monitoring diff --git a/home/versioned_docs/version-v1.5.x/help/iotdb.md b/home/versioned_docs/version-v1.5.x/help/iotdb.md index 011b9cbec12..5399caa3c41 100644 --- a/home/versioned_docs/version-v1.5.x/help/iotdb.md +++ b/home/versioned_docs/version-v1.5.x/help/iotdb.md @@ -17,29 +17,29 @@ The main steps are as follows: 1. The metric collection is disabled by default, you need to modify the parameters in `conf/iotdb-metric.yml` first, then restart the server -``` -# Whether to start the monitoring module, the default is false -enableMetric: true - -# Whether to enable operation delay statistics -enablePerformanceStat: false - -# Data provision method, externally provide metrics data through jmx and prometheus protocol, optional parameters: [JMX, PROMETHEUS, IOTDB], IOTDB is closed by default. -metricReporterList: - - JMX - - PROMETHEUS - -# The metric architecture used at the bottom layer, optional parameters: [MICROMETER, DROPWIZARD] -monitorType: MICROMETER - -# Initialize the level of the metric, optional parameters: [CORE, IMPORTANT, NORMAL, ALL] -metricLevel: IMPORTANT - -# Predefined metrics set, optional parameters: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] -predefinedMetrics: - - JVM - - FILE -``` + ```yaml + # Whether to start the monitoring module, the default is false + enableMetric: true + + # Whether to enable operation delay statistics + enablePerformanceStat: false + + # Data provision method, externally provide metrics data through jmx and prometheus protocol, optional parameters: [JMX, PROMETHEUS, IOTDB], IOTDB is closed by default. + metricReporterList: + - JMX + - PROMETHEUS + + # The metric architecture used at the bottom layer, optional parameters: [MICROMETER, DROPWIZARD] + monitorType: MICROMETER + + # Initialize the level of the metric, optional parameters: [CORE, IMPORTANT, NORMAL, ALL] + metricLevel: IMPORTANT + + # Predefined metrics set, optional parameters: [JVM, LOGBACK, FILE, PROCESS, SYSTEM] + predefinedMetrics: + - JVM + - FILE + ``` 2. Restart IoTDB, open a browser or use curl to access http://servier_ip:9091/metrics, and you can see the metric data. diff --git a/home/versioned_docs/version-v1.5.x/help/issue.md b/home/versioned_docs/version-v1.5.x/help/issue.md index 9904fab6551..0bb4f069f3a 100644 --- a/home/versioned_docs/version-v1.5.x/help/issue.md +++ b/home/versioned_docs/version-v1.5.x/help/issue.md @@ -8,50 +8,49 @@ sidebar_label: Common issues 1. **Page feedback:monitor.host: Monitoring Host must be ipv4, ipv6 or domain name** -> As shown in the information, the entered monitoring Host must be ipv4, ipv6 or domain name, and cannot carry a protocol header, such as http + > As shown in the information, the entered monitoring Host must be ipv4, ipv6 or domain name, and cannot carry a protocol header, such as http 2. **The website API and other monitoring feedback statusCode:403 or 401, but the opposite end service itself does not need authentication, and the direct access of the browser is OK** -> Please check whether it is blocked by the firewall. For example, BaoTa/aaPanel have set the blocking of `User-Agent=Apache-HttpClient` in the request header by default. If it is blocked, please delete this blocking rule. (user-agent has been simulated as a browser in the v1.0.beat5 version. This problem does not exist) + > Please check whether it is blocked by the firewall. For example, BaoTa/aaPanel have set the blocking of `User-Agent=Apache-HttpClient` in the request header by default. If it is blocked, please delete this blocking rule. (user-agent has been simulated as a browser in the v1.0.beat5 version. This problem does not exist) 3. Ping connectivity monitoring exception when installing hertzbeat for package deployment. The hertzbeat installed and deployed by the installation package is not available for ping connectivity monitoring, but local direct ping is available 。 -> The deployment of the installation package requires configuring the root permission of the Java virtual machine to start hertzbeat to use ICMP. If the root permission is not enabled, judge whether port 7 of telnet opposite end is opened. -> When you install HertzBeat via DockerDocker root is enabled by default. No such problem. -> See + > The deployment of the installation package requires configuring the root permission of the Java virtual machine to start hertzbeat to use ICMP. If the root permission is not enabled, judge whether port 7 of telnet opposite end is opened. + > When you install HertzBeat via DockerDocker root is enabled by default. No such problem. + > See ### Docker Deployment common issues 1. **MYSQL, TDENGINE and HertzBeat are deployed on the same host by Docker,HertzBeat use localhost or 127.0.0.1 connect to the database but fail** The problems lies in Docker container failed to visit and connect localhost port. Because the docker default network mode is Bridge mode which can't access local machine through localhost. -> Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. -> Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + > Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. + > Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` 2. **According to the process deploy,visit no interface** Please refer to the following points to troubleshoot issues: -> one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. -> two:Check whether dependent service, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. -> ->> three:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. + > one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. + > two:Check whether dependent service, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. + > three:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. 3. **Log an error TDengine connection or insert SQL failed** -> one:Check whether database account and password configured is correct, the database is created. -> two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. + > one:Check whether database account and password configured is correct, the database is created. + > two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. ### Package Deployment common issues 1. **According to the process deploy,visit no interface** Please refer to the following points to troubleshoot issues: -> one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. -> two:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. -> three: Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. + > one:Whether the MySQL database and tdengine database as dependent services have been successfully started, whether the corresponding hertzbeat database has been created, and whether the SQL script has been executed. + > two:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. + > three: Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. 2. **Log an error TDengine connection or insert SQL failed** -> one:Check whether database account and password configured is correct, the database is created. -> two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. + > one:Check whether database account and password configured is correct, the database is created. + > two:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. diff --git a/home/versioned_docs/version-v1.5.x/help/jetty.md b/home/versioned_docs/version-v1.5.x/help/jetty.md index ccec65b5559..2a3f69c13e4 100644 --- a/home/versioned_docs/version-v1.5.x/help/jetty.md +++ b/home/versioned_docs/version-v1.5.x/help/jetty.md @@ -19,33 +19,33 @@ keywords: [open source monitoring tool, open source jetty web server monitoring 1. Start the JMX JMX-REMOTE module in Jetty -```shell -java -jar $JETTY_HOME/start.jar --add-module=jmx -java -jar $JETTY_HOME/start.jar --add-module=jmx-remote -``` + ```shell + java -jar $JETTY_HOME/start.jar --add-module=jmx + java -jar $JETTY_HOME/start.jar --add-module=jmx-remote + ``` -Successful command execution will create `${JETTY_BASE}/start.d/jmx-remote.ini` configuration file + Successful command execution will create `${JETTY_BASE}/start.d/jmx-remote.ini` configuration file 2. Edit the `${JETTY_BASE}/start.d/jmx-remote.ini` configuration file to modify the JMX IP port and other parameters. -**`localhost` needs to be modified to expose the IP** - -```text -## The host/address to bind the RMI server to. -# jetty.jmxremote.rmiserverhost=localhost - -## The port the RMI server listens to (0 means a random port is chosen). -# jetty.jmxremote.rmiserverport=1099 - -## The host/address to bind the RMI registry to. -# jetty.jmxremote.rmiregistryhost=localhost - -## The port the RMI registry listens to. -# jetty.jmxremote.rmiregistryport=1099 - -## The host name exported in the RMI stub. --Djava.rmi.server.hostname=localhost -``` + **`localhost` needs to be modified to expose the IP** + + ```text + ## The host/address to bind the RMI server to. + # jetty.jmxremote.rmiserverhost=localhost + + ## The port the RMI server listens to (0 means a random port is chosen). + # jetty.jmxremote.rmiserverport=1099 + + ## The host/address to bind the RMI registry to. + # jetty.jmxremote.rmiregistryhost=localhost + + ## The port the RMI registry listens to. + # jetty.jmxremote.rmiregistryport=1099 + + ## The host name exported in the RMI stub. + -Djava.rmi.server.hostname=localhost + ``` 3. Restart Jetty Server. diff --git a/home/versioned_docs/version-v1.5.x/help/kubernetes.md b/home/versioned_docs/version-v1.5.x/help/kubernetes.md index d7e6b657ea6..836c84f3818 100644 --- a/home/versioned_docs/version-v1.5.x/help/kubernetes.md +++ b/home/versioned_docs/version-v1.5.x/help/kubernetes.md @@ -17,15 +17,15 @@ Refer to the steps to obtain token 1. Create a service account and bind the default cluster-admin administrator cluster role -```kubectl create serviceaccount dashboard-admin -n kube-system``` + ```kubectl create serviceaccount dashboard-admin -n kube-system``` 2. User Authorization -```shell -kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin -kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' -kubectl describe secret {secret} -n kube-system -``` + ```shell + kubectl create clusterrolebinding dashboard-admin --clusterrole=cluster-admin --serviceaccount=kube-system:dashboard-admin + kubectl -n kube-system get secret | grep dashboard-admin | awk '{print $1}' + kubectl describe secret {secret} -n kube-system + ``` ### method two diff --git a/home/versioned_docs/version-v1.5.x/help/nacos.md b/home/versioned_docs/version-v1.5.x/help/nacos.md index f7c8815521f..eb4cb0b5e25 100644 --- a/home/versioned_docs/version-v1.5.x/help/nacos.md +++ b/home/versioned_docs/version-v1.5.x/help/nacos.md @@ -14,9 +14,9 @@ keywords: [open source monitoring tool, open source middleware monitoring tool, 1. Deploy the Nacos cluster according to [deployment document](https://nacos.io/en-us/docs/deployment.html). 2. Configure the application. properties file to expose metrics data. -``` -management.endpoints.web.exposure.include=* -``` + ```properties + management.endpoints.web.exposure.include=* + ``` 3. Access ```{ip}:8848/nacos/actuator/prometheus``` to see if metrics data can be accessed. diff --git a/home/versioned_docs/version-v1.5.x/help/nginx.md b/home/versioned_docs/version-v1.5.x/help/nginx.md index a5662be985f..2c9f12f4900 100644 --- a/home/versioned_docs/version-v1.5.x/help/nginx.md +++ b/home/versioned_docs/version-v1.5.x/help/nginx.md @@ -17,101 +17,103 @@ If you want to monitor information in 'Nginx' with this monitoring type, you nee 1. Check if `ngx_http_stub_status_module` has been added -```shell -nginx -V -``` + ```shell + nginx -V + ``` -View whether it contains `--with-http_stub_status_module`, if not, you need to recompile and install Nginx. + View whether it contains `--with-http_stub_status_module`, if not, you need to recompile and install Nginx. 2. Compile and install Nginx, add `ngx_http_stub_status_module` module -Download Nginx and unzip it, execute the following command in the directory + Download Nginx and unzip it, execute the following command in the directory -```shell - -./configure --prefix=/usr/local/nginx --with-http_stub_status_module - -make && make install -``` + ```shell + + ./configure --prefix=/usr/local/nginx --with-http_stub_status_module + + make && make install + ``` 3. Modify Nginx configure file -Modify the `nginx.conf` file and add the monitoring module exposed endpoint, as follows: + Modify the `nginx.conf` file and add the monitoring module exposed endpoint, as follows: -```shell -# modify nginx.conf -server { - listen 80; # port - server_name localhost; - location /nginx-status { - stub_status on; - access_log on; - #allow 127.0.0.1; #only allow requests from localhost - #deny all; #deny all other hosts - } -} -``` + ```shell + # modify nginx.conf + server { + listen 80; # port + server_name localhost; + location /nginx-status { + stub_status on; + access_log on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } + } + ``` 4. Reload Nginx -```shell - -nginx -s reload -``` + ```shell + + nginx -s reload + ``` 5. Access `http://localhost/nginx-status` in the browser to view the Nginx monitoring status information. ### Enable `ngx_http_reqstat_module` -```shell -# install `ngx_http_reqstat_module` -wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip - -unzip ngx_req_status.zip - -patch -p1 < ../ngx_req_status-master/write_filter.patch - -./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master - -make -j2 - -make install -``` +1. install `ngx_http_reqstat_module` + + ```shell + # install `ngx_http_reqstat_module` + wget https://github.com/zls0424/ngx_req_status/archive/master.zip -O ngx_req_status.zip + + unzip ngx_req_status.zip + + patch -p1 < ../ngx_req_status-master/write_filter.patch + + ./configure --prefix=/usr/local/nginx --add-module=/path/to/ngx_req_status-master + + make -j2 + + make install + ``` 2. Modify Nginx configure file -update `nginx.conf` file, add status module exposed endpoint, as follows: - -```shell -# modify nginx.conf -http { - req_status_zone server_name $server_name 256k; - req_status_zone server_addr $server_addr 256k; - - req_status server_name server_addr; - - server { - location /req-status { - req_status_show on; - #allow 127.0.0.1; #only allow requests from localhost - #deny all; #deny all other hosts + update `nginx.conf` file, add status module exposed endpoint, as follows: + + ```shell + # modify nginx.conf + http { + req_status_zone server_name $server_name 256k; + req_status_zone server_addr $server_addr 256k; + + req_status server_name server_addr; + + server { + location /req-status { + req_status_show on; + #allow 127.0.0.1; #only allow requests from localhost + #deny all; #deny all other hosts + } } } -} -``` + ``` 3. Reload Nginx -```shell - -nginx -s reload -``` + ```shell + + nginx -s reload + ``` 4. Access `http://localhost/req-status` in the browser to view the Nginx monitoring status information. -**Refer Doc: ** + **Refer Doc: ** -**⚠️Attention: The endpoint path of the monitoring module is `/nginx-status` `/req-status`** + **⚠️Attention: The endpoint path of the monitoring module is `/nginx-status` `/req-status`** ### Configuration parameter diff --git a/home/versioned_docs/version-v1.5.x/help/rabbitmq.md b/home/versioned_docs/version-v1.5.x/help/rabbitmq.md index e49d572ee72..91fad16ff1e 100644 --- a/home/versioned_docs/version-v1.5.x/help/rabbitmq.md +++ b/home/versioned_docs/version-v1.5.x/help/rabbitmq.md @@ -14,9 +14,9 @@ keywords: [open source monitoring tool, open source rabbitmq monitoring tool, mo 1. Open the Management plugin, or use the self-opening version -```shell -rabbitmq-plugins enable rabbitmq_management -``` + ```shell + rabbitmq-plugins enable rabbitmq_management + ``` 2. Access with a browser, and the default account password is `guest/guest`. Successful login means that it is successfully opened. diff --git a/home/versioned_docs/version-v1.5.x/help/shenyu.md b/home/versioned_docs/version-v1.5.x/help/shenyu.md index aa4a43a8d5c..7bc5f61bdc0 100644 --- a/home/versioned_docs/version-v1.5.x/help/shenyu.md +++ b/home/versioned_docs/version-v1.5.x/help/shenyu.md @@ -17,27 +17,27 @@ Two Steps Mainly: 1. add metrics plugin dependency in gateway's pom.xml. -```xml - - org.apache.shenyu - shenyu-spring-boot-starter-plugin-metrics - ${project.version} - -``` + ```xml + + org.apache.shenyu + shenyu-spring-boot-starter-plugin-metrics + ${project.version} + + ``` 2. modify this config in shenyu gateway yaml. -```yaml -shenyu: - metrics: - enabled: false #false is close, true is open - name : prometheus - host: 127.0.0.1 - port: 8090 - jmxConfig: - props: - jvm_enabled: true #enable jvm monitoring -``` + ```yaml + shenyu: + metrics: + enabled: false #false is close, true is open + name : prometheus + host: 127.0.0.1 + port: 8090 + jmxConfig: + props: + jvm_enabled: true #enable jvm monitoring + ``` Finally, restart the access gateway metrics endpoint `http://ip:8090` to respond to prometheus format data. diff --git a/home/versioned_docs/version-v1.5.x/start/custom-config.md b/home/versioned_docs/version-v1.5.x/start/custom-config.md index 7f45b5dd27d..b88a2ff4af4 100644 --- a/home/versioned_docs/version-v1.5.x/start/custom-config.md +++ b/home/versioned_docs/version-v1.5.x/start/custom-config.md @@ -16,44 +16,44 @@ The installation package can be decompressed and modified in `hertzbeat/config/a 1. Configure the SMS sending server -> Only when your own SMS server is successfully configured, the alarm SMS triggered in the monitoring tool will be sent normally. + > Only when your own SMS server is successfully configured, the alarm SMS triggered in the monitoring tool will be sent normally. -Add the following Tencent platform SMS server configuration in `application.yml` (parameters need to be replaced with your SMS server configuration) + Add the following Tencent platform SMS server configuration in `application.yml` (parameters need to be replaced with your SMS server configuration) -```yaml -common: - sms: - tencent: - secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY - secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA - app-id: 1435441637 - sign-name: XX Technology - template-id: 1343434 -``` + ```yaml + common: + sms: + tencent: + secret-id: AKIDbQ4VhdMr89wDedFrIcgU2PaaMvOuBCzY + secret-key: PaXGl0ziY9UcWFjUyiFlCPMr77rLkJYlyA + app-id: 1435441637 + sign-name: XX Technology + template-id: 1343434 + ``` 2. Configure alarm custom parameters -```yaml -alerter: - # Custom console address - console-url: https://console.tancloud.io -``` + ```yaml + alerter: + # Custom console address + console-url: https://console.tancloud.io + ``` 3. Use external redis instead of memory to store real-time metric data -> By default, the real-time data of our metrics is stored in memory, which can be configured as follows to use redis instead of memory storage. - -Note ⚠️ `memory.enabled: false, redis.enabled: true` - -```yaml -warehouse: - store: - memory: - enabled: false - init-size: 1024 - redis: - enabled: true - host: 127.0.0.1 - port: 6379 - password: 123456 -``` + > By default, the real-time data of our metrics is stored in memory, which can be configured as follows to use redis instead of memory storage. + + Note ⚠️ `memory.enabled: false, redis.enabled: true` + + ```yaml + warehouse: + store: + memory: + enabled: false + init-size: 1024 + redis: + enabled: true + host: 127.0.0.1 + port: 6379 + password: 123456 + ``` diff --git a/home/versioned_docs/version-v1.5.x/start/docker-deploy.md b/home/versioned_docs/version-v1.5.x/start/docker-deploy.md index ce7b784bfe0..255216c9aff 100644 --- a/home/versioned_docs/version-v1.5.x/start/docker-deploy.md +++ b/home/versioned_docs/version-v1.5.x/start/docker-deploy.md @@ -47,29 +47,29 @@ sidebar_label: Install via Docker For detail steps, please refer to [Configure Account Password](account-modify) 5. Start the HertzBeat Docker container -```shell -$ docker run -d -p 1157:1157 -p 1158:1158 \ - -e LANG=en_US.UTF-8 \ - -e TZ=Asia/Shanghai \ - -v $(pwd)/data:/opt/hertzbeat/data \ - -v $(pwd)/logs:/opt/hertzbeat/logs \ - -v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml \ - -v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml \ - --name hertzbeat apache/hertzbeat -``` - -This command starts a running HertzBeat Docker container with mapping port 1157-1158. If existing processes on the host use the port, please modify host mapped port. - -- `docker run -d` : Run a container in the background via Docker -- `-p 1157:1157 -p 1158:1158` : Mapping container ports to the host, 1157 is web-ui port, 1158 is cluster port. -- `-e LANG=en_US.UTF-8` : Set the system language -- `-e TZ=Asia/Shanghai` : Set the system timezone -- `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important⚠️ Mount the H2 database file to the local host, to ensure that the data is not lost due creating or deleting container. -- `-v $(pwd)/logs:/opt/hertzbeat/logs` : (optional, if you don't have a need, just delete it) Mount the log file to the local host, to ensure the log will not be lost due creating or deleting container. -- `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (optional, if you don't have a need, just delete it) Mount the local configuration file into the container which has been modified in the previous step, namely using the local configuration file to cover container configuration file. -- `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (optional, if you don't have a need, just delete it) Mount account configuration file modified in the previous step into the container. Delete this command parameters if no needs. -- `--name hertzbeat` : Naming container name hertzbeat -- `apache/hertzbeat` : Use the pulled latest HertzBeat official application mirror to start the container. **Use `quay.io/tancloud/hertzbeat` instead if you pull `quay.io` docker image.** + ```shell + $ docker run -d -p 1157:1157 -p 1158:1158 \ + -e LANG=en_US.UTF-8 \ + -e TZ=Asia/Shanghai \ + -v $(pwd)/data:/opt/hertzbeat/data \ + -v $(pwd)/logs:/opt/hertzbeat/logs \ + -v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml \ + -v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml \ + --name hertzbeat apache/hertzbeat + ``` + + This command starts a running HertzBeat Docker container with mapping port 1157-1158. If existing processes on the host use the port, please modify host mapped port. + + - `docker run -d` : Run a container in the background via Docker + - `-p 1157:1157 -p 1158:1158` : Mapping container ports to the host, 1157 is web-ui port, 1158 is cluster port. + - `-e LANG=en_US.UTF-8` : Set the system language + - `-e TZ=Asia/Shanghai` : Set the system timezone + - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important⚠️ Mount the H2 database file to the local host, to ensure that the data is not lost due creating or deleting container. + - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (optional, if you don't have a need, just delete it) Mount the log file to the local host, to ensure the log will not be lost due creating or deleting container. + - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (optional, if you don't have a need, just delete it) Mount the local configuration file into the container which has been modified in the previous step, namely using the local configuration file to cover container configuration file. + - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (optional, if you don't have a need, just delete it) Mount account configuration file modified in the previous step into the container. Delete this command parameters if no needs. + - `--name hertzbeat` : Naming container name hertzbeat + - `apache/hertzbeat` : Use the pulled latest HertzBeat official application mirror to start the container. **Use `quay.io/tancloud/hertzbeat` instead if you pull `quay.io` docker image.** 6. Begin to explore HertzBeat @@ -77,25 +77,25 @@ This command starts a running HertzBeat Docker container with mapping port 1157- 7. Deploy collector cluster (Optional) -```shell -$ docker run -d \ - -e IDENTITY=custom-collector-name \ - -e MODE=public \ - -e MANAGER_HOST=127.0.0.1 \ - -e MANAGER_PORT=1158 \ - --name hertzbeat-collector apache/hertzbeat-collector -``` - -This command starts a running HertzBeat-Collector container. - -- `docker run -d` : Run a container in the background via Docker -- `-e IDENTITY=custom-collector-name` : (optional) Set the collector unique identity name. Attention the clusters collector name must unique. -- `-e MODE=public` : set the running mode(public or private), public cluster or private cloud-edge. -- `-e MANAGER_HOST=127.0.0.1` : Important⚠️ Set the main hertzbeat server ip. -- `-e MANAGER_PORT=1158` : (optional) Set the main hertzbeat server port, default 1158. -- `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (optional) Mount the log file to the local host, to ensure the log will not be lost due creating or deleting container. -- `--name hertzbeat-collector` : Naming container name hertzbeat-collector -- `apache/hertzbeat-collector` : Use the pulled latest HertzBeat-Collector official application mirror to start the container. **Use `quay.io/tancloud/hertzbeat-collector` instead if you pull `quay.io` docker image.** + ```shell + $ docker run -d \ + -e IDENTITY=custom-collector-name \ + -e MODE=public \ + -e MANAGER_HOST=127.0.0.1 \ + -e MANAGER_PORT=1158 \ + --name hertzbeat-collector apache/hertzbeat-collector + ``` + + This command starts a running HertzBeat-Collector container. + + - `docker run -d` : Run a container in the background via Docker + - `-e IDENTITY=custom-collector-name` : (optional) Set the collector unique identity name. Attention the clusters collector name must unique. + - `-e MODE=public` : set the running mode(public or private), public cluster or private cloud-edge. + - `-e MANAGER_HOST=127.0.0.1` : Important⚠️ Set the main hertzbeat server ip. + - `-e MANAGER_PORT=1158` : (optional) Set the main hertzbeat server port, default 1158. + - `-v $(pwd)/logs:/opt/hertzbeat-collector/logs` : (optional) Mount the log file to the local host, to ensure the log will not be lost due creating or deleting container. + - `--name hertzbeat-collector` : Naming container name hertzbeat-collector + - `apache/hertzbeat-collector` : Use the pulled latest HertzBeat-Collector official application mirror to start the container. **Use `quay.io/tancloud/hertzbeat-collector` instead if you pull `quay.io` docker image.** 8. Access `http://localhost:1157` and you will see the registered new collector in dashboard. @@ -108,39 +108,39 @@ This command starts a running HertzBeat-Collector container. 1. **MYSQL, TDENGINE, IoTDB and HertzBeat are deployed on the same host by Docker,HertzBeat use localhost or 127.0.0.1 connect to the database but fail** The problems lies in Docker container failed to visit and connect localhost port. Because the docker default network mode is Bridge mode which can't access local machine through localhost. -> Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. -> Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` + > Solution A:Configure application.yml. Change database connection address from localhost to external IP of the host machine. + > Solution B:Use the Host network mode to start Docker, namely making Docker container and hosting share network. `docker run -d --network host .....` 2. **According to the process deploy,visit no interface** Please refer to the following points to troubleshoot issues: -> 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. -> 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. -> 3:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. + > 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. + > 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. + > 3:`docker logs hertzbeat` Check whether the container log has errors. If you haven't solved the issue, report it to the communication group or community. 3. **Log an error TDengine connection or insert SQL failed** -> 1:Check whether database account and password configured is correct, the database is created. -> 2:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. + > 1:Check whether database account and password configured is correct, the database is created. + > 2:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. 4. **Historical monitoring charts have been missing data for a long time** -> 1:Check whether you configure Tdengine or IoTDB. No configuration means no historical chart data. -> 2:Check whether Tdengine database `hertzbeat` is created. -> 3: Check whether IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. + > 1:Check whether you configure Tdengine or IoTDB. No configuration means no historical chart data. + > 2:Check whether Tdengine database `hertzbeat` is created. + > 3: Check whether IP account and password configuration is correct in HertzBeat's configuration file `application.yml`. 5. If the history chart on the monitoring page is not displayed,popup [please configure time series database] -> As shown in the popup window,the premise of history chart display is that you need install and configure hertzbeat's dependency service - IoTDB or TDengine database. -> Installation and initialization this database refer to [TDengine Installation](tdengine-init) or [IoTDB Installation](iotdb-init) + > As shown in the popup window,the premise of history chart display is that you need install and configure hertzbeat's dependency service - IoTDB or TDengine database. + > Installation and initialization this database refer to [TDengine Installation](tdengine-init) or [IoTDB Installation](iotdb-init) 6. The historical picture of monitoring details is not displayed or has no data, and TDengine has been deployed -> Please confirm whether the installed TDengine version is near 2.4.0.12, version 3.0 and 2.2 are not compatible. + > Please confirm whether the installed TDengine version is near 2.4.0.12, version 3.0 and 2.2 are not compatible. 7. The time series database is installed and configured, but the page still displays a pop-up [Unable to provide historical chart data, please configure dependent time series database] -> Please check if the configuration parameters are correct -> Is iot-db or td-engine enable set to true -> Note⚠️If both hertzbeat and IotDB, 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 iot-db or td-engine enable set to true + > Note⚠️If both hertzbeat and IotDB, 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/versioned_docs/version-v1.5.x/start/greptime-init.md b/home/versioned_docs/version-v1.5.x/start/greptime-init.md index c58325ee3a7..5ff9268213b 100644 --- a/home/versioned_docs/version-v1.5.x/start/greptime-init.md +++ b/home/versioned_docs/version-v1.5.x/start/greptime-init.md @@ -17,29 +17,29 @@ It's designed to work on infrastructure of the cloud era, and users benefit from ### Install GreptimeDB via Docker > Refer to the official website [installation tutorial](https://docs.greptime.com/getting-started/overview) -> -> 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 GreptimeDB with Docker - -```shell -$ docker run -p 4000-4004:4000-4004 \ - -p 4242:4242 -v /opt/greptimedb:/tmp/greptimedb \ - --name greptime \ - greptime/greptimedb standalone start \ - --http-addr 0.0.0.0:4000 \ - --rpc-addr 0.0.0.0:4001 \ -``` - -`-v /opt/greptimedb:/tmp/greptimedb` is local persistent mount of greptimedb data directory. `/opt/greptimedb` should be replaced with the actual local directory. -use```$ docker ps``` to check if the database started successfully + +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. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install GreptimeDB with Docker + + ```shell + $ docker run -p 4000-4004:4000-4004 \ + -p 4242:4242 -v /opt/greptimedb:/tmp/greptimedb \ + --name greptime \ + greptime/greptimedb standalone start \ + --http-addr 0.0.0.0:4000 \ + --rpc-addr 0.0.0.0:4001 \ + ``` + + `-v /opt/greptimedb:/tmp/greptimedb` is local persistent mount of greptimedb data directory. `/opt/greptimedb` should be replaced with the actual local directory. + use```$ docker ps``` to check if the database started successfully ### Configure the database connection in hertzbeat `application.yml` configuration file @@ -48,17 +48,17 @@ use```$ docker ps``` to check if the database started successfully 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` Replace `warehouse.store.greptime` data source parameters, URL account and password. -```yaml -warehouse: - store: - # disable jpa - jpa: - enabled: false - # enable greptime - greptime: - enabled: true - endpoint: localhost:4001 -``` + ```yaml + warehouse: + store: + # disable jpa + jpa: + enabled: false + # enable greptime + greptime: + enabled: true + endpoint: localhost:4001 + ``` 2. Restart HertzBeat @@ -66,4 +66,4 @@ warehouse: 1. Do both the time series databases Greptime, IoTDB or 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. + > 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. diff --git a/home/versioned_docs/version-v1.5.x/start/influxdb-init.md b/home/versioned_docs/version-v1.5.x/start/influxdb-init.md index a1b68b3b077..c295f908d3e 100644 --- a/home/versioned_docs/version-v1.5.x/start/influxdb-init.md +++ b/home/versioned_docs/version-v1.5.x/start/influxdb-init.md @@ -23,26 +23,26 @@ Note⚠️ Need InfluxDB 1.x Version. ### 2. Install TDengine via Docker > Refer to the official website [installation tutorial](https://hub.docker.com/_/influxdb) -> -> 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 InfluxDB with Docker -> -> ``` -> $ docker run -p 8086:8086 \ -> -v /opt/influxdb:/var/lib/influxdb \ -> influxdb:1.8 -> ``` -> -> `-v /opt/influxdb:/var/lib/influxdb` is local persistent mount of InfluxDB data directory. `/opt/influxdb` should be replaced with the actual local directory. -> use```$ docker ps``` to check if the database started successfully + +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. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install InfluxDB with Docker + + ```shell + $ docker run -p 8086:8086 \ + -v /opt/influxdb:/var/lib/influxdb \ + influxdb:1.8 + ``` + + `-v /opt/influxdb:/var/lib/influxdb` is local persistent mount of InfluxDB data directory. `/opt/influxdb` should be replaced with the actual local directory. + use```$ docker ps``` to check if the database started successfully ### Configure the database connection in hertzbeat `application.yml` configuration file @@ -51,21 +51,21 @@ Note⚠️ Need InfluxDB 1.x Version. 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` Replace `warehouse.store.influxdb` data source parameters, URL account and password. -```yaml -warehouse: - store: - # disable jpa - jpa: - enabled: false - # enable influxdb - influxdb: - enabled: true - server-url: http://localhost:8086 - username: root - password: root - expire-time: '30d' - replication: 1 -``` + ```yaml + warehouse: + store: + # disable jpa + jpa: + enabled: false + # enable influxdb + influxdb: + enabled: true + server-url: http://localhost:8086 + username: root + password: root + expire-time: '30d' + replication: 1 + ``` 2. Restart HertzBeat @@ -73,4 +73,4 @@ warehouse: 1. Do both the time series databases InfluxDB, 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. + > 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. diff --git a/home/versioned_docs/version-v1.5.x/start/iotdb-init.md b/home/versioned_docs/version-v1.5.x/start/iotdb-init.md index a105bd6b769..9cd1157db22 100644 --- a/home/versioned_docs/version-v1.5.x/start/iotdb-init.md +++ b/home/versioned_docs/version-v1.5.x/start/iotdb-init.md @@ -31,15 +31,15 @@ Apache IoTDB is a software system that integrates the collection, storage, manag 2. Install IoTDB via Docker -```shell -$ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ - -v /opt/iotdb/data:/iotdb/data \ - --name iotdb \ - apache/iotdb:1.2.2-standalone -``` + ```shell + $ docker run -d -p 6667:6667 -p 31999:31999 -p 8181:8181 \ + -v /opt/iotdb/data:/iotdb/data \ + --name iotdb \ + 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 @@ -47,61 +47,61 @@ use```$ docker ps``` to check if the database started successfully 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: - store: - # disable JPA - jpa: - enabled: false - # enable iot-db - iot-db: - enabled: true - host: 127.0.0.1 - rpc-port: 6667 - username: root - password: root - query-timeout-in-ms: -1 - # default '7776000000'(90days,unit:ms,-1:no-expire) - expire-time: '7776000000' -``` - -**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 - # 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: - -| 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 | deprecated | -| 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. + ```yaml + warehouse: + store: + # disable JPA + jpa: + enabled: false + # enable iot-db + iot-db: + enabled: true + host: 127.0.0.1 + rpc-port: 6667 + username: root + password: root + query-timeout-in-ms: -1 + # default '7776000000'(90days,unit:ms,-1:no-expire) + expire-time: '7776000000' + ``` + + **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 + # 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: + + | 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 | deprecated | + | 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 @@ -109,15 +109,15 @@ Configuration parameters: 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. + > 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 + > 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/versioned_docs/version-v1.5.x/start/package-deploy.md b/home/versioned_docs/version-v1.5.x/start/package-deploy.md index ed26d0532e2..21430e6682b 100644 --- a/home/versioned_docs/version-v1.5.x/start/package-deploy.md +++ b/home/versioned_docs/version-v1.5.x/start/package-deploy.md @@ -12,7 +12,7 @@ sidebar_label: Install via Package 2. Configure HertzBeat's configuration file(optional) Unzip the installation package to the host eg: /opt/hertzbeat - ``` + ```shell $ tar zxvf hertzbeat-xx.tar.gz or $ unzip -o hertzbeat-xx.zip @@ -33,7 +33,7 @@ sidebar_label: Install via Package 4. Start the service Execute the startup script `startup.sh` in the installation directory `hertzbeat/bin/`, or `startup.bat` in windows. - ``` + ```shell ./startup.sh ``` @@ -72,7 +72,7 @@ sidebar_label: Install via Package download JAVA installation package: [mirror website](https://repo.huaweicloud.com/java/jdk/) After installation use command line to check whether you install it successfully. - ``` + ```shell $ java -version java version "17.0.9" Java(TM) SE Runtime Environment 17.0.9 (build 17.0.9+8-LTS-237) @@ -83,17 +83,17 @@ sidebar_label: Install via Package 2. **According to the process deploy,visit no interface** Please refer to the following points to troubleshoot issues: -> 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. -> 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. -> 3:Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. + > 1:If you switch to dependency service MYSQL database,check whether the database is created and started successfully. + > 2:Check whether dependent services, IP account and password configuration is correct in HertzBeat's configuration file `hertzbeat/config/application.yml`. + > 3:Check whether the running log has errors in `hertzbeat/logs/` directory. If you haven't solved the issue, report it to the communication group or community. 3. **Log an error TDengine connection or insert SQL failed** -> 1:Check whether database account and password configured is correct, the database is created. -> 2:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. + > 1:Check whether database account and password configured is correct, the database is created. + > 2:If you install TDengine2.3+ version, you must execute `systemctl start taosadapter` to start adapter in addition to start the server. 4. **Monitoring historical charts with no data for a long time** -> 1: Whether the time series database is configured or not, if it is not configured, there is no historical chart data. -> 2: If you are using Tdengine, check whether the database `hertzbeat` of Tdengine is created. -> 3: HertzBeat's configuration file `application.yml`, the dependent services in it, the time series, the IP account password, etc. are configured correctly. + > 1: Whether the time series database is configured or not, if it is not configured, there is no historical chart data. + > 2: If you are using Tdengine, check whether the database `hertzbeat` of Tdengine is created. + > 3: HertzBeat's configuration file `application.yml`, the dependent services in it, the time series, the IP account password, etc. are configured correctly. diff --git a/home/versioned_docs/version-v1.5.x/start/quickstart.md b/home/versioned_docs/version-v1.5.x/start/quickstart.md index 319e046b2ea..e8b099e7058 100644 --- a/home/versioned_docs/version-v1.5.x/start/quickstart.md +++ b/home/versioned_docs/version-v1.5.x/start/quickstart.md @@ -16,24 +16,24 @@ sidebar_label: Quick Start 1. Just one command to get started: -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat``` -```or use quay.io (if dockerhub network connect timeout)``` + ```or use quay.io (if dockerhub network connect timeout)``` -```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` + ```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat``` 2. Access `http://localhost:1157` to start, default account: `admin/hertzbeat` 3. Deploy collector clusters(Optional) -``` -docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector -``` + ```shell + docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MANAGER_PORT=1158 --name hertzbeat-collector apache/hertzbeat-collector + ``` -- `-e IDENTITY=custom-collector-name` : set the collector unique identity name. -- `-e MODE=public` : set the running mode(public or private), public cluster or private cloud-edge. -- `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. -- `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. + - `-e IDENTITY=custom-collector-name` : set the collector unique identity name. + - `-e MODE=public` : set the running mode(public or private), public cluster or private cloud-edge. + - `-e MANAGER_HOST=127.0.0.1` : set the main hertzbeat server ip. + - `-e MANAGER_PORT=1158` : set the main hertzbeat server port, default 1158. Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.apache.org/docs/start/docker-deploy) diff --git a/home/versioned_docs/version-v1.5.x/start/sslcert-practice.md b/home/versioned_docs/version-v1.5.x/start/sslcert-practice.md index 919e1aa1669..5e203b4fc7f 100644 --- a/home/versioned_docs/version-v1.5.x/start/sslcert-practice.md +++ b/home/versioned_docs/version-v1.5.x/start/sslcert-practice.md @@ -18,7 +18,7 @@ github: 1. The `docker` environment can be installed with just one command -`docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` + `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat` 2. After the installation is successful, the browser can access `localhost:1157` to start, the default account password is `admin/hertzbeat` @@ -26,62 +26,62 @@ github: 1. Click Add SSL Certificate Monitor -> System Page -> Monitor Menu -> SSL Certificate -> Add SSL Certificate + > System Page -> Monitor Menu -> SSL Certificate -> Add SSL Certificate -![](/img/docs/start/ssl_1.png) + ![](/img/docs/start/ssl_1.png) 2. Configure the monitoring website -> Here we take the example of monitoring Baidu website, configure monitoring host domain name, name, collection interval, etc. -> Click OK Note ⚠️Before adding, it will test the connectivity of the website by default, and the connection will be successful before adding. Of course, you can also gray out the **Test or not** button. + > Here we take the example of monitoring Baidu website, configure monitoring host domain name, name, collection interval, etc. + > Click OK Note ⚠️Before adding, it will test the connectivity of the website by default, and the connection will be successful before adding. Of course, you can also gray out the **Test or not** button. -![](/img/docs/start/ssl_2.png) + ![](/img/docs/start/ssl_2.png) 3. View the detection index data -> In the monitoring list, you can view the monitoring status, and in the monitoring details, you can view the metric data chart, etc. + > In the monitoring list, you can view the monitoring status, and in the monitoring details, you can view the metric data chart, etc. -![](/img/docs/start/ssl_3.png) + ![](/img/docs/start/ssl_3.png) -![](/img/docs/start/ssl_11.png) + ![](/img/docs/start/ssl_11.png) 4. Set the threshold (triggered when the certificate expires) -> System Page -> Alarms -> Alarm Thresholds -> New Thresholds + > System Page -> Alarms -> Alarm Thresholds -> New Thresholds -![](/img/docs/start/ssl_4.png) + ![](/img/docs/start/ssl_4.png) -> Configure the threshold, select the SSL certificate metric object, configure the alarm expression-triggered when the metric `expired` is `true`, that is, `equals(expired,"true")`, set the alarm level notification template information, etc. + > Configure the threshold, select the SSL certificate metric object, configure the alarm expression-triggered when the metric `expired` is `true`, that is, `equals(expired,"true")`, set the alarm level notification template information, etc. -![](/img/docs/start/ssl_5.png) + ![](/img/docs/start/ssl_5.png) -> Associating thresholds with monitoring, in the threshold list, set which monitoring this threshold applies to. + > Associating thresholds with monitoring, in the threshold list, set which monitoring this threshold applies to. -![](/img/docs/start/ssl_6.png) + ![](/img/docs/start/ssl_6.png) 5. Set the threshold (triggered one week before the certificate expires) -> In the same way, add a new configuration threshold and configure an alarm expression - when the metric expires timestamp `end_timestamp`, the `now()` function is the current timestamp, if the configuration triggers an alarm one week in advance: `end_timestamp <= (now( ) + 604800000)` , where `604800000` is the 7-day total time difference in milliseconds. + > In the same way, add a new configuration threshold and configure an alarm expression - when the metric expires timestamp `end_timestamp`, the `now()` function is the current timestamp, if the configuration triggers an alarm one week in advance: `end_timestamp <= (now( ) + 604800000)` , where `604800000` is the 7-day total time difference in milliseconds. -![](/img/docs/start/ssl_7.png) + ![](/img/docs/start/ssl_7.png) -> Finally, you can see the triggered alarm in the alarm center. + > Finally, you can see the triggered alarm in the alarm center. -![](/img/docs/start/ssl_8.png) + ![](/img/docs/start/ssl_8.png) 6. Alarm notification (in time notification via Dingding WeChat Feishu, etc.) -> Monitoring Tool -> Alarm Notification -> New Receiver + > Monitoring Tool -> Alarm Notification -> New Receiver -![](/img/docs/start/ssl_10.png) + ![](/img/docs/start/ssl_10.png) -For token configuration such as Dingding WeChat Feishu, please refer to the help document + For token configuration such as Dingding WeChat Feishu, please refer to the help document - + -> Alarm Notification -> New Alarm Notification Policy -> Enable Notification for the Recipient Just Configured + > Alarm Notification -> New Alarm Notification Policy -> Enable Notification for the Recipient Just Configured -![](/img/docs/start/ssl_11.png) + ![](/img/docs/start/ssl_11.png) 7. OK When the threshold is triggered, we can receive the corresponding alarm message. If there is no notification, you can also view the alarm information in the alarm center. diff --git a/home/versioned_docs/version-v1.5.x/start/tdengine-init.md b/home/versioned_docs/version-v1.5.x/start/tdengine-init.md index 0ec76f6c8f6..e2d6e21936a 100644 --- a/home/versioned_docs/version-v1.5.x/start/tdengine-init.md +++ b/home/versioned_docs/version-v1.5.x/start/tdengine-init.md @@ -19,28 +19,28 @@ Note⚠️ Need TDengine 3.x Version. ### Install TDengine via Docker > Refer to the official website [installation tutorial](https://docs.taosdata.com/get-started/docker/) -> -> 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 TDengine with Docker -> -> ```shell -> $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ -> -v /opt/taosdata:/var/lib/taos \ -> --name tdengine -e TZ=Asia/Shanghai \ -> tdengine/tdengine:3.0.4.0 -> ``` -> -> `-v /opt/taosdata:/var/lib/taos` is local persistent mount of TDengine data directory. `/opt/taosdata` should be replaced with the actual local directory. -> `-e TZ="Asia/Shanghai"` can set time zone for TDengine.Set up the corresponding time zone you want. -> use```$ docker ps``` to check if the database started successfully + +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. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` + +2. Install TDengine with Docker + + ```shell + $ docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp \ + -v /opt/taosdata:/var/lib/taos \ + --name tdengine -e TZ=Asia/Shanghai \ + tdengine/tdengine:3.0.4.0 + ``` + + `-v /opt/taosdata:/var/lib/taos` is local persistent mount of TDengine data directory. `/opt/taosdata` should be replaced with the actual local directory. + `-e TZ="Asia/Shanghai"` can set time zone for TDengine.Set up the corresponding time zone you want. + use```$ docker ps``` to check if the database started successfully ### Create database instance @@ -88,20 +88,20 @@ Note⚠️ Need TDengine 3.x Version. 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` Replace `warehouse.store.td-engine` data source parameters, URL account and password. -```yaml -warehouse: - store: - # disable jpa - jpa: - enabled: false - # enable td-engine - td-engine: - enabled: true - driver-class-name: com.taosdata.jdbc.rs.RestfulDriver - url: jdbc:TAOS-RS://localhost:6041/hertzbeat - username: root - password: taosdata -``` + ```yaml + warehouse: + store: + # disable jpa + jpa: + enabled: false + # enable td-engine + td-engine: + enabled: true + driver-class-name: com.taosdata.jdbc.rs.RestfulDriver + url: jdbc:TAOS-RS://localhost:6041/hertzbeat + username: root + password: taosdata + ``` 2. Restart HertzBeat @@ -109,19 +109,19 @@ warehouse: 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. + > 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 + > 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 historical picture of monitoring details is not displayed or has no data, and TDengine has been deployed -> Please confirm whether the installed TDengine version is 3.x, version 2.x are not compatible. + > Please confirm whether the installed TDengine version is 3.x, version 2.x are not compatible. 4. 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/versioned_docs/version-v1.5.x/start/victoria-metrics-init.md b/home/versioned_docs/version-v1.5.x/start/victoria-metrics-init.md index b2ae6a65799..9d1d1f76f53 100644 --- a/home/versioned_docs/version-v1.5.x/start/victoria-metrics-init.md +++ b/home/versioned_docs/version-v1.5.x/start/victoria-metrics-init.md @@ -18,27 +18,27 @@ VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and t ### Install VictoriaMetrics via Docker > Refer to the official website [installation tutorial](https://docs.victoriametrics.com/Quick-Start.html#how-to-install) -> -> 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 -> ``` + +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. + + ```shell + $ docker -v + Docker version 20.10.12, build e91ed57 + ``` 2. Install VictoriaMetrics via Docker -```shell -$ docker run -d -p 8428:8428 \ - -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ - --name victoria-metrics \ - victoriametrics/victoria-metrics:v1.95.1 -``` + ```shell + $ docker run -d -p 8428:8428 \ + -v $(pwd)/victoria-metrics-data:/victoria-metrics-data \ + --name victoria-metrics \ + victoriametrics/victoria-metrics:v1.95.1 + ``` -`-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` is local persistent mount of VictoriaMetrics data directory -use```$ docker ps``` to check if the database started successfully + `-v $(pwd)/victoria-metrics-data:/victoria-metrics-data` is local persistent mount of VictoriaMetrics data directory + use```$ docker ps``` to check if the database started successfully 3. Configure the database connection in hertzbeat `application.yml`configuration file @@ -46,19 +46,19 @@ use```$ docker ps``` to check if the database started successfully 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.victoria-metrics` data source parameters, HOST account and password. -```yaml -warehouse: - store: - # disable JPA - jpa: - enabled: false - # enable victoria-metrics - victoria-metrics: - enabled: true - url: http://localhost:8428 - username: root - password: root -``` + ```yaml + warehouse: + store: + # disable JPA + jpa: + enabled: false + # enable victoria-metrics + victoria-metrics: + enabled: true + url: http://localhost:8428 + username: root + password: root + ``` 4. Restart HertzBeat @@ -66,4 +66,4 @@ warehouse: 1. Do both the time series databases 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 can affects the historical chart data. + > 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 can affects the historical chart data. diff --git a/web-app/README.md b/web-app/README.md index 8a75b725ea6..a1f66311f38 100644 --- a/web-app/README.md +++ b/web-app/README.md @@ -18,14 +18,14 @@ 1. Execute command in web-app -```ng build --configuration production``` + ```ng build --configuration production``` 2. Execute command in root -```mvn clean install``` + ```mvn clean install``` -The HertzBeat install package will at `manager/target/hertzbeat-{version}.tar.gz` + The HertzBeat install package will at `manager/target/hertzbeat-{version}.tar.gz` 3. Execute command in collector -```mvn clean package -Pcluster``` + ```mvn clean package -Pcluster```