Compare commits

..
Author SHA1 Message Date
tomsun28 c33aa86ba2 [webapp] update ui
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2025-07-06 15:26:03 +08:00
tomsun28 b6bca5a10d [improve] make jackson serialize field all visibility
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2025-07-06 15:08:21 +08:00
86 changed files with 1789 additions and 1346 deletions
+2 -2
View File
@@ -37,7 +37,7 @@
-`Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 兼容 `Prometheus` 的系统生态并且更多,只需页面操作就可以监控 `Prometheus` 所能监控的。
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 提供强大的状态页构建能力,轻松向用户传达您产品服务的实时状态。
@@ -126,7 +126,7 @@
- `-e IDENTITY=custom-collector-name` : 配置此采集器的唯一性标识符名称,多个采集器名称不能相同,建议自定义英文名称。
- `-e MODE=public` : 配置运行模式(public or private), 公共集群模式或私有云边模式。
- `-e MANAGER_HOST=127.0.0.1` : 配置连接主 HertzBeat 服务的对外 IP。
- `-e MANAGER_HOST=127.0.0.1` : 配置连接主 HertaBeat 服务的对外 IP。
- `-e MANAGER_PORT=1158` : 配置连接主 HertzBeat 服务的对外端口,默认1158。
@@ -17,9 +17,6 @@
package org.apache.hertzbeat.alert.calculate;
import com.google.common.collect.Table;
import com.google.common.collect.Tables;
import org.apache.commons.lang3.StringUtils;
import org.apache.hertzbeat.alert.dao.SingleAlertDao;
import org.apache.hertzbeat.alert.util.AlertUtil;
import org.apache.hertzbeat.common.constants.CommonConstants;
@@ -27,6 +24,7 @@ import org.apache.hertzbeat.common.entity.alerter.SingleAlert;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
@@ -35,78 +33,49 @@ import java.util.concurrent.ConcurrentHashMap;
@Component
public class AlarmCacheManager {
private static final String CUSTOM_FIRING_ROW_KEY = "CUSTOM_FIRING_";
/**
* The alarm in the process is triggered
* rowKey - define id
* columnKey - labels fingerprint
* key - labels fingerprint
*/
private final Table<String, String, SingleAlert> pendingAlertMap;
private final Map<String, SingleAlert> pendingAlertMap;
/**
* The not recover alert
* rowKey - define id
* columnKey - labels fingerprint
* key - labels fingerprint
*/
private final Table<String, String, SingleAlert> firingAlertMap;
private final Map<String, SingleAlert> firingAlertMap;
public AlarmCacheManager(SingleAlertDao singleAlertDao) {
this.pendingAlertMap = Tables.newCustomTable(new ConcurrentHashMap<>(8), ConcurrentHashMap::new);
this.firingAlertMap = Tables.newCustomTable(new ConcurrentHashMap<>(8), ConcurrentHashMap::new);
this.pendingAlertMap = new ConcurrentHashMap<>(8);
this.firingAlertMap = new ConcurrentHashMap<>(8);
List<SingleAlert> singleAlerts = singleAlertDao.querySingleAlertsByStatus(CommonConstants.ALERT_STATUS_FIRING);
for (SingleAlert singleAlert : singleAlerts) {
String fingerprint = AlertUtil.calculateFingerprint(singleAlert.getLabels());
String defineId = singleAlert.getLabels().get(CommonConstants.LABEL_DEFINE_ID);
if (StringUtils.isBlank(defineId)) {
defineId = getCustomKey(fingerprint);
}
singleAlert.setId(null);
this.firingAlertMap.put(defineId, fingerprint, singleAlert);
this.firingAlertMap.put(fingerprint, singleAlert);
}
}
public void putPending(Long defineId, String fingerPrint, SingleAlert alert) {
this.pendingAlertMap.put(String.valueOf(defineId), fingerPrint, alert);
public void putPending(String fingerPrint, SingleAlert alert) {
this.pendingAlertMap.put(fingerPrint, alert);
}
public SingleAlert getPending(Long defineId, String fingerPrint) {
return this.pendingAlertMap.get(String.valueOf(defineId), fingerPrint);
public SingleAlert getPending(String fingerPrint) {
return this.pendingAlertMap.get(fingerPrint);
}
public void removePending(Long defineId, String fingerPrint) {
this.pendingAlertMap.remove(String.valueOf(defineId), fingerPrint);
}
public void putFiring(Long defineId, String fingerPrint, SingleAlert alert) {
this.firingAlertMap.put(String.valueOf(defineId), fingerPrint, alert);
public SingleAlert removePending(String fingerPrint) {
return this.pendingAlertMap.remove(fingerPrint);
}
public void putFiring(String fingerPrint, SingleAlert alert) {
this.firingAlertMap.put(getCustomKey(fingerPrint), fingerPrint, alert);
}
public SingleAlert getFiring(Long defineId, String fingerPrint) {
SingleAlert singleAlert = this.firingAlertMap.get(String.valueOf(defineId), fingerPrint);
if (null != singleAlert) {
return singleAlert;
}
return getFiring(fingerPrint);
}
public SingleAlert removeFiring(Long defineId, String fingerPrint) {
SingleAlert singleAlert = this.firingAlertMap.remove(String.valueOf(defineId), fingerPrint);
if (null == singleAlert) {
return this.firingAlertMap.remove(getCustomKey(fingerPrint), fingerPrint);
}
return singleAlert;
this.firingAlertMap.put(fingerPrint, alert);
}
public SingleAlert getFiring(String fingerPrint) {
return this.firingAlertMap.get(getCustomKey(fingerPrint), fingerPrint);
return this.firingAlertMap.get(fingerPrint);
}
private String getCustomKey(String fingerPrint) {
return CUSTOM_FIRING_ROW_KEY + fingerPrint;
public SingleAlert removeFiring(String fingerPrint) {
return this.firingAlertMap.remove(fingerPrint);
}
}
@@ -17,9 +17,8 @@
package org.apache.hertzbeat.alert.calculate;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.hertzbeat.alert.reduce.AlarmCommonReduce;
import org.apache.hertzbeat.alert.service.DataSourceService;
import org.apache.hertzbeat.alert.util.AlertTemplateUtil;
@@ -27,11 +26,11 @@ import org.apache.hertzbeat.alert.util.AlertUtil;
import org.apache.hertzbeat.common.constants.CommonConstants;
import org.apache.hertzbeat.common.entity.alerter.AlertDefine;
import org.apache.hertzbeat.common.entity.alerter.SingleAlert;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Component;
/**
* Periodic Alert Calculator
@@ -55,9 +54,9 @@ public class PeriodicAlertCalculator {
this.alarmCacheManager = alarmCacheManager;
}
public void calculate(AlertDefine define) {
if (!define.isEnable() || StringUtils.isEmpty(define.getExpr())) {
log.error("Periodic define {} is disabled or expression is empty", define.getName());
public void calculate(AlertDefine rule) {
if (!rule.isEnable() || StringUtils.isEmpty(rule.getExpr())) {
log.error("Periodic rule {} is disabled or expression is empty", rule.getName());
return;
}
long currentTimeMilli = System.currentTimeMillis();
@@ -67,8 +66,8 @@ public class PeriodicAlertCalculator {
// the return result should be matched with threshold
try {
List<Map<String, Object>> results = dataSourceService.calculate(
define.getDatasource(),
define.getExpr()
rule.getDatasource(),
rule.getExpr()
);
// if no match the expr threshold, the results item map {'value': null} should be null and others field keep
// if results has multi list, should trigger multi alert
@@ -78,9 +77,8 @@ public class PeriodicAlertCalculator {
for (Map<String, Object> result : results) {
Map<String, String> fingerPrints = new HashMap<>(8);
// here use the alert name as finger, not care the alert name may be changed
fingerPrints.put(CommonConstants.LABEL_DEFINE_ID, String.valueOf(define.getId()));
fingerPrints.put(CommonConstants.LABEL_ALERT_NAME, define.getName());
fingerPrints.putAll(define.getLabels());
fingerPrints.put(CommonConstants.LABEL_ALERT_NAME, rule.getName());
fingerPrints.putAll(rule.getLabels());
for (Map.Entry<String, Object> entry : result.entrySet()) {
if (entry.getValue() != null && !VALUE.equals(entry.getKey())
&& !TIMESTAMP.equals(entry.getKey())) {
@@ -89,33 +87,32 @@ public class PeriodicAlertCalculator {
}
if (result.get(VALUE) == null) {
// recovery the alert
handleRecoveredAlert(define.getId(), fingerPrints);
handleRecoveredAlert(fingerPrints);
continue;
}
Map<String, Object> fieldValueMap = new HashMap<>(8);
fieldValueMap.putAll(define.getLabels());
fieldValueMap.put(CommonConstants.LABEL_ALERT_NAME, define.getName());
fieldValueMap.putAll(rule.getLabels());
fieldValueMap.put(CommonConstants.LABEL_ALERT_NAME, rule.getName());
for (Map.Entry<String, Object> entry : result.entrySet()) {
if (entry.getValue() != null) {
fieldValueMap.put(entry.getKey(), entry.getValue());
}
}
afterThresholdRuleMatch(currentTimeMilli, fingerPrints, fieldValueMap, define);
afterThresholdRuleMatch(currentTimeMilli, fingerPrints, fieldValueMap, rule);
}
} catch (Exception ignored) {
// ignore the query exception eg: no result, timeout, etc
return;
}
} catch (Exception e) {
log.error("Calculate periodic define {} failed: {}", define.getName(), e.getMessage());
log.error("Calculate periodic rule {} failed: {}", rule.getName(), e.getMessage());
}
}
private void afterThresholdRuleMatch(long currentTimeMilli, Map<String, String> fingerPrints,
Map<String, Object> fieldValueMap, AlertDefine define) {
Long defineId = define.getId();
String fingerprint = AlertUtil.calculateFingerprint(fingerPrints);
SingleAlert existingAlert = alarmCacheManager.getPending(defineId, fingerprint);
SingleAlert existingAlert = alarmCacheManager.getPending(fingerprint);
Map<String, String> labels = new HashMap<>(8);
fieldValueMap.putAll(define.getLabels());
labels.putAll(fingerPrints);
@@ -136,11 +133,11 @@ public class PeriodicAlertCalculator {
// If required trigger times is 1, set to firing status directly
if (requiredTimes <= 1) {
newAlert.setStatus(CommonConstants.ALERT_STATUS_FIRING);
alarmCacheManager.putFiring(defineId, fingerprint, newAlert);
alarmCacheManager.putFiring(fingerprint, newAlert);
alarmCommonReduce.reduceAndSendAlarm(newAlert.clone());
} else {
// Otherwise put into pending queue first
alarmCacheManager.putPending(defineId, fingerprint, newAlert);
alarmCacheManager.putPending(fingerprint, newAlert);
}
} else {
// Update existing alert
@@ -150,17 +147,17 @@ public class PeriodicAlertCalculator {
// Check if required trigger times reached
if (existingAlert.getStatus().equals(CommonConstants.ALERT_STATUS_PENDING) && existingAlert.getTriggerTimes() >= requiredTimes) {
// Reached trigger times threshold, change to firing status
alarmCacheManager.removePending(defineId, fingerprint);
alarmCacheManager.removePending(fingerprint);
existingAlert.setStatus(CommonConstants.ALERT_STATUS_FIRING);
alarmCacheManager.putFiring(defineId, fingerprint, existingAlert);
alarmCacheManager.putFiring(fingerprint, existingAlert);
alarmCommonReduce.reduceAndSendAlarm(existingAlert.clone());
}
}
}
private void handleRecoveredAlert(Long defineId, Map<String, String> fingerprints) {
private void handleRecoveredAlert(Map<String, String> fingerprints) {
String fingerprint = AlertUtil.calculateFingerprint(fingerprints);
SingleAlert firingAlert = alarmCacheManager.removeFiring(defineId, fingerprint);
SingleAlert firingAlert = alarmCacheManager.removeFiring(fingerprint);
if (firingAlert != null) {
// todo consider multi times to tig for resolved alert
firingAlert.setTriggerTimes(1);
@@ -168,7 +165,7 @@ public class PeriodicAlertCalculator {
firingAlert.setStatus(CommonConstants.ALERT_STATUS_RESOLVED);
alarmCommonReduce.reduceAndSendAlarm(firingAlert.clone());
}
alarmCacheManager.removePending(defineId, fingerprint);
alarmCacheManager.removePending(fingerprint);
}
}
@@ -183,11 +183,9 @@ public class RealTimeAlertCalculator {
if (StringUtils.isBlank(expr)) {
continue;
}
Long defineId = define.getId();
Map<String, String> commonFingerPrints = new HashMap<>(8);
commonFingerPrints.put(CommonConstants.LABEL_INSTANCE, instance);
// here use the alert name as finger, not care the alert name may be changed
commonFingerPrints.put(CommonConstants.LABEL_DEFINE_ID, String.valueOf(define.getId()));
commonFingerPrints.put(CommonConstants.LABEL_ALERT_NAME, define.getName());
commonFingerPrints.put(CommonConstants.LABEL_INSTANCE_NAME, instanceName);
commonFingerPrints.put(CommonConstants.LABEL_INSTANCE_HOST, instanceHost);
@@ -202,9 +200,9 @@ public class RealTimeAlertCalculator {
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(defineId, currentTimeMilli, commonFingerPrints, fieldValueMap, define, annotations);
afterThresholdRuleMatch(currentTimeMilli, commonFingerPrints, fieldValueMap, define, annotations);
} else {
handleRecoveredAlert(defineId, commonFingerPrints);
handleRecoveredAlert(commonFingerPrints);
}
// if this threshold pre compile success, ignore blew
continue;
@@ -256,9 +254,9 @@ public class RealTimeAlertCalculator {
boolean match = execAlertExpression(fieldValueMap, expr, false);
try {
if (match) {
afterThresholdRuleMatch(defineId, currentTimeMilli, fingerPrints, fieldValueMap, define, annotations);
afterThresholdRuleMatch(currentTimeMilli, fingerPrints, fieldValueMap, define, annotations);
} else {
handleRecoveredAlert(defineId, fingerPrints);
handleRecoveredAlert(fingerPrints);
}
} catch (Exception e) {
log.error(e.getMessage(), e);
@@ -336,9 +334,9 @@ public class RealTimeAlertCalculator {
.collect(Collectors.toList());
}
private void handleRecoveredAlert(Long defineId, Map<String, String> fingerprints) {
private void handleRecoveredAlert(Map<String, String> fingerprints) {
String fingerprint = AlertUtil.calculateFingerprint(fingerprints);
SingleAlert firingAlert = alarmCacheManager.removeFiring(defineId, fingerprint);
SingleAlert firingAlert = alarmCacheManager.removeFiring(fingerprint);
if (firingAlert != null) {
// todo consider multi times to tig for resolved alert
firingAlert.setTriggerTimes(1);
@@ -346,14 +344,13 @@ public class RealTimeAlertCalculator {
firingAlert.setStatus(CommonConstants.ALERT_STATUS_RESOLVED);
alarmCommonReduce.reduceAndSendAlarm(firingAlert.clone());
}
alarmCacheManager.removePending(defineId, fingerprint);
alarmCacheManager.removePending(fingerprint);
}
private void afterThresholdRuleMatch(long defineId, long currentTimeMilli, Map<String, String> fingerPrints,
Map<String, Object> fieldValueMap, AlertDefine define,
Map<String, String> annotations) {
private void afterThresholdRuleMatch(long currentTimeMilli, Map<String, String> fingerPrints,
Map<String, Object> fieldValueMap, AlertDefine define, Map<String, String> annotations) {
String fingerprint = AlertUtil.calculateFingerprint(fingerPrints);
SingleAlert existingAlert = alarmCacheManager.getPending(defineId, fingerprint);
SingleAlert existingAlert = alarmCacheManager.getPending(fingerprint);
fieldValueMap.putAll(define.getLabels());
int requiredTimes = define.getTimes() == null ? 1 : define.getTimes();
if (existingAlert == null) {
@@ -385,11 +382,11 @@ public class RealTimeAlertCalculator {
// If required trigger times is 1, set to firing status directly
if (requiredTimes <= 1) {
newAlert.setStatus(CommonConstants.ALERT_STATUS_FIRING);
alarmCacheManager.putFiring(defineId, fingerprint, newAlert);
alarmCacheManager.putFiring(fingerprint, newAlert);
alarmCommonReduce.reduceAndSendAlarm(newAlert.clone());
} else {
// Otherwise put into pending queue first
alarmCacheManager.putPending(define.getId(), fingerprint, newAlert);
alarmCacheManager.putPending(fingerprint, newAlert);
}
} else {
// Update existing alert
@@ -399,9 +396,9 @@ public class RealTimeAlertCalculator {
// Check if required trigger times reached
if (existingAlert.getStatus().equals(CommonConstants.ALERT_STATUS_PENDING) && existingAlert.getTriggerTimes() >= requiredTimes) {
// Reached trigger times threshold, change to firing status
alarmCacheManager.removePending(defineId, fingerprint);
alarmCacheManager.removePending(fingerprint);
existingAlert.setStatus(CommonConstants.ALERT_STATUS_FIRING);
alarmCacheManager.putFiring(defineId, fingerprint, existingAlert);
alarmCacheManager.putFiring(fingerprint, existingAlert);
alarmCommonReduce.reduceAndSendAlarm(existingAlert.clone());
}
}
@@ -28,9 +28,6 @@ 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.util.LogUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.util.CollectionUtils;
@@ -44,15 +41,12 @@ public abstract class AlertDefineAbstractImExportServiceImpl implements AlertDef
@Lazy
private AlertDefineService alertDefineService;
private static final Logger logger = LoggerFactory.getLogger(AlertDefineAbstractImExportServiceImpl.class);
@Override
public void importConfig(InputStream is) {
var formList = parseImport(is)
.stream()
.map(this::convert)
.toList();
LogUtil.info(logger, "Importing alert defines from {0}", formList);
if (!CollectionUtils.isEmpty(formList)) {
formList.forEach(alertDefine -> {
alertDefineService.validate(alertDefine, false);
@@ -27,14 +27,11 @@ import org.apache.hertzbeat.common.entity.alerter.NoticeReceiver;
import org.apache.hertzbeat.common.entity.alerter.NoticeTemplate;
import org.apache.hertzbeat.common.support.exception.SendMessageException;
import org.apache.hertzbeat.common.util.JsonUtil;
import org.apache.hertzbeat.common.util.LogUtil;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
@@ -65,7 +62,6 @@ public class AlibabaSmsClientImpl implements SmsClient {
private final String accessKeySecret;
private final String signName;
private final String templateCode;
private static final Logger logger = LoggerFactory.getLogger(AlibabaSmsClientImpl.class);
public AlibabaSmsClientImpl(AlibabaSmsProperties config) {
if (config != null) {
@@ -177,7 +173,7 @@ public class AlibabaSmsClientImpl implements SmsClient {
log.info("Successfully sent SMS to phone: {}", phoneNumber);
}
} catch (Exception e) {
LogUtil.warn(logger, "Failed to send SMS: {0}", e.getMessage());
log.warn("Failed to send SMS: {}", e.getMessage());
throw new SendMessageException(e.getMessage());
}
}
@@ -196,7 +192,6 @@ public class AlibabaSmsClientImpl implements SmsClient {
// Step 4: Build authorization header
return ALGORITHM + " Credential=" + accessKeyId + ",SignedHeaders=host;x-acs-action;x-acs-content-sha256;x-acs-date;" + "x-acs-signature-nonce;x-acs-version,Signature=" + signature;
} catch (Exception e) {
LogUtil.warn(logger, "Failed to calculate authorization {0}", e.getMessage());
throw new RuntimeException("Failed to calculate authorization", e);
}
}
@@ -1,135 +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.alert.calculate;
import org.apache.hertzbeat.alert.dao.SingleAlertDao;
import org.apache.hertzbeat.alert.util.AlertUtil;
import org.apache.hertzbeat.common.constants.CommonConstants;
import org.apache.hertzbeat.common.entity.alerter.SingleAlert;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.mockito.Mockito.when;
/**
* alert cache manager test
*/
@ExtendWith(MockitoExtension.class)
public class AlarmCacheManagerTest {
@Mock
private SingleAlertDao singleAlertDao;
private AlarmCacheManager alarmCacheManager;
@BeforeEach
public void setUp() {
Map<String, String> labels = new HashMap<>();
labels.put(CommonConstants.LABEL_ALERT_SEVERITY, CommonConstants.ALERT_SEVERITY_CRITICAL);
labels.put(CommonConstants.LABEL_DEFINE_ID, String.valueOf(1L));
SingleAlert alert = new SingleAlert();
alert.setContent("Alert cache manager test");
alert.setLabels(labels);
when(singleAlertDao.querySingleAlertsByStatus(CommonConstants.ALERT_STATUS_FIRING)).thenReturn(Collections.singletonList(alert));
alarmCacheManager = new AlarmCacheManager(singleAlertDao);
}
@Test
void testInit() {
Map<String, String> labels = new HashMap<>();
labels.put(CommonConstants.LABEL_ALERT_SEVERITY, CommonConstants.ALERT_SEVERITY_CRITICAL);
labels.put(CommonConstants.LABEL_DEFINE_ID, String.valueOf(1L));
String fingerprint = AlertUtil.calculateFingerprint(labels);
SingleAlert firingSingleAlert = alarmCacheManager.getFiring(1L, fingerprint);
assertNotNull(firingSingleAlert);
assertEquals("Alert cache manager test", firingSingleAlert.getContent());
alarmCacheManager.removeFiring(1L, fingerprint);
firingSingleAlert = alarmCacheManager.getFiring(1L, fingerprint);
assertNull(firingSingleAlert);
}
@Test
void testPending() {
Map<String, String> labels = new HashMap<>();
labels.put(CommonConstants.LABEL_ALERT_SEVERITY, CommonConstants.ALERT_SEVERITY_CRITICAL);
labels.put(CommonConstants.ALERT_SEVERITY_INFO, CommonConstants.ALERT_STATUS_PENDING);
labels.put(CommonConstants.LABEL_DEFINE_ID, String.valueOf(2L));
SingleAlert alert = new SingleAlert();
alert.setContent("Alert cache manager test");
alert.setLabels(labels);
String fingerprint = AlertUtil.calculateFingerprint(alert.getLabels());
alarmCacheManager.putPending(2L, fingerprint, alert);
SingleAlert pendingSingleAlert = alarmCacheManager.getPending(2L, fingerprint);
assertNotNull(pendingSingleAlert);
alarmCacheManager.removePending(2L, fingerprint);
pendingSingleAlert = alarmCacheManager.getPending(2L, fingerprint);
assertNull(pendingSingleAlert);
}
@Test
void testFiring() {
Map<String, String> labels = new HashMap<>();
labels.put(CommonConstants.LABEL_ALERT_SEVERITY, CommonConstants.ALERT_SEVERITY_CRITICAL);
labels.put(CommonConstants.ALERT_SEVERITY_INFO, CommonConstants.ALERT_STATUS_PENDING);
labels.put(CommonConstants.LABEL_DEFINE_ID, String.valueOf(3L));
SingleAlert alert = new SingleAlert();
alert.setContent("Alert cache manager test");
alert.setLabels(labels);
String fingerprint = AlertUtil.calculateFingerprint(alert.getLabels());
alarmCacheManager.putFiring(3L, fingerprint, alert);
SingleAlert firingSingleAlert = alarmCacheManager.getFiring(3L, fingerprint);
assertNotNull(firingSingleAlert);
alarmCacheManager.removeFiring(3L, fingerprint);
firingSingleAlert = alarmCacheManager.getFiring(3L, fingerprint);
assertNull(firingSingleAlert);
}
@Test
void testHistorical() {
SingleAlert alert = new SingleAlert();
alert.setContent("Alert cache manager test");
alert.setLabels(Collections.singletonMap(CommonConstants.LABEL_ALERT_SEVERITY, CommonConstants.ALERT_SEVERITY_CRITICAL));
when(singleAlertDao.querySingleAlertsByStatus(CommonConstants.ALERT_STATUS_FIRING)).thenReturn(Collections.singletonList(alert));
alarmCacheManager = new AlarmCacheManager(singleAlertDao);
String fingerprint = AlertUtil.calculateFingerprint(alert.getLabels());
SingleAlert historicalSingleAlert = alarmCacheManager.getFiring(4L, fingerprint);
assertNotNull(historicalSingleAlert);
SingleAlert singleAlert = alarmCacheManager.removeFiring(4L, fingerprint);
assertNotNull(singleAlert);
historicalSingleAlert = alarmCacheManager.getFiring(4L, fingerprint);
assertNull(historicalSingleAlert);
}
}
@@ -42,7 +42,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -93,12 +92,12 @@ class PeriodicAlertCalculatorTest {
result.put("__value__", 95.0); // Non-null, matched with threshold
result.put("__timestamp__", System.currentTimeMillis());
when(dataSourceService.calculate(anyString(), anyString())).thenReturn(List.of(result));
when(alarmCacheManager.getPending(eq(rule.getId()), anyString())).thenReturn(null);
when(alarmCacheManager.getPending(anyString())).thenReturn(null);
periodicAlertCalculator.calculate(rule);
// Verify that putFiring is called
ArgumentCaptor<String> idCaptor = ArgumentCaptor.forClass(String.class);
ArgumentCaptor<SingleAlert> alertCaptor = ArgumentCaptor.forClass(SingleAlert.class);
verify(alarmCacheManager).putFiring(eq(rule.getId()), idCaptor.capture(), alertCaptor.capture());
verify(alarmCacheManager).putFiring(idCaptor.capture(), alertCaptor.capture());
// Assertion alarm status and content
SingleAlert alert = alertCaptor.getValue();
assertAll(() -> assertEquals(CommonConstants.ALERT_STATUS_FIRING, alert.getStatus()),
@@ -113,7 +112,7 @@ class PeriodicAlertCalculatorTest {
result.put("__timestamp__", System.currentTimeMillis());
when(dataSourceService.calculate(anyString(), anyString())).thenReturn(List.of(result));
periodicAlertCalculator.calculate(rule);
verify(alarmCacheManager, times(0)).putFiring(any(), any(), any());
verify(alarmCacheManager, times(0)).putFiring(any(), any());
}
@Test
@@ -127,7 +126,7 @@ class PeriodicAlertCalculatorTest {
.triggerTimes(2).startAt(System.currentTimeMillis() - 60000)
.activeAt(System.currentTimeMillis() - 30000)
.build();
when(alarmCacheManager.removeFiring(eq(rule.getId()), anyString())).thenReturn(pendingAlert);
when(alarmCacheManager.removeFiring(anyString())).thenReturn(pendingAlert);
when(dataSourceService.calculate(anyString(), anyString())).thenReturn(List.of(result));
periodicAlertCalculator.calculate(rule);
ArgumentCaptor<SingleAlert> resolvedCaptor = ArgumentCaptor.forClass(SingleAlert.class);
@@ -132,7 +132,6 @@ public class RealTimeAlertCalculatorMatchTest {
AlertDefine matchDefine = new AlertDefine();
matchDefine.setId(1L);
matchDefine.setName("test");
matchDefine.setExpr(
"equals(__app__,\"prometheus\") && "
@@ -152,8 +151,8 @@ public class RealTimeAlertCalculatorMatchTest {
Thread.sleep(3000);
verify(alarmCacheManager, times(1)).getPending(any(), any());
verify(alarmCacheManager, times(1)).putFiring(any(), any(), any());
verify(alarmCacheManager, times(1)).getPending(any());
verify(alarmCacheManager, times(1)).putFiring(any(), any());
verify(alarmCommonReduce, times(1)).reduceAndSendAlarm(any());
}
@@ -181,7 +180,6 @@ public class RealTimeAlertCalculatorMatchTest {
CollectRep.MetricsData metricsData = builder.build();
AlertDefine matchDefine = new AlertDefine();
matchDefine.setId(1L);
matchDefine.setName("test");
matchDefine.setExpr("equals(__app__,\"prometheus\") && equals(__metrics__,\"canal_instance\") && metric_value > 0");
matchDefine.setTemplate("Canal instance val: ${value}%");
@@ -196,8 +194,8 @@ public class RealTimeAlertCalculatorMatchTest {
Thread.sleep(3000);
verify(alarmCacheManager, times(1)).getPending(any(), any());
verify(alarmCacheManager, times(1)).putFiring(any(), any(), any());
verify(alarmCacheManager, times(1)).getPending(any());
verify(alarmCacheManager, times(1)).putFiring(any(), any());
verify(alarmCommonReduce, times(1)).reduceAndSendAlarm(any());
}
@@ -231,7 +229,6 @@ public class RealTimeAlertCalculatorMatchTest {
CollectRep.MetricsData metricsData = builder.build();
AlertDefine matchDefine = new AlertDefine();
matchDefine.setId(1L);
matchDefine.setName("test");
matchDefine.setExpr("equals(__app__,\"springboot3\") && equals(__metrics__,\"available\") && equals(__instance__, \"518679137103104\") && responseTime > 0");
matchDefine.setTemplate("Canal instance val: ${value}%");
@@ -246,8 +243,8 @@ public class RealTimeAlertCalculatorMatchTest {
Thread.sleep(3000);
verify(alarmCacheManager, times(1)).getPending(any(), any());
verify(alarmCacheManager, times(1)).putFiring(any(), any(), any());
verify(alarmCacheManager, times(1)).getPending(any());
verify(alarmCacheManager, times(1)).putFiring(any(), any());
verify(alarmCommonReduce, times(1)).reduceAndSendAlarm(any());
}
@@ -42,6 +42,7 @@ import javax.management.remote.JMXServiceURL;
import javax.management.remote.rmi.RMIConnectorServer;
import javax.naming.Context;
import javax.rmi.ssl.SslRMIClientSocketFactory;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.collector.collect.AbstractCollect;
import org.apache.hertzbeat.collector.collect.common.cache.AbstractConnection;
import org.apache.hertzbeat.collector.collect.common.cache.CacheIdentifier;
@@ -53,15 +54,13 @@ import org.apache.hertzbeat.common.entity.job.Metrics;
import org.apache.hertzbeat.common.entity.job.protocol.JmxProtocol;
import org.apache.hertzbeat.common.entity.message.CollectRep;
import org.apache.hertzbeat.common.util.CommonUtil;
import org.apache.hertzbeat.common.util.LogUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
* jmx protocol acquisition implementation
*/
@Slf4j
public class JmxCollectImpl extends AbstractCollect {
private static final String JMX_URL_PREFIX = "service:jmx:rmi:///jndi/rmi://";
@@ -76,8 +75,6 @@ public class JmxCollectImpl extends AbstractCollect {
private final ClassLoader jmxClassLoader;
private static final Logger logger = LoggerFactory.getLogger(JmxCollectImpl.class);
public JmxCollectImpl() {
jmxClassLoader = new JmxClassLoader(ClassLoader.getSystemClassLoader());
}
@@ -198,12 +195,12 @@ public class JmxCollectImpl extends AbstractCollect {
}
} catch (IOException exception) {
String errorMsg = CommonUtil.getMessageFromThrowable(exception);
LogUtil.error(logger, "JMX IOException: {0}", errorMsg);
log.error("JMX IOException :{}", errorMsg);
builder.setCode(CollectRep.Code.UN_CONNECTABLE);
builder.setMsg(errorMsg);
} catch (Exception e) {
String errorMsg = CommonUtil.getMessageFromThrowable(e);
LogUtil.error(logger, "JMX Error: {0}", errorMsg);
log.error("JMX Error :{}", errorMsg);
builder.setCode(CollectRep.Code.FAIL);
builder.setMsg(errorMsg);
} finally {
@@ -224,7 +221,7 @@ public class JmxCollectImpl extends AbstractCollect {
for (Attribute attribute : attributeList.asList()) {
Object value = attribute.getValue();
if (value == null) {
LogUtil.info(logger, "attribute {0} value is null.", attribute.getName());
log.info("attribute {} value is null.", attribute.getName());
continue;
}
if (value instanceof Number || value instanceof String || value instanceof ObjectName
@@ -248,7 +245,7 @@ public class JmxCollectImpl extends AbstractCollect {
}
attributeValueMap.put(attribute.getName(), builder.toString());
} else {
LogUtil.warn(logger, "attribute value type {0} not support.", value.getClass().getName());
log.warn("attribute value type {} not support.", value.getClass().getName());
}
}
return attributeValueMap;
@@ -322,7 +319,7 @@ public class JmxCollectImpl extends AbstractCollect {
connectionCommonCache.addCache(identifier, new JmxConnect(conn));
return conn;
} catch (Exception e) {
LogUtil.error(logger, "Failed to connect to JMX connection: {0}", e.getMessage());
log.error("Failed to connect to JMX server: {}", e.getMessage());
throw new IOException("Failed to connect to JMX server: " + e.getMessage(), e);
}
}
@@ -87,11 +87,6 @@ public interface CommonConstants {
*/
String LABEL_INSTANCE = "instance";
/**
* label key: defineid
*/
String LABEL_DEFINE_ID = "defineid";
/**
* label key: alert name
*/
@@ -1,167 +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 org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.slf4j.Logger;
import java.text.MessageFormat;
/**
* Log utility class that provides formatted logging methods with location information.
* This class enhances standard SLF4J logging by automatically adding caller location details.
*/
public class LogUtil {
private static final String TEMPLATE_REGEX = "\\{\\d}";
/**
* Print debug level formatted log
* Example: LogUtil.debug(logger, "hello,{0},here has a {1} exception", "other information");
*/
@SuppressWarnings("unused")
public static void debug(Logger logger, String msg, Object... params) {
if (logger.isDebugEnabled()) {
if (ArrayUtils.isEmpty(params)) {
logger.debug(LogUtil.buildLocationInfo() + msg);
} else {
logger.debug(LogUtil.buildLocationInfo() + format(msg, params));
}
}
}
/**
* Print info level formatted log
* Example: LogUtil.info(logger, "hello,{0},{1} exception", "dear", "database operation");
*/
public static void info(Logger logger, String msg, Object... params) {
if (logger.isInfoEnabled()) {
if (ArrayUtils.isEmpty(params)) {
logger.info(LogUtil.buildLocationInfo() + msg);
} else {
logger.info(LogUtil.buildLocationInfo() + format(msg, params));
}
}
}
/**
* Print warn level formatted log
*/
public static void warn(Logger logger, String msg, Object... params) {
if (logger.isWarnEnabled()) {
if (ArrayUtils.isEmpty(params)) {
logger.warn(LogUtil.buildLocationInfo() + msg);
} else {
logger.warn(LogUtil.buildLocationInfo() + format(msg, params));
}
}
}
/**
* Print error level formatted log, use {0},{1},.. for parameter replacement
* Example: LogUtil.error(logger, "hello,{0}, a {1} exception occurred here", "dear", "database operation");
*/
public static void error(Logger logger, String msg, Object... params) {
if (logger.isErrorEnabled()) {
if (ArrayUtils.isEmpty(params)) {
logger.error(LogUtil.buildLocationInfo() + msg);
} else {
logger.error(LogUtil.buildLocationInfo() + format(msg, params));
}
}
}
/**
* Print warn level formatted log with exception, use {0},{1},.. for parameter replacement
* Example: LogUtil.warn(logger, e, "hello,{0}, a {1} exception occurred here", "dear", "database operation");
*/
public static void warn(Logger logger, Throwable e, String msg, Object... params) {
if (logger.isWarnEnabled()) {
if (ArrayUtils.isEmpty(params)) {
logger.warn(LogUtil.buildLocationInfo() + msg, e);
} else {
logger.warn(LogUtil.buildLocationInfo() + format(msg, params), e);
}
}
}
/**
* Print error level formatted log with exception, use {0},{1},.. for parameter replacement
* Example: LogUtil.error(logger, e, "hello,{0}, a {1} exception occurred here", "dear", "database operation");
*/
public static void error(Logger logger, Throwable e, String msg, Object... params) {
if (logger.isErrorEnabled()) {
if (ArrayUtils.isEmpty(params)) {
logger.error(LogUtil.buildLocationInfo() + msg, e);
} else {
logger.error(LogUtil.buildLocationInfo() + format(msg, params), e);
}
}
}
/**
* Get the class name, method and line number that calls LogUtil
*
* @return location information string
*/
private static String buildLocationInfo() {
StringBuilder header = new StringBuilder();
// LOG4J2-1029 new Throwable().getStackTrace is faster than Thread.currentThread().getStackTrace().
final StackTraceElement[] stackTraceElements = new Throwable().getStackTrace();
for (int i = 0; i < stackTraceElements.length - 1; i++) {
StackTraceElement currentStackTrace = stackTraceElements[i];
StackTraceElement nextStackTrace = stackTraceElements[i + 1];
// If current stack trace is in LogUtil
// and next stack trace is not in LogUtil
// then the next node is the caller of LogUtil
if (LogUtil.class.getName().equals(currentStackTrace.getClassName())
&& !LogUtil.class.getName().equals(nextStackTrace.getClassName())) {
String stackTrace = nextStackTrace.toString();
header.append(" ").append(StringUtils.removeStart(stackTrace, nextStackTrace.getClassName() + "."));
break;
}
}
return header.append(":").toString();
}
private static String format(String msg, Object... params) {
if (StringUtils.isEmpty(msg)) {
return StringUtils.EMPTY;
}
if (params != null && params.length > 0) {
msg = MessageFormat.format(msg, params);
}
return msg.replaceAll(TEMPLATE_REGEX, StringUtils.EMPTY);
}
private static String toString(Object object) {
return ToStringBuilder.reflectionToString(object, ToStringStyle.SHORT_PREFIX_STYLE);
}
}
@@ -1,117 +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 org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.slf4j.Logger;
import java.lang.reflect.Method;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.contains;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
class LogUtilTest {
@Mock
private Logger mockLogger;
private AutoCloseable mocks;
@BeforeEach
void setUp() {
mocks = MockitoAnnotations.openMocks(this);
}
@AfterEach
void tearDown() throws Exception {
if (mocks != null) {
mocks.close();
}
}
@Test
void testFormat_noParams_returnsOriginalMessage() throws Exception {
String original = "hello world";
Method formatMethod = LogUtil.class.getDeclaredMethod("format", String.class, Object[].class);
formatMethod.setAccessible(true);
String formatted = (String) formatMethod.invoke(null, original, new Object[0]);
assertEquals(original, formatted);
}
@Test
void testFormat_withParams_replacesPlaceholders() throws Exception {
String template = "hello,{0}, world {1}!";
Method formatMethod = LogUtil.class.getDeclaredMethod("format", String.class, Object[].class);
formatMethod.setAccessible(true);
Object[] params = {"Alice", 123};
String result = (String) formatMethod.invoke(null, template, params);
assertTrue(result.contains("hello,Alice"));
assertTrue(result.contains("world 123!"));
}
@Test
void testDebug_noParams_logsRawMessage() {
when(mockLogger.isDebugEnabled()).thenReturn(true);
String msg = "test-debug";
LogUtil.debug(mockLogger, msg);
verify(mockLogger).debug(contains(msg));
}
@Test
void testDebug_withParams_logsFormattedMessage() {
when(mockLogger.isDebugEnabled()).thenReturn(true);
LogUtil.debug(mockLogger, "user={0}", "Bob");
verify(mockLogger).debug(contains("user=Bob"));
}
@Test
void testInfo_levelOff_doesNotLog() {
when(mockLogger.isInfoEnabled()).thenReturn(false);
LogUtil.info(mockLogger, "should-not-log");
verify(mockLogger, never()).info(anyString());
}
@Test
void testWarn_withException_logsMessageAndException() {
when(mockLogger.isWarnEnabled()).thenReturn(true);
RuntimeException ex = new RuntimeException("warn-ex");
LogUtil.warn(mockLogger, ex, "warning {0}", "occurred");
ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
verify(mockLogger).warn(captor.capture(), eq(ex));
assertTrue(captor.getValue().contains("warning occurred"));
}
@Test
void testError_withExceptionAndParams_logsError() {
when(mockLogger.isErrorEnabled()).thenReturn(true);
RuntimeException ex = new RuntimeException("err");
LogUtil.error(mockLogger, ex, "fail code {0}", 500);
ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);
verify(mockLogger).error(captor.capture(), eq(ex));
assertTrue(captor.getValue().contains("fail code 500"));
}
}
@@ -43,12 +43,12 @@ public class SwaggerConfig {
.info(new Info()
.title("HertzBeat")
.description("An Open-Source Real-time Monitoring Tool.")
.termsOfService("https://hertzbeat.apache.org/")
.termsOfService("https://hertzbeat.com/")
.contact(new Contact().name("tom").url("https://github.com/tomsun28").email("tomsun28@outlook.com"))
.version("v1.0")
.license(new License().name("Apache 2.0").url("https://www.apache.org/licenses/LICENSE-2.0")))
.externalDocs(new ExternalDocumentation()
.description("HertzBeat Docs").url("https://hertzbeat.apache.org/docs/"))
.description("HertzBeat Docs").url("https://hertzbeat.com/docs/"))
.addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME))
.components(new Components().addSecuritySchemes(SECURITY_SCHEME_NAME,
new SecurityScheme()
@@ -121,14 +121,6 @@ public class MonitorsController {
monitorService.export(ids, type, res);
}
@GetMapping("/export/all")
@Operation(summary = "export all monitor config", description = "export all monitor config")
public void exportAll(
@Parameter(description = "Export Type:JSON,EXCEL,YAML") @RequestParam(defaultValue = "JSON") String type,
HttpServletResponse res) throws Exception {
monitorService.exportAll(type, res);
}
@PostMapping("/import")
@Operation(summary = "import monitor config", description = "import monitor config")
public ResponseEntity<Message<Void>> export(MultipartFile file) throws Exception {
@@ -173,15 +173,6 @@ public interface MonitorService {
*/
void export(List<Long> ids, String type, HttpServletResponse res) throws Exception;
/**
* Export All Monitoring Configuration
*
* @param type file type
* @param res response
* @throws Exception This exception will be thrown if the export fails
*/
void exportAll(String type, HttpServletResponse res) throws Exception;
/**
* Import Monitoring Configuration
*
@@ -235,18 +235,6 @@ public class MonitorServiceImpl implements MonitorService {
imExportService.exportConfig(res.getOutputStream(), ids);
}
@Override
public void exportAll(String type, HttpServletResponse res) throws Exception {
// Get all monitor IDs from the database
List<Long> allMonitorIds = monitorDao.findAll()
.stream()
.map(Monitor::getId)
.collect(Collectors.toList());
// Use the existing export method to export all monitors
export(allMonitorIds, type, res);
}
@Override
public void importConfig(MultipartFile file) throws Exception {
var fileName = FileUtil.getFileName(file);
@@ -138,7 +138,7 @@ warehouse:
username: root
password: root
insert:
buffer-size: 100
buffer-size: 1000
flush-interval: 3
cluster:
enabled: false
@@ -29,8 +29,8 @@ help:
zh-TW: HertzBeat 對 GreptimeDB 時序資料庫進行監控。<br><span class='help_module_span'><a class='help_module_content' https://docs.greptime.com/user-guide/operations/monitoring'>點擊查看開啓步驟</a>。</span>
ja-JP: HertzBeat は GreptimeDB 時系列データベースを監視します。<br><span class='help_module_span'><a class='help_module_content' https://docs.greptime.com/user-guide/operations/monitoring'>クリックしてガイドを見ます</a>。</span>
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/greptimedb
en-US: https://hertzbeat.apache.org/docs/help/greptimedb
zh-CN: https://hertzbeat.com/zh-cn/docs/help/greptimedb
en-US: https://hertzbeat.com/docs/help/greptimedb
# Input params define for monitoring(render web ui by the definition)
params:
# field-param field key
@@ -29,8 +29,8 @@ help:
zh-TW: HertzBeat 對 InfluxDB 時序資料庫進行監控。<br><span class='help_module_span'><a class='help_module_content' href='https://docs.influxdata.com/platform/monitoring/influxdata-platform/tools/measurements-internal'>點擊查看開啓步驟</a>。</span>
ja-JP: HertzBeat は InfluxDB 時系列データベースを監視します。<br><span class='help_module_span'><a class='help_module_content' href='https://docs.influxdata.com/platform/monitoring/influxdata-platform/tools/measurements-internal'>クリックしてガイドを見ます</a>。</span>
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/influxdb/
en-US: https://hertzbeat.apache.org/docs/help/influxdb/
zh-CN: https://hertzbeat.com/zh-cn/docs/help/influxdb/
en-US: https://hertzbeat.com/docs/help/influxdb/
# Input params define for monitoring(render web ui by the definition)
params:
# field-param field key
@@ -18,13 +18,11 @@ app: kafka_client
name:
zh-CN: Kafka消息系统(客户端)
en-US: Kafka MessageClient
ja-JP: Kafkaメッセージングシステム(クライアント)
help:
zh-CN: HertzBeat 使用 <a href="https://hertzbeat.apache.org/zh-cn/docs/help/kafka_client">Kafka Admin Client</a> 对 Kafka 的通用指标进行采集监控。</span>
en-US: HertzBeat uses <a href='https://hertzbeat.apache.org/docs/help/kafka_client'>Kafka Admin Client</a> to monitoring kafka general metrics. </span>
zh-TW: HertzBeat 使用 <a href="https://hertzbeat.apache.org/zh-cn/docs/help/kafka_client">Kafka Admin Client</a> 對 Kafka 的通用指標進行采集監控。</span>
ja-JP: HertzBeat は <a href="https://hertzbeat.apache.org/docs/help/kafka_client">Kafka Admin Clientを介して</a> Kafkaの一般的なパフォーマンスのメトリクスを監視します。</span>
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/kafka_client
@@ -35,14 +33,12 @@ params:
name:
zh-CN: 目标Host
en-US: Target Host
ja-JP: 目標ホスト
type: host
required: true
- field: port
name:
zh-CN: 端口
en-US: Port
ja-JP: ポート
type: number
range: '[0,65535]'
required: true
@@ -51,7 +47,6 @@ params:
name:
zh-CN: 是否监控内部主题
en-US: Monitor Internal Topic
ja-JP: 内部トピックを監視するかどうか
type: boolean
required: true
defaultValue: false
@@ -61,7 +56,6 @@ metrics:
i18n:
zh-CN: 主题列表
en-US: Topic List
ja-JP: トピック一覧
priority: 0
fields:
- field: TopicName
@@ -69,7 +63,6 @@ metrics:
i18n:
zh-CN: 主题名称
en-US: Topic Name
ja-JP: トピック名
protocol: kclient
kclient:
host: ^_^host^_^
@@ -80,7 +73,6 @@ metrics:
i18n:
zh-CN: 主题详细信息
en-US: Topic Detail Info
ja-JP: トピック詳細情報
priority: 1
fields:
- field: TopicName
@@ -88,43 +80,36 @@ metrics:
i18n:
zh-CN: 主题名称
en-US: Topic Name
ja-JP: トピック名
- field: PartitionNum
type: 1
i18n:
zh-CN: 分区数量
en-US: Partition Num
ja-JP: パーティション数
- field: PartitionLeader
type: 1
i18n:
zh-CN: 分区领导者
en-US: Partition Leader
ja-JP: パーティションリーダー
- field: BrokerHost
type: 1
i18n:
zh-CN: Broker主机
en-US: Broker Host
ja-JP: ブローカーホスト
- field: BrokerPort
type: 1
i18n:
zh-CN: Broker端口
en-US: Broker Port
ja-JP: ブローカーポート
- field: ReplicationFactorSize
type: 1
i18n:
zh-CN: 复制因子大小
en-US: Replication Factor Size
ja-JP: レプリカファクターのサイズ
- field: ReplicationFactor
type: 1
i18n:
zh-CN: 复制因子
en-US: Replication Factor
ja-JP: レプリカファクター
protocol: kclient
kclient:
host: ^_^host^_^
@@ -135,7 +120,6 @@ metrics:
i18n:
zh-CN: 主题偏移量
en-US: Topic Offset
ja-JP: トピックオフセット
priority: 2
# Kafka offset does not need to be obtained frequently, as getting it too quickly will affect performance
interval: 300
@@ -146,26 +130,22 @@ metrics:
i18n:
zh-CN: 主题名称
en-US: Topic Name
ja-JP: トピック名
- field: PartitionNum
label: true
type: 1
i18n:
zh-CN: 分区号
en-US: Partition Num
ja-JP: パーティション数
- field: earliest
type: 0
i18n:
zh-CN: 最早偏移量
en-US: Earliest Offset
ja-JP: 最早オフセット
- field: latest
type: 0
i18n:
zh-CN: 最新偏移量
en-US: Latest Offset
ja-JP: 最新オフセット
protocol: kclient
kclient:
host: ^_^host^_^
@@ -176,7 +156,6 @@ metrics:
i18n:
zh-CN: 消费者组情况
en-US: Consumer Detail Info
ja-JP: 消費者グループ詳細情報
priority: 3
# Kafka offset does not need to be obtained frequently, as getting it too quickly will affect performance
interval: 300
@@ -187,32 +166,27 @@ metrics:
i18n:
zh-CN: 消费者组ID
en-US: Consumer Group ID
ja-JP: 消費者グループID
- field: Group Member Num
type: 1
i18n:
zh-CN: 消费者实例数量
en-US: Group Member Num
ja-JP: 消費者グループのメンバー数
- field: Topic
label: true
type: 1
i18n:
zh-CN: 订阅主题名称
en-US: Subscribed Topic Name
ja-JP: 購読されたトピック名
- field: Offset of Each Partition
type: 1
i18n:
zh-CN: 各分区偏移量
en-US: Offset of Each Partition
ja-JP: 各パーティションのオフセット
- field: Lag
type: 0
i18n:
zh-CN: 落后偏移量
en-US: Total Lag
ja-JP: ラグオフセット
protocol: kclient
kclient:
host: ^_^host^_^
@@ -20,13 +20,11 @@ app: kafka_promql
name:
zh-CN: Kafka-PromQL
en-US: Kafka-PromQL
ja-JP: Kafka-PromQL
# The description and help of this monitoring type
help:
zh-CN: Hertzbeat 使用 Prometheus PromQL 从 Prometheus 服务器中查询到 Kafka 的通用指标数据来进行监控。此方案适用于 Prometheus 已监控 Kafka,需要从 Prometheus 服务器抓取 Kafka 的监控数据。<br>您可以点击 “<i>新建 Kafka-PromQL</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: HertzBeat uses Prometheus PromQL query metrics data from Prometheus Server to monitoring Kafka. This solution is suitable for Prometheus to monitor Kafka, and it need to capture Kafka monitoring data from the Prometheus server. <br>You could click the "<i>New Kafka-PromQL</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat 使用 Prometheus PromQL 從 Prometheus 服務器中查詢到 Kafka 的通用指標數據來進行監控。此方案適用于 Prometheus 已監控 Kafka,需要從 Prometheus 服務器抓取 Kafka 的監控數據。<br>您可以點擊 “<i>新建 Kafka-PromQL</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
ja-JP: Hertzbeat は Prometheus PromQL を介して Prometheus サーバーに Kafka の一般的なパフォーマンスのメトリクスをクエリして監視します。このシナリオは、PrometheusがすでにKafkaを監視しており、PrometheusサーバーからKafkaの監視データを取得する必要がある場合に適用されます。。<br>「<i>新規 Kafka-PromQL</i>」をクリックして設定しましょう。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/kafka_promql
en-US: https://hertzbeat.apache.org/docs/help/kafka_promql
@@ -35,14 +33,12 @@ params:
name:
zh-CN: 目标Host
en-US: Target Host
ja-JP: 目標ホスト
type: host
required: true
- field: port
name:
zh-CN: 端口
en-US: Port
ja-JP: ポート
type: number
range: '[0,65535]'
required: true
@@ -51,7 +47,6 @@ params:
name:
zh-CN: 请求方式
en-US: Method
ja-JP: リクエストメソッド
type: radio
required: true
options:
@@ -68,7 +63,6 @@ params:
name:
zh-CN: 相对路径
en-US: URI
ja-JP: URI
type: text
limit: 200
required: true
@@ -78,14 +72,12 @@ params:
name:
zh-CN: 启动SSL
en-US: SSL
ja-JP: SSL
type: boolean
required: false
- field: headers
name:
zh-CN: 请求Headers
en-US: Headers
ja-JP: ヘッダ
type: key-value
required: false
keyAlias: Header Name
@@ -94,7 +86,6 @@ params:
name:
zh-CN: 查询Params
en-US: Params
ja-JP: パラメータ
type: key-value
required: false
keyAlias: Param Key
@@ -103,7 +94,6 @@ params:
name:
zh-CN: Content-Type
en-US: Content-Type
ja-JP: コンテンツタイプ
type: text
placeholder: '请求BODY资源类型'
required: false
@@ -112,7 +102,6 @@ params:
name:
zh-CN: 请求BODY
en-US: BODY
ja-JP: ボディ
type: textarea
placeholder: 'POST PUT请求时有效'
required: false
@@ -121,7 +110,6 @@ params:
name:
zh-CN: 认证方式
en-US: Auth Type
ja-JP: 認証方法
type: radio
required: false
hide: true
@@ -134,7 +122,6 @@ params:
name:
zh-CN: 用户名
en-US: Username
ja-JP: ユーザー名
type: text
limit: 50
required: false
@@ -143,7 +130,6 @@ params:
name:
zh-CN: 密码
en-US: Password
ja-JP: パスワード
type: password
required: false
hide: true
@@ -153,7 +139,6 @@ metrics:
i18n:
zh-CN: Kafka Broker 数量
en-US: Kafka Broker Count
ja-JP: Kafkaブローカー数量
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
priority: 0
@@ -165,25 +150,21 @@ metrics:
i18n:
zh-CN: 名称
en-US: Name
ja-JP: 名前
- field: instance
type: 1
i18n:
zh-CN: 实例
en-US: Instance
ja-JP: インスタンス
- field: timestamp
type: 1
i18n:
zh-CN: 时间戳
en-US: Timestamp
ja-JP: タイムスタンプ
- field: value
type: 1
i18n:
zh-CN: 数值
en-US: Value
ja-JP:
# The protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# The config content when protocol is http
@@ -220,7 +201,6 @@ metrics:
i18n:
zh-CN: Kafka Topic 分区数量
en-US: Kafka Topic Partitions
ja-JP: Kafkaトピックのパーティション数量
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
priority: 1
@@ -232,25 +212,21 @@ metrics:
i18n:
zh-CN: 名称
en-US: Name
ja-JP: 名前
- field: topic
type: 1
i18n:
zh-CN: 主题
en-US: Topic
ja-JP: トピック
- field: timestamp
type: 1
i18n:
zh-CN: 时间戳
en-US: Timestamp
ja-JP: タイムスタンプ
- field: value
type: 1
i18n:
zh-CN: 数值
en-US: Value
ja-JP:
# The protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# The config content when protocol is http
@@ -288,7 +264,6 @@ metrics:
i18n:
zh-CN: Kafka Server Broker Topic 每秒字节入
en-US: Kafka Server Broker Topic Bytes In Per Second
ja-JP: Kafkaサーバーブローカーの1秒あたりのトピック合計受信されたバイト
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
priority: 1
@@ -300,31 +275,26 @@ metrics:
i18n:
zh-CN: 实例
en-US: Instance
ja-JP: インスタンス
- field: job
type: 1
i18n:
zh-CN: 任务
en-US: Job
ja-JP: タスク
- field: topic
type: 1
i18n:
zh-CN: 主题
en-US: Topic
ja-JP: トピック
- field: timestamp
type: 1
i18n:
zh-CN: 时间戳
en-US: Timestamp
ja-JP: タイムスタンプ
- field: value
type: 1
i18n:
zh-CN: 数值
en-US: Value
ja-JP:
# The protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# The specific collection configuration when the protocol is http
@@ -145,18 +145,4 @@ class MonitorsControllerTest {
.andExpect(jsonPath("$.code").value("0"))
.andExpect(jsonPath("$.msg").value("Import success"));
}
@Test
void exportAll() throws Exception {
String type = "JSON";
// Mock the behavior of monitorService.exportAll
doNothing().when(monitorService).exportAll(Mockito.anyString(), Mockito.any());
// Perform the request and verify the response
this.mockMvc.perform(MockMvcRequestBuilders.get("/api/monitors/export/all")
.param("type", type))
.andExpect(status().isOk())
.andReturn();
}
}
@@ -745,33 +745,6 @@ class MonitorServiceTest {
when(monitorDao.findById(1L)).thenReturn(Optional.of(monitor));
when(paramDao.findParamsByMonitorId(1L)).thenReturn(params);
assertDoesNotThrow(() -> monitorService.copyMonitor(1L));
}
@Test
void exportAll() throws Exception {
// Create some test monitors
Monitor monitor1 = Monitor.builder().id(1L).name("test1").app("app1").build();
Monitor monitor2 = Monitor.builder().id(2L).name("test2").app("app2").build();
List<Monitor> allMonitors = List.of(monitor1, monitor2);
// Mock the behavior of monitorDao.findAll
when(monitorDao.findAll()).thenReturn(allMonitors);
// Create a mock HttpServletResponse
jakarta.servlet.http.HttpServletResponse mockResponse = org.mockito.Mockito.mock(jakarta.servlet.http.HttpServletResponse.class);
// Mock the ImExportService
org.apache.hertzbeat.manager.service.ImExportService mockImExportService = org.mockito.Mockito.mock(org.apache.hertzbeat.manager.service.ImExportService.class);
// Mock the getFileName method
when(mockImExportService.getFileName()).thenReturn("test.json");
// Set the field using reflection
java.lang.reflect.Field field = MonitorServiceImpl.class.getDeclaredField("imExportServiceMap");
field.setAccessible(true);
java.util.Map<String, org.apache.hertzbeat.manager.service.ImExportService> imExportServiceMap = new java.util.HashMap<>();
imExportServiceMap.put("JSON", mockImExportService);
field.set(monitorService, imExportServiceMap);
// Test the exportAll method
assertDoesNotThrow(() -> monitorService.exportAll("JSON", mockResponse));
}
}
@@ -100,10 +100,10 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
private final VictoriaMetricsProperties victoriaMetricsProp;
private final RestTemplate restTemplate;
private final BlockingQueue<VictoriaMetricsDataStorage.VictoriaMetricsContent> metricsBufferQueue;
private boolean isBatchImportEnabled = false;
private HashedWheelTimer metricsFlushTimer = null;
private MetricsFlushTask metricsFlushtask = null;
private final VictoriaMetricsProperties.InsertConfig insertConfig;
public VictoriaMetricsDataStorage(VictoriaMetricsProperties victoriaMetricsProperties, RestTemplate restTemplate) {
if (victoriaMetricsProperties == null) {
@@ -114,9 +114,11 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
victoriaMetricsProp = victoriaMetricsProperties;
serverAvailable = checkVictoriaMetricsDatasourceAvailable();
serverAvailable = checkVictoriaMetricsDatasourceAvailable();
insertConfig = victoriaMetricsProperties.insert() == null ? new VictoriaMetricsProperties.InsertConfig(100, 3) : victoriaMetricsProperties.insert();
metricsBufferQueue = new LinkedBlockingQueue<>(insertConfig.bufferSize());
initializeFlushTimer();
metricsBufferQueue = new LinkedBlockingQueue<>(victoriaMetricsProperties.insert().bufferSize());
isBatchImportEnabled = victoriaMetricsProperties.insert().flushInterval() != 0 && victoriaMetricsProperties.insert().bufferSize() != 0;
if (isBatchImportEnabled){
initializeFlushTimer();
}
}
private void initializeFlushTimer() {
@@ -242,6 +244,10 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
log.info("[warehouse victoria-metrics] flush metrics data {} is empty, ignore.", metricsData.getId());
return;
}
if (!isBatchImportEnabled){
doSaveData(contentList);
return;
}
sendVictoriaMetrics(contentList);
}
@@ -579,10 +585,10 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
log.error("[Victoria Metrics] Failed to save metrics directly: {}", e.getMessage(), e);
}
}
}
// Refresh in advance to avoid waiting
if (metricsBufferQueue.size() >= insertConfig.bufferSize() * 0.8) {
triggerImmediateFlush();
// Refresh in advance to avoid waiting
if (metricsBufferQueue.size() >= victoriaMetricsProp.insert().bufferSize() * 0.8) {
triggerImmediateFlush();
}
}
}
@@ -597,14 +603,14 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
@Override
public void run(Timeout timeout) {
try {
List<VictoriaMetricsDataStorage.VictoriaMetricsContent> batch = new ArrayList<>(insertConfig.bufferSize());
metricsBufferQueue.drainTo(batch, insertConfig.bufferSize());
List<VictoriaMetricsDataStorage.VictoriaMetricsContent> batch = new ArrayList<>(victoriaMetricsProp.insert().bufferSize());
metricsBufferQueue.drainTo(batch, victoriaMetricsProp.insert().bufferSize());
if (!batch.isEmpty()) {
doSaveData(batch);
log.debug("[Victoria Metrics] Flushed {} metrics items", batch.size());
}
if (metricsFlushTimer != null && !metricsFlushTimer.isStop()) {
metricsFlushTimer.newTimeout(this, insertConfig.flushInterval(), TimeUnit.SECONDS);
metricsFlushTimer.newTimeout(this, victoriaMetricsProp.insert().flushInterval(), TimeUnit.SECONDS);
}
} catch (Exception e) {
log.error("[VictoriaMetrics] flush task error: {}", e.getMessage(), e);
@@ -34,7 +34,7 @@ public record VictoriaMetricsProperties(@DefaultValue("false") boolean enabled,
String password,
InsertConfig insert) {
record InsertConfig(@DefaultValue("100") int bufferSize,
record InsertConfig(@DefaultValue("1000") int bufferSize,
@DefaultValue("3") int flushInterval) {
}
+1 -1
View File
@@ -9,7 +9,7 @@ tags: [opensource]
[HertzBeat](https://github.com/apache/hertzbeat), incubated by [Dromara](https://dromara.org) and open-sourced by [TanCloud](https://tancloud.cn), is an open-source monitoring and alerting project that supports various monitoring types such as websites, APIs, PING, ports, databases, entire sites, operating systems, middleware, etc. It features threshold alarms, notification alerts (email, webhook, DingTalk, WeChat Work, Lark robots), and a user-friendly visual interface.
**Official Website: [hertzbeat.com](https://hertzbeat.apache.org) | [tancloud.cn](https://tancloud.cn)**
**Official Website: [hertzbeat.com](https://hertzbeat.com) | [tancloud.cn](https://tancloud.cn)**
Hello everyone, HertzBeat v1.1.0 is released! In this version, we've added support for the SNMP protocol and implemented application monitoring for Windows operating systems using SNMP.
Another significant change is our default switch to using the H2 database instead of MYSQL for storage, making it easier for users to install and deploy. Now, you can install and experience HertzBeat with just a single Docker command: `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat`
+1 -1
View File
@@ -9,7 +9,7 @@ tags: [opensource]
[HertzBeat](https://github.com/apache/hertzbeat), incubated by [Dromara](https://dromara.org) and open-sourced by [TanCloud](https://tancloud.cn), is an open-source monitoring and alerting project that supports website, API, PING, port, database, site-wide, operating system, middleware monitoring types, and more. It features threshold alarms, alarm notifications (email, webhook, DingTalk, WeChat Work, Feishu bot), and a user-friendly visual interface.
**Official Website: [hertzbeat.com](https://hertzbeat.apache.org) | [tancloud.cn](https://tancloud.cn)**
**Official Website: [hertzbeat.com](https://hertzbeat.com) | [tancloud.cn](https://tancloud.cn)**
Hello everyone, HertzBeat v1.1.0 is here! In this version, we've added support for the SNMP protocol and enabled application monitoring for Windows operating systems using SNMP.
Another major change is that we've switched from using MYSQL to H2 database by default for storage, making it easier for users to install and deploy. Now, you can get started with HertzBeat using just a single docker command: `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat`
+2 -2
View File
@@ -9,7 +9,7 @@ tags: [opensource]
> Friendly Cloud Monitoring Tool.
**Home: [hertzbeat.com](https://hertzbeat.apache.org)**
**Home: [hertzbeat.com](https://hertzbeat.com)**
Hi guys! HertzBeat v1.1.1 is coming. This version brings custom monitoring enhancements, and the collected metric data can be assigned as a variable to the next collection. Fixed several bugs and improved the overall stable usability.
@@ -49,7 +49,7 @@ Have Fun!
> [HertzBeat](https://github.com/apache/hertzbeat) is an opensource monitoring and alarm project incubated by [Dromara](https://dromara.org) and open sourced by [TanCloud](https://tancloud.cn), which supports Website, API, PING, Port, Database, OS Monitor etc.
> We also provide **[Monitoring Cloud For Saas](https://console.tancloud.cn)**, people no longer need to deploy a cumbersome monitoring tool in order to monitor their website resources. **[Sign in to get started for free](https://console.tancloud.cn)**.
> HertzBeat supports more liberal threshold alarm configuration (calculation expression), supports alarm notification, alarm template, email, DingDing, WeChat FeiShu and WebHook.
> Most important is HertzBeat supports [Custom Monitoring](https://hertzbeat.apache.org/docs/advanced/extend-point), just by configuring the YML file, we can customize the monitoring types and metrics what we need.
> Most important is HertzBeat supports [Custom Monitoring](https://hertzbeat.com/docs/advanced/extend-point), just by configuring the YML file, we can customize the monitoring types and metrics what we need.
> HertzBeat is modular, `manager, collector, scheduler, warehouse, alerter` modules are decoupled for easy understanding and custom development.
> Welcome to HertzBeat's [Cloud Environment TanCloud](https://console.tancloud.cn) to try and discover more.
> Welcome to join us to build hertzbeat together.
+2 -2
View File
@@ -17,7 +17,7 @@ Today's article describes how to use hertzbeat monitoring system to detect the v
HertzBeat is a real-time monitoring tool with powerful customizable monitoring capabilities without the need for an agent. Website monitoring, PING connectivity, port availability, database, OS, middleware, API monitoring, threshold alerts, alert notifications (email weChat pinning flybook).
**Official website: <https://hertzbeat.apache.org> | <https://tancloud.cn>**
**Official website: <https://hertzbeat.com> | <https://tancloud.cn>**
github: <https://github.com/apache/hertzbeat>
gitee: <https://gitee.com/hertzbeat/hertzbeat>
@@ -87,7 +87,7 @@ gitee: <https://gitee.com/hertzbeat/hertzbeat>
You can refer to the help file for the token configuration of Nail WeChat Flying Book, etc.
<https://hertzbeat.apache.org/docs/help/alert_dingtalk>
<https://hertzbeat.com/docs/help/alert_dingtalk>
<https://tancloud.cn/docs/help/alert_dingtalk>
> Alert Notification -> Add new alert notification policy -> Enable notification for the recipients you just configured
+1 -1
View File
@@ -98,7 +98,7 @@ github[Ceilzcx (zcx) (github.com)](https://github.com/Ceilzcx)
### 如何参与Hertzbeat
+ 官网有非常完善的贡献者指南:[贡献者指南 | HertzBeat](https://hertzbeat.apache.org/docs/community/contribution)
+ 官网有非常完善的贡献者指南:[贡献者指南 | HertzBeat](https://hertzbeat.com/docs/community/contribution)
+ Github issues[Issues · apache/hertzbeat (github.com)](https://github.com/apache/hertzbeat/issues)
+3 -3
View File
@@ -25,7 +25,7 @@ tags: [opensource, practice]
#### Prerequisites, you already have IoTDB environment and HertzBeat environment
- IoTDB [deployment and installation documentation](https://iotdb.apache.org/UserGuide/V0.13.x/QuickStart/QuickStart.html)
- HertzBeat [deployment installation documentation](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [deployment installation documentation](https://hertzbeat.com/docs/start/docker-deploy)
#### 1. Enable the `metrics` function on the IoTDB side, which will provide interface data in the form of prometheus metrics
@@ -54,7 +54,7 @@ tags: [opensource, practice]
2. Configure the parameters required for monitoring IoTDB
Fill in the IoTDB **service IP** and **monitoring port** (default 9091) on the monitoring page, and finally click OK to add.
For other parameters such as **collection interval**, **timeout period**, etc., please refer to [Help Documentation](https://hertzbeat.apache.org/docs/help/iotdb/) <https://hertzbeat.apache.org/docs/help> /iotdb/
For other parameters such as **collection interval**, **timeout period**, etc., please refer to [Help Documentation](https://hertzbeat.com/docs/help/iotdb/) <https://hertzbeat.com/docs/help> /iotdb/
![HertzBeat](/img/blog/monitor-iotdb-2.png)
@@ -96,7 +96,7 @@ tags: [opensource, practice]
Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example.
- Refer to this [Help Documentation](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value.
- Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value.
- Configure the receiver parameters in HertzBeat as follows.
【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】
+3 -3
View File
@@ -33,7 +33,7 @@ tags: [opensource, practice]
#### You must have a ShenYu environment and a HertzBeat environment
- ShenYu [Deployment and Installation Documentation](https://shenyu.apache.org/zh/docs/deployment/deployment-before)
- HertzBeat [Deployment and Installation Documentation](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [Deployment and Installation Documentation](https://hertzbeat.com/docs/start/docker-deploy)
#### i. Enable the `metrics` plugin on the ShenYu side, which will provide the metrics interface data
@@ -77,7 +77,7 @@ tags: [opensource, practice]
2. Configure the parameters required for monitoring ShenYu
On the monitor page, fill in ShenYu **service IP**, **monitor port** (default 8090), and click OK to add.
For other parameters such as **collection interval**, **timeout**, etc., you can refer to the [help file](https://hertzbeat.apache.org/docs/help/shenyu/) <https://hertzbeat.apache.org/docs/help/shenyu/>
For other parameters such as **collection interval**, **timeout**, etc., you can refer to the [help file](https://hertzbeat.com/docs/help/shenyu/) <https://hertzbeat.com/docs/help/shenyu/>
![HertzBeat](/img/blog/monitor-shenyu-1.png)
@@ -126,7 +126,7 @@ Of course, just looking at it is not perfect, monitoring is often accompanied by
Message notification methods support **Email, Nail, WeChat, Flybook, WebHook, SMS**, etc. Here we take the commonly used Nail as an example.
- Refer to this [help document](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> Configure the bot on the pinning side, set the security customization keyword `HertzBeat`, get the corresponding `access_token` value.
- Refer to this [help document](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> Configure the bot on the pinning side, set the security customization keyword `HertzBeat`, get the corresponding `access_token` value.
- Configure the recipient parameters in HertzBeat as follows.
[Alert Notification] -> [Add Recipient] -> [Select Nailed Bot Notification Method] -> [Set Nailed Bot ACCESS_TOKEN] -> [OK]
+3 -3
View File
@@ -30,7 +30,7 @@ tags: [opensource, practice]
#### operation, you already have a DynamicTp environment and a HertzBeat environment
- DynamicTp [Integration Access Documentation](https://dynamictp.cn/guide/use/quick-start.html)
- HertzBeat [Deployment and Installation Documentation](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [Deployment and Installation Documentation](https://hertzbeat.com/docs/start/docker-deploy)
#### i. Expose the `DynamicTp` metrics interface `/actuator/dynamic-tp` on the DynamicTp side, which will provide the metrics interface data
@@ -89,7 +89,7 @@ tags: [opensource, practice]
2. Configure the parameters required for monitoring DynamicTp.
On the monitor page, fill in DynamicTp **service IP**, **monitoring port** (default 8080), and finally click OK to add it.
For other parameters such as **collection interval**, **timeout**, etc., you can refer to [help](https://hertzbeat.apache.org/docs/help/dynamic_tp/) <https://hertzbeat.apache.org/docs/help/dynamic_tp/>
For other parameters such as **collection interval**, **timeout**, etc., you can refer to [help](https://hertzbeat.com/docs/help/dynamic_tp/) <https://hertzbeat.com/docs/help/dynamic_tp/>
![HertzBeat](/img/blog/monitor-dynamic-tp-2.png)
@@ -138,7 +138,7 @@ Of course, just watching is not perfect, monitoring is often accompanied by alar
Message notification methods support **Email, Dingtalk, WeChat, Flybook, WebHook, SMS**, etc. We take the commonly used Dingtalk as an example.
- Refer to this [help document](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> Configure the bot on Dingtalk side, set the security customization keyword `HertzBeat`, get the corresponding `access_token` value.
- Refer to this [help document](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> Configure the bot on Dingtalk side, set the security customization keyword `HertzBeat`, get the corresponding `access_token` value.
- Configure the recipient parameters in HertzBeat as follows.
[Alert Notification] -> [Add Recipient] -> [Choose Dingtalk bot notification method] -> [Set Dingtalk bot ACCESS_TOKEN] -> [OK]
+3 -3
View File
@@ -27,7 +27,7 @@ Keywords: [Open source monitoring tool, open source database monitoring, Mysql d
#### The premise of the operation is that you already have the Mysql environment and the HertzBeat environment
- Mysql [Installation and deployment document](https://www.runoob.com/mysql/mysql-install.html)
- HertzBeat [Installation and deployment documentation](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [Installation and deployment documentation](https://hertzbeat.com/docs/start/docker-deploy)
#### Add monitoring of Mysql database on the open source monitoring tool HertzBeat monitoring page
@@ -40,7 +40,7 @@ Keywords: [Open source monitoring tool, open source database monitoring, Mysql d
2. Configure the parameters required for the new monitoring Mysql database
On the monitoring page, fill in Mysql **service IP**, **monitoring port** (default 3306), **account password, etc.**, and finally click OK to add.
For other parameters such as **collection interval**, **timeout period**, etc., please refer to [Help Documentation](https://hertzbeat.apache.org/docs/help/mysql/) <https://hertzbeat.apache.org/docs/help> /mysql/
For other parameters such as **collection interval**, **timeout period**, etc., please refer to [Help Documentation](https://hertzbeat.com/docs/help/mysql/) <https://hertzbeat.com/docs/help> /mysql/
![HertzBeat](/img/blog/monitor-mysql-2.png)
@@ -88,7 +88,7 @@ Of course, just looking at it is definitely not perfect. Monitoring is often acc
Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example.
- Refer to this [Help Documentation](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value.
- Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value.
- Configure the receiver parameters in HertzBeat as follows.
【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】
+3 -3
View File
@@ -24,7 +24,7 @@ Github: <https://github.com/apache/hertzbeat>
#### Prerequisites, you already have a Linux environment and a HertzBeat environment
- HertzBeat [Installation and deployment documentation](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [Installation and deployment documentation](https://hertzbeat.com/docs/start/docker-deploy)
#### Add monitoring of the Linux operating system to the monitoring page of the open source monitoring tool HertzBeat
@@ -37,7 +37,7 @@ Github: <https://github.com/apache/hertzbeat>
2. Configure the parameters required for new monitoring Linux
Fill in the Linux **peer IP**, **SSH port** (default 22), **account password, etc.** on the monitoring page, and finally click OK to add.
For other parameters such as **collection interval**, **timeout period**, etc., please refer to the help document <https://hertzbeat.apache.org/docs/help/mysql/>
For other parameters such as **collection interval**, **timeout period**, etc., please refer to the help document <https://hertzbeat.com/docs/help/mysql/>
![HertzBeat](/img/blog/monitor-linux-2.png)
@@ -89,7 +89,7 @@ Of course, just looking at it is definitely not perfect. Monitoring is often acc
Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example.
- Refer to this [Help Documentation](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value.
- Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value.
- Configure the receiver parameters in HertzBeat as follows.
【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】
+3 -3
View File
@@ -28,7 +28,7 @@ Github: <https://github.com/apache/hertzbeat>
#### Prerequisite, you already have SpringBoot2 application environment and HertzBeat environment
- HertzBeat [Installation and deployment documentation](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [Installation and deployment documentation](https://hertzbeat.com/docs/start/docker-deploy)
#### 1. The `actuator` metric endpoint is exposed on the SpringBoot2 application side, which will provide metrics endpoints data
@@ -94,7 +94,7 @@ Github: <https://github.com/apache/hertzbeat>
2. Configure the parameters required for new monitoring SpringBoot2
Fill in the SpringBoot2 application **peer IP**, **service port** (default 8080), **account password, etc.** on the monitoring page, and finally click OK to add.
For other parameters such as **collection interval**, **timeout period**, etc., please refer to the help document <https://hertzbeat.apache.org/docs/help/>
For other parameters such as **collection interval**, **timeout period**, etc., please refer to the help document <https://hertzbeat.com/docs/help/>
![HertzBeat](/img/blog/monitor-springboot2-2.png)
@@ -142,7 +142,7 @@ Of course, it is impossible to manually check the metrics in real time. Monitori
Message notification methods support **email, DingTalk, WeChat Work, Feishu, WebHook, SMS**, etc. Here we take the commonly used DingTalk as an example.
- Refer to this [Help Documentation](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value.
- Refer to this [Help Documentation](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> to configure the robot on DingTalk and set the security custom keyword `HertzBeat`, get the corresponding `access_token` value.
- Configure the receiver parameters in HertzBeat as follows.
【Alarm Notification】->【New Recipient】->【Select DingTalk Robot Notification Method】->【Set DingTalk Robot ACCESS_TOKEN】->【OK】
+1 -1
View File
@@ -58,7 +58,7 @@ You can refer to the [official documentation](https://docs.greptime.com/getting-
#### Installing and Deploying HertzBeat
See the [official documentation](https://hertzbeat.apache.org/zh-cn/docs/start/docker-deploy) for details.
See the [official documentation](https://hertzbeat.com/zh-cn/docs/start/docker-deploy) for details.
1. Docker installs HertzBeat.
+1 -1
View File
@@ -93,7 +93,7 @@ As for open source commercialization, the premise of open source commercializati
* `-e MANAGER_IP=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)
Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy)
---
+1 -1
View File
@@ -76,7 +76,7 @@ keywords: [open source monitoring system, alerting system, Linux monitoring]
* `-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)
Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy)
---
+1 -1
View File
@@ -58,7 +58,7 @@ keywords: [open source monitoring system, alerting system, Linux monitoring]
* `-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)
Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy)
---
+1 -1
View File
@@ -64,7 +64,7 @@ Compatible with the Prometheus ecosystem, now we can monitor what Prometheus can
* `-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)
Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy)
---
+1 -1
View File
@@ -65,7 +65,7 @@ keywords: [open source monitoring system, alerting system]
* `-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)
Detailed config refer to [Install HertzBeat via Docker](https://hertzbeat.com/docs/start/docker-deploy)
---
+1 -1
View File
@@ -374,7 +374,7 @@ Upgrade Guide: <https://hertzbeat.apache.org/blog/2024/06/11/hertzbeat-v1.6.0-up
```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat```
Detailed refer to HertzBeat Document <https://hertzbeat.apache.org/docs>
Detailed refer to HertzBeat Document <https://hertzbeat.com/docs>
---
**Github: <https://github.com/apache/hertzbeat>**
-198
View File
@@ -1,198 +0,0 @@
---
title: Announcement of Apache Hertzbeat 1.7.2 Release
author: tomsun28
author_title: tomsun28
author_url: https://github.com/zhangshenghang
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, release]
keywords: [open source monitoring system, alerting system, Hertzbeat, release]
---
Dear Community Members,
We are thrilled to announce the official release of Apache Hertzbeat version 1.7.2!
## Downloads and Documentation
- **Apache Hertzbeat 1.7.2 Download Link**: <https://hertzbeat.apache.org/docs/download>
- **Apache Hertzbeat Documentation**: <https://hertzbeat.apache.org/docs/>
## Major Updates
### New Features and Enhancements
- **Cloud Alert Integration**: Supports Alibaba Cloud SLS Log Service alert sources (#3422), Huawei Cloud Monitor alert sources (#3443), and Volcano Engine alert sources (#3451).
- **Service Discovery Enhancements**: Added Zookeeper service discovery support (#3377), Nacos auto-discovery (#3324), and HTTP service discovery collector with authentication support (#3388).
- **AI & Data Source Expansion**: Integrated Ollama AI model (#3441), added OpenRouter AI provider support (#3439), and enabled GreptimeDB as a Grafana data source (#3403).
- **Expression & Data Processing**: Supports sql and promql expression syntax (#3410); added batch import metrics to VictoriaMetrics (#3337).
- **Platform Compatibility**: Added Darwin (macOS) platform support (#3431).
- **Monitoring Metric Enhancements**: New statusCode metric data (#3446).
- **Other new features**
### Bug Fixes
- **Alert Notification Issues**: Fixed Uptime Kuma/Zabbix/Tencent Cloud Webhook URL errors (#3351); corrected Feishu notification format (#3508).
- **Threshold Functionality**: Fixed real-time Prometheus threshold failure (#3434).
- **Monitoring Status Errors**: Resolved incorrect sub-monitor status display (#3340) and monitoring list pagination issues (#3467).
- **System Stability**: Fixed null pointer exception in custom monitoring dashboard (#3448); resolved Jacoco test report generation failure (#3455).
- **Data Parsing Issues**: Fixed ANTLR4 parsing logic (binary operators/vectors) (#3482, #3488); corrected alert expression parsing errors (#3497, #3504).
- **Data Storage Optimization**: Improved GreptimeDB storage and query logic (#3387).
- **Other bug fixes**
### Refactoring and Optimization
- **Security Validation Enhancements**: Strengthened URL validation (WeCom/Telegram/Slack/ServerChan) (#3361-3364); added JNDI security checks (#3358); verified plugin service paths (#3375).
- **Architecture & Storage Optimization**: Updated security model (#3450); optimized DB column types (commonAnnotations/alertFingerprints to TEXT) (#3463); adjusted JDBC logic (#3500).
- **Dev Toolchain**: Added Maven Wrapper (mvnw) (#3430); updated dependencies (#3359, #3498); supported mvnd and optimized backend builds (#3491).
- **Observability**: Disabled OpenTelemetry exporters by default to prevent connection errors (#3437, #3461).
- **Community Collaboration**: Updated Issue templates (#3421).
- **Other optimizations**
### Tests and Quality
- **Unit Test Coverage**: Added unit tests for HttpSdCollectImpl (#3386).
### Documentation Enhancements
- **Internationalization**: Added 30+ Japanese documentation components (API/CentOS/Cisco switches/ClickHouse, etc.) (#3352, #3376, #3389).
- **Alert Documentation**: Updated alert threshold configuration (#3399), notification templates (#3466), and Volcano Engine integration guide (#3460).
- **Deployment & Configuration**: Added Grafana anonymous auth configuration (#3407); Rainbond cloud one-click installation guide (#3440).
- **Content Refinement**: Fixed time template syntax errors (#3378); optimized Chinese terminology (#3380, #3383); updated Greptime-init docs (#3355).
- **Community**: Added contributor/committer profiles (#3357, #3391, #3395); release blogs (#3449).
- **More documentation updates**
## Acknowledgements
Special thanks to the following community members for their collaborative efforts:
> @pruidong @MasamiYui @tomsun28 @Aias00 @zhangshenghang @zqr10159 @LiuTianyou @LL-LIN @lx1229 @xiaomizhou2 @pwallk
> @bigcyy @yuluo-yx @TJxiaobao @RainBondsongyg @Duansg @Calvin979 @Cyanty
## What's Changed
```markdown
* [bugfix] Fix incorrect webhook URLs for Uptime Kuma, Zabbix, and Tencent Cloud by @bigcyy in https://github.com/apache/hertzbeat/pull/3351
* [doc] japanese api by @Calvin979 in https://github.com/apache/hertzbeat/pull/3352
* [doc] update OS monitor by @MasamiYui in https://github.com/apache/hertzbeat/pull/3353
* [doc](start): update greptime-init documentation by @zqr10159 in https://github.com/apache/hertzbeat/pull/3355
* [doc] new ppmc liutianyou and update qq num by @tomsun28 in https://github.com/apache/hertzbeat/pull/3357
* [bugfix] Incorrect SD sub-monitor status by @MasamiYui in https://github.com/apache/hertzbeat/pull/3340
* [improve] improve url validation for WeComRobotAlertNotifyHandlerImpl by @Aias00 in https://github.com/apache/hertzbeat/pull/3361
* [improve] improve url validation for TelegramBotAlertNotifyHandlerImpl by @Aias00 in https://github.com/apache/hertzbeat/pull/3362
* [improve] improve url validation for SlackAlertNotifyHandlerImpl by @Aias00 in https://github.com/apache/hertzbeat/pull/3363
* [improve] improve url validation for serverChan by @Aias00 in https://github.com/apache/hertzbeat/pull/3364
* [improve] improve jndi validation by @Aias00 in https://github.com/apache/hertzbeat/pull/3358
* update maven dep by @Aias00 in https://github.com/apache/hertzbeat/pull/3359
* [doc] japanese centos by @Calvin979 in https://github.com/apache/hertzbeat/pull/3376
* [doc] fix incorrect time template syntax usercase in doc by @LL-LIN in https://github.com/apache/hertzbeat/pull/3378
* [doc] Add blog by @LiuTianyou in https://github.com/apache/hertzbeat/pull/3379
* [improve] add path validation for pluginservice by @Aias00 in https://github.com/apache/hertzbeat/pull/3375
* [feat] Support Zookeeper Service Discovery by @bigcyy in https://github.com/apache/hertzbeat/pull/3377
* [doc] modify chinese words by @Duansg in https://github.com/apache/hertzbeat/pull/3380
* [Task] Batch import metrics data in victoria-metrics by @MasamiYui in https://github.com/apache/hertzbeat/pull/3337
* [feature] support auto nacos service discovery by @xiaomizhou2 in https://github.com/apache/hertzbeat/pull/3324
* [doc] modify supplement related documentation by @Duansg in https://github.com/apache/hertzbeat/pull/3383
* [doc] japanese cisco switch by @Calvin979 in https://github.com/apache/hertzbeat/pull/3389
* [test] Add unit tests for HttpSdCollectImpl by @xiaomizhou2 in https://github.com/apache/hertzbeat/pull/3386
* [fix](warehouse): improve GreptimeDB data storage and querying by @zqr10159 in https://github.com/apache/hertzbeat/pull/3387
* [doc] japanese clickhouse by @Calvin979 in https://github.com/apache/hertzbeat/pull/3390
* [doc] new contributor and committer, update doc by @tomsun28 in https://github.com/apache/hertzbeat/pull/3391
* [doc] japanese consul sd by @Calvin979 in https://github.com/apache/hertzbeat/pull/3392
* [doc]add new committer blog by @pwallk in https://github.com/apache/hertzbeat/pull/3395
* [doc] japanese coreos by @Calvin979 in https://github.com/apache/hertzbeat/pull/3393
* [doc] japanese dahua by @Calvin979 in https://github.com/apache/hertzbeat/pull/3396
* [doc] japanese Debian by @Calvin979 in https://github.com/apache/hertzbeat/pull/3398
* [improve] http sd collector adds authentication by @Cyanty in https://github.com/apache/hertzbeat/pull/3388
* [doc] japanese deepseek & dm by @Calvin979 in https://github.com/apache/hertzbeat/pull/3400
* [docs] update alert threshold doc by @bigcyy in https://github.com/apache/hertzbeat/pull/3399
* [doc] japanese dns by @Calvin979 in https://github.com/apache/hertzbeat/pull/3404
* [doc] japanese dns sd by @Calvin979 in https://github.com/apache/hertzbeat/pull/3405
* [doc] japanese docker by @Calvin979 in https://github.com/apache/hertzbeat/pull/3408
* [doc] japanese doris_be by @Calvin979 in https://github.com/apache/hertzbeat/pull/3409
* [Doc] Update 1.7.1 by @zhangshenghang in https://github.com/apache/hertzbeat/pull/3411
* [doc] update home doc by @tomsun28 in https://github.com/apache/hertzbeat/pull/3418
* [doc] Update anonymous user auth configuration of the grafana dashboard document by @Cyanty in https://github.com/apache/hertzbeat/pull/3407
* [doc] japanese doris_fe by @Calvin979 in https://github.com/apache/hertzbeat/pull/3416
* [infra]: Update issue tmpl by @yuluo-yx in https://github.com/apache/hertzbeat/pull/3421
* [feature]Make GreptimeDB as a grafana data source by @zqr10159 in https://github.com/apache/hertzbeat/pull/3403
* [feat] support sql("...") and promql("...") expressions including SQL condition parsing by @bigcyy in https://github.com/apache/hertzbeat/pull/3410
* [doc] japanese dynamic_tp by @Calvin979 in https://github.com/apache/hertzbeat/pull/3419
* [doc] japanese elasticsearch by @Calvin979 in https://github.com/apache/hertzbeat/pull/3423
* [feature]Support Alibaba Cloud 'Simple Log Service(SLS)' alert source by @Duansg in https://github.com/apache/hertzbeat/pull/3422
* [Improve] add mvnw by @zhangshenghang in https://github.com/apache/hertzbeat/pull/3430
* [doc] japanese emqx by @Calvin979 in https://github.com/apache/hertzbeat/pull/3433
* [improvement] disable default OpenTelemetry exporters to prevent connection errors by @bigcyy in https://github.com/apache/hertzbeat/pull/3437
* [bugfix] Fix the issue where Prometheus RealTime Threshold is not eff… by @Duansg in https://github.com/apache/hertzbeat/pull/3434
* [feat] add support for ollama and update docs by @bigcyy in https://github.com/apache/hertzbeat/pull/3441
* [release] add support for darwin by @lx1229 in https://github.com/apache/hertzbeat/pull/3431
* [feature] Support Huawei Cloud `Cloud Eye` alert source by @Duansg in https://github.com/apache/hertzbeat/pull/3443
* [doc] japanese euleros by @Calvin979 in https://github.com/apache/hertzbeat/pull/3442
* docs: Add one-click installation for Rainbond Cloud by @RainBondsongyg in https://github.com/apache/hertzbeat/pull/3440
* [feat] add support for OpenRouter AI provider by @bigcyy in https://github.com/apache/hertzbeat/pull/3439
* [doc] japanese flink by @Calvin979 in https://github.com/apache/hertzbeat/pull/3447
* [security] update hertzbeat security model by @tomsun28 in https://github.com/apache/hertzbeat/pull/3450
* [feature] support volcengine alert source by @LiuTianyou in https://github.com/apache/hertzbeat/pull/3451
* [doc] add publish version 1.7.1 blog by @tomsun28 in https://github.com/apache/hertzbeat/pull/3449
* [doc] japanese flink on yarn by @Calvin979 in https://github.com/apache/hertzbeat/pull/3452
* [doc] japanese freebsd by @Calvin979 in https://github.com/apache/hertzbeat/pull/3456
* [improvement] disable default OpenTelemetry exporters to prevent connection errors by @bigcyy in https://github.com/apache/hertzbeat/pull/3461
* [doc] add doc for integrate volcengine alerts by @LiuTianyou in https://github.com/apache/hertzbeat/pull/3460
* [Fix] fix custom monitoring bulletin `NullPointerException` by @Duansg in https://github.com/apache/hertzbeat/pull/3448
* [fix] fix jacoco can not generate test reports. by @Duansg in https://github.com/apache/hertzbeat/pull/3455
* [doc] Alert notification template by @MasamiYui in https://github.com/apache/hertzbeat/pull/3466
* [doc] japanese greenplum by @Calvin979 in https://github.com/apache/hertzbeat/pull/3468
* [improvement] change column definitions for commonAnnotations and alertFingerprints to TEXT type by @bigcyy in https://github.com/apache/hertzbeat/pull/3463
* [fix] Fix `Monitors` paging display. by @Duansg in https://github.com/apache/hertzbeat/pull/3467
* [doc] japanese greptime by @Calvin979 in https://github.com/apache/hertzbeat/pull/3469
* [doc] japanese h3c switch by @Calvin979 in https://github.com/apache/hertzbeat/pull/3471
* [feature] Add statusCode metrics data. by @Duansg in https://github.com/apache/hertzbeat/pull/3446
* [doc] japanese hadoop by @Calvin979 in https://github.com/apache/hertzbeat/pull/3476
* [docs](webhook): update Chinese documentation for alert integration by @zqr10159 in https://github.com/apache/hertzbeat/pull/3478
* [doc] japanese hbase master by @Calvin979 in https://github.com/apache/hertzbeat/pull/3477
* [doc] japanese hbase region server by @Calvin979 in https://github.com/apache/hertzbeat/pull/3479
* [doc] japanese hdfs datanode by @Calvin979 in https://github.com/apache/hertzbeat/pull/3487
* [fix] antlr4 `vectors and` parse semantic fixes and optimizations by @Duansg in https://github.com/apache/hertzbeat/pull/3482
* [ci]: add mvnd support and update backend build by @zqr10159 in https://github.com/apache/hertzbeat/pull/3491
* [doc] japanese hdfs namenode by @Calvin979 in https://github.com/apache/hertzbeat/pull/3490
* [doc] japanese hertzbeat by @Calvin979 in https://github.com/apache/hertzbeat/pull/3492
* [fix] Fix antlr4 parsing of `or` and `unless` logical and set binary operators by @Duansg in https://github.com/apache/hertzbeat/pull/3488
* [doc] japanese hertzbeat token by @Calvin979 in https://github.com/apache/hertzbeat/pull/3493
* [feat] update_mvnd_version by @Aias00 in https://github.com/apache/hertzbeat/pull/3498
* add:a small jdbc modified. by @TJxiaobao in https://github.com/apache/hertzbeat/pull/3500
* fixed:a minor issue change by @TJxiaobao in https://github.com/apache/hertzbeat/pull/3428
* [bugfix] Fix incorrect expression parsing in alert setting component by @bigcyy in https://github.com/apache/hertzbeat/pull/3497
* [bugfix] Correctly parse binary comparison expressions by @bigcyy in https://github.com/apache/hertzbeat/pull/3504
* [bugfix]Fixed an error in the format of the flying book notification by @pruidong in https://github.com/apache/hertzbeat/pull/3508
* [release] release new version 1.7.2 by @tomsun28 in https://github.com/apache/hertzbeat/pull/3510
```
## New Contributors
- @Duansg made their first contribution in <https://github.com/apache/hertzbeat/pull/3380>
- @lx1229 made their first contribution in <https://github.com/apache/hertzbeat/pull/3431>
- @RainBondsongyg made their first contribution in <https://github.com/apache/hertzbeat/pull/3440>
## Apache Hertzbeat
**Repository URL:**
<https://github.com/apache/hertzbeat>
**Official Website:**
<https://hertzbeat.apache.org/>
**Apache Hertzbeat Download Link:**
<https://hertzbeat.apache.org/docs/download>
**Apache Hertzbeat Docker Images:**
Apache Hertzbeat provides Docker images for each release, available on Docker Hub:
- HertzBeat: <https://hub.docker.com/r/apache/hertzbeat>
- HertzBeat Collector: <https://hub.docker.com/r/apache/hertzbeat-collector>
**How to Contribute to the Apache Hertzbeat Open Source Community?**
<https://hertzbeat.apache.org/docs/community/contribution>
+8 -8
View File
@@ -60,14 +60,14 @@ The following table is filled according to the [Apache Maturity Model](https://c
### Community
| **ID** | **Description** | **Status** |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **CO10** | The project has a well-known homepage that points to all the information required to operate according to this maturity model. | **YES** The [official website](https://hertzbeat.apache.org/) includes all information user need to run Apache HertzBeat. |
| **CO20** | The community welcomes contributions from anyone who acts in good faith and in a respectful manner, and who adds value to the project. | **Yes** We provide contributing guides for every component. And we also have a [general contributing guide](https://hertzbeat.apache.org/docs/community/contribution) |
| **CO30** | Contributions include source code, documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project. | **YES** All good contributions including code and non-code are welcomed. |
| **CO40** | The community strives to be meritocratic and gives more rights and responsibilities to contributors who, over time, add value to the project. | **YES** The community has elected 3 new PPMC members and 13 new committers so far. |
| **CO50** | The project documents how contributors can earn more rights such as commit access or decision power, and applies these principles consistently. | **YES** The community has clear docs on nominating committers and PPMC members |
| **CO60** | The community operates based on consensus of its members (see CS10) who have decision power. Dictators, benevolent or not, are not welcome in Apache projects. | **YES** All decisions are made after vote by community members. |
| **ID** | **Description** | **Status** |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **CO10** | The project has a well-known homepage that points to all the information required to operate according to this maturity model. | **YES** The [official website](https://hertzbeat.apache.org/) includes all information user need to run Apache HertzBeat. |
| **CO20** | The community welcomes contributions from anyone who acts in good faith and in a respectful manner, and who adds value to the project. | **Yes** We provide contributing guides for every component. And we also have a [general contributing guide](https://hertzbeat.apache.org/docs/community/contribution) |
| **CO30** | Contributions include source code, documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project. | **YES** All good contributions including code and non-code are welcomed. |
| **CO40** | The community strives to be meritocratic and gives more rights and responsibilities to contributors who, over time, add value to the project. | **YES** The community has elected 2 new PPMC members and 12 new committers so far. |
| **CO50** | The project documents how contributors can earn more rights such as commit access or decision power, and applies these principles consistently. | **YES** The community has clear docs on nominating committers and PPMC members |
| **CO60** | The community operates based on consensus of its members (see CS10) who have decision power. Dictators, benevolent or not, are not welcome in Apache projects. | **YES** All decisions are made after vote by community members. |
| **CO70** | The project strives to answer user questions in a timely manner. | **YES** We use <dev@hertzbeat.apache.org>, [GitHub issue](https://github.com/apache/hertzbeat/issues) and [GitHub discussion](https://github.com/apache/hertzbeat/discussions) to do this in a timely manner. |
### Consensus
+1 -1
View File
@@ -434,7 +434,7 @@
"message": "{docker} {br}集监控-告警-通知为一体,支持应用服务,Web,数据库,缓存,操作系统,中间件,大数据,云原生,网络等监控阈值告警通知一步到位。{br} 易用友好,无需Agent,全WEB页面操作,鼠标点一点就能监控告警,无需学习成本。{br}安全是最重要的,数据密钥全链路加密。"
},
"custom-multi-support-content": {
"message": "将 Http,Jmx,Ssh,Snmp,Jdbc 等协议规范可配置模板化,只需在线配置YML就可自定义监控指标。{br} 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。{br}灵活的告警阈值规则,邮箱,短信,钉钉,企业微信,飞书,Webhook等消息及时送达。{br} 您相信只需配置下就能适配新K8s监控类型吗?"
"message": "将 Http,Jmx,Ssh,Snmp,Jdbc 等协议规范可配置模板化,只需在线配置YML就可自定义监控指标。{br} 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。{br}自由的告警阈值规则,邮箱,短信,钉钉,企业微信,飞书,Webhook等消息及时送达。{br} 您相信只需配置下就能适配新K8s监控类型吗?"
},
"opensource-content": {
"message": "Apache HertzBeat (incubating) 是开源的,拥有一个包容开放的社区。{br}欢迎任何对此有兴趣的同学参与其中,无论是代码文档或者错别字,尊重社区的每一位,一起进步成长。{br}我们的代码正被部署到全球成千上万机器上。{github}"
@@ -9,7 +9,7 @@ tags: [opensource]
[HertzBeat 赫兹跳动](https://github.com/apache/hertzbeat) 是由 [Dromara](https://dromara.org) 孵化,[TanCloud](https://tancloud.cn) 开源的一个支持网站,API,PING,端口,数据库,全站,操作系统,中间件等监控类型,支持阈值告警,告警通知 (邮箱,webhook,钉钉,企业微信,飞书机器人),拥有易用友好的可视化操作界面的开源监控告警项目。
**官网: [hertzbeat.com](https://hertzbeat.apache.org) | [tancloud.cn](https://tancloud.cn)**
**官网: [hertzbeat.com](https://hertzbeat.com) | [tancloud.cn](https://tancloud.cn)**
从v1.0-beta.1到v1.0-beat.8,经过多个版本的迭代完善,我们很高兴宣布hertzbeat v1.0正式发布。
@@ -9,7 +9,7 @@ tags: [opensource]
[HertzBeat 赫兹跳动](https://github.com/apache/hertzbeat) 是由 [Dromara](https://dromara.org) 孵化,[TanCloud](https://tancloud.cn) 开源的一个支持网站,API,PING,端口,数据库,全站,操作系统,中间件等监控类型,支持阈值告警,告警通知 (邮箱,webhook,钉钉,企业微信,飞书机器人),拥有易用友好的可视化操作界面的开源监控告警项目。
**官网: [hertzbeat.com](https://hertzbeat.apache.org) | [tancloud.cn](https://tancloud.cn)**
**官网: [hertzbeat.com](https://hertzbeat.com) | [tancloud.cn](https://tancloud.cn)**
大家好,HertzBeat v1.1.0 发布啦!这个版本我们支持了SNMP协议,并使用SNMP协议监控支持了windwos操作系统的应用监控。
另一个重大变更是我们默认使用了H2数据库来替换MYSQL数据库作为存储,来方便使用者们的安装部署,现在只需要一条docker命令即可安装体验hertzbeat `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat`
@@ -9,7 +9,7 @@ tags: [opensource]
[HertzBeat 赫兹跳动](https://github.com/apache/hertzbeat) 是由 [Dromara](https://dromara.org) 孵化,[TanCloud](https://tancloud.cn) 开源的一个支持网站,API,PING,端口,数据库,全站,操作系统,中间件等监控类型,支持阈值告警,告警通知 (邮箱,webhook,钉钉,企业微信,飞书机器人),拥有易用友好的可视化操作界面的开源监控告警项目。
**官网: [hertzbeat.com](https://hertzbeat.apache.org) | [tancloud.cn](https://tancloud.cn)**
**官网: [hertzbeat.com](https://hertzbeat.com) | [tancloud.cn](https://tancloud.cn)**
大家好,HertzBeat v1.1.0 发布啦!这个版本我们支持了SNMP协议,并使用SNMP协议监控支持了windwos操作系统的应用监控。
另一个重大变更是我们默认使用了H2数据库来替换MYSQL数据库作为存储,来方便使用者们的安装部署,现在只需要一条docker命令即可安装体验hertzbeat `docker run -d -p 1157:1157 --name hertzbeat apache/hertzbeat`
@@ -9,7 +9,7 @@ tags: [opensource]
[HertzBeat 赫兹跳动](https://github.com/apache/hertzbeat) 是由 [Dromara](https://dromara.org) 孵化,[TanCloud](https://tancloud.cn) 开源的一个支持网站,API,PING,端口,数据库,全站,操作系统,中间件等监控类型,支持阈值告警,告警通知 (邮箱,webhook,钉钉,企业微信,飞书机器人),拥有易用友好的可视化操作界面的开源监控告警项目。
**官网: [hertzbeat.com](https://hertzbeat.apache.org) | [tancloud.cn](https://tancloud.cn)**
**官网: [hertzbeat.com](https://hertzbeat.com) | [tancloud.cn](https://tancloud.cn)**
大家好,HertzBeat v1.1.1 发布啦!这个版本带来了自定义监控增强,采集指标数据可以作为变量赋值给下一个采集。修复了若干bug,提升整体稳定性。
@@ -17,7 +17,7 @@ tags: [opensource, practice]
HertzBeat 一个拥有强大自定义监控能力,无需Agent的实时监控工具。网站监测,PING连通性,端口可用性,数据库,操作系统,中间件,API监控,阈值告警,告警通知(邮件微信钉钉飞书)。
**官网: <https://hertzbeat.apache.org> | <https://tancloud.cn>**
**官网: <https://hertzbeat.com> | <https://tancloud.cn>**
github: <https://github.com/apache/hertzbeat>
gitee: <https://gitee.com/hertzbeat/hertzbeat>
@@ -87,7 +87,7 @@ gitee: <https://gitee.com/hertzbeat/hertzbeat>
钉钉微信飞书等token配置可以参考帮助文档
<https://hertzbeat.apache.org/docs/help/alert_dingtalk>
<https://hertzbeat.com/docs/help/alert_dingtalk>
<https://tancloud.cn/docs/help/alert_dingtalk>
> 告警通知 -> 新增告警通知策略 -> 将刚才配置的接收人启用通知
@@ -98,7 +98,7 @@ github[Ceilzcx (zcx) (github.com)](https://github.com/Ceilzcx)
### 如何参与Hertzbeat
+ 官网有非常完善的贡献者指南:[贡献者指南 | HertzBeat](https://hertzbeat.apache.org/docs/community/contribution)
+ 官网有非常完善的贡献者指南:[贡献者指南 | HertzBeat](https://hertzbeat.com/docs/community/contribution)
+ Github issues[Issues · apache/hertzbeat (github.com)](https://github.com/apache/hertzbeat/issues)
@@ -26,7 +26,7 @@ keywords: [开源监控系统, 开源数据库监控, IotDB数据库监控]
#### 操作前提,您已拥有 IoTDB 环境和 HertzBeat 环境
- IoTDB [部署安装文档](https://iotdb.apache.org/UserGuide/V0.13.x/QuickStart/QuickStart.html)
- HertzBeat [部署安装文档](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [部署安装文档](https://hertzbeat.com/docs/start/docker-deploy)
#### 一. 在 IoTDB 端开启`metrics`功能,它将提供 prometheus metrics 形式的接口数据
@@ -55,7 +55,7 @@ keywords: [开源监控系统, 开源数据库监控, IotDB数据库监控]
2. 配置监控IoTDB所需参数
在监控页面填写 IoTDB **服务IP**,**监控端口**(默认9091),最后点击确定添加即可。
其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.apache.org/docs/help/iotdb/) <https://hertzbeat.apache.org/docs/help/iotdb/>
其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/iotdb/) <https://hertzbeat.com/docs/help/iotdb/>
![HertzBeat](/img/blog/monitor-iotdb-2.png)
@@ -97,7 +97,7 @@ keywords: [开源监控系统, 开源数据库监控, IotDB数据库监控]
消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。
- 参照此[帮助文档](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 在 HertzBeat 配置接收人参数如下。
【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】
@@ -33,7 +33,7 @@ tags: [opensource, practice]
#### 操作前提,您已拥有 ShenYu 环境和 HertzBeat 环境
- ShenYu [部署安装文档](https://shenyu.apache.org/zh/docs/deployment/deployment-before)
- HertzBeat [部署安装文档](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [部署安装文档](https://hertzbeat.com/docs/start/docker-deploy)
#### 一. 在 ShenYu 端开启`metrics`插件,它将提供 metrics 接口数据
@@ -77,7 +77,7 @@ tags: [opensource, practice]
2. 配置监控 ShenYu 所需参数
在监控页面填写 ShenYu **服务IP**,**监控端口**(默认8090),最后点击确定添加即可。
其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.apache.org/docs/help/shenyu/) <https://hertzbeat.apache.org/docs/help/shenyu/>
其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/shenyu/) <https://hertzbeat.com/docs/help/shenyu/>
![HertzBeat](/img/blog/monitor-shenyu-1.png)
@@ -126,7 +126,7 @@ tags: [opensource, practice]
消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。
- 参照此[帮助文档](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 在 HertzBeat 配置接收人参数如下。
【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】
@@ -30,7 +30,7 @@ tags: [opensource, practice]
#### 操作前提,您已拥有 DynamicTp 环境和 HertzBeat 环境
- DynamicTp [集成接入文档](https://dynamictp.cn/guide/use/quick-start.html)
- HertzBeat [部署安装文档](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [部署安装文档](https://hertzbeat.com/docs/start/docker-deploy)
#### 一. 在 DynamicTp 端暴露出`DynamicTp`指标接口 `/actuator/dynamic-tp`,它将提供 metrics 接口数据
@@ -89,7 +89,7 @@ tags: [opensource, practice]
2. 配置监控 DynamicTp 所需参数
在监控页面填写 DynamicTp **服务IP**,**监控端口**(默认8080),最后点击确定添加即可。
其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.apache.org/docs/help/dynamic_tp/) <https://hertzbeat.apache.org/docs/help/dynamic_tp/>
其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/dynamic_tp/) <https://hertzbeat.com/docs/help/dynamic_tp/>
![HertzBeat](/img/blog/monitor-dynamic-tp-2.png)
@@ -138,7 +138,7 @@ tags: [opensource, practice]
消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。
- 参照此[帮助文档](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 在 HertzBeat 配置接收人参数如下。
【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】
@@ -27,7 +27,7 @@ keywords: [开源监控系统, 开源数据库监控, Mysql数据库监控]
#### 操作前提,您已拥有 Mysql 环境和 HertzBeat 环境
- Mysql [安装部署文档](https://www.runoob.com/mysql/mysql-install.html)
- HertzBeat [安装部署文档](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [安装部署文档](https://hertzbeat.com/docs/start/docker-deploy)
#### 在开源监控系统 HertzBeat 监控页面添加对 Mysql 数据库监控
@@ -40,7 +40,7 @@ keywords: [开源监控系统, 开源数据库监控, Mysql数据库监控]
2. 配置新增监控 Mysql 数据库所需参数
在监控页面填写 Mysql **服务IP****监控端口**(默认3306),**账户密码等**,最后点击确定添加即可。
其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.apache.org/docs/help/mysql/) <https://hertzbeat.apache.org/docs/help/mysql/>
其他参数如**采集间隔**,**超时时间**等可以参考[帮助文档](https://hertzbeat.com/docs/help/mysql/) <https://hertzbeat.com/docs/help/mysql/>
![HertzBeat](/img/blog/monitor-mysql-2.png)
@@ -88,7 +88,7 @@ keywords: [开源监控系统, 开源数据库监控, Mysql数据库监控]
消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。
- 参照此[帮助文档](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 在 HertzBeat 配置接收人参数如下。
【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】
@@ -24,7 +24,7 @@ Github: <https://github.com/apache/hertzbeat>
#### 操作前提,您已拥有 Linux 环境和 HertzBeat 环境
- HertzBeat [安装部署文档](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [安装部署文档](https://hertzbeat.com/docs/start/docker-deploy)
#### 在开源监控系统 HertzBeat 监控页面添加对 Linux 操作系统监控
@@ -37,7 +37,7 @@ Github: <https://github.com/apache/hertzbeat>
2. 配置新增监控 Linux 所需参数
在监控页面填写 Linux **对端IP****SSH端口**(默认22),**账户密码等**,最后点击确定添加即可。
其他参数如**采集间隔**,**超时时间**等可以参考帮助文档 <https://hertzbeat.apache.org/docs/help/mysql/>
其他参数如**采集间隔**,**超时时间**等可以参考帮助文档 <https://hertzbeat.com/docs/help/mysql/>
![HertzBeat](/img/blog/monitor-linux-2.png)
@@ -149,7 +149,7 @@ Github: <https://github.com/apache/hertzbeat>
消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。
- 参照此[帮助文档](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 在 HertzBeat 配置接收人参数如下。
【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】
@@ -24,7 +24,7 @@ Github: <https://github.com/apache/hertzbeat>
#### 操作前提,您已拥有 SpringBoot2 应用环境和 HertzBeat 环境
- HertzBeat [安装部署文档](https://hertzbeat.apache.org/docs/start/docker-deploy)
- HertzBeat [安装部署文档](https://hertzbeat.com/docs/start/docker-deploy)
#### 一. 在 SpringBoot2 应用端暴露出`actuator`指标接口,它将提供 metrics 接口数据
@@ -90,7 +90,7 @@ Github: <https://github.com/apache/hertzbeat>
2. 配置新增监控 SpringBoot2 所需参数
在监控页面填写 SpringBoot2应用 **对端IP****服务端口**(默认8080),**账户密码等**,最后点击确定添加即可。
其他参数如**采集间隔**,**超时时间**等可以参考帮助文档 <https://hertzbeat.apache.org/docs/help/>
其他参数如**采集间隔**,**超时时间**等可以参考帮助文档 <https://hertzbeat.com/docs/help/>
![HertzBeat](/img/blog/monitor-springboot2-2.png)
@@ -138,7 +138,7 @@ Github: <https://github.com/apache/hertzbeat>
消息通知方式支持 **邮件,钉钉,企业微信,飞书,WebHook,短信**等,我们这里以常用的钉钉为例。
- 参照此[帮助文档](https://hertzbeat.apache.org/docs/help/alert_dingtalk) <https://hertzbeat.apache.org/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 参照此[帮助文档](https://hertzbeat.com/docs/help/alert_dingtalk) <https://hertzbeat.com/docs/help/alert_dingtalk> 在钉钉端配置机器人,设置安全自定义关键词`HertzBeat`,获取对应`access_token`值。
- 在 HertzBeat 配置接收人参数如下。
【告警通知】->【新增接收人】 ->【选择钉钉机器人通知方式】->【设置钉钉机器人ACCESS_TOKEN】-> 【确定】
@@ -58,7 +58,7 @@ Cloud: **[TanCloud](https://console.tancloud.cn/)**
#### 安装部署 HertzBeat
具体可以参考 [官方文档](https://hertzbeat.apache.org/zh-cn/docs/start/docker-deploy)
具体可以参考 [官方文档](https://hertzbeat.com/zh-cn/docs/start/docker-deploy)
1. Docker 安装 HertzBeat
@@ -20,7 +20,7 @@ keywords: [open source monitoring system, alerting system, Linux monitoring]
- 易用友好,无需 `Agent`,全 `WEB` 页面操作,鼠标点一点就能监控告警,无需学习成本。
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` 等方式消息及时送达。
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助开发者和团队快速搭建自有监控系统。
@@ -95,7 +95,7 @@ HertzBeat 提供云边协同能力,可以在多个隔离网络部署边缘采
- `-e MANAGER_IP=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。
- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.apache.org/docs/start/docker-deploy)
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy)
---
@@ -79,7 +79,7 @@ HertzBeat 赫兹跳动是一个拥有强大自定义监控能力,高性能集
* 易用友好,无需 `Agent`,全 `WEB` 页面操作,鼠标点一点就能监控告警,无需学习成本。
* 将 `Http,Jmx,Ssh,Snmp,Jdbc` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
* 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
* 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
* 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助开发者和团队快速搭建自有监控系统。
@@ -56,7 +56,7 @@ keywords: [open source monitoring system, alerting system, Linux monitoring]
- 易用友好,无需 `Agent`,全 `WEB` 页面操作,鼠标点一点就能监控告警,无需学习成本。
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` 等方式消息及时送达。
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助开发者和团队快速搭建自有监控系统。
@@ -88,7 +88,7 @@ keywords: [open source monitoring system, alerting system, Linux monitoring]
- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。
- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.apache.org/docs/start/docker-deploy)
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy)
---
@@ -33,7 +33,7 @@ keywords: [open source monitoring system, alerting system, Linux monitoring]
- 易用友好,无需 `Agent`,全 `WEB` 页面操作,鼠标点一点就能监控告警,无需学习成本。
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助开发者和团队快速搭建自有监控系统。
@@ -65,7 +65,7 @@ keywords: [open source monitoring system, alerting system, Linux monitoring]
- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。
- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.apache.org/docs/start/docker-deploy)
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy)
---
@@ -19,7 +19,7 @@ keywords: [open source monitoring system, alerting system]
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 兼容 `Prometheus` 的系统生态并且更多,只需页面操作就可以监控 `Prometheus` 所能监控的。
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
**Github: <https://github.com/apache/hertzbeat>**
@@ -60,7 +60,7 @@ keywords: [open source monitoring system, alerting system]
- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。
- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.apache.org/docs/start/docker-deploy)
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy)
---
@@ -125,7 +125,7 @@ keywords: [open source monitoring system, alerting system]
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 兼容 `Prometheus` 的系统生态并且更多,只需页面操作就可以监控 `Prometheus` 所能监控的。
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助开发者和团队快速搭建自有监控系统。
@@ -19,7 +19,7 @@ keywords: [open source monitoring system, alerting system]
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 兼容 `Prometheus` 的系统生态并且更多,只需页面操作就可以监控 `Prometheus` 所能监控的。
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
**Github: <https://github.com/apache/hertzbeat>**
@@ -61,7 +61,7 @@ keywords: [open source monitoring system, alerting system]
- `-e MANAGER_HOST=127.0.0.1` : 配置连接主HertzBeat服务的对外IP。
- `-e MANAGER_PORT=1158` : 配置连接主HertzBeat服务的对外端口,默认1158。
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.apache.org/docs/start/docker-deploy)
更多配置详细步骤参考 [通过Docker方式安装HertzBeat](https://hertzbeat.com/docs/start/docker-deploy)
---
@@ -31,7 +31,7 @@ HertzBeat 于 2022 年 1 月在 Dromara 开源社区正式开源,经过两年
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 兼容 `Prometheus` 的系统生态并且更多,只需页面操作就可以监控 `Prometheus` 所能监控的。
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 提供强大的状态页构建能力,轻松向用户传达您产品服务的实时状态。
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助用户快速搭建自有监控系统。
@@ -11,7 +11,7 @@
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 兼容 `Prometheus` 的系统生态并且更多,只需页面操作就可以监控 `Prometheus` 所能监控的。
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
**Github: <https://github.com/apache/hertzbeat>**
@@ -32,7 +32,7 @@ keywords: [open source, monitoring, alerting]
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 兼容 `Prometheus` 的系统生态并且更多,只需页面操作就可以监控 `Prometheus` 所能监控的。
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 提供强大的状态页构建能力,轻松向用户传达您产品服务的实时状态。
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助用户快速搭建自有监控系统。
@@ -374,7 +374,7 @@ keywords: [open source, monitoring, alerting]
```docker run -d -p 1157:1157 -p 1158:1158 --name hertzbeat quay.io/tancloud/hertzbeat```
详细参考 HertzBeat 官网文档 <https://hertzbeat.apache.org/docs>
详细参考 HertzBeat 官网文档 <https://hertzbeat.com/docs>
---
**Github: <https://github.com/apache/hertzbeat>**
@@ -1,193 +0,0 @@
---
title: Apache Hertzbeat 1.7.2 发布公告
author: tomsun28
author_title: tomsun28
author_url: https://github.com/zhangshenghang
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, release]
keywords: [open source monitoring system, alerting system, Hertzbeat, release]
---
亲爱的社区小伙伴们,
我们很高兴地宣布 Apache Hertzbeat 1.7.2 版本正式发布!
## Downloads and Documentation
- **Apache Hertzbeat 1.7.2 Download Link**: <https://hertzbeat.apache.org/zh-cn/docs/download>
- **Apache Hertzbeat Documentation**: <https://hertzbeat.apache.org/zh-cn/docs/>
## Major Updates
### New Features and Enhancements
- **云服务告警集成**:支持阿里云 SLS 日志服务告警源 (#3422)、华为云云监控告警源 (#3443)、火山引擎告警源 (#3451)。
- **服务发现增强**:新增 Zookeeper 服务发现支持 (#3377)、Nacos 自动服务发现 (#3324)、支持认证的 HTTP 服务发现采集器 (#3388)。
- **AI 与数据源扩展**:集成 Ollama AI 模型 (#3441)、支持 OpenRouter AI 提供商 (#3439)、提供 GreptimeDB 作为 Grafana 数据源 (#3403)。
- **表达式与数据处理**:支持 sql 和 promql 表达式语法 (#3410)、新增批量导入指标至 VictoriaMetrics 功能 (#3337)。
- **平台兼容性**:新增 Darwin (macOS) 平台兼容支持 (#3431)。
- **监控指标增强**:新增 statusCode 指标数据 (#3446)。
- **更多新功能**
### Bug Fixes
- **告警通知问题**:修复 Uptime Kuma/Zabbix/腾讯云 Webhook URL 错误 (#3351)、飞书通知格式错误 (#3508)。
- **阈值功能异常**:修复 Prometheus 实时阈值不生效问题 (#3434)。
- **监控状态异常**:修复服务发现子监控状态显示错误 (#3340)、监控列表分页显示异常 (#3467)。
- **系统稳定性**:修复自定义监控公告板空指针异常 (#3448)、Jacoco 测试报告生成失败 (#3455)。
- **数据解析问题**:修复 ANTLR4 解析逻辑错误(二元运算符/向量)(#3482, #3488)、告警表达式解析异常 (#3497, #3504)。
- **数据存储优化**:改进 GreptimeDB 存储与查询逻辑 (#3387)。
- **和其它的BUG修复**
### Refactoring and Optimization
- **安全验证增强**:强化 URL 验证(企业微信/Telegram/Slack/Server酱)(#3361-3364)、JNDI 安全验证 (#3358)、插件服务路径验证 (#3375)。
- **架构与存储优化**:更新安全模型 (#3450)、数据库列类型优化(commonAnnotations/alertFingerprints 改为 TEXT(#3463)、JDBC 逻辑调整 (#3500)。
- **开发工具链**:添加 Maven Wrapper (mvnw) (#3430)、依赖库更新 (#3359, #3498)、支持 mvnd 并优化后端构建 (#3491)。
- **可观测性**:默认禁用 OpenTelemetry exporters 防止连接错误 (#3437, #3461)。
- **社区协作**:更新 Issue 模板 (#3421)。
- **和其它的优化**
### Tests and Quality
- **单元测试覆盖**:为 HttpSdCollectImpl 添加单元测试 (#3386)
- **和其它的测试**
### Documentation Enhancements
- **国际化文档**:新增 30+ 组件日文文档(API/CentOS/Cisco 交换机/ClickHouse 等)(#3352, #3376, #3389 等)。
- **告警功能文档**:更新告警阈值配置 (#3399)、告警通知模板 (#3466)、火山引擎告警集成指南 (#3460)。
- **部署与配置**:新增 Grafana 匿名认证配置说明 (#3407)、Rainbond 云一键安装指南 (#3440)。
- **内容修正与优化**:修复时间模板语法错误 (#3378)、精炼中文术语 (#3380, #3383)、更新 Greptime-init 文档 (#3355)。
- **社区生态**:新增贡献者/Committer 简介 (#3357, #3391, #3395)、版本发布博客 (#3449)。
- **更多的文档更新**
## Acknowledgements
感谢以下社区成员的共同努力:
> @pruidong @MasamiYui @tomsun28 @Aias00 @zhangshenghang @zqr10159 @LiuTianyou @LL-LIN @lx1229 @xiaomizhou2 @pwallk
> @bigcyy @yuluo-yx @TJxiaobao @RainBondsongyg @Duansg @Calvin979 @Cyanty
## What's Changed
```markdown
* [bugfix] Fix incorrect webhook URLs for Uptime Kuma, Zabbix, and Tencent Cloud by @bigcyy in https://github.com/apache/hertzbeat/pull/3351
* [doc] japanese api by @Calvin979 in https://github.com/apache/hertzbeat/pull/3352
* [doc] update OS monitor by @MasamiYui in https://github.com/apache/hertzbeat/pull/3353
* [doc](start): update greptime-init documentation by @zqr10159 in https://github.com/apache/hertzbeat/pull/3355
* [doc] new ppmc liutianyou and update qq num by @tomsun28 in https://github.com/apache/hertzbeat/pull/3357
* [bugfix] Incorrect SD sub-monitor status by @MasamiYui in https://github.com/apache/hertzbeat/pull/3340
* [improve] improve url validation for WeComRobotAlertNotifyHandlerImpl by @Aias00 in https://github.com/apache/hertzbeat/pull/3361
* [improve] improve url validation for TelegramBotAlertNotifyHandlerImpl by @Aias00 in https://github.com/apache/hertzbeat/pull/3362
* [improve] improve url validation for SlackAlertNotifyHandlerImpl by @Aias00 in https://github.com/apache/hertzbeat/pull/3363
* [improve] improve url validation for serverChan by @Aias00 in https://github.com/apache/hertzbeat/pull/3364
* [improve] improve jndi validation by @Aias00 in https://github.com/apache/hertzbeat/pull/3358
* update maven dep by @Aias00 in https://github.com/apache/hertzbeat/pull/3359
* [doc] japanese centos by @Calvin979 in https://github.com/apache/hertzbeat/pull/3376
* [doc] fix incorrect time template syntax usercase in doc by @LL-LIN in https://github.com/apache/hertzbeat/pull/3378
* [doc] Add blog by @LiuTianyou in https://github.com/apache/hertzbeat/pull/3379
* [improve] add path validation for pluginservice by @Aias00 in https://github.com/apache/hertzbeat/pull/3375
* [feat] Support Zookeeper Service Discovery by @bigcyy in https://github.com/apache/hertzbeat/pull/3377
* [doc] modify chinese words by @Duansg in https://github.com/apache/hertzbeat/pull/3380
* [Task] Batch import metrics data in victoria-metrics by @MasamiYui in https://github.com/apache/hertzbeat/pull/3337
* [feature] support auto nacos service discovery by @xiaomizhou2 in https://github.com/apache/hertzbeat/pull/3324
* [doc] modify supplement related documentation by @Duansg in https://github.com/apache/hertzbeat/pull/3383
* [doc] japanese cisco switch by @Calvin979 in https://github.com/apache/hertzbeat/pull/3389
* [test] Add unit tests for HttpSdCollectImpl by @xiaomizhou2 in https://github.com/apache/hertzbeat/pull/3386
* [fix](warehouse): improve GreptimeDB data storage and querying by @zqr10159 in https://github.com/apache/hertzbeat/pull/3387
* [doc] japanese clickhouse by @Calvin979 in https://github.com/apache/hertzbeat/pull/3390
* [doc] new contributor and committer, update doc by @tomsun28 in https://github.com/apache/hertzbeat/pull/3391
* [doc] japanese consul sd by @Calvin979 in https://github.com/apache/hertzbeat/pull/3392
* [doc]add new committer blog by @pwallk in https://github.com/apache/hertzbeat/pull/3395
* [doc] japanese coreos by @Calvin979 in https://github.com/apache/hertzbeat/pull/3393
* [doc] japanese dahua by @Calvin979 in https://github.com/apache/hertzbeat/pull/3396
* [doc] japanese Debian by @Calvin979 in https://github.com/apache/hertzbeat/pull/3398
* [improve] http sd collector adds authentication by @Cyanty in https://github.com/apache/hertzbeat/pull/3388
* [doc] japanese deepseek & dm by @Calvin979 in https://github.com/apache/hertzbeat/pull/3400
* [docs] update alert threshold doc by @bigcyy in https://github.com/apache/hertzbeat/pull/3399
* [doc] japanese dns by @Calvin979 in https://github.com/apache/hertzbeat/pull/3404
* [doc] japanese dns sd by @Calvin979 in https://github.com/apache/hertzbeat/pull/3405
* [doc] japanese docker by @Calvin979 in https://github.com/apache/hertzbeat/pull/3408
* [doc] japanese doris_be by @Calvin979 in https://github.com/apache/hertzbeat/pull/3409
* [Doc] Update 1.7.1 by @zhangshenghang in https://github.com/apache/hertzbeat/pull/3411
* [doc] update home doc by @tomsun28 in https://github.com/apache/hertzbeat/pull/3418
* [doc] Update anonymous user auth configuration of the grafana dashboard document by @Cyanty in https://github.com/apache/hertzbeat/pull/3407
* [doc] japanese doris_fe by @Calvin979 in https://github.com/apache/hertzbeat/pull/3416
* [infra]: Update issue tmpl by @yuluo-yx in https://github.com/apache/hertzbeat/pull/3421
* [feature]Make GreptimeDB as a grafana data source by @zqr10159 in https://github.com/apache/hertzbeat/pull/3403
* [feat] support sql("...") and promql("...") expressions including SQL condition parsing by @bigcyy in https://github.com/apache/hertzbeat/pull/3410
* [doc] japanese dynamic_tp by @Calvin979 in https://github.com/apache/hertzbeat/pull/3419
* [doc] japanese elasticsearch by @Calvin979 in https://github.com/apache/hertzbeat/pull/3423
* [feature]Support Alibaba Cloud 'Simple Log Service(SLS)' alert source by @Duansg in https://github.com/apache/hertzbeat/pull/3422
* [Improve] add mvnw by @zhangshenghang in https://github.com/apache/hertzbeat/pull/3430
* [doc] japanese emqx by @Calvin979 in https://github.com/apache/hertzbeat/pull/3433
* [improvement] disable default OpenTelemetry exporters to prevent connection errors by @bigcyy in https://github.com/apache/hertzbeat/pull/3437
* [bugfix] Fix the issue where Prometheus RealTime Threshold is not eff… by @Duansg in https://github.com/apache/hertzbeat/pull/3434
* [feat] add support for ollama and update docs by @bigcyy in https://github.com/apache/hertzbeat/pull/3441
* [release] add support for darwin by @lx1229 in https://github.com/apache/hertzbeat/pull/3431
* [feature] Support Huawei Cloud `Cloud Eye` alert source by @Duansg in https://github.com/apache/hertzbeat/pull/3443
* [doc] japanese euleros by @Calvin979 in https://github.com/apache/hertzbeat/pull/3442
* docs: Add one-click installation for Rainbond Cloud by @RainBondsongyg in https://github.com/apache/hertzbeat/pull/3440
* [feat] add support for OpenRouter AI provider by @bigcyy in https://github.com/apache/hertzbeat/pull/3439
* [doc] japanese flink by @Calvin979 in https://github.com/apache/hertzbeat/pull/3447
* [security] update hertzbeat security model by @tomsun28 in https://github.com/apache/hertzbeat/pull/3450
* [feature] support volcengine alert source by @LiuTianyou in https://github.com/apache/hertzbeat/pull/3451
* [doc] add publish version 1.7.1 blog by @tomsun28 in https://github.com/apache/hertzbeat/pull/3449
* [doc] japanese flink on yarn by @Calvin979 in https://github.com/apache/hertzbeat/pull/3452
* [doc] japanese freebsd by @Calvin979 in https://github.com/apache/hertzbeat/pull/3456
* [improvement] disable default OpenTelemetry exporters to prevent connection errors by @bigcyy in https://github.com/apache/hertzbeat/pull/3461
* [doc] add doc for integrate volcengine alerts by @LiuTianyou in https://github.com/apache/hertzbeat/pull/3460
* [Fix] fix custom monitoring bulletin `NullPointerException` by @Duansg in https://github.com/apache/hertzbeat/pull/3448
* [fix] fix jacoco can not generate test reports. by @Duansg in https://github.com/apache/hertzbeat/pull/3455
* [doc] Alert notification template by @MasamiYui in https://github.com/apache/hertzbeat/pull/3466
* [doc] japanese greenplum by @Calvin979 in https://github.com/apache/hertzbeat/pull/3468
* [improvement] change column definitions for commonAnnotations and alertFingerprints to TEXT type by @bigcyy in https://github.com/apache/hertzbeat/pull/3463
* [fix] Fix `Monitors` paging display. by @Duansg in https://github.com/apache/hertzbeat/pull/3467
* [doc] japanese greptime by @Calvin979 in https://github.com/apache/hertzbeat/pull/3469
* [doc] japanese h3c switch by @Calvin979 in https://github.com/apache/hertzbeat/pull/3471
* [feature] Add statusCode metrics data. by @Duansg in https://github.com/apache/hertzbeat/pull/3446
* [doc] japanese hadoop by @Calvin979 in https://github.com/apache/hertzbeat/pull/3476
* [docs](webhook): update Chinese documentation for alert integration by @zqr10159 in https://github.com/apache/hertzbeat/pull/3478
* [doc] japanese hbase master by @Calvin979 in https://github.com/apache/hertzbeat/pull/3477
* [doc] japanese hbase region server by @Calvin979 in https://github.com/apache/hertzbeat/pull/3479
* [doc] japanese hdfs datanode by @Calvin979 in https://github.com/apache/hertzbeat/pull/3487
* [fix] antlr4 `vectors and` parse semantic fixes and optimizations by @Duansg in https://github.com/apache/hertzbeat/pull/3482
* [ci]: add mvnd support and update backend build by @zqr10159 in https://github.com/apache/hertzbeat/pull/3491
* [doc] japanese hdfs namenode by @Calvin979 in https://github.com/apache/hertzbeat/pull/3490
* [doc] japanese hertzbeat by @Calvin979 in https://github.com/apache/hertzbeat/pull/3492
* [fix] Fix antlr4 parsing of `or` and `unless` logical and set binary operators by @Duansg in https://github.com/apache/hertzbeat/pull/3488
* [doc] japanese hertzbeat token by @Calvin979 in https://github.com/apache/hertzbeat/pull/3493
* [feat] update_mvnd_version by @Aias00 in https://github.com/apache/hertzbeat/pull/3498
* add:a small jdbc modified. by @TJxiaobao in https://github.com/apache/hertzbeat/pull/3500
* fixed:a minor issue change by @TJxiaobao in https://github.com/apache/hertzbeat/pull/3428
* [bugfix] Fix incorrect expression parsing in alert setting component by @bigcyy in https://github.com/apache/hertzbeat/pull/3497
* [bugfix] Correctly parse binary comparison expressions by @bigcyy in https://github.com/apache/hertzbeat/pull/3504
* [bugfix]Fixed an error in the format of the flying book notification by @pruidong in https://github.com/apache/hertzbeat/pull/3508
* [release] release new version 1.7.2 by @tomsun28 in https://github.com/apache/hertzbeat/pull/3510
```
## Apache Hertzbeat
**仓库地址:**
<https://github.com/apache/hertzbeat>
**网址:**
<https://hertzbeat.apache.org/>
**Apache Hertzbeat 下载地址:**
<https://hertzbeat.apache.org/zh-cn/docs/download>
**Apache Hertzbeat Docker 镜像版本:**
> Apache HertzBeat 为每个版本制作了 Docker 镜像. 你可以从 Docker Hub 拉取使用.
- HertzBeat <https://hub.docker.com/r/apache/hertzbeat>
- HertzBeat Collector <https://hub.docker.com/r/apache/hertzbeat-collector>
**Apache Hertzbeat 开源社区如何参与?**
<https://hertzbeat.apache.org/zh-cn/docs/community/contribution>
@@ -60,14 +60,14 @@ The following table is filled according to the [Apache Maturity Model](https://c
### Community
| **ID** | **Description** | **Status** |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **CO10** | The project has a well-known homepage that points to all the information required to operate according to this maturity model. | **YES** The [official website](https://hertzbeat.apache.org/) includes all information user need to run Apache HertzBeat. |
| **CO20** | The community welcomes contributions from anyone who acts in good faith and in a respectful manner, and who adds value to the project. | **Yes** We provide contributing guides for every component. And we also have a [general contributing guide](https://hertzbeat.apache.org/docs/community/contribution) |
| **CO30** | Contributions include source code, documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project. | **YES** All good contributions including code and non-code are welcomed. |
| **CO40** | The community strives to be meritocratic and gives more rights and responsibilities to contributors who, over time, add value to the project. | **YES** The community has elected 3 new PPMC members and 13 new committers so far. |
| **CO50** | The project documents how contributors can earn more rights such as commit access or decision power, and applies these principles consistently. | **YES** The community has clear docs on nominating committers and PPMC members |
| **CO60** | The community operates based on consensus of its members (see CS10) who have decision power. Dictators, benevolent or not, are not welcome in Apache projects. | **YES** All decisions are made after vote by community members. |
| **ID** | **Description** | **Status** |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **CO10** | The project has a well-known homepage that points to all the information required to operate according to this maturity model. | **YES** The [official website](https://hertzbeat.apache.org/) includes all information user need to run Apache HertzBeat. |
| **CO20** | The community welcomes contributions from anyone who acts in good faith and in a respectful manner, and who adds value to the project. | **Yes** We provide contributing guides for every component. And we also have a [general contributing guide](https://hertzbeat.apache.org/docs/community/contribution) |
| **CO30** | Contributions include source code, documentation, constructive bug reports, constructive discussions, marketing and generally anything that adds value to the project. | **YES** All good contributions including code and non-code are welcomed. |
| **CO40** | The community strives to be meritocratic and gives more rights and responsibilities to contributors who, over time, add value to the project. | **YES** The community has elected 2 new PPMC members and 12 new committers so far. |
| **CO50** | The project documents how contributors can earn more rights such as commit access or decision power, and applies these principles consistently. | **YES** The community has clear docs on nominating committers and PPMC members |
| **CO60** | The community operates based on consensus of its members (see CS10) who have decision power. Dictators, benevolent or not, are not welcome in Apache projects. | **YES** All decisions are made after vote by community members. |
| **CO70** | The project strives to answer user questions in a timely manner. | **YES** We use <dev@hertzbeat.apache.org>, [GitHub issue](https://github.com/apache/hertzbeat/issues) and [GitHub discussion](https://github.com/apache/hertzbeat/discussions) to do this in a timely manner. |
### Consensus
@@ -20,7 +20,7 @@ slug: /
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 兼容 `Prometheus` 的系统生态并且更多,只需页面操作就可以监控 `Prometheus` 所能监控的。
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 提供强大的状态页构建能力,轻松向用户传达您产品服务的实时状态。
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助开发者和团队快速搭建自有监控系统。
@@ -27,7 +27,7 @@ slug: /
- 将 `Http, Jmx, Ssh, Snmp, Jdbc, Prometheus` 等协议规范可配置化,只需在浏览器配置监控模板 `YML` 就能使用这些协议去自定义采集想要的指标。您相信只需简单配置即可快速适配一款 `K8s``Docker` 等新的监控类型吗?
- 兼容 `Prometheus` 的系统生态并且更多,只需页面操作就可以监控 `Prometheus` 所能监控的。
- 高性能,支持多采集器集群横向扩展,支持多隔离网络监控,云边协同。
- 灵活的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 自由的告警阈值规则,`邮件` `Discord` `Slack` `Telegram` `钉钉` `微信` `飞书` `短信` `Webhook` `Server酱` 等方式消息及时送达。
- 提供强大的状态页构建能力,轻松向用户传达您产品服务的实时状态。
> `HertzBeat`的强大自定义,多类型支持,高性能,易扩展,低耦合,希望能帮助开发者和团队快速搭建自有监控系统。
+5 -10
View File
@@ -86,11 +86,6 @@
"githubId": "30208283",
"gitUrl": "https://github.com/LiuTianyou",
"name": "LiuTianyou"
},
{
"githubId": "25810623",
"gitUrl": "https://github.com/Aias00",
"name": "Aias00"
}
],
"committer" : [
@@ -119,6 +114,11 @@
"gitUrl": "https://github.com/yuluo-yx",
"name": "Shown"
},
{
"githubId": "25810623",
"gitUrl": "https://github.com/Aias00",
"name": "Aias00"
},
{
"githubId": "61108539",
"gitUrl": "https://github.com/zuobiao-zhou",
@@ -133,11 +133,6 @@
"githubId": "69385076",
"gitUrl": "https://github.com/pwallk",
"name": "Kang Li"
},
{
"githubId": "73413979",
"gitUrl": "https://github.com/bigcyy",
"name": "Yang Chen"
}
]
}
@@ -125,9 +125,6 @@ warehouse:
url: http://victoria-metrics:8428
username: root
password: root
insert:
buffer-size: 100
flush-interval: 3
# store real-time metrics data, enable only one below
real-time:
memory:
@@ -124,9 +124,6 @@ warehouse:
url: http://victoria-metrics:8428
username: root
password: root
insert:
buffer-size: 100
flush-interval: 3
# store real-time metrics data, enable only one below
real-time:
memory:
@@ -100,7 +100,7 @@
<div class="tp-feature__content">
<h4 class="tp-feature__title">高性能与自定义</h4>
<p
>将 Http,Jmx,Ssh,Snmp,Jdbc 等协议规范可配置模版化,只需在线配置YML就可自定义监控指标; 灵活的告警阈值规则,消息及时送达</p
>将 Http,Jmx,Ssh,Snmp,Jdbc 等协议规范可配置模版化,只需在线配置YML就可自定义监控指标; 自由的告警阈值规则,消息及时送达</p
>
</div>
</div>
@@ -1,6 +1,4 @@
<div class="alain-default__content">
<router-outlet></router-outlet>
</div>
<router-outlet></router-outlet>
<div class="ai-chatbot-container">
<div class="ai-chatbot-button" (click)="toggleChatbot()">
File diff suppressed because it is too large Load Diff
+75 -20
View File
@@ -13,52 +13,107 @@ import { AiBotService, ChatMessage } from '../../shared/services/ai-bot.service'
selector: 'layout-basic',
template: `
<layout-default [options]="options" [nav]="navTpl" [content]="contentTpl" [customError]="null">
<!-- 左侧菜单项 - GitHub链接 -->
<layout-default-header-item direction="left">
<a layout-default-header-item-trigger href="//github.com/apache/hertzbeat" target="_blank">
<i nz-icon nzType="github"></i>
<a
layout-default-header-item-trigger
href="//github.com/apache/hertzbeat"
target="_blank"
class="modern-header-item github-link"
>
<div class="icon-wrapper">
<i nz-icon nzType="github" class="header-icon"></i>
</div>
<span class="item-tooltip">GitHub</span>
</a>
</layout-default-header-item>
<!-- 移动端搜索按钮 -->
<layout-default-header-item direction="left" hidden="pc">
<div layout-default-header-item-trigger (click)="searchToggleStatus = !searchToggleStatus">
<i nz-icon nzType="search"></i>
<div
layout-default-header-item-trigger
(click)="searchToggleStatus = !searchToggleStatus"
class="modern-header-item search-toggle"
>
<div class="icon-wrapper">
<i nz-icon nzType="search" class="header-icon"></i>
</div>
</div>
</layout-default-header-item>
<!-- 中间搜索栏 -->
<layout-default-header-item direction="middle">
<header-search class="alain-default__search" [toggleChange]="searchToggleStatus"></header-search>
<header-search class="alain-default__search modern-search" [toggleChange]="searchToggleStatus"></header-search>
</layout-default-header-item>
<!-- 右侧通知 -->
<layout-default-header-item direction="right" hidden="mobile">
<header-notify></header-notify>
<header-notify class="modern-header-item notification-item">
</header-notify>
</layout-default-header-item>
<!-- 锁定按钮 -->
<layout-default-header-item direction="right" hidden="mobile">
<a layout-default-header-item-trigger routerLink="/passport/lock">
<i nz-icon nzType="lock"></i>
<a
layout-default-header-item-trigger
routerLink="/passport/lock"
class="modern-header-item lock-item"
>
<div class="icon-wrapper">
<i nz-icon nzType="lock" class="header-icon"></i>
</div>
<span class="item-tooltip">{{ 'menu.lock' | i18n }}</span>
</a>
</layout-default-header-item>
<!-- 设置下拉菜单 -->
<layout-default-header-item direction="right" hidden="mobile">
<div layout-default-header-item-trigger nz-dropdown [nzDropdownMenu]="settingsMenu" nzTrigger="click" nzPlacement="bottomRight">
<i nz-icon nzType="setting"></i>
<div
layout-default-header-item-trigger
nz-dropdown
[nzDropdownMenu]="settingsMenu"
nzTrigger="click"
nzPlacement="bottomRight"
class="modern-header-item settings-item"
>
<div class="icon-wrapper">
<i nz-icon nzType="setting" class="header-icon spinning-on-hover"></i>
</div>
<span class="item-tooltip">{{ 'menu.settings' | i18n }}</span>
</div>
<nz-dropdown-menu #settingsMenu="nzDropdownMenu">
<div nz-menu style="width: 200px;">
<div nz-menu-item>
<header-fullscreen></header-fullscreen>
<div nz-menu class="modern-dropdown-menu">
<div nz-menu-item class="modern-menu-item">
<div class="menu-item-content">
<i nz-icon nzType="fullscreen" class="menu-icon"></i>
<header-fullscreen></header-fullscreen>
</div>
</div>
<div nz-menu-item routerLink="/setting/labels">
<i nz-icon nzType="tag" class="mr-sm"></i>
<span style="margin-left: 4px">{{ 'menu.advanced.labels' | i18n }}</span>
<li nz-menu-divider class="modern-divider"></li>
<div nz-menu-item routerLink="/setting/labels" class="modern-menu-item">
<div class="menu-item-content">
<i nz-icon nzType="tag" class="menu-icon"></i>
<span class="menu-text">{{ 'menu.advanced.labels' | i18n }}</span>
</div>
</div>
<div nz-menu-item>
<header-i18n></header-i18n>
<li nz-menu-divider class="modern-divider"></li>
<div nz-menu-item class="modern-menu-item">
<div class="menu-item-content">
<i nz-icon nzType="global" class="menu-icon"></i>
<header-i18n></header-i18n>
</div>
</div>
</div>
</nz-dropdown-menu>
</layout-default-header-item>
<!-- 用户菜单 -->
<layout-default-header-item direction="right">
<header-user></header-user>
<header-user class="modern-header-item user-item">
</header-user>
</layout-default-header-item>
<ng-template #navTpl>
<layout-default-nav class="d-block py-lg" openStrictly="true"></layout-default-nav>
<layout-default-nav class="d-block py-lg modern-nav" openStrictly="true"></layout-default-nav>
</ng-template>
<ng-template #contentTpl>
<router-outlet></router-outlet>
@@ -77,12 +77,6 @@
{{ 'monitor.export' | i18n }}
</button>
</li>
<li nz-menu-item>
<button nz-button (click)="onExportAllMonitors()">
<i nz-icon nzType="export" nzTheme="outline"></i>
{{ 'monitor.export-all' | i18n }}
</button>
</li>
<li nz-menu-item>
<nz-upload nzAction="/monitors/import" [nzLimit]="1" [nzShowUploadList]="false" (nzChange)="onImportMonitors($event)">
<button nz-button>
@@ -293,12 +287,7 @@
>
<ng-container *nzModalContent>
<div class="export-type-container">
<div
class="export-type-card"
(click)="exportMonitors('JSON')"
[class.loading]="exportJsonButtonLoading"
*ngIf="checkedMonitorIds.size > 0"
>
<div class="export-type-card" (click)="exportMonitors('JSON')" [class.loading]="exportJsonButtonLoading">
<div class="export-type-icon">
<i nz-icon nzType="code" nzTheme="outline"></i>
</div>
@@ -307,12 +296,7 @@
<p>{{ 'monitor.export.use-type' | i18n : { type: 'JSON' } }}</p>
</div>
</div>
<div
class="export-type-card"
(click)="exportMonitors('EXCEL')"
[class.loading]="exportExcelButtonLoading"
*ngIf="checkedMonitorIds.size > 0"
>
<div class="export-type-card" (click)="exportMonitors('EXCEL')" [class.loading]="exportExcelButtonLoading">
<div class="export-type-icon">
<i nz-icon nzType="file-excel" nzTheme="outline"></i>
</div>
@@ -321,34 +305,6 @@
<p>{{ 'monitor.export.use-type' | i18n : { type: 'EXCEL' } }}</p>
</div>
</div>
<div
class="export-type-card"
(click)="exportAllMonitors('JSON')"
[class.loading]="exportJsonButtonLoading"
*ngIf="checkedMonitorIds.size === 0"
>
<div class="export-type-icon">
<i nz-icon nzType="code" nzTheme="outline"></i>
</div>
<div class="export-type-info">
<h3>JSON</h3>
<p>{{ 'monitor.export-all.use-type' | i18n : { type: 'JSON' } }}</p>
</div>
</div>
<div
class="export-type-card"
(click)="exportAllMonitors('EXCEL')"
[class.loading]="exportExcelButtonLoading"
*ngIf="checkedMonitorIds.size === 0"
>
<div class="export-type-icon">
<i nz-icon nzType="file-excel" nzTheme="outline"></i>
</div>
<div class="export-type-info">
<h3>EXCEL</h3>
<p>{{ 'monitor.export-all.use-type' | i18n : { type: 'EXCEL' } }}</p>
</div>
</div>
</div>
</ng-container>
</nz-modal>
@@ -264,10 +264,6 @@ export class MonitorListComponent implements OnInit, OnDestroy {
this.isSwitchExportTypeModalVisible = true;
}
onExportAllMonitors() {
this.isSwitchExportTypeModalVisible = true;
}
onImportMonitors(info: NzUploadChangeParam): void {
console.log(info.type);
if (info.type === 'start') {
@@ -366,46 +362,6 @@ export class MonitorListComponent implements OnInit, OnDestroy {
);
}
exportAllMonitors(type: string) {
switch (type) {
case 'JSON':
this.exportJsonButtonLoading = true;
break;
case 'EXCEL':
this.exportExcelButtonLoading = true;
break;
}
const exportAllMonitors$ = this.monitorSvc
.exportAllMonitors(type)
.pipe(
finalize(() => {
this.exportExcelButtonLoading = false;
this.exportJsonButtonLoading = false;
exportAllMonitors$.unsubscribe();
})
)
.subscribe(
response => {
const message = response.body!;
if (message.type == 'application/json') {
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.export-fail'), '');
} else {
const blob = new Blob([message], { type: response.headers.get('Content-Type')! });
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.download = response.headers.get('Content-Disposition')!.split(';')[1].split('filename=')[1];
a.href = url;
a.click();
window.URL.revokeObjectURL(url);
this.isSwitchExportTypeModalVisible = false;
}
},
error => {
this.notifySvc.error(this.i18nSvc.fanyi('common.notify.export-fail'), error.msg);
}
);
}
onCancelManageMonitors() {
if (this.checkedMonitorIds == null || this.checkedMonitorIds.size === 0) {
this.notifySvc.warning(this.i18nSvc.fanyi('common.notify.no-select-cancel'), '');
@@ -30,7 +30,6 @@ const monitors_uri = '/monitors';
const detect_monitor_uri = '/monitor/detect';
const manage_monitors_uri = '/monitors/manage';
const export_monitors_uri = '/monitors/export';
const export_all_monitors_uri = '/monitors/export/all';
const summary_uri = '/summary';
const warehouse_storage_status_uri = '/warehouse/storage/status';
const grafana_dashboard_uri = '/grafana/dashboard';
@@ -75,16 +74,6 @@ export class MonitorService {
});
}
public exportAllMonitors(type: string): Observable<HttpResponse<Blob>> {
let httpParams = new HttpParams();
httpParams = httpParams.append('type', type);
return this.http.get(export_all_monitors_uri, {
params: httpParams,
observe: 'response',
responseType: 'blob'
});
}
public cancelManageMonitors(monitorIds: Set<number>): Observable<Message<any>> {
let httpParams = new HttpParams();
monitorIds.forEach(monitorId => {
+7 -10
View File
@@ -70,11 +70,11 @@
"alert.help.inhibit.link": "https://hertzbeat.apache.org/docs/help/alert_inhibit",
"alert.help.integration": "Unified management of alerts from different third-party platforms, integrating and receiving alert messages from third-party monitoring and observability systems, and performing actions such as grouping, aggregation, inhibition, silencing, and notification distribution.",
"alert.help.integration.link": "https://hertzbeat.apache.org",
"alert.help.notice": "Notification is used to config the receiver of alarm message and receiving method. The alarm message will be sent to the receiver by specified way(support email, discord, webhook etc). <a href='https://hertzbeat.apache.org/zh-cn/docs/help/alert_webhook'>Click here to see configuration steps.</a>.<br>\"<i>Notice Template</i>\" is message content structure template. The built-in template is used by default or you can customize the template to customize the message notification structure.<br><span class='help_module_span'>Note⚠️: After configuring the \"<i>Receiver</i>\", you also need to config the\"<i>Notice Policy</i>\"to specify which messages are sent to which receivers.</span><a href='https://hertzbeat.apache.org/docs/help/alert_email'> Click here to see potential issues</a>.",
"alert.help.notice": "Notification is used to config the receiver of alarm message and receiving method. The alarm message will be sent to the receiver by specified way(support email, discord, webhook etc). <a href='https://hertzbeat.apache.org/zh-cn/docs/help/alert_webhook'>Click here to see configuration steps.</a>.<br><i>Notice Template</i> is message content structure template. The built-in template is used by default or you can customize the template to customize the message notification structure.<br><span class='help_module_span'>Note⚠️: After configuring the <i>Receiver</i>, you also need to config the<i>Notice Policy</i>to specify which messages are sent to which receivers.</span><a href='https://hertzbeat.apache.org/docs/help/alert_email'> Click here to see potential issues</a>.",
"alert.help.notice.link": "https://hertzbeat.apache.org/docs/help/alert_email",
"alert.help.setting": "Threshold Rules are used for metrics alarm threshold rule management. Click the \"<i>New Threshold</i>\" to configure the alarm threshold for monitoring metrics. Hertzbeat will trigger alarms based on the threshold and metrics data.<br>Note⚠️: The alarm message that has been triggered can be checked in [Alter Center], and you can also set the notification method and personnel in [Notification].",
"alert.help.setting.link": "https://hertzbeat.apache.org/docs/help/alert_threshold",
"alert.help.silence": "Alarm Silence management is used when you don't want to be disturbed during system maintenance or on nights weekend. <br> Click \"<i>New Silence Strategy</i>\" and configure the time period to block messages so you would not get disturbed during breaks.",
"alert.help.silence": "Alarm Silence management is used when you dont want to be disturbed during system maintenance or on nights weekend. <br> Click \"<i>New Silence Strategy</i>\" and configure the time period to block messages so you would not get disturbed during breaks.",
"alert.help.silence.link": "https://hertzbeat.apache.org/docs",
"alert.inhibit.delete": "Delete Inhibit Rule",
"alert.inhibit.edit": "Edit Inhibit Rule",
@@ -702,12 +702,10 @@
"monitor.edit-monitor": "Edit Monitor",
"monitor.edit.failed": "Update Monitor Failed",
"monitor.edit.success": "Update Monitor Success",
"monitor.enable": "Enable",
"monitor.export": "Export Selected",
"monitor.export-all": "Export All",
"monitor.export.switch-type": "Please select the export file format",
"monitor.export.use-type": "Export selected monitors in {{type}} format",
"monitor.export-all.use-type": "Export all monitors in {{type}} format",
"monitor.enable": "Resume Monitor",
"monitor.export": "Export Monitor",
"monitor.export.switch-type": "Please select the export file format!",
"monitor.export.use-type": "Export monitors in {{type}} file format",
"monitor.grafana.enabled.label": "Enable Grafana",
"monitor.grafana.enabled.tip": "is enabled, the monitoring data will be displayed in Grafana",
"monitor.grafana.upload.label": "Upload Grafana Template",
@@ -915,6 +913,5 @@
"ai.bot.greeting": "Hello! I am an AI assistant. How can I help you?",
"ai.bot.input.placeholder": "Please enter a question...",
"ai.bot.send": "Send",
"ai.bot.connect-fail": "Sorry, there was an issue connecting to the AI assistant. Please try again later.",
"monitor.help": "Monitoring and management page, you can check the metric data and manage monitoring tasks here. The status of normal service is"
"ai.bot.connect-fail": "Sorry, there was an issue connecting to the AI assistant. Please try again later."
}
+3 -6
View File
@@ -703,11 +703,9 @@
"monitor.edit.failed": "修改监控失败",
"monitor.edit.success": "修改监控成功",
"monitor.enable": "恢复监控",
"monitor.export": "导出所选",
"monitor.export-all": "导出全部",
"monitor.export": "导出监控",
"monitor.export.switch-type": "请选择导出文件格式!",
"monitor.export.use-type": "以 {{type}} 文件格式导出所选监控",
"monitor.export-all.use-type": "以 {{type}} 文件格式导出全部监控",
"monitor.export.use-type": "以 {{type}} 文件格式导出监控",
"monitor.grafana.enabled.label": "启用Grafana",
"monitor.grafana.enabled.tip": "是否启用Grafana",
"monitor.grafana.upload.label": "上传Grafana模板",
@@ -915,6 +913,5 @@
"ai.bot.greeting": "你好!我是AI助手,有什么可以帮助你的吗?",
"ai.bot.input.placeholder": "请输入问题...",
"ai.bot.send": "发送",
"ai.bot.connect-fail": "抱歉,连接AI助手时出现问题,请稍后再试。",
"monitor.help": "监控管理页面,您可以在此查看指标数据并管理监控任务。正常服务的状态为"
"ai.bot.connect-fail": "抱歉,连接AI助手时出现问题,请稍后再试。"
}