Compare commits

..
544 Commits
Author SHA1 Message Date
Jastandtomsun28 51bdb56592 [Feture]Add docker e2e test (#2916)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-30 13:05:43 +08:00
yunfan24andtomsun28 3562e870d8 [improve] Add required field indicators and form validation prompts for convergence strategies and silent strategies in the form. (#2913)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-30 13:04:03 +08:00
6f9ee2f4e6 [improve] Optimize CacheService and add relevant unit test (#2912)
Co-authored-by: LLWW04 <1713673102@qq.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-29 23:52:36 +08:00
Jastandtomsun28 917c11f298 [bugfix] Fix docker container name unable to display problem (#2914)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-29 11:45:51 +08:00
bf8d5b79bb [bugfix] Fix the bug where canceling an edit on a record still updates the page values. (#2911)
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-29 11:38:57 +08:00
7178c444f2 [feature](web-app)Add Alarm Voice Alerts (#2906)
Signed-off-by: Logic <zqr10159@126.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-12-29 11:25:48 +08:00
Calvinandtomsun28 bc2dc1d567 [improve] fix import of CollectRep (#2910)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-28 14:04:11 +08:00
Jastandtomsun28 9714123c98 [Improve] Improve OBS (#2909)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-28 12:24:58 +08:00
leo 8ca2f70153 add an online parser for prometheus. (#2851) 2024-12-27 23:18:56 +08:00
doveLin 126268f7ec [feature] Add a new Singleton-pattern-based LRU local cache (#2907) 2024-12-27 14:39:00 +08:00
Logic 12d1f4990d [fix](flink): update calculate metrics definitions (#2905) 2024-12-26 23:45:02 +08:00
Jastandtomsun28 4b21df556c [Imporve] Support Kafka internal topic configuration (#2901)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-26 00:06:12 +08:00
Jast 893d91c4f0 [doc] update doc (#2900)
Signed-off-by: Jast <shenghang@apache.org>
2024-12-26 00:00:34 +08:00
4236c438be [feature] integrate with Apache Arrow (#2864)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Signed-off-by: shown <yuluo08290126@gmail.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-12-24 20:43:14 +08:00
yunfan 6a64752af0 [Improve] add notification when port number changes automatically due to HTTPS toggle.(#2779) (#2896) 2024-12-24 18:22:26 +08:00
东风 c5cce27cb4 [improve]add Plc protocol , Modbus monitor (#2850) 2024-12-23 23:52:40 +08:00
doveLin 364de609bf [collector] fix the issue of reusing the adminClient in the Kafka client. (#2895) 2024-12-23 11:44:45 +08:00
Jast 5d81c32f9d [Improve] Improve Kafka chart display (#2894) 2024-12-23 10:53:53 +08:00
doveLinandtomsun28 6aff6ed053 [collector]add monitoring metrics for consumer groups in Kafka client (#2887)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-20 14:20:05 +08:00
Nick Guoandtomsun28 5ba09cf5c1 [doc] add more hints when users are switching data source. (#2880)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-20 13:52:46 +08:00
Logic a746e35dcf [Improve]Beautify Charts (#2891) 2024-12-20 12:06:28 +08:00
liutianyou a27777adcb [improve]improve linux process (#2889) 2024-12-20 07:41:17 +08:00
Logic 4b7dfb4c8e [improve] remove stack property from line charts (#2888) 2024-12-19 22:51:42 +08:00
AyuandAyu ceda4a65f9 [chore] delete the redundant else (#2881)
Co-authored-by: Ayu <14359932+lin-Ayu0v0@user.noreply.gitee.com>
2024-12-19 16:07:57 +08:00
d4f6fc1ae8 [Fix] fix clickhouse monitor (#2874)
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-12-17 14:20:27 +08:00
铁甲小宝 e999360da8 modified:add a small change. (#2878) 2024-12-16 00:16:29 +08:00
Nick Guo 948fcb739a [improve]Add more helpful messages when adding a Kafka monitor (#2876) 2024-12-14 15:22:27 +08:00
cdf060e9ac [Optimize] Add a reminder about potential collection issues caused by the Docker deployment method of collector. (#2844)
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-12-12 20:51:02 +08:00
starryCoder 1280c61af1 [doc] improve windows monitoring doc(#2869) 2024-12-12 15:10:18 +08:00
Nick Guo 86ad10ad7b [doc] Add ',' separator between monitoring types (#2865) 2024-12-10 21:08:55 +08:00
8961cf70a3 [bugfix]A bug fix (#2853)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-12-08 11:48:18 +08:00
tomsun28andaias00 f31909a30d [doc] update security doc and some (#2856)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-12-05 08:49:18 +08:00
Jastandtomsun28 2df7e1d269 [improve] improve dependency (#2855)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-12-04 21:24:37 +08:00
tomsun28andCalvin c10ebf0b60 [doc] add security model doc and update contributors (#2846)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-12-04 13:58:16 +08:00
1fe70a60cc [bugfix]Fix wrong app name (#2845)
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-11-30 16:43:09 +08:00
Jastandtomsun28 3ea4c0e7da [Feature] Add ssh e2e code (#2843)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-11-30 16:39:03 +08:00
tomsun28 8228938bd1 [fix] auto generated by protocol buffer (#2842)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-11-30 13:56:05 +08:00
5acaf4844a [feature] support managing tasks by using http_sd (#2830)
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-11-28 00:07:38 +08:00
fc8be06ad5 [improve] update victoriametrics and greptime store (#2836)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Signed-off-by: Logic <zqr10159@126.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
2024-11-27 08:58:09 +08:00
tomsun28 509a9c9651 [fix] bugfix flyway location can not auto detect vendor when not h2 (#2835) 2024-11-26 19:28:39 +08:00
Logic 754b18c9ba [doc] update sidebar category label and plugin documentation (#2837) 2024-11-26 14:36:40 +08:00
8cdc92ab56 [chore] Delete redundant Spaces (#2834)
Signed-off-by: ayu-v0 <127600988+ayu-v0@users.noreply.github.com>
Co-authored-by: Ayu <14359932+lin-Ayu0v0@user.noreply.gitee.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-11-24 21:01:25 +08:00
tomsun28andLogic f0cb2af031 [improve] update and fix template yml priority (#2829)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-11-24 15:38:21 +08:00
Jastandtomsun28 bd937bf7b8 [doc] Added custom development collector documentation (#2833)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-11-24 14:10:33 +08:00
starryCoder 8852713e4d [fix]fix windows chinese encoding (#2831) 2024-11-24 11:39:50 +08:00
CalvinandZhang Yuxuan 12f4ecce01 [refactor] change name from http_sd to registry (#2827)
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
2024-11-22 19:34:42 +08:00
Kerwin Bryant ca9934ec81 Fixed the omissions in #2805 (#2826)
Signed-off-by: Kerwin Bryant <kerwin612@qq.com>
2024-11-22 08:51:00 +08:00
tomsun28andshown eaaf589083 [improve] update grafana auth method and add expose url (#2818)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-11-18 23:19:57 +08:00
tomsun28 be84a0abae [improve] update windows metrics yml (#2816)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-11-18 21:57:50 +08:00
Jast 9a00f5a776 [improve] modify e2e test (#2814) 2024-11-14 23:38:43 +08:00
fb4626dd07 [feature] add e2e code (#2811)
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-11-14 11:24:49 +08:00
Jast f28996255a [Improve] improve kafka monitor (#2813) 2024-11-13 21:35:04 +08:00
Jast 0b79222bd0 [Doc] Add blog (#2812) 2024-11-11 23:19:15 +08:00
liutianyouandZhang Yuxuan 120f3a12fe [fix] fix the Linux process monitoring process exits abnormally without warning (#2810)
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
2024-11-11 14:09:30 +08:00
b8b1885657 [improve] Fix error links caused by module name changes. (#2807)
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-11-09 22:17:51 +08:00
caf13c09bd [feature] Support custom refresh intervals for each group of metrics (#2718)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: crossoverJie <crossoverJie@gmail.com>
2024-11-09 13:41:31 +08:00
dca3e351ed [improve] code according to code specifications (#2809)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-11-08 19:16:19 +08:00
Jast 6298e7ae90 [Improve] Improve module name (#2805) 2024-11-08 09:25:28 +08:00
tomsun28 4b2c3756b1 [doc] update new contributors (#2802)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-11-04 11:12:16 +08:00
shinestare d32ec249b4 [fix]Remove the duplicate declaration of commons-net (#2801) 2024-11-03 11:03:01 +08:00
tomsun28andLogic 611ddc22e3 [bugfix] fix collector docker build error (#2799)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-11-01 17:28:27 +08:00
4373ab23f3 [improve] improve the way Ai is entered and requested (#2762)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
2024-10-31 22:02:02 +08:00
bff75757db [Task][OSPP] HertzBeat Official Template Marketplace (#2641)
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-10-30 20:07:49 +08:00
tomsun28 50dd262fbf [doc] update deploy doc (#2796) 2024-10-30 15:38:34 +08:00
Jastandtomsun28 dc9743b7a5 [Doc] improve website (#2795)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-10-30 11:02:16 +08:00
Logic 8dc0fdee27 [doc](download): update for v1.6.1 release (#2794) 2024-10-30 10:08:20 +08:00
1267fcae5a [Feature] add seatunnel monitor (#2782)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
2024-10-29 14:28:24 +08:00
afe68ba4f8 [collector]bugfix: close connection when common cache is timeout (#2786)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-10-29 09:10:09 +08:00
4da00d445b [Task] [OSPP] JAVA implements the native ipmi2 communication protocol (#2726)
Signed-off-by: Gao Jian <1209640759@qq.com>
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-10-28 20:43:42 +08:00
e3d09ef427 [doc]Correct PostgreSQL image name in documentation (#2789)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-10-27 15:45:21 +08:00
bb0a22c42f [improve] code according to code specifications(#2784) (#2785)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-10-26 17:21:57 +08:00
Jastandshown 291f7cb351 [Improve] Improve log config (#2783)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-10-26 16:58:06 +08:00
Logic ba4f1e35f8 [bugfix]Update JDBC URL prefix for TDengine connection (#2788) 2024-10-26 16:42:59 +08:00
Logic 32f8cd5188 [improve] fix release script (#2781) 2024-10-23 22:35:45 +08:00
tomsun28 1f22a610ce [improve] update docker-compose license and fix compose config yml (#2778)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-10-22 23:45:39 +08:00
Jast fac3f5b927 [doc] drop dead link (#2777) 2024-10-22 17:21:36 +08:00
tomsun28 efa2dc3969 [improve] email notice template use the common render (#2775)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-10-15 23:48:39 +08:00
tomsun28 a0995d26ec [doc] add baota extern install doc (#2768)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-10-11 23:12:08 +08:00
JastandZhang Yuxuan 4f18c2c930 [Improve] modify kafka log level (#2763)
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
2024-10-08 21:46:21 +08:00
Jast 739e678dd5 [doc] improve kafka monitor config (#2765) 2024-10-08 21:39:05 +08:00
tomsun28 2856c3fe65 [webapp] fix bulletin with multiple rows of results (#2761)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-10-07 19:45:57 +08:00
Zhang Yuxuan bad49ce17e [doc] fix JDK download mirror link (#2756) 2024-09-29 19:25:53 +08:00
puruidongandtomsun28 64c68a4593 [doc] fix error jdk download link (#2752)
Signed-off-by: puruidong <pruidong@gmail.com>
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-09-28 16:01:15 +08:00
cc47db793f [Improve] Fix cannot upload test report in the PR (#2748)
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-25 22:25:45 +08:00
108cc4db5a [fix] Threshold Rules search i18n error (#2692) (#2736)
Co-authored-by: keaifa <keaifafafa@gmail.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-25 09:21:47 +08:00
7e3d009536 [improve] remove side nav user avatar (#2742)
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-09-24 21:33:18 +08:00
aias00andZhang Yuxuan 5dabc7b7fd [improve] support kanban tablename i18n (#2749)
Signed-off-by: aias00 <liuhongyu@apache.org>
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
2024-09-24 21:22:11 +08:00
aias00andZhang Yuxuan f2eb663e02 [improve] init default theme (#2741)
Co-authored-by: Zhang Yuxuan <1373529784@qq.com>
2024-09-24 17:50:06 +08:00
Jastandtomsun28 ebe7a6f8fe [Improve] Modify Kafka monitoring execution priority (#2743)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-09-24 11:31:59 +08:00
linDong 163a5a05ed [improve]:Improve plugin (#2744) 2024-09-24 09:38:14 +08:00
ec195c1dbf [feature] support kafka admin monitor (#2733)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-09-22 23:16:04 +08:00
tomsun28 5fa88ec577 [release] update collector version 1.6.1 (#2739)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-09-22 17:56:16 +08:00
tomsun28 1e4dd6793e [license] update greptime dependency license (#2738)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-09-22 13:36:53 +08:00
tomsun28 a811b9f6cb [license] add ngx query builder license and update (#2737)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-09-22 12:19:32 +08:00
Logicandaias00 a8790c856b [release] release 1.6.1 rc2 and fix crlf encoding (#2724)
Signed-off-by: Logic <zqr10159@dromara.org>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-22 00:02:28 +08:00
Jast b9fdfbd50e [bugfix] fix code describe (#2734) 2024-09-21 12:51:02 +08:00
tomsun28 85b4a4ef0c [improve] revert modify bin shells (#2735) 2024-09-21 11:37:13 +08:00
aias00 febc911639 [improve] modify bin shells (#2723) 2024-09-19 16:07:39 +08:00
Logic 001e76db4b [improve]Add release windows script and update version. (#2722)
Signed-off-by: Logic <zqr10159@dromara.org>
2024-09-19 10:38:13 +08:00
tomsun28andshown ca27605640 [improve] use post request refresh token (#2720)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-09-16 16:24:07 +08:00
tomsun28 06ce10ec3a [bugfix] fix tag select component display and select error (#2719)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-09-16 11:07:17 +08:00
aias00 1c17c7cb44 [improve] support notify auto refresh (#2712) 2024-09-15 10:24:29 +08:00
tomsun28 a34ccdd769 [improve] refactor bulletin impl code (#2714)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-09-15 00:41:18 +08:00
f5a8ebeeca [Improve] module code struct (#2707)
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-14 11:16:34 +08:00
Logicandaias00 6c36d1d60a [bugfix] template upload (#2710)
Co-authored-by: aias00 <rokkki@163.com>
2024-09-13 21:36:22 +08:00
aias00andshown 90c027d6cc [bugfix] disallow adding tag with same key same value (#2700)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-09-13 14:30:13 +08:00
liutianyou c30295cf9c [improve] Increase the priority of configuration initialization (#2709) 2024-09-13 08:10:46 +08:00
Zhang Yuxuan bb0e2ea41c [doc] Add new committer blog (#2708) 2024-09-12 20:14:09 +08:00
16f52d1b6e [bugfix] Allow anonymous access for MongoDB Atlas and standalone instances (#2704)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-12 15:14:42 +08:00
ff3139e1de test: add unit test case for the util (#2701)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-09-12 09:14:05 +08:00
Jast 65639da9c4 [doc] Resolve error link (#2706) 2024-09-12 00:11:24 +08:00
aias00 af0dc23b45 [improve] add new committer blog (#2705) 2024-09-11 17:47:20 +08:00
shown 4b81ae4abf [improve]: extract common constant str (#2698) 2024-09-11 07:32:06 +08:00
Zhang Yuxuan d5fdccf1d2 [doc] Add a new committer (#2699) 2024-09-10 13:29:48 +08:00
4d9900b56b [bugfix] fix search value not clear (#2688)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-09-09 23:00:49 +08:00
liutianyouandLogic dab66d4f16 [doc] update doc for feishu notification (#2694)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-09-09 10:30:49 +08:00
shown cd028d8464 [improve] extract some common methods (#2691)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-09-09 09:13:20 +08:00
c4c56c6f85 [doc] remove personal info (#2685)
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-09-08 17:37:59 +08:00
6a852b2b8d fix: fix e2e unstable (#2684)
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-09-08 16:54:08 +08:00
aias00 c153433165 [improve] support kanban set auto refresh Interval (#2686) 2024-09-08 16:36:50 +08:00
aias00 27175ef3ef [bugfix] fix status page unknowing status value (#2689) 2024-09-08 16:32:10 +08:00
tomsun28 c507f952de [doc] add new contributor and committer (#2687)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-09-07 23:57:37 +08:00
liutianyou b00a50a469 [improve] beautify lark notification (#2683) 2024-09-07 10:38:44 +08:00
98354f267e [chore] make the controller response be easy (#2679)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-06 11:26:47 +08:00
tomsun28 9080ccd2ba [bugfix] fix load error when edit monitor and can not update (#2682)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-09-06 08:47:58 +08:00
aias00andshown bd3420c4a7 [bugfix] fix kanban failed to add all selections (#2680)
Signed-off-by: aias00 <liuhongyu@apache.org>
Signed-off-by: aias00 <rokkki@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-09-05 22:18:25 +08:00
aias00andshown 7506429fc4 [improve] add kanban auto refresh (#2681)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-09-05 22:10:47 +08:00
Yzzz e9bfee6e7e [optimize] In a minor issue, the values of max and min are reversed (#2678) 2024-09-05 22:02:41 +08:00
aias00 b8a2e865cd [bugfix] fix monitor edit error (#2677) 2024-09-05 09:21:46 +08:00
liutianyou 83c5a3a08a [fix] error image (#2676) 2024-09-05 08:13:41 +08:00
4b7178af02 test: add more unit tests for the collects (#2671)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-09-04 19:42:22 +08:00
aias00 1841ed59d8 [bugfix] fix custom dashboard show metrics error (#2675) 2024-09-04 18:42:42 +08:00
aias00andLogic 4080f5f068 [bugfix] clear filters when ok\cancel (#2674)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-09-04 16:47:22 +08:00
aias00andLogic 25ee822c5f [bugfix] filter dashboard metrics (#2673)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-09-04 16:44:37 +08:00
aias00andLogic 969c4a95c5 [bugfix] fix bulletin name check (#2669)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-09-04 16:42:01 +08:00
aias00andLogic a15a106a46 [task] customize dashboard jump to monitor detail (#2668)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-09-04 16:39:58 +08:00
aias00 74ed750860 [bugfix] fix monitor detail display error (#2667) 2024-09-04 16:37:08 +08:00
ef377912ef [improve] improve plugin upload check (#2666)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-09-03 23:44:11 +08:00
cb11f11ace [feature] add NVIDIA monitor (#2643)
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-09-03 23:38:53 +08:00
589b0d915d [feature]Support grafana charts for Prometheus (#1658)
Signed-off-by: Logic <zqr10159@dromara.org>
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: liutianyou <tianyou.liu@qq.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-03 23:09:14 +08:00
50a18f2813 [improve] improve markdown format for MD045 (#2658)
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: Jast <shenghang@apache.org>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-09-03 23:00:00 +08:00
86ca715a64 test: add more unit tests for some services (#2653)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-03 22:40:51 +08:00
7b886fe72d [doc] Add doc for linux_script and windows_script (#2646)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-03 22:26:25 +08:00
9024b2aca2 [improve] improve markdown format for MD033 (#2657)
Co-authored-by: aias00 <rokkki@163.com>
Co-authored-by: Jast <shenghang@apache.org>
2024-09-03 22:06:50 +08:00
JastandCalvin 5cd9590907 [improve] Update ElasticSearch monitoring template. Description supports i18n (#2662)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-09-03 21:35:14 +08:00
sherry-peng2333 8e38b8ba9b fix the mounting issues in script/docker-compose/hertzbeat-postgresql-victoria-metrics/docker-compose.yaml (#2660)
Signed-off-by: sherry-peng2333 <70619577+sherry-peng2333@users.noreply.github.com>
2024-09-03 16:25:23 +08:00
b_mountainand刘进山 47e632a088 [fix] fix byte type npe. (#2659)
Co-authored-by: 刘进山 <liujs@hsmap.com>
2024-09-03 11:32:05 +08:00
4a691777aa [improve] improve plugin params (#2655)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-09-02 23:31:13 +08:00
wyfvsfyandaias00 ec92f4ee97 translation airflow.md to English (#2656)
Co-authored-by: aias00 <rokkki@163.com>
2024-09-02 23:01:14 +08:00
Jast 714f216470 [improve]improve doc 052 (#2654) 2024-09-02 21:55:42 +08:00
Logic 16cb8f681c [doc]Improve install doc (#2650)
Signed-off-by: Logic <zqr10159@dromara.org>
2024-09-02 21:16:11 +08:00
Calvin 3ec150c586 [improve] improve markdown format for MD003 (#2649) 2024-09-02 08:28:07 +08:00
liutianyouandaias00 31fcb0d839 [improve] added a method to obtain plugin parameters (#2644)
Co-authored-by: aias00 <rokkki@163.com>
2024-09-01 20:13:28 +08:00
Logicandliutianyou 3e1d87b59f Grafana doc (#2647)
Co-authored-by: liutianyou <tianyou.liu@qq.com>
2024-09-01 18:38:28 +08:00
liutianyou 2076693a16 [doc] help doc for mqtt (#2645) 2024-09-01 17:37:11 +08:00
7bb049f2df [improve] improve code (#2523)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: aias00 <rokkki@163.com>
2024-09-01 00:00:56 +08:00
shown 19955fa59a [improve] add md-lint command and docs (#2640) 2024-08-31 20:01:47 +08:00
049c0937bc [improve] update thread pool nums policy (#2606)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-31 16:07:36 +08:00
liutianyouandLogic 2763ee4dc4 [doc]update doc for custom plugin (#2245)
Signed-off-by: liutianyou <tianyou.liu@qq.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-08-31 09:47:12 +08:00
497fc915c3 test: add unit tests for BulletinController (#2642)
Signed-off-by: rick <LinuxSuRen@users.noreply.github.com>
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-30 18:35:44 +08:00
Kerwin Bryant e945c42632 Fixed #2632 (#2638) 2024-08-30 17:26:05 +08:00
Logicandshown 59398bd7c6 [doc]Grafana doc (#2636)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-30 10:24:37 +08:00
liutianyou d49cb37c6f [improve] improve plugin (#2637) 2024-08-30 08:54:03 +08:00
89be682a88 [imporve] Adjustment of parameter verification (#2635)
Co-authored-by: 刘进山 <liujs@hsmap.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-30 00:06:53 +08:00
aias00andshown 0d73ac6fc4 [improve] support master custom java opts (#2634)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-29 23:27:10 +08:00
17636ed582 [improve] add oceanbase help md (#2619)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Jast <shenghang@apache.org>
2024-08-29 23:22:56 +08:00
aias00andCalvin 9cb50b7190 [Improve] add valkey help md (#2633)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-29 23:03:17 +08:00
0e49e100d8 [feature] Implement custom parameters for plugins (#2616)
Signed-off-by: liutianyou <tianyou.liu@qq.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: liutianyou <tianyou.liu@qq.com>
2024-08-29 20:33:17 +08:00
Logic 24678c2ca0 [doc] Bulletin doc (#2631) 2024-08-29 12:18:35 +08:00
6074c08e1a [feat] support monitor MQTT connections (#2618)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-08-29 11:05:54 +08:00
3eb6fb35f4 [improve]Optimize Hbase Master and Regionserver monitoring (#2624)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-08-29 10:55:53 +08:00
liutianyouandLogic 466ac37e66 [fix] fix i8n error in bulletin (#2627)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-08-29 10:10:07 +08:00
aias00andshown a5bc6327f9 [Improve] translate redis help md (#2621)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-28 22:59:57 +08:00
aias00andshown 2e9021a12d [improve] translate pop3 help md (#2622)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-28 22:37:43 +08:00
Jast 1dd08b8b19 [improve]Centos network card information monitoring optimization (#2626) 2024-08-28 22:05:37 +08:00
6117396377 [imporve] null judge modify. (#2558)
Co-authored-by: 刘进山 <liujs@hsmap.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-27 23:54:50 +08:00
d71b9aa048 simplify the convertUnit (#2595)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Eric <247677858@qq.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-27 22:01:44 +08:00
tomsun28andshown 525980f919 [webapp] bugfix monitors pageable not work (#2602)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-27 11:02:58 +08:00
6e430bcab6 Add push dao unit tests (#2614)
Co-authored-by: I744506 <temirlan.basitov@sap.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-27 11:01:16 +08:00
shown 12a53c69da [optimize]: update github action (#2608)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Signed-off-by: shown <yuluo08290126@gmail.com>
2024-08-27 10:44:04 +08:00
Jastandshown 1799e00ec9 [doc]markdown md046 (#2613)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-27 10:40:05 +08:00
5d416e855b [Feature] Supports Bulletin to view all metrics. (#2584)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: kerwin612 <kerwin612@qq.com>
2024-08-27 06:25:38 +08:00
tomsun28andshown 5eef247a5b [improve] enable and fix test src checkstyle (#2610)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-26 19:13:16 +08:00
Jast 77f725cf42 [fixbug]Fixbug kafka version display (#2609) 2024-08-26 17:03:56 +08:00
shownandJast b7969e78c9 [improve]: enable md040 rules (#2607)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Jast <shenghang@apache.org>
2024-08-26 13:10:13 +08:00
2f4343c453 [Improve] improve markdown format for MD029 (#2604)
Co-authored-by: shown <yuluo08290126@gmail.com>
Co-authored-by: Jast <shenghang@apache.org>
2024-08-26 10:02:21 +08:00
857e4118f0 [improve] Improve markdown md035 (#2592)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-26 09:27:40 +08:00
Gao Jianandshown c3ffad76ca [fixbug]: Fix Redfish protocol parse bug (#2597)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-25 19:01:40 +08:00
tomsun28andshown 102c72bcc6 [doc] fix markdown lint md013 check (#2599)
Co-authored-by: shown <yuluo08290126@gmail.com>
2024-08-25 18:46:01 +08:00
tomsun28 88aeb9fc21 [bugfix] fix alarm recover not match in converge reduce in some condition (#2603)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-08-25 18:24:10 +08:00
crossoverJie 20f89f3b3b [Improve]Temporarily disable import sort (#2601) 2024-08-25 12:16:18 +08:00
aias00 7facbe827c [improve] improve md format MD025 (#2587) 2024-08-25 09:30:43 +08:00
e3a1b8345f [improve] improve markdown format for MD047 (#2586)
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: Jast <admin@hadoop.wiki>
2024-08-24 07:52:56 +08:00
0f0f00c700 [feature] manage dependencies version by parent pom (#2571)
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
2024-08-23 23:06:49 +08:00
Kerwin Bryant 51699e34cd [webapp] fix #2244 and update detail ui (#2590) 2024-08-23 17:27:34 +08:00
Jast 343afd517d [Improve] improve markdown format for MD041 (#2588) 2024-08-23 11:33:06 +08:00
tomsun28andJast b602d8ceb6 [Improve] remove 1.4 version doc and improve markdown format for MD001 (#2585)
Co-authored-by: Jast <admin@hadoop.wiki>
2024-08-23 09:26:56 +08:00
bad28bccdb [improve] extra project configuration common filed to constants (#2540)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-22 23:49:02 +08:00
aias00 eea68d2a27 [feature] add greenplum help md (#2570)
Signed-off-by: aias00 <rokkki@163.com>
2024-08-22 23:13:19 +08:00
Jastandtomsun28 fff291da82 [Improve] improve markdown format for MD024 (#2580)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-22 22:53:48 +08:00
aias00 97aada9956 [feature] add vastbase help md (#2569)
Signed-off-by: aias00 <rokkki@163.com>
2024-08-22 16:48:43 +08:00
Jastandtomsun28 d056ce2aa6 [feature] support dead link check (#2579)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-21 23:19:14 +08:00
c2d92eb57d [Improve] improve doc check (#2572)
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-21 23:06:39 +08:00
4dceb42dc7 [feature] add iceberg help md (#2573)
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
2024-08-21 19:53:26 +08:00
YuLuoandtomsun28 1fac6ab2fa [e2e] add some configuration args to observation atest running status (#2565)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-21 18:52:01 +08:00
235df8bca1 [feature] add kvrocks template (#2564)
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-21 18:29:20 +08:00
YuLuoandtomsun28 603bc3222a chore: rename push service unit test class name (#2562)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-21 17:54:20 +08:00
tomsun28andYuLuo a1d73a292c [webapp] auto resize the monitor detail ui width (#2577)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
2024-08-21 13:39:39 +08:00
aias00 bdfffeec4c [bugfix] fix kingbase spotless apply (#2575) 2024-08-21 10:54:54 +08:00
aias00 bc47768bfb [feature] add kingbase help md (#2568) 2024-08-20 23:57:09 +08:00
Jastandtomsun28 98b03b62c7 [doc] update doc style check (#2560)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-20 00:31:51 +08:00
Jast ceab3023b1 [improve] linux chart display (#2559) 2024-08-19 22:25:24 +08:00
Jastandtomsun28 a49fa3d91b [fixbug] Fixbug doc format temporary process (#2557)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-19 14:24:05 +08:00
5d87275206 [improve] support plugins using other jar (#2553)
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-08-19 12:36:51 +08:00
a2bd61947b [imporve] move ai package and improve ai code. (#2542)
Co-authored-by: 刘进山 <liujs@hsmap.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: linDong <56677297@qq.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-19 00:48:34 +08:00
b_mountainandCalvin 7ac21d3171 [improve] Add GeneralConfigTypeEnum. (#2555)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-19 00:41:49 +08:00
YuLuo 4fdc048287 [doc] add new committer docs (#2554)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-08-18 22:53:58 +08:00
tomsun28andYuLuo e10e4b2d8d [improve] fix docker compose package script and update contributor doc (#2552)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
2024-08-18 16:45:06 +08:00
aias00andYuLuo 27d66a11c1 [type:feature] add greptimedb template (#2551)
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
2024-08-18 16:36:00 +08:00
YuLuo 19c7d84e53 [infra] remove redundant security bug reporting options (#2550)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-08-18 15:42:35 +08:00
aias00andYuLuo 031e83d701 [bugfix] clear qbdata when cascade change (#2545)
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
2024-08-18 09:30:09 +08:00
aias00andCalvin 5b50307e8c [feature] add valkey template (#2547)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-18 07:33:26 +08:00
Logic 4f7ba7355f Add Contributors' chart (#2548) 2024-08-17 23:04:15 +08:00
aias00andYuLuo 4733ac2eba [bugfix] fix monitor search sync error (#2546)
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
2024-08-17 17:38:21 +08:00
YuLuo e157d82a18 [infra] update actions checkout version to 4 (#2544)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-08-17 15:26:03 +08:00
YuLuo f1a123ee76 [chore] fix typo (#2543)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-08-17 10:14:13 +08:00
584b70a726 [improve] delete deprecate field (#2537)
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-17 00:18:22 +08:00
tomsun28andYuLuo 9d62270131 [improve] auto generate readable random monitor name (#2531)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
2024-08-17 00:04:19 +08:00
53a506569a [improve]ElasticSearch historical chart display optimization (#2535)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: YuLuo <yuluo08290126@gmail.com>
2024-08-16 23:56:02 +08:00
0ec6a3b6ba [imporve] simplify NoticeConfig Code. (#2530)
Co-authored-by: 刘进山 <liujs@hsmap.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-16 22:03:55 +08:00
kangliandtomsun28 c8560e6b16 [bugfix] webhook template json escape (#2532)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-16 17:49:57 +08:00
YuLuoandCalvin 361e573d8e [optimize] use okhttpclient connection pool (#2529)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-16 10:49:43 +08:00
tomsun28 c12b4c0d84 [bugfix] fix github action build docker image error (#2525)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-08-15 21:10:55 +08:00
tomsun28 9b065f7ec0 [infra] support build and push docker image to hub nightly everyday (#2517) 2024-08-14 00:17:35 +08:00
tomsun28 ffa81a68f7 [infra] add sub git module hertzbeat-helm-chart (#2522) 2024-08-14 00:14:30 +08:00
Calvin ed21cc3a94 [improve] fix spotless check failed (#2521) 2024-08-13 22:29:56 +08:00
35616d2763 [improve] add windows i18n (#2513)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-13 14:19:08 +08:00
Jast fbb74199c9 [feature] add markdown formatter (#2519) 2024-08-13 14:16:41 +08:00
YuLuoandCalvin 3a2350b86d [improve] add MemoryDataStorage unit test (#2515)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-12 23:34:08 +08:00
YuLuoandtomsun28 b39602f15d [improve] add MetricsDataRedisCodec unit test (#2514)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-12 23:28:22 +08:00
Jastandtomsun28 86c7c2dadf [Improve]add presto monitor metric (#2516)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-12 23:26:32 +08:00
aias00andtomsun28 ddfa60e597 [improve] add spring tidb i18n (#2512)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-12 23:04:48 +08:00
aias00 e34b64062e [improve] add shenyu\spring gateway i18n (#2511) 2024-08-12 22:56:46 +08:00
aias00andtomsun28 0634e7bb2e [improve] add redis cluster i18n (#2510)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-12 22:51:08 +08:00
aias00andtomsun28 0920910738 [improve] add pulsar push rabbitmq i18n (#2509)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-12 22:45:40 +08:00
aias00andtomsun28 8ae4d0e2d3 [improve] add oracle i18n (#2508)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-12 22:07:31 +08:00
aias00 1c5b3f9c3f [improve] add kafka influxdb jetty i18n (#2507) 2024-08-12 21:14:33 +08:00
YuLuoandtomsun28 a55a098983 [improve] Replacing characters with http constants (#2500)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-12 08:00:17 +08:00
aias00andliutianyou a8c1c48390 [improve] add more yml i18n (#2505)
Co-authored-by: liutianyou <tianyou.liu@qq.com>
2024-08-12 07:46:24 +08:00
aias00andtomsun28 9f7be0292a [improve] add hertzbeat i18n (#2506)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-11 22:12:27 +08:00
aias00andtomsun28 3250bc714d [improve] add hive i18n (#2504)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-11 22:06:03 +08:00
YuLuoandtomsun28 3d3d881722 [improve] add ObjectStoreConfigServiceImpl unit test (#2502)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-11 16:44:53 +08:00
aias00 3c01298e86 [feature] add iceberg template (#2503) 2024-08-11 16:00:48 +08:00
YuLuo c650972f3d [improve] add AccountServiceImpl unit test (#2501)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-08-11 11:21:15 +08:00
YuLuoandtomsun28 df4272a2f8 [bugfix] fix unit test errors in different languages. (#2498)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-10 09:16:14 +08:00
23d16ae921 [refactor] move code from CollectorController to CollectorService (#2433)
Co-authored-by: ceekay <chandrakant.vankayalapati@github.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-09 23:42:12 +08:00
tomsun28andKerwin Bryant aeac1ffed4 [bugfix] fix alarm threshold ava can not modify (#2494)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
2024-08-09 17:09:31 +08:00
YuLuoandtomsun28 bac607f6dd [Improve] add WarehouseServiceImpl unit test (#2497)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-08 23:55:45 +08:00
YuLuoandtomsun28 8faa13e7b4 [Improve] add AvailableAlertDefineIni & SystemSecretServiceImpl unit test (#2496)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-08 23:03:24 +08:00
tomsun28andcrossoverJie 3113487192 [refactor] refactor connect common cache (#2469)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: crossoverJie <crossoverJie@gmail.com>
2024-08-08 22:35:51 +08:00
liutianyouandtomsun28 7a7d4792cd [improve] remove demo plugin (#2492)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-08 20:41:08 +08:00
YuLuoandtomsun28 ec8cc517d1 [Improve] add SystemGeneralConfigServiceImpl & SmsGeneralConfigServiceImpl unit test (#2490)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-07 23:31:24 +08:00
YuLuoandtomsun28 12fee7fb01 [improve] add StatusPageServiceImpl unit test (#2491)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-07 23:21:03 +08:00
YuLuoandtomsun28 339a33a0bd [Improve] add ObsObjectStoreServiceImpl unit test (#2488)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-07 23:18:24 +08:00
aias00 e3a0fb4537 [improve] add vastbase template (#2487) 2024-08-07 23:16:46 +08:00
YuLuoandtomsun28 9b328ce34c [Improve] add unit test & fix some bugs (#2482)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-07 16:32:38 +08:00
YuLuoandtomsun28 e8dc6482ff [improve] add YamlImExportServiceImpl unit test (#2470)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-07 09:18:36 +08:00
c4fa738d65 [improve] add some code style improve (#2481)
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-07 09:09:16 +08:00
6ac092dcd5 [improve] use file constant & extract file utils (#2474)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-06 22:15:26 +08:00
YuLuoandtomsun28 fe403ed880 [improve] add TemplateConfigServiceImpl unit test (#2471)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-06 21:49:31 +08:00
kangliandCalvin d6b19691fb [refactor] move code from MetricsDataController to MetricsService (#2437)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-06 21:07:53 +08:00
aias00 c2c00d44c7 [doc] fix md index order and typo (#2480) 2024-08-06 19:10:23 +08:00
YuLuo e9da2d2925 [Improve] add push module controller unit test (#2451)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
2024-08-06 10:57:31 +08:00
tomsun28 58e6e1a2a7 [improve] optimize collect thread prevent cpu idling (#2468)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2024-08-06 10:17:14 +08:00
YuLuoandCalvin 0c2cc59b55 [chore] add service test tmpl file (#2472)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-06 00:37:55 +08:00
kangliandCalvin 111f0f6b99 [refactor] move code from AlertSilencesController to AlertSilenceService (#2436)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-06 00:03:43 +08:00
e560502d8e [refactor] move code from AlertsController to AlertService (#2435)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-05 23:52:40 +08:00
YuLuoandtomsun28 67983c2702 [Improve] add JsonImExportServiceImpl unit test (#2461)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-05 15:42:54 +08:00
YuLuoandtomsun28 033240341b [Improve] add ExcelImExportServiceImpl unit test (#2460)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-05 15:36:33 +08:00
YuLuoandtomsun28 35a8ec4275 [Improve] add AiServiceFactoryImpl unit test (#2459)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-05 15:10:31 +08:00
linDongandtomsun28 9ac45ab343 [improve] use constant (#2458)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-05 15:07:38 +08:00
aias00andtomsun28 4b5a97044c [improve] add missed field i18n (#2465)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-05 14:37:05 +08:00
lingluojunandtomsun28 477af0959f [refactor] extracting common function for KafkaCommonDataQueue (#2453)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-05 12:34:18 +08:00
YuLuoandtomsun28 a5b8f59242 feat fix log upload, when e2e fails it still uploads (#2464)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-05 12:00:27 +08:00
linDongandtomsun28 98b8d95b92 [improve] : Optimize queues to obtain data and prevent cpu idling (#2466)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-05 11:42:07 +08:00
kangliandCalvin c0ef4a436e [refactor] move code from AlertConvergesController to AlertConvergeService (#2428)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-04 23:54:43 +08:00
kangliandCalvin 254421bc46 [refactor] move code from AlertReportController to AlertService (#2434)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-04 23:37:52 +08:00
Jast deb827a572 [doc] Add zookeeper doc (#2456)
merge
2024-08-04 19:22:54 +08:00
YuLuoandtomsun28 7eef0c21f1 [Improve] add push module service unit test (#2452)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-04 00:00:49 +08:00
YuLuoandtomsun28 58920978c3 [Improve] add StatusPagesController & StatusPagePublicController unit test (#2446)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-03 23:59:35 +08:00
YuLuoandtomsun28 a4c6a6045f [Improve] add MetricsController unit test (#2445)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-03 23:54:40 +08:00
YuLuoandtomsun28 6e47da758e [Improve] add GeneralConfigController unit test (#2444)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-03 23:53:19 +08:00
YuLuoandtomsun28 ae03111a75 [Improve] add AiController unit test (#2443)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-03 23:47:24 +08:00
lingluojunandtomsun28 69b8db7048 [improve] remove useless invoke method (#2450)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-03 23:32:46 +08:00
aias00andtomsun28 de657f9144 [improve] add i18n for postgresql kingbase greenplum (#2448)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-03 23:26:36 +08:00
YuLuoandtomsun28 822825b614 [improve] add TimeZoneListener test (#2432)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-03 23:20:24 +08:00
YuLuoandtomsun28 7672502c3d [Improve] add AlertSerializer & AlertDeserializer unit test (#2430)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-03 18:19:30 +08:00
YuLuo 598ed2ea16 [ci] add e2e logs to debug e2e test & delete unnecessary files (#2447)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-08-03 18:10:07 +08:00
kangliandCalvin aee969a18a [refactor] move code from AlertDefinesController to AlertDefineService (#2429)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-02 23:15:45 +08:00
YuLuoandtomsun28 b0438da537 [Improve] add KafkaMetricsDataSerializer & KafkaMetricsDataDeserializer unit test (#2431)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-02 18:01:53 +08:00
aias00 c85e182119 [feature] add greenplum template (#2442) 2024-08-02 17:12:40 +08:00
aias00 7446d3ebbf [feature] add oceanbase template (#2439) 2024-08-02 12:04:18 +08:00
YuLuoandtomsun28 f6e8e64e23 [Improve] add AlertSilenceController unit test (#2425)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-02 10:34:55 +08:00
Jast 2a3f4dfa80 [Improve] script command blacklist (#2438) 2024-08-02 10:05:10 +08:00
YuLuoandtomsun28 3d99835487 [Improve] add AlertConvergesController & AlertConvergeController unit test (#2424)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-01 10:31:18 +08:00
YuLuoandtomsun28 3a7d5829ad [Improve] add AlarmCommonReduce unit test (#2412)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-01 10:16:26 +08:00
kangliandtomsun28 51b1a9bdc7 [bugfix] fixed jpa expired data clean error (#2329)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-08-01 10:08:11 +08:00
kangliandCalvin 181ca5aa5e [refactor] move code from MonitorsController to MonitorService (#2415)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-08-01 00:01:11 +08:00
Limboandtomsun28 a5c444a49a [chore] update web-app readme (#2423)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-31 19:32:25 +08:00
Kerwin Bryant 2784c8fa6b Optimize the execution efficiency of Gitpod tasks (#2422) 2024-07-31 19:28:31 +08:00
kangliandCalvin ae4a5b1c63 [refactor] move code from GeneralConfigController to ConfigService (#2414)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-07-31 00:48:10 +08:00
kangliandCalvin c7f4390638 [refactor] move code from NoticeConfigController to NoticeConfigService (#2416)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-07-31 00:41:40 +08:00
kangliandCalvin c998d3b850 [refactor] move code from PluginController to PluginService (#2417)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-07-31 00:36:06 +08:00
kangliandCalvin 861e9d377f [refactor] move code from TagController to TagService (#2418)
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-07-31 00:31:08 +08:00
YuLuoandtomsun28 c1252fbe2b [Improve] add AlarmConvergeReduce unit test (#2410)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-30 23:57:51 +08:00
YuLuoandtomsun28 dce9a4b15e [Improve] add AlarmSilenceReduce unit test (#2409)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-30 23:37:13 +08:00
Kerwin Bryant 15768d8077 [infra] support contribute with Gitpod (#2419) 2024-07-30 21:31:09 +08:00
linDongandtomsun28 2824542037 [doc] Fix profile (#2408)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-30 18:26:25 +08:00
aias00andtomsun28 f9bce29523 [feature] add sms config (#2399)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-30 18:20:00 +08:00
aias00andtomsun28 6b7dbd53f4 [doc] fix mistake md content (#2406)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-29 23:27:50 +08:00
aias00andtomsun28 f5e88db841 [improve] modify ssh client common config (#2403)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-29 22:46:08 +08:00
kangliandtomsun28 82219d14df [Improve] add database file server provider (#2371)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-29 22:30:47 +08:00
Loongandtomsun28 05bce69b84 [collector] bugfix Fix ssh session not closing properly (#2398)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-29 20:44:21 +08:00
YuLuoandCalvin bc49280c3c [Improve] add AlertDefineYamlImExportServiceImpl unit test (#2392)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-07-29 17:05:17 +08:00
Kerwin Bryant 90035cac5d [doc] introduction document for the new committer (#2401) 2024-07-29 12:26:57 +08:00
YuLuoandCalvin 3487e4a16b [Improve] add AlertDefineJsonImExportServiceImpl unit test (#2391)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-07-29 01:24:03 +08:00
YuLuoandCalvin 974b27e878 [Improve] add AlertSilenceServiceImpl unit test (#2393)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-07-29 01:10:24 +08:00
aias00andtomsun28 22459c5b6f [improve] add some code style improve (#2376)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-28 19:14:04 +08:00
linDongandtomsun28 64e156be2a [doc] add committer introduction doc (#2394)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-28 16:58:24 +08:00
Calvinandtomsun28 a9827bbcef [refactor] move code from AccountController to AccountService (#2373)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-28 10:35:01 +08:00
Calvinandtomsun28 0ed1355d76 [docs] add new_committer.md (#2390)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-28 09:55:01 +08:00
Calvinandtomsun28 0b81717a9e [docs] update img of new_committer_process.md (#2389)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-28 09:43:42 +08:00
Kerwin Bryantandtomsun28 86ca62c67a [bugfix] fixed the issue of missing form validation for the "Rule(Expr)" item in the "Threshold" form (#2387)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-28 09:32:15 +08:00
YuLuo 7488dfadc9 [Improve] add SmsAlertNotifyHandlerImpl unit test (#2384)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-07-26 22:03:06 +08:00
YuLuoandtomsun28 50fe51bd95 [Improve] add WebHookAlertNotifyHandlerImpl unit test (#2383)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-26 11:55:19 +08:00
aias00andtomsun28 8233a62aea [type:feature] support alerts click to monitor detail (#2385)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-26 11:41:35 +08:00
YuLuoandtomsun28 7367b7315b [Improve] add AlertDefineExcel unit test and fix bugs (#2375)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-26 11:33:15 +08:00
tomsun28andCalvin 9e305f7a59 [bugfix] fix monitors alarms some query filter not work, update link (#2382)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Calvin <naruse_shinji@163.com>
2024-07-26 00:03:47 +08:00
YuLuoandtomsun28 3d9be220e6 [Improve] add ServerChanAlertNotifyHandlerImpl unit test (#2381)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-25 22:29:37 +08:00
YuLuoandtomsun28 659346ddd7 [Improve] add CollectServer unit test (#2379)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-25 21:47:15 +08:00
kangliandtomsun28 7f0b340663 [bugfix] fix email send error (#2378)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-25 21:39:36 +08:00
YuLuo a427099db7 [Improve] add GotifyAlertNotifyHandlerImpl unit test (#2380)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-07-25 21:17:29 +08:00
YuLuoandtomsun28 d1d28e6763 [Improve] add EmailAlertNotifyHandlerImpl unit test (#2370)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-25 10:13:03 +08:00
YuLuoandtomsun28 ba70b2f269 [Improve] add WeComAppAlertNotifyHandlerImpl send notify test (#2369)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-25 08:33:30 +08:00
YuLuoandtomsun28 2352ceef3d [Improve] add dispatchalarm unit test (#2364)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-25 08:14:34 +08:00
YuLuoandtomsun28 927625a79f [Improve] add timezoneutil unit test (#2362)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-25 00:23:17 +08:00
linDongandtomsun28 16a6620ff6 [fix] fix committer name (#2372)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-25 00:17:08 +08:00
YuLuoandtomsun28 a1d016e5d5 [Improve] add strbuffer unit test (#2361)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 23:55:27 +08:00
Kerwin Bryantandtomsun28 40aa5a4d73 Fixed the issue of style anomaly caused by incorrect usage of nz-card-tab (#2368)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 23:48:47 +08:00
YuLuoandtomsun28 aef7ac23c4 [Improve] add prometheusUtil unit test (#2360)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 23:45:53 +08:00
Zhang Yuxuanandtomsun28 348b50c4c6 [feature] Optimize script protocol and add Windows-script yml template (#2367)
Signed-off-by: Zhang Yuxuan <1373529784@qq.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 23:38:10 +08:00
liutianyouandtomsun28 88538890b4 [doc] supplement custom plugin doc (#2309)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 23:28:09 +08:00
kangliandtomsun28 fa4a3fd9e1 [imporve] add template i18n map verify (#2345)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 23:20:44 +08:00
Kerwin Bryantandtomsun28 3a24edb309 Fixed the issue of a fleeting vertical scrollbar appearing in tab-content (#2363)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 23:11:39 +08:00
aias00andtomsun28 e142a498e2 [improve] upgrade ssh core dependency version (#2349)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 23:05:53 +08:00
f4685aa75a [bugfix] Unable to specify collector when creating a monitor (#2311)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: Kerwin Bryant <kerwin612@qq.com>
2024-07-24 11:25:25 +08:00
kangliandtomsun28 f038ec5326 [Improve] add CommonUtil unit test (#2346)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 10:15:05 +08:00
aias00andtomsun28 06186c5ccc [improve] modify Intervals steps (#2348)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 09:43:25 +08:00
Calvinandtomsun28 6c931956fa [improve] add redis data storage test case (#2356)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 09:34:25 +08:00
YuLuoandtomsun28 809f679375 [Improve] add DbAlertStoreHandlerImpl unit test (#2353)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 09:29:15 +08:00
Logicandtomsun28 b31d8b1380 [bugfix]: correct setInterval time interval to 2 minutes (#2355)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 00:11:43 +08:00
Kerwin Bryantandtomsun28 1bba56bfbc Optimize the layout of the "Deploy Collector" modal (#2354)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 00:08:07 +08:00
YuLuoandtomsun28 357068cc8f [Improve] add CollectDispatcher & NettyDataQueue unit test (#2336)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-24 00:04:38 +08:00
YuLuoandtomsun28 8a88607be9 [Improve] add collectJonService unit test (#2351)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-23 23:30:44 +08:00
YuLuoandtomsun28 15e9bd0656 [Improve] add redis data queue unit test (#2330)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-23 23:13:03 +08:00
Kerwin Bryantandtomsun28 aa58f0af7f Remove the empty footer of "AppSwitchModal" (#2352)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-23 22:59:41 +08:00
Kerwin Bryantandtomsun28 115f7b40c5 [bugfix] Fixed an issue of ssl linkage port on the monitoring editing page (#2350)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-23 22:56:03 +08:00
aias00andtomsun28 d2c19cbf95 [type:feat] support KingBase database monitor (#2341)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-23 22:31:03 +08:00
aias00 173733784b [type:fix] fix threshold rule modal not clear bug (#2340) 2024-07-23 18:50:14 +08:00
Calvinandtomsun28 df4115a64c [refactor] translate chinese into english in web-app (#2343)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-23 08:59:56 +08:00
tomsun28 8d34de4422 [doc] update doc and deploy guide and committer (#2342) 2024-07-23 07:51:08 +08:00
aias00andtomsun28 a482d24770 [bugfix] fix i18n null (#2338)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-22 23:01:11 +08:00
YuLuoandtomsun28 aee8481204 [Improve] add some unit test (#2334)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-22 22:55:44 +08:00
Kerwin Bryantandtomsun28 497338e00f [bugfix] Fixed an i18n issue (#2332)
Signed-off-by: Kerwin Bryant <kerwin612@qq.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-22 22:39:10 +08:00
YuLuo e5236259ff [chore] optimize e2e folder struct (#2316)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
2024-07-22 22:32:10 +08:00
Calvinandtomsun28 712c54186e [feature] support redis cluster and sentinel mode in real time data (#2324)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-21 21:49:24 +08:00
YuLuoandtomsun28 7aa3be8f7d [Improve] add kafak queue unit test (#2317)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-21 21:40:53 +08:00
YuLuo f84e1fc5bf [Improve] add unit test & fix some bugs (#2326)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-07-21 21:03:37 +08:00
YuLuoandtomsun28 a8c1921fa3 [Improve] add commonThreadPoll unit test (#2327)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-21 17:33:02 +08:00
aias00andtomsun28 43afb0bc63 [type:fix] fix empty value not be handled by custom metrics (#2323)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-21 17:11:02 +08:00
YuLuoandtomsun28 ee9bdf6773 [Improve] add redis data queue impl (#2319)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-21 17:01:18 +08:00
229b4158cc [bugfix]: fix theme is invalidated after refresh (#2321)
Co-authored-by: Keaifa <keaifafafa@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-21 16:29:23 +08:00
liutianyou 3d49b288bb [doc] modify the document that uses PostgreSQL to store metadata (#2322) 2024-07-21 15:53:12 +08:00
Zhang Yuxuanandtomsun28 e0caceda92 [feature] Support collector to run scripts directly as agents to collect metrics. (#2313)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-20 15:59:05 +08:00
铁甲小宝andtomsun28 0b73e0900b [bugfix] Notice template fix (#2320)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-20 15:26:45 +08:00
Kerwin Bryantandtomsun28 1a09611ad6 [feature] Add the editing mode of "complex rule nesting" to support "threshold rules" (#2315)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-20 15:03:10 +08:00
jiangshandtomsun28 be0de49646 [manager] collectorApi unit test case and example (#2306)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-20 14:46:16 +08:00
YuLuoandtomsun28 061423d301 [chore] Update readme doc style (#2305)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-20 14:25:48 +08:00
YuLuoandtomsun28 6421fef548 [Improve] Optimize spring auto configuration registry (#2304)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-20 10:24:51 +08:00
kangliandtomsun28 70af0669c6 [bugfix] Only POST and PUT methods carry payload (#2302)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-19 16:53:29 +08:00
YuLuoandtomsun28 55b3dd7f0c [Improve] Optimize ResourceBundle & add unit test. (#2297)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-19 16:51:19 +08:00
Calvin 91111e5555 [refactor] remove chinese and change code style in Warehouse (#2312) 2024-07-19 16:28:40 +08:00
铁甲小宝 07913e7d51 A small code specification change. (#2299) 2024-07-18 01:01:29 +08:00
YuLuo 38d466b7f8 [Improve] add common/util/StrUtil unit test (#2301)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-07-17 22:36:42 +08:00
tomsun28andliutianyou 9770c9321e [doc] update committer and contributor (#2295)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: liutianyou <tianyou.liu@qq.com>
2024-07-17 16:28:29 +08:00
QBH-insist 7e5283ea0d [doc] fix mysql connections field explanation (#2294) 2024-07-17 10:25:42 +08:00
YuLuoandtomsun28 8f659f0fd1 [Improve] add common memory unit test (#2280)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-17 09:51:04 +08:00
liutianyouandtomsun28 7a4ee880c3 [doc]add new committer blog (#2291)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-16 23:18:53 +08:00
linDong 3b323e1882 [test] add NoticeConfigControllerTest and MonitorsControllerTest test (#2290) 2024-07-16 22:57:02 +08:00
YuLuoandtomsun28 acc617f9bd [Improve] add springContextHolder unit test (#2287)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-16 21:33:50 +08:00
Logic 5585993503 [bugfix] added basic auth support for VictoriaMetrics status check (#2282) 2024-07-16 16:35:44 +08:00
kangliandtomsun28 fd0e216818 [bugfix] fixed self signed certificate detected bug #1534 (#2221)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-15 14:57:21 +08:00
999b37ec4f [bugfix] fixed unable to establish a connection to nginx https port bug #1655 (#2218)
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-14 23:15:48 +08:00
linDongandtomsun28 823430bca9 [improve] : Modified loading application.yml (#2256)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-14 23:04:35 +08:00
Jastandtomsun28 9a7e0411a1 [fixbug]fix parameter parsing problem (#2251)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-14 01:10:35 +08:00
CalvinandLogic 3a2e0b3dd2 [feature] support collect data from header (#2266)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-13 09:07:58 +08:00
tomsun28andLogic 25d27880aa [doc] update download link doc (#2264)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-13 09:03:02 +08:00
liutianyouandtomsun28 8a11dacdba [bugfix] fix error when delete plugin (#2265)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-11 16:04:37 +08:00
Kerwin Bryant 467c595802 Fixed issue of plugin-upload form (#2267) 2024-07-11 15:58:05 +08:00
Kerwin Bryant c70cc5d9b7 Fixed failure of form validation (#2261) 2024-07-10 23:17:02 +08:00
Kerwin Bryant 8f9143001f Fixed failure of alert form validation (#2259) 2024-07-10 16:21:53 +08:00
Kerwin Bryant 3e50b96322 Fixed failure of monitoring form validation (#2258) 2024-07-10 15:42:10 +08:00
Kerwin Bryantandtomsun28 9cf0e6f4ee Decouple tag selection into an independent basic component. (#2257)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-09 23:55:48 +08:00
Logicandtomsun28 d47d3be6b4 [docs] Update guides for HertzBeat 1.6.0 upgrade and MySQL driver url (#2255)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-09 23:50:10 +08:00
Kerwin Bryant 6cabe3ca0c Further enhance and refine the optimizations implemented in #2215. (#2249)
Signed-off-by: Kerwin Bryant <kerwin612@qq.com>
2024-07-09 16:19:06 +08:00
Kerwin Bryant 874f7bdab3 Optimize the processing logic for Depend-type fields (#2248) 2024-07-09 10:52:12 +08:00
crossoverJieandtomsun28 f90d1e6242 [doc] Rename the blog file. (#2247)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-08 23:19:12 +08:00
Jastandtomsun28 afcb0c19fb [doc] add new committer blog (#2246)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-08 23:17:41 +08:00
Jastandtomsun28 0e7323fc04 [improve]update doc and prestodb properties (#2243)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-08 22:55:19 +08:00
feb60a7da9 [improve] : Optimize refactoring code, and supplement documentation (#2239)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-08 20:28:24 +08:00
linDongandcrossoverJie 2e7616cd56 [test] : Added the AppControllerTest test case (#2237)
Co-authored-by: crossoverJie <crossoverJie@gmail.com>
2024-07-08 19:38:21 +08:00
liutianyouandLogic 2d53abdaab [feature] add plugin management and support plugin hot reloading (#2238)
Signed-off-by: liutianyou <tianyou.liu@qq.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-08 18:53:49 +08:00
Kerwin BryantandLogic 9fed2c8a36 Optimize the monitor-edit page (#2242)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-08 18:27:12 +08:00
Kerwin BryantandLogic a4db859eee For Spring applications, newly added support basic-auth. (#2241)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-08 18:24:39 +08:00
linDongandLogic 9a3a2f0a54 [improve] : Delete Chinese comments, modify word errors, add Operatio… (#2236)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-08 17:42:47 +08:00
linDongand铁甲小宝 da05b6a151 [feature] Add presto db monitor (#2234)
Co-authored-by: 铁甲小宝 <2922035952@qq.com>
2024-07-08 14:39:38 +08:00
YuLuoandtomsun28 78621f2f14 [Improve] add TimePeriodUtil & ResourceBundleUtil unit test (#2233)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-07 20:50:09 +08:00
crossoverJieandtomsun28 a618ff00ea [doc] Introduce Committer (#2232)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-07 20:44:40 +08:00
Calvin 044c6d4bad [e2e] complete e2e test case (#2231) 2024-07-07 20:33:13 +08:00
Calvinandtomsun28 53787cc215 [bugfix] auto config timezone for Jackson (#2122)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-07 14:52:13 +08:00
d884278fed [fix] add springboot3.0 autoconfig (#2230)
Co-authored-by: jiawei.guo <18613599970@163.con>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-07 09:45:57 +08:00
YuLuoandtomsun28 21a7788522 [Improve] add ProtoJsonUtil unit test (#2228)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-06 23:23:36 +08:00
YuLuoandtomsun28 c7d192996a [Improve] add MapCap & LruMap unit test (#2227)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-06 22:55:58 +08:00
Calvin 78ce1cdc1f [refactor] remove chinese in application.yml (#2226) 2024-07-06 18:43:33 +08:00
tomsun28andLogic 12230b47ca [doc] update new contributors wall (#2225)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-06 09:15:51 +08:00
Jastandtomsun28 753ea44d2b [improve] optimize code structure and doc modify (#2222)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-05 23:54:08 +08:00
Logicandtomsun28 c3faea07c2 [improve] WeCom app supports sending to specific users, departments, tags (#2220)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-05 23:37:31 +08:00
mchgood 4149a027a7 [Improve] add @Override (#2224) 2024-07-05 22:52:51 +08:00
Kerwin Bryant 65d69eb191 Fixed style issue of chart in detail-page (#2219) 2024-07-05 17:29:21 +08:00
Kerwin Bryantandtomsun28 5e2e78fe95 Hide the area when there are no advanced settings (#2215)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-05 15:51:46 +08:00
Kerwin Bryantandtomsun28 e992da78cd Two new functions are added to the notification center (#2214)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-05 15:44:22 +08:00
YuLuo 2fd0090e83 [Chore] translate zh -> en in pom.xml (#2213)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
2024-07-05 15:34:50 +08:00
linDongandLogic a86fc85ffc [feature] : add SparkDesk Ai (#2185)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-05 11:23:03 +08:00
f3cecea307 [doc] add redis-cluster help document[New] (#2210)
Co-authored-by: Zhengke Zhou <zhengke.zhou@rightcapital.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-05 11:12:48 +08:00
Kerwin Bryant cbf6536923 Optimize the user experience of monitoring list pages. (#2211) 2024-07-05 11:07:42 +08:00
Kerwin Bryant 336eaffd27 Optimize the user experience of monitoring list pages. (#2209) 2024-07-05 10:04:58 +08:00
Kerwin BryantandLogic b9f8b7de72 Unified the search interaction of the list page. (#2207)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-05 09:58:11 +08:00
YuLuoandLogic 5b44a95298 [Improve] add IpDomainUtil & IntervaiExpressionUtil unit test (#2204)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-05 09:51:50 +08:00
YuLuoandLogic 97e5435296 [chore] update community contribution.md files (#2199)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-05 09:43:44 +08:00
JastandLogic 9b31fe785f [improve]add zookeeper envi monitor (#2202)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-05 09:40:35 +08:00
Kerwin BryantandLogic f6fcd52a50 Optimize the tags-selection. (#2198)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-05 09:35:41 +08:00
Kerwin Bryantandtomsun28 19a59004de Optimize the detail-page of monitor. (#2196)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-05 09:32:12 +08:00
Kerwin Bryantandtomsun28 f9b04ceb0c Add a missing multi-language translation. (#2194)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-04 19:44:39 +08:00
kangliandtomsun28 7ee227196d [bugfix] fixed "Alert Threshold Association with Monitors" is invalid bug #2105 (#2191)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-04 19:11:17 +08:00
Kerwin Bryantandtomsun28 20f3b01251 Optimize the [Threshold Rule] Form. (#2190)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-04 18:56:08 +08:00
Kerwin Bryant 9260bca057 Optimize the dashboard. (#2193) 2024-07-04 18:53:05 +08:00
Kerwin Bryantandtomsun28 6cdffbefac Optimize the visual experience of the monitoring details page. (#2189)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-04 10:49:31 +08:00
crossoverJieandtomsun28 0699e89346 [Improve] Refactor the notification sending logic. (#2180)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-04 10:21:01 +08:00
linDongandtomsun28 6222c51f41 [doc] add kimiAi doc (#2184)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-04 10:11:57 +08:00
Jastandtomsun28 ccbc7c698e [doc] add status page doc (#2186)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-04 09:10:49 +08:00
Kerwin BryantandLogic b5c7705f4a [bugfix] fixed issue of status-page (#2182)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-04 09:02:16 +08:00
Kerwin Bryant eeba46af9f Fixed issue of acions in list-page. (#2181) 2024-07-04 08:47:25 +08:00
b4d0e77c99 [feature] : support kimi Ai (#2171)
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-04 07:52:48 +08:00
Kerwin Bryant 1cb293ac03 [bugfix] fixed issue of monitor-select-menu-modal (#2177) 2024-07-04 07:47:19 +08:00
Kerwin Bryantandtomsun28 2ffdda8f26 [improve] optimize the monitoring editing form. (#2172)
Signed-off-by: Kerwin Bryant <kerwin612@qq.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-03 14:31:48 +08:00
Logic 4f1c62fa3a [doc]Add new committer crossoverJie. (#2170) 2024-07-02 19:58:30 +08:00
Kerwin BryantandLogic bfe68d8a06 Optimize the style of the header on the monitoring details page. (#2167)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-02 15:09:08 +08:00
Kerwin BryantandLogic 215271716d Optimize the content styling of the monitoring details page. (#2168)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-07-02 15:06:59 +08:00
Kerwin Bryant fafc6a8212 Optimize the help-message-show component (#2169) 2024-07-02 14:48:03 +08:00
liutianyouandtomsun28 e860e63f62 [bugfix] modify the prompt information for deleting used tags (#2165)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-02 09:40:05 +08:00
mchgood 702446190d [doc] update contribution.md (#2164)
Signed-off-by: mchgood <38482005+mchgood@users.noreply.github.com>
2024-07-01 23:02:59 +08:00
linDong 7251fb4185 [docs] : Alibaba Ai config doc (#2162) 2024-07-01 21:49:20 +08:00
12bb21cb8d [feature] :support alibaba Ai (#2153)
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-01 21:35:29 +08:00
Kerwin Bryant a7f30fc1f6 [bugfix] add missing multi-language translations. (#2163) 2024-07-01 13:57:32 +08:00
liutianyouandtomsun28 2cc779ce1c [fix] remove i18 message in restful api (#2161)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-07-01 09:59:11 +08:00
Kerwin Bryant 27c394d9f7 [bugfix] fixed notify module error (#2160) 2024-06-30 09:24:14 +08:00
b25f1834e8 Modified docker command documentation (#2158)
Co-authored-by: daixianglong <daixianglong@xiaomi.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-28 16:28:43 +08:00
Kerwin Bryant c878ac8fad [improve] support for formControlName to the multi-func-input component. (#2157) 2024-06-28 16:12:58 +08:00
JastandLogic 0ebcffa408 [improve] optimize delimiters (#2155)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-28 10:58:39 +08:00
Kerwin Bryant 5ef96061c9 [improve] add support for search type to the multi-func-input component. (#2154) 2024-06-28 10:28:55 +08:00
liutianyou c06f53c926 [bugfix] fix deleting component error (#2152) 2024-06-28 00:17:54 +08:00
Kerwin Bryant 51765d8f9a Add a basic component for "Monitoring Selection Menu" (#2150) 2024-06-27 19:35:19 +08:00
Kerwin Bryant 1fe37d3789 [feature] add a search to the setting define page. (#2148) 2024-06-27 11:32:25 +08:00
Kerwin BryantandLogic baf2d5f536 Fixed the issue that the [first loading] does not appear (#2144)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-26 18:22:43 +08:00
Kerwin BryantandLogic 5757d7427d Add a loading animation to the /setting/define page. (#2145)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-26 18:18:55 +08:00
Kerwin BryantandLogic cbb4b8c736 Add a new common toolbar component. (#2143)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-26 18:14:16 +08:00
liutianyouandLogic dbac0dfe63 [bugfix] add incident publishing form validation (#2139)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-26 18:11:45 +08:00
Kerwin Bryant 8c0b39f69b [improve] continuously supplement and improve the goals set in #2140 (#2142) 2024-06-26 10:24:28 +08:00
a54d8cdd11 [improve] : fix AiService getType method data type,complete information for LICENSE (#2141)
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-25 23:42:15 +08:00
Kerwin BryantandLogic ec1c41cf68 Unify the border-radius values of the all components. (#2140)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-25 23:30:13 +08:00
tomsun28 93635a0482 [doc] add new committer shenghang (#2137) 2024-06-25 23:20:14 +08:00
Jastandtomsun28 59266ccb8a [doc] doc add committer process (#2136)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-25 22:07:19 +08:00
Kerwin Bryant bc4b399a21 [bugfix] fixed the layout styling issue of the left list on the setting/define. (#2134) 2024-06-25 21:43:55 +08:00
Kerwin Bryantandtomsun28 87756f16d9 [improve] support for password type to the app-multi-func-input component. (#2132)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-25 15:38:50 +08:00
e1cda5066e [docs] : Add an ai configuration document (#2130)
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-25 15:26:31 +08:00
fa0e9ef50a [feature] support ai api with zhipu ai (#2120)
Co-authored-by: Logic <zqr10159@dromara.org>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-25 14:34:22 +08:00
Kerwin Bryant a10c2bfbd8 Fixed the issues similar to #2127 on the alert center page. (#2131) 2024-06-25 12:08:11 +08:00
liutianyouandtomsun28 33877615c5 [improve] add configuration for mounting logs (#2128)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-25 08:32:09 +08:00
linDongandtomsun28 13411105ed [bug]fix the monitor status is abnormal (#2070)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-25 00:04:13 +08:00
e2faa44f18 [fixbug] fix string type data parsing problem (#2066)
Co-authored-by: zhangshenghang <admin@hadoop.wiki>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-24 17:45:12 +08:00
Kerwin Bryant 657de4f5b6 Add an input box component with a removal function. (#2127) 2024-06-24 17:19:26 +08:00
Kerwin Bryantandtomsun28 dfa6895a7e [bugfix] fixed the bug of the status filter in the alert center. (#2125)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-24 11:18:03 +08:00
Kerwin Bryant a9de486744 [bugfix] fix the status filter in the monitoring center (#2124) 2024-06-24 11:08:25 +08:00
Kerwin Bryant 31d8712299 Fixed the i18n issue similarly to #2117. (#2119) 2024-06-22 13:59:02 +08:00
Kerwin BryantandLogic c4a6e36977 Fixed the i18n issue of the [New Notice Policy] form. (#2117)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-21 20:09:11 +08:00
Kerwin BryantandLogic 41c3bf50ee Uniformly use [...] to replace the phrase [More]. (#2115)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-21 20:07:01 +08:00
Kerwin BryantandLogic 957cce93d9 Optimize the layout of the [New Threshold Rule] form. (#2116)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-21 19:14:30 +08:00
9b7b00e09c Optimize the visual experience of the nz-table template. (#2112)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-21 15:25:33 +08:00
tomsun28andLogic b3976295f5 [improve] update collector info, support env config or auto fetch (#2100)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-21 15:17:57 +08:00
Kerwin Bryantandtomsun28 1be2631af7 optimize the visual experience of the level2Message module. (#2111)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-21 11:22:22 +08:00
Kerwin Bryant 5f5f4d0346 [bugfix] the prompt information on the Collector Cluster page (#2114) 2024-06-21 10:55:04 +08:00
Kerwin BryantandLogic 95c30f54cd fixed #2107 (#2108)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-20 20:55:03 +08:00
Kerwin BryantandLogic 855abf6ada Fixed a style issue within the dialog on the about-page. (#2109)
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-20 20:52:04 +08:00
Kerwin Bryant bdf82751a5 Optimize the code by removing unnecessary attribute values (#2110) 2024-06-20 20:45:40 +08:00
f49e20535c [improve] optimization notification code validation (#2102)
Co-authored-by: zhangshenghang <admin@hadoop.wiki>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-20 09:14:16 +08:00
dennis zhuang a32757ea7a [feat] supports TTL for greptimedb data storage (#2101) 2024-06-20 08:57:06 +08:00
liutianyou bd52e0527e [bugfix] fix extract double and unit error when unit is Ki (#2099) 2024-06-19 21:46:20 +08:00
dennis zhuang 1bac42b094 fix: greptimedb can't work with version >= 0.5 (#2095) 2024-06-19 18:54:04 +08:00
Rickandrick a71c61a0d8 [fix] the e2e failure without broken the ci (#2093)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
2024-06-19 00:07:35 +08:00
crossoverJieandtomsun28 56db540721 [doc] add codecov badge (#2089)
Signed-off-by: crossoverJie <crossoverJie@gmail.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-18 10:51:36 +08:00
bc104dfe9f [doc] mysql monitoring help document adds steps for importing drivers (#2091)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-18 08:49:05 +08:00
tomsun28andLogic fc6ea4a2e0 [bugfix] fix some template menus hidden when too long (#2092)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Logic <zqr10159@dromara.org>
2024-06-18 08:34:09 +08:00
Nctllnty 55c48d167c [bugfix] notice rules api access 409 error when upgrade 1.6.0 (#2090) 2024-06-18 07:25:56 +08:00
Rickandtomsun28 393bb95878 [chore] bump api-testing from v0.0.16 to v0.0.17 (#2087)
Signed-off-by: Rick <1450685+LinuxSuRen@users.noreply.github.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-17 22:49:33 +08:00
Jastandzhangshenghang 915fcbf1d9 [improve] enterprise wechat validate (#2086)
Co-authored-by: zhangshenghang <admin@hadoop.wiki>
2024-06-17 22:43:30 +08:00
Calvinandtomsun28 26b982a59b [license] update license document for jutf7 (#2082)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-17 08:00:38 +08:00
crossoverJieandtomsun28 3186aa5eb6 [Improve] support jacoco and codecov (#1985)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-16 22:53:43 +08:00
Zhang Yuxuanandtomsun28 a6ac326581 [feature] after new, edit, resume a monitor, display its status directly and correctly (#2065)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-16 16:27:35 +08:00
53b796ff57 [improve]add flink on yarn monitoring (#2078)
Co-authored-by: zhangshenghang <admin@hadoop.wiki>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-16 15:35:55 +08:00
Calvinandtomsun28 b7217b5d48 [feature] add column version and public Ip on collector page (#2072)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-16 14:48:18 +08:00
tomsun28 b8f2bf30fd [doc] add hertzbeat 1.6.0 release blog (#2083) 2024-06-16 09:08:58 +08:00
Leon Liandtomsun28 bc4ddefc76 [collector] fix the wrong condition for checking the response (#2067)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-15 10:26:25 +08:00
Zhang Yuxuanandtomsun28 2fcd100fec [feature] add automatic refresh to the monitoring center (#2064)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-14 22:58:24 +08:00
liutianyouandtomsun28 365de4657e [fix] fix unit test passing but outputting exception stack (#2063)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-14 22:55:43 +08:00
Zhang Yuxuanandtomsun28 d4e6317a30 [feature] Implement IMAP protocol support (#2059)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-14 22:47:40 +08:00
cc19831f7c [feature] support mongodb atlas cluster (#2052)
Co-authored-by: zhangshenghang <admin@hadoop.wiki>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-14 21:28:35 +08:00
Gao Jianandtomsun28 f10e5dbd06 [Improve] Fix possible potential thread unsafe issues (#2043)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-14 21:18:57 +08:00
af1f59e009 [feature] designated personnel send message (#2038)
Co-authored-by: zhangshenghang <admin@hadoop.wiki>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-13 23:28:58 +08:00
aias00andlimbo 009a512ba0 [feature] upgrade webapp angular deps version #1707 (#1987)
Signed-off-by: aias00 <rokkki@163.com>
Co-authored-by: limbo <yykaue@qq.com>
2024-06-12 15:13:56 +08:00
tomsun28 dc381ea338 [improve] update docker compose and k8s helm deploy script (#2076) 2024-06-11 17:52:30 +08:00
Logic 3ed52c54af [doc] hertzbeat 1.6.0 upgrade guide (#2077) 2024-06-11 16:51:26 +08:00
tomsun28and铁甲小宝 c5808a0430 [doc] update release 1.6.0 doc (#2074)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: 铁甲小宝 <2922035952@qq.com>
2024-06-11 00:18:14 +08:00
Calvin ed390a50c9 [fixed] required field check for tag settings (#2071) 2024-06-09 22:54:40 +08:00
linDongandtomsun28 cfe93bf19d [doc] add telnet protocol custom doc (#2061)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2024-06-05 02:45:41 +08:00
2831 changed files with 139180 additions and 77311 deletions
+276 -3
View File
@@ -1652,7 +1652,8 @@
"profile": "https://github.com/gjjjj0101",
"contributions": [
"code",
"design"
"design",
"test"
]
},
{
@@ -1829,7 +1830,7 @@
},
{
"login": "Yanshuming1",
"name": "xiaoming student",
"name": "linDong",
"avatar_url": "https://avatars.githubusercontent.com/u/118667222?v=4",
"profile": "https://github.com/Yanshuming1",
"contributions": [
@@ -1851,7 +1852,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/119573640?v=4",
"profile": "https://thespica.github.io/",
"contributions": [
"code"
"code",
"doc"
]
},
{
@@ -1889,6 +1891,277 @@
"contributions": [
"doc"
]
},
{
"login": "yykaue",
"name": "Limbo",
"avatar_url": "https://avatars.githubusercontent.com/u/22905143?v=4",
"profile": "https://github.com/yykaue",
"contributions": [
"code"
]
},
{
"login": "irenhongyan",
"name": "哈哈哈哈哈哈哈哈哈",
"avatar_url": "https://avatars.githubusercontent.com/u/53438321?v=4",
"profile": "https://github.com/irenhongyan",
"contributions": [
"code"
]
},
{
"login": "ileonli",
"name": "Leon Li",
"avatar_url": "https://avatars.githubusercontent.com/u/45332412?v=4",
"profile": "https://github.com/ileonli",
"contributions": [
"code"
]
},
{
"login": "killme2008",
"name": "dennis zhuang",
"avatar_url": "https://avatars.githubusercontent.com/u/14142?v=4",
"profile": "http://fnil.net/",
"contributions": [
"code"
]
},
{
"login": "kerwin612",
"name": "Kerwin Bryant",
"avatar_url": "https://avatars.githubusercontent.com/u/3371163?v=4",
"profile": "https://github.com/kerwin612",
"contributions": [
"code",
"design"
]
},
{
"login": "ShineDevelopment",
"name": "daixianglong",
"avatar_url": "https://avatars.githubusercontent.com/u/59306780?v=4",
"profile": "https://github.com/ShineDevelopment",
"contributions": [
"doc"
]
},
{
"login": "mchgood",
"name": "mchgood",
"avatar_url": "https://avatars.githubusercontent.com/u/38482005?v=4",
"profile": "https://github.com/mchgood",
"contributions": [
"doc"
]
},
{
"login": "pwallk",
"name": "kangli",
"avatar_url": "https://avatars.githubusercontent.com/u/69385076?v=4",
"profile": "https://github.com/pwallk",
"contributions": [
"code"
]
},
{
"login": "cdphantom",
"name": "cdphantom",
"avatar_url": "https://avatars.githubusercontent.com/u/12674795?v=4",
"profile": "https://github.com/cdphantom",
"contributions": [
"code"
]
},
{
"login": "asd108908382",
"name": "jiawei.guo",
"avatar_url": "https://avatars.githubusercontent.com/u/77717999?v=4",
"profile": "https://github.com/asd108908382",
"contributions": [
"code"
]
},
{
"login": "QBH-insist",
"name": "QBH-insist",
"avatar_url": "https://avatars.githubusercontent.com/u/39401478?v=4",
"profile": "https://github.com/QBH-insist",
"contributions": [
"code"
]
},
{
"login": "jiangsh-ui",
"name": "jiangsh",
"avatar_url": "https://avatars.githubusercontent.com/u/86990361?v=4",
"profile": "https://github.com/jiangsh-ui",
"contributions": [
"code"
]
},
{
"login": "keaifafafa",
"name": "Keaifa",
"avatar_url": "https://avatars.githubusercontent.com/u/83876361?v=4",
"profile": "https://github.com/keaifafafa",
"contributions": [
"code"
]
},
{
"login": "loong95",
"name": "Loong",
"avatar_url": "https://avatars.githubusercontent.com/u/16333958?v=4",
"profile": "https://github.com/loong95",
"contributions": [
"code"
]
},
{
"login": "ceekay47",
"name": "Chandrakant Vankayalapati",
"avatar_url": "https://avatars.githubusercontent.com/u/104664857?v=4",
"profile": "https://github.com/ceekay47",
"contributions": [
"code"
]
},
{
"login": "MRgenial",
"name": "b_mountain",
"avatar_url": "https://avatars.githubusercontent.com/u/49973336?v=4",
"profile": "https://github.com/MRgenial",
"contributions": [
"code"
]
},
{
"login": "TemirlanBasitov",
"name": "TemirlanBasitov",
"avatar_url": "https://avatars.githubusercontent.com/u/57500808?v=4",
"profile": "https://github.com/TemirlanBasitov",
"contributions": [
"code"
]
},
{
"login": "wyfvsfy",
"name": "wyfvsfy",
"avatar_url": "https://avatars.githubusercontent.com/u/11973517?v=4",
"profile": "https://github.com/wyfvsfy",
"contributions": [
"doc"
]
},
{
"login": "sherry-peng2333",
"name": "sherry-peng2333",
"avatar_url": "https://avatars.githubusercontent.com/u/70619577?v=4",
"profile": "https://github.com/sherry-peng2333",
"contributions": [
"code"
]
},
{
"login": "lixiaobaivv",
"name": "Yzzz",
"avatar_url": "https://avatars.githubusercontent.com/u/39290771?v=4",
"profile": "https://github.com/lixiaobaivv",
"contributions": [
"code"
]
},
{
"login": "pruidong",
"name": "puruidong",
"avatar_url": "https://avatars.githubusercontent.com/u/13309008?v=4",
"profile": "http://www.bckf.cn/",
"contributions": [
"doc"
]
},
{
"login": "shinestare",
"name": "shinestare",
"avatar_url": "https://avatars.githubusercontent.com/u/13570619?v=4",
"profile": "https://github.com/shinestare",
"contributions": [
"code"
]
},
{
"login": "po-168",
"name": "po-168",
"avatar_url": "https://avatars.githubusercontent.com/u/185745593?v=4",
"profile": "https://github.com/po-168",
"contributions": [
"code"
]
},
{
"login": "All-The-Best-for",
"name": "wbs99",
"avatar_url": "https://avatars.githubusercontent.com/u/76414672?v=4",
"profile": "https://github.com/All-The-Best-for",
"contributions": [
"code"
]
},
{
"login": "starryCoder",
"name": "starryCoder",
"avatar_url": "https://avatars.githubusercontent.com/u/46510059?v=4",
"profile": "https://github.com/starryCoder",
"contributions": [
"code"
]
},
{
"login": "hasimmollah",
"name": "hasimmollah",
"avatar_url": "https://avatars.githubusercontent.com/u/32538599?v=4",
"profile": "https://github.com/hasimmollah",
"contributions": [
"code"
]
},
{
"login": "ayu-v0",
"name": "Ayu",
"avatar_url": "https://avatars.githubusercontent.com/u/127600988?v=4",
"profile": "https://github.com/ayu-v0",
"contributions": [
"code"
]
},
{
"login": "Rancho-7",
"name": "Nick Guo",
"avatar_url": "https://avatars.githubusercontent.com/u/59016860?v=4",
"profile": "https://github.com/Rancho-7",
"contributions": [
"doc"
]
},
{
"login": "doveLin0818",
"name": "doveLin",
"avatar_url": "https://avatars.githubusercontent.com/u/190927907?v=4",
"profile": "https://github.com/doveLin0818",
"contributions": [
"code"
]
},
{
"login": "yunfan24",
"name": "yunfan24",
"avatar_url": "https://avatars.githubusercontent.com/u/91836599?v=4",
"profile": "https://zzrl.cc/",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
+38
View File
@@ -0,0 +1,38 @@
{
"name": "Hertzbeat DevContainer",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "17",
"installMaven": "true",
"installGradle": "false"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "20"
},
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {}
},
"customizations": {
"vscode": {
"settings": {},
// same extensions as Gitpod, should match /.gitpod.yml
"extensions": [
"vscjava.vscode-java-pack",
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"DavidAnson.vscode-markdownlint",
"ms-azuretools.vscode-docker",
"cweijan.vscode-database-client2",
"GitHub.vscode-pull-request-github"
]
}
},
"portsAttributes": {
"4200": {
"label": "Hertzbeat Web",
"onAutoForward": "notify"
}
},
"postCreateCommand": "java -version"
}
-3
View File
@@ -20,6 +20,3 @@ contact_links:
- name: Community Support
url: https://github.com/apache/hertzbeat/discussions
about: Please ask and answer questions here.
- name: Security Bug Bounty
url: https://github.com/apache/hertzbeat/issues
about: Please report security vulnerabilities here.
+1 -1
View File
@@ -53,4 +53,4 @@ body:
validations:
required: false
- type: markdown
value: "Please read the [Contribution Guideline](https://hertzbeat.apache.org/docs/others/contributing) before submitting the PR"
value: "Please read the [Contribution Guideline](https://hertzbeat.apache.org/docs/community/contribution) before submitting the PR"
+1 -1
View File
@@ -39,4 +39,4 @@ body:
- type: markdown
attributes:
value: |
Please read the [Contribution Guideline](https://hertzbeat.com/docs/others/contributing/) before submitting the PR
Please read the [Contribution Guideline](https://hertzbeat.apache.org/docs/community/contribution) before submitting the PR
+1 -1
View File
@@ -30,5 +30,5 @@ body:
- type: markdown
attributes:
value: |
Please read the [Contribution Guideline](https://hertzbeat.apache.org/docs/others/contributing/) before submitting the PR
Please read the [Contribution Guideline](https://hertzbeat.apache.org/docs/community/contribution) before submitting the PR
+39 -23
View File
@@ -22,7 +22,7 @@ name: Backend CI
on:
push:
branches: [ master, dev ]
branches: [ master, dev, action* ]
paths-ignore:
- '**.md'
- 'home/**'
@@ -39,29 +39,45 @@ on:
- 'material/**'
jobs:
build:
backend-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build with Maven
run: mvn clean -B package -Prelease --file pom.xml
- name: Build Image
env:
IMAGE_PUSH: false
IMAGE_LOAD: true
IMAGE_PLATFORM: linux/amd64
run: |
docker buildx create --use --name myBuilder --driver docker-container
docker buildx use myBuilder
- uses: actions/checkout@v4
- uses: ./script/ci/github-actions/setup-deps
./script/docker/server/build.sh
- name: Run E2E
run: |
sudo curl -L https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod u+x /usr/local/bin/docker-compose
- name: Build with Maven
run: mvn clean -B package -Prelease -Dmaven.test.skip=false --file pom.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Build Image
uses: docker/build-push-action@v3
with:
context: ./dist
file: ./script/docker/server/Dockerfile
push: false
tags: apache/hertzbeat:test
- name: Run E2E
run: |
sudo curl -L https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod u+x /usr/local/bin/docker-compose
cd e2e
sudo docker-compose version
sudo docker-compose up --exit-code-from testing --remove-orphans
# upload application logs
- name: Upload logs & API test reports
uses: actions/upload-artifact@v3
if: always()
with:
name: hz-logs-${{ github.run_id }}
path: |
e2e/logs/
e2e/report/
cd e2e && ./start.sh
+1 -1
View File
@@ -47,7 +47,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
+22 -76
View File
@@ -28,91 +28,37 @@ on:
- 'home/**'
jobs:
build:
docs-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check filename in home/blog
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Check Markdown
uses: DavidAnson/markdownlint-cli2-action@v16
with:
globs: './home/**/*.md'
- name: Check filenames
run: python ./script/ci/docs/check_file_name.py ./script/ci/docs/check_file_name.json
- name: Dead Link Check
run: |
TARGET_DIR="./home/blog"
invalid_files=()
while IFS= read -r -d '' file; do
filename=$(basename "$file")
if [[ ! "$filename" =~ ^[_a-z0-9-]+(\.[_a-z0-9-]+)*$ ]]; then
invalid_files+=("$file")
sudo npm install -g markdown-link-check@3.8.7
for file in $(find ./home -name "*.md"); do
if ! grep -Fxq "$file" ./script/ci/exclude_files.txt; then
markdown-link-check -c ./script/ci/link_check.json -q "$file"
fi
done < <(find "$TARGET_DIR" -type f -print0)
if [ ${#invalid_files[@]} -ne 0 ]; then
echo "Error: The following files have invalid names:(File name should only contain lowercase letters, numbers, and hyphens.)"
for invalid_file in "${invalid_files[@]}"; do
echo "$invalid_file"
done
exit 1
else
echo "All file names are valid."
fi
- name: Check filename in home/docs
run: |
TARGET_DIR="./home/docs"
invalid_files=()
while IFS= read -r -d '' file; do
filename=$(basename "$file")
if [[ ! "$filename" =~ ^[_a-z0-9-]+(\.[_a-z0-9-]+)*$ ]]; then
invalid_files+=("$file")
fi
done < <(find "$TARGET_DIR" -type f -print0)
if [ ${#invalid_files[@]} -ne 0 ]; then
echo "Error: The following files have invalid names:(File name should only contain lowercase letters, numbers, and hyphens.)"
for invalid_file in "${invalid_files[@]}"; do
echo "$invalid_file"
done
exit 1
else
echo "All file names are valid."
fi
- name: Check filename in /zh-cn/docusaurus-plugin-content-blog
run: |
TARGET_DIR="./home/i18n/zh-cn/docusaurus-plugin-content-blog"
invalid_files=()
while IFS= read -r -d '' file; do
filename=$(basename "$file")
if [[ ! "$filename" =~ ^[_a-z0-9-]+(\.[_a-z0-9-]+)*$ ]]; then
invalid_files+=("$file")
fi
done < <(find "$TARGET_DIR" -type f -print0)
if [ ${#invalid_files[@]} -ne 0 ]; then
echo "Error: The following files have invalid names:(File name should only contain lowercase letters, numbers, and hyphens.)"
for invalid_file in "${invalid_files[@]}"; do
echo "$invalid_file"
done
exit 1
else
echo "All file names are valid."
fi
- name: Check filename in /home/i18n/zh-cn/docusaurus-plugin-content-docs/current
run: |
TARGET_DIR="./home/i18n/zh-cn/docusaurus-plugin-content-docs/current"
invalid_files=()
while IFS= read -r -d '' file; do
filename=$(basename "$file")
if [[ ! "$filename" =~ ^[_a-z0-9-]+(\.[_a-z0-9-]+)*$ ]]; then
invalid_files+=("$file")
fi
done < <(find "$TARGET_DIR" -type f -print0)
if [ ${#invalid_files[@]} -ne 0 ]; then
echo "Error: The following files have invalid names:(File name should only contain lowercase letters, numbers, and hyphens.)"
for invalid_file in "${invalid_files[@]}"; do
echo "$invalid_file"
done
exit 1
else
echo "All file names are valid."
fi
done
- name: NPM INSTALL
working-directory: home
run: npm install
- name: NPM BUILD
working-directory: home
run: npm run build
-1
View File
@@ -53,4 +53,3 @@ jobs:
path: docs-en.pdf
if-no-files-found: error
retention-days: 1
+1 -1
View File
@@ -34,7 +34,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Yarn Install
working-directory: web-app
run: yarn
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Check license header
+72
View File
@@ -0,0 +1,72 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Nightly CI
on:
schedule:
# trigger at 00:00 everyday
- cron: '0 0 * * *'
push:
branches: [ action* ]
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.repository == 'apache/hertzbeat' }}
steps:
- uses: actions/checkout@v4
- uses: ./script/ci/github-actions/setup-deps
- name: Build the Frontend
run: |
cd web-app
yarn install
yarn package
- name: Build the Backend
run: |
mvn clean install
mvn clean package -Prelease -DskipTests
cd collector
mvn clean package -Pcluster -DskipTests
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Server
uses: docker/build-push-action@v6
with:
context: ./dist
file: ./script/docker/server/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: apache/hertzbeat:nightly
- name: Build and Push Collector
uses: docker/build-push-action@v6
with:
context: ./dist
file: ./script/docker/collector/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: apache/hertzbeat-collector:nightly
+21
View File
@@ -0,0 +1,21 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
[submodule "script/helm/hertzbeat-helm-chart"]
path = script/helm/hertzbeat-helm-chart
url = git@github.com:apache/hertzbeat-helm-chart.git
branch = main
+53
View File
@@ -0,0 +1,53 @@
tasks:
- name: Run backend
before: cd hertzbeat-manager
command: |
gp sync-await setup-backend
mvn spring-boot:run
- name: Run frontend
before: cd web-app
command: |
gp sync-await setup-frontend
yarn start --public-host "`gp url 4200`"
openMode: split-right
- name: Setup backend
init: |
sdk install java 17.0.11.fx-zulu < /dev/null
sdk default java 17.0.11.fx-zulu < /dev/null
mvn clean install -DskipTests
command: |
gp sync-done setup-backend
exit 0
- name: Setup frontend
init: |
cd web-app && yarn install
command: |
gp sync-done setup-frontend
exit 0
openMode: split-right
vscode:
extensions:
- vscjava.vscode-java-pack
- editorconfig.editorconfig
- dbaeumer.vscode-eslint
- stylelint.vscode-stylelint
- DavidAnson.vscode-markdownlint
- ms-azuretools.vscode-docker
- cweijan.vscode-database-client2
- GitHub.vscode-pull-request-github
ports:
- port: 4200
name: Hertzbeat
onOpen: open-browser
- port: 1157
onOpen: ignore
- port: 1158
onOpen: ignore
+4 -2
View File
@@ -62,6 +62,8 @@ header:
- '.stylelintrc'
- '.prettierignore'
- '.prettierrc.js'
- '.gitpod.Dockerfile'
- '.gitpod.yml'
- 'karma.conf.js'
- 'proxy.conf.js'
- '.helmignore'
@@ -92,12 +94,12 @@ header:
- 'web-app/src/style.less'
- 'web-app/src/test.ts'
- 'web-app/src/typings.d.ts'
comment: on-failure
dependency:
files:
- pom.xml
- web-app/package.json
+47
View File
@@ -0,0 +1,47 @@
//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
{
"config": {
"default": true,
"MD001": true,
"MD003": true,
"MD013": {
"line_length": 600,
"code_blocks": false,
"tables": false
},
"MD024": {
"siblings_only": true
},
"MD025": true,
"MD029": true,
"MD033": {
"allowed_elements": ["table", "tr", "td", "a", "img", "sub", "b", "br", "img", "tbody", "mark", "font"]
},
"MD036": false,
"MD040": true,
"MD045": true,
"MD046": true,
"MD047": true,
"MD052": true
},
"ignore": [
"node_modules/",
"target/",
"dist/"
]
}
+39 -34
View File
@@ -38,7 +38,9 @@ Even small corrections to typos are very welcome :)
3. Execute under the project root directory: `mvn clean install -DskipTests`
4. Start `springboot manager` service: `manager/src/main/java/org/apache/hertzbeat/manager/Manager.java`
4. Add VM Options: `--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED`
5. Start `springboot manager` service: `manager/src/main/java/org/apache/hertzbeat/hertzbeat-manager/Manager.java`
#### Frontend start
@@ -68,23 +70,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 <modified file/path>
git commit -m '[docs]feature: necessary instructions' #Recommended
```
```shell
git add <modified file/path>
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.
@@ -127,17 +129,17 @@ With the above steps, you are a contributor to HertzBeat. Repeat the previous st
[Join the Mailing Lists](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) : Mail to `dev-subscribe@hertzbeat.apache.org` to subscribe mailing lists.
Add WeChat account `tan-cloud` to pull you into the WeChat group.
Add WeChat account `ahertzbeat` to pull you into the WeChat group.
## 🥐 Architecture
- **[manager](https://github.com/apache/hertzbeat/tree/master/manager)** Provide monitoring management, system management basic services.
- **[manager](https://github.com/apache/hertzbeat/tree/master/hertzbeat-manager)** Provide monitoring management, system management basic services.
> Provides monitoring management, monitoring configuration management, system user management, etc.
- **[collector](https://github.com/apache/hertzbeat/tree/master/collector)** Provide metrics data collection services.
> Use common protocols to remotely collect and obtain peer-to-peer metrics data.
- **[warehouse](https://github.com/apache/hertzbeat/tree/master/warehouse)** Provide monitoring data warehousing services.
> Metrics data management, data query, calculation and statistics.
- **[alerter](https://github.com/apache/hertzbeat/tree/master/alerter)** Provide alert service.
- **[alerter](https://github.com/apache/hertzbeat/tree/master/hertzbeat-alerter)** Provide alert service.
> Alarm calculation trigger, monitoring status linkage, alarm configuration, and alarm notification.
- **[web-app](https://github.com/apache/hertzbeat/tree/master/web-app)** Provide web ui.
> Angular Web UI.
@@ -189,7 +191,10 @@ Add WeChat account `tan-cloud` to pull you into the WeChat group.
3. 在项目根目录运行编译: `mvn clean install -DskipTests`
4. 启动`springboot manager`服务 `manager/src/main/java/org/apache/hertzbeat/manager/Manager.java`
4. 在 `jvm` 加入参数 `--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED`
5. 启动`springboot manager`服务 `manager/src/main/java/org/apache/hertzbeat/hertzbeat-manager/Manager.java`
#### 前端启动
@@ -218,23 +223,23 @@ Add WeChat account `tan-cloud` 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 <modified file/path>
git commit -m '[docs]feature: necessary instructions' #Recommended
```
```shell
git add <modified file/path>
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 和其他贡献者进行代码审查。
@@ -277,17 +282,17 @@ git pull upstream master
[Join the Mailing Lists](https://lists.apache.org/list.html?dev@hertzbeat.apache.org) : Mail to `dev-subscribe@hertzbeat.apache.org` to subscribe mailing lists.
Add WeChat account `tan-cloud` to pull you into the WeChat group.
Add WeChat account `ahertzbeat` to pull you into the WeChat group.
### 模块
- **[manager](https://github.com/apache/hertzbeat/tree/master/manager)** 提供监控管理,系统管理基础服务
- **[manager](https://github.com/apache/hertzbeat/tree/master/hertzbeat-manager)** 提供监控管理,系统管理基础服务
> 提供对监控的管理,监控应用配置的管理,系统用户租户后台管理等。
- **[collector](https://github.com/apache/hertzbeat/tree/master/collector)** 提供监控数据采集服务
> 使用通用协议远程采集获取对端指标数据。
- **[warehouse](https://github.com/apache/hertzbeat/tree/master/warehouse)** 提供监控数据仓储服务
> 采集指标结果数据管理,数据落盘,查询,计算统计。
- **[alerter](https://github.com/apache/hertzbeat/tree/master/alerter)** 提供告警服务
- **[alerter](https://github.com/apache/hertzbeat/tree/master/hertzbeat-alerter)** 提供告警服务
> 告警计算触发,任务状态联动,告警配置,告警通知。
- **[web-app](https://github.com/apache/hertzbeat/tree/master/web-app)** 提供可视化控制台页面
> 监控告警系统可视化控制台前端
+100 -66
View File
@@ -14,9 +14,11 @@
[![Reddit](https://img.shields.io/badge/Reddit-Community-7289DA?logo=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/apache/hertzbeat?style=%20for-the-badge&logo=docker&label=DockerHub%20Download)](https://hub.docker.com/repository/docker/apache/hertzbeat/general)
[![codecov](https://codecov.io/gh/apache/HertzBeat/branch/master/graph/badge.svg)](https://app.codecov.io/gh/apache/hertzbeat)
[![Docker Pulls](https://img.shields.io/docker/pulls/apache/hertzbeat?style=%20for-the-badge&logo=docker&label=DockerHub%20Download)](https://hub.docker.com/r/apache/hertzbeat)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/hertzbeat)](https://artifacthub.io/packages/search?repo=hertzbeat)
[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCri75zfWX0GHqJFPENEbLow?logo=youtube&label=YouTube%20Channel)](https://www.youtube.com/channel/UCri75zfWX0GHqJFPENEbLow)
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/apache/hertzbeat)
**Home: [hertzbeat.apache.org](https://hertzbeat.apache.org)**
**Email: <a href="mailto:dev-subscribe@hertzbeat.apache.org">Mail to `dev-subscribe@hertzbeat.apache.org`</a> to subscribe mailing lists**
@@ -58,42 +60,42 @@
> Welcome everyone to contribute your customized general monitoring type YML template during use.
- [Website](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-website.yml), [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-port.yml),
[Http Api](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-api.yml), [Ping Connect](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ping.yml),
[Jvm](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-jvm.yml), [SiteMap](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-fullsite.yml),
[Ssl Certificate](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ssl_cert.yml), [SpringBoot2](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-springboot2.yml),
[FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ftp.yml), [SpringBoot3](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-springboot3.yml),
[Udp Port](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-udp.yml), [Dns](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-dns.yml),
[Pop3](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-pop3.yml), [Ntp](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ntp.yml),
[Api Code](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-api_code.yml), [Smtp](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-smtp.yml),
[Nginx](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-nginx.yml)
- [Mysql](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-mysql.yml), [PostgreSQL](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-postgresql.yml),
[MariaDB](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-mariadb.yml), [Redis](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-redis.yml),
[ElasticSearch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-elasticsearch.yml), [SqlServer](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-sqlserver.yml),
[Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-mongodb.yml),
[DM](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-opengauss.yml),
[ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-iotdb.yml),
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-redis_sentinel.yml)
[Doris BE](https://github.com/apache/hertzbeat/blob/master/manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/manager/src/main/resources/define/app-doris_fe.yml),
[Memcached](https://github.com/apache/hertzbeat/blob/master/manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/manager/src/main/resources/define/app-nebulaGraph.yml)
- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ubuntu.yml),
[CentOS](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-centos.yml), [Windows](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-windows.yml),
[EulerOS](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-euleros.yml), [Fedora CoreOS](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-coreos.yml),
[OpenSUSE](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-opensuse.yml), [Rocky Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-rockylinux.yml),
[Red Hat](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-redhat.yml), [FreeBSD](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-freebsd.yml),
[AlmaLinux](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-almalinux.yml), [Debian Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-debian.yml)
- [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-tomcat.yml), [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-nacos.yml),
[Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-zookeeper.yml), [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-rabbitmq.yml),
[Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-flink.yml), [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-kafka.yml),
[ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-shenyu.yml), [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-dynamic_tp.yml),
[Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-jetty.yml), [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-activemq.yml),
[Spring Gateway](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-spring_gateway.yml), [EMQX MQTT](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-emqx.yml),
[AirFlow](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-airflow.yml), [Hive](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-hive.yml),
[Spark](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-spark.yml), [Hadoop](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-hadoop.yml)
- [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-kubernetes.yml), [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-docker.yml)
- [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-cisco_switch.yml), [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-hpe_switch.yml),
[HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-huawei_switch.yml), [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-tplink_switch.yml),
[H3cSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-h3c_switch.yml)
- [Website](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-website.yml), [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-port.yml),
[Http Api](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api.yml), [Ping Connect](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ping.yml),
[Jvm](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jvm.yml), [SiteMap](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-fullsite.yml),
[Ssl Certificate](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ssl_cert.yml), [SpringBoot2](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot2.yml),
[FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ftp.yml), [SpringBoot3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot3.yml),
[Udp Port](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-udp_port.yml), [Dns](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dns.yml),
[Pop3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-pop3.yml), [Ntp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ntp.yml),
[Api Code](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api_code.yml), [Smtp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-smtp.yml),
[Nginx](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nginx.yml)
- [Mysql](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mysql.yml), [PostgreSQL](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-postgresql.yml),
[MariaDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mariadb.yml), [Redis](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis.yml),
[ElasticSearch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-elasticsearch.yml), [SqlServer](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-sqlserver.yml),
[Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml),
[DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml),
[ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml),
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml)
[Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml),
[Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml)
- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml),
[CentOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-centos.yml), [Windows](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-windows.yml),
[EulerOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-euleros.yml), [Fedora CoreOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-coreos.yml),
[OpenSUSE](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opensuse.yml), [Rocky Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rockylinux.yml),
[Red Hat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redhat.yml), [FreeBSD](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-freebsd.yml),
[AlmaLinux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-almalinux.yml), [Debian Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-debian.yml)
- [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tomcat.yml), [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nacos.yml),
[Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-zookeeper.yml), [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rabbitmq.yml),
[Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-flink.yml), [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kafka.yml),
[ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-shenyu.yml), [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dynamic_tp.yml),
[Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jetty.yml), [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-activemq.yml),
[Spring Gateway](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spring_gateway.yml), [EMQX MQTT](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-emqx.yml),
[AirFlow](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-airflow.yml), [Hive](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hive.yml),
[Spark](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spark.yml), [Hadoop](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hadoop.yml)
- [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml), [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-docker.yml)
- [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-cisco_switch.yml), [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hpe_switch.yml),
[HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-huawei_switch.yml), [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tplink_switch.yml),
[H3cSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-h3c_switch.yml)
- And More Your Custom Template.
- Notified Support `Discord` `Slack` `Telegram` `Email` `Dingtalk` `WeChat` `FeiShu` `Webhook` `SMS` `ServerChan`.
@@ -108,32 +110,36 @@
##### 1Install quickly via docker
1. Just one command to get started:
1. Just one command to get started
```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat```
```shell
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
```
- `-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.
```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.
Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.apache.org/docs/start/docker-deploy)
##### 2Install via package
1. Download the release package `hertzbeat-xx.tar.gz` [GITHUB Release](https://github.com/apache/hertzbeat/releases)
1. Download the release package `hertzbeat-xx.tar.gz` [Download](https://hertzbeat.apache.org/docs/download)
2. Configure the HertzBeat configuration yml file `hertzbeat/config/application.yml` (optional)
3. Run command `$ ./bin/startup.sh ` or `bin/startup.bat`
4. Access `http://localhost:1157` to start, default account: `admin/hertzbeat`
5. Deploy collector clusters (Optional)
- Download the release package `hertzbeat-collector-xx.tar.gz` to new machine [GITHUB Release](https://github.com/apache/hertzbeat/releases)
- Download the release package `hertzbeat-collector-xx.tar.gz` to new machine [Download](https://hertzbeat.apache.org/docs/download)
- Configure the collector configuration yml file `hertzbeat-collector/config/application.yml`: unique `identity` name, running `mode` (public or private), hertzbeat `manager-host`, hertzbeat `manager-port`
```yaml
collector:
@@ -154,19 +160,19 @@ Detailed config refer to [Install HertzBeat via Package](https://hertzbeat.apach
##### 3Start via source code
1. Local source code debugging needs to start the back-end project `manager` and the front-end project `web-app`.
2. Backendneed `maven3+`, `java17`, `lombok`, start the `manager` service.
2. Backendneed `maven3+`, `java17`, `lombok`, add VM options in IDE: ` --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED `, then start the `manager` service.
3. Webneed `nodejs npm angular-cli` environment, Run `ng serve --open` in `web-app` directory after backend startup.
4. Access `http://localhost:4200` to start, default account: `admin/hertzbeat`
Detailed steps refer to [CONTRIBUTING](CONTRIBUTING.md)
##### 4Install All(hertzbeat+mysql+tsdb) via Docker-compose
##### 4Install All(hertzbeat+postgresql+tsdb) via Docker-compose
Install the mysql/postgresql database, iotdb/tdengine/victoria-metrics database and hertzbeat at one time through [docker-compose deployment script](script/docker-compose).
Install the postgresql/mysql database, victoria-metrics/iotdb/tdengine database and hertzbeat at one time through [docker-compose deployment script](script/docker-compose).
Detailed steps refer to [Install via Docker-Compose](script/docker-compose/README.md)
##### 5. Install All(hertzbeat+collector+mysql+tsdb) via kubernetes helm charts
##### 5: Install All(hertzbeat+collector+postgresql+tsdb) via kubernetes helm charts
Install HertzBeat cluster in a Kubernetes cluster by Helm chart.
@@ -174,10 +180,6 @@ Detailed steps refer to [Artifact Hub](https://artifacthub.io/packages/helm/hert
**HAVE FUN**
## 🥐 Roadmap
![hertzBeat](home/static/img/docs/hertzbeat-roadmap.png)
## ✨ Contributors
Thanks to these wonderful people, welcome to join us:
@@ -411,7 +413,7 @@ Thanks to these wonderful people, welcome to join us:
<td align="center" valign="top" width="14.28%"><a href="http://sharehoo.cn/"><img src="https://avatars.githubusercontent.com/u/45377370?v=4?s=100" width="100px;" alt="miki"/><br /><sub><b>miki</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=miki-hmt" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://codeflex.substack.com/"><img src="https://avatars.githubusercontent.com/u/85513042?v=4?s=100" width="100px;" alt="Keshav Carpenter"/><br /><sub><b>Keshav Carpenter</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=alpha951" title="Code">💻</a> <a href="https://github.com/apache/hertzbeat/commits?author=alpha951" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/makechoicenow"><img src="https://avatars.githubusercontent.com/u/9911918?v=4?s=100" width="100px;" alt="makechoicenow"/><br /><sub><b>makechoicenow</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=makechoicenow" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gjjjj0101"><img src="https://avatars.githubusercontent.com/u/71874373?v=4?s=100" width="100px;" alt="Gao Jian"/><br /><sub><b>Gao Jian</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=gjjjj0101" title="Code">💻</a> <a href="#design-gjjjj0101" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gjjjj0101"><img src="https://avatars.githubusercontent.com/u/71874373?v=4?s=100" width="100px;" alt="Gao Jian"/><br /><sub><b>Gao Jian</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=gjjjj0101" title="Code">💻</a> <a href="#design-gjjjj0101" title="Design">🎨</a> <a href="https://github.com/apache/hertzbeat/commits?author=gjjjj0101" title="Tests">⚠️</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://jangto.tistory.com/"><img src="https://avatars.githubusercontent.com/u/37864182?v=4?s=100" width="100px;" alt="Hyeon Sung"/><br /><sub><b>Hyeon Sung</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=dukbong" title="Code">💻</a></td>
@@ -437,15 +439,53 @@ Thanks to these wonderful people, welcome to join us:
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Aias00"><img src="https://avatars.githubusercontent.com/u/25810623?v=4?s=100" width="100px;" alt="aias00"/><br /><sub><b>aias00</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Aias00" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/westboy"><img src="https://avatars.githubusercontent.com/u/6385565?v=4?s=100" width="100px;" alt="Jin"/><br /><sub><b>Jin</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=westboy" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://blog.csdn.net/qq_52397471"><img src="https://avatars.githubusercontent.com/u/77964041?v=4?s=100" width="100px;" alt="YuLuo"/><br /><sub><b>YuLuo</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=yuluo-yx" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Yanshuming1"><img src="https://avatars.githubusercontent.com/u/118667222?v=4?s=100" width="100px;" alt="xiaoming student"/><br /><sub><b>xiaoming student</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Yanshuming1" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Yanshuming1"><img src="https://avatars.githubusercontent.com/u/118667222?v=4?s=100" width="100px;" alt="linDong"/><br /><sub><b>linDong</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Yanshuming1" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lwjxy"><img src="https://avatars.githubusercontent.com/u/52726400?v=4?s=100" width="100px;" alt="lwjxy"/><br /><sub><b>lwjxy</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=lwjxy" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://thespica.github.io/"><img src="https://avatars.githubusercontent.com/u/119573640?v=4?s=100" width="100px;" alt="John"/><br /><sub><b>John</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Thespica" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://thespica.github.io/"><img src="https://avatars.githubusercontent.com/u/119573640?v=4?s=100" width="100px;" alt="John"/><br /><sub><b>John</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Thespica" title="Code">💻</a> <a href="https://github.com/apache/hertzbeat/commits?author=Thespica" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/boatrainlsz"><img src="https://avatars.githubusercontent.com/u/18243785?v=4?s=100" width="100px;" alt="boatrainlsz"/><br /><sub><b>boatrainlsz</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=boatrainlsz" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.yitianyigexiangfa.com/"><img src="https://avatars.githubusercontent.com/u/3973419?v=4?s=100" width="100px;" alt="Bill Lau"/><br /><sub><b>Bill Lau</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=JavaProgrammerLB" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lw-yang"><img src="https://avatars.githubusercontent.com/u/23456873?v=4?s=100" width="100px;" alt="lwyang"/><br /><sub><b>lwyang</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=lw-yang" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xfl12345"><img src="https://avatars.githubusercontent.com/u/17960863?v=4?s=100" width="100px;" alt="xfl12345"/><br /><sub><b>xfl12345</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=xfl12345" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yykaue"><img src="https://avatars.githubusercontent.com/u/22905143?v=4?s=100" width="100px;" alt="Limbo"/><br /><sub><b>Limbo</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=yykaue" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/irenhongyan"><img src="https://avatars.githubusercontent.com/u/53438321?v=4?s=100" width="100px;" alt="哈哈哈哈哈哈哈哈哈"/><br /><sub><b>哈哈哈哈哈哈哈哈哈</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=irenhongyan" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ileonli"><img src="https://avatars.githubusercontent.com/u/45332412?v=4?s=100" width="100px;" alt="Leon Li"/><br /><sub><b>Leon Li</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=ileonli" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://fnil.net/"><img src="https://avatars.githubusercontent.com/u/14142?v=4?s=100" width="100px;" alt="dennis zhuang"/><br /><sub><b>dennis zhuang</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=killme2008" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kerwin612"><img src="https://avatars.githubusercontent.com/u/3371163?v=4?s=100" width="100px;" alt="Kerwin Bryant"/><br /><sub><b>Kerwin Bryant</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=kerwin612" title="Code">💻</a> <a href="#design-kerwin612" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ShineDevelopment"><img src="https://avatars.githubusercontent.com/u/59306780?v=4?s=100" width="100px;" alt="daixianglong"/><br /><sub><b>daixianglong</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=ShineDevelopment" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mchgood"><img src="https://avatars.githubusercontent.com/u/38482005?v=4?s=100" width="100px;" alt="mchgood"/><br /><sub><b>mchgood</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=mchgood" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pwallk"><img src="https://avatars.githubusercontent.com/u/69385076?v=4?s=100" width="100px;" alt="kangli"/><br /><sub><b>kangli</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=pwallk" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cdphantom"><img src="https://avatars.githubusercontent.com/u/12674795?v=4?s=100" width="100px;" alt="cdphantom"/><br /><sub><b>cdphantom</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=cdphantom" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/asd108908382"><img src="https://avatars.githubusercontent.com/u/77717999?v=4?s=100" width="100px;" alt="jiawei.guo"/><br /><sub><b>jiawei.guo</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=asd108908382" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/QBH-insist"><img src="https://avatars.githubusercontent.com/u/39401478?v=4?s=100" width="100px;" alt="QBH-insist"/><br /><sub><b>QBH-insist</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=QBH-insist" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jiangsh-ui"><img src="https://avatars.githubusercontent.com/u/86990361?v=4?s=100" width="100px;" alt="jiangsh"/><br /><sub><b>jiangsh</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=jiangsh-ui" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/keaifafafa"><img src="https://avatars.githubusercontent.com/u/83876361?v=4?s=100" width="100px;" alt="Keaifa"/><br /><sub><b>Keaifa</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=keaifafafa" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/loong95"><img src="https://avatars.githubusercontent.com/u/16333958?v=4?s=100" width="100px;" alt="Loong"/><br /><sub><b>Loong</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=loong95" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ceekay47"><img src="https://avatars.githubusercontent.com/u/104664857?v=4?s=100" width="100px;" alt="Chandrakant Vankayalapati"/><br /><sub><b>Chandrakant Vankayalapati</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=ceekay47" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MRgenial"><img src="https://avatars.githubusercontent.com/u/49973336?v=4?s=100" width="100px;" alt="b_mountain"/><br /><sub><b>b_mountain</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=MRgenial" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TemirlanBasitov"><img src="https://avatars.githubusercontent.com/u/57500808?v=4?s=100" width="100px;" alt="TemirlanBasitov"/><br /><sub><b>TemirlanBasitov</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=TemirlanBasitov" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wyfvsfy"><img src="https://avatars.githubusercontent.com/u/11973517?v=4?s=100" width="100px;" alt="wyfvsfy"/><br /><sub><b>wyfvsfy</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=wyfvsfy" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sherry-peng2333"><img src="https://avatars.githubusercontent.com/u/70619577?v=4?s=100" width="100px;" alt="sherry-peng2333"/><br /><sub><b>sherry-peng2333</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=sherry-peng2333" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lixiaobaivv"><img src="https://avatars.githubusercontent.com/u/39290771?v=4?s=100" width="100px;" alt="Yzzz"/><br /><sub><b>Yzzz</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=lixiaobaivv" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.bckf.cn/"><img src="https://avatars.githubusercontent.com/u/13309008?v=4?s=100" width="100px;" alt="puruidong"/><br /><sub><b>puruidong</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=pruidong" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/shinestare"><img src="https://avatars.githubusercontent.com/u/13570619?v=4?s=100" width="100px;" alt="shinestare"/><br /><sub><b>shinestare</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=shinestare" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/po-168"><img src="https://avatars.githubusercontent.com/u/185745593?v=4?s=100" width="100px;" alt="po-168"/><br /><sub><b>po-168</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=po-168" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/All-The-Best-for"><img src="https://avatars.githubusercontent.com/u/76414672?v=4?s=100" width="100px;" alt="wbs99"/><br /><sub><b>wbs99</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=All-The-Best-for" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/starryCoder"><img src="https://avatars.githubusercontent.com/u/46510059?v=4?s=100" width="100px;" alt="starryCoder"/><br /><sub><b>starryCoder</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=starryCoder" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hasimmollah"><img src="https://avatars.githubusercontent.com/u/32538599?v=4?s=100" width="100px;" alt="hasimmollah"/><br /><sub><b>hasimmollah</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=hasimmollah" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ayu-v0"><img src="https://avatars.githubusercontent.com/u/127600988?v=4?s=100" width="100px;" alt="Ayu"/><br /><sub><b>Ayu</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=ayu-v0" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Rancho-7"><img src="https://avatars.githubusercontent.com/u/59016860?v=4?s=100" width="100px;" alt="Nick Guo"/><br /><sub><b>Nick Guo</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Rancho-7" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/doveLin0818"><img src="https://avatars.githubusercontent.com/u/190927907?v=4?s=100" width="100px;" alt="doveLin"/><br /><sub><b>doveLin</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=doveLin0818" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://zzrl.cc/"><img src="https://avatars.githubusercontent.com/u/91836599?v=4?s=100" width="100px;" alt="yunfan24"/><br /><sub><b>yunfan24</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=yunfan24" title="Code">💻</a></td>
</tr>
</tbody>
</table>
@@ -463,7 +503,7 @@ Thanks to these wonderful people, welcome to join us:
[Chat On Discord](https://discord.gg/Fb6M73htGr)
WeChat Group : Add friend `tan-cloud` and invite to the group.
WeChat Group : Add friend `ahertzbeat` and invite to the group.
WeChat Public : Search ID `usthecom`.
@@ -493,11 +533,5 @@ HertzBeat has been included in the <a href="https://landscape.cncf.io/guide?item
CNCF Observability And Analysis - Monitoring Landscape.</a>
</p>
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=apache/hertzbeat&type=Date)](https://star-history.com/#apache/hertzbeat&Date)
## 🛡️ License
[`Apache License, Version 2.0`](https://www.apache.org/licenses/LICENSE-2.0.html)
+104 -70
View File
@@ -14,9 +14,11 @@
[![Reddit](https://img.shields.io/badge/Reddit-Community-7289DA?logo=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/apache/hertzbeat?style=%20for-the-badge&logo=docker&label=DockerHub%20Download)](https://hub.docker.com/repository/docker/apache/hertzbeat/general)
[![codecov](https://codecov.io/gh/apache/HertzBeat/branch/master/graph/badge.svg)](https://app.codecov.io/gh/apache/hertzbeat)
[![Docker Pulls](https://img.shields.io/docker/pulls/apache/hertzbeat?style=%20for-the-badge&logo=docker&label=DockerHub%20Download)](https://hub.docker.com/r/apache/hertzbeat)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/hertzbeat)](https://artifacthub.io/packages/search?repo=hertzbeat)
[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCri75zfWX0GHqJFPENEbLow?logo=youtube&label=YouTube%20Channel)](https://www.youtube.com/channel/UCri75zfWX0GHqJFPENEbLow)
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/apache/hertzbeat)
**官网: [hertzbeat.apache.org](https://hertzbeat.apache.org)**
@@ -40,7 +42,7 @@
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助用户快速搭建自有监控系统。
----
----
![hertzbeat](home/static/img/home/1.png)
@@ -48,7 +50,7 @@
![hertzbeat](home/static/img/home/9.png)
----
----
## 🥐 模块
@@ -59,42 +61,42 @@
> 我们将监控采集类型(mysql,jvm,k8s)都定义为 `yml` 监控模版,用户可以导入这些模版来支持对应类型的监控!
> 欢迎大家一起贡献你使用过程中自定义的通用监控类型监控模版。
- [Website](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-website.yml), [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-port.yml),
[Http Api](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-api.yml), [Ping Connect](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ping.yml),
[Jvm](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-jvm.yml), [SiteMap](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-fullsite.yml),
[Ssl Certificate](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ssl_cert.yml), [SpringBoot2](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-springboot2.yml),
[FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ftp.yml), [SpringBoot3](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-springboot3.yml),
[Udp Port](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-udp.yml), [Dns](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-dns.yml),
[Pop3](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-pop3.yml), [Ntp](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ntp.yml),
[Api Code](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-api_code.yml), [Smtp](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-smtp.yml),
[Nginx](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-nginx.yml)
- [Mysql](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-mysql.yml), [PostgreSQL](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-postgresql.yml),
[MariaDB](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-mariadb.yml), [Redis](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-redis.yml),
[ElasticSearch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-elasticsearch.yml), [SqlServer](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-sqlserver.yml),
[Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-mongodb.yml),
[DM](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-opengauss.yml),
[ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-iotdb.yml),
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-redis_sentinel.yml)
[Doris BE](https://github.com/apache/hertzbeat/blob/master/manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/manager/src/main/resources/define/app-doris_fe.yml),
[Memcached](https://github.com/apache/hertzbeat/blob/master/manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/manager/src/main/resources/define/app-nebulaGraph.yml)
- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-ubuntu.yml),
[CentOS](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-centos.yml), [Windows](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-windows.yml),
[EulerOS](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-euleros.yml), [Fedora CoreOS](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-coreos.yml),
[OpenSUSE](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-opensuse.yml), [Rocky Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-rockylinux.yml),
[Red Hat](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-redhat.yml), [FreeBSD](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-freebsd.yml),
[AlmaLinux](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-almalinux.yml), [Debian Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-debian.yml)
- [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-tomcat.yml), [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-nacos.yml),
[Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-zookeeper.yml), [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-rabbitmq.yml),
[Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-flink.yml), [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-kafka.yml),
[ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-shenyu.yml), [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-dynamic_tp.yml),
[Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-jetty.yml), [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-activemq.yml),
[Spring Gateway](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-spring_gateway.yml), [EMQX MQTT](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-emqx.yml),
[AirFlow](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-airflow.yml), [Hive](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-hive.yml),
[Spark](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-spark.yml), [Hadoop](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-hadoop.yml)
- [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-kubernetes.yml), [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-docker.yml)
- [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-cisco_switch.yml), [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-hpe_switch.yml),
[HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-huawei_switch.yml), [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-tplink_switch.yml),
[H3cSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/manager/src/main/resources/define/app-h3c_switch.yml)
- [Website](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-website.yml), [Port Telnet](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-port.yml),
[Http Api](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api.yml), [Ping Connect](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ping.yml),
[Jvm](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jvm.yml), [SiteMap](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-fullsite.yml),
[Ssl Certificate](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ssl_cert.yml), [SpringBoot2](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot2.yml),
[FTP Server](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ftp.yml), [SpringBoot3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-springboot3.yml),
[Udp Port](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-udp_port.yml), [Dns](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dns.yml),
[Pop3](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-pop3.yml), [Ntp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ntp.yml),
[Api Code](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-api_code.yml), [Smtp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-smtp.yml),
[Nginx](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nginx.yml)
- [Mysql](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mysql.yml), [PostgreSQL](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-postgresql.yml),
[MariaDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mariadb.yml), [Redis](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis.yml),
[ElasticSearch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-elasticsearch.yml), [SqlServer](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-sqlserver.yml),
[Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml),
[DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml),
[ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml),
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml)
[Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml),
[Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml)
- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml),
[CentOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-centos.yml), [Windows](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-windows.yml),
[EulerOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-euleros.yml), [Fedora CoreOS](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-coreos.yml),
[OpenSUSE](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opensuse.yml), [Rocky Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rockylinux.yml),
[Red Hat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redhat.yml), [FreeBSD](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-freebsd.yml),
[AlmaLinux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-almalinux.yml), [Debian Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-debian.yml)
- [Tomcat](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tomcat.yml), [Nacos](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-nacos.yml),
[Zookeeper](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-zookeeper.yml), [RabbitMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-rabbitmq.yml),
[Flink](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-flink.yml), [Kafka](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kafka.yml),
[ShenYu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-shenyu.yml), [DynamicTp](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dynamic_tp.yml),
[Jetty](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-jetty.yml), [ActiveMQ](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-activemq.yml),
[Spring Gateway](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spring_gateway.yml), [EMQX MQTT](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-emqx.yml),
[AirFlow](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-airflow.yml), [Hive](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hive.yml),
[Spark](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-spark.yml), [Hadoop](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hadoop.yml)
- [Kubernetes](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-kubernetes.yml), [Docker](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-docker.yml)
- [CiscoSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-cisco_switch.yml), [HpeSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-hpe_switch.yml),
[HuaweiSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-huawei_switch.yml), [TpLinkSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-tplink_switch.yml),
[H3cSwitch](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-h3c_switch.yml)
- 和更多自定义监控模版。
- 通知支持 `Discord` `Slack` `Telegram` `邮件` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱`
@@ -109,30 +111,34 @@
1. `docker` 环境仅需一条命令即可开始
```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat```
```shell
docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat apache/hertzbeat
```
2. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat`
3. 部署采集器集群(可选)
3. 部署采集器集群可选
```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
```
```
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` : 配置连接主 HertaBeat 服务的对外 IP。
- `-e MANAGER_PORT=1158` : 配置连接主 HertzBeat 服务的对外端口,默认1158。
- `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。
- `-e MANAGER_HOST=127.0.0.1` : 配置连接主 HertaBeat 服务的对外 IP。
- `-e MANAGER_PORT=1158` : 配置连接主 HertzBeat 服务的对外端口,默认1158。
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.apache.org/docs/start/docker-deploy)
更多配置详细步骤参考 [通过 Docker 方式安装 HertzBeat](https://hertzbeat.apache.org/docs/start/docker-deploy)
##### 方式二:通过安装包安装
1. 下载您系统环境对应的安装包 `hertzbeat-xx.tar.gz` [GITHUB Release](https://github.com/apache/hertzbeat/releases)
1. 下载您系统环境对应的安装包 `hertzbeat-xx.tar.gz` [Download](https://hertzbeat.apache.org/docs/download)
2. 配置 HertzBeat 的配置文件 `hertzbeat/config/application.yml` (可选)
3. 部署启动 `$ ./bin/startup.sh ` 或 `bin/startup.bat`
4. 浏览器访问 `http://localhost:1157` 即可开始,默认账号密码 `admin/hertzbeat`
5. 部署采集器集群(可选)
- 下载采集器安装包 `hertzbeat-collector-xx.tar.gz` 到规划的另一台部署主机上 [GITHUB Release](https://github.com/apache/hertzbeat/releases)
5. 部署采集器集群可选
- 下载采集器安装包 `hertzbeat-collector-xx.tar.gz` 到规划的另一台部署主机上 [Download](https://hertzbeat.apache.org/docs/download)
- 配置采集器的配置文件 `hertzbeat-collector/config/application.yml` 里面的连接主 HertzBeat 服务的对外 IP,端口,当前采集器名称(需保证唯一性)等参数 `identity` `mode` (public or private) `manager-host` `manager-port`
```yaml
collector:
@@ -153,19 +159,19 @@ docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MAN
##### 方式三:本地代码启动
1. 此为前后端分离项目,本地代码调试需要分别启动后端工程 `manager` 和前端工程 `web-app`
2. 后端:需要 `maven3+`, `java17` 和 `lombok` 环境,修改 `YML` 配置信息启动 `manager` 服务
2. 后端:需要 `maven3+`, `java17` 和 `lombok` 环境,修改 `YML` 配置信息,添加JVM参数`--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED`后启动 `manager` 服务即可。
3. 前端:需要 `nodejs npm angular-cli`环境,待本地后端启动后,在 `web-app` 目录下启动 `ng serve --open`
4. 浏览器访问 `http://localhost:4200` 即可开始,默认账号密码 `admin/hertzbeat`
详细步骤参考 [参与贡献之本地代码启动](CONTRIBUTING.md)
##### 方式四:Docker-Compose 统一安装 hertzbeat+mysql+tsdb
##### 方式四:Docker-Compose 统一安装 hertzbeat+postgresql+tsdb
通过 [Docker-Compose 部署脚本](script/docker-compose) 一次性把 mysql/postgresql 数据库, iotdb/tdengine/victoria-metrics 时序数据库和 hertzbeat 安装部署。
通过 [Docker-Compose 部署脚本](script/docker-compose) 一次性把 postgresql/mysql 数据库, victoria-metrics/iotdb/tdengine 时序数据库和 hertzbeat 安装部署。
详细步骤参考 [通过Docker-Compose安装HertzBeat](script/docker-compose/README.md)
详细步骤参考 [通过 Docker-Compose 安装 HertzBeat](script/docker-compose/README.md)
##### 方式五:Kubernetes Helm Charts 部署 hertzbeat+collector+mysql+tsdb
##### 方式五:Kubernetes Helm Charts 部署 hertzbeat+collector+postgresql+tsdb
通过 Helm Chart 一次性将 HertzBeat 集群组件部署到 Kubernetes 集群中。
@@ -173,10 +179,6 @@ docker run -d -e IDENTITY=custom-collector-name -e MANAGER_HOST=127.0.0.1 -e MAN
**HAVE FUN**
## 🥐 路线图
![hertzBeat](home/static/img/docs/hertzbeat-roadmap.png)
## ✨ Contributors
Thanks these wonderful people, welcome to join us:
@@ -410,7 +412,7 @@ Thanks these wonderful people, welcome to join us:
<td align="center" valign="top" width="14.28%"><a href="http://sharehoo.cn/"><img src="https://avatars.githubusercontent.com/u/45377370?v=4?s=100" width="100px;" alt="miki"/><br /><sub><b>miki</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=miki-hmt" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://codeflex.substack.com/"><img src="https://avatars.githubusercontent.com/u/85513042?v=4?s=100" width="100px;" alt="Keshav Carpenter"/><br /><sub><b>Keshav Carpenter</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=alpha951" title="Code">💻</a> <a href="https://github.com/apache/hertzbeat/commits?author=alpha951" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/makechoicenow"><img src="https://avatars.githubusercontent.com/u/9911918?v=4?s=100" width="100px;" alt="makechoicenow"/><br /><sub><b>makechoicenow</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=makechoicenow" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gjjjj0101"><img src="https://avatars.githubusercontent.com/u/71874373?v=4?s=100" width="100px;" alt="Gao Jian"/><br /><sub><b>Gao Jian</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=gjjjj0101" title="Code">💻</a> <a href="#design-gjjjj0101" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gjjjj0101"><img src="https://avatars.githubusercontent.com/u/71874373?v=4?s=100" width="100px;" alt="Gao Jian"/><br /><sub><b>Gao Jian</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=gjjjj0101" title="Code">💻</a> <a href="#design-gjjjj0101" title="Design">🎨</a> <a href="https://github.com/apache/hertzbeat/commits?author=gjjjj0101" title="Tests">⚠️</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://jangto.tistory.com/"><img src="https://avatars.githubusercontent.com/u/37864182?v=4?s=100" width="100px;" alt="Hyeon Sung"/><br /><sub><b>Hyeon Sung</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=dukbong" title="Code">💻</a></td>
@@ -436,15 +438,53 @@ Thanks these wonderful people, welcome to join us:
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Aias00"><img src="https://avatars.githubusercontent.com/u/25810623?v=4?s=100" width="100px;" alt="aias00"/><br /><sub><b>aias00</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Aias00" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/westboy"><img src="https://avatars.githubusercontent.com/u/6385565?v=4?s=100" width="100px;" alt="Jin"/><br /><sub><b>Jin</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=westboy" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://blog.csdn.net/qq_52397471"><img src="https://avatars.githubusercontent.com/u/77964041?v=4?s=100" width="100px;" alt="YuLuo"/><br /><sub><b>YuLuo</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=yuluo-yx" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Yanshuming1"><img src="https://avatars.githubusercontent.com/u/118667222?v=4?s=100" width="100px;" alt="xiaoming student"/><br /><sub><b>xiaoming student</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Yanshuming1" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Yanshuming1"><img src="https://avatars.githubusercontent.com/u/118667222?v=4?s=100" width="100px;" alt="linDong"/><br /><sub><b>linDong</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Yanshuming1" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lwjxy"><img src="https://avatars.githubusercontent.com/u/52726400?v=4?s=100" width="100px;" alt="lwjxy"/><br /><sub><b>lwjxy</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=lwjxy" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://thespica.github.io/"><img src="https://avatars.githubusercontent.com/u/119573640?v=4?s=100" width="100px;" alt="John"/><br /><sub><b>John</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Thespica" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://thespica.github.io/"><img src="https://avatars.githubusercontent.com/u/119573640?v=4?s=100" width="100px;" alt="John"/><br /><sub><b>John</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Thespica" title="Code">💻</a> <a href="https://github.com/apache/hertzbeat/commits?author=Thespica" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/boatrainlsz"><img src="https://avatars.githubusercontent.com/u/18243785?v=4?s=100" width="100px;" alt="boatrainlsz"/><br /><sub><b>boatrainlsz</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=boatrainlsz" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.yitianyigexiangfa.com/"><img src="https://avatars.githubusercontent.com/u/3973419?v=4?s=100" width="100px;" alt="Bill Lau"/><br /><sub><b>Bill Lau</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=JavaProgrammerLB" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lw-yang"><img src="https://avatars.githubusercontent.com/u/23456873?v=4?s=100" width="100px;" alt="lwyang"/><br /><sub><b>lwyang</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=lw-yang" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xfl12345"><img src="https://avatars.githubusercontent.com/u/17960863?v=4?s=100" width="100px;" alt="xfl12345"/><br /><sub><b>xfl12345</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=xfl12345" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yykaue"><img src="https://avatars.githubusercontent.com/u/22905143?v=4?s=100" width="100px;" alt="Limbo"/><br /><sub><b>Limbo</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=yykaue" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/irenhongyan"><img src="https://avatars.githubusercontent.com/u/53438321?v=4?s=100" width="100px;" alt="哈哈哈哈哈哈哈哈哈"/><br /><sub><b>哈哈哈哈哈哈哈哈哈</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=irenhongyan" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ileonli"><img src="https://avatars.githubusercontent.com/u/45332412?v=4?s=100" width="100px;" alt="Leon Li"/><br /><sub><b>Leon Li</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=ileonli" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://fnil.net/"><img src="https://avatars.githubusercontent.com/u/14142?v=4?s=100" width="100px;" alt="dennis zhuang"/><br /><sub><b>dennis zhuang</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=killme2008" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kerwin612"><img src="https://avatars.githubusercontent.com/u/3371163?v=4?s=100" width="100px;" alt="Kerwin Bryant"/><br /><sub><b>Kerwin Bryant</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=kerwin612" title="Code">💻</a> <a href="#design-kerwin612" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ShineDevelopment"><img src="https://avatars.githubusercontent.com/u/59306780?v=4?s=100" width="100px;" alt="daixianglong"/><br /><sub><b>daixianglong</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=ShineDevelopment" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mchgood"><img src="https://avatars.githubusercontent.com/u/38482005?v=4?s=100" width="100px;" alt="mchgood"/><br /><sub><b>mchgood</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=mchgood" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pwallk"><img src="https://avatars.githubusercontent.com/u/69385076?v=4?s=100" width="100px;" alt="kangli"/><br /><sub><b>kangli</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=pwallk" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cdphantom"><img src="https://avatars.githubusercontent.com/u/12674795?v=4?s=100" width="100px;" alt="cdphantom"/><br /><sub><b>cdphantom</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=cdphantom" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/asd108908382"><img src="https://avatars.githubusercontent.com/u/77717999?v=4?s=100" width="100px;" alt="jiawei.guo"/><br /><sub><b>jiawei.guo</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=asd108908382" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/QBH-insist"><img src="https://avatars.githubusercontent.com/u/39401478?v=4?s=100" width="100px;" alt="QBH-insist"/><br /><sub><b>QBH-insist</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=QBH-insist" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jiangsh-ui"><img src="https://avatars.githubusercontent.com/u/86990361?v=4?s=100" width="100px;" alt="jiangsh"/><br /><sub><b>jiangsh</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=jiangsh-ui" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/keaifafafa"><img src="https://avatars.githubusercontent.com/u/83876361?v=4?s=100" width="100px;" alt="Keaifa"/><br /><sub><b>Keaifa</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=keaifafafa" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/loong95"><img src="https://avatars.githubusercontent.com/u/16333958?v=4?s=100" width="100px;" alt="Loong"/><br /><sub><b>Loong</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=loong95" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ceekay47"><img src="https://avatars.githubusercontent.com/u/104664857?v=4?s=100" width="100px;" alt="Chandrakant Vankayalapati"/><br /><sub><b>Chandrakant Vankayalapati</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=ceekay47" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MRgenial"><img src="https://avatars.githubusercontent.com/u/49973336?v=4?s=100" width="100px;" alt="b_mountain"/><br /><sub><b>b_mountain</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=MRgenial" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TemirlanBasitov"><img src="https://avatars.githubusercontent.com/u/57500808?v=4?s=100" width="100px;" alt="TemirlanBasitov"/><br /><sub><b>TemirlanBasitov</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=TemirlanBasitov" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wyfvsfy"><img src="https://avatars.githubusercontent.com/u/11973517?v=4?s=100" width="100px;" alt="wyfvsfy"/><br /><sub><b>wyfvsfy</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=wyfvsfy" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sherry-peng2333"><img src="https://avatars.githubusercontent.com/u/70619577?v=4?s=100" width="100px;" alt="sherry-peng2333"/><br /><sub><b>sherry-peng2333</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=sherry-peng2333" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lixiaobaivv"><img src="https://avatars.githubusercontent.com/u/39290771?v=4?s=100" width="100px;" alt="Yzzz"/><br /><sub><b>Yzzz</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=lixiaobaivv" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.bckf.cn/"><img src="https://avatars.githubusercontent.com/u/13309008?v=4?s=100" width="100px;" alt="puruidong"/><br /><sub><b>puruidong</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=pruidong" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/shinestare"><img src="https://avatars.githubusercontent.com/u/13570619?v=4?s=100" width="100px;" alt="shinestare"/><br /><sub><b>shinestare</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=shinestare" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/po-168"><img src="https://avatars.githubusercontent.com/u/185745593?v=4?s=100" width="100px;" alt="po-168"/><br /><sub><b>po-168</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=po-168" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/All-The-Best-for"><img src="https://avatars.githubusercontent.com/u/76414672?v=4?s=100" width="100px;" alt="wbs99"/><br /><sub><b>wbs99</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=All-The-Best-for" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/starryCoder"><img src="https://avatars.githubusercontent.com/u/46510059?v=4?s=100" width="100px;" alt="starryCoder"/><br /><sub><b>starryCoder</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=starryCoder" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hasimmollah"><img src="https://avatars.githubusercontent.com/u/32538599?v=4?s=100" width="100px;" alt="hasimmollah"/><br /><sub><b>hasimmollah</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=hasimmollah" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ayu-v0"><img src="https://avatars.githubusercontent.com/u/127600988?v=4?s=100" width="100px;" alt="Ayu"/><br /><sub><b>Ayu</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=ayu-v0" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Rancho-7"><img src="https://avatars.githubusercontent.com/u/59016860?v=4?s=100" width="100px;" alt="Nick Guo"/><br /><sub><b>Nick Guo</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=Rancho-7" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/doveLin0818"><img src="https://avatars.githubusercontent.com/u/190927907?v=4?s=100" width="100px;" alt="doveLin"/><br /><sub><b>doveLin</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=doveLin0818" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://zzrl.cc/"><img src="https://avatars.githubusercontent.com/u/91836599?v=4?s=100" width="100px;" alt="yunfan24"/><br /><sub><b>yunfan24</b></sub></a><br /><a href="https://github.com/apache/hertzbeat/commits?author=yunfan24" title="Code">💻</a></td>
</tr>
</tbody>
</table>
@@ -462,7 +502,7 @@ Thanks these wonderful people, welcome to join us:
[Chat On Discord](https://discord.gg/Fb6M73htGr)
微信交流群 : 加 `tan-cloud` 好友邀请进群.
微信交流群 : 加 `ahertzbeat` 好友邀请进群.
微信公众号 : 搜索 ID `usthecom`.
@@ -494,11 +534,5 @@ HertzBeat has been included in the <a href="https://landscape.cncf.io/guide?item
CNCF Observability And Analysis - Monitoring Landscape.</a>
</p>
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=apache/hertzbeat&type=Date)](https://star-history.com/#apache/hertzbeat&Date)
## 🛡️ License
[`Apache License, Version 2.0`](https://www.apache.org/licenses/LICENSE-2.0.html)
+9 -6
View File
@@ -1,12 +1,9 @@
# Security Policy
**[Version Releases](https://github.com/apache/hertzbeat/releases)**
Apache HertzBeat follows the [ASF vulnerability handling process](https://apache.org/security/#vulnerability-handling)
## Supported Versions
Use this section to tell people about which versions of your project are
currently being supported with security updates.
| Version | Supported |
|-------------------|--------------------|
| Latest Version | :white_check_mark: |
@@ -14,6 +11,12 @@ currently being supported with security updates.
## Reporting a Vulnerability
Use this section to tell people how to report a vulnerability.
Please do not file GitHub issues for security vulnerabilities as they are public!
Please report vulnerability disclosures to `security@apache.org`.
To report a new vulnerability you have discovered please follow the [ASF vulnerability reporting process](https://apache.org/security/#reporting-a-vulnerability).
## Extra Information
- [Apache HertzBeat Security Model](https://hertzbeat.apache.org/docs/help/security_model)
- [ASF Security](https://www.apache.org/security/)
- [Apache HertzBeat Document](https://hertzbeat.apache.org/docs/)
@@ -1,233 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.collector.collect.common.cache;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
/**
* lru common resource cache for client-server connection
*/
@Slf4j
public class ConnectionCommonCache<T, C extends AbstractConnection<?>> {
/**
* default cache time 200s
*/
private static final long DEFAULT_CACHE_TIMEOUT = 200 * 1000L;
/**
* default max cache num
*/
private static final int DEFAULT_MAX_CAPACITY = 10000;
/**
* cacheTime length
*/
private static final int CACHE_TIME_LENGTH = 2;
/**
* cache timeout map
*/
private Map<T, Long[]> timeoutMap;
/**
* object cache
*/
private ConcurrentLinkedHashMap<T, C> cacheMap;
/**
* the executor who clean cache when timeout
*/
private ThreadPoolExecutor timeoutCleanerExecutor;
public ConnectionCommonCache() {
init();
}
private void init() {
cacheMap = new ConcurrentLinkedHashMap
.Builder<T, C>()
.maximumWeightedCapacity(DEFAULT_MAX_CAPACITY)
.listener((key, value) -> {
timeoutMap.remove(key);
try {
value.close();
} catch (Exception e) {
log.error("connection close error: {}.", e.getMessage(), e);
}
log.info("connection common cache discard key: {}, value: {}.", key, value);
}).build();
timeoutMap = new ConcurrentHashMap<>(DEFAULT_MAX_CAPACITY >> 6);
// last-first-coverage algorithm, run the first and last thread, discard mid
timeoutCleanerExecutor = new ThreadPoolExecutor(1, 1, 1, TimeUnit.SECONDS,
new ArrayBlockingQueue<>(1),
r -> new Thread(r, "connection-cache-timeout-cleaner"),
new ThreadPoolExecutor.DiscardOldestPolicy());
// init monitor available detector cyc task
ThreadFactory threadFactory = new ThreadFactoryBuilder()
.setNameFormat("connection-cache-ava-detector-%d")
.setDaemon(true)
.build();
ScheduledThreadPoolExecutor scheduledExecutor = new ScheduledThreadPoolExecutor(1, threadFactory);
scheduledExecutor.scheduleWithFixedDelay(this::detectCacheAvailable, 2, 20, TimeUnit.MINUTES);
}
/**
* detect all cache available, cleanup not ava connection
*/
private void detectCacheAvailable() {
try {
cacheMap.forEach((key, value) -> {
Long[] cacheTime = timeoutMap.get(key);
long currentTime = System.currentTimeMillis();
if (cacheTime == null || cacheTime.length != CACHE_TIME_LENGTH
|| cacheTime[0] + cacheTime[1] < currentTime) {
cacheMap.remove(key);
timeoutMap.remove(key);
try {
value.close();
} catch (Exception e) {
log.error("connection close error: {}.", e.getMessage(), e);
}
}
});
} catch (Exception e) {
log.error("connection common cache detect cache available error: {}.", e.getMessage(), e);
}
}
/**
* clean timeout cache
*/
private void cleanTimeoutCache() {
try {
cacheMap.forEach((key, value) -> {
// index 0 is startTime, 1 is timeDiff
Long[] cacheTime = timeoutMap.get(key);
long currentTime = System.currentTimeMillis();
if (cacheTime == null || cacheTime.length != CACHE_TIME_LENGTH) {
timeoutMap.put(key, new Long[]{currentTime, DEFAULT_CACHE_TIMEOUT});
} else if (cacheTime[0] + cacheTime[1] < currentTime) {
// timeout, remove this object cache
log.warn("[connection common cache] clean the timeout cache, key {}", key);
timeoutMap.remove(key);
cacheMap.remove(key);
try {
value.close();
} catch (Exception e) {
log.error("connection close error: {}.", e.getMessage(), e);
}
}
});
Thread.sleep(20 * 1000);
} catch (Exception e) {
log.error("[connection common cache] clean timeout cache error: {}.", e.getMessage(), e);
}
}
/**
* add update cache
*
* @param key cache key
* @param value cache value
* @param timeDiff cache time millis
*/
public void addCache(T key, C value, Long timeDiff) {
removeCache(key);
if (timeDiff == null) {
timeDiff = DEFAULT_CACHE_TIMEOUT;
}
cacheMap.put(key, value);
timeoutMap.put(key, new Long[]{System.currentTimeMillis(), timeDiff});
timeoutCleanerExecutor.execute(this::cleanTimeoutCache);
}
/**
* add update cache
*
* @param key cache key
* @param value cache value
*/
public void addCache(T key, C value) {
addCache(key, value, DEFAULT_CACHE_TIMEOUT);
}
/**
* get cache by key
*
* @param key cache key
* @param refreshCache is refresh cache
* @return cache object
*/
public Optional<C> getCache(T key, boolean refreshCache) {
Long[] cacheTime = timeoutMap.get(key);
if (cacheTime == null || cacheTime.length != CACHE_TIME_LENGTH) {
log.info("[connection common cache] not hit the cache, key {}.", key);
return Optional.empty();
}
if (cacheTime[0] + cacheTime[1] < System.currentTimeMillis()) {
log.warn("[connection common cache] is timeout, remove it, key {}.", key);
timeoutMap.remove(key);
cacheMap.remove(key);
return Optional.empty();
}
C value = cacheMap.compute(key, (k, v) -> {
if (v == null) {
log.error("[connection common cache] value is null, remove it, key {}.", key);
timeoutMap.remove(key);
return null;
}
if (refreshCache) {
cacheTime[0] = System.currentTimeMillis();
timeoutMap.put(key, cacheTime);
}
return v;
});
return Optional.ofNullable(value);
}
/**
* remove cache by key
*
* @param key key
*/
public void removeCache(T key) {
timeoutMap.remove(key);
C value = cacheMap.remove(key);
try {
if (value == null) {
return;
}
value.close();
} catch (Exception e) {
log.error("connection close error: {}.", e.getMessage(), e);
}
}
}
@@ -1,65 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.collector.dispatch.unit.impl;
import java.math.BigDecimal;
import java.math.RoundingMode;
import org.apache.hertzbeat.collector.dispatch.unit.TimeLengthUnit;
import org.apache.hertzbeat.collector.dispatch.unit.UnitConvert;
import org.springframework.stereotype.Component;
/**
* the convert of time length
*/
@Component
public final class TimeLengthConvert implements UnitConvert {
@Override
public String convert(String value, String originUnit, String newUnit) {
if (value == null || value.isEmpty()) {
return null;
}
BigDecimal length = new BigDecimal(value);
// Idea: Value is converted to nanoseconds through origin unit,
// and then converted to the value corresponding to the new unit unit
for (TimeLengthUnit timeLengthUnit : TimeLengthUnit.values()) {
if (timeLengthUnit.getUnit().equals(originUnit.toUpperCase())) {
length = length.multiply(new BigDecimal(timeLengthUnit.getScale()));
}
if (timeLengthUnit.getUnit().equals(newUnit.toUpperCase())) {
length = length.divide(new BigDecimal(timeLengthUnit.getScale()), 12, RoundingMode.HALF_UP);
}
}
return length.setScale(4, RoundingMode.HALF_UP).stripTrailingZeros().toPlainString();
}
@Override
public boolean checkUnit(String unit) {
if (unit == null || unit.isEmpty()) {
return false;
}
for (TimeLengthUnit timeUnit : TimeLengthUnit.values()) {
// not case-sensitive
if (timeUnit.getUnit().equals(unit.toUpperCase())) {
return true;
}
}
return false;
}
}
@@ -1,112 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.collector.collect.common.cache;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Optional;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
* Test case for {@link ConnectionCommonCache}
*/
class CommonCacheTest {
private AbstractConnection<?> mockConnection;
private ConnectionCommonCache<String, AbstractConnection<?>> cache;
@BeforeEach
void setUp() {
cache = new ConnectionCommonCache<>();
mockConnection = new AbstractConnection<>() {
@Override
public Object getConnection() {
return null;
}
@Override
public void closeConnection() throws Exception {
}
};
}
@Test
void testAddAndRetrieveCache() {
String key = "testKey";
cache.addCache(key, mockConnection);
Optional<AbstractConnection<?>> retrieved = cache.getCache(key, false);
assertTrue(retrieved.isPresent());
assertSame(mockConnection, retrieved.get());
}
@Test
void testCacheTimeout() throws InterruptedException {
String key = "timeoutKey";
cache.addCache(key, mockConnection, 1L);
Thread.sleep(2);
Optional<AbstractConnection<?>> retrieved = cache.getCache(key, false);
assertFalse(retrieved.isPresent());
}
@Test
void testRemoveCache() {
String key = "removeKey";
cache.addCache(key, mockConnection);
cache.removeCache(key);
Optional<AbstractConnection<?>> retrieved = cache.getCache(key, false);
assertFalse(retrieved.isPresent());
}
@Test
void testRefreshCache() {
String key = "refreshKey";
cache.addCache(key, mockConnection, 5000L);
Optional<AbstractConnection<?>> firstRetrieval = cache.getCache(key, true);
assertTrue(firstRetrieval.isPresent());
Optional<AbstractConnection<?>> secondRetrieval = cache.getCache(key, false);
assertTrue(secondRetrieval.isPresent());
}
@Test
void testConcurrentAccess() throws InterruptedException {
String key = "concurrentKey";
cache.addCache(key, mockConnection);
Runnable accessCache = () -> {
Optional<AbstractConnection<?>> retrieved = cache.getCache(key, false);
assertTrue(retrieved.isPresent());
};
Thread thread1 = new Thread(accessCache);
Thread thread2 = new Thread(accessCache);
thread1.start();
thread2.start();
thread1.join();
thread2.join();
}
}
@@ -1,78 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.collector.collect.http.promethus.exporter;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.Map;
import org.junit.jupiter.api.Test;
/**
* Test case for {@link ExporterParser}
*/
class ExporterParserTest {
@Test
void textToMetric() {
String resp = "# HELP disk_total_bytes Total space for path\n"
+ "# TYPE disk_total_bytes gauge\n"
+ "disk_total_bytes{path=\"C:\\\\hertzbeat\\\\repo\\\\testpath\",} 4.29496725504E11\n"
+ "# HELP go_gc_cycles_automatic_gc_cycles_total Count of completed GC cycles generated by the Go runtime.\n"
+ "# TYPE go_gc_cycles_automatic_gc_cycles_total counter\n"
+ "go_gc_cycles_automatic_gc_cycles_total 0\n"
+ "# HELP go_gc_cycles_forced_gc_cycles_total Count of completed GC cycles forced by the application.\n"
+ "# TYPE go_gc_cycles_forced_gc_cycles_total counter\n"
+ "go_gc_cycles_forced_gc_cycles_total 0\n"
+ "# HELP go_gc_cycles_total_gc_cycles_total Count of all completed GC cycles.\n"
+ "# TYPE go_gc_cycles_total_gc_cycles_total counter\n"
+ "go_gc_cycles_total_gc_cycles_total 0\n"
+ "# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.\n"
+ "# TYPE go_gc_duration_seconds summary\n"
+ "go_gc_duration_seconds{quantile=\"0\"} 0\n"
+ "go_gc_duration_seconds{quantile=\"0.25\"} 0\n"
+ "go_gc_duration_seconds{quantile=\"0.5\"} 0\n"
+ "go_gc_duration_seconds{quantile=\"0.75\"} 0\n"
+ "go_gc_duration_seconds{quantile=\"1\"} 0\n"
+ "# TYPE jvm info\n"
+ "# HELP jvm VM version info\n"
+ "jvm_info{runtime=\"OpenJDK Runtime Environment\",vendor=\"Azul Systems, Inc.\",version=\"11.0.13+8-LTS\"} 1.0\n"
+ "# TYPE jvm_gc_collection_seconds summary\n"
+ "# HELP jvm_gc_collection_seconds Time spent in a given JVM garbage collector in seconds.\n"
+ "jvm_gc_collection_seconds_count{gc=\"G1 Young Generation\"} 10.0\n"
+ "jvm_gc_collection_seconds_sum{gc=\"G1 Young Generation\"} 0.051\n"
+ "jvm_gc_collection_seconds_count{gc=\"G1 Old Generation\"} 0.0\n"
+ "jvm_gc_collection_seconds_sum{gc=\"G1 Old Generation\"} 0.0\n"
+ "# TYPE resource_group_aggregate_usage_secs summary\n"
+ "resource_group_aggregate_usage_secs{cluster=\"standalone\",quantile=\"0.5\"} 2.69245E-4\n"
+ "resource_group_aggregate_usage_secs{cluster=\"standalone\",quantile=\"0.9\"} 3.49601E-4\n"
+ "resource_group_aggregate_usage_secs_count{cluster=\"standalone\"} 13.0\n"
+ "resource_group_aggregate_usage_secs_sum{cluster=\"standalone\"} 0.004832498\n"
+ "resource_group_aggregate_usage_secs_created{cluster=\"standalone\"} 1.715842140749E9\n"
+ "# TYPE metadata_store_ops_latency_ms histogram\n"
+ "metadata_store_ops_latency_ms_bucket{cluster=\"standalone\",name=\"metadata-store\",type=\"get\",status=\"success\",le=\"1.0\"} 59.0\n"
+ "metadata_store_ops_latency_ms_bucket{cluster=\"standalone\",name=\"metadata-store\",type=\"get\",status=\"success\",le=\"3.0\"} 61.0\n"
+ "metadata_store_ops_latency_ms_bucket{cluster=\"standalone\",name=\"metadata-store\",type=\"get\",status=\"success\",le=\"5.0\"} 61.0\n"
+ "# EOF";
ExporterParser parser = new ExporterParser();
Map<String, MetricFamily> metricFamilyMap = parser.textToMetric(resp);
assertEquals(5, metricFamilyMap.get("resource_group_aggregate_usage_secs").getMetricList().size());
assertEquals(3, metricFamilyMap.get("metadata_store_ops_latency_ms").getMetricList().size());
assertEquals(5, metricFamilyMap.get("go_gc_duration_seconds").getMetricList().size());
assertEquals(9, metricFamilyMap.size());
}
}
@@ -1,59 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.collector.util;
import java.io.IOException;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
/**
* test case for {@link PrivateKeyUtils}
*/
class PrivateKeyUtilsTest {
@DisplayName("write key to ~/.ssh")
@Test
void writePrivateKey() throws IOException {
var key = "-----BEGIN RSA PRIVATE KEY-----\n"
+ "MIIEogIBAAKCAQEA4ctFYk/xy89L6/6YFeeMrwCW9lCP/ThXMn+9G63s5bGn4oIN\n"
+ "8cEf/JYkmGw8vMP41IAP9dyH8ji2wIZSLeTPWucEK6P6jA01iIBQ95ng6RTsnQgL\n"
+ "h4pYHxlEaNHcXkjy5GlMdzaWadjdRevpThGR1VOtWFtK3yoC0c/te2Junu04f+11\n"
+ "cpk8QvmVfzrBUooVnG0/7oekwUy1c5sSl0qVoLzXOv4XG9w34cyvacFC30zv1Nl8\n"
+ "ASi2pmOBVx9njPvqQ7qZrDk0nwn+RZUmGh/PbmHxrBV7ZA5NjZcEnf2VGIfjGUVu\n"
+ "qE4VnkbvS4j03afV2rsp1yo74K+k/ZC6GCHB5QIBIwKCAQBG9r4I9I3SVxfcdJYy\n"
+ "xR2WFiDREgFeNkdKYqkl9NVsws5dIY9am8g5cQQv54DNnK1KGZ6dulaclXtD0nGZ\n"
+ "ZSs505OYr+EHcd2f7dBN0Uavp32QcD4jSLycD0FixZ0HsIbaEnceJxlUd1t8YBYf\n"
+ "2aLcpUUbxOulORbUOgjPAa286uDeQYN5IbdruDfvbuFFm7hBoGZoKLJ7FPcJ0U3A\n"
+ "14KRK+Z1oCYJIS0ubaHbhaPIVPPQEmTNHpsvxIJXfZtVy9+XIuBGmD3+Aq6SSFPC\n"
+ "A8mU1iKzzdRCXZwvPeUiivIIZc6DRXjhtJ2Lya/XndKidOT/QUj8Z+f9pWAonlzM\n"
+ "3PMXAoGBAPvzctkkDjUJjLyEuYQq8soYokS4n4ykFTP5oFgnodK/cYocbxTT6Tn9\n"
+ "vH7b6lK6ZAf+tZk8rcEeIO650pOvmaa1/OuZSxfcFUGBvOvYXiHF7zmkePh/pQgB\n"
+ "7Cl0RYrI52Cjbd9aCUIYK3A82qsUq30INGeOhMNrfaHn2pgx8xlDAoGBAOVsNctw\n"
+ "CHnLaIQX8eS+eUcQEm+NZppnDBJavdpP48ZZM/t5v/2fQ5ytbYqk0KEzIGu0dP8g\n"
+ "jfB76JbMvStvTfB+TrXsfhGyA3oJrEcG+3IUshsRU2sohT1ScY27z2VMLgilnWvF\n"
+ "7t49sQm9uB/yn669n8LIciHxDItOpvqgKdG3AoGBAO2NxA6PtZ+4jAIz/19bsbc7\n"
+ "zDIqaovrKe8tMMglXg/ZE0e0aLvdvqRkRAKU1Z51Ob5lLuDwEYoyWZCgk1gL90Vp\n"
+ "wpT+P3zlcyCBo39IWMDB8C8IydRbF/GbaaNtoKds92m+qWwwUd87XCf+3M0wvvI6\n"
+ "75TW1PLEbyOgFz8Khh8hAoGBAJbDc87Ul9sCAtp2Ip2hvWk2coPR8vfADz9C8cn5\n"
+ "/BShBOcVfipSt2b1n8GCP/TnFU4XgBVeiSkA9+4Rg6AzMzejdY1+JvWvfqCnRVM/\n"
+ "GkOnMzZb17tyZi+ck8OKC/IcHkAyUYFWL0GWQSOojvBsPQxt+0V8aEIwsHjNSSha\n"
+ "nyNpAoGAd0XqdByRxbWgg5ZsvM0tvrpMITpEZsGMG9VeQPGl0wsQvC2zw5QGLvz/\n"
+ "57YhofOOr0M3yElcFA9Imvek5CYZsyL8eIWGZyadfRiYvGOUyvDDO3BYRG4DmhyF\n"
+ "KVk3URjEuOCC29ORvZ/7HaCO9iuEbvAA/mrAtd7KdCA+3PzfEOw=\n"
+ "-----END RSA PRIVATE KEY-----";
PrivateKeyUtils.writePrivateKey("127.0.0.1", key);
}
}
@@ -1,316 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.common.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* common module properties
*/
@ConfigurationProperties(prefix = "common")
public class CommonProperties {
/**
* secret key for password aes entry, must 16 bits
*/
private String secret;
/**
* data queue impl
*/
private DataQueueProperties queue;
/**
* sms impl properties
*/
private SmsProperties sms;
public String getSecret() {
return secret;
}
public DataQueueProperties getQueue() {
return queue;
}
public SmsProperties getSms() {
return sms;
}
public void setSecret(String secret) {
this.secret = secret;
}
public void setQueue(DataQueueProperties queue) {
this.queue = queue;
}
public void setSms(SmsProperties sms) {
this.sms = sms;
}
/**
* data queue properties
*/
public static class DataQueueProperties {
private QueueType type = QueueType.Memory;
private KafkaProperties kafka;
public QueueType getType() {
return type;
}
public void setType(QueueType type) {
this.type = type;
}
public KafkaProperties getKafka() {
return kafka;
}
public void setKafka(KafkaProperties kafka) {
this.kafka = kafka;
}
}
/**
* data queue type
*/
public enum QueueType {
/** in memory **/
Memory,
/** kafka **/
Kafka,
/** with netty connect **/
Netty,
/** rabbit mq **/
Rabbit_Mq
}
/**
* kafka data queue properties
*/
public static class KafkaProperties {
/**
* kafka's connection server url
*/
private String servers;
/**
* metrics data topic
*/
private String metricsDataTopic;
/**
* alerts data topic
*/
private String alertsDataTopic;
public String getServers() {
return servers;
}
public void setServers(String servers) {
this.servers = servers;
}
public String getMetricsDataTopic() {
return metricsDataTopic;
}
public void setMetricsDataTopic(String metricsDataTopic) {
this.metricsDataTopic = metricsDataTopic;
}
public String getAlertsDataTopic() {
return alertsDataTopic;
}
public void setAlertsDataTopic(String alertsDataTopic) {
this.alertsDataTopic = alertsDataTopic;
}
}
/**
* sms properties
*/
public static class SmsProperties {
//Tencent cloud SMS configuration
private TencentSmsProperties tencent;
//Ali cloud SMS configuration
private AliYunSmsProperties aliYun;
public TencentSmsProperties getTencent() {
return tencent;
}
public void setTencent(TencentSmsProperties tencent) {
this.tencent = tencent;
}
public AliYunSmsProperties getAliYun() {
return aliYun;
}
public void setAliYun(AliYunSmsProperties aliYun) {
this.aliYun = aliYun;
}
}
/**
* tencent sms properties
*/
public static class TencentSmsProperties {
/**
* Tencent cloud account secret id
*/
private String secretId;
/**
* Tencent cloud account secret key
*/
private String secretKey;
/**
* SMS app id
*/
private String appId;
/**
* SMS signature
*/
private String signName;
/**
* SMS template ID
*/
private String templateId;
public String getSecretId() {
return secretId;
}
public void setSecretId(String secretId) {
this.secretId = secretId;
}
public String getSecretKey() {
return secretKey;
}
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getSignName() {
return signName;
}
public void setSignName(String signName) {
this.signName = signName;
}
public String getTemplateId() {
return templateId;
}
public void setTemplateId(String templateId) {
this.templateId = templateId;
}
}
/**
* aliYun sms properties
*/
public static class AliYunSmsProperties {
/**
* Aliyun account access key id
*/
private String secretId;
/**
* Ali Cloud account access key
*/
private String secretKey;
/**
* SMS app id
*/
private String appId;
/**
* SMS signature
*/
private String signName;
/**
* ID of the SMS template
*/
private String templateId;
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
public String getSecretId() {
return secretId;
}
public void setSecretId(String secretId) {
this.secretId = secretId;
}
public String getSecretKey() {
return secretKey;
}
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}
public String getSignName() {
return signName;
}
public void setSignName(String signName) {
this.signName = signName;
}
public String getTemplateId() {
return templateId;
}
public void setTemplateId(String templateId) {
this.templateId = templateId;
}
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,255 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.hertzbeat.common.util.prometheus;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* prometheus metric sparser
*/
public final class PrometheusUtil {
//An unknown format occurred during parsing because parsing cannot continue
// or the end of the input stream has been reached
private static final int ERROR_FORMAT = -1;
//The input stream ends normally
private static final int NORMAL_END = -2;
private static final int COMMENT_LINE = -3;
private PrometheusUtil() {
}
private static int parseMetricName(InputStream inputStream, Metric.MetricBuilder metricBuilder) throws IOException {
StringBuilder stringBuilder = new StringBuilder();
int i;
i = inputStream.read();
if (i == -1) {
return NORMAL_END;
}
else if (i == '#') {
return COMMENT_LINE;
}
while (i != -1) {
if (i == ' ' || i == '{') {
metricBuilder.metricName(stringBuilder.toString());
return i;
}
stringBuilder.append((char) i);
i = inputStream.read();
}
return ERROR_FORMAT;
}
private static int parseLabel(InputStream inputStream, List<Label> labelList) throws IOException {
Label.LabelBuilder labelBuilder = new Label.LabelBuilder();
int i;
StringBuilder labelName = new StringBuilder();
i = inputStream.read();
while (i != -1 && i != '=') {
labelName.append((char) i);
i = inputStream.read();
}
if (i == -1) {
return ERROR_FORMAT;
}
labelBuilder.name(labelName.toString());
if (inputStream.read() != '\"') {
return ERROR_FORMAT;
}
StringBuilder labelValue = new StringBuilder();
i = inputStream.read();
while (i != -1 && i != ',' && i != '}') {
labelValue.append((char) i);
i = inputStream.read();
}
if (i == -1 || labelValue.charAt(labelValue.length() - 1) != '\"') {
return ERROR_FORMAT;
}
// skip space only in this condition
if (i == '}' && inputStream.read() != ' ') {
return ERROR_FORMAT;
}
labelValue.deleteCharAt(labelValue.length() - 1);
labelBuilder.value(labelValue.toString());
labelList.add(labelBuilder.build());
return i;
}
private static int parseLabelList(InputStream inputStream, Metric.MetricBuilder metricBuilder) throws IOException {
List<Label> labelList = new ArrayList<>();
int i;
i = parseLabel(inputStream, labelList);
while (i == ',') {
i = parseLabel(inputStream, labelList);
}
if (i == -1) {
return ERROR_FORMAT;
}
metricBuilder.labelList(labelList);
return i;
}
private static int parseValue(InputStream inputStream, Metric.MetricBuilder metricBuilder) throws IOException {
int i;
StringBuilder stringBuilder = new StringBuilder();
i = inputStream.read();
while (i != -1 && i != ' ' && i != '\n') {
stringBuilder.append((char) i);
i = inputStream.read();
}
String string = stringBuilder.toString();
switch (string) {
case "NaN":
metricBuilder.value(Double.NaN);
break;
case "+Inf":
metricBuilder.value(Double.POSITIVE_INFINITY);
break;
case "-Inf":
metricBuilder.value(Double.NEGATIVE_INFINITY);
break;
default:
try {
BigDecimal bigDecimal = new BigDecimal(string);
metricBuilder.value(bigDecimal.doubleValue());
} catch (NumberFormatException e) {
return ERROR_FORMAT;
}
break;
}
if (i == -1) {
return NORMAL_END;
}
else {
return i; // ' ' or \n'
}
}
private static int parseTimestamp(InputStream inputStream, Metric.MetricBuilder metricBuilder) throws IOException {
int i;
StringBuilder stringBuilder = new StringBuilder();
i = inputStream.read();
while (i != -1 && i != '\n') {
stringBuilder.append((char) i);
i = inputStream.read();
}
String string = stringBuilder.toString();
try {
metricBuilder.timestamp(Long.parseLong(string));
} catch (NumberFormatException e) {
return ERROR_FORMAT;
}
if (i == -1) {
return NORMAL_END;
}
else {
return i; // '\n'
}
}
// return value:
// -1: error format
// -2: normal end
// '\n': more lines
private static int parseMetric(InputStream inputStream, List<Metric> metrics) throws IOException {
Metric.MetricBuilder metricBuilder = new Metric.MetricBuilder();
int i = parseMetricName(inputStream, metricBuilder); // RET: -1, -2, -3, '{', ' '
if (i == ERROR_FORMAT || i == NORMAL_END || i == COMMENT_LINE) {
return i;
}
if (i == '{') {
i = parseLabelList(inputStream, metricBuilder); // RET: -1, '}'
if (i == ERROR_FORMAT) {
return i;
}
}
i = parseValue(inputStream, metricBuilder); // RET: -1, -2, '\n', ' '
if (i != ' ') {
metrics.add(metricBuilder.build());
return i;
}
i = parseTimestamp(inputStream, metricBuilder); // RET: -1, -2, '\n'
metrics.add(metricBuilder.build());
return i;
}
private static int skipCommentLine(InputStream inputStream) throws IOException {
int i = inputStream.read();
while (i != -1 && i != '\n') {
i = inputStream.read();
}
if (i == -1) {
return NORMAL_END;
}
return i;
}
public static List<Metric> parseMetrics(InputStream inputStream) throws IOException {
List<Metric> metricList = new ArrayList<>();
int i = parseMetric(inputStream, metricList);
while (i == '\n' || i == COMMENT_LINE) {
if (i == COMMENT_LINE) {
if (skipCommentLine(inputStream) == NORMAL_END) {
return metricList;
}
}
i = parseMetric(inputStream, metricList);
}
if (i == NORMAL_END) {
return metricList;
}
else {
return null;
}
}
}
-77
View File
@@ -1,77 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto3";
package org.apache.hertzbeat.common.entity.message;
message MetricsData
{
// monitoring id
uint64 id = 1;
// tenant id
uint64 tenantId = 2;
// monitoring app eg: linux | mysql | jvm
string app = 3;
// monitoring metrics eg: cpu | memory | health
string metrics = 4;
// monitoring collect priority >=0
uint32 priority = 5;
// collect timestamp
uint64 time = 6;
// collect response code
Code code = 7;
// collect response error message
string msg = 8;
// monitoring collect metric field
repeated Field fields = 9;
// monitoring collect metric data, mapping with the fields
repeated ValueRow values = 10;
}
message Field
{
// monitoring collect metric field name
string name = 1;
// monitoring collect metrics field type, 0-number 1-string
uint32 type = 2;
// monitoring collect metrics field unit, % MB GB TB S...
string unit = 3;
// is label field
bool label = 4;
}
message ValueRow
{
// monitoring collect metrics value, mapping with the fields
repeated string columns = 1;
}
enum Code
{
// collect success
SUCCESS = 0;
// collector not available
UN_AVAILABLE = 1;
// peer network un reachable(icmp)
UN_REACHABLE = 2;
// peer network server un connectable(tcp,udp...)
UN_CONNECTABLE = 3;
// collect metrics data failed(http,ssh,snmp...)
FAIL = 4;
// collect metrics data timeout
TIMEOUT = 5;
}
@@ -1,57 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.common.util;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
/**
* Test case for {@link CommonUtil}
*/
class CommonUtilTest {
@Test
void testParseDoubleStr() {
assertEquals("9.3454", CommonUtil.parseDoubleStr("9.345435345", null));
assertEquals("9.3454", CommonUtil.parseDoubleStr("9.345435345%", "%"));
assertEquals("10", CommonUtil.parseDoubleStr("10%", "%"));
assertEquals("588", CommonUtil.parseDoubleStr("588Mb", "Mb"));
}
@Test
void validateEmail() {
assertTrue(CommonUtil.validateEmail("tom@usthe.com"));
assertTrue(CommonUtil.validateEmail("demo@qq.com"));
assertFalse(CommonUtil.validateEmail("tom.usthe.com"));
}
@Test
void validatePhoneNum() {
assertTrue(CommonUtil.validatePhoneNum("19234554432"));
assertTrue(CommonUtil.validatePhoneNum("13234554432"));
assertTrue(CommonUtil.validatePhoneNum("14234554432"));
assertTrue(CommonUtil.validatePhoneNum("16234554432"));
assertFalse(CommonUtil.validatePhoneNum("12234554432"));
assertFalse(CommonUtil.validatePhoneNum("11234554432"));
assertFalse(CommonUtil.validatePhoneNum("35234554432"));
assertFalse(CommonUtil.validatePhoneNum("46234554432"));
}
}
@@ -1,59 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.common.util;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
/**
* Test case for {@link IpDomainUtil}
*/
class IpDomainUtilTest {
@Test
void validateIpDomain() {
assertTrue(IpDomainUtil.validateIpDomain("127.7.5.3"));
assertTrue(IpDomainUtil.validateIpDomain("255.255.4.3"));
assertTrue(IpDomainUtil.validateIpDomain("255.255.255.255"));
assertTrue(IpDomainUtil.validateIpDomain("tancloud.cn"));
assertTrue(IpDomainUtil.validateIpDomain("tancloud.com.cn"));
assertTrue(IpDomainUtil.validateIpDomain("student.dev.com.cn"));
assertTrue(IpDomainUtil.validateIpDomain("www.student.dev.com.cn"));
assertTrue(IpDomainUtil.validateIpDomain("www.baidu.com"));
assertTrue(IpDomainUtil.validateIpDomain("good.didi"));
assertTrue(IpDomainUtil.validateIpDomain("spider_rds.sogou"));
assertTrue(IpDomainUtil.validateIpDomain("_redis.hn.sogou"));
assertTrue(IpDomainUtil.validateIpDomain("host"));
assertTrue(IpDomainUtil.validateIpDomain("host-1"));
assertFalse(IpDomainUtil.validateIpDomain("www.baidu.com."));
assertFalse(IpDomainUtil.validateIpDomain("good."));
assertFalse(IpDomainUtil.validateIpDomain(".good."));
assertFalse(IpDomainUtil.validateIpDomain("www.baidu..com"));
assertFalse(IpDomainUtil.validateIpDomain("www.baidu*com"));
assertFalse(IpDomainUtil.validateIpDomain("host$-1"));
}
@Test
void isHasSchema() {
assertTrue(IpDomainUtil.isHasSchema("http://www.baidu.com"));
assertTrue(IpDomainUtil.isHasSchema("https://www.baidu.com"));
assertFalse(IpDomainUtil.isHasSchema("www.baidu.com"));
assertFalse(IpDomainUtil.isHasSchema("https_www.baidu.com"));
}
}
-23
View File
@@ -1,23 +0,0 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
FROM ghcr.io/linuxsuren/api-testing:v0.0.16
WORKDIR /workspace
COPY . .
CMD [ "/workspace/entrypoint.sh" ]
-19
View File
@@ -1,19 +0,0 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
demo:
docker compose up hertzbeat
+2 -2
View File
@@ -1,7 +1,7 @@
Please add the corresponding e2e (aka end-to-end) test cases if you add or update APIs.
## How to work
* Start and watch the [docker-compose](https://docs.docker.com/compose/) via [the script](start.sh)
* Start and watch the [docker-compose](https://docs.docker.com/compose/) via [the script](script/start.sh)
* Run the e2e testing via [api-testing](https://github.com/LinuxSuRen/api-testing)
* It will run the test cases from top to bottom
* You can add the necessary asserts to it
@@ -11,4 +11,4 @@ Please follow these steps if you want to run the e2e testing locally.
> Please make sure you have installed docker-compose v2
* Change the directory to `e2e`, then execute `./start.sh`
* Change the directory to `e2e`, then execute `./script/start.sh`
+4 -4
View File
@@ -12,22 +12,22 @@
{
"field": "host",
"type": 1,
"value": "127.0.0.1"
"paramValue": "127.0.0.1"
},
{
"field": "port",
"type": 0,
"value": 21
"paramValue": 21
},
{
"field": "direction",
"type": 1,
"value": "127.0.0.1"
"paramValue": "127.0.0.1"
},
{
"field": "timeout",
"type": 0,
"value": 1000
"paramValue": 1000
},
{
"field": "username",
+75 -77
View File
@@ -1,80 +1,78 @@
{
"detected": false,
"collector": "",
"monitor": {
"intervals": 60,
"tags": [],
"app": "api",
"host": "127.0.0.1",
"detected": false,
"collector": "",
"monitor": {
"intervals": 60,
"tags": [],
"app": "api",
"host": "127.0.0.1",
"name": "{{.param.monitorHTTP}}"
},
"params": [
{
"field": "host",
"type": 1,
"paramValue": "127.0.0.1"
},
"params": [
{
"field": "host",
"type": 1,
"value": "127.0.0.1"
},
{
"field": "port",
"type": 0,
"value": 80
},
{
"field": "method",
"type": 1,
"value": "GET"
},
{
"field": "uri",
"type": 1,
"value": ""
},
{
"field": "ssl",
"type": 1,
"value": false
},
{
"field": "headers",
"type": 3
},
{
"field": "params",
"type": 3
},
{
"field": "timeout",
"type": 0
},
{
"field": "contentType",
"type": 1
},
{
"field": "payload",
"type": 1
},
{
"field": "authType",
"type": 1
},
{
"field": "username",
"type": 1
},
{
"field": "password",
"type": 1
},
{
"field": "keyword",
"type": 1
},
{
"field": "successCode",
"type": 4,
"value": "200, 201"
}
]
}
{
"field": "port",
"type": 0,
"paramValue": 80
},
{
"field": "httpMethod",
"type": 1,
"paramValue": "GET"
},
{
"field": "uri",
"type": 1
},
{
"field": "ssl",
"type": 1,
"paramValue": false
},
{
"field": "headers",
"type": 3
},
{
"field": "params",
"type": 3
},
{
"field": "timeout",
"type": 0
},
{
"field": "contentType",
"type": 1
},
{
"field": "payload",
"type": 1
},
{
"field": "authType",
"type": 1
},
{
"field": "username",
"type": 1
},
{
"field": "password",
"type": 1
},
{
"field": "keyword",
"type": 1
},
{
"field": "successCode",
"type": 4,
"paramValue": "200, 201"
}
]
}
+2 -2
View File
@@ -12,12 +12,12 @@
{
"field": "host",
"type": 1,
"value": "127.0.0.1"
"paramValue": "127.0.0.1"
},
{
"field": "timeout",
"type": 0,
"value": 6000
"paramValue": 6000
}
]
}
+3 -3
View File
@@ -12,17 +12,17 @@
{
"field": "host",
"type": 1,
"value": "127.0.0.1"
"paramValue": "127.0.0.1"
},
{
"field": "port",
"type": 0,
"value": 80
"paramValue": 80
},
{
"field": "timeout",
"type": 0,
"value": 6000
"paramValue": 6000
}
]
}
+4 -4
View File
@@ -12,22 +12,22 @@
{
"field": "host",
"type": 1,
"value": "127.0.0.1"
"paramValue": "127.0.0.1"
},
{
"field": "port",
"type": 0,
"value": 80
"paramValue": 80
},
{
"field": "sitemap",
"type": 1,
"value": "sitemap.xml"
"paramValue": "sitemap.xml"
},
{
"field": "ssl",
"type": 1,
"value": false
"paramValue": false
}
]
}
+2 -2
View File
@@ -12,12 +12,12 @@
{
"field": "host",
"type": 1,
"value": "127.0.0.1"
"paramValue": "127.0.0.1"
},
{
"field": "port",
"type": 0,
"value": 443
"paramValue": 443
},
{
"field": "uri",
+3 -3
View File
@@ -12,17 +12,17 @@
{
"field": "host",
"type": 1,
"value": "127.0.0.1"
"paramValue": "127.0.0.1"
},
{
"field": "port",
"type": 0,
"value": 81
"paramValue": 81
},
{
"field": "timeout",
"type": 0,
"value": 6000
"paramValue": 6000
},
{
"field": "content",
+4 -4
View File
@@ -12,21 +12,21 @@
{
"field": "host",
"type": 1,
"value": "127.0.0.1"
"paramValue": "127.0.0.1"
},
{
"field": "port",
"type": 0,
"value": 80
"paramValue": 80
},
{
"field": "uri",
"type": 1
"paramValue": 1
},
{
"field": "ssl",
"type": 1,
"value": false
"paramValue": false
},
{
"field": "timeout",
+26 -11
View File
@@ -18,24 +18,39 @@
version: '3.8'
services:
testing:
build:
context: .
image: ghcr.io/linuxsuren/api-testing:v0.0.17
environment:
SERVER: http://hertzbeat:1157
container_name: e2e-testing
volumes:
- ./data/:/work/data/
- ./testsuite.yaml:/work/testsuite.yaml
- ./report/report.md:/report.md
command: atest run -p /work/testsuite.yaml --level debug --thread 3 --report md --report-file /report.md
depends_on:
hertzbeat:
checker:
condition: service_healthy
links:
- hertzbeat
hertzbeat:
image: apache/hertzbeat
ports:
- 1157:1157
environment:
ALLOW_NONE_AUTHENTICATION: "yes"
- checker
checker:
image: alpine:latest
container_name: e2e-checker
command: sh -c "apk add --update curl && tail -f /dev/null"
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/1157"]
test: [ "CMD-SHELL",
"curl -s -X POST -H \"Content-Type: application/json\" -d '{\"type\": 0,\"identifier\": \"admin\",\"credential\": \"hertzbeat\"}' http://hertzbeat:1157/api/account/auth/form | grep -q token"
]
interval: 3s
timeout: 60s
retries: 10
start_period: 3s
start_period: 10s
hertzbeat:
image: apache/hertzbeat:test
container_name: e2e-hertzbeat
volumes:
- ./logs/:/opt/hertzbeat/logs/
ports:
- "1157:1157"
environment:
ALLOW_NONE_AUTHENTICATION: "yes"
+1
View File
@@ -0,0 +1 @@
keep, not delete!
-49
View File
@@ -1,49 +0,0 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# Derived from Api Testing https://github.com/LinuxSuRen/api-testing/blob/master/e2e/start.sh
file=$1
if [ "$file" == "" ]
then
file=compose.yaml
fi
docker-compose version
docker-compose -f "$file" up --build -d
while true
do
docker-compose -f "$file" ps | grep testing
if [ $? -eq 1 ]
then
code=-1
docker-compose -f "$file" logs | grep e2e-testing
docker-compose -f "$file" logs | grep e2e-testing | grep Usage
if [ $? -eq 1 ]
then
code=0
echo "successed"
fi
docker-compose -f "$file" down
set -e
exit $code
fi
sleep 1
done
+162 -32
View File
@@ -58,11 +58,6 @@ items:
}
expect:
statusCode: 409
- name: missing-auth-header
request:
api: /api/monitors
expect:
statusCode: 401
- name: monitorList
request:
api: /api/monitors?pageIndex=0&pageSize=8
@@ -70,15 +65,12 @@ items:
Authorization: Bearer {{.login.data.token}}
expect:
bodyFieldsExpect:
code: 0
- name: createHTTPMonitor
code: "0"
- name: missing-auth-header
request:
api: /api/monitor
method: POST
header:
Authorization: Bearer {{.login.data.token}}
Content-type: application/json
bodyFromFile: data/monitor-http.json
api: /api/monitors
expect:
statusCode: 401
- name: createSitemapMonitor
request:
api: /api/monitor
@@ -87,6 +79,26 @@ items:
Authorization: Bearer {{.login.data.token}}
Content-type: application/json
bodyFromFile: data/monitor-sitemap.json
- name: listSitemapMonitor
request:
api: /api/monitors?pageIndex=0&pageSize=8&app=fullsite
header:
Authorization: Bearer {{.login.data.token}}
- name: cancelSitemapMonitor
request:
api: /api/monitors/manage?ids={{(index .listSitemapMonitor.data.content 0).id | int64}}
query:
type: JSON
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: deleteSitemapMonitor
request:
api: /api/monitors?ids={{(index .listSitemapMonitor.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: createPortMonitor
request:
api: /api/monitor
@@ -95,6 +107,26 @@ items:
Authorization: Bearer {{.login.data.token}}
Content-type: application/json
bodyFromFile: data/monitor-port.json
- name: listPortMonitor
request:
api: /api/monitors?pageIndex=0&pageSize=8&app=port
header:
Authorization: Bearer {{.login.data.token}}
- name: cancelPortMonitor
request:
api: /api/monitors/manage?ids={{(index .listPortMonitor.data.content 0).id | int64}}
query:
type: JSON
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: deletePortMonitor
request:
api: /api/monitors?ids={{(index .listPortMonitor.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: createSSLMonitor
request:
api: /api/monitor
@@ -103,6 +135,26 @@ items:
Authorization: Bearer {{.login.data.token}}
Content-type: application/json
bodyFromFile: data/monitor-ssl.json
- name: listSSLMonitor
request:
api: /api/monitors?pageIndex=0&pageSize=8&app=ssl_cert
header:
Authorization: Bearer {{.login.data.token}}
- name: cancelSSLMonitor
request:
api: /api/monitors/manage?ids={{(index .listSSLMonitor.data.content 0).id | int64}}
query:
type: JSON
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: deleteSSLMonitor
request:
api: /api/monitors?ids={{(index .listSSLMonitor.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: createPingMonitor
request:
api: /api/monitor
@@ -111,6 +163,26 @@ items:
Authorization: Bearer {{.login.data.token}}
Content-type: application/json
bodyFromFile: data/monitor-ping.json
- name: listPingMonitor
request:
api: /api/monitors?pageIndex=0&pageSize=8&app=ping
header:
Authorization: Bearer {{.login.data.token}}
- name: cancelPingMonitor
request:
api: /api/monitors/manage?ids={{(index .listPingMonitor.data.content 0).id | int64}}
query:
type: JSON
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: deletePingMonitor
request:
api: /api/monitors?ids={{(index .listPingMonitor.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: createUDPMonitor
request:
api: /api/monitor
@@ -119,6 +191,26 @@ items:
Authorization: Bearer {{.login.data.token}}
Content-type: application/json
bodyFromFile: data/monitor-udp.json
- name: listUDPMonitor
request:
api: /api/monitors?pageIndex=0&pageSize=8&app=udp_port
header:
Authorization: Bearer {{.login.data.token}}
- name: cancelUDPMonitor
request:
api: /api/monitors/manage?ids={{(index .listUDPMonitor.data.content 0).id | int64}}
query:
type: JSON
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: deleteUDPMonitor
request:
api: /api/monitors?ids={{(index .listUDPMonitor.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: createWebsiteMonitor
request:
api: /api/monitor
@@ -127,6 +219,26 @@ items:
Authorization: Bearer {{.login.data.token}}
Content-type: application/json
bodyFromFile: data/monitor-website.json
- name: listWebsiteMonitor
request:
api: /api/monitors?pageIndex=0&pageSize=8&app=website
header:
Authorization: Bearer {{.login.data.token}}
- name: cancelWebsiteMonitor
request:
api: /api/monitors/manage?ids={{(index .listWebsiteMonitor.data.content 0).id | int64}}
query:
type: JSON
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: deleteWebsiteMonitor
request:
api: /api/monitors?ids={{(index .listWebsiteMonitor.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: createFTPMonitor
request:
api: /api/monitor
@@ -135,32 +247,54 @@ items:
Authorization: Bearer {{.login.data.token}}
Content-type: application/json
bodyFromFile: data/monitor-ftp.json
- name: listFTPMonitor
request:
api: /api/monitors?pageIndex=0&pageSize=8&app=ftp
header:
Authorization: Bearer {{.login.data.token}}
- name: cancelFTPMonitor
request:
api: /api/monitors/manage?ids={{(index .listFTPMonitor.data.content 0).id | int64}}
query:
type: JSON
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: deleteFTPMonitor
request:
api: /api/monitors?ids={{(index .listFTPMonitor.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: createHTTPMonitor
request:
api: /api/monitor
method: POST
header:
Authorization: Bearer {{.login.data.token}}
Content-type: application/json
bodyFromFile: data/monitor-http.json
- name: listHTTPMonitor
request:
api: /api/monitors
query:
pageIndex: 0
pageSize: 8
app: api
api: /api/monitors?pageIndex=0&pageSize=8&app=api
header:
Authorization: Bearer {{.login.data.token}}
- name: cancelHTTPMonitor
request:
api: /api/monitors/manage
api: /api/monitors/manage?ids={{(index .listHTTPMonitor.data.content 0).id | int64}}
query:
ids: "{{(index .listHTTPMonitor.data.content 0).id}}"
type: JSON
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: deleteHTTPMonitor
request:
api: /api/monitors
query:
ids: "{{(index .listHTTPMonitor.data.content 0).id}}"
api: /api/monitors?ids={{(index .listHTTPMonitor.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: listAlertDefines
request:
api: /api/alert/defines
@@ -168,9 +302,7 @@ items:
Authorization: Bearer {{.login.data.token}}
- name: deleteAlertDefine
request:
api: /api/alert/defines
query:
ids: "{{(index .listAlertDefine.data.content 0).id}}"
api: /api/alert/defines?ids={{(index .listAlertDefines.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
@@ -227,7 +359,7 @@ items:
]
- name: listTags
request:
api: /api/tag
api: /api/tag?pageIndex=0&pageSize=8&type=1
header:
Authorization: Bearer {{.login.data.token}}
- name: updateTag
@@ -239,9 +371,9 @@ items:
Content-type: application/json
body: |
{
"id": {{(index .listTags.data.content 0).id}},
"id": {{(index .listTags.data.content 0).id | int64}},
"name": "{{randAlpha 3}}",
"value": "{{randAlpha 3}}",
"tagValue": "{{randAlpha 3}}",
"color": "#ff4081",
"type": 1,
"creator": "admin",
@@ -252,9 +384,7 @@ items:
code: "0"
- name: deleteTag
request:
api: /api/tag
query:
ids: "{{(index .listTags.data.content 0).id}}"
api: /api/tag?ids={{(index .listTags.data.content 0).id | int64}}
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
@@ -28,9 +28,6 @@
<artifactId>hertzbeat-alerter</artifactId>
<name>${project.artifactId}</name>
<properties>
</properties>
<dependencies>
<!-- common -->
<dependency>
@@ -73,14 +70,16 @@
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>4.3.0</version>
<version>${easy-poi.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.1</version>
<scope>compile</scope>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-vector</artifactId>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-netty</artifactId>
</dependency>
</dependencies>
@@ -19,22 +19,26 @@ package org.apache.hertzbeat.alert;
import lombok.Getter;
import lombok.Setter;
import org.apache.hertzbeat.common.config.BaseKafkaProperties;
import org.apache.hertzbeat.common.constants.ConfigConstants;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* alerter prop config
*/
@Component
@ConfigurationProperties(prefix = "alerter")
@Getter
@Setter
@Component
@ConfigurationProperties(prefix =
ConfigConstants.FunctionModuleConstants.ALERTER)
public class AlerterProperties {
/**
* Alarm content console link
*/
private String consoleUrl = "https://console.tancloud.cn";
private String consoleUrl = "https://console.tancloud.io";
/**
* WeWork webhook url
@@ -92,25 +96,13 @@ public class AlerterProperties {
*/
@Getter
@Setter
public static class KafkaProperties {
public static class KafkaProperties extends BaseKafkaProperties {
/**
* Whether the kafka data entry is started
*/
private boolean enabled = true;
/**
* kafka's connection server url
*/
private String servers = "127.0.0.1:9092";
/**
* The name of the topic that receives the data
*/
private String topic;
/**
* Consumer Group ID
*/
private String groupId;
}
}
}
@@ -0,0 +1,99 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.alert;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* alarm module thread pool
*/
@Component
@Slf4j
public class AlerterWorkerPool {
private ThreadPoolExecutor workerExecutor;
private ThreadPoolExecutor notifyExecutor;
public AlerterWorkerPool() {
initWorkExecutor();
initNotifyExecutor();
}
private void initWorkExecutor() {
ThreadFactory threadFactory = new ThreadFactoryBuilder()
.setUncaughtExceptionHandler((thread, throwable) -> {
log.error("workerExecutor has uncaughtException.");
log.error(throwable.getMessage(), throwable);
})
.setDaemon(true)
.setNameFormat("alerter-worker-%d")
.build();
workerExecutor = new ThreadPoolExecutor(10,
10,
10,
TimeUnit.SECONDS,
new LinkedBlockingQueue<>(),
threadFactory,
new ThreadPoolExecutor.AbortPolicy());
}
private void initNotifyExecutor() {
ThreadFactory threadFactory = new ThreadFactoryBuilder()
.setUncaughtExceptionHandler((thread, throwable) -> {
log.error("notifyExecutor has uncaughtException.");
log.error(throwable.getMessage(), throwable);
})
.setDaemon(true)
.setNameFormat("notify-worker-%d")
.build();
notifyExecutor = new ThreadPoolExecutor(6,
6,
10,
TimeUnit.SECONDS,
new LinkedBlockingQueue<>(),
threadFactory,
new ThreadPoolExecutor.AbortPolicy());
}
/**
* Run the alerter task
* @param runnable task
* @throws RejectedExecutionException when The thread pool is full of
*/
public void executeJob(Runnable runnable) throws RejectedExecutionException {
workerExecutor.execute(runnable);
}
/**
* Executes the given runnable task using the notifyExecutor.
*
* @param runnable the task to be executed
* @throws RejectedExecutionException if the task cannot be accepted for execution
*/
public void executeNotify(Runnable runnable) throws RejectedExecutionException {
notifyExecutor.execute(runnable);
}
}
@@ -26,7 +26,10 @@ import static org.apache.hertzbeat.common.constants.CommonConstants.TAG_METRICS;
import static org.apache.hertzbeat.common.constants.CommonConstants.TAG_MONITOR_APP;
import static org.apache.hertzbeat.common.constants.CommonConstants.TAG_MONITOR_ID;
import static org.apache.hertzbeat.common.constants.CommonConstants.TAG_MONITOR_NAME;
import com.google.common.collect.Maps;
import jakarta.persistence.criteria.Predicate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -45,8 +48,10 @@ import org.apache.hertzbeat.alert.service.AlertDefineService;
import org.apache.hertzbeat.alert.service.AlertService;
import org.apache.hertzbeat.alert.util.AlertTemplateUtil;
import org.apache.hertzbeat.common.constants.CommonConstants;
import org.apache.hertzbeat.common.constants.MetricDataConstants;
import org.apache.hertzbeat.common.entity.alerter.Alert;
import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
import org.apache.hertzbeat.common.entity.arrow.RowWrapper;
import org.apache.hertzbeat.common.entity.manager.Monitor;
import org.apache.hertzbeat.common.entity.manager.TagItem;
import org.apache.hertzbeat.common.entity.message.CollectRep;
@@ -61,7 +66,6 @@ import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
/**
* Calculate alarms based on the alarm definition rules and collected data
*/
@@ -70,6 +74,8 @@ import org.springframework.util.CollectionUtils;
public class CalculateAlarm {
private static final String SYSTEM_VALUE_ROW_COUNT = "system_value_row_count";
private static final int CALCULATE_THREADS = 3;
/**
* The alarm in the process is triggered
@@ -123,16 +129,17 @@ public class CalculateAlarm {
if (metricsData != null) {
calculate(metricsData);
}
dataQueue.sendMetricsDataToStorage(metricsData);
} catch (InterruptedException ignored) {
Thread.currentThread().interrupt();
} catch (Exception e) {
log.error("calculate alarm error: {}.", e.getMessage(), e);
}
}
};
workerPool.executeJob(runnable);
workerPool.executeJob(runnable);
workerPool.executeJob(runnable);
for (int i = 0; i < CALCULATE_THREADS; i++) {
workerPool.executeJob(runnable);
}
}
private void calculate(CollectRep.MetricsData metricsData) {
@@ -154,94 +161,97 @@ public class CalculateAlarm {
if (defineMap.isEmpty()) {
return;
}
List<CollectRep.Field> fields = metricsData.getFieldsList();
Map<String, Object> fieldValueMap = new HashMap<>(8);
int valueRowCount = metricsData.getValuesCount();
for (Map.Entry<String, List<AlertDefine>> entry : defineMap.entrySet()) {
List<AlertDefine> defines = entry.getValue();
for (AlertDefine define : defines) {
final String expr = define.getExpr();
if (StringUtils.isBlank(expr)) {
continue;
}
if (expr.contains(SYSTEM_VALUE_ROW_COUNT) && metricsData.getValuesCount() == 0) {
fieldValueMap.put(SYSTEM_VALUE_ROW_COUNT, valueRowCount);
try {
boolean match = execAlertExpression(fieldValueMap, expr);
try {
if (match) {
// If the threshold rule matches, the number of times the threshold has been triggered is determined and an alarm is triggered
afterThresholdRuleMatch(currentTimeMilli, monitorId, app, metrics, "", fieldValueMap, define);
// if the threshold is triggered, ignore other data rows
continue;
} else {
String alarmKey = String.valueOf(monitorId) + define.getId();
triggeredAlertMap.remove(alarmKey);
if (define.isRecoverNotice()) {
handleRecoveredAlert(currentTimeMilli, define, expr, alarmKey);
}
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
} catch (Exception ignored) {}
}
for (CollectRep.ValueRow valueRow : metricsData.getValuesList()) {
Map<String, Object> fieldValueMap = Maps.newHashMapWithExpectedSize(8);
if (CollectionUtils.isEmpty(valueRow.getColumnsList())) {
try {
for (Map.Entry<String, List<AlertDefine>> entry : defineMap.entrySet()) {
List<AlertDefine> defines = entry.getValue();
for (AlertDefine define : defines) {
final String expr = define.getExpr();
if (StringUtils.isBlank(expr)) {
continue;
}
fieldValueMap.clear();
fieldValueMap.put(SYSTEM_VALUE_ROW_COUNT, valueRowCount);
StringBuilder tagBuilder = new StringBuilder();
for (int index = 0; index < valueRow.getColumnsList().size(); index++) {
String valueStr = valueRow.getColumns(index);
if (CommonConstants.NULL_VALUE.equals(valueStr)) {
continue;
}
final CollectRep.Field field = fields.get(index);
final int fieldType = field.getType();
if (fieldType == CommonConstants.TYPE_NUMBER) {
final Double doubleValue;
if ((doubleValue = CommonUtil.parseStrDouble(valueStr)) != null) {
fieldValueMap.put(field.getName(), doubleValue);
}
} else if (fieldType == CommonConstants.TYPE_TIME) {
final Integer integerValue;
if ((integerValue = CommonUtil.parseStrInteger(valueStr)) != null) {
fieldValueMap.put(field.getName(), integerValue);
}
} else {
if (StringUtils.isNotEmpty(valueStr)) {
fieldValueMap.put(field.getName(), valueStr);
}
}
if (field.getLabel()) {
tagBuilder.append("-").append(valueStr);
}
}
try {
boolean match = execAlertExpression(fieldValueMap, expr);
if (expr.contains(SYSTEM_VALUE_ROW_COUNT) && metricsData.getValues().size() == 0L) {
fieldValueMap.put(SYSTEM_VALUE_ROW_COUNT, 0);
try {
if (match) {
// If the threshold rule matches, the number of times the threshold has been triggered is determined and an alarm is triggered
afterThresholdRuleMatch(currentTimeMilli, monitorId, app, metrics, tagBuilder.toString(), fieldValueMap, define);
boolean match = execAlertExpression(fieldValueMap, expr);
try {
if (match) {
// If the threshold rule matches, the number of times the threshold has been triggered is determined and an alarm is triggered
afterThresholdRuleMatch(currentTimeMilli, monitorId, app, metrics, "", fieldValueMap, define);
// if the threshold is triggered, ignore other data rows
continue;
} else {
String alarmKey = String.valueOf(monitorId) + define.getId();
triggeredAlertMap.remove(alarmKey);
if (define.isRecoverNotice()) {
handleRecoveredAlert(currentTimeMilli, define, expr, alarmKey);
}
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
} catch (Exception ignored) {}
}
RowWrapper rowWrapper = metricsData.readRow();
while (rowWrapper.hasNextRow()) {
rowWrapper = rowWrapper.nextRow();
StringBuilder tagBuilder = new StringBuilder();
fieldValueMap.clear();
fieldValueMap.put(SYSTEM_VALUE_ROW_COUNT, metricsData.getValues().size());
rowWrapper.cellStream().forEach(cell -> {
String valueStr = cell.getValue();
if (CommonConstants.NULL_VALUE.equals(valueStr)) {
return;
}
final String fieldName = cell.getField().getName();
final int fieldType = cell.getMetadataAsInteger(MetricDataConstants.TYPE);
if (fieldType == CommonConstants.TYPE_NUMBER) {
final Double doubleValue;
if ((doubleValue = CommonUtil.parseStrDouble(valueStr)) != null) {
fieldValueMap.put(fieldName, doubleValue);
}
} else if (fieldType == CommonConstants.TYPE_TIME) {
final Integer integerValue;
if ((integerValue = CommonUtil.parseStrInteger(valueStr)) != null) {
fieldValueMap.put(fieldName, integerValue);
}
} else {
String alarmKey = String.valueOf(monitorId) + define.getId() + tagBuilder;
triggeredAlertMap.remove(alarmKey);
if (define.isRecoverNotice()) {
handleRecoveredAlert(currentTimeMilli, define, expr, alarmKey);
if (StringUtils.isNotEmpty(valueStr)) {
fieldValueMap.put(fieldName, valueStr);
}
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
} catch (Exception ignored) {}
if (cell.getMetadataAsBoolean(MetricDataConstants.LABEL)) {
tagBuilder.append("-").append(valueStr);
}
});
try {
boolean match = execAlertExpression(fieldValueMap, expr);
try {
if (match) {
// If the threshold rule matches, the number of times the threshold has been triggered is determined and an alarm is triggered
afterThresholdRuleMatch(currentTimeMilli, monitorId, app, metrics, tagBuilder.toString(), fieldValueMap, define);
} else {
String alarmKey = String.valueOf(monitorId) + define.getId() + tagBuilder;
triggeredAlertMap.remove(alarmKey);
if (define.isRecoverNotice()) {
handleRecoveredAlert(currentTimeMilli, define, expr, alarmKey);
}
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
} catch (Exception ignored) {}
}
}
}
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
@@ -0,0 +1,34 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.alert.config;
import org.apache.hertzbeat.common.constants.ConfigConstants;
import org.apache.hertzbeat.common.constants.SignConstants;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
/**
* Alert auto configuration.
*/
@AutoConfiguration
@ComponentScan(basePackages = ConfigConstants.PkgConstant.PKG
+ SignConstants.DOT
+ ConfigConstants.FunctionModuleConstants.ALERT)
public class AlerterAutoConfiguration {
}
@@ -23,6 +23,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import java.util.Objects;
import org.apache.hertzbeat.alert.service.AlertConvergeService;
import org.apache.hertzbeat.common.entity.alerter.AlertConverge;
import org.apache.hertzbeat.common.entity.dto.Message;
@@ -69,11 +70,10 @@ public class AlertConvergeController {
public ResponseEntity<Message<AlertConverge>> getAlertConverge(
@Parameter(description = "Alarm Converge ID", example = "6565463543") @PathVariable("id") long id) {
AlertConverge alertConverge = alertConvergeService.getAlertConverge(id);
if (alertConverge == null) {
return ResponseEntity.ok(Message.fail(MONITOR_NOT_EXIST_CODE, "AlertConverge not exist."));
} else {
return ResponseEntity.ok(Message.success(alertConverge));
}
return Objects.isNull(alertConverge)
? ResponseEntity.ok(Message.fail(MONITOR_NOT_EXIST_CODE, "AlertConverge not exist."))
: ResponseEntity.ok(Message.success(alertConverge));
}
}
@@ -21,9 +21,6 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Predicate;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import org.apache.hertzbeat.alert.service.AlertConvergeService;
@@ -31,11 +28,7 @@ import org.apache.hertzbeat.common.entity.alerter.AlertConverge;
import org.apache.hertzbeat.common.entity.dto.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -63,31 +56,7 @@ public class AlertConvergesController {
@Parameter(description = "Sort mode: asc: ascending, desc: descending", example = "desc") @RequestParam(defaultValue = "desc") String order,
@Parameter(description = "List current page", example = "0") @RequestParam(defaultValue = "0") int pageIndex,
@Parameter(description = "Number of list pages", example = "8") @RequestParam(defaultValue = "8") int pageSize) {
Specification<AlertConverge> specification = (root, query, criteriaBuilder) -> {
List<Predicate> andList = new ArrayList<>();
if (ids != null && !ids.isEmpty()) {
CriteriaBuilder.In<Long> inPredicate = criteriaBuilder.in(root.get("id"));
for (long id : ids) {
inPredicate.value(id);
}
andList.add(inPredicate);
}
if (StringUtils.hasText(search)) {
Predicate predicate = criteriaBuilder.or(
criteriaBuilder.like(
criteriaBuilder.lower(root.get("name")),
"%" + search.toLowerCase() + "%"
)
);
andList.add(predicate);
}
Predicate[] predicates = new Predicate[andList.size()];
return criteriaBuilder.and(andList.toArray(predicates));
};
Sort sortExp = Sort.by(new Sort.Order(Sort.Direction.fromString(order), sort));
PageRequest pageRequest = PageRequest.of(pageIndex, pageSize, sortExp);
Page<AlertConverge> alertConvergePage = alertConvergeService.getAlertConverges(specification, pageRequest);
Page<AlertConverge> alertConvergePage = alertConvergeService.getAlertConverges(ids, search, sort, order, pageIndex, pageSize);
return ResponseEntity.ok(Message.success(alertConvergePage));
}
@@ -24,6 +24,7 @@ import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import org.apache.hertzbeat.alert.service.AlertDefineService;
import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
@@ -76,11 +77,10 @@ public class AlertDefineController {
@Parameter(description = "Alarm Definition ID", example = "6565463543") @PathVariable("id") long id) {
// Obtaining Monitoring Information
AlertDefine alertDefine = alertDefineService.getAlertDefine(id);
if (alertDefine == null) {
return ResponseEntity.ok(Message.fail(MONITOR_NOT_EXIST_CODE, "AlertDefine not exist."));
} else {
return ResponseEntity.ok(Message.success(alertDefine));
}
return Objects.isNull(alertDefine)
? ResponseEntity.ok(Message.fail(MONITOR_NOT_EXIST_CODE, "AlertDefine not exist."))
: ResponseEntity.ok(Message.success(alertDefine));
}
@DeleteMapping(path = "/{id}")
@@ -21,10 +21,7 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Predicate;
import jakarta.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import org.apache.hertzbeat.alert.service.AlertDefineService;
@@ -32,11 +29,7 @@ import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
import org.apache.hertzbeat.common.entity.dto.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -67,51 +60,7 @@ public class AlertDefinesController {
@Parameter(description = "Sort mode: asc: ascending, desc: descending", example = "desc") @RequestParam(defaultValue = "desc") String order,
@Parameter(description = "List current page", example = "0") @RequestParam(defaultValue = "0") int pageIndex,
@Parameter(description = "Number of list pages", example = "8") @RequestParam(defaultValue = "8") int pageSize) {
Specification<AlertDefine> specification = (root, query, criteriaBuilder) -> {
List<Predicate> andList = new ArrayList<>();
if (ids != null && !ids.isEmpty()) {
CriteriaBuilder.In<Long> inPredicate = criteriaBuilder.in(root.get("id"));
for (long id : ids) {
inPredicate.value(id);
}
andList.add(inPredicate);
}
if (StringUtils.hasText(search)) {
Predicate predicate = criteriaBuilder.or(
criteriaBuilder.like(
criteriaBuilder.lower(root.get("app")),
"%" + search.toLowerCase() + "%"
),
criteriaBuilder.like(
criteriaBuilder.lower(root.get("metric")),
"%" + search.toLowerCase() + "%"
),
criteriaBuilder.like(
criteriaBuilder.lower(root.get("field")),
"%" + search.toLowerCase() + "%"
),
criteriaBuilder.like(
criteriaBuilder.lower(root.get("expr")),
"%" + search.toLowerCase() + "%"
),
criteriaBuilder.like(
criteriaBuilder.lower(root.get("template")),
"%" + search.toLowerCase() + "%"
)
);
andList.add(predicate);
}
if (priority != null) {
Predicate predicate = criteriaBuilder.equal(root.get("priority"), priority);
andList.add(predicate);
}
Predicate[] predicates = new Predicate[andList.size()];
return criteriaBuilder.and(andList.toArray(predicates));
};
Sort sortExp = Sort.by(new Sort.Order(Sort.Direction.fromString(order), sort));
PageRequest pageRequest = PageRequest.of(pageIndex, pageSize, sortExp);
Page<AlertDefine> alertDefinePage = alertDefineService.getAlertDefines(specification, pageRequest);
Page<AlertDefine> alertDefinePage = alertDefineService.getAlertDefines(ids, search, priority, sort, order, pageIndex, pageSize);
return ResponseEntity.ok(Message.success(alertDefinePage));
}
@@ -20,16 +20,10 @@ package org.apache.hertzbeat.alert.controller;
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.Date;
import java.util.Optional;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dto.CloudAlertReportAbstract;
import org.apache.hertzbeat.alert.dto.GeneralCloudAlertReport;
import org.apache.hertzbeat.alert.enums.CloudServiceAlarmInformationEnum;
import org.apache.hertzbeat.alert.service.AlertService;
import org.apache.hertzbeat.common.entity.dto.AlertReport;
import org.apache.hertzbeat.common.entity.dto.Message;
import org.apache.hertzbeat.common.util.JsonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
@@ -54,40 +48,7 @@ public class AlertReportController {
@Operation(summary = "Interface for reporting external alarm information of cloud service")
public ResponseEntity<Message<Void>> addNewAlertReportFromCloud(@PathVariable("cloud") String cloudServiceName,
@RequestBody String alertReport) {
CloudServiceAlarmInformationEnum cloudService = CloudServiceAlarmInformationEnum
.getEnumFromCloudServiceName(cloudServiceName);
AlertReport alert = null;
if (cloudService != null) {
try {
CloudAlertReportAbstract cloudAlertReport = JsonUtil
.fromJson(alertReport, cloudService.getCloudServiceAlarmInformationEntity());
assert cloudAlertReport != null;
alert = AlertReport.builder()
.content(cloudAlertReport.getContent())
.alertName(cloudAlertReport.getAlertName())
.alertTime(cloudAlertReport.getAlertTime())
.alertDuration(cloudAlertReport.getAlertDuration())
.priority(cloudAlertReport.getPriority())
.reportType(cloudAlertReport.getReportType())
.labels(cloudAlertReport.getLabels())
.annotations(cloudAlertReport.getAnnotations())
.build();
} catch (Exception e) {
log.error("[alert report] parse cloud service alarm content failed! cloud service: {} conrent: {}",
cloudService.name(), alertReport);
}
} else {
alert = AlertReport.builder()
.content("error do not has cloud service api")
.alertName("/api/alerts/report/" + cloudServiceName)
.alertTime(new Date().getTime())
.priority(1)
.reportType(1)
.build();
}
Optional.ofNullable(alert).ifPresent(alertReportPresent ->
alertService.addNewAlertReport(alertReportPresent));
alertService.addNewAlertReportFromCloud(cloudServiceName, alertReport);
return ResponseEntity.ok(Message.success("Add report success"));
}
@@ -23,6 +23,7 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import java.util.Objects;
import org.apache.hertzbeat.alert.service.AlertSilenceService;
import org.apache.hertzbeat.common.entity.alerter.AlertSilence;
import org.apache.hertzbeat.common.entity.dto.Message;
@@ -69,11 +70,10 @@ public class AlertSilenceController {
public ResponseEntity<Message<AlertSilence>> getAlertSilence(
@Parameter(description = "Alarm Silence ID", example = "6565463543") @PathVariable("id") long id) {
AlertSilence alertSilence = alertSilenceService.getAlertSilence(id);
if (alertSilence == null) {
return ResponseEntity.ok(Message.fail(MONITOR_NOT_EXIST_CODE, "AlertSilence not exist."));
} else {
return ResponseEntity.ok(Message.success(alertSilence));
}
return Objects.isNull(alertSilence)
? ResponseEntity.ok(Message.fail(MONITOR_NOT_EXIST_CODE, "AlertSilence not exist."))
: ResponseEntity.ok(Message.success(alertSilence));
}
}
@@ -21,9 +21,6 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Predicate;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import org.apache.hertzbeat.alert.service.AlertSilenceService;
@@ -31,11 +28,7 @@ import org.apache.hertzbeat.common.entity.alerter.AlertSilence;
import org.apache.hertzbeat.common.entity.dto.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -63,33 +56,8 @@ public class AlertSilencesController {
@Parameter(description = "Sort mode: asc: ascending, desc: descending", example = "desc") @RequestParam(defaultValue = "desc") String order,
@Parameter(description = "List current page", example = "0") @RequestParam(defaultValue = "0") int pageIndex,
@Parameter(description = "Number of list pages", example = "8") @RequestParam(defaultValue = "8") int pageSize) {
Specification<AlertSilence> specification = (root, query, criteriaBuilder) -> {
List<Predicate> andList = new ArrayList<>();
if (ids != null && !ids.isEmpty()) {
CriteriaBuilder.In<Long> inPredicate = criteriaBuilder.in(root.get("id"));
for (long id : ids) {
inPredicate.value(id);
}
andList.add(inPredicate);
}
if (StringUtils.hasText(search)) {
Predicate predicate = criteriaBuilder.or(
criteriaBuilder.like(
criteriaBuilder.lower(root.get("name")),
"%" + search.toLowerCase() + "%"
)
);
andList.add(predicate);
}
Predicate[] predicates = new Predicate[andList.size()];
return criteriaBuilder.and(andList.toArray(predicates));
};
Sort sortExp = Sort.by(new Sort.Order(Sort.Direction.fromString(order), sort));
PageRequest pageRequest = PageRequest.of(pageIndex, pageSize, sortExp);
Page<AlertSilence> alertSilencePage = alertSilenceService.getAlertSilences(specification, pageRequest);
Message<Page<AlertSilence>> message = Message.success(alertSilencePage);
return ResponseEntity.ok(message);
Page<AlertSilence> alertSilencePage = alertSilenceService.getAlertSilences(ids, search, sort, order, pageIndex, pageSize);
return ResponseEntity.ok(Message.success(alertSilencePage));
}
@DeleteMapping
@@ -21,9 +21,6 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Predicate;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import org.apache.hertzbeat.alert.dto.AlertSummary;
@@ -32,9 +29,6 @@ import org.apache.hertzbeat.common.entity.alerter.Alert;
import org.apache.hertzbeat.common.entity.dto.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
@@ -67,41 +61,8 @@ public class AlertsController {
@Parameter(description = "Sort Type", example = "desc") @RequestParam(defaultValue = "desc") String order,
@Parameter(description = "List current page", example = "0") @RequestParam(defaultValue = "0") int pageIndex,
@Parameter(description = "Number of list pagination", example = "8") @RequestParam(defaultValue = "8") int pageSize) {
Specification<Alert> specification = (root, query, criteriaBuilder) -> {
List<Predicate> andList = new ArrayList<>();
if (ids != null && !ids.isEmpty()) {
CriteriaBuilder.In<Long> inPredicate = criteriaBuilder.in(root.get("id"));
for (long id : ids) {
inPredicate.value(id);
}
andList.add(inPredicate);
}
if (monitorId != null) {
Predicate predicate = criteriaBuilder.like(root.get("tags").as(String.class), "%" + monitorId + "%");
andList.add(predicate);
}
if (priority != null) {
Predicate predicate = criteriaBuilder.equal(root.get("priority"), priority);
andList.add(predicate);
}
if (status != null) {
Predicate predicate = criteriaBuilder.equal(root.get("status"), status);
andList.add(predicate);
}
if (content != null && !content.isEmpty()) {
Predicate predicateContent = criteriaBuilder.like(root.get("content"), "%" + content + "%");
andList.add(predicateContent);
}
Predicate[] predicates = new Predicate[andList.size()];
return criteriaBuilder.and(andList.toArray(predicates));
};
Sort sortExp = Sort.by(new Sort.Order(Sort.Direction.fromString(order), sort));
PageRequest pageRequest = PageRequest.of(pageIndex, pageSize, sortExp);
Page<Alert> alertPage = alertService.getAlerts(specification, pageRequest);
Message<Page<Alert>> message = Message.success(alertPage);
return ResponseEntity.ok(message);
Page<Alert> alertPage = alertService.getAlerts(ids, monitorId, priority, status, content, sort, order, pageIndex, pageSize);
return ResponseEntity.ok(Message.success(alertPage));
}
@DeleteMapping
@@ -0,0 +1,59 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.alert.dto;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.List;
import lombok.Data;
import org.apache.hertzbeat.common.entity.manager.TagItem;
/**
* Data transfer object for alert configuration
*/
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ExcelTarget(value = "AlertDefineDTO")
public class AlertDefineDTO {
@Excel(name = "App")
private String app;
@Excel(name = "Metric")
private String metric;
@Excel(name = "Field")
private String field;
@Excel(name = "Preset")
private Boolean preset;
@Excel(name = "Expr")
private String expr;
@Excel(name = "Priority")
private Byte priority;
@Excel(name = "Times")
private Integer times;
@Excel(name = "Tags")
private List<TagItem> tags;
@Excel(name = "Enable")
private Boolean enable;
@Excel(name = "RecoverNotice")
private Boolean recoverNotice;
@Excel(name = "Template")
private String template;
}
@@ -0,0 +1,38 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.alert.dto;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
/**
* Export data transfer objects for alert configurations
*/
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ExcelTarget(value = "ExportAlertDefineDTO")
public class ExportAlertDefineDTO {
@Excel(name = "AlertDefine")
private AlertDefineDTO alertDefine;
}
@@ -174,7 +174,7 @@ public class TenCloudAlertReport extends CloudAlertReportAbstract implements Ser
@Override
public String getContent() {
StringBuilder contentBuilder = new StringBuilder();
// 判断类型
// Check Type.
if (EVENT.equals(getAlarmType())) {
contentBuilder
.append("[")
@@ -225,5 +225,3 @@ public class TenCloudAlertReport extends CloudAlertReportAbstract implements Ser
}
}
@@ -55,25 +55,27 @@ public class AlarmConvergeReduce {
@SuppressWarnings("unchecked")
public boolean filterConverge(Alert currentAlert) {
// ignore monitor status auto recover notice
if (currentAlert.getTags() != null && currentAlert.getTags().containsKey(CommonConstants.IGNORE)) {
return true;
}
if (currentAlert.getStatus() == CommonConstants.ALERT_STATUS_CODE_RESTORED) {
if ((currentAlert.getTags() != null && currentAlert.getTags().containsKey(CommonConstants.IGNORE))
|| currentAlert.getStatus() == CommonConstants.ALERT_STATUS_CODE_RESTORED) {
// restored alert
int alertHash = Objects.hash(CommonConstants.ALERT_PRIORITY_CODE_CRITICAL)
+ Arrays.hashCode(currentAlert.getTags().keySet().toArray(new String[0]))
+ Arrays.hashCode(currentAlert.getTags().values().toArray(new String[0]));
boolean isHasIgnore = false;
Map<String, String> tags = currentAlert.getTags();
if (Objects.requireNonNull(tags).containsKey(CommonConstants.IGNORE)) {
isHasIgnore = true;
tags.remove(CommonConstants.IGNORE);
}
int alertHash = generateAlertHash(CommonConstants.ALERT_PRIORITY_CODE_CRITICAL, tags);
converageAlertMap.remove(alertHash);
alertHash = Objects.hash(CommonConstants.ALERT_PRIORITY_CODE_EMERGENCY)
+ Arrays.hashCode(currentAlert.getTags().keySet().toArray(new String[0]))
+ Arrays.hashCode(currentAlert.getTags().values().toArray(new String[0]));
alertHash = generateAlertHash(CommonConstants.ALERT_PRIORITY_CODE_EMERGENCY, tags);
converageAlertMap.remove(alertHash);
alertHash = Objects.hash(CommonConstants.ALERT_PRIORITY_CODE_WARNING)
+ Arrays.hashCode(currentAlert.getTags().keySet().toArray(new String[0]))
+ Arrays.hashCode(currentAlert.getTags().values().toArray(new String[0]));
alertHash = generateAlertHash(CommonConstants.ALERT_PRIORITY_CODE_WARNING, tags);
converageAlertMap.remove(alertHash);
if (isHasIgnore) {
tags.put(CommonConstants.IGNORE, CommonConstants.IGNORE);
}
return true;
}
CommonCacheService<String, Object> convergeCache = CacheFactory.getAlertConvergeCache();
List<AlertConverge> alertConvergeList = (List<AlertConverge>) convergeCache.get(CommonConstants.CACHE_ALERT_CONVERGE);
if (alertConvergeList == null) {
@@ -124,9 +126,7 @@ public class AlarmConvergeReduce {
if (evalInterval <= 0) {
return true;
}
int alertHash = Objects.hash(currentAlert.getPriority())
+ Arrays.hashCode(currentAlert.getTags().keySet().toArray(new String[0]))
+ Arrays.hashCode(currentAlert.getTags().values().toArray(new String[0]));
int alertHash = generateAlertHash(currentAlert.getPriority(), currentAlert.getTags());
Alert preAlert = converageAlertMap.get(alertHash);
if (preAlert == null) {
currentAlert.setTimes(1);
@@ -157,4 +157,12 @@ public class AlarmConvergeReduce {
}
return true;
}
private int generateAlertHash(byte priority, Map<String, String> tags) {
List<String> keyList = tags.keySet().stream().filter(Objects::nonNull).sorted().toList();
List<String> valueList = tags.values().stream().filter(Objects::nonNull).sorted().toList();
return Objects.hash(priority)
+ Arrays.hashCode(keyList.toArray(new String[0]))
+ Arrays.hashCode(valueList.toArray(new String[0]));
}
}
@@ -18,7 +18,6 @@
package org.apache.hertzbeat.alert.reduce;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -84,32 +83,16 @@ public class AlarmSilenceReduce {
}
}
if (match) {
LocalDateTime nowDate = LocalDateTime.now();
if (alertSilence.getType() == 0) {
// once time
boolean startMatch = alertSilence.getPeriodStart() == null || nowDate.isAfter(alertSilence.getPeriodStart().toLocalDateTime());
boolean endMatch = alertSilence.getPeriodEnd() == null || nowDate.isBefore(alertSilence.getPeriodEnd().toLocalDateTime());
if (startMatch && endMatch) {
int times = Optional.ofNullable(alertSilence.getTimes()).orElse(0);
alertSilence.setTimes(times + 1);
alertSilenceDao.save(alertSilence);
return false;
}
return checkAndSave(LocalDateTime.now(), alertSilence);
} else if (alertSilence.getType() == 1) {
// cyc time
int currentDayOfWeek = nowDate.toLocalDate().getDayOfWeek().getValue();
int currentDayOfWeek = LocalDateTime.now().toLocalDate().getDayOfWeek().getValue();
if (alertSilence.getDays() != null && !alertSilence.getDays().isEmpty()) {
boolean dayMatch = alertSilence.getDays().stream().anyMatch(item -> item == currentDayOfWeek);
if (dayMatch) {
LocalTime nowTime = nowDate.toLocalTime();
boolean startMatch = alertSilence.getPeriodStart() == null || nowTime.isAfter(alertSilence.getPeriodStart().toLocalTime());
boolean endMatch = alertSilence.getPeriodEnd() == null || nowTime.isBefore(alertSilence.getPeriodEnd().toLocalTime());
if (startMatch && endMatch) {
int times = Optional.ofNullable(alertSilence.getTimes()).orElse(0);
alertSilence.setTimes(times + 1);
alertSilenceDao.save(alertSilence);
return false;
}
return checkAndSave(LocalDateTime.now(), alertSilence);
}
}
}
@@ -117,4 +100,26 @@ public class AlarmSilenceReduce {
}
return true;
}
/**
* Check AlertSilence start and end match, to save alertSilence obj.
* @param times LocalDateTime.
* @param alertSilence {@link AlertSilence}
* @return boolean
*/
private boolean checkAndSave(LocalDateTime times, AlertSilence alertSilence) {
boolean startMatch = alertSilence.getPeriodStart() == null || times.isAfter(alertSilence.getPeriodStart().toLocalDateTime());
boolean endMatch = alertSilence.getPeriodEnd() == null || times.isBefore(alertSilence.getPeriodEnd().toLocalDateTime());
if (startMatch && endMatch) {
int time = Optional.ofNullable(alertSilence.getTimes()).orElse(0);
alertSilence.setTimes(time + 1);
alertSilenceDao.save(alertSilence);
return false;
}
return true;
}
}
@@ -17,11 +17,10 @@
package org.apache.hertzbeat.alert.service;
import java.util.List;
import java.util.Set;
import org.apache.hertzbeat.common.entity.alerter.AlertConverge;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.domain.Specification;
/**
* management interface service for alert converge
@@ -67,9 +66,13 @@ public interface AlertConvergeService {
/**
* Dynamic conditional query
* @param specification Query conditions
* @param pageRequest Paging parameters
* @param convergeIds Alarm Converge ID List
* @param search Search Name
* @param sort Sort field
* @param order Sort mode: asc: ascending, desc: descending
* @param pageIndex List current page
* @param pageSize Number of list pages
* @return The query results
*/
Page<AlertConverge> getAlertConverges(Specification<AlertConverge> specification, PageRequest pageRequest);
Page<AlertConverge> getAlertConverges(List<Long> convergeIds, String search, String sort, String order, int pageIndex, int pageSize);
}
@@ -113,11 +113,16 @@ public interface AlertDefineService {
/**
* Dynamic conditional query
* @param specification Query conditions
* @param pageRequest Paging parameters
* @param defineIds Alarm Definition ID List
* @param search Search-Target Expr Template
* @param priority Alarm Definition Severity
* @param sort Sort field
* @param order Sort mode: asc: ascending, desc: descending
* @param pageIndex List current page
* @param pageSize Number of list pages
* @return The query results
*/
Page<AlertDefine> getAlertDefines(Specification<AlertDefine> specification, PageRequest pageRequest);
Page<AlertDefine> getAlertDefines(List<Long> defineIds, String search, Byte priority, String sort, String order, int pageIndex, int pageSize);
/**
* Query the associated monitoring list information based on the alarm definition ID
@@ -23,7 +23,6 @@ import org.apache.hertzbeat.alert.dto.AlertSummary;
import org.apache.hertzbeat.common.entity.alerter.Alert;
import org.apache.hertzbeat.common.entity.dto.AlertReport;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.domain.Specification;
/**
@@ -40,11 +39,18 @@ public interface AlertService {
/**
* Dynamic conditional query
* @param specification Query conditions
* @param pageRequest pagination parameters
* @param alarmIds Alarm ID List
* @param monitorId Monitor ID
* @param priority Alarm level
* @param status Alarm Status
* @param content Alarm content fuzzy query
* @param sort Sort field
* @param order Sort Type
* @param pageIndex List current page
* @param pageSize Number of list pagination
* @return search result
*/
Page<Alert> getAlerts(Specification<Alert> specification, PageRequest pageRequest);
Page<Alert> getAlerts(List<Long> alarmIds, Long monitorId, Byte priority, Byte status, String content, String sort, String order, int pageIndex, int pageSize);
/**
* Delete alarms in batches according to the alarm ID list
@@ -76,6 +82,13 @@ public interface AlertService {
*/
void addNewAlertReport(AlertReport alertReport);
/**
* Save external alarms of cloud services
* @param cloudServiceName cloud service name,Such as tencloud
* @param alertReport alert report json string
*/
void addNewAlertReportFromCloud(String cloudServiceName, String alertReport);
/**
* Dynamic conditional query
* @param specification Query conditions
@@ -17,11 +17,10 @@
package org.apache.hertzbeat.alert.service;
import java.util.List;
import java.util.Set;
import org.apache.hertzbeat.common.entity.alerter.AlertSilence;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.domain.Specification;
/**
* management interface service for alert silence
@@ -67,9 +66,13 @@ public interface AlertSilenceService {
/**
* Dynamic conditional query
* @param specification Query conditions
* @param pageRequest Paging parameters
* @param silenceIds Alarm Silence ID
* @param search Search Name
* @param sort Sort field
* @param order Sort mode: asc: ascending, desc: descending
* @param pageIndex List current page
* @param pageSize Number of list pages
* @return The query results
*/
Page<AlertSilence> getAlertSilences(Specification<AlertSilence> specification, PageRequest pageRequest);
Page<AlertSilence> getAlertSilences(List<Long> silenceIds, String search, String sort, String order, int pageIndex, int pageSize);
}
@@ -17,6 +17,10 @@
package org.apache.hertzbeat.alert.service.impl;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Predicate;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dao.AlertConvergeDao;
@@ -28,9 +32,11 @@ import org.apache.hertzbeat.common.entity.alerter.AlertConverge;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
/**
* implement for alert converge service
@@ -72,7 +78,30 @@ public class AlertConvergeServiceImpl implements AlertConvergeService {
}
@Override
public Page<AlertConverge> getAlertConverges(Specification<AlertConverge> specification, PageRequest pageRequest) {
public Page<AlertConverge> getAlertConverges(List<Long> convergeIds, String search, String sort, String order, int pageIndex, int pageSize) {
Specification<AlertConverge> specification = (root, query, criteriaBuilder) -> {
List<Predicate> andList = new ArrayList<>();
if (convergeIds != null && !convergeIds.isEmpty()) {
CriteriaBuilder.In<Long> inPredicate = criteriaBuilder.in(root.get("id"));
for (long id : convergeIds) {
inPredicate.value(id);
}
andList.add(inPredicate);
}
if (StringUtils.hasText(search)) {
Predicate predicate = criteriaBuilder.or(
criteriaBuilder.like(
criteriaBuilder.lower(root.get("name")),
"%" + search.toLowerCase() + "%"
)
);
andList.add(predicate);
}
Predicate[] predicates = new Predicate[andList.size()];
return criteriaBuilder.and(andList.toArray(predicates));
};
Sort sortExp = Sort.by(new Sort.Order(Sort.Direction.fromString(order), sort));
PageRequest pageRequest = PageRequest.of(pageIndex, pageSize, sortExp);
return alertConvergeDao.findAll(specification, pageRequest);
}
@@ -17,22 +17,17 @@
package org.apache.hertzbeat.alert.service.impl;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.annotation.Resource;
import java.io.InputStream;
import java.io.OutputStream;
import java.time.LocalDate;
import java.util.List;
import java.util.stream.Collectors;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dto.AlertDefineDTO;
import org.apache.hertzbeat.alert.dto.ExportAlertDefineDTO;
import org.apache.hertzbeat.alert.service.AlertDefineImExportService;
import org.apache.hertzbeat.alert.service.AlertDefineService;
import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
import org.apache.hertzbeat.common.entity.manager.TagItem;
import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.util.CollectionUtils;
@@ -51,7 +46,7 @@ public abstract class AlertDefineAbstractImExportServiceImpl implements AlertDef
var formList = parseImport(is)
.stream()
.map(this::convert)
.collect(Collectors.toUnmodifiableList());
.toList();
if (!CollectionUtils.isEmpty(formList)) {
formList.forEach(alertDefine -> {
alertDefineService.validate(alertDefine, false);
@@ -65,7 +60,7 @@ public abstract class AlertDefineAbstractImExportServiceImpl implements AlertDef
var monitorList = configList.stream()
.map(it -> alertDefineService.getAlertDefine(it))
.map(this::convert)
.collect(Collectors.toUnmodifiableList());
.toList();
writeOs(monitorList, os);
}
@@ -105,47 +100,4 @@ public abstract class AlertDefineAbstractImExportServiceImpl implements AlertDef
return "hertzbeat_alertDefine_" + LocalDate.now();
}
/**
* Export data transfer objects for alert configurations
*/
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ExcelTarget(value = "ExportAlertDefineDTO")
protected static class ExportAlertDefineDTO {
@Excel(name = "AlertDefine")
private AlertDefineDTO alertDefine;
}
/**
* Data transfer object for alert configuration
*/
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
@ExcelTarget(value = "AlertDefineDTO")
protected static class AlertDefineDTO {
@Excel(name = "App")
private String app;
@Excel(name = "Metric")
private String metric;
@Excel(name = "Field")
private String field;
@Excel(name = "Preset")
private Boolean preset;
@Excel(name = "Expr")
private String expr;
@Excel(name = "Priority")
private Byte priority;
@Excel(name = "Times")
private Integer times;
@Excel(name = "Tags")
private List<TagItem> tags;
@Excel(name = "Enable")
private Boolean enable;
@Excel(name = "RecoverNotice")
private Boolean recoverNotice;
@Excel(name = "Template")
private String template;
}
}
@@ -17,6 +17,8 @@
package org.apache.hertzbeat.alert.service.impl;
import static org.apache.hertzbeat.common.constants.ExportFileConstants.ExcelFile.FILE_SUFFIX;
import static org.apache.hertzbeat.common.constants.ExportFileConstants.ExcelFile.TYPE;
import com.fasterxml.jackson.core.type.TypeReference;
import java.io.IOException;
import java.io.InputStream;
@@ -25,13 +27,15 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dto.AlertDefineDTO;
import org.apache.hertzbeat.alert.dto.ExportAlertDefineDTO;
import org.apache.hertzbeat.common.entity.manager.TagItem;
import org.apache.hertzbeat.common.util.JsonUtil;
import org.apache.hertzbeat.common.util.export.ExcelExportUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
@@ -45,8 +49,6 @@ import org.springframework.util.StringUtils;
@Slf4j
@Service
public class AlertDefineExcelImExportServiceImpl extends AlertDefineAbstractImExportServiceImpl {
public static final String TYPE = "EXCEL";
public static final String FILE_SUFFIX = ".xlsx";
/**
* Export file type
@@ -73,7 +75,7 @@ public class AlertDefineExcelImExportServiceImpl extends AlertDefineAbstractImEx
* @return form list
*/
@Override
List<ExportAlertDefineDTO> parseImport(InputStream is) {
public List<ExportAlertDefineDTO> parseImport(InputStream is) {
try (Workbook workbook = WorkbookFactory.create(is)) {
Sheet sheet = workbook.getSheetAt(0);
List<ExportAlertDefineDTO> alertDefines = new ArrayList<>();
@@ -95,17 +97,6 @@ public class AlertDefineExcelImExportServiceImpl extends AlertDefineAbstractImEx
}
}
private TagItem extractTagDataFromRow(Row row) {
String name = getCellValueAsString(row.getCell(7));
if (StringUtils.hasText(name)) {
TagItem tagItem = new TagItem();
tagItem.setName(name);
tagItem.setValue(getCellValueAsString(row.getCell(8)));
return tagItem;
}
return null;
}
private List<TagItem> extractTagDataFromRow(Cell cell) {
String jsonStr = getCellValueAsString(cell);
if (StringUtils.hasText(jsonStr)) {
@@ -184,32 +175,14 @@ public class AlertDefineExcelImExportServiceImpl extends AlertDefineAbstractImEx
* @param os output stream
*/
@Override
void writeOs(List<ExportAlertDefineDTO> exportAlertDefineList, OutputStream os) {
public void writeOs(List<ExportAlertDefineDTO> exportAlertDefineList, OutputStream os) {
try {
Workbook workbook = WorkbookFactory.create(true);
Workbook workbook = new HSSFWorkbook();
String sheetName = "Export AlertDefine";
Sheet sheet = workbook.createSheet(sheetName);
sheet.setDefaultColumnWidth(20);
sheet.setColumnWidth(9, 40 * 256);
sheet.setColumnWidth(10, 40 * 256);
// set header style
CellStyle headerCellStyle = workbook.createCellStyle();
Font headerFont = workbook.createFont();
headerFont.setBold(true);
headerCellStyle.setFont(headerFont);
headerCellStyle.setAlignment(HorizontalAlignment.CENTER);
Sheet sheet = ExcelExportUtils.setSheet(sheetName, workbook, AlertDefineDTO.class);
// set cell style
CellStyle cellStyle = workbook.createCellStyle();
cellStyle.setAlignment(HorizontalAlignment.CENTER);
// set header
String[] headers = {"app", "metric", "field", "preset", "expr", "priority", "times", "tags",
"enable", "recoverNotice", "template"};
Row headerRow = sheet.createRow(0);
for (int i = 0; i < headers.length; i++) {
Cell cell = headerRow.createCell(i);
cell.setCellValue(headers[i]);
cell.setCellStyle(headerCellStyle);
}
CellStyle cellStyle = ExcelExportUtils.setCellStyle(workbook);
// Traverse the threshold rule list, each threshold rule object corresponds to a row of data
int rowIndex = 1;
@@ -17,6 +17,8 @@
package org.apache.hertzbeat.alert.service.impl;
import static org.apache.hertzbeat.common.constants.ExportFileConstants.JsonFile.FILE_SUFFIX;
import static org.apache.hertzbeat.common.constants.ExportFileConstants.JsonFile.TYPE;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
@@ -25,6 +27,7 @@ import java.io.OutputStream;
import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dto.ExportAlertDefineDTO;
import org.springframework.stereotype.Service;
/**
@@ -34,8 +37,6 @@ import org.springframework.stereotype.Service;
@RequiredArgsConstructor
@Service
public class AlertDefineJsonImExportServiceImpl extends AlertDefineAbstractImExportServiceImpl {
public static final String TYPE = "JSON";
public static final String FILE_SUFFIX = ".json";
private final ObjectMapper objectMapper;
@@ -50,7 +51,7 @@ public class AlertDefineJsonImExportServiceImpl extends AlertDefineAbstractImExp
}
@Override
List<ExportAlertDefineDTO> parseImport(InputStream is) {
public List<ExportAlertDefineDTO> parseImport(InputStream is) {
try {
return objectMapper.readValue(is, new TypeReference<>() {
});
@@ -61,7 +62,7 @@ public class AlertDefineJsonImExportServiceImpl extends AlertDefineAbstractImExp
}
@Override
void writeOs(List<ExportAlertDefineDTO> exportAlertDefineList, OutputStream os) {
public void writeOs(List<ExportAlertDefineDTO> exportAlertDefineList, OutputStream os) {
try {
objectMapper.writeValue(os, exportAlertDefineList);
} catch (IOException ex) {
@@ -17,33 +17,50 @@
package org.apache.hertzbeat.alert.service.impl;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Predicate;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dao.AlertDefineBindDao;
import org.apache.hertzbeat.alert.dao.AlertDefineDao;
import org.apache.hertzbeat.alert.dao.AlertMonitorDao;
import org.apache.hertzbeat.alert.service.AlertDefineImExportService;
import org.apache.hertzbeat.alert.service.AlertDefineService;
import org.apache.hertzbeat.common.constants.ExportFileConstants;
import org.apache.hertzbeat.common.constants.SignConstants;
import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
import org.apache.hertzbeat.common.entity.alerter.AlertDefineMonitorBind;
import org.apache.hertzbeat.common.entity.manager.Monitor;
import org.apache.hertzbeat.common.util.FileUtil;
import org.apache.hertzbeat.common.util.JexlExpressionRunner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dao.AlertDefineBindDao;
import org.apache.hertzbeat.alert.dao.AlertDefineDao;
import org.apache.hertzbeat.alert.service.AlertDefineImExportService;
import org.apache.hertzbeat.alert.service.AlertDefineService;
import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
import org.apache.hertzbeat.common.entity.alerter.AlertDefineMonitorBind;
import org.apache.hertzbeat.common.util.JexlExpressionRunner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile;
/**
* Alarm definition management interface implementation
@@ -59,8 +76,13 @@ public class AlertDefineServiceImpl implements AlertDefineService {
@Autowired
private AlertDefineBindDao alertDefineBindDao;
@Autowired
private AlertMonitorDao alertMonitorDao;
private final Map<String, AlertDefineImExportService> alertDefineImExportServiceMap = new HashMap<>();
private static final String CONTENT_TYPE = MediaType.APPLICATION_OCTET_STREAM_VALUE + SignConstants.SINGLE_MARK + "charset=" + StandardCharsets.UTF_8;
public AlertDefineServiceImpl(List<AlertDefineImExportService> alertDefineImExportServiceList) {
alertDefineImExportServiceList.forEach(it -> alertDefineImExportServiceMap.put(it.type(), it));
}
@@ -141,13 +163,76 @@ public class AlertDefineServiceImpl implements AlertDefineService {
}
@Override
public Page<AlertDefine> getAlertDefines(Specification<AlertDefine> specification, PageRequest pageRequest) {
public Page<AlertDefine> getAlertDefines(List<Long> defineIds, String search, Byte priority, String sort, String order, int pageIndex, int pageSize) {
// parse translation content list
ObjectMapper objectMapper = new ObjectMapper();
List<String> searchList = Collections.emptyList();
if (StringUtils.hasText(search)) {
try {
searchList = objectMapper.readValue(URLDecoder.decode(search, StandardCharsets.UTF_8), new TypeReference<>() {});
} catch (JsonProcessingException e) {
throw new IllegalArgumentException("Failed to parse search parameter", e);
}
}
List<String> finalSearchList = searchList;
// build search condition
Specification<AlertDefine> specification = (root, query, criteriaBuilder) -> {
List<Predicate> andList = new ArrayList<>();
if (defineIds != null && !defineIds.isEmpty()) {
CriteriaBuilder.In<Long> inPredicate = criteriaBuilder.in(root.get("id"));
for (long id : defineIds) {
inPredicate.value(id);
}
andList.add(inPredicate);
}
if (null != finalSearchList && !finalSearchList.isEmpty()) {
List<Predicate> searchPredicates = new ArrayList<>();
for (String searchContent : finalSearchList) {
searchContent = searchContent.toLowerCase();
Predicate predicate = criteriaBuilder.or(
criteriaBuilder.like(criteriaBuilder.lower(root.get("app")), "%" + searchContent + "%"),
criteriaBuilder.like(criteriaBuilder.lower(root.get("metric")), "%" + searchContent + "%"),
criteriaBuilder.like(criteriaBuilder.lower(root.get("field")), "%" + searchContent + "%"),
criteriaBuilder.like(criteriaBuilder.lower(root.get("expr")), "%" + searchContent + "%"),
criteriaBuilder.like(criteriaBuilder.lower(root.get("template")), "%" + searchContent + "%")
);
searchPredicates.add(predicate);
}
// all search keywords are connected with or
andList.add(criteriaBuilder.or(searchPredicates.toArray(new Predicate[0])));
}
if (priority != null) {
Predicate predicate = criteriaBuilder.equal(root.get("priority"), priority);
andList.add(predicate);
}
Predicate[] predicates = new Predicate[andList.size()];
return criteriaBuilder.and(andList.toArray(predicates));
};
Sort sortExp = Sort.by(new Sort.Order(Sort.Direction.fromString(order), sort));
PageRequest pageRequest = PageRequest.of(pageIndex, pageSize, sortExp);
return alertDefineDao.findAll(specification, pageRequest);
}
@Override
public List<AlertDefineMonitorBind> getBindAlertDefineMonitors(long alertDefineId) {
return alertDefineBindDao.getAlertDefineBindsByAlertDefineIdEquals(alertDefineId);
List<AlertDefineMonitorBind> defineMonitorBinds = alertDefineBindDao.getAlertDefineBindsByAlertDefineIdEquals(alertDefineId);
if (defineMonitorBinds == null || defineMonitorBinds.isEmpty()) {
return defineMonitorBinds;
}
List<Long> needLoadMonitorIds = defineMonitorBinds.stream()
.filter(bind -> bind.getMonitor() == null)
.map(AlertDefineMonitorBind::getMonitorId).toList();
if (needLoadMonitorIds.isEmpty()) {
return defineMonitorBinds;
}
Map<Long, Monitor> monitorMap = alertMonitorDao.findAllById(needLoadMonitorIds)
.stream().collect(Collectors.toMap(Monitor::getId, Function.identity()));
for (AlertDefineMonitorBind bind : defineMonitorBinds) {
if (bind.getMonitor() == null) {
bind.setMonitor(monitorMap.get(bind.getMonitorId()));
}
}
return defineMonitorBinds;
}
@Override
@@ -157,31 +242,20 @@ public class AlertDefineServiceImpl implements AlertDefineService {
throw new IllegalArgumentException("not support export type: " + type);
}
var fileName = imExportService.getFileName();
res.setHeader("content-type", "application/octet-stream;charset=UTF-8");
res.setContentType("application/octet-stream;charset=UTF-8");
res.setHeader(HttpHeaders.CONTENT_TYPE, CONTENT_TYPE);
res.setContentType(CONTENT_TYPE);
res.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8));
res.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
res.setHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, HttpHeaders.CONTENT_DISPOSITION);
imExportService.exportConfig(res.getOutputStream(), ids);
}
@Override
public void importConfig(MultipartFile file) throws Exception {
var fileName = file.getOriginalFilename();
if (!StringUtils.hasText(fileName)) {
return;
}
var type = "";
if (fileName.toLowerCase().endsWith(AlertDefineJsonImExportServiceImpl.FILE_SUFFIX)) {
type = AlertDefineJsonImExportServiceImpl.TYPE;
}
if (fileName.toLowerCase().endsWith(AlertDefineExcelImExportServiceImpl.FILE_SUFFIX)) {
type = AlertDefineExcelImExportServiceImpl.TYPE;
}
if (fileName.toLowerCase().endsWith(AlertDefineYamlImExportServiceImpl.FILE_SUFFIX)) {
type = AlertDefineYamlImExportServiceImpl.TYPE;
}
var type = FileUtil.getFileType(file);
var fileName = FileUtil.getFileName(file);
if (!alertDefineImExportServiceMap.containsKey(type)) {
throw new RuntimeException("file " + fileName + " is not supported.");
throw new RuntimeException(ExportFileConstants.FILE + " " + fileName + " is not supported.");
}
var imExportService = alertDefineImExportServiceMap.get(type);
imExportService.importConfig(file.getInputStream());
@@ -17,26 +17,25 @@
package org.apache.hertzbeat.alert.service.impl;
import static org.apache.hertzbeat.common.constants.ExportFileConstants.YamlFile.FILE_SUFFIX;
import static org.apache.hertzbeat.common.constants.ExportFileConstants.YamlFile.TYPE;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dto.ExportAlertDefineDTO;
import org.springframework.stereotype.Service;
import org.yaml.snakeyaml.DumperOptions;
import org.apache.hertzbeat.common.util.export.YamlExportUtils;
import org.yaml.snakeyaml.Yaml;
/**
* Configure the import and export Yaml format
* Configure the import and export Yaml format.
*/
@Slf4j
@Service
public class AlertDefineYamlImExportServiceImpl extends AlertDefineAbstractImExportServiceImpl {
public static final String TYPE = "YAML";
public static final String FILE_SUFFIX = ".yaml";
@Override
public String type() {
return TYPE;
@@ -48,18 +47,15 @@ public class AlertDefineYamlImExportServiceImpl extends AlertDefineAbstractImExp
}
@Override
List<ExportAlertDefineDTO> parseImport(InputStream is) {
public List<ExportAlertDefineDTO> parseImport(InputStream is) {
Yaml yaml = new Yaml();
return yaml.load(is);
}
@Override
void writeOs(List<ExportAlertDefineDTO> exportAlertDefineList, OutputStream os) {
DumperOptions options = new DumperOptions();
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
options.setIndent(2);
options.setPrettyFlow(true);
Yaml yaml = new Yaml(options);
yaml.dump(exportAlertDefineList, new OutputStreamWriter(os, StandardCharsets.UTF_8));
public void writeOs(List<ExportAlertDefineDTO> exportAlertDefineList, OutputStream os) {
YamlExportUtils.exportWriteOs(exportAlertDefineList, os);
}
}
@@ -17,26 +17,34 @@
package org.apache.hertzbeat.alert.service.impl;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Predicate;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dao.AlertDao;
import org.apache.hertzbeat.alert.dto.AlertPriorityNum;
import org.apache.hertzbeat.alert.dto.AlertSummary;
import org.apache.hertzbeat.alert.dto.CloudAlertReportAbstract;
import org.apache.hertzbeat.alert.enums.CloudServiceAlarmInformationEnum;
import org.apache.hertzbeat.alert.reduce.AlarmCommonReduce;
import org.apache.hertzbeat.alert.service.AlertService;
import org.apache.hertzbeat.common.constants.CommonConstants;
import org.apache.hertzbeat.common.entity.alerter.Alert;
import org.apache.hertzbeat.common.entity.dto.AlertReport;
import org.apache.hertzbeat.common.util.JsonUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -61,7 +69,38 @@ public class AlertServiceImpl implements AlertService {
}
@Override
public Page<Alert> getAlerts(Specification<Alert> specification, PageRequest pageRequest) {
public Page<Alert> getAlerts(List<Long> alarmIds, Long monitorId, Byte priority, Byte status, String content, String sort, String order, int pageIndex, int pageSize) {
Specification<Alert> specification = (root, query, criteriaBuilder) -> {
List<Predicate> andList = new ArrayList<>();
if (alarmIds != null && !alarmIds.isEmpty()) {
CriteriaBuilder.In<Long> inPredicate = criteriaBuilder.in(root.get("id"));
for (long id : alarmIds) {
inPredicate.value(id);
}
andList.add(inPredicate);
}
if (monitorId != null) {
Predicate predicate = criteriaBuilder.like(root.get("tags").as(String.class), "%" + monitorId + "%");
andList.add(predicate);
}
if (priority != null) {
Predicate predicate = criteriaBuilder.equal(root.get("priority"), priority);
andList.add(predicate);
}
if (status != null) {
Predicate predicate = criteriaBuilder.equal(root.get("status"), status);
andList.add(predicate);
}
if (content != null && !content.isEmpty()) {
Predicate predicateContent = criteriaBuilder.like(root.get("content"), "%" + content + "%");
andList.add(predicateContent);
}
Predicate[] predicates = new Predicate[andList.size()];
return criteriaBuilder.and(andList.toArray(predicates));
};
Sort sortExp = Sort.by(new Sort.Order(Sort.Direction.fromString(order), sort));
PageRequest pageRequest = PageRequest.of(pageIndex, pageSize, sortExp);
return alertDao.findAll(specification, pageRequest);
}
@@ -121,6 +160,43 @@ public class AlertServiceImpl implements AlertService {
alarmCommonReduce.reduceAndSendAlarm(buildAlertData(alertReport));
}
@Override
public void addNewAlertReportFromCloud(String cloudServiceName, String alertReport) {
CloudServiceAlarmInformationEnum cloudService = CloudServiceAlarmInformationEnum
.getEnumFromCloudServiceName(cloudServiceName);
AlertReport alert = null;
if (cloudService != null) {
try {
CloudAlertReportAbstract cloudAlertReport = JsonUtil
.fromJson(alertReport, cloudService.getCloudServiceAlarmInformationEntity());
assert cloudAlertReport != null;
alert = AlertReport.builder()
.content(cloudAlertReport.getContent())
.alertName(cloudAlertReport.getAlertName())
.alertTime(cloudAlertReport.getAlertTime())
.alertDuration(cloudAlertReport.getAlertDuration())
.priority(cloudAlertReport.getPriority())
.reportType(cloudAlertReport.getReportType())
.labels(cloudAlertReport.getLabels())
.annotations(cloudAlertReport.getAnnotations())
.build();
} catch (Exception e) {
log.error("[alert report] parse cloud service alarm content failed! cloud service: {} conrent: {}",
cloudService.name(), alertReport);
}
} else {
alert = AlertReport.builder()
.content("error do not has cloud service api")
.alertName("/api/alerts/report/" + cloudServiceName)
.alertTime(Instant.now().getEpochSecond())
.priority(1)
.reportType(1)
.build();
}
Optional.ofNullable(alert).ifPresent(this::addNewAlertReport);
}
@Override
public List<Alert> getAlerts(Specification<Alert> specification) {
@@ -137,9 +213,7 @@ public class AlertServiceImpl implements AlertService {
StringBuilder sb = new StringBuilder();
if (alertReport.getContent() == null || alertReport.getContent().length() <= 0){
StringBuilder finalSb = sb;
annotations.forEach((k, v) -> {
finalSb.append(k).append(":").append(v).append("\n");
});
annotations.forEach((k, v) -> finalSb.append(k).append(":").append(v).append("\n"));
} else {
sb = new StringBuilder(alertReport.getContent());
}
@@ -17,7 +17,11 @@
package org.apache.hertzbeat.alert.service.impl;
import jakarta.persistence.criteria.CriteriaBuilder;
import jakarta.persistence.criteria.Predicate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.dao.AlertSilenceDao;
@@ -29,9 +33,11 @@ import org.apache.hertzbeat.common.entity.alerter.AlertSilence;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
/**
* management interface service implement for alert silence
@@ -77,7 +83,30 @@ public class AlertSilenceServiceImpl implements AlertSilenceService {
}
@Override
public Page<AlertSilence> getAlertSilences(Specification<AlertSilence> specification, PageRequest pageRequest) {
public Page<AlertSilence> getAlertSilences(List<Long> silenceIds, String search, String sort, String order, int pageIndex, int pageSize) {
Specification<AlertSilence> specification = (root, query, criteriaBuilder) -> {
List<Predicate> andList = new ArrayList<>();
if (silenceIds != null && !silenceIds.isEmpty()) {
CriteriaBuilder.In<Long> inPredicate = criteriaBuilder.in(root.get("id"));
for (long id : silenceIds) {
inPredicate.value(id);
}
andList.add(inPredicate);
}
if (StringUtils.hasText(search)) {
Predicate predicate = criteriaBuilder.or(
criteriaBuilder.like(
criteriaBuilder.lower(root.get("name")),
"%" + search.toLowerCase() + "%"
)
);
andList.add(predicate);
}
Predicate[] predicates = new Predicate[andList.size()];
return criteriaBuilder.and(andList.toArray(predicates));
};
Sort sortExp = Sort.by(new Sort.Order(Sort.Direction.fromString(order), sort));
PageRequest pageRequest = PageRequest.of(pageIndex, pageSize, sortExp);
return alertSilenceDao.findAll(specification, pageRequest);
}
@@ -13,5 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.apache.hertzbeat.push.config.PushAutoConfiguration
org.apache.hertzbeat.alert.config.AlerterAutoConfiguration
@@ -0,0 +1,124 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.alert.controller;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import org.apache.hertzbeat.alert.service.AlertConvergeService;
import org.apache.hertzbeat.common.constants.CommonConstants;
import org.apache.hertzbeat.common.entity.alerter.AlertConverge;
import org.apache.hertzbeat.common.util.JsonUtil;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
/**
* test case for {@link AlertConvergeController}
*/
@ExtendWith(MockitoExtension.class)
public class AlertConvergeControllerTest {
private MockMvc mockMvc;
@Mock
private AlertConvergeService alertConvergeService;
private AlertConverge alertConverge;
@InjectMocks
private AlertConvergeController alertConvergeController;
@BeforeEach
void setUp() {
this.mockMvc = standaloneSetup(alertConvergeController).build();
alertConverge = AlertConverge.builder()
.name("test")
.creator("admin")
.modifier("admin")
.id(1L)
.build();
}
@Test
void testAddNewAlertConverge() throws Exception {
doNothing().when(alertConvergeService).validate(any(AlertConverge.class), eq(false));
doNothing().when(alertConvergeService).addAlertConverge(any(AlertConverge.class));
mockMvc.perform(post("/api/alert/converge")
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(alertConverge))
).andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
.andExpect(jsonPath("$.msg").value("Add success"));
}
@Test
void testModifyAlertConverge() throws Exception {
doNothing().when(alertConvergeService).validate(any(AlertConverge.class), eq(true));
doNothing().when(alertConvergeService).modifyAlertConverge(any(AlertConverge.class));
mockMvc.perform(put("/api/alert/converge")
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(alertConverge))
).andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
.andExpect(jsonPath("$.msg").value("Modify success"));
}
@Test
void testGetAlertConvergeExists() throws Exception {
when(alertConvergeService.getAlertConverge(1L)).thenReturn(alertConverge);
mockMvc.perform(get("/api/alert/converge/{id}", 1L)
.accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.data.id").value(alertConverge.getId()));
}
@Test
void testGetAlertConvergeNotExists() throws Exception {
when(alertConvergeService.getAlertConverge(1L)).thenReturn(null);
mockMvc.perform(get("/api/alert/converge/{id}", 1L)
.accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.MONITOR_NOT_EXIST_CODE))
.andExpect(jsonPath("$.msg").value("AlertConverge not exist."));
}
}
@@ -0,0 +1,120 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hertzbeat.alert.controller;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import org.apache.hertzbeat.alert.service.AlertConvergeService;
import org.apache.hertzbeat.common.constants.CommonConstants;
import org.apache.hertzbeat.common.entity.alerter.AlertConverge;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
/**
* test case for {@link AlertConvergesController}
*/
@ExtendWith(MockitoExtension.class)
class AlertConvergesControllerTest {
private MockMvc mockMvc;
@Mock
private AlertConvergeService alertConvergeService;
@InjectMocks
private AlertConvergesController alertConvergesController;
private List<AlertConverge> alertConvergeList;
@BeforeEach
void setUp() {
this.mockMvc = standaloneSetup(alertConvergesController).build();
AlertConverge alertConverge1 = AlertConverge.builder()
.name("Converge1")
.id(1L)
.build();
AlertConverge alertConverge2 = AlertConverge.builder()
.name("Converge2")
.id(2L)
.build();
alertConvergeList = Arrays.asList(alertConverge1, alertConverge2);
}
@Test
void testGetAlertConverges() throws Exception {
Page<AlertConverge> alertConvergePage = new PageImpl<>(
alertConvergeList,
PageRequest.of(0, 8, Sort.by("id").descending()),
alertConvergeList.size()
);
when(alertConvergeService.getAlertConverges(null, null, "id", "desc", 0, 8)).thenReturn(alertConvergePage);
mockMvc.perform(get("/api/alert/converges")
.param("pageIndex", "0")
.param("pageSize", "8")
.param("sort", "id")
.param("order", "desc")
.accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.data.content[0].id").value(1))
.andExpect(jsonPath("$.data.content[0].name").value("Converge1"))
.andExpect(jsonPath("$.data.content[1].id").value(2))
.andExpect(jsonPath("$.data.content[1].name").value("Converge2"));
}
@Test
void testDeleteAlertDefines() throws Exception {
doNothing().when(alertConvergeService).deleteAlertConverges(eq(new HashSet<>(Arrays.asList(1L, 2L))));
mockMvc.perform(delete("/api/alert/converges")
.param("ids", "1,2")
.accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE));
}
}
@@ -97,8 +97,8 @@ class AlertDefineControllerTest {
void addNewAlertDefine() throws Exception {
// Simulate the client sending a request to the server
mockMvc.perform(MockMvcRequestBuilders.post("/api/alert/define")
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(this.alertDefine)))
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(this.alertDefine)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
.andReturn();
@@ -107,8 +107,8 @@ class AlertDefineControllerTest {
@Test
void modifyAlertDefine() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.put("/api/alert/define")
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(this.alertDefine)))
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(this.alertDefine)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
.andReturn();
@@ -121,7 +121,7 @@ class AlertDefineControllerTest {
.thenReturn(this.alertDefine);
mockMvc.perform(MockMvcRequestBuilders.get("/api/alert/define/" + this.alertDefine.getId())
.contentType(MediaType.APPLICATION_JSON))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
.andExpect(jsonPath("$.data.id").value(alertDefine.getId()))
@@ -138,8 +138,8 @@ class AlertDefineControllerTest {
@Test
void deleteAlertDefine() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.delete("/api/alert/define/" + this.alertDefine.getId())
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(this.alertDefine)))
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(this.alertDefine)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
.andReturn();
@@ -148,8 +148,8 @@ class AlertDefineControllerTest {
@Test
void applyAlertDefineMonitorsBind() throws Exception {
mockMvc.perform(MockMvcRequestBuilders.post("/api/alert/define/" + this.alertDefine.getId() + "/monitors")
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(this.alertDefineMonitorBinds)))
.contentType(MediaType.APPLICATION_JSON)
.content(JsonUtil.toJson(this.alertDefineMonitorBinds)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
.andReturn();
@@ -161,7 +161,7 @@ class AlertDefineControllerTest {
.thenReturn(this.alertDefineMonitorBinds);
mockMvc.perform(MockMvcRequestBuilders.get("/api/alert/define/" + this.alertDefine.getId() + "/monitors")
.contentType(MediaType.APPLICATION_JSON))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
.andExpect(jsonPath("$.data[0].id").value(alertDefineMonitorBinds.get(0).getId()))

Some files were not shown because too many files have changed in this diff Show More