mirror of
https://github.com/dromara/hertzbeat.git
synced 2026-09-17 09:40:58 +00:00
bugfix threshold init error in mysql env (#1435)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
This commit is contained in:
@@ -10,12 +10,13 @@
|
||||
|
||||
> An open-source, real-time monitoring system with custom-monitoring, performance-cluster, prometheus-compatible and agentless. | 易用友好的开源实时监控告警系统,无需Agent,高性能集群,兼容Prometheus,强大自定义监控能力.
|
||||
|
||||
[](https://discord.gg/Fb6M73htGr)
|
||||
[<img alt="discord" src="https://img.shields.io/badge/Chat-On%20Discord-brightgreen" height="25"/>](https://discord.gg/Fb6M73htGr)
|
||||
[<img alt="reddit" src="https://img.shields.io/badge/Reddit-%20Community-brightgreen" height="25"/>](https://www.reddit.com/r/hertzbeat/)
|
||||
[](https://twitter.com/hertzbeat1024)
|
||||
[](https://www.bestpractices.dev/projects/8139)
|
||||
[](https://hub.docker.com/repository/docker/tancloud/hertzbeat/general)
|
||||
[](https://artifacthub.io/packages/search?repo=hertzbeat)
|
||||
[](https://jq.qq.com/?_wv=1027&k=aVIVB2K9)
|
||||
[](https://jq.qq.com/?_wv=1027&k=aVIVB2K9)
|
||||
[](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)
|
||||
|
||||
+4
-1
@@ -10,7 +10,8 @@
|
||||
|
||||
> 易用友好的开源实时监控告警系统,无需Agent,高性能集群,兼容Prometheus,强大自定义监控能力。
|
||||
|
||||
[](https://discord.gg/Fb6M73htGr)
|
||||
[<img alt="discord" src="https://img.shields.io/badge/Chat-On%20Discord-brightgreen" height="25"/>](https://discord.gg/Fb6M73htGr)
|
||||
[<img alt="reddit" src="https://img.shields.io/badge/Reddit-%20Community-brightgreen" height="25"/>](https://www.reddit.com/r/hertzbeat/)
|
||||
[](https://twitter.com/hertzbeat1024)
|
||||
[](https://www.bestpractices.dev/projects/8139)
|
||||
[](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)
|
||||
|
||||
@@ -51,10 +51,9 @@ public interface AlertDefineDao extends JpaRepository<AlertDefine, Long>, JpaSpe
|
||||
* Query app metric alert define
|
||||
* @param app app
|
||||
* @param metric metric
|
||||
* @param field field
|
||||
* @return alert define
|
||||
*/
|
||||
List<AlertDefine> queryAlertDefineByAppAndMetricAndField(String app, String metric, String field);
|
||||
List<AlertDefine> queryAlertDefineByAppAndMetric(String app, String metric);
|
||||
|
||||
/**
|
||||
* Query the alarm definition list associated with the monitoring ID
|
||||
|
||||
@@ -20,7 +20,8 @@ sidebar_label: Contributors
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zqr10159"><img src="https://avatars.githubusercontent.com/u/30048352?v=4?s=100" width="100px;" alt="zqr10159"/><br /><sub><b>Logic</b></sub></a><br /><a href="https://github.com/dromara/hertzbeat/commits?author=zqr10159" title="Documentation">📖</a> <a href="https://github.com/dromara/hertzbeat/commits?author=zqr10159" title="Code">💻</a><a href="#design-Ceilzcx" title="Design">🎨</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vinci-897"><img src="https://avatars.githubusercontent.com/u/55838224?v=4?s=100" width="100px;" alt="vinci"/><br /><sub><b>vinci</b></sub></a><br /><a href="https://github.com/dromara/hertzbeat/commits?author=vinci-897" title="Code">💻</a> <a href="https://github.com/dromara/hertzbeat/commits?author=vinci-897" title="Documentation">📖</a> <a href="#design-vinci-897" title="Design">🎨</a></td>
|
||||
</tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/a-little-fool"><img src="https://avatars.githubusercontent.com/u/105542329?v=4?s=100" width="100px;" alt="淞筱"/><br /><sub><b>淞筱</b></sub></a><br /><a href="https://github.com/dromara/hertzbeat/commits?author=a-little-fool" title="Code">💻</a> <a href="https://github.com/dromara/hertzbeat/commits?author=a-little-fool" title="Documentation">📖</a> <a href="#design-a-little-fool" title="Design">🎨</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ sidebar_label: 开发者们
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zqr10159"><img src="https://avatars.githubusercontent.com/u/30048352?v=4?s=100" width="100px;" alt="zqr10159"/><br /><sub><b>Logic</b></sub></a><br /><a href="https://github.com/dromara/hertzbeat/commits?author=zqr10159" title="Documentation">📖</a> <a href="https://github.com/dromara/hertzbeat/commits?author=zqr10159" title="Code">💻</a><a href="#design-Ceilzcx" title="Design">🎨</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vinci-897"><img src="https://avatars.githubusercontent.com/u/55838224?v=4?s=100" width="100px;" alt="vinci"/><br /><sub><b>vinci</b></sub></a><br /><a href="https://github.com/dromara/hertzbeat/commits?author=vinci-897" title="Code">💻</a> <a href="https://github.com/dromara/hertzbeat/commits?author=vinci-897" title="Documentation">📖</a> <a href="#design-vinci-897" title="Design">🎨</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/a-little-fool"><img src="https://avatars.githubusercontent.com/u/105542329?v=4?s=100" width="100px;" alt="淞筱"/><br /><sub><b>淞筱</b></sub></a><br /><a href="https://github.com/dromara/hertzbeat/commits?author=a-little-fool" title="Code">💻</a> <a href="https://github.com/dromara/hertzbeat/commits?author=a-little-fool" title="Documentation">📖</a> <a href="#design-a-little-fool" title="Design">🎨</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public class AvailableAlertDefineInit implements CommandLineRunner {
|
||||
Set<String> apps = appService.getAllAppDefines().keySet();
|
||||
for (String app : apps) {
|
||||
try {
|
||||
List<AlertDefine> defines = alertDefineDao.queryAlertDefineByAppAndMetricAndField(app, CommonConstants.AVAILABILITY, null);
|
||||
List<AlertDefine> defines = alertDefineDao.queryAlertDefineByAppAndMetric(app, CommonConstants.AVAILABILITY);
|
||||
if (defines.isEmpty()) {
|
||||
AlertDefine alertDefine = AlertDefine.builder()
|
||||
.app(app)
|
||||
|
||||
Reference in New Issue
Block a user