Skip to content

Commit 48e2ac0

Browse files
leo-934tomsun28
andauthored
[Improve] migrate to apache(apache#1724)
Signed-off-by: tomsun28 <[email protected]> Co-authored-by: tomsun28 <[email protected]>
1 parent f8190c4 commit 48e2ac0

File tree

548 files changed

+2108
-2804
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

548 files changed

+2108
-2804
lines changed

.asf.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
github:
19+
description: HertzBeat is a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
20+
homepage: https://hertzbeat.apache.org/
21+
labels:
22+
- monitoring
23+
- monitor
24+
- self-hosted
25+
- status
26+
- prometheus
27+
- uptime-monitoring
28+
- status-page
29+
enabled_merge_buttons:
30+
squash: true
31+
merge: false
32+
rebase: false
33+
protected_branches:
34+
master:
35+
required_status_checks:
36+
strict: true
37+
required_pull_request_reviews:
38+
dismiss_stale_reviews: true
39+
required_approving_review_count: 1
40+
notifications:
41+
42+
43+
pullrequests: [email protected]
44+
45+
discussions: [email protected]

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing or otherwise unacceptable behavior may be
58-
reported by contacting the project team at gongchao@apache.org. All
58+
reported by contacting the project team at dev@hertzbeat.apache.org. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate for the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Even small corrections to typos are very welcome :)
3434

3535
1. Requires `maven3+`, `java17` and `lombok` environments
3636
2. (Optional) Modify the configuration file-`manager/src/main/resources/application.yml`
37-
3. Start `springboot manager` service `manager/src/main/java/org/dromara/hertzbeat/manager/Manager.java`
37+
3. Start `springboot manager` service `manager/src/main/java/org/apache/hertzbeat/manager/Manager.java`
3838

3939
- Front-web start
4040

@@ -170,7 +170,7 @@ Add WeChat account `tan-cloud` to pull you into the WeChat group.
170170

171171
1. 需要`maven3+`, `java17``lombok`环境
172172
2. (可选)修改配置文件配置信息-`manager/src/main/resources/application.yml`
173-
3. 启动`springboot manager`服务 `manager/src/main/java/org/dromara/hertzbeat/manager/Manager.java`
173+
3. 启动`springboot manager`服务 `manager/src/main/java/org/apache/hertzbeat/manager/Manager.java`
174174

175175
- 前端启动
176176

alerter/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

alerter/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2121
<parent>
2222
<artifactId>hertzbeat</artifactId>
23-
<groupId>org.dromara.hertzbeat</groupId>
23+
<groupId>org.apache.hertzbeat</groupId>
2424
<version>2.0-SNAPSHOT</version>
2525
</parent>
2626
<modelVersion>4.0.0</modelVersion>
@@ -34,7 +34,7 @@
3434
<dependencies>
3535
<!-- common -->
3636
<dependency>
37-
<groupId>org.dromara.hertzbeat</groupId>
37+
<groupId>org.apache.hertzbeat</groupId>
3838
<artifactId>hertzbeat-common</artifactId>
3939
<scope>provided</scope>
4040
</dependency>

alerter/src/main/java/org/dromara/hertzbeat/alert/AlerterProperties.java renamed to alerter/src/main/java/org/apache/hertzbeat/alert/AlerterProperties.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.dromara.hertzbeat.alert;
18+
package org.apache.hertzbeat.alert;
1919

2020
import lombok.Getter;
2121
import lombok.Setter;
@@ -24,7 +24,6 @@
2424

2525
/**
2626
* alerter prop config
27-
*
2827
*/
2928
@Component
3029
@ConfigurationProperties(prefix = "alerter")

alerter/src/main/java/org/dromara/hertzbeat/alert/AlerterWorkerPool.java renamed to alerter/src/main/java/org/apache/hertzbeat/alert/AlerterWorkerPool.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.dromara.hertzbeat.alert;
18+
package org.apache.hertzbeat.alert;
1919

2020
import com.google.common.util.concurrent.ThreadFactoryBuilder;
2121
import lombok.extern.slf4j.Slf4j;
@@ -29,7 +29,6 @@
2929

3030
/**
3131
* alarm module thread pool
32-
*
3332
*/
3433
@Component
3534
@Slf4j

alerter/src/main/java/org/dromara/hertzbeat/alert/calculate/CalculateAlarm.java renamed to alerter/src/main/java/org/apache/hertzbeat/alert/calculate/CalculateAlarm.java

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.dromara.hertzbeat.alert.calculate;
18+
package org.apache.hertzbeat.alert.calculate;
1919

2020
import com.googlecode.aviator.AviatorEvaluator;
2121
import com.googlecode.aviator.Expression;
@@ -24,23 +24,23 @@
2424
import com.googlecode.aviator.exception.ExpressionSyntaxErrorException;
2525
import lombok.extern.slf4j.Slf4j;
2626
import org.apache.commons.lang3.StringUtils;
27-
import org.dromara.hertzbeat.alert.AlerterWorkerPool;
28-
import org.dromara.hertzbeat.alert.dao.AlertMonitorDao;
29-
import org.dromara.hertzbeat.alert.reduce.AlarmCommonReduce;
30-
import org.dromara.hertzbeat.alert.service.AlertDefineService;
31-
import org.dromara.hertzbeat.alert.service.AlertService;
32-
import org.dromara.hertzbeat.alert.util.AlertTemplateUtil;
33-
import org.dromara.hertzbeat.common.constants.CommonConstants;
34-
import org.dromara.hertzbeat.common.entity.alerter.Alert;
35-
import org.dromara.hertzbeat.common.entity.alerter.AlertDefine;
36-
import org.dromara.hertzbeat.common.entity.manager.Monitor;
37-
import org.dromara.hertzbeat.common.entity.manager.TagItem;
38-
import org.dromara.hertzbeat.common.entity.message.CollectRep;
39-
import org.dromara.hertzbeat.common.queue.CommonDataQueue;
40-
import org.dromara.hertzbeat.common.support.event.MonitorDeletedEvent;
41-
import org.dromara.hertzbeat.common.support.event.SystemConfigChangeEvent;
42-
import org.dromara.hertzbeat.common.util.CommonUtil;
43-
import org.dromara.hertzbeat.common.util.ResourceBundleUtil;
27+
import org.apache.hertzbeat.alert.AlerterWorkerPool;
28+
import org.apache.hertzbeat.alert.service.AlertDefineService;
29+
import org.apache.hertzbeat.alert.dao.AlertMonitorDao;
30+
import org.apache.hertzbeat.alert.reduce.AlarmCommonReduce;
31+
import org.apache.hertzbeat.alert.service.AlertService;
32+
import org.apache.hertzbeat.alert.util.AlertTemplateUtil;
33+
import org.apache.hertzbeat.common.constants.CommonConstants;
34+
import org.apache.hertzbeat.common.entity.alerter.Alert;
35+
import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
36+
import org.apache.hertzbeat.common.entity.manager.Monitor;
37+
import org.apache.hertzbeat.common.entity.manager.TagItem;
38+
import org.apache.hertzbeat.common.entity.message.CollectRep;
39+
import org.apache.hertzbeat.common.queue.CommonDataQueue;
40+
import org.apache.hertzbeat.common.support.event.MonitorDeletedEvent;
41+
import org.apache.hertzbeat.common.support.event.SystemConfigChangeEvent;
42+
import org.apache.hertzbeat.common.util.CommonUtil;
43+
import org.apache.hertzbeat.common.util.ResourceBundleUtil;
4444
import org.springframework.context.event.EventListener;
4545
import org.springframework.data.jpa.domain.Specification;
4646
import org.springframework.stereotype.Component;
@@ -51,11 +51,10 @@
5151
import java.util.concurrent.ConcurrentHashMap;
5252
import java.util.stream.Collectors;
5353

54-
import static org.dromara.hertzbeat.common.constants.CommonConstants.*;
54+
import static org.apache.hertzbeat.common.constants.CommonConstants.*;
5555

5656
/**
5757
* Calculate alarms based on the alarm definition rules and collected data
58-
*
5958
*/
6059
@Component
6160
@Slf4j
@@ -283,8 +282,8 @@ private void afterThresholdRuleMatch(long currentTimeMilli, long monitorId, Stri
283282
fieldValueMap.put(TAG_METRICS, metrics);
284283
fieldValueMap.put(TAG_METRIC, define.getField());
285284
Map<String, String> tags = new HashMap<>(8);
286-
tags.put(CommonConstants.TAG_MONITOR_ID, String.valueOf(monitorId));
287-
tags.put(CommonConstants.TAG_MONITOR_APP, app);
285+
tags.put(TAG_MONITOR_ID, String.valueOf(monitorId));
286+
tags.put(TAG_MONITOR_APP, app);
288287
tags.put(CommonConstants.TAG_THRESHOLD_ID, String.valueOf(define.getId()));
289288
if (!CollectionUtils.isEmpty(define.getTags())) {
290289
for (TagItem tagItem : define.getTags()) {
@@ -351,8 +350,8 @@ private void handlerAvailableMetrics(long monitorId, String app, CollectRep.Metr
351350
if (metricsData.getCode() != CollectRep.Code.SUCCESS) {
352351
Alert preAlert = triggeredAlertMap.get(String.valueOf(monitorId));
353352
Map<String, String> tags = new HashMap<>(6);
354-
tags.put(CommonConstants.TAG_MONITOR_ID, String.valueOf(monitorId));
355-
tags.put(CommonConstants.TAG_MONITOR_APP, app);
353+
tags.put(TAG_MONITOR_ID, String.valueOf(monitorId));
354+
tags.put(TAG_MONITOR_APP, app);
356355
tags.put(CommonConstants.TAG_THRESHOLD_ID, String.valueOf(avaAlertDefine.getId()));
357356
tags.put(TAG_METRICS, CommonConstants.AVAILABILITY);
358357
tags.put(TAG_CODE, metricsData.getCode().name());

alerter/src/main/java/org/dromara/hertzbeat/alert/config/AlerterAutoConfiguration.java renamed to alerter/src/main/java/org/apache/hertzbeat/alert/config/AlerterAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.dromara.hertzbeat.alert.config;
18+
package org.apache.hertzbeat.alert.config;
1919

2020
import org.springframework.context.annotation.ComponentScan;
2121

2222
/**
2323
* Alert auto configuration.
2424
* @version 2.1
2525
*/
26-
@ComponentScan(basePackages = "org.dromara.hertzbeat.alert")
26+
@ComponentScan(basePackages = "org.apache.hertzbeat.alert")
2727
public class AlerterAutoConfiguration {
2828
}

alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertConvergeController.java renamed to alerter/src/main/java/org/apache/hertzbeat/alert/controller/AlertConvergeController.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,25 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.dromara.hertzbeat.alert.controller;
18+
package org.apache.hertzbeat.alert.controller;
1919

2020
import io.swagger.v3.oas.annotations.Operation;
2121
import io.swagger.v3.oas.annotations.Parameter;
2222
import io.swagger.v3.oas.annotations.tags.Tag;
23-
import org.dromara.hertzbeat.alert.service.AlertConvergeService;
24-
import org.dromara.hertzbeat.common.entity.alerter.AlertConverge;
25-
import org.dromara.hertzbeat.common.entity.dto.Message;
23+
import org.apache.hertzbeat.alert.service.AlertConvergeService;
24+
import org.apache.hertzbeat.common.entity.alerter.AlertConverge;
25+
import org.apache.hertzbeat.common.entity.dto.Message;
2626
import org.springframework.beans.factory.annotation.Autowired;
2727
import org.springframework.http.ResponseEntity;
2828
import org.springframework.web.bind.annotation.*;
2929

3030
import jakarta.validation.Valid;
3131

32-
import static org.dromara.hertzbeat.common.constants.CommonConstants.MONITOR_NOT_EXIST_CODE;
32+
import static org.apache.hertzbeat.common.constants.CommonConstants.MONITOR_NOT_EXIST_CODE;
3333
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
3434

3535
/**
3636
* Alarm Converge management API
37-
*
3837
*/
3938
@Tag(name = "Alert Converge API | 告警收敛管理API")
4039
@RestController

alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertConvergesController.java renamed to alerter/src/main/java/org/apache/hertzbeat/alert/controller/AlertConvergesController.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.dromara.hertzbeat.alert.controller;
18+
package org.apache.hertzbeat.alert.controller;
1919

2020
import io.swagger.v3.oas.annotations.Operation;
2121
import io.swagger.v3.oas.annotations.Parameter;
2222
import io.swagger.v3.oas.annotations.tags.Tag;
23-
import org.dromara.hertzbeat.alert.service.AlertConvergeService;
24-
import org.dromara.hertzbeat.common.entity.alerter.AlertConverge;
25-
import org.dromara.hertzbeat.common.entity.dto.Message;
23+
import org.apache.hertzbeat.alert.service.AlertConvergeService;
24+
import org.apache.hertzbeat.common.entity.alerter.AlertConverge;
25+
import org.apache.hertzbeat.common.entity.dto.Message;
2626
import org.springframework.beans.factory.annotation.Autowired;
2727
import org.springframework.data.domain.Page;
2828
import org.springframework.data.domain.PageRequest;
@@ -42,7 +42,6 @@
4242

4343
/**
4444
* Converge the batch API for alarms
45-
*
4645
*/
4746
@Tag(name = "Alert Converge Batch API | 告警收敛管理API")
4847
@RestController

alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertDefineController.java renamed to alerter/src/main/java/org/apache/hertzbeat/alert/controller/AlertDefineController.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.dromara.hertzbeat.alert.controller;
18+
package org.apache.hertzbeat.alert.controller;
1919

20-
import org.dromara.hertzbeat.common.entity.alerter.AlertDefine;
21-
import org.dromara.hertzbeat.common.entity.alerter.AlertDefineMonitorBind;
22-
import org.dromara.hertzbeat.alert.service.AlertDefineService;
23-
import org.dromara.hertzbeat.common.entity.dto.Message;
20+
import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
21+
import org.apache.hertzbeat.common.entity.alerter.AlertDefineMonitorBind;
22+
import org.apache.hertzbeat.alert.service.AlertDefineService;
23+
import org.apache.hertzbeat.common.entity.dto.Message;
2424
import io.swagger.v3.oas.annotations.Operation;
2525
import io.swagger.v3.oas.annotations.Parameter;
2626
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -40,12 +40,11 @@
4040
import java.util.List;
4141
import java.util.stream.Collectors;
4242

43-
import static org.dromara.hertzbeat.common.constants.CommonConstants.MONITOR_NOT_EXIST_CODE;
43+
import static org.apache.hertzbeat.common.constants.CommonConstants.MONITOR_NOT_EXIST_CODE;
4444
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
4545

4646
/**
4747
* Alarm definition management API
48-
*
4948
*/
5049
@Tag(name = "Alert Define API | 告警定义管理API")
5150
@RestController

alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertDefinesController.java renamed to alerter/src/main/java/org/apache/hertzbeat/alert/controller/AlertDefinesController.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.dromara.hertzbeat.alert.controller;
18+
package org.apache.hertzbeat.alert.controller;
1919

20-
import org.dromara.hertzbeat.common.entity.alerter.AlertDefine;
21-
import org.dromara.hertzbeat.alert.service.AlertDefineService;
22-
import org.dromara.hertzbeat.common.entity.dto.Message;
20+
import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
21+
import org.apache.hertzbeat.alert.service.AlertDefineService;
22+
import org.apache.hertzbeat.common.entity.dto.Message;
2323
import io.swagger.v3.oas.annotations.Operation;
2424
import io.swagger.v3.oas.annotations.Parameter;
2525
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -44,7 +44,6 @@
4444

4545
/**
4646
* Define the batch API for alarms
47-
*
4847
*/
4948
@Tag(name = "Alert Define Batch API | 告警定义管理API")
5049
@RestController

alerter/src/main/java/org/dromara/hertzbeat/alert/controller/AlertReportController.java renamed to alerter/src/main/java/org/apache/hertzbeat/alert/controller/AlertReportController.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
* limitations under the License.
1616
*/
1717

18-
package org.dromara.hertzbeat.alert.controller;
18+
package org.apache.hertzbeat.alert.controller;
1919

2020
import io.swagger.v3.oas.annotations.Operation;
2121
import io.swagger.v3.oas.annotations.tags.Tag;
2222
import lombok.extern.slf4j.Slf4j;
23-
import org.dromara.hertzbeat.alert.dto.CloudAlertReportAbstract;
24-
import org.dromara.hertzbeat.alert.dto.GeneralCloudAlertReport;
25-
import org.dromara.hertzbeat.alert.enums.CloudServiceAlarmInformationEnum;
26-
import org.dromara.hertzbeat.alert.service.AlertService;
27-
import org.dromara.hertzbeat.common.entity.dto.AlertReport;
28-
import org.dromara.hertzbeat.common.entity.dto.Message;
29-
import org.dromara.hertzbeat.common.util.JsonUtil;
23+
import org.apache.hertzbeat.alert.dto.CloudAlertReportAbstract;
24+
import org.apache.hertzbeat.alert.dto.GeneralCloudAlertReport;
25+
import org.apache.hertzbeat.alert.enums.CloudServiceAlarmInformationEnum;
26+
import org.apache.hertzbeat.alert.service.AlertService;
27+
import org.apache.hertzbeat.common.entity.dto.AlertReport;
28+
import org.apache.hertzbeat.common.entity.dto.Message;
29+
import org.apache.hertzbeat.common.util.JsonUtil;
3030
import org.springframework.beans.factory.annotation.Autowired;
3131
import org.springframework.http.ResponseEntity;
3232
import org.springframework.web.bind.annotation.*;
@@ -38,7 +38,6 @@
3838

3939
/**
4040
* Extern Alarm Manage API
41-
*
4241
*/
4342
@Tag(name = "Extern Alarm Manage API | 第三方告警管理API")
4443
@RestController

0 commit comments

Comments
 (0)