From 4233cb3f1ec98d889605d93b97dc0356207d15c4 Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Thu, 21 Dec 2023 13:47:26 +0800 Subject: [PATCH] bugfix threshold init error in mysql env (#1435) Signed-off-by: tomsun28 --- README.md | 7 +++++-- README_CN.md | 5 ++++- .../org/dromara/hertzbeat/alert/dao/AlertDefineDao.java | 3 +-- home/docs/others/developer.md | 3 ++- .../current/others/developer.md | 1 + .../manager/service/AvailableAlertDefineInit.java | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 832fbce0527..6c6de73af38 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,13 @@ > An open-source, real-time monitoring system with custom-monitoring, performance-cluster, prometheus-compatible and agentless. | 易用友好的开源实时监控告警系统,无需Agent,高性能集群,兼容Prometheus,强大自定义监控能力. -[![discord](https://img.shields.io/badge/Chat-On%20Discord-brightgreen)](https://discord.gg/Fb6M73htGr) +[discord](https://discord.gg/Fb6M73htGr) +[reddit](https://www.reddit.com/r/hertzbeat/) [![Twitter](https://img.shields.io/twitter/follow/hertzbeat1024?logo=twitter)](https://twitter.com/hertzbeat1024) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8139/badge)](https://www.bestpractices.dev/projects/8139) [![Docker Pulls](https://img.shields.io/docker/pulls/tancloud/hertzbeat?style=%20for-the-badge&logo=docker&label=DockerHub%20Download)](https://hub.docker.com/repository/docker/tancloud/hertzbeat/general) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/hertzbeat)](https://artifacthub.io/packages/search?repo=hertzbeat) -[![QQ](https://img.shields.io/badge/qq-236915833-orange)](https://jq.qq.com/?_wv=1027&k=aVIVB2K9) +[![QQ](https://img.shields.io/badge/QQ-236915833-orange)](https://jq.qq.com/?_wv=1027&k=aVIVB2K9) [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCri75zfWX0GHqJFPENEbLow?logo=youtube&label=YouTube%20Channel)](https://www.youtube.com/channel/UCri75zfWX0GHqJFPENEbLow) **Home: [hertzbeat.dromara.org](https://hertzbeat.dromara.org) Global | [hertzbeat.com](https://hertzbeat.com) China** @@ -409,6 +410,8 @@ HertzBeat is a top project under the [Dromara Open Source Community](https://dro [Github Discussion](https://github.com/dromara/hertzbeat/discussions) +[Reddit Community](https://www.reddit.com/r/hertzbeat/) + [User Club](https://support.qq.com/products/379369) [Follow Us Twitter](https://twitter.com/hertzbeat1024) diff --git a/README_CN.md b/README_CN.md index cb1a61ac698..fbefe797f18 100644 --- a/README_CN.md +++ b/README_CN.md @@ -10,7 +10,8 @@ > 易用友好的开源实时监控告警系统,无需Agent,高性能集群,兼容Prometheus,强大自定义监控能力。 -[![discord](https://img.shields.io/badge/Chat-On%20Discord-brightgreen)](https://discord.gg/Fb6M73htGr) +[discord](https://discord.gg/Fb6M73htGr) +[reddit](https://www.reddit.com/r/hertzbeat/) [![Twitter](https://img.shields.io/twitter/follow/hertzbeat1024?logo=twitter)](https://twitter.com/hertzbeat1024) [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8139/badge)](https://www.bestpractices.dev/projects/8139) [![Docker Pulls](https://img.shields.io/docker/pulls/tancloud/hertzbeat?style=%20for-the-badge&logo=docker&label=DockerHub%20Download)](https://hub.docker.com/repository/docker/tancloud/hertzbeat/general) @@ -414,6 +415,8 @@ HertzBeat 赫兹跳动是 [Dromara开源社区](https://dromara.org/) 下顶级 [Github Discussion](https://github.com/dromara/hertzbeat/discussions) +[Reddit Community](https://www.reddit.com/r/hertzbeat/) + [User Club](https://support.qq.com/products/379369) [Follow Us Twitter](https://twitter.com/hertzbeat1024) diff --git a/alerter/src/main/java/org/dromara/hertzbeat/alert/dao/AlertDefineDao.java b/alerter/src/main/java/org/dromara/hertzbeat/alert/dao/AlertDefineDao.java index b7445e18da2..9a2e0b8f77e 100644 --- a/alerter/src/main/java/org/dromara/hertzbeat/alert/dao/AlertDefineDao.java +++ b/alerter/src/main/java/org/dromara/hertzbeat/alert/dao/AlertDefineDao.java @@ -51,10 +51,9 @@ public interface AlertDefineDao extends JpaRepository, JpaSpe * Query app metric alert define * @param app app * @param metric metric - * @param field field * @return alert define */ - List queryAlertDefineByAppAndMetricAndField(String app, String metric, String field); + List queryAlertDefineByAppAndMetric(String app, String metric); /** * Query the alarm definition list associated with the monitoring ID diff --git a/home/docs/others/developer.md b/home/docs/others/developer.md index c997743e7e0..0b8ead79e9c 100644 --- a/home/docs/others/developer.md +++ b/home/docs/others/developer.md @@ -20,7 +20,8 @@ sidebar_label: Contributors zqr10159
Logic

📖 💻🎨 vinci
vinci

💻 📖 🎨 - + 淞筱
淞筱

💻 📖 🎨 + diff --git a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/others/developer.md b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/others/developer.md index 5bde6d0a294..ed0ae679853 100644 --- a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/others/developer.md +++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/others/developer.md @@ -20,6 +20,7 @@ sidebar_label: 开发者们 zqr10159
Logic

📖 💻🎨 vinci
vinci

💻 📖 🎨 + 淞筱
淞筱

💻 📖 🎨 diff --git a/manager/src/main/java/org/dromara/hertzbeat/manager/service/AvailableAlertDefineInit.java b/manager/src/main/java/org/dromara/hertzbeat/manager/service/AvailableAlertDefineInit.java index 7aec2c977de..54347dc64c8 100644 --- a/manager/src/main/java/org/dromara/hertzbeat/manager/service/AvailableAlertDefineInit.java +++ b/manager/src/main/java/org/dromara/hertzbeat/manager/service/AvailableAlertDefineInit.java @@ -34,7 +34,7 @@ public void run(String... args) throws Exception { Set apps = appService.getAllAppDefines().keySet(); for (String app : apps) { try { - List defines = alertDefineDao.queryAlertDefineByAppAndMetricAndField(app, CommonConstants.AVAILABILITY, null); + List defines = alertDefineDao.queryAlertDefineByAppAndMetric(app, CommonConstants.AVAILABILITY); if (defines.isEmpty()) { AlertDefine alertDefine = AlertDefine.builder() .app(app)