Skip to content

Commit

Permalink
[alarm] refactor new alarm (#2902)
Browse files Browse the repository at this point in the history
Signed-off-by: tomsun28 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Calvin <[email protected]>
Co-authored-by: a-little-fool <[email protected]>
Co-authored-by: Logic <[email protected]>
  • Loading branch information
5 people authored Jan 4, 2025
1 parent 69a21ff commit 4cd3c3c
Show file tree
Hide file tree
Showing 287 changed files with 9,528 additions and 9,045 deletions.
10 changes: 5 additions & 5 deletions e2e/testsuite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,23 +302,23 @@ items:
Authorization: Bearer {{.login.data.token}}
- name: deleteAlertDefine
request:
api: /api/alert/defines?ids={{(index .listAlertDefines.data.content 0).id | int64}}
api: /api/alert/defines?ids=1
method: DELETE
header:
Authorization: Bearer {{.login.data.token}}
- name: listAlertConverges
- name: listAlertGroupConverges
request:
api: /api/alert/converges
api: /api/alert/groups
header:
Authorization: Bearer {{.login.data.token}}
- name: listAlertSilences
request:
api: /api/alert/silences
header:
Authorization: Bearer {{.login.data.token}}
- name: listAlerts
- name: listGroupAlerts
request:
api: /api/alerts
api: /api/alerts/group
header:
Authorization: Bearer {{.login.data.token}}
- name: listReceivers
Expand Down
52 changes: 51 additions & 1 deletion hertzbeat-alerter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@
<!-- common -->
<dependency>
<groupId>org.apache.hertzbeat</groupId>
<artifactId>hertzbeat-common</artifactId>
<artifactId>hertzbeat-base</artifactId>
<scope>provided</scope>
</dependency>
<!-- plugin -->
<dependency>
<groupId>org.apache.hertzbeat</groupId>
<artifactId>hertzbeat-plugin</artifactId>
</dependency>
<!-- spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -50,6 +55,21 @@
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!-- email -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<!-- freemarker -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>${nekohtml.version}</version>
</dependency>
<!-- kafka -->
<dependency>
<groupId>org.apache.kafka</groupId>
Expand All @@ -73,6 +93,36 @@
<version>${easy-poi.version}</version>
<scope>compile</scope>
</dependency>
<!-- sms -->
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java-sms</artifactId>
<exclusions>
<exclusion>
<groupId>com.squareup.okhttp</groupId>
<artifactId>logging-interceptor</artifactId>
</exclusion>
<exclusion>
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp</artifactId>
</exclusion>
<exclusion>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.huaweicloud.sdk</groupId>
<artifactId>huaweicloud-sdk-smn</artifactId>
<version>${huawei.sdk.version}</version>
<exclusions>
<exclusion>
<groupId>org.openeuler</groupId>
<artifactId>bgmprovider</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-vector</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public AlerterWorkerPool() {
private void initWorkExecutor() {
ThreadFactory threadFactory = new ThreadFactoryBuilder()
.setUncaughtExceptionHandler((thread, throwable) -> {
log.error("workerExecutor has uncaughtException.");
log.error("Alerter workerExecutor has uncaughtException.");
log.error(throwable.getMessage(), throwable);
})
.setDaemon(true)
Expand All @@ -62,7 +62,7 @@ private void initWorkExecutor() {
private void initNotifyExecutor() {
ThreadFactory threadFactory = new ThreadFactoryBuilder()
.setUncaughtExceptionHandler((thread, throwable) -> {
log.error("notifyExecutor has uncaughtException.");
log.error("Alerter notifyExecutor has uncaughtException.");
log.error(throwable.getMessage(), throwable);
})
.setDaemon(true)
Expand Down
Loading

0 comments on commit 4cd3c3c

Please sign in to comment.