Compare commits

..
Author SHA1 Message Date
tomsun28 bc80400bb1 Merge branch 'master' into asf-footer 2025-08-23 16:57:57 +08:00
014a376c30 [refactor] modify message column to TEXT type (#3698)
Co-authored-by: Calvin <zhengqiwei@apache.org>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-08-23 16:57:04 +08:00
Calvinandtomsun28 377172e44a [doc] add japanese i18n in app-tomcat.yml (#3700)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-08-23 16:52:36 +08:00
Calvinandtomsun28 5b9e19cc30 [doc] add japanese i18n in app-seatunnel.yml (#3691)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-08-23 16:50:24 +08:00
Calvinandtomsun28 0457ec7d16 [doc] add japanese i18n in app-rockylinux.yml (#3688)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-08-23 16:48:08 +08:00
tomsun28 db586eb936 [docs] update
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2025-08-23 15:35:58 +08:00
tomsun28 64e90a935b [docs] update
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2025-08-23 15:21:59 +08:00
Calvin 335f66d030 Merge branch 'master' into asf-footer 2025-08-23 12:50:32 +08:00
tomsun28 5ee6fc6588 [docs] update
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2025-08-23 09:40:36 +08:00
tomsun28 4b6b87689f [docs] update sureness
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2025-08-23 09:19:54 +08:00
tomsun28 0b015c787b [docs] update sureness
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2025-08-23 09:11:33 +08:00
tomsun28 0445771016 [doc] update website asf footer 2025-08-23 09:06:07 +08:00
tomsun28 d42d1232dd [doc] update website asf footer 2025-08-22 23:54:57 +08:00
tomsun28andCalvin 2947ee218e chore: update ui theme (#3682)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Calvin <zhengqiwei@apache.org>
2025-08-22 22:37:51 +08:00
tomsun28 d85f3ee360 [doc] update website asf footer 2025-08-22 20:57:26 +08:00
DuansgandCalvin 4e841a9fb1 [doc] Fixed menu path errors and MD document format anomalies. (#3695)
Co-authored-by: Calvin <zhengqiwei@apache.org>
2025-08-22 10:08:35 +08:00
tomsun28andCalvin b7ecb9b2ec [doc] update doc while graduate (#3692)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: Calvin <zhengqiwei@apache.org>
2025-08-22 01:48:48 +08:00
DeleiGuo 7e1873bc10 [bugfix] fixed jexl keyword issue in spring_gateway monitoring template (#3693) 2025-08-22 01:12:04 +08:00
DeleiGuoandCalvin 8eb60210a3 [bugfix] fixed jexl keyword issue in windows monitoring template (#3687)
Co-authored-by: Calvin <zhengqiwei@apache.org>
2025-08-21 22:38:49 +08:00
DeleiGuoandCalvin d608f732f7 [bugfix] fixed jexl keyword issue in hertzbeat monitoring template (#3686)
Co-authored-by: Calvin <zhengqiwei@apache.org>
2025-08-21 22:36:53 +08:00
DeleiGuoandCalvin 2d9a2955ef [bugfix] fixed jexl keyword issue in postgresql monitoring template (#3685)
Co-authored-by: Calvin <zhengqiwei@apache.org>
2025-08-21 22:19:28 +08:00
cae4423f30 [doc] graduate and remove incubating (#3584)
Co-authored-by: Calvin <zhengqiwei@apache.org>
Co-authored-by: 淞筱 <2030509072@qq.com>
Co-authored-by: aias00 <liuhongyu@apache.org>
Co-authored-by: shown <yuluo08290126@gmail.com>
2025-08-21 21:22:49 +08:00
f0e53a9fb3 [doc] add japanese i18n in app-redis_sentinel.yml (#3681)
Co-authored-by: liutianyou <tianyou.liu@qq.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-08-20 00:21:51 +08:00
79da1a198b [improve] optimize status page layout and UI (#3680)
Co-authored-by: Calvin <zhengqiwei@apache.org>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-08-20 00:17:03 +08:00
64cb804147 [doc] add japanese i18n in app-dolphinscheduler.yml (#3677)
Co-authored-by: liutianyou <tianyou.liu@qq.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-08-20 00:03:12 +08:00
325 changed files with 2556 additions and 1558 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
#
github:
description: Apache HertzBeat(incubating) is a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
description: Real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
homepage: https://hertzbeat.apache.org/
labels:
- monitoring
+1
View File
@@ -67,6 +67,7 @@ header:
- 'karma.conf.js'
- 'proxy.conf.js'
- '.helmignore'
- 'script/helm/**'
- 'web-app/src/app/core/**'
- 'web-app/src/app/layout/**'
- 'web-app/src/app/routes/exception/**'
-10
View File
@@ -1,10 +0,0 @@
Apache HertzBeat (incubating) is an effort undergoing incubation at the Apache
Software Foundation (ASF), sponsored by the Apache Incubator PMC.
Incubation is required of all newly accepted projects until a further review
indicates that the infrastructure, communications, and decision making process
have stabilized in a manner consistent with other successful ASF projects.
While incubation status is not necessarily a reflection of the completeness
or stability of the code, it does indicate that the project has yet to be
fully endorsed by the ASF.
+1 -1
View File
@@ -1,4 +1,4 @@
Apache HertzBeat (incubating)
Apache HertzBeat
Copyright 2024-2025 The Apache Software Foundation
This product includes software developed at
+1 -1
View File
@@ -28,7 +28,7 @@
## 🎡 <font color="green">Introduction</font>
[Apache HertzBeat](https://github.com/apache/hertzbeat) (incubating) is an easy-to-use, open source, real-time monitoring system with agentless, high performance cluster, prometheus-compatible, offers powerful custom monitoring and status page building capabilities.
[Apache HertzBeat](https://github.com/apache/hertzbeat) is an easy-to-use, open source, real-time monitoring system with agentless, high performance cluster, prometheus-compatible, offers powerful custom monitoring and status page building capabilities.
### Features
+1 -1
View File
@@ -28,7 +28,7 @@
## 🎡 <font color="green">介绍</font>
[Apache HertzBeat](https://github.com/apache/hertzbeat) incubating是一个易用友好的开源实时监控告警系统,无需 Agent,高性能集群,兼容 Prometheus,提供强大的自定义监控和状态页构建能力。
[Apache HertzBeat](https://github.com/apache/hertzbeat) 是一个易用友好的开源实时监控告警系统,无需 Agent,高性能集群,兼容 Prometheus,提供强大的自定义监控和状态页构建能力。
### 特点
@@ -1,25 +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.constants;
/**
* Enum representing the possible statuses of a collector.
*/
public enum CollectorStatus {
ONLINE, OFFLINE;
}
+15
View File
@@ -293,6 +293,21 @@
</descriptors>
</configuration>
</execution>
<execution>
<id>make-docker-zip</id>
<!--Bound maven operation-->
<phase>package</phase>
<!--Run once-->
<goals>
<goal>single</goal>
</goals>
<configuration>
<outputDirectory>../dist</outputDirectory>
<descriptors>
<descriptor>../script/assembly/server/assembly-docker.xml</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>make-docker-compose-script</id>
<!--Bound maven operation-->
@@ -18,8 +18,6 @@
package org.apache.hertzbeat.manager;
import javax.annotation.PostConstruct;
import org.apache.hertzbeat.common.constants.ConfigConstants;
import org.apache.hertzbeat.manager.nativex.HertzbeatRuntimeHintsRegistrar;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -38,10 +36,10 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableJpaAuditing
@EnableJpaRepositories(basePackages = {ConfigConstants.PkgConstant.PKG})
@EntityScan(basePackages = {ConfigConstants.PkgConstant.PKG})
@ComponentScan(basePackages = {ConfigConstants.PkgConstant.PKG})
@ConfigurationPropertiesScan(basePackages = {ConfigConstants.PkgConstant.PKG})
@EnableJpaRepositories(basePackages = {"org.apache.hertzbeat"})
@EntityScan(basePackages = {"org.apache.hertzbeat"})
@ComponentScan(basePackages = {"org.apache.hertzbeat"})
@ConfigurationPropertiesScan(basePackages = {"org.apache.hertzbeat"})
@ImportRuntimeHints(HertzbeatRuntimeHintsRegistrar.class)
@EnableAsync
@EnableScheduling
@@ -40,7 +40,7 @@ import org.apache.hertzbeat.common.entity.manager.Monitor;
import org.apache.hertzbeat.common.entity.manager.StatusPageComponent;
import org.apache.hertzbeat.common.entity.manager.StatusPageHistory;
import org.apache.hertzbeat.common.entity.manager.StatusPageOrg;
import org.apache.hertzbeat.manager.properties.StatusProperties;
import org.apache.hertzbeat.manager.config.StatusProperties;
import org.apache.hertzbeat.manager.dao.MonitorDao;
import org.apache.hertzbeat.manager.dao.StatusPageComponentDao;
import org.apache.hertzbeat.manager.dao.StatusPageHistoryDao;
@@ -18,8 +18,8 @@
package org.apache.hertzbeat.manager.config;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.manager.scheduler.ConsistentHashCollectorKeeper;
import org.apache.hertzbeat.manager.properties.SchedulerProperties;
import org.apache.hertzbeat.manager.scheduler.ConsistentHash;
import org.apache.hertzbeat.manager.scheduler.SchedulerProperties;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -33,8 +33,8 @@ import org.springframework.context.annotation.Configuration;
public class SchedulerConfig {
@Bean
public ConsistentHashCollectorKeeper consistentHasInstance() {
return new ConsistentHashCollectorKeeper();
public ConsistentHash consistentHasInstance() {
return new ConsistentHash();
}
}
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.hertzbeat.manager.properties;
package org.apache.hertzbeat.manager.config;
import lombok.Getter;
import lombok.Setter;
@@ -19,6 +19,7 @@
package org.apache.hertzbeat.manager.nativex;
import java.lang.reflect.Constructor;
import java.util.Set;
import org.apache.sshd.common.channel.ChannelListener;
import org.apache.sshd.common.forward.PortForwardingEventListener;
@@ -27,6 +28,7 @@ import org.apache.sshd.common.io.nio2.Nio2ServiceFactoryFactory;
import org.apache.sshd.common.session.SessionListener;
import org.apache.sshd.common.util.security.bouncycastle.BouncyCastleSecurityProviderRegistrar;
import org.apache.sshd.common.util.security.eddsa.EdDSASecurityProviderRegistrar;
import org.springframework.aot.hint.ExecutableMode;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
@@ -58,4 +60,11 @@ public class HertzbeatRuntimeHintsRegistrar implements RuntimeHintsRegistrar {
TypeReference.of(PortForwardingEventListener.class), TypeReference.of(SessionListener.class));
}
}
private void registerConstructor(RuntimeHints hints, Class<?> clazz) {
Constructor<?>[] declaredConstructors = clazz.getDeclaredConstructors();
for (Constructor<?> declaredConstructor : declaredConstructors) {
hints.reflection().registerConstructor(declaredConstructor, ExecutableMode.INVOKE);
}
}
}
@@ -1,156 +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.manager.pojo;
import lombok.Data;
import org.apache.hertzbeat.common.constants.CollectorStatus;
import org.apache.hertzbeat.manager.scheduler.AssignJobs;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* Collector Node
*/
@Data
public class CollectorNode {
/**
* Default number of VM nodes
*/
private static final byte VIRTUAL_NODE_DEFAULT_SIZE = 10;
/**
* collector identity
*/
private final String identity;
/**
* collector mode: public or private
*/
private String mode;
/**
* ip
*/
private String ip;
/**
* collector On-line time stamp
*/
private long uptime;
/**
* collector's own performance service quality score 0 - 127
* The number of virtual nodes will be calculated based on this service quality score
*
*/
private Byte quality;
private CollectorStatus collectorStatus;
/**
* use this collector's collect job ID list
* jobId,jobVersion
*/
private AssignJobs assignJobs;
/**
* the collection task ID list mapped by each virtual node corresponding to this node
* Long[] [0]-jobId, [1]-dispatchHash
*/
private Map<Integer, Set<Long[]>> virtualNodeMap;
public CollectorNode(String identity, String mode, String ip, long uptime, Byte quality) {
this.identity = identity;
this.mode = mode;
this.ip = ip;
this.uptime = uptime;
this.quality = quality;
assignJobs = new AssignJobs();
virtualNodeMap = new ConcurrentHashMap<>(VIRTUAL_NODE_DEFAULT_SIZE);
}
public synchronized void addJob(Integer virtualNodeKey, Integer dispatchHash, Long jobId, boolean isFlushed) {
if (virtualNodeMap == null) {
virtualNodeMap = new ConcurrentHashMap<>(VIRTUAL_NODE_DEFAULT_SIZE);
}
if (assignJobs == null) {
assignJobs = new AssignJobs();
}
Set<Long[]> virtualNodeJob = virtualNodeMap.computeIfAbsent(virtualNodeKey, k -> ConcurrentHashMap.newKeySet(16));
virtualNodeJob.add(new Long[]{jobId, dispatchHash.longValue()});
if (isFlushed) {
assignJobs.addAssignJob(jobId);
} else {
assignJobs.addAddingJob(jobId);
}
}
/**
* obtain the collection task routed by the specified virtual node according to virtualNodeKey
* @param virtualNodeKey virtualNodeKey
* @return collection task
*/
public Set<Long[]> clearVirtualNodeJobs(Integer virtualNodeKey) {
if (virtualNodeMap == null || virtualNodeMap.isEmpty()) {
return null;
}
Set<Long[]> virtualNodeJobs = virtualNodeMap.remove(virtualNodeKey);
virtualNodeMap.put(virtualNodeKey, ConcurrentHashMap.newKeySet(16));
return virtualNodeJobs;
}
public void addVirtualNodeJobs(Integer virtualHashKey, Set<Long[]> reDispatchJobs) {
if (reDispatchJobs == null) {
return;
}
if (virtualNodeMap == null) {
virtualNodeMap = new ConcurrentHashMap<>(16);
}
virtualNodeMap.computeIfPresent(virtualHashKey, (k, v) -> {
reDispatchJobs.addAll(v);
return v;
});
virtualNodeMap.put(virtualHashKey, reDispatchJobs);
}
public void removeVirtualNodeJob(Long jobId) {
if (jobId == null || virtualNodeMap == null) {
return;
}
for (Set<Long[]> jobSet : virtualNodeMap.values()) {
Optional<Long[]> optional = jobSet.stream().filter(item -> Objects.equals(item[0], jobId)).findFirst();
if (optional.isPresent()) {
jobSet.remove(optional.get());
break;
}
}
}
public void destroy() {
if (assignJobs != null) {
assignJobs.clear();
}
if (virtualNodeMap != null) {
virtualNodeMap.clear();
}
}
}
@@ -1,53 +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.manager.pojo;
import org.apache.hertzbeat.common.entity.job.Job;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Utility class for caching {@link Job} objects in memory.
* <p>
* This class provides static methods to store, retrieve, and remove {@code Job} instances
* using a thread-safe {@link ConcurrentHashMap}. It is intended to be used as a simple
* in-memory cache for job data within the manager component.
* <p>
* Usage:
* <pre>
* JobCache.put(job);
* Job job = JobCache.get(jobId);
* JobCache.remove(jobId);
* </pre>
*/
public class JobCache {
private static final Map<Long, Job> jobContentCache = new ConcurrentHashMap<>(16);
public static Job get(Long jobId) {
return jobContentCache.get(jobId);
}
public static void put(Job job) {
jobContentCache.put(job.getId(), job);
}
public static void remove(Long jobId) {
jobContentCache.remove(jobId);
}
}
@@ -29,7 +29,6 @@ import java.util.concurrent.ConcurrentHashMap;
@Slf4j
@Data
public class AssignJobs {
private static final Integer DEFAULT_CAPACITY = 16;
/**
* current assign jobIds
@@ -52,10 +51,10 @@ public class AssignJobs {
private Set<Long> pinnedJobs;
public AssignJobs() {
jobs = ConcurrentHashMap.newKeySet(DEFAULT_CAPACITY);
addingJobs = ConcurrentHashMap.newKeySet(DEFAULT_CAPACITY);
removingJobs = ConcurrentHashMap.newKeySet(DEFAULT_CAPACITY);
pinnedJobs = ConcurrentHashMap.newKeySet(DEFAULT_CAPACITY);
jobs = ConcurrentHashMap.newKeySet(16);
addingJobs = ConcurrentHashMap.newKeySet(16);
removingJobs = ConcurrentHashMap.newKeySet(16);
pinnedJobs = ConcurrentHashMap.newKeySet(16);
}
public void addAssignJob(Long jobId) {
@@ -24,8 +24,15 @@ import org.apache.hertzbeat.common.entity.message.CollectRep;
/**
* Collection job management provides api interface
*/
public interface JobOperation {
public interface CollectJobScheduling {
/**
* Execute a one-time collection task and get the collected data response
* @param job Collect task details
* @return Collection results
*/
List<CollectRep.MetricsData> collectSyncJobData(Job job);
/**
* Execute a one-time collection task and get the collected data response
* @param job Collect task details
@@ -42,6 +49,13 @@ public interface JobOperation {
*/
long addAsyncCollectJob(Job job, String collector);
/**
* Update the periodic asynchronous collection tasks that have been delivered
* @param modifyJob Collect task details
* @return long Job ID
*/
long updateAsyncCollectJob(Job modifyJob);
/**
* Update the periodic asynchronous collection tasks that have been delivered
* @param modifyJob Collect task details
@@ -29,14 +29,11 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.hertzbeat.collector.dispatch.entrance.internal.CollectJobService;
import org.apache.hertzbeat.collector.dispatch.entrance.internal.CollectResponseEventListener;
import org.apache.hertzbeat.common.constants.CollectorStatus;
import org.apache.hertzbeat.common.constants.CommonConstants;
import org.apache.hertzbeat.common.entity.dto.CollectorInfo;
import org.apache.hertzbeat.common.entity.dto.ServerInfo;
@@ -56,10 +53,6 @@ import org.apache.hertzbeat.manager.dao.CollectorDao;
import org.apache.hertzbeat.manager.dao.CollectorMonitorBindDao;
import org.apache.hertzbeat.manager.dao.MonitorDao;
import org.apache.hertzbeat.manager.dao.ParamDao;
import org.apache.hertzbeat.manager.pojo.CollectorNode;
import org.apache.hertzbeat.manager.pojo.JobCache;
import org.apache.hertzbeat.manager.properties.SchedulerProperties;
import org.apache.hertzbeat.manager.scheduler.collector.CollectorKeeper;
import org.apache.hertzbeat.manager.scheduler.netty.ManageServer;
import org.apache.hertzbeat.manager.service.AppService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -72,7 +65,9 @@ import org.springframework.stereotype.Component;
@Component
@AutoConfigureAfter(value = {SchedulerProperties.class})
@Slf4j
public class CollectorJobScheduler implements CollectorOperation, CollectorOperationReceiver, JobOperation {
public class CollectorJobScheduler implements CollectorScheduling, CollectJobScheduling {
private final Map<Long, Job> jobContentCache = new ConcurrentHashMap<>(16);
private final Map<Long, CollectResponseEventListener> eventListeners = new ConcurrentHashMap<>(16);
@@ -82,6 +77,9 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
@Autowired
private CollectorMonitorBindDao collectorMonitorBindDao;
@Autowired
private ConsistentHash consistentHash;
@Autowired
private CollectJobService collectJobService;
@@ -94,10 +92,6 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
@Autowired
private ParamDao paramDao;
@Autowired
private CollectorKeeper collectorKeeper;
@Setter
private ManageServer manageServer;
@Override
@@ -131,18 +125,15 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
.build();
}
collectorDao.save(collector);
CollectorNode node = new CollectorNode(identity, collector.getMode(), collector.getIp(), System.currentTimeMillis(), null);
collectorKeeper.addNode(node);
collectorKeeper.changeStatus(identity, CollectorStatus.ONLINE);
collectorKeeper.rebalanceJobs(this::doRebalanceJobs);
ConsistentHash.Node node = new ConsistentHash.Node(identity, collector.getMode(),
collector.getIp(), System.currentTimeMillis(), null);
consistentHash.addNode(node);
reBalanceCollectorAssignJobs();
// Read database The fixed collection tasks at this collector are delivered
List<CollectorMonitorBind> binds = collectorMonitorBindDao.findCollectorMonitorBindsByCollector(identity);
if (CollectionUtils.isEmpty(binds)){
return;
}
List<Monitor> monitors = monitorDao.findMonitorsByIdIn(binds.stream().map(CollectorMonitorBind::getMonitorId).collect(Collectors.toSet()));
for (Monitor monitor : monitors) {
if (Objects.isNull(monitor) || monitor.getStatus() == CommonConstants.MONITOR_PAUSED_CODE) {
@@ -198,12 +189,58 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
}
collector.setStatus(CommonConstants.COLLECTOR_STATUS_OFFLINE);
collectorDao.save(collector);
collectorKeeper.changeStatus(identity, CollectorStatus.OFFLINE);
collectorKeeper.rebalanceJobs(this::doRebalanceJobs);
consistentHash.removeNode(identity);
reBalanceCollectorAssignJobs();
log.info("the collector: {} go offline success.", identity);
}
@Override
public void reBalanceCollectorAssignJobs() {
consistentHash.getAllNodes().entrySet().parallelStream().forEach(entry -> {
String collectorName = entry.getKey();
AssignJobs assignJobs = entry.getValue().getAssignJobs();
if (StringUtils.isBlank(collectorName) || Objects.isNull(assignJobs)) {
return;
}
if (CollectionUtils.isNotEmpty(assignJobs.getAddingJobs())) {
Set<Long> addedJobIds = new HashSet<>(8);
for (Long addingJobId : assignJobs.getAddingJobs()) {
Job job = jobContentCache.get(addingJobId);
if (Objects.isNull(job)) {
log.error("assigning job {} content is null.", addingJobId);
continue;
}
addedJobIds.add(addingJobId);
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(collectorName)) {
collectJobService.addAsyncCollectJob(job);
} else {
ClusterMsg.Message message = ClusterMsg.Message.newBuilder()
.setDirection(ClusterMsg.Direction.REQUEST)
.setType(ClusterMsg.MessageType.ISSUE_CYCLIC_TASK)
.setMsg(ByteString.copyFromUtf8(JsonUtil.toJson(job)))
.build();
this.manageServer.sendMsg(collectorName, message);
}
}
assignJobs.addAssignJobs(addedJobIds);
assignJobs.removeAddingJobs(addedJobIds);
}
if (CollectionUtils.isNotEmpty(assignJobs.getRemovingJobs())) {
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(collectorName)) {
assignJobs.getRemovingJobs().forEach(jobId -> collectJobService.cancelAsyncCollectJob(jobId));
} else {
ClusterMsg.Message message = ClusterMsg.Message.newBuilder()
.setDirection(ClusterMsg.Direction.REQUEST)
.setType(ClusterMsg.MessageType.DELETE_CYCLIC_TASK)
.setMsg(ByteString.copyFromUtf8(JsonUtil.toJson(assignJobs.getRemovingJobs())))
.build();
this.manageServer.sendMsg(collectorName, message);
}
assignJobs.clearRemovingJobs();
}
});
}
@Override
public boolean offlineCollector(String identity) {
ClusterMsg.Message message = ClusterMsg.Message.newBuilder()
@@ -248,11 +285,56 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
return true;
}
@Override
public List<CollectRep.MetricsData> collectSyncJobData(Job job) {
// todo dispatchKey ip+port or id
String dispatchKey = String.valueOf(job.getMonitorId());
ConsistentHash.Node node = consistentHash.preDispatchJob(dispatchKey);
if (Objects.isNull(node)) {
log.error("there is no collector online to assign job.");
CollectRep.MetricsData metricsData = CollectRep.MetricsData.newBuilder()
.setCode(CollectRep.Code.FAIL)
.setMsg("no collector online to assign job")
.build();
return Collections.singletonList(metricsData);
}
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(node.getIdentity())) {
return collectJobService.collectSyncJobData(job);
} else {
List<CollectRep.MetricsData> metricsData = new LinkedList<>();
CountDownLatch countDownLatch = new CountDownLatch(1);
ClusterMsg.Message message = ClusterMsg.Message.newBuilder()
.setType(ClusterMsg.MessageType.ISSUE_ONE_TIME_TASK)
.setDirection(ClusterMsg.Direction.REQUEST)
.setMsg(ByteString.copyFromUtf8(JsonUtil.toJson(job)))
.build();
boolean result = this.manageServer.sendMsg(node.getIdentity(), message);
if (result) {
CollectResponseEventListener listener = new CollectResponseEventListener() {
@Override
public void response(List<CollectRep.MetricsData> responseMetrics) {
if (responseMetrics != null) {
metricsData.addAll(responseMetrics);
}
countDownLatch.countDown();
}
};
eventListeners.put(job.getMonitorId(), listener);
}
try {
countDownLatch.await(120, TimeUnit.SECONDS);
} catch (Exception e) {
log.info("The sync task runs for 120 seconds with no response and returns");
}
return metricsData;
}
}
@Override
public List<CollectRep.MetricsData> collectSyncJobData(Job job, String collector) {
CollectorNode node = StringUtils.isBlank(collector)
? collectorKeeper.determineNode(job.getMonitorId())
: collectorKeeper.getNode(collector);
ConsistentHash.Node node = consistentHash.getNode(collector);
if (Objects.isNull(node)) {
log.error("there is no collector online to assign job.");
CollectRep.MetricsData metricsData = CollectRep.MetricsData.newBuilder()
@@ -261,11 +343,9 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
.build();
return Collections.singletonList(metricsData);
}
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(node.getIdentity())) {
return collectJobService.collectSyncJobData(job);
}
List<CollectRep.MetricsData> metricsData = new LinkedList<>();
ClusterMsg.Message message = ClusterMsg.Message.newBuilder()
.setType(ClusterMsg.MessageType.ISSUE_ONE_TIME_TASK)
@@ -298,10 +378,25 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
public long addAsyncCollectJob(Job job, String collector) {
long jobId = SnowFlakeIdGenerator.generateId();
job.setId(jobId);
CollectorNode collectorNode = collectorKeeper.addJob(job, collector);
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(collectorNode.getIdentity())) {
jobContentCache.put(jobId, job);
ConsistentHash.Node node;
if (StringUtils.isBlank(collector)) {
// todo dispatchKey ip+port or id
String dispatchKey = String.valueOf(job.getMonitorId());
node = consistentHash.dispatchJob(dispatchKey, jobId);
if (node == null) {
log.error("there is no collector online to assign job.");
return jobId;
}
} else {
node = consistentHash.getNode(collector);
if (node == null) {
log.error("there is no collector name: {} online to assign job.", collector);
return jobId;
}
node.getAssignJobs().addPinnedJob(jobId);
}
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(node.getIdentity())) {
collectJobService.addAsyncCollectJob(job);
} else {
ClusterMsg.Message message = ClusterMsg.Message.newBuilder()
@@ -309,16 +404,27 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
.setDirection(ClusterMsg.Direction.REQUEST)
.setMsg(ByteString.copyFromUtf8(JsonUtil.toJson(job)))
.build();
this.manageServer.sendMsg(collectorNode.getIdentity(), message);
this.manageServer.sendMsg(node.getIdentity(), message);
}
return jobId;
}
@Override
public long updateAsyncCollectJob(Job modifyJob) {
// delete and add
long preJobId = modifyJob.getId();
long newJobId = addAsyncCollectJob(modifyJob, null);
jobContentCache.remove(preJobId);
cancelAsyncCollectJob(preJobId);
return newJobId;
}
@Override
public long updateAsyncCollectJob(Job modifyJob, String collector) {
// delete and add
long preJobId = modifyJob.getId();
long newJobId = addAsyncCollectJob(modifyJob, collector);
jobContentCache.remove(preJobId);
cancelAsyncCollectJob(preJobId);
return newJobId;
}
@@ -328,21 +434,24 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
if (jobId == null) {
return;
}
CollectorNode collectorNode = collectorKeeper.removeJob(jobId);
if (collectorNode == null) {
return;
}
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(collectorNode.getIdentity())) {
collectJobService.cancelAsyncCollectJob(jobId);
} else {
ClusterMsg.Message deleteMessage = ClusterMsg.Message.newBuilder()
.setType(ClusterMsg.MessageType.DELETE_CYCLIC_TASK)
.setDirection(ClusterMsg.Direction.REQUEST)
.setMsg(ByteString.copyFromUtf8(JsonUtil.toJson(List.of(jobId))))
.build();
this.manageServer.sendMsg(collectorNode.getIdentity(), deleteMessage);
jobContentCache.remove(jobId);
for (ConsistentHash.Node node : consistentHash.getAllNodes().values()) {
AssignJobs assignJobs = node.getAssignJobs();
if (assignJobs.getPinnedJobs().remove(jobId)
|| assignJobs.getJobs().remove(jobId) || assignJobs.getAddingJobs().remove(jobId)) {
node.removeVirtualNodeJob(jobId);
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(node.getIdentity())) {
collectJobService.cancelAsyncCollectJob(jobId);
} else {
ClusterMsg.Message deleteMessage = ClusterMsg.Message.newBuilder()
.setType(ClusterMsg.MessageType.DELETE_CYCLIC_TASK)
.setDirection(ClusterMsg.Direction.REQUEST)
.setMsg(ByteString.copyFromUtf8(JsonUtil.toJson(List.of(jobId))))
.build();
this.manageServer.sendMsg(node.getIdentity(), deleteMessage);
}
// break; if is there jod exist in multi collector?
}
}
}
@@ -359,55 +468,7 @@ public class CollectorJobScheduler implements CollectorOperation, CollectorOpera
}
}
private void doRebalanceJobs(AssignJobs assignJobs, String collectorName) {
handleAddingJobs(assignJobs, collectorName);
handleRemovingJobs(assignJobs, collectorName);
}
private void handleAddingJobs(AssignJobs assignJobs, String collectorName) {
if (CollectionUtils.isEmpty(assignJobs.getAddingJobs())) {
return;
}
Set<Long> addedJobIds = new HashSet<>(8);
for (Long addingJobId : assignJobs.getAddingJobs()) {
Job job = JobCache.get(addingJobId);
if (Objects.isNull(job)) {
log.error("assigning job {} content is null.", addingJobId);
continue;
}
addedJobIds.add(addingJobId);
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(collectorName)) {
collectJobService.addAsyncCollectJob(job);
} else {
ClusterMsg.Message message = ClusterMsg.Message.newBuilder()
.setDirection(ClusterMsg.Direction.REQUEST)
.setType(ClusterMsg.MessageType.ISSUE_CYCLIC_TASK)
.setMsg(ByteString.copyFromUtf8(JsonUtil.toJson(job)))
.build();
this.manageServer.sendMsg(collectorName, message);
}
}
assignJobs.addAssignJobs(addedJobIds);
assignJobs.removeAddingJobs(addedJobIds);
}
private void handleRemovingJobs(AssignJobs assignJobs, String collectorName) {
if (CollectionUtils.isEmpty(assignJobs.getRemovingJobs())) {
return;
}
if (CommonConstants.MAIN_COLLECTOR_NODE.equals(collectorName)) {
assignJobs.getRemovingJobs().forEach(jobId -> collectJobService.cancelAsyncCollectJob(jobId));
} else {
ClusterMsg.Message message = ClusterMsg.Message.newBuilder()
.setDirection(ClusterMsg.Direction.REQUEST)
.setType(ClusterMsg.MessageType.DELETE_CYCLIC_TASK)
.setMsg(ByteString.copyFromUtf8(JsonUtil.toJson(assignJobs.getRemovingJobs())))
.build();
this.manageServer.sendMsg(collectorName, message);
}
assignJobs.clearRemovingJobs();
public void setManageServer(ManageServer manageServer) {
this.manageServer = manageServer;
}
}
@@ -1,46 +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.manager.scheduler;
/**
* Interface defining operations for managing collector.
* Implementations of this interface provide functionality to control the operation state
* of collectors in the system.
*/
public interface CollectorOperation {
/**
* Takes a collector offline by stopping its collection operations.
* This is typically used for maintenance, updates, or when the collector is no longer needed.
*
* @param identity The unique identifier of the collector to be taken offline
* @return true if the collector was successfully taken offline,
* false if the operation failed or the collector wasn't found
*/
boolean offlineCollector(String identity);
/**
* Brings a collector online by starting its collection operations.
* This is used to activate a collector that was previously offline.
*
* @param identity The unique identifier of the collector to be brought online
* @return true if the collector was successfully brought online,
* false if the operation failed or the collector wasn't found
*/
boolean onlineCollector(String identity);
}
@@ -20,25 +20,39 @@ package org.apache.hertzbeat.manager.scheduler;
import org.apache.hertzbeat.common.entity.dto.CollectorInfo;
/**
* Interface defining operations for receiving collector status updates from remote collectors.
* This interface serves as a callback mechanism for handling collector online/offline events.
* slave collector service
*/
public interface CollectorOperationReceiver {
public interface CollectorScheduling {
/**
* Notifies the system when a collector comes online.
* This method should be called when a collector establishes connection and becomes available.
*
* @param identity The unique identifier of the collector (e.g., hostname, IP, or custom ID)
* @param collectorInfo Detailed information about the collector including capabilities,
* configuration, and status metadata
* register collector go online
* @param identity collector identity name
* @param collectorInfo collector information
*/
void collectorGoOnline(String identity, CollectorInfo collectorInfo);
/**
* Notifies the system when a collector goes offline.
* This method should be called when a collector disconnects or becomes unavailable.
*
* @param identity The unique identifier of the collector to be marked as offline
* register collector go offline
* @param identity collector identity name
*/
void collectorGoOffline(String identity);
/**
* reBalance dispatch monitoring jobs when collector go online or offline or timeout
*/
void reBalanceCollectorAssignJobs();
/**
* offline collector(stop collector collect operation)
* @param identity collector identity name
* @return true/false
*/
boolean offlineCollector(String identity);
/**
* online collector(start collector collect operation)
* @param identity collector identity name
* @return true/false
*/
boolean onlineCollector(String identity);
}
@@ -23,149 +23,46 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.BiConsumer;
import java.util.stream.Collectors;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.hertzbeat.common.constants.CollectorStatus;
import org.apache.hertzbeat.common.constants.CommonConstants;
import org.apache.hertzbeat.common.entity.job.Job;
import org.apache.hertzbeat.manager.pojo.CollectorNode;
import org.apache.hertzbeat.manager.pojo.JobCache;
import org.apache.hertzbeat.manager.scheduler.collector.CollectorKeeper;
/**
* Collector and task mapping scheduling implemented by consistent hashing
*/
@Slf4j
public class ConsistentHashCollectorKeeper implements CollectorKeeper {
public class ConsistentHash {
/**
* consistent hash circle
*/
private final ConcurrentTreeMap<Integer, CollectorNode> hashCircle = new ConcurrentTreeMap<>();
private final ConcurrentTreeMap<Integer, Node> hashCircle;
/**
* collector node
*/
private final Map<String, CollectorNode> existNodeMap = new ConcurrentHashMap<>(16);
private final Map<String, Node> existNodeMap;
/**
* not dispatched job cache, in order to obtain the cached collection scheduling task
* not dispatched job cache
*/
@Getter
private final List<DispatchJob> dispatchJobCache = Collections.synchronizedList(new LinkedList<>());
private final List<DispatchJob> dispatchJobCache;
/**
* Default number of VM nodes
*/
private static final byte VIRTUAL_NODE_DEFAULT_SIZE = 10;
/**
* add collector node
* @param newNode node
*/
@Override
public void addNode(CollectorNode newNode) {
// when mode is cluster public, need reBalance dispatch jobs. else not when is cloud-edge private
if (!CommonConstants.MODE_PRIVATE.equals(newNode.getMode())) {
byte virtualNodeNum = newNode.getQuality() == null ? VIRTUAL_NODE_DEFAULT_SIZE : newNode.getQuality();
for (byte i = 0; i < virtualNodeNum; i++) {
addVirtualNode(newNode, newNode.getIdentity() + i);
}
}
existNodeMap.put(newNode.getIdentity(), newNode);
dispatchJobInCache();
}
@Override
public CollectorNode addJob(Job job, String collectorId) {
JobCache.put(job);
CollectorNode collectorNode;
if (StringUtils.isBlank(collectorId)) {
// todo dispatchKey ip+port or id
String dispatchKey = String.valueOf(job.getMonitorId());
collectorNode = this.dispatchJob(dispatchKey, job.getId());
if (collectorNode == null) {
log.error("there is no collector online to assign job.");
}
} else {
collectorNode = getNode(collectorId);
if (collectorNode == null) {
log.error("there is no collector name: {} online to assign job.", collectorId);
return null;
}
collectorNode.getAssignJobs().addPinnedJob(job.getId());
}
return collectorNode;
}
/**
* get node
* @param collectorName collector name
* @return node
*/
@Override
public CollectorNode getNode(String collectorName) {
return existNodeMap.get(collectorName);
}
@Override
public CollectorNode determineNode(Long jobId) {
String dispatchKey = String.valueOf(jobId);
if (dispatchKey == null || StringUtils.isBlank(dispatchKey)) {
log.error("The dispatch key can not null.");
return null;
}
int dispatchHash = hash(dispatchKey);
return preDispatchJob(dispatchHash);
}
@Override
public void changeStatus(String collectorId, CollectorStatus collectorStatus) {
switch (collectorStatus) {
case ONLINE -> this.getNode(collectorId).setCollectorStatus(collectorStatus);
case OFFLINE -> this.removeNode(collectorId);
default -> {}
}
}
@Override
public void rebalanceJobs(BiConsumer<AssignJobs, String> assignJobCollectorConsumer) {
existNodeMap.entrySet().parallelStream().forEach(entry -> {
String collectorName = entry.getKey();
AssignJobs assignJobs = entry.getValue().getAssignJobs();
if (StringUtils.isBlank(collectorName) || Objects.isNull(assignJobs)) {
return;
}
assignJobCollectorConsumer.accept(assignJobs, collectorName);
});
}
@Override
public CollectorNode removeJob(Long jobId) {
JobCache.remove(jobId);
for (CollectorNode node : existNodeMap.values()) {
AssignJobs assignJobs = node.getAssignJobs();
if (assignJobs.getPinnedJobs().remove(jobId)
|| assignJobs.getJobs().remove(jobId) || assignJobs.getAddingJobs().remove(jobId)) {
node.removeVirtualNodeJob(jobId);
return node;
// break; if is there jod exist in multi collector?
}
}
return null;
public ConsistentHash() {
hashCircle = new ConcurrentTreeMap<>();
existNodeMap = new ConcurrentHashMap<>(16);
dispatchJobCache = Collections.synchronizedList(new LinkedList<>());
}
/**
@@ -173,15 +70,15 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
* @param newNode node
* @param identity virtual node identity
*/
private synchronized void addVirtualNode(CollectorNode newNode, String identity){
public synchronized void addVirtualNode(Node newNode, String identity){
int virtualHashKey = hash(identity);
hashCircle.put(virtualHashKey, newNode);
newNode.addVirtualNodeJobs(virtualHashKey, ConcurrentHashMap.newKeySet(16));
Map.Entry<Integer, CollectorNode> higherVirtualNode = hashCircle.higherOrFirstEntry(virtualHashKey);
Map.Entry<Integer, Node> higherVirtualNode = hashCircle.higherOrFirstEntry(virtualHashKey);
// Reassign tasks that are routed to the higherVirtualNode virtual node
// Tasks are either on the original virtual node or on the new virtual node
Integer higherVirtualNodeKey = higherVirtualNode.getKey();
CollectorNode higherNode = higherVirtualNode.getValue();
Node higherNode = higherVirtualNode.getValue();
Set<Long[]> dispatchJobs = higherNode.clearVirtualNodeJobs(higherVirtualNodeKey);
if (dispatchJobs != null && !dispatchJobs.isEmpty()) {
Set<Long[]> reDispatchJobs = ConcurrentHashMap.newKeySet(dispatchJobs.size());
@@ -194,37 +91,53 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
iterator.remove();
}
}
higherNode.getVirtualNodeMap().put(higherVirtualNodeKey, dispatchJobs);
higherNode.virtualNodeMap.put(higherVirtualNodeKey, dispatchJobs);
Set<Long> jobIds = reDispatchJobs.stream().map(item -> item[0]).collect(Collectors.toSet());
newNode.addVirtualNodeJobs(virtualHashKey, reDispatchJobs);
if (higherNode != newNode) {
higherNode.getAssignJobs().removeAssignJobs(jobIds);
higherNode.getAssignJobs().addRemovingJobs(jobIds);
newNode.getAssignJobs().addAddingJobs(jobIds);
higherNode.assignJobs.removeAssignJobs(jobIds);
higherNode.assignJobs.addRemovingJobs(jobIds);
newNode.assignJobs.addAddingJobs(jobIds);
}
}
}
/**
* add collector node
* @param newNode node
*/
public void addNode(Node newNode) {
// when mode is cluster public, need reBalance dispatch jobs. else not when is cloud-edge private
if (!CommonConstants.MODE_PRIVATE.equals(newNode.mode)) {
byte virtualNodeNum = newNode.quality == null ? VIRTUAL_NODE_DEFAULT_SIZE : newNode.quality;
for (byte i = 0; i < virtualNodeNum; i++) {
addVirtualNode(newNode, newNode.identity + i);
}
}
existNodeMap.put(newNode.identity, newNode);
dispatchJobInCache();
}
/**
* remove virtual node
* @param deletedNode node
* @param virtualNodeHash virtual node hash key
*/
private synchronized void removeVirtualNode(CollectorNode deletedNode, Integer virtualNodeHash) {
Set<Long[]> removeJobHashSet = deletedNode.getVirtualNodeMap().get(virtualNodeHash);
public synchronized void removeVirtualNode(Node deletedNode, Integer virtualNodeHash) {
Set<Long[]> removeJobHashSet = deletedNode.virtualNodeMap.get(virtualNodeHash);
// Migrate the virtualNodeEntry collection task to the nearest virtual node that is larger than it
hashCircle.remove(virtualNodeHash);
if (removeJobHashSet == null || removeJobHashSet.isEmpty()) {
return;
}
Map.Entry<Integer, CollectorNode> higherVirtualEntry = hashCircle.higherOrFirstEntry(virtualNodeHash);
Map.Entry<Integer, Node> higherVirtualEntry = hashCircle.higherOrFirstEntry(virtualNodeHash);
if (higherVirtualEntry == null || higherVirtualEntry.getValue() == deletedNode) {
higherVirtualEntry = null;
}
// jobId
Set<Long> removeJobIds = removeJobHashSet.stream().map(item -> item[0]).collect(Collectors.toSet());
deletedNode.getAssignJobs().removeAssignJobs(removeJobIds);
deletedNode.getAssignJobs().addRemovingJobs(removeJobIds);
deletedNode.assignJobs.removeAssignJobs(removeJobIds);
deletedNode.assignJobs.addRemovingJobs(removeJobIds);
if (higherVirtualEntry == null) {
// jobId-dispatchHash
removeJobHashSet.forEach(value -> {
@@ -237,9 +150,9 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
}
});
} else {
CollectorNode higherVirtualNode = higherVirtualEntry.getValue();
Node higherVirtualNode = higherVirtualEntry.getValue();
higherVirtualNode.addVirtualNodeJobs(higherVirtualEntry.getKey(), removeJobHashSet);
higherVirtualNode.getAssignJobs().addAddingJobs(removeJobIds);
higherVirtualNode.assignJobs.addAddingJobs(removeJobIds);
}
}
@@ -247,19 +160,20 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
* deleted collector node
* @param name collector name
*/
private void removeNode(String name) {
CollectorNode deletedNode = existNodeMap.remove(name);
public Node removeNode(String name) {
Node deletedNode = existNodeMap.remove(name);
if (deletedNode == null) {
return;
return null;
}
for (Integer virtualNodeHash : deletedNode.virtualNodeMap.keySet()) {
removeVirtualNode(deletedNode, virtualNodeHash);
}
deletedNode.getVirtualNodeMap().keySet()
.forEach(virtualNodeHash -> removeVirtualNode(deletedNode, virtualNodeHash));
deletedNode.destroy();
dispatchJobInCache();
return deletedNode;
}
private synchronized void dispatchJobInCache() {
public synchronized void dispatchJobInCache() {
if (!dispatchJobCache.isEmpty()) {
int size = dispatchJobCache.size();
for (int index = 0; index < size; index++) {
@@ -269,6 +183,31 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
}
}
/**
* get all collector nodes
* @return nodes
*/
public Map<String, Node> getAllNodes() {
return existNodeMap;
}
/**
* get node
* @param collectorName collector name
* @return node
*/
public Node getNode(String collectorName) {
return existNodeMap.get(collectorName);
}
/**
* Obtain the cached collection scheduling task
* @return cache task
*/
public List<DispatchJob> getDispatchJobCache() {
return dispatchJobCache;
}
/**
* obtain the collector node according to the collection task information
*
@@ -276,7 +215,7 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
* @param jobId jobId
* @return collector node
*/
private CollectorNode dispatchJob(String dispatchKey, Long jobId) {
public Node dispatchJob(String dispatchKey, Long jobId) {
if (dispatchKey == null || StringUtils.isBlank(dispatchKey)) {
log.error("The dispatch key can not null.");
return null;
@@ -285,23 +224,38 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
return dispatchJob(dispatchHash, jobId, true);
}
/**
* The collector node to which the collector is assigned is obtained in advance based on the collection task information
*
* @param dispatchKey collector task route key: ip+appId
* @return collector node
*/
public Node preDispatchJob(String dispatchKey) {
if (dispatchKey == null || StringUtils.isBlank(dispatchKey)) {
log.error("The dispatch key can not null.");
return null;
}
int dispatchHash = hash(dispatchKey);
return preDispatchJob(dispatchHash);
}
/**
* Obtain the collector node to which the collector is assigned based on the collection task information
*
* @param dispatchHash The task route hash is collected
* @param jobId jobId
* @param isFlushed if it has flushed this job or wait to dispatch
* @param isFlushed is has flush this job or wait to dispatch
* @return collector node
*/
private CollectorNode dispatchJob(Integer dispatchHash, Long jobId, boolean isFlushed) {
public Node dispatchJob(Integer dispatchHash, Long jobId, boolean isFlushed) {
if (dispatchHash == null || hashCircle == null || hashCircle.isEmpty()) {
log.warn("There is no available collector registered. Cache the job {}.", jobId);
dispatchJobCache.add(new DispatchJob(dispatchHash, jobId));
return null;
}
Map.Entry<Integer, CollectorNode> ceilEntry = hashCircle.ceilingOrFirstEntry(dispatchHash);
Map.Entry<Integer, Node> ceilEntry = hashCircle.ceilingOrFirstEntry(dispatchHash);
int virtualKey = ceilEntry.getKey();
CollectorNode curNode = ceilEntry.getValue();
Node curNode = ceilEntry.getValue();
curNode.addJob(virtualKey, dispatchHash, jobId, isFlushed);
return curNode;
@@ -313,15 +267,25 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
* @param dispatchHash The task route hash is collected
* @return collector node
*/
private CollectorNode preDispatchJob(Integer dispatchHash) {
public Node preDispatchJob(Integer dispatchHash) {
if (dispatchHash == null || hashCircle == null || hashCircle.isEmpty()) {
log.warn("There is no available collector registered.");
return null;
}
Map.Entry<Integer, CollectorNode> ceilEntry = hashCircle.ceilingOrFirstEntry(dispatchHash);
Map.Entry<Integer, Node> ceilEntry = hashCircle.ceilingOrFirstEntry(dispatchHash);
return ceilEntry.getValue();
}
/**
* hash long
* @param key long value
* @return hash value
*/
private int hash(long key) {
String keyStr = String.valueOf(key);
return hash(keyStr);
}
/**
* FNV1_32_HASH algorithm
* @param key the key
@@ -350,7 +314,7 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
* dispatch job summary
*/
@AllArgsConstructor
private static class DispatchJob {
public static class DispatchJob {
/**
* dispatch task route key
@@ -363,4 +327,130 @@ public class ConsistentHashCollectorKeeper implements CollectorKeeper {
@Getter
private Long jobId;
}
/**
* collector node machine address
*/
public static class Node {
/**
* collector identity
*/
@Getter
private final String identity;
/**
* collector mode: public or private
*/
private final String mode;
/**
* ip
*/
private final String ip;
/**
* collector On-line time stamp
*/
private final long uptime;
/**
* collector's own performance service quality score 0 - 127
* The number of virtual nodes will be calculated based on this service quality score
*
*/
private final Byte quality;
/**
* use this collector's collect job ID list
* jobId,jobVersion
*/
private AssignJobs assignJobs;
/**
* the collection task ID list mapped by each virtual node corresponding to this node
* Long[] [0]-jobId, [1]-dispatchHash
*/
private Map<Integer, Set<Long[]>> virtualNodeMap;
public Node(String identity, String mode, String ip, long uptime, Byte quality) {
this.identity = identity;
this.mode = mode;
this.ip = ip;
this.uptime = uptime;
this.quality = quality;
assignJobs = new AssignJobs();
virtualNodeMap = new ConcurrentHashMap<>(VIRTUAL_NODE_DEFAULT_SIZE);
}
private synchronized void addJob(Integer virtualNodeKey, Integer dispatchHash, Long jobId, boolean isFlushed) {
if (virtualNodeMap == null) {
virtualNodeMap = new ConcurrentHashMap<>(VIRTUAL_NODE_DEFAULT_SIZE);
}
if (assignJobs == null) {
assignJobs = new AssignJobs();
}
Set<Long[]> virtualNodeJob = virtualNodeMap.computeIfAbsent(virtualNodeKey, k -> ConcurrentHashMap.newKeySet(16));
virtualNodeJob.add(new Long[]{jobId, dispatchHash.longValue()});
if (isFlushed) {
assignJobs.addAssignJob(jobId);
} else {
assignJobs.addAddingJob(jobId);
}
}
/**
* obtain the collection task routed by the specified virtual node according to virtualNodeKey
* @param virtualNodeKey virtualNodeKey
* @return collection task
*/
private Set<Long[]> clearVirtualNodeJobs(Integer virtualNodeKey) {
if (virtualNodeMap == null || virtualNodeMap.isEmpty()) {
return null;
}
Set<Long[]> virtualNodeJobs = virtualNodeMap.remove(virtualNodeKey);
virtualNodeMap.put(virtualNodeKey, ConcurrentHashMap.newKeySet(16));
return virtualNodeJobs;
}
private void addVirtualNodeJobs(Integer virtualHashKey, Set<Long[]> reDispatchJobs) {
if (reDispatchJobs == null) {
return;
}
if (virtualNodeMap == null) {
virtualNodeMap = new ConcurrentHashMap<>(16);
}
virtualNodeMap.computeIfPresent(virtualHashKey, (k, v) -> {
reDispatchJobs.addAll(v);
return v;
});
virtualNodeMap.put(virtualHashKey, reDispatchJobs);
}
public void removeVirtualNodeJob(Long jobId) {
if (jobId == null || virtualNodeMap == null) {
return;
}
for (Set<Long[]> jobSet : virtualNodeMap.values()) {
Optional<Long[]> optional = jobSet.stream().filter(item -> Objects.equals(item[0], jobId)).findFirst();
if (optional.isPresent()) {
jobSet.remove(optional.get());
break;
}
}
}
public AssignJobs getAssignJobs() {
return assignJobs;
}
public void destroy() {
if (assignJobs != null) {
assignJobs.clear();
}
if (virtualNodeMap != null) {
virtualNodeMap.clear();
}
}
}
}
@@ -52,10 +52,10 @@ import org.springframework.util.StringUtils;
public class SchedulerInit implements CommandLineRunner {
@Autowired
private CollectorOperationReceiver collectorOperationReceiver;
private CollectorScheduling collectorScheduling;
@Autowired
private JobOperation jobOperation;
private CollectJobScheduling collectJobScheduling;
private static final String MAIN_COLLECTOR_NODE_IP = "127.0.0.1";
private static final String DEFAULT_COLLECTOR_VERSION = "DEBUG";
@@ -91,7 +91,7 @@ public class SchedulerInit implements CommandLineRunner {
.ip(MAIN_COLLECTOR_NODE_IP)
.version(DEFAULT_COLLECTOR_VERSION)
.build();
collectorOperationReceiver.collectorGoOnline(CommonConstants.MAIN_COLLECTOR_NODE, collectorInfo);
collectorScheduling.collectorGoOnline(CommonConstants.MAIN_COLLECTOR_NODE, collectorInfo);
// init jobs
List<Monitor> monitors = monitorDao.findMonitorsByStatusNotInAndJobIdNotNull(List.of(CommonConstants.MONITOR_PAUSED_CODE));
List<CollectorMonitorBind> monitorBinds = collectorMonitorBindDao.findAll();
@@ -136,7 +136,7 @@ public class SchedulerInit implements CommandLineRunner {
});
appDefine.setConfigmap(configmaps);
String collector = monitorIdCollectorMap.get(monitor.getId());
long jobId = jobOperation.addAsyncCollectJob(appDefine, collector);
long jobId = collectJobScheduling.addAsyncCollectJob(appDefine, collector);
monitor.setJobId(jobId);
monitorDao.save(monitor);
} catch (Exception e) {
@@ -15,7 +15,7 @@
* limitations under the License.
*/
package org.apache.hertzbeat.manager.properties;
package org.apache.hertzbeat.manager.scheduler;
import lombok.Getter;
import lombok.Setter;
@@ -1,82 +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.manager.scheduler.collector;
import org.apache.hertzbeat.common.constants.CollectorStatus;
import org.apache.hertzbeat.common.entity.job.Job;
import org.apache.hertzbeat.manager.pojo.CollectorNode;
import org.apache.hertzbeat.manager.scheduler.AssignJobs;
import java.util.function.BiConsumer;
/**
* Interface for managing collector nodes and their associated jobs.
* Maintains all collector information and provides operations for managing collectors and job assignments.
*/
public interface CollectorKeeper {
/**
* Adds a new collector node to the keeper's management pool.
* @param newNode The collector node to be added to the management system
*/
void addNode(CollectorNode newNode);
/**
* Assigns a monitoring job to a specific collector node.
* @param job The monitoring job to be assigned
* @param collectorId The unique identifier of the target collector node
* @return The collector node that received the job assignment
*/
CollectorNode addJob(Job job, String collectorId);
/**
* Retrieves a collector node by its unique identifier.
* @param collectorId The unique identifier of the collector node
* @return The collector node matching the given ID, or null if not found
*/
CollectorNode getNode(String collectorId);
/**
* Determines the most appropriate collector node for a given job based on scheduling logic.
* @param jobId The unique identifier of the job to be assigned
* @return The collector node selected to handle this job
*/
CollectorNode determineNode(Long jobId);
/**
* Updates the operational status of a collector node.
* @param collectorId The unique identifier of the collector node
* @param collectorStatus The new status to assign to the collector
*/
void changeStatus(String collectorId, CollectorStatus collectorStatus);
/**
* Rebalances job assignments across collector nodes, typically triggered by status changes.
* Uses a callback mechanism to handle job reassignments.
* @param assignJobCollectorConsumer A biconsumer that handles the job reassignment process,
* taking the job assignment logic and collector ID as parameters
*/
void rebalanceJobs(BiConsumer<AssignJobs, String> assignJobCollectorConsumer);
/**
* Removes a job from whichever collector node it is currently assigned to.
* @param jobId The unique identifier of the job to be removed
* @return The collector node from which the job was removed, or null if job wasn't found
*/
CollectorNode removeJob(Long jobId);
}
@@ -28,7 +28,7 @@ import org.apache.hertzbeat.alert.calculate.CollectorAlertHandler;
import org.apache.hertzbeat.common.entity.message.ClusterMsg;
import org.apache.hertzbeat.common.support.CommonThreadPool;
import org.apache.hertzbeat.manager.scheduler.CollectorJobScheduler;
import org.apache.hertzbeat.manager.properties.SchedulerProperties;
import org.apache.hertzbeat.manager.scheduler.SchedulerProperties;
import org.apache.hertzbeat.manager.scheduler.netty.process.CollectCyclicDataResponseProcessor;
import org.apache.hertzbeat.manager.scheduler.netty.process.CollectCyclicServiceDiscoveryDataResponseProcessor;
import org.apache.hertzbeat.manager.scheduler.netty.process.CollectOneTimeDataResponseProcessor;
@@ -45,8 +45,6 @@ import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import javax.annotation.PreDestroy;
/**
* manage server
*/
@@ -114,7 +112,6 @@ public class ManageServer implements CommandLineRunner {
}, 10, 3, TimeUnit.SECONDS);
}
@PreDestroy
public void shutdown() {
this.remotingServer.shutdown();
@@ -31,9 +31,8 @@ import org.apache.hertzbeat.common.support.exception.CommonException;
import org.apache.hertzbeat.common.util.IpDomainUtil;
import org.apache.hertzbeat.manager.dao.CollectorDao;
import org.apache.hertzbeat.manager.dao.CollectorMonitorBindDao;
import org.apache.hertzbeat.manager.pojo.CollectorNode;
import org.apache.hertzbeat.manager.scheduler.AssignJobs;
import org.apache.hertzbeat.manager.scheduler.ConsistentHashCollectorKeeper;
import org.apache.hertzbeat.manager.scheduler.ConsistentHash;
import org.apache.hertzbeat.manager.scheduler.netty.ManageServer;
import org.apache.hertzbeat.manager.service.CollectorService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -58,7 +57,7 @@ public class CollectorServiceImpl implements CollectorService {
private CollectorMonitorBindDao collectorMonitorBindDao;
@Autowired
private ConsistentHashCollectorKeeper consistentHashCollectorKeeper;
private ConsistentHash consistentHash;
@Autowired(required = false)
private ManageServer manageServer;
@@ -82,7 +81,7 @@ public class CollectorServiceImpl implements CollectorService {
List<CollectorSummary> collectorSummaryList = new LinkedList<>();
for (Collector collector : collectors.getContent()) {
CollectorSummary.CollectorSummaryBuilder summaryBuilder = CollectorSummary.builder().collector(collector);
CollectorNode node = consistentHashCollectorKeeper.getNode(collector.getName());
ConsistentHash.Node node = consistentHash.getNode(collector.getName());
if (node != null && node.getAssignJobs() != null) {
AssignJobs assignJobs = node.getAssignJobs();
summaryBuilder.pinMonitorNum(assignJobs.getPinnedJobs().size());
@@ -60,7 +60,7 @@ import org.apache.hertzbeat.manager.dao.MonitorDao;
import org.apache.hertzbeat.manager.dao.ParamDao;
import org.apache.hertzbeat.manager.pojo.dto.AppCount;
import org.apache.hertzbeat.manager.pojo.dto.MonitorDto;
import org.apache.hertzbeat.manager.scheduler.JobOperation;
import org.apache.hertzbeat.manager.scheduler.CollectJobScheduling;
import org.apache.hertzbeat.manager.service.AppService;
import org.apache.hertzbeat.manager.service.ImExportService;
import org.apache.hertzbeat.manager.service.LabelService;
@@ -113,7 +113,7 @@ public class MonitorServiceImpl implements MonitorService {
@Autowired
private AppService appService;
@Autowired
private JobOperation jobOperation;
private CollectJobScheduling collectJobScheduling;
@Autowired
private MonitorDao monitorDao;
@Autowired
@@ -193,10 +193,11 @@ public class MonitorServiceImpl implements MonitorService {
return new Configmap(param.getField(), param.getParamValue(), param.getType());
}).collect(Collectors.toList());
appDefine.setConfigmap(configmaps);
long jobId = jobOperation.addAsyncCollectJob(appDefine, collector);
detectMonitorSafely(monitor, params, collector);
long jobId = collector == null ? collectJobScheduling.addAsyncCollectJob(appDefine, null) :
collectJobScheduling.addAsyncCollectJob(appDefine, collector);
try {
detectMonitor(monitor, params, collector);
} catch (Exception ignored) {}
try {
if (collector != null) {
@@ -216,7 +217,7 @@ public class MonitorServiceImpl implements MonitorService {
paramDao.saveAll(params);
} catch (Exception e) {
log.error("Error while adding monitor: {}", e.getMessage(), e);
jobOperation.cancelAsyncCollectJob(jobId);
collectJobScheduling.cancelAsyncCollectJob(jobId);
throw new MonitorDatabaseException(e.getMessage());
}
}
@@ -509,11 +510,18 @@ public class MonitorServiceImpl implements MonitorService {
List<Configmap> configmaps = params.stream().map(param ->
new Configmap(param.getField(), param.getParamValue(), param.getType())).collect(Collectors.toList());
appDefine.setConfigmap(configmaps);
long newJobId = jobOperation.updateAsyncCollectJob(appDefine, collector);
long newJobId;
if (collector == null) {
newJobId = collectJobScheduling.updateAsyncCollectJob(appDefine);
} else {
newJobId = collectJobScheduling.updateAsyncCollectJob(appDefine, collector);
}
monitor.setJobId(newJobId);
// execute only in non paused status
detectMonitorSafely(monitor, params, collector);
try {
detectMonitor(monitor, params, collector);
} catch (Exception ignored) {}
}
// After the update is successfully released, refresh the database
@@ -540,7 +548,7 @@ public class MonitorServiceImpl implements MonitorService {
} catch (Exception e) {
log.error(e.getMessage(), e);
// Repository brushing abnormally cancels the previously delivered task
jobOperation.cancelAsyncCollectJob(monitor.getJobId());
collectJobScheduling.cancelAsyncCollectJob(monitor.getJobId());
throw new MonitorDatabaseException(e.getMessage());
}
}
@@ -570,7 +578,7 @@ public class MonitorServiceImpl implements MonitorService {
for (Monitor monitor : monitors) {
monitorBindDao.deleteByMonitorId(monitor.getId());
collectorMonitorBindDao.deleteCollectorMonitorBindsByMonitorId(monitor.getId());
jobOperation.cancelAsyncCollectJob(monitor.getJobId());
collectJobScheduling.cancelAsyncCollectJob(monitor.getJobId());
applicationContext.publishEvent(new MonitorDeletedEvent(applicationContext, monitor.getId()));
}
}
@@ -684,17 +692,17 @@ public class MonitorServiceImpl implements MonitorService {
// The jobId is not deleted, and the jobId is reused again after the management is started.
Set<Long> subMonitorIds = monitorBindDao.findMonitorBindsByBizIdIn(ids).stream().map(MonitorBind::getMonitorId).collect(Collectors.toSet());
ids.addAll(subMonitorIds);
List<Monitor> managedMonitors = monitorDao.findMonitorsByIdIn(ids).stream()
.filter(monitor -> monitor.getStatus() != CommonConstants.MONITOR_PAUSED_CODE)
List<Monitor> managedMonitors = monitorDao.findMonitorsByIdIn(ids)
.stream().filter(monitor ->
monitor.getStatus() != CommonConstants.MONITOR_PAUSED_CODE)
.peek(monitor -> monitor.setStatus(CommonConstants.MONITOR_PAUSED_CODE))
.collect(Collectors.toList());
if (CollectionUtils.isEmpty(managedMonitors)) {
return;
if (!CollectionUtils.isEmpty(managedMonitors)) {
for (Monitor monitor : managedMonitors) {
collectJobScheduling.cancelAsyncCollectJob(monitor.getJobId());
}
monitorDao.saveAll(managedMonitors);
}
managedMonitors.forEach(monitor -> jobOperation.cancelAsyncCollectJob(monitor.getJobId()));
monitorDao.saveAll(managedMonitors);
}
@Override
@@ -702,8 +710,9 @@ public class MonitorServiceImpl implements MonitorService {
// Update monitoring status Add corresponding monitoring periodic task
Set<Long> subMonitorIds = monitorBindDao.findMonitorBindsByBizIdIn(ids).stream().map(MonitorBind::getMonitorId).collect(Collectors.toSet());
ids.addAll(subMonitorIds);
List<Monitor> unManagedMonitors = monitorDao.findMonitorsByIdIn(ids).stream()
.filter(monitor -> monitor.getStatus() == CommonConstants.MONITOR_PAUSED_CODE)
List<Monitor> unManagedMonitors = monitorDao.findMonitorsByIdIn(ids)
.stream().filter(monitor ->
monitor.getStatus() == CommonConstants.MONITOR_PAUSED_CODE)
.peek(monitor -> monitor.setStatus(CommonConstants.MONITOR_UP_CODE))
.collect(Collectors.toList());
if (unManagedMonitors.isEmpty()) {
@@ -748,11 +757,13 @@ public class MonitorServiceImpl implements MonitorService {
Optional<CollectorMonitorBind> bindOptional =
collectorMonitorBindDao.findCollectorMonitorBindByMonitorId(monitor.getId());
String collector = bindOptional.map(CollectorMonitorBind::getCollector).orElse(null);
long newJobId = jobOperation.addAsyncCollectJob(appDefine, collector);
long newJobId = collectJobScheduling.addAsyncCollectJob(appDefine, collector);
monitor.setJobId(newJobId);
applicationContext.publishEvent(new MonitorDeletedEvent(applicationContext, monitor.getId()));
detectMonitorSafely(monitor, params, collector);
try {
detectMonitor(monitor, params, collector);
} catch (Exception ignored) {
}
}
monitorDao.saveAll(unManagedMonitors);
}
@@ -841,7 +852,7 @@ public class MonitorServiceImpl implements MonitorService {
// if is pinned collector
String collector = monitorIdCollectorMap.get(monitor.getId());
// Delivering a collection task
long newJobId = jobOperation.updateAsyncCollectJob(appDefine, collector);
long newJobId = collectJobScheduling.updateAsyncCollectJob(appDefine, collector);
monitor.setJobId(newJobId);
monitorDao.save(monitor);
} catch (Exception e) {
@@ -921,8 +932,12 @@ public class MonitorServiceImpl implements MonitorService {
new Configmap(param.getField(), param.getParamValue(), param.getType())).collect(Collectors.toList());
appDefine.setConfigmap(configmaps);
appDefine.setSd(true);
List<CollectRep.MetricsData> collectRep = jobOperation.collectSyncJobData(appDefine, collector);
List<CollectRep.MetricsData> collectRep;
if (collector != null) {
collectRep = collectJobScheduling.collectSyncJobData(appDefine, collector);
} else {
collectRep = collectJobScheduling.collectSyncJobData(appDefine);
}
monitor.setStatus(CommonConstants.MONITOR_UP_CODE);
// If the detection result fails, a detection exception is thrown
if (collectRep == null || collectRep.isEmpty()) {
@@ -960,7 +975,12 @@ public class MonitorServiceImpl implements MonitorService {
List<Metrics> availableMetrics = appDefine.getMetrics().stream()
.filter(item -> item.getPriority() == 0).collect(Collectors.toList());
appDefine.setMetrics(availableMetrics);
List<CollectRep.MetricsData> collectRep = jobOperation.collectSyncJobData(appDefine, collector);
List<CollectRep.MetricsData> collectRep;
if (collector != null) {
collectRep = collectJobScheduling.collectSyncJobData(appDefine, collector);
} else {
collectRep = collectJobScheduling.collectSyncJobData(appDefine);
}
monitor.setStatus(CommonConstants.MONITOR_UP_CODE);
// If the detection result fails, a detection exception is thrown
@@ -974,10 +994,4 @@ public class MonitorServiceImpl implements MonitorService {
}
collectRep.forEach(CollectRep.MetricsData::close);
}
private void detectMonitorSafely(Monitor monitor, List<Param> params, String collector) {
try {
detectMonitor(monitor, params, collector);
} catch (Exception ignored) {}
}
}
@@ -0,0 +1,21 @@
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
-- ensure every sql can rerun without error
-- Modify message column to TEXT (H2 TEXT is equivalent to CLOB)
ALTER TABLE HZB_STATUS_PAGE_INCIDENT_CONTENT ALTER COLUMN message CLOB;
@@ -0,0 +1,52 @@
-- 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.
-- ensure every sql can rerun without error
-- Modify hzb_status_page_incident_content table columns to TEXT type to resolve MySQL row size limit issue
DELIMITER //
CREATE PROCEDURE ModifyStatusIncidentContentColumns()
BEGIN
DECLARE table_exists INT;
DECLARE col_exists INT;
-- Check if the table exists
SELECT COUNT(*) INTO table_exists
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'HZB_STATUS_PAGE_INCIDENT_CONTENT';
IF table_exists = 1 THEN
-- Check and modify message column to TEXT
SELECT COUNT(*) INTO col_exists
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE()
AND TABLE_NAME = 'HZB_STATUS_PAGE_INCIDENT_CONTENT'
AND COLUMN_NAME = 'message'
AND DATA_TYPE != 'text';
IF col_exists = 1 THEN
ALTER TABLE HZB_STATUS_PAGE_INCIDENT_CONTENT MODIFY COLUMN message TEXT;
END IF;
END IF;
END //
DELIMITER ;
CALL ModifyStatusIncidentContentColumns();
DROP PROCEDURE IF EXISTS ModifyStatusIncidentContentColumns;
COMMIT;
@@ -0,0 +1,23 @@
-- 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.
-- ensure every sql can rerun without error
-- Modify message column to TEXT
ALTER TABLE HZB_STATUS_PAGE_INCIDENT_CONTENT ALTER COLUMN message TYPE TEXT;
commit;
@@ -21,10 +21,12 @@ app: dolphinscheduler
name:
zh-CN: Apache DolphinScheduler
en-US: Apache DolphinScheduler
ja-JP: Apache DolphinScheduler
# The description and help of this monitoring type
help:
zh-CN: Hertzbeat 对 Apache DolphinScheduler (支持v3.3.0或更高版本)通用指标进行测量监控。<br>您可以点击 “<i>新建 Apache DolphinScheduler</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat measures and monitors the general metrics of Apache DolphinScheduler (support v3.3.0 or later).<br>You can click on “<i>Create New Apache DolphinScheduler</i>” to configure it, or select “<i>More Actions</i>” to import an existing configuration.
ja-JP: Hertzbeat は Apache DolphinSchedulerv3.3.0+)の一般的なメトリクスを監視します。<br>「<i>新規 Apache DolphinScheduler</i>」をクリックしてパラメタを設定した後、新規することができます。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/dolphinscheduler
en-US: https://hertzbeat.apache.org/docs/help/dolphinscheduler
@@ -36,6 +38,7 @@ params:
name:
zh-CN: 目标Host
en-US: Target Host
ja-JP: 目標ホスト
# type-param field type(most mapping the html input type)
type: host
# required-true or false
@@ -46,6 +49,7 @@ params:
name:
zh-CN: 端口
en-US: Port
ja-JP: ポート
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
@@ -60,6 +64,7 @@ params:
name:
zh-CN: 查询超时时间
en-US: Query Timeout
ja-JP: クエリタイムアウト
# type-param field type(most mapping the html input type)
type: number
# required-true or false
@@ -74,6 +79,7 @@ params:
name:
zh-CN: 启用HTTPS
en-US: SSL
ja-JP: SSL
# type-param field type(boolean mapping the html h tag)
type: boolean
# required-true or false
@@ -83,6 +89,7 @@ params:
name:
zh-CN: 令牌
en-US: Token
ja-JP: トークン
type: text
limit: 100
required: true
@@ -93,6 +100,7 @@ metrics:
i18n:
zh-CN: Master
en-US: Master
ja-JP: マスター情報
# 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
@@ -104,76 +112,90 @@ metrics:
i18n:
zh-CN: 主机地址
en-US: Host
ja-JP: ホスト
- field: port
type: 1
i18n:
zh-CN: 端口
en-US: Port
ja-JP: ポート
- field: serverStatus
type: 1
i18n:
zh-CN: 状态
en-US: Server Status
ja-JP: サーバーステータス
- field: processId
type: 1
i18n:
zh-CN: 进程 ID
en-US: Process Id
ja-JP: プロセスID
- field: runningTime
type: 0
i18n:
zh-CN: 运行时间
en-US: Running Time
en-US: Up Time
ja-JP: アップタイム
- field: cpuUsage
type: 0
unit: '%'
i18n:
zh-CN: 处理器使用量
en-US: CPU Usage
ja-JP: CPU使用率
- field: memoryUsage
type: 0
unit: '%'
i18n:
zh-CN: 内存使用量
en-US: Memory Usage
ja-JP: メモリ使用率
- field: diskUsage
type: 0
unit: '%'
i18n:
zh-CN: 磁盘使用量
en-US: Disk Usage
ja-JP: ディスク使用率
- field: jvmCpuUsage
type: 0
unit: '%'
i18n:
zh-CN: JVM CPU 使用量
en-US: JVM CPU Usage
ja-JP: Java仮想マシンのCPU使用率
- field: jvmMemoryUsage
type: 0
unit: '%'
i18n:
zh-CN: JVM 内存 使用量
en-US: JVM Memory Usage
ja-JP: Java仮想マシンのメモリ使用率
- field: jvmHeapUsed
type: 0
i18n:
zh-CN: JVM 已使用的堆内存大小
en-US: JVM Heap Used
ja-JP: Java仮想マシンが使用したヒープメモリのサイズ
- field: jvmNonHeapUsed
type: 0
i18n:
zh-CN: JVM 已使用的非堆内存大小
en-US: JVM NonHeap Used
ja-JP: Java仮想マシンが使用したノンヒープメモリのサイズ
- field: jvmHeapMax
type: 0
i18n:
zh-CN: JVM 配置的最大堆内存大小
en-US: JVM Heap Max
ja-JP: Java仮想マシンのヒープメモリの最大値
- field: jvmNonHeapMax
type: 0
i18n:
zh-CN: JVM 配置的最大非堆内存大小
en-US: JVM NonHeap Max
ja-JP: Java仮想マシンのノンヒープメモリの最大値
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- $.heartBeatInfo
@@ -219,6 +241,7 @@ metrics:
i18n:
zh-CN: Worker
en-US: Worker
ja-JP: ワーカー情報
# 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
@@ -230,92 +253,109 @@ metrics:
i18n:
zh-CN: 主机地址
en-US: Host
ja-JP: ホスト
- field: port
type: 1
i18n:
zh-CN: 端口
en-US: Port
ja-JP: ポート
- field: serverStatus
type: 1
i18n:
zh-CN: 状态
en-US: Server Status
ja-JP: サーバーステータス
- field: processId
type: 1
i18n:
zh-CN: 进程 ID
en-US: Process Id
ja-JP: プロセスID
- field: runningTime
type: 0
i18n:
zh-CN: 运行时间
en-US: Running Time
en-US: Up Time
ja-JP: アップタイム
- field: cpuUsage
type: 0
unit: '%'
i18n:
zh-CN: 处理器使用量
en-US: CPU Usage
ja-JP: CPU使用率
- field: memoryUsage
type: 0
unit: '%'
i18n:
zh-CN: 内存使用量
en-US: Memory Usage
ja-JP: メモリ使用率
- field: diskUsage
type: 0
unit: '%'
i18n:
zh-CN: 磁盘使用量
en-US: Disk Usage
ja-JP: ディスク使用率
- field: jvmCpuUsage
type: 0
unit: '%'
i18n:
zh-CN: JVM CPU 使用量
en-US: JVM CPU Usage
ja-JP: Java仮想マシンのCPU使用率
- field: jvmMemoryUsage
type: 0
unit: '%'
i18n:
zh-CN: JVM 内存 使用量
en-US: JVM Memory Usage
ja-JP: Java仮想マシンのメモリ使用率
- field: jvmHeapUsed
type: 0
i18n:
zh-CN: JVM 已使用的堆内存大小
en-US: JVM Heap Used
ja-JP: Java仮想マシンが使用したヒープメモリのサイズ
- field: jvmNonHeapUsed
type: 0
i18n:
zh-CN: JVM 已使用的非堆内存大小
en-US: JVM NonHeap Used
ja-JP: Java仮想マシンが使用したノンヒープメモリのサイズ
- field: jvmHeapMax
type: 0
i18n:
zh-CN: JVM 配置的最大堆内存大小
en-US: JVM Heap Max
ja-JP: Java仮想マシンのヒープメモリの最大値
- field: jvmNonHeapMax
type: 0
i18n:
zh-CN: JVM 配置的最大非堆内存大小
en-US: JVM NonHeap Max
ja-JP: Java仮想マシンのノンヒープメモリの最大値
- field: workerHostWeight
type: 0
i18n:
zh-CN: 权重
en-US: Weight
ja-JP: ウェイト
- field: threadPoolUsage
type: 0
unit: '%'
i18n:
zh-CN: 线程池使用量
en-US: Thread Pool Usage
en-US: Thread Pool Usage
ja-JP: スレッドプールの使用率
- field: workerGroup
type: 1
i18n:
zh-CN: Worker 组
en-US: Worker Group
ja-JP: ワーカーグループ
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- $.heartBeatInfo
@@ -364,6 +404,7 @@ metrics:
i18n:
zh-CN: Alert Server
en-US: Alert Server
ja-JP: アラートサーバーの情報
# 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
@@ -375,76 +416,90 @@ metrics:
i18n:
zh-CN: 主机地址
en-US: Host
ja-JP: ホスト
- field: port
type: 1
i18n:
zh-CN: 端口
en-US: Port
ja-JP: ポート
- field: serverStatus
type: 1
i18n:
zh-CN: 状态
en-US: Server Status
ja-JP: サーバーステータス
- field: processId
type: 1
i18n:
zh-CN: 进程 ID
en-US: Process Id
ja-JP: プロセスID
- field: runningTime
type: 0
i18n:
zh-CN: 运行时间
en-US: Running Time
en-US: Up Time
ja-JP: アップタイム
- field: cpuUsage
type: 0
unit: '%'
i18n:
zh-CN: 处理器使用量
en-US: CPU Usage
ja-JP: CPU使用率
- field: memoryUsage
type: 0
unit: '%'
i18n:
zh-CN: 内存使用量
en-US: Memory Usage
ja-JP: メモリ使用率
- field: diskUsage
type: 0
unit: '%'
i18n:
zh-CN: 磁盘使用量
en-US: Disk Usage
ja-JP: ディスク使用率
- field: jvmCpuUsage
type: 0
unit: '%'
i18n:
zh-CN: JVM CPU 使用量
en-US: JVM CPU Usage
ja-JP: Java仮想マシンのCPU使用率
- field: jvmMemoryUsage
type: 0
unit: '%'
i18n:
zh-CN: JVM 内存 使用量
en-US: JVM Memory Usage
ja-JP: Java仮想マシンのメモリ使用率
- field: jvmHeapUsed
type: 0
i18n:
zh-CN: JVM 已使用的堆内存大小
en-US: JVM Heap Used
ja-JP: Java仮想マシンが使用したヒープメモリのサイズ
- field: jvmNonHeapUsed
type: 0
i18n:
zh-CN: JVM 已使用的非堆内存大小
en-US: JVM NonHeap Used
ja-JP: Java仮想マシンが使用したノンヒープメモリのサイズ
- field: jvmHeapMax
type: 0
i18n:
zh-CN: JVM 配置的最大堆内存大小
en-US: JVM Heap Max
ja-JP: Java仮想マシンのヒープメモリの最大値
- field: jvmNonHeapMax
type: 0
i18n:
zh-CN: JVM 配置的最大非堆内存大小
en-US: JVM NonHeap Max
ja-JP: Java仮想マシンのノンヒープメモリの最大値
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- $.heartBeatInfo
@@ -490,6 +545,7 @@ metrics:
i18n:
zh-CN: 数据库
en-US: Database
ja-JP: データベース情報
# 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: 2
@@ -501,26 +557,31 @@ metrics:
i18n:
zh-CN: 数据库类型
en-US: Database Type
ja-JP: データベースのタイプ
- field: state
type: 1
i18n:
zh-CN: 状态
en-US: State
ja-JP: 状態
- field: maxConnections
type: 0
i18n:
zh-CN: 最大连接数
en-US: Max Connections
ja-JP: 最大接続数
- field: threadsConnections
type: 0
i18n:
zh-CN: 当前连接数
en-US: Threads Connections
ja-JP: 現在接続数
- field: threadsRunningConnections
type: 0
i18n:
zh-CN: 当前活跃连接数
en-US: Threads Running Connections
ja-JP: 現在のアクティブな接続数
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- dbType
@@ -62,6 +62,7 @@ params:
type: number
required: false
hide: true
defaultValue: 6000
- field: authType
name:
zh-CN: 认证方式
@@ -125,7 +126,7 @@ metrics:
zh-CN: 状态
en-US: Status
ja-JP: ステータス
- field: size
- field: Size
type: 0
i18n:
zh-CN: 数量
@@ -137,6 +138,18 @@ metrics:
zh-CN: 可用数量
en-US: Available Size
ja-JP: 利用可能なサイズ
aliasFields:
- $.app
- $.category
- $.status
- $.size
- $.availableSize
calculates:
- app=$.app
- category=$.category
- status=$.status
- Size=$.size
- availableSize=$.availableSize
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk, we use HTTP protocol here
protocol: http
# the config content when protocol is http
@@ -228,7 +241,7 @@ metrics:
priority: 1
fields:
- field: state
type: 2
type: 1
i18n:
zh-CN: 状态
en-US: State
@@ -160,7 +160,7 @@ metrics:
zh-CN: 状态
en-US: Status
ja-JP: ステータス
- field: size
- field: Size
type: 0
i18n:
zh-CN: 数量
@@ -172,6 +172,18 @@ metrics:
zh-CN: 可用数量
en-US: Available Size
ja-JP: 利用可能なサイズ
aliasFields:
- $.app
- $.category
- $.status
- $.size
- $.availableSize
calculates:
- app=$.app
- category=$.category
- status=$.status
- Size=$.size
- availableSize=$.availableSize
protocol: http
http:
host: ^_^host^_^
@@ -651,7 +651,7 @@ metrics:
zh-CN: 次数
en-US: Num
ja-JP: 数量
- field: size
- field: Size
type: 0
unit: B
i18n:
@@ -21,11 +21,13 @@ app: redis_sentinel
name:
zh-CN: Redis Sentinel
en-US: Redis Sentinel
ja-JP: Redis Sentinel
# The description and help of this monitoring type
help:
zh-CN: Hertzbeat 对 Redis Sentinel 的通用指标进行采集监控。<br>您可以点击 “<i>新建 Redis Cluster</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat monitors Redis Database Sentinel's general performance metrics. You could click the "<i>New Redis Cluster</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat 對 Redis Sentinel 的通用指標進行采集監控。<br>您可以點擊 “<i>新建 Redis Cluster</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
zh-CN: Hertzbeat 对 Redis Sentinel 的通用指标进行采集监控。<br>您可以点击 “<i>新建 Redis Sentinel</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat monitors Redis Database Sentinel's general performance metrics. You could click the "<i>New Redis Sentinel</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat 對 Redis Sentinel 的通用指標進行采集監控。<br>您可以點擊 “<i>新建 Redis Sentinel</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
ja-JP: Hertzbeat は Redis Sentinel の一般的なパフォーマンスのメトリクスを監視します。<br>「<i>新規 Redis Sentinel</i>」をクリックしてパラメタを設定した後、新規することができます。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/influxdb_promql
en-US: https://hertzbeat.apache.org/docs/help/influxdb_promql
@@ -37,6 +39,7 @@ params:
name:
zh-CN: 目标Host
en-US: Target Host
ja-JP: 目標ホスト
# type-param field type(most mapping the html input type)
type: host
# required-true or false
@@ -46,6 +49,7 @@ params:
name:
zh-CN: 端口
en-US: Port
ja-JP: ポート
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
@@ -60,6 +64,7 @@ params:
name:
zh-CN: 查询超时时间(ms)
en-US: Query Timeout(ms)
ja-JP: クエリタイムアウト(ms)
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
@@ -74,6 +79,7 @@ params:
name:
zh-CN: 用户名
en-US: Username
ja-JP: ユーザー名
# type-param field type(most mapping the html input type)
type: text
# when type is text, use limit to limit string length
@@ -86,6 +92,7 @@ params:
name:
zh-CN: 密码
en-US: Password
ja-JP: パスワード
# type-param field type(most mapping the html input tag)
type: password
# required-true or false
@@ -96,6 +103,7 @@ params:
name:
zh-CN: 模式
en-US: Pattern
ja-JP: パターン
# type-param field type(most mapping the html input type)
type: number
# required-true or false
@@ -108,6 +116,7 @@ params:
name:
zh-CN: 是否启用SSH隧道
en-US: Enable SSH Tunnel
ja-JP: SSHトンネルの有効化
type: boolean
required: true
hide: true
@@ -115,6 +124,7 @@ params:
name:
zh-CN: SSH Host
en-US: SSH Host
ja-JP: SSHホスト
type: text
required: false
placeholder: 'When Enable SSH Tunnel'
@@ -123,6 +133,7 @@ params:
name:
zh-CN: SSH端口
en-US: SSH Port
ja-JP: SSHポート
type: number
range: '[0,65535]'
required: false
@@ -133,6 +144,7 @@ params:
name:
zh-CN: SSH超时时间(ms)
en-US: SSH Timeout(ms)
ja-JP: SSHタイムアウト(ms)
type: number
required: false
range: '[400,200000]'
@@ -142,6 +154,7 @@ params:
name:
zh-CN: SSH用户名
en-US: SSH Username
ja-JP: SSHユーザー名
type: text
required: false
placeholder: 'When Enable SSH tunnel'
@@ -150,6 +163,7 @@ params:
name:
zh-CN: SSH密码
en-US: SSH Password
ja-JP: SSHパスワード
type: password
required: false
hide: true
@@ -157,6 +171,7 @@ params:
name:
zh-CN: 是否共享SSH连接
en-US: Share SSH Connection
ja-JP: SSH接続共有
type: boolean
required: true
defaultValue: true
@@ -165,6 +180,7 @@ params:
name:
zh-CN: SSH私钥
en-US: SSH PrivateKey
ja-JP: SSH秘密鍵
type: textarea
placeholder: -----BEGIN RSA PRIVATE KEY-----
required: false
@@ -173,6 +189,7 @@ params:
name:
zh-CN: SSH密钥短语
en-US: SSH PrivateKey PassPhrase
ja-JP: SSH秘密鍵フレーズ
type: password
required: false
hide: true
@@ -181,6 +198,7 @@ metrics:
i18n:
zh-CN: 服务器
en-US: Server
ja-JP: サーバー情報
# 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
@@ -191,121 +209,145 @@ metrics:
i18n:
zh-CN: 标识
en-US: Identity
ja-JP: ID
- field: redis_version
type: 1
i18n:
zh-CN: Redis 版本
en-US: Redis Version
ja-JP: Redisバージョン
- field: redis_git_sha1
type: 0
i18n:
zh-CN: Redis Git SHA1
en-US: Redis Git SHA1
ja-JP: Redis Git SHA1
- field: redis_git_dirty
type: 0
i18n:
zh-CN: Redis Git Dirty
en-US: Redis Git Dirty
ja-JP: RedisサーバーのGitリポジトリ状態
- field: redis_build_id
type: 1
i18n:
zh-CN: Redis Build ID
en-US: Redis Build ID
ja-JP: Redis ビルド Id
- field: redis_mode
type: 1
i18n:
zh-CN: Redis 模式
en-US: Redis Mode
ja-JP: Redis モード
- field: os
type: 1
i18n:
zh-CN: 操作系统
en-US: Operating System
ja-JP: オーエス
- field: arch_bits
type: 0
i18n:
zh-CN: 架构位数
en-US: Architecture Bits
ja-JP: アーキテクチャ
- field: multiplexing_api
type: 1
i18n:
zh-CN: 多路复用 API
en-US: Multiplexing API
ja-JP: IO多重化API
- field: atomicvar_api
type: 1
i18n:
zh-CN: 原子变量 API
en-US: Atomicvar API
ja-JP: 原子操作API
- field: gcc_version
type: 1
i18n:
zh-CN: GCC 版本
en-US: GCC Version
ja-JP: GCC バージョン
- field: process_id
type: 0
i18n:
zh-CN: 进程 ID
en-US: Process ID
ja-JP: プロセスID
- field: process_supervised
type: 1
i18n:
zh-CN: 进程监控
en-US: Process Supervised
ja-JP: プロセスの監視方法
- field: run_id
type: 1
i18n:
zh-CN: 运行 ID
en-US: Run ID
ja-JP: Run ID
- field: tcp_port
type: 0
i18n:
zh-CN: TCP 端口
en-US: TCP Port
ja-JP: TCP ポート
- field: server_time_usec
type: 0
i18n:
zh-CN: 基于纪元的系统时间
en-US: Server Time Usec
ja-JP: サーバーのタイムスタンプ
- field: uptime_in_seconds
type: 0
i18n:
zh-CN: 运行时间(秒)
en-US: Uptime In Seconds
ja-JP: アップタイム(秒)
- field: uptime_in_days
type: 0
i18n:
zh-CN: 运行时间(天)
en-US: Uptime In Days
ja-JP: アップタイム(日)
- field: hz
type: 0
i18n:
zh-CN: 定时器频率
en-US: Hz
ja-JP: イベントの実行頻度
- field: configured_hz
type: 0
i18n:
zh-CN: 配置定时器频率
en-US: Configured Hz
ja-JP: 設定されたイベントの実行頻度
- field: lru_clock
type: 0
i18n:
zh-CN: LRU 时钟
en-US: LRU Clock
ja-JP: LRU クロック
- field: executable
type: 1
i18n:
zh-CN: 可执行文件
en-US: Executable
ja-JP: サーバーの実行パス
- field: config_file
type: 1
i18n:
zh-CN: 配置文件
en-US: Config File
ja-JP: 設定されたサーバーの実行ファイル
- field: io_threads_active
type: 0
i18n:
zh-CN: 活动 IO 线程
en-US: IO Threads Active
ja-JP: 活動中のスレッド数
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: redis
# the config content when protocol is redis
@@ -336,6 +378,7 @@ metrics:
i18n:
zh-CN: 客户端
en-US: Clients
ja-JP: クライアント情報
# 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
@@ -346,41 +389,49 @@ metrics:
i18n:
zh-CN: 已连接客户端
en-US: Connected Clients
ja-JP: 現在接続されているクライアントの数
- field: cluster_connections
type: 0
i18n:
zh-CN: 集群连接
en-US: Cluster Connections
ja-JP: クラスター内の接続数
- field: maxclients
type: 0
i18n:
zh-CN: 最大客户端数
en-US: Maxclients
ja-JP: 最大クライアント数
- field: client_recent_max_input_buffer
type: 0
i18n:
zh-CN: 客户端最近最大输入缓冲区
en-US: Client Recent Max Input Buffer
ja-JP: クライアントの最近の最大入力バッファサイズ
- field: client_recent_max_output_buffer
type: 0
i18n:
zh-CN: 客户端最近最大输出缓冲区
en-US: Client Recent Max Output Buffer
ja-JP: クライアントの最近の最大出力バッファサイズ
- field: blocked_clients
type: 0
i18n:
zh-CN: 阻塞客户端
en-US: Blocked Clients
ja-JP: ブロックされたクライアント数
- field: tracking_clients
type: 0
i18n:
zh-CN: 跟踪客户端
en-US: Tracking Clients
ja-JP: トラッキングを使用するクライアントの数
- field: clients_in_timeout_table
type: 0
i18n:
zh-CN: 超时表中的客户端
en-US: Clients In Timeout Table
ja-JP: タイムアウトテーブル内のクライアント数
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: redis
# the config content when protocol is redis
@@ -411,6 +462,7 @@ metrics:
i18n:
zh-CN: 统计
en-US: Stats
ja-JP: 統計情報
# 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: 2
@@ -421,191 +473,229 @@ metrics:
i18n:
zh-CN: 收到总连接数
en-US: Total Connections Received
ja-JP: サーバーの起動後に受信された合計接続数
- field: total_commands_processed
type: 0
i18n:
zh-CN: 处理总命令数
en-US: Total Commands Processed
ja-JP: サーバーの起動後に処理した総コマンド数
- field: instantaneous_ops_per_sec
type: 0
i18n:
zh-CN: 瞬时每秒操作数
en-US: Instantaneous Ops Per Sec
ja-JP: 1秒当たりに処理されたコマンドの数
- field: total_net_input_bytes
type: 0
i18n:
zh-CN: 总网络输入字节
en-US: Total Net Input Bytes
ja-JP: 受信されたネットワークバイトの合計数
- field: total_net_output_bytes
type: 0
i18n:
zh-CN: 总网络输出字节
en-US: Total Net Output Bytes
ja-JP: 転送されたネットワークバイトの合計数
- field: instantaneous_input_kbps
type: 0
i18n:
zh-CN: 瞬时的输入 kbps
en-US: Instantaneous Input Kbps
ja-JP: 瞬間入力速度(kbps)
- field: instantaneous_output_kbps
type: 0
i18n:
zh-CN: 瞬时输出 kbps
en-US: Instantaneous Output Kbps
ja-JP: 瞬間出力速度(kbps)
- field: rejected_connections
type: 0
i18n:
zh-CN: 拒绝连接数
en-US: Rejected Connections
ja-JP: maxclients制限で拒否された接続数
- field: sync_full
type: 0
i18n:
zh-CN: 全量同步
en-US: Sync Full
ja-JP: 完全同期の回数
- field: sync_partial_ok
type: 0
i18n:
zh-CN: 部分同步成功
en-US: Sync Partial Ok
ja-JP: 部分同期の回数
- field: sync_partial_err
type: 0
i18n:
zh-CN: 部分同步失败
en-US: Sync Partial Err
ja-JP: 部分同期のエラー回数
- field: expired_keys
type: 0
i18n:
zh-CN: 过期键
en-US: Expired Keys
ja-JP: expireコマンドで削除されたキーの数
- field: expired_stale_perc
type: 0
i18n:
zh-CN: 过期key占比
en-US: Expired Stale Perc
ja-JP: 期限切れのステイルキーの比率
- field: expired_time_cap_reached_count
type: 0
i18n:
zh-CN: 达到过期时间上限计数
en-US: Expired Time Cap Reached Count
ja-JP: 満了時間の制限に達した回数
- field: expire_cycle_cpu_milliseconds
type: 0
i18n:
zh-CN: 过期周期 CPU 毫秒
en-US: Expire Cycle CPU Milliseconds
ja-JP: 満了サイクルでかかったCPU時間(ms)
- field: evicted_keys
type: 0
i18n:
zh-CN: 逐出键
en-US: Evicted Keys
ja-JP: メモリ不足で追放されたキーの数
- field: keyspace_hits
type: 0
i18n:
zh-CN: 命中键
en-US: Keyspace Hits
ja-JP: キースペースのヒット数
- field: keyspace_misses
type: 0
i18n:
zh-CN: 未命中键
en-US: Keyspace Misses
ja-JP: キースペースのミス数
- field: pubsub_channels
type: 0
i18n:
zh-CN: 发布订阅频道
en-US: Pubsub Channels
ja-JP: 有効になっているPub/Subチャネルに接続されているチャネルの数
- field: pubsub_patterns
type: 0
i18n:
zh-CN: 发布订阅模式
en-US: Pubsub Patterns
ja-JP: 有効になっているPub/Subパターンで接続されたパターンチャネルの数
- field: latest_fork_usec
type: 0
i18n:
zh-CN: 最新 fork 毫秒
en-US: Latest Fork Usec
ja-JP: 最後のフォーク作業にかかった時間
- field: total_forks
type: 0
i18n:
zh-CN: 总 fork 数
en-US: Total Forks
ja-JP: 実行されたフォーク作業の合計数
- field: migrate_cached_sockets
type: 0
i18n:
zh-CN: 迁移缓存套接字
en-US: Migrate Cached Sockets
ja-JP: マイグレーションされたソケット数
- field: slave_expires_tracked_keys
type: 0
i18n:
zh-CN: 从节点过期跟踪键
en-US: Slave Expires Tracked Keys
ja-JP: スレーブで満了した、トラッキングされたキーの数
- field: active_defrag_hits
type: 0
i18n:
zh-CN: 活跃碎片整理命中
en-US: Active Defrag Hits
ja-JP: アクティブなデフラグ操作中に発生したヒットの数
- field: active_defrag_misses
type: 0
i18n:
zh-CN: 活跃碎片整理未命中
en-US: Active Defrag Misses
ja-JP: アクティブなデフラグ操作中に見逃したヒットの数
- field: active_defrag_key_hits
type: 0
i18n:
zh-CN: 活跃碎片整理键命中
en-US: Active Defrag Key Hits
ja-JP: デフラグ操作でヒットしたキーの数
- field: active_defrag_key_misses
type: 0
i18n:
zh-CN: 活跃碎片整理键未命中
en-US: Active Defrag Key Misses
ja-JP: デフラグ操作で見逃したキーの数
- field: tracking_total_keys
type: 0
i18n:
zh-CN: 跟踪键总数
en-US: Tracking Total Keys
ja-JP: トラッキングされたキーの合計数
- field: tracking_total_items
type: 0
i18n:
zh-CN: 跟踪项总数
en-US: Tracking Total Items
ja-JP: トラッキングされたアイテムの合計数
- field: tracking_total_prefixes
type: 0
i18n:
zh-CN: 跟踪前缀总数
en-US: Tracking Total Prefixes
ja-JP: トラッキングされたプレフィックスの合計数
- field: unexpected_error_replies
type: 0
i18n:
zh-CN: 意外错误回复
en-US: Unexpected Error Replies
ja-JP: 予期しないエラー応答の数
- field: total_error_replies
type: 0
i18n:
zh-CN: 总错误回复
en-US: Total Error Replies
ja-JP: 発生したエラーの合計応答の数
- field: dump_payload_sanitizations
type: 0
i18n:
zh-CN: 转储有效负载深度完整性验证的总数
en-US: Dump Payload Sanitizations
ja-JP: ダンプペイロードで実行された整理作業の数
- field: total_reads_processed
type: 0
i18n:
zh-CN: 总读取处理
en-US: Total Reads Processed
ja-JP: 処理された読み取り作業の合計数
- field: total_writes_processed
type: 0
i18n:
zh-CN: 总写入处理
en-US: Total Writes Processed
ja-JP: 処理された書き込み作業の合計数
- field: io_threaded_reads_processed
type: 0
i18n:
zh-CN: IO 线程读取处理
en-US: Io Threaded Reads Processed
ja-JP: I/Oスレッドで処理された読み取り作業の数
- field: io_threaded_writes_processed
type: 0
i18n:
zh-CN: IO 线程写入处理
en-US: Io Threaded Writes Processed
ja-JP: I/Oスレッドで処理された書き込み作業の数
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: redis
# the config content when protocol is redis
@@ -636,6 +726,7 @@ metrics:
i18n:
zh-CN: CPU
en-US: CPU
ja-JP: CPU情報
# 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: 3
@@ -646,31 +737,37 @@ metrics:
i18n:
zh-CN: 系统已使用 CPU
en-US: Sys CPU Used
ja-JP: システムモードで使用されたCPUの合計時間
- field: used_cpu_user
type: 0
i18n:
zh-CN: 用户已使用 CPU
en-US: User CPU Used
ja-JP: ユーザーモードで使用されたCPUの合計時間
- field: used_cpu_sys_children
type: 0
i18n:
zh-CN: Sys 子进程已使用 CPU
en-US: Sys Children CPU Used
ja-JP: 子プロセスがシステムモードで使用したCPU時間
- field: used_cpu_user_children
type: 0
i18n:
zh-CN: 用户子进程已使用 CPU
en-US: User Children CPU Used
ja-JP: 子プロセスがユーザーモードで使用したCPU時間
- field: used_cpu_sys_main_thread
type: 0
i18n:
zh-CN: 系统主线程已使用 CPU
en-US: Sys Main Thread CPU Used
ja-JP: プロセスがシステムモードで使用したCPU時間
- field: used_cpu_user_main_thread
type: 0
i18n:
zh-CN: 用户主线程已使用 CPU
en-US: User Main Thread CPU Used
ja-JP: プロセスがユーザーモードで使用したCPU時間
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: redis
# the config content when protocol is redis
@@ -701,6 +798,7 @@ metrics:
i18n:
zh-CN: 哨兵
en-US: Sentinel
ja-JP: Sentinel
# 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: 4
@@ -711,26 +809,31 @@ metrics:
i18n:
zh-CN: 主节点
en-US: Masters
ja-JP: マスターノード
- field: sentinel_tilt
type: 1
i18n:
zh-CN: 倾斜
en-US: Tilt
ja-JP: マスターをダウン状態としてマークする前の待機時間
- field: sentinel_running_scripts
type: 1
i18n:
zh-CN: 运行脚本
en-US: Running Scripts
ja-JP: 実行するスクリプト
- field: sentinel_scripts_queue_length
type: 1
i18n:
zh-CN: 脚本队列长度
en-US: Scripts Queue Length
ja-JP: 実行するスクリプトのキューの長さ
- field: sentinel_simulate_failure_flags
type: 1
i18n:
zh-CN: 模拟失败标志
en-US: Simulate Failure Flags
ja-JP: フェイルオーバー機能をテスト用のフラグ
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: redis
# the config content when protocol is redis
@@ -21,11 +21,13 @@ app: rockylinux
name:
zh-CN: Rocky Linux
en-US: Rocky Linux
ja-JP: Rocky Linux
# The description and help of this monitoring type
help:
zh-CN: Hertzbeat 使用 <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSH 协议</a> 对 Rocky 操作系统的通用性能指标 (系统信息、CPU、内存、磁盘、网卡、文件系统、TOP资源进程等) 进行采集监控。<br>您可以点击“<i>新建 Rocky</i>”并配置HOST端口账户等相关参数进行添加,支持SSH账户密码或密钥认证。或者选择“<i>更多操作</i>”,导入已有配置。
en-US: HertzBeat uses <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSH protocol</a> to monitors Rocky operating system's general performance metrics such as cpu, memory, disk, basic, interface, disk_free, top_process etc. <br>You can click the "<i>New Rocky</i>" and config host port and other related params to add, auth support password or secretKey. Or import an existing setup through the "<i>More Actions</i>" menu.
zh-TW: Hertzbeat 使用 <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSH 协议</a> 對 Rocky 操作系统的通用性能指標 (系統信息、CPU、內存、磁盤、網卡、文件系統、TOP資源進程等) 進行採集監控。<br>您可以點擊“<i>新建 Rocky</i>”並配置HOST端口賬戶等相關參數進行添加,支持SSH賬戶密碼或密鑰認證。或者選擇“<i>更多操作</i>”,導入已有配寘。
ja-JP: Hertzbeat は <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSHプロトコルを介して</a> Rockyオーエスの一般的なパフォーマンスのメトリクスを監視します。<br>「<i>新規 Rocky</i>」をクリックしてホストなどのパラメタを設定した後、新規することができます。SSHまたはキー認証をサポートします。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/rockylinux
en-US: https://hertzbeat.apache.org/docs/help/rockylinux
@@ -37,6 +39,7 @@ params:
name:
zh-CN: 目标Host
en-US: Target Host
ja-JP: 目標ホスト
# type-param field type(most mapping the html input type)
type: host
# required-true or false
@@ -47,6 +50,7 @@ params:
name:
zh-CN: 端口
en-US: Port
ja-JP: ポート
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
@@ -61,6 +65,7 @@ params:
name:
zh-CN: 超时时间(ms)
en-US: Timeout(ms)
ja-JP: タイムアウト(ms)
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
@@ -75,6 +80,7 @@ params:
name:
zh-CN: 复用连接
en-US: Reuse Connection
ja-JP: 接続再利用
# type-param field type(most mapping the html input type)
type: boolean
# required-true or false
@@ -86,6 +92,7 @@ params:
name:
zh-CN: 使用代理
en-US: Use Proxy Connection
ja-JP: プロキシ接続利用
# type-param field type(most mapping the html input type)
type: boolean
# required-true or false
@@ -97,6 +104,7 @@ params:
name:
zh-CN: 用户名
en-US: Username
ja-JP: ユーザー名
# type-param field type(most mapping the html input type)
type: text
# when type is text, use limit to limit string length
@@ -109,6 +117,7 @@ params:
name:
zh-CN: 密码
en-US: Password
ja-JP: パスワード
# type-param field type(most mapping the html input tag)
type: password
# required-true or false
@@ -119,6 +128,7 @@ params:
name:
zh-CN: 私钥
en-US: PrivateKey
ja-JP: 秘密鍵
# type-param field type(most mapping the html input type)
type: textarea
placeholder: -----BEGIN RSA PRIVATE KEY-----
@@ -132,6 +142,7 @@ params:
name:
zh-CN: 密钥短语
en-US: PrivateKey PassPhrase
ja-JP: 秘密鍵フレーズ
# type-param field type(most mapping the html input type)
type: password
# required-true or false
@@ -144,6 +155,7 @@ params:
name:
zh-CN: 代理主机
en-US: Proxy Host
ja-JP: プロキシホスト
# type-param field type(most mapping the html input type)
type: text
# required-true or false
@@ -155,6 +167,7 @@ params:
name:
zh-CN: 代理端口
en-US: Proxy Port
ja-JP: プロキシポート
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
@@ -171,6 +184,7 @@ params:
name:
zh-CN: 代理用户名
en-US: Proxy Username
ja-JP: プロキシユーザー名
# type-param field type(most mapping the html input type)
type: text
# when type is text, use limit to limit string length
@@ -185,6 +199,7 @@ params:
name:
zh-CN: 代理密码
en-US: Proxy Password
ja-JP: プロキシパスワード
# type-param field type(most mapping the html input tag)
type: password
# required-true or false
@@ -197,6 +212,7 @@ params:
name:
zh-CN: 代理主机私钥
en-US: proxyPrivateKey
ja-JP: プロキシ秘密鍵
# type-param field type(most mapping the html input type)
type: textarea
placeholder: -----BEGIN RSA PRIVATE KEY-----
@@ -211,6 +227,7 @@ metrics:
i18n:
zh-CN: 系统基本信息
en-US: Basic Info
ja-JP: システム基礎情報
# 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
@@ -223,16 +240,19 @@ metrics:
i18n:
zh-CN: 主机名称
en-US: Host Name
ja-JP: ホスト名
- field: version
type: 1
i18n:
zh-CN: 操作系统版本
en-US: System Version
ja-JP: システムバージョン
- field: uptime
type: 1
i18n:
zh-CN: 启动时间
en-US: Uptime
ja-JP: アップタイム
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: ssh
# the config content when protocol is ssh
@@ -272,6 +292,7 @@ metrics:
i18n:
zh-CN: CPU 信息
en-US: CPU Info
ja-JP: CPU情報
priority: 1
fields:
- field: info
@@ -279,32 +300,38 @@ metrics:
i18n:
zh-CN: 型号
en-US: Info
ja-JP: バージョン
- field: cores
type: 1
i18n:
zh-CN: 核数
en-US: Cores
ja-JP: コア数
- field: interrupt
type: 0
i18n:
zh-CN: 中断数
en-US: Interrupt
ja-JP: 割り込み数
- field: load
type: 1
i18n:
zh-CN: 负载
en-US: Load
ja-JP: ロード
- field: context_switch
type: 0
i18n:
zh-CN: 上下文切换
en-US: Context Switch
ja-JP: コンテキストスイッチ
- field: usage
type: 0
unit: '%'
i18n:
zh-CN: 使用率
en-US: Usage
ja-JP: 使用率
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- info
@@ -351,6 +378,7 @@ metrics:
i18n:
zh-CN: 内存信息
en-US: Memory Info
ja-JP: メモリ情報
priority: 2
fields:
- field: total
@@ -359,36 +387,42 @@ metrics:
i18n:
zh-CN: 总内存容量
en-US: Total Memory
ja-JP: メモリ容量
- field: used
type: 0
unit: Mb
i18n:
zh-CN: 用户程序内存量
en-US: User Program Memory
ja-JP: ユーザープログラムメモリ
- field: free
type: 0
unit: Mb
i18n:
zh-CN: 空闲内存容量
en-US: Free Memory
ja-JP: 空きメモリ
- field: buff_cache
type: 0
unit: Mb
i18n:
zh-CN: 缓存占用内存
en-US: Buff Cache Memory
ja-JP: バッファメモリ
- field: available
type: 0
unit: Mb
i18n:
zh-CN: 剩余可用内存
en-US: Available Memory
ja-JP: 使用可能のメモリ
- field: usage
type: 0
unit: '%'
i18n:
zh-CN: 内存使用率
en-US: Memory Usage
ja-JP: メモリ使用率
aliasFields:
- total
- used
@@ -431,6 +465,7 @@ metrics:
i18n:
zh-CN: 磁盘信息
en-US: Disk Info
ja-JP: ディスク情報
priority: 3
fields:
- field: disk_num
@@ -438,27 +473,32 @@ metrics:
i18n:
zh-CN: 磁盘总数
en-US: Disk Num
ja-JP: ディスク番号
- field: partition_num
type: 1
i18n:
zh-CN: 分区总数
en-US: Partition Num
ja-JP: パーティション
- field: block_write
type: 0
i18n:
zh-CN: 写磁盘块数
en-US: Block Write
ja-JP: 書き込みディスクブロック数
- field: block_read
type: 0
i18n:
zh-CN: 读磁盘块数
en-US: Block Read
ja-JP: 読み取りブロック数
- field: write_rate
type: 0
unit: iops
i18n:
zh-CN: 磁盘写速率
en-US: Write Rate
ja-JP: ディスク書き込み速度
protocol: ssh
ssh:
host: ^_^host^_^
@@ -488,6 +528,7 @@ metrics:
i18n:
zh-CN: 网卡信息
en-US: Interface Info
ja-JP: ネットワークカード情報
priority: 4
fields:
- field: interface_name
@@ -496,18 +537,21 @@ metrics:
i18n:
zh-CN: 网卡名称
en-US: Interface Name
ja-JP: ネットワークカード名
- field: receive_bytes
type: 0
unit: Mb
i18n:
zh-CN: 入站数据流量
en-US: Receive Bytes
ja-JP: 受信されたバイト数
- field: transmit_bytes
type: 0
unit: Mb
i18n:
zh-CN: 出站数据流量
en-US: Transmit Bytes
ja-JP: 転送されたバイト数
units:
- receive_bytes=B->MB
- transmit_bytes=B->MB
@@ -540,6 +584,7 @@ metrics:
i18n:
zh-CN: 文件系统
en-US: Disk Free
ja-JP: ファイルシステム
priority: 5
fields:
- field: filesystem
@@ -547,30 +592,35 @@ metrics:
i18n:
zh-CN: 文件系统
en-US: Filesystem
ja-JP: ファイルシステム
- field: used
type: 0
unit: Mb
i18n:
zh-CN: 已使用量
en-US: Used
ja-JP: 使用済み
- field: available
type: 0
unit: Mb
i18n:
zh-CN: 可用量
en-US: Available
ja-JP: 使用可能
- field: usage
type: 0
unit: '%'
i18n:
zh-CN: 使用率
en-US: Usage
ja-JP: 使用率
- field: mounted
type: 1
label: true
i18n:
zh-CN: 挂载点
en-US: Mounted
ja-JP: マウント
protocol: ssh
ssh:
host: ^_^host^_^
@@ -600,6 +650,7 @@ metrics:
i18n:
zh-CN: Top10 CPU 进程
en-US: Top10 CPU Process
ja-JP: トップ10 CPUプロセス
priority: 6
fields:
- field: pid
@@ -608,23 +659,27 @@ metrics:
i18n:
zh-CN: 进程ID
en-US: PID
ja-JP: プロセスID
- field: cpu_usage
type: 0
unit: '%'
i18n:
zh-CN: CPU占用率
en-US: CPU Usage
ja-JP: CPU使用率
- field: mem_usage
type: 0
unit: '%'
i18n:
zh-CN: 内存占用率
en-US: Memory Usage
ja-JP: メモリ使用率
- field: command
type: 1
i18n:
zh-CN: 执行命令
en-US: Command
ja-JP: コマンド
protocol: ssh
ssh:
host: ^_^host^_^
@@ -654,6 +709,7 @@ metrics:
i18n:
zh-CN: Top10 内存进程
en-US: Top10 Memory Process
ja-JP: トップ10 メモリプロセス
priority: 7
fields:
- field: pid
@@ -662,23 +718,27 @@ metrics:
i18n:
zh-CN: 进程ID
en-US: PID
ja-JP: プロセスID
- field: mem_usage
type: 0
unit: '%'
i18n:
zh-CN: 内存占用率
en-US: Memory Usage
ja-JP: メモリ使用率
- field: cpu_usage
type: 0
unit: '%'
i18n:
zh-CN: CPU占用率
en-US: CPU Usage
ja-JP: CPU使用率
- field: command
type: 1
i18n:
zh-CN: 执行命令
en-US: Command
ja-JP: コマンド
protocol: ssh
ssh:
host: ^_^host^_^
@@ -21,11 +21,13 @@ app: seatunnel
name:
zh-CN: Seatunnel
en-US: Seatunnel
ja-JP: Seatunnel
# The description and help of this monitoring type
help:
zh-CN: Hertzbeat 对 Seatunnel 通用指标进行测量监控。<br>您可以点击 “<i>新建 Seatunnel</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat measures and monitors the general metrics of Seatunnel.<br>You can click on “<i>Create New Seatunnel</i>” to configure it, or select “<i>More Actions</i>” to import an existing configuration.
zh-TW: Hertzbeat 對 Seatunnel 通用指標進行測量監控。<br>您可以點擊 “<i>新建 Seatunnel</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
ja-JP: Hertzbeat は Seatunnelの一般的なメトリクスを監視します。<br>「<i>新規 Seatunnel</i>」をクリックしてパラメタを設定した後、新規することができます。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/seatunnel
en-US: https://hertzbeat.apache.org/docs/help/seatunnel
@@ -37,6 +39,7 @@ params:
name:
zh-CN: 目标Host
en-US: Target Host
ja-JP: 目標ホスト
# type-param field type(most mapping the html input type)
type: host
# required-true or false
@@ -47,6 +50,7 @@ params:
name:
zh-CN: 端口
en-US: Port
ja-JP: ポート
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
@@ -61,6 +65,7 @@ params:
name:
zh-CN: 查询超时时间
en-US: Query Timeout
ja-JP: クエリタイムアウト
# type-param field type(most mapping the html input type)
type: number
# required-true or false
@@ -75,6 +80,7 @@ params:
name:
zh-CN: 启用HTTPS
en-US: SSL
ja-JP: SSL
# type-param field type(boolean mapping the html h tag)
type: boolean
# required-true or false
@@ -86,6 +92,7 @@ metrics:
i18n:
zh-CN: 集群概览
en-US: Cluster Overview
ja-JP: クラスター概要
# 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
@@ -97,48 +104,56 @@ metrics:
i18n:
zh-CN: 项目版本
en-US: Project Version
ja-JP: プロジェクトバージョン
- field: gitCommitAbbrev
type: 1
i18n:
zh-CN: Git提交编号
en-US: Git Commit Abbrev
ja-JP: GitコミットID
- field: totalSlot
type: 0
i18n:
zh-CN: 总槽位数
en-US: Total Slot
ja-JP: スロット数
- field: unassignedSlot
type: 0
i18n:
zh-CN: 未分配槽位数
en-US: Unassigned Slot
ja-JP: 未割り当てのスロット数
- field: runningJobs
type: 0
i18n:
zh-CN: 运行中任务数
en-US: Running Jobs
ja-JP: 実行中のタスク数
- field: finishedJobs
type: 0
i18n:
zh-CN: 已完成任务数
en-US: Finished Jobs
ja-JP: 完了したタスク数
- field: failedJobs
type: 0
i18n:
zh-CN: 失败任务数
en-US: Failed Jobs
ja-JP: 失敗したタスク数
- field: cancelledJobs
type: 0
i18n:
zh-CN: 取消任务数
en-US: Cancelled Jobs
ja-JP: キャンセルされたタスク数
- field: workers
type: 0
i18n:
zh-CN: Worker数
en-US: Workers
ja-JP: ワーカー数
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
# (可选)监控指标别名, 做为中间字段与采集数据字段和指标字段映射转换
aliasFields:
- projectVersion
- gitCommitAbbrev
@@ -182,6 +197,7 @@ metrics:
i18n:
zh-CN: 线程信息
en-US: Thread Info
ja-JP: スレッド情報
priority: 1
fields:
- field: threadName
@@ -190,21 +206,25 @@ metrics:
i18n:
zh-CN: 线程名称
en-US: Thread Name
ja-JP: スレッド名
- field: threadId
type: 0
i18n:
zh-CN: 线程ID
en-US: Thread ID
ja-JP: スレッドID
- field: threadState
type: 1
i18n:
zh-CN: 线程状态
en-US: Thread State
ja-JP: スレッド状態
- field: stackTrace
type: 1
i18n:
zh-CN: 堆栈信息
en-US: Stack Trace
ja-JP: スタックトレース
protocol: http
http:
host: ^_^host^_^
@@ -227,6 +247,7 @@ metrics:
i18n:
zh-CN: 节点监控
en-US: Node Monitor
ja-JP: ノード情報
priority: 1
fields:
- field: isMaster
@@ -235,241 +256,289 @@ metrics:
i18n:
zh-CN: 是否主节点
en-US: Is Master
ja-JP: マスターノード
- field: host
type: 1
i18n:
zh-CN: IP地址
en-US: IP Address
ja-JP: IPアドレス
- field: port
type: 1
i18n:
zh-CN: 端口
en-US: Port
ja-JP: ポート
- field: processors
type: 1
i18n:
zh-CN: 处理器数
en-US: Processors
ja-JP: プロセッサ数
- field: physical.memory.total
type: 1
i18n:
zh-CN: 物理内存总量
en-US: Physical Memory Total
ja-JP: 物理メモリ容量
- field: physical.memory.free
type: 1
i18n:
zh-CN: 物理内存可用
en-US: Physical Memory Free
ja-JP: 利用可能な物理メモリ
- field: swap.space.total
type: 1
i18n:
zh-CN: 交换空间总量
en-US: Swap Space Total
ja-JP: スワップ領域容量
- field: swap.space.free
type: 1
i18n:
zh-CN: 交换空间可用
en-US: Swap Space Free
ja-JP: 利用可能なスワップ領域
- field: heap.memory.used
type: 1
i18n:
zh-CN: 堆内存已用
en-US: Heap Memory Used
ja-JP: 使用したヒープメモリ
- field: heap.memory.free
type: 1
i18n:
zh-CN: 堆内存可用
en-US: Heap Memory Free
ja-JP: 利用可能なヒープメモリ
- field: heap.memory.total
type: 1
i18n:
zh-CN: 堆内存总量
en-US: Heap Memory Total
ja-JP: ヒープメモリ容量
- field: heap.memory.max
type: 1
i18n:
zh-CN: 堆内存最大
en-US: Heap Memory Max
ja-JP: ヒープメモリの最大値
- field: heap.memory.used/total
type: 1
i18n:
zh-CN: 堆内存使用率
en-US: Heap Memory Used/Total
ja-JP: ヒープメモリの使用率
- field: heap.memory.used/max
type: 1
i18n:
zh-CN: 堆内存使用率最大
en-US: Heap Memory Used/Max
ja-JP: ヒープメモリの使用率の最大値
- field: minor.gc.count
type: 1
i18n:
zh-CN: 小垃圾回收次数
en-US: Minor GC Count
ja-JP: 若い領域GC回数
- field: minor.gc.time
type: 1
i18n:
zh-CN: 小垃圾回收时间
en-US: Minor GC Time
ja-JP: 若い領域GC時間
- field: major.gc.count
type: 1
i18n:
zh-CN: 大垃圾回收次数
en-US: Major GC Count
ja-JP: 古い領域GC回数
- field: major.gc.time
type: 1
i18n:
zh-CN: 大垃圾回收时间
en-US: Major GC Time
ja-JP: 古い領域GC時間
- field: load.process
type: 1
i18n:
zh-CN: 进程负载
en-US: Load Process
ja-JP: プロセスロード
- field: load.system
type: 1
i18n:
zh-CN: 系统负载
en-US: Load System
ja-JP: システムロード
- field: load.systemAverage
type: 1
i18n:
zh-CN: 系统平均负载
en-US: Load System Average
ja-JP: システムの平均ロード
- field: thread.count
type: 1
i18n:
zh-CN: 线程数
en-US: Thread Count
ja-JP: スレッド数
- field: thread.peakCount
type: 1
i18n:
zh-CN: 线程峰值
en-US: Thread Peak Count
ja-JP: 最大スレッド数
- field: cluster.timeDiff
type: 1
i18n:
zh-CN: 集群时间差
en-US: Cluster Time Diff
ja-JP: クラスター間の時差
- field: event.q.size
type: 1
i18n:
zh-CN: 事件队列大小
en-US: Event Queue Size
ja-JP: イベントキューのサイズ
- field: executor.q.async.size
type: 1
i18n:
zh-CN: 异步执行队列大小
en-US: Executor Queue Async Size
ja-JP: 非同期実行キューのサイズ
- field: executor.q.client.size
type: 1
i18n:
zh-CN: 客户端执行队列大小
en-US: Executor Queue Client Size
ja-JP: クライアントが実行するキューのサイズ
- field: executor.q.client.query.size
type: 1
i18n:
zh-CN: 客户端查询队列大小
en-US: Executor Queue Client Query Size
ja-JP: クライアントが実行するクエリキューのサイズ
- field: executor.q.client.blocking.size
type: 1
i18n:
zh-CN: 客户端阻塞队列大小
en-US: Executor Queue Client Blocking Size
ja-JP: クライアントが実行するブロッキングキューのサイズ
- field: executor.q.query.size
type: 1
i18n:
zh-CN: 查询队列大小
en-US: Executor Queue Query Size
ja-JP: クエリキューのサイズ
- field: executor.q.scheduled.size
type: 1
i18n:
zh-CN: 定时执行队列大小
en-US: Executor Queue Scheduled Size
ja-JP: スケジュールされたキューのサイズ
- field: executor.q.io.size
type: 1
i18n:
zh-CN: IO队列大小
en-US: Executor Queue IO Size
ja-JP: IOキューのサイズ
- field: executor.q.system.size
type: 1
i18n:
zh-CN: 系统执行队列大小
en-US: Executor Queue System Size
ja-JP: システムキューのサイズ
- field: executor.q.operations.size
type: 1
i18n:
zh-CN: 操作队列大小
en-US: Executor Queue Operations Size
ja-JP: 操作キューのサイズ
- field: executor.q.priorityOperation.size
type: 1
i18n:
zh-CN: 优先操作队列大小
en-US: Executor Queue Priority Operation Size
ja-JP: 優先操作キューのサイズ
- field: operations.completed.count
type: 1
i18n:
zh-CN: 完成操作次数
en-US: Operations Completed Count
ja-JP: 操作完了の回数
- field: executor.q.mapLoad.size
type: 1
i18n:
zh-CN: 映射加载队列大小
en-US: Executor Queue Map Load Size
ja-JP: Mapからロードするキューのサイズ
- field: executor.q.mapLoadAllKeys.size
type: 1
i18n:
zh-CN: 映射加载所有键大小
en-US: Executor Queue Map Load All Keys Size
ja-JP: Mapから全てのキーをロードするキューのサイズ
- field: executor.q.cluster.size
type: 1
i18n:
zh-CN: 集群执行队列大小
en-US: Executor Queue Cluster Size
ja-JP: クラスターキューのサイズ
- field: executor.q.response.size
type: 1
i18n:
zh-CN: 响应队列大小
en-US: Executor Queue Response Size
ja-JP: 応答キューのサイズ
- field: operations.running.count
type: 1
i18n:
zh-CN: 正在运行的操作数量
en-US: Operations Running Count
ja-JP: 実行中のキューのサイズ
- field: operations.pending.invocations.percentage
type: 1
i18n:
zh-CN: 待处理调用百分比
en-US: Operations Pending Invocations Percentage
ja-JP: 待機中の操作の比率
- field: operations.pending.invocations.count
type: 1
i18n:
zh-CN: 待处理调用数量
en-US: Operations Pending Invocations Count
ja-JP: 待機中の操作数
- field: proxy.count
type: 1
i18n:
zh-CN: 代理数量
en-US: Proxy Count
ja-JP: プロキシ数
- field: clientEndpoint.count
type: 1
i18n:
zh-CN: 客户端端点数量
en-US: Client Endpoint Count
ja-JP: クライアントエンドポイントの数
- field: connection.active.count
type: 1
i18n:
zh-CN: 活动连接数
en-US: Connection Active Count
ja-JP: アクティブな接続数
- field: client.connection.count
type: 1
i18n:
zh-CN: 客户端连接数
en-US: Client Connection Count
ja-JP: クライアント接続数
- field: connection.count
type: 1
i18n:
zh-CN: 总连接数
en-US: Connection Count
ja-JP: 接続総数
protocol: http
http:
host: ^_^host^_^
@@ -19,15 +19,15 @@ category: mid
app: spring_gateway
# The monitoring i18n name
name:
zh-CN: SpringGateway
en-US: SpringGateway
ja-JP: SpringGateway
zh-CN: Spring Cloud Gateway
en-US: Spring Cloud Gateway
ja-JP: Spring Cloud Gateway
# The description and help of this monitoring type
help:
zh-CN: HertzBeat 对 <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a> 暴露的通用性能指标(globalfilters、routefilters、refresh、routes)进行采集监控。<span class='help_module_span'>注意⚠️:如果要监控 SpringGateway 中的信息,需要您的 SpringGateway 应用集成并开启 SpringBoot Actuator, <a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>点击查看具体步骤</a>。</span>
en-US: HertzBeat collect and monitors SpringGateway through general performance metric that exposed by the SpringBoot Actuator. <br><span class='help_module_span'><br>Note⚠️:You should make sure that your SpringGateway application have already integrated and enabled the SpringBoot Actuator, <a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>click here to see the specific steps.</a></span>
zh-TW: HertzBeat 對 <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a>暴露的通用性能指標(globalfilters、routefilters、refresh、routes)進行採集監控。<span class='help_module_span'>注意⚠️:如果要監控SpringGateway中的指標,需要您的SpringGateway應用集成並開啟SpringBoot Actuator<a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>點擊查看具體步驟</a>。</span>
ja-JP: HertzBeat は <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a> の一般的なパフォーマンスのメトリクスを監視します。<span class='help_module_span'>⚠️注意:SpringGateway で SpringBoot Actuatorを有効にする必要があります。<a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>クリックしてガイドを見ます</a>。</span>
zh-CN: HertzBeat 对 <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a> 暴露的通用性能指标(globalfilters、routefilters、refresh、routes)进行采集监控。<span class='help_module_span'>注意⚠️:如果要监控 Spring Cloud Gateway 中的信息,需要您的 Spring Cloud Gateway 应用集成并开启 SpringBoot Actuator, <a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>点击查看具体步骤</a>。</span>
en-US: HertzBeat collect and monitors SpringGateway through general performance metric that exposed by the SpringBoot Actuator. <br><span class='help_module_span'><br>Note⚠️:You should make sure that your Spring Cloud Gateway application have already integrated and enabled the SpringBoot Actuator, <a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>click here to see the specific steps.</a></span>
zh-TW: HertzBeat 對 <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a>暴露的通用性能指標(globalfilters、routefilters、refresh、routes)進行採集監控。<span class='help_module_span'>注意⚠️:如果要監控 Spring Cloud Gateway 中的指標,需要您的 Spring Cloud Gateway 應用集成並開啟SpringBoot Actuator<a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>點擊查看具體步驟</a>。</span>
ja-JP: HertzBeat は <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a> の一般的なパフォーマンスのメトリクスを監視します。<span class='help_module_span'>⚠️注意:Spring Cloud Gateway で SpringBoot Actuatorを有効にする必要があります。<a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>クリックしてガイドを見ます</a>。</span>
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/spring_gateway
en-US: https://hertzbeat.apache.org/docs/help/spring_gateway
@@ -284,7 +284,7 @@ metrics:
en-US: State
ja-JP: 状態
label: true
- field: size
- field: Size
type: 0
i18n:
zh-CN: 数量
@@ -294,7 +294,7 @@ metrics:
- $.measurements[?(@.statistic == "VALUE")].value
calculates:
- state='^o^state^o^'
- size=$.measurements[?(@.statistic == "VALUE")].value
- Size=$.measurements[?(@.statistic == "VALUE")].value
protocol: http
http:
host: ^_^host^_^
@@ -21,11 +21,13 @@ app: tomcat
name:
zh-CN: Tomcat应用服务器
en-US: Tomcat WebServer
ja-JP: Tomcat WebServer
# The description and help of this monitoring type
help:
zh-CN: HertzBeat 使用 <a href="https://hertzbeat.apache.org/docs/advanced/extend-jmx">JMX 协议</a> 对 Tomcat 的通用性能指标(基础信息,内存池,类加载,线程信息等)进行采集监控。<br>⚠️注意:您需要在 Tomcat 应用中开启 JMX 服务,应用启动时添加 JMX 参数, 可自定义暴露端口,对外IP。<a href="https://hertzbeat.apache.org/zh-cn/docs/help/tomcat">点击查看开启步骤</a>。
en-US: HertzBeat uses <a href='https://hertzbeat.apache.org/docs/advanced/extend-jmx'>JMX Protocol</a> to monitoring and collect general performance metric of Tomcat. <br>⚠️Note:You need to enable JMX services in Tomcat application, and add the JXM parameters when the application start. You can also customize external IP address and exposed port.<a href='https://hertzbeat.apache.org/docs/help/tomcat'>Click here to view the activation steps.</a>"
zh-TW: HertzBeat 使用 <a href="https://hertzbeat.apache.org/docs/advanced/extend-jmx">JMX 協議</a> 對 Tomcat 的通用性能指標(基礎信息,內存池,類加載,線程信息等)進行采集監控。<br>⚠️注意:您需要在 Tomcat 應用中開啓 JMX 服務,應用啓動時添加 JMX 參數, 可自定義暴露端口,對外IP。<a href="https://hertzbeat.apache.org/zh-cn/docs/help/tomcat">點擊查看開啓步驟</a>。
ja-JP: HertzBeat は <a href="https://hertzbeat.apache.org/docs/advanced/extend-jmx"> JMXプロトコルを介して</a> Tomcat の一般的なパフォーマンスのメトリクスを監視します。⚠️注意:Tomcat応用 で JMXサービス を有効にする必要があります。<a href="https://hertzbeat.apache.org/docs/help/tomcat">クリックしてガイドを見ます</a>。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/tomcat
en-US: https://hertzbeat.apache.org/docs/help/tomcat
@@ -37,6 +39,7 @@ params:
name:
zh-CN: 目标Host
en-US: Target Host
ja-JP: 目標ホスト
# type-param field type(most mapping the html input type)
type: host
# required-true or false
@@ -47,6 +50,7 @@ params:
name:
zh-CN: 端口
en-US: Port
ja-JP: ポート
# type-param field type(most mapping the html input type)
type: number
# when type is number, range is required
@@ -61,6 +65,7 @@ params:
name:
zh-CN: JMX URL
en-US: JMX URL
ja-JP: JMX URL
# type-param field type(most mapping the html input type)
type: text
# required-true or false
@@ -75,6 +80,7 @@ params:
name:
zh-CN: 用户名
en-US: Username
ja-JP: ユーザー名
# type-param field type(most mapping the html input type)
type: text
# when type is text, use limit to limit string length
@@ -89,6 +95,7 @@ params:
name:
zh-CN: 密码
en-US: Password
ja-JP: パスワード
# type-param field type(most mapping the html input tag)
type: password
# required-true or false
@@ -102,6 +109,7 @@ metrics:
i18n:
zh-CN: Tomcat 信息
en-US: Tomcat Server
ja-JP: Tomcatサーバー
# 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
@@ -113,26 +121,31 @@ metrics:
i18n:
zh-CN: 服务信息
en-US: Server Info
ja-JP: サーバー情報
- field: serverNumber
type: 1
i18n:
zh-CN: 服务版本
en-US: Server Number
ja-JP: サーバーバージョン
- field: serverBuilt
type: 1
i18n:
zh-CN: Server Built
en-US: Server Built
ja-JP: サーバービルド
- field: port
type: 1
i18n:
zh-CN: 端口
en-US: Port
ja-JP: ポート
- field: address
type: 1
i18n:
zh-CN: 地址
en-US: Address
ja-JP: アドレス
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: jmx
# the config content when protocol is http
@@ -155,6 +168,7 @@ metrics:
i18n:
zh-CN: 内存池
en-US: Memory Pool
ja-JP: メモリプール
fields:
- field: name
type: 1
@@ -162,30 +176,35 @@ metrics:
i18n:
zh-CN: 指标名称
en-US: Name
ja-JP: 名前
- field: committed
type: 0
unit: MB
i18n:
zh-CN: 已分配内存
en-US: Committed
ja-JP: コミットされたメモリ
- field: init
type: 0
unit: MB
i18n:
zh-CN: 初始化内存
en-US: Init
ja-JP: イニシャルメモリ
- field: max
type: 0
unit: MB
i18n:
zh-CN: 最大内存
en-US: Max
ja-JP: 最大メモリ
- field: used
type: 0
unit: MB
i18n:
zh-CN: 已使用内存
en-US: Used
ja-JP: 使用したメモリ
units:
- committed=B->MB
- init=B->MB
@@ -222,6 +241,7 @@ metrics:
i18n:
zh-CN: 类加载信息
en-US: Class Loading
ja-JP: クラスローディング情報
# collect metrics content
fields:
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
@@ -230,16 +250,19 @@ metrics:
i18n:
zh-CN: 当前已加载类数量
en-US: Loaded Class Count
ja-JP: ロードされたクラス数
- field: TotalLoadedClassCount
type: 0
i18n:
zh-CN: 已加载类总数量
en-US: Total Loaded Class Count
ja-JP: ロードされたクラス総数
- field: UnloadedClassCount
type: 0
i18n:
zh-CN: 未加载类总数量
en-US: Unloaded Class Count
ja-JP: アンロードされたクラス総数
protocol: jmx
jmx:
host: ^_^host^_^
@@ -254,6 +277,7 @@ metrics:
i18n:
zh-CN: 线程信息
en-US: Thread
ja-JP: スレッド情報
# collect metrics content
fields:
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
@@ -262,33 +286,39 @@ metrics:
i18n:
zh-CN: 已启动线程总数
en-US: Total Started Thread Count
ja-JP: スレッド総数
- field: ThreadCount
type: 0
i18n:
zh-CN: 活跃线程数
en-US: Thread Count
ja-JP: 活躍スレッド数
- field: PeakThreadCount
type: 0
i18n:
zh-CN: 最大峰值线程数
en-US: Peak Thread Count
ja-JP: 最大スレッド数
- field: DaemonThreadCount
type: 0
i18n:
zh-CN: 活跃守护线程数
en-US: Daemon Thread Count
ja-JP: デーモンスレッド数
- field: CurrentThreadUserTime
type: 0
unit: s
i18n:
zh-CN: 线程占用的CPU时间(用户态)
en-US: Current Thread User Time
ja-JP: 現在のスレッドユーザー時間
- field: CurrentThreadCpuTime
type: 0
unit: s
i18n:
zh-CN: 线程占用的CPU时间
en-US: Current Thread CPU Time
ja-JP: 現在のスレッドシステム時間
units:
- CurrentThreadUserTime=NS->S
- CurrentThreadCpuTime=NS->S
@@ -305,6 +335,7 @@ metrics:
i18n:
zh-CN: 应用信息
en-US: Application
ja-JP: 応用情報
priority: 4
fields:
- field: name
@@ -313,83 +344,99 @@ metrics:
i18n:
zh-CN: 名称
en-US: Name
ja-JP: 名前
- field: acceptCount
type: 0
i18n:
zh-CN: 接收请求数
en-US: Accept Count
ja-JP: 受け入れたリクエスト数
- field: acceptorThreadCount
type: 0
i18n:
zh-CN: 接收处理线程数
en-US: Acceptor Thread Count
ja-JP: アクセプタスレッド数
- field: acceptorThreadPriority
type : 0
i18n:
zh-CN: 接收线程级别
en-US: Acceptor Thread Priority
ja-JP: アクセプタスレッド優先度
- field: connectionTimeout
type: 0
unit: ms
i18n:
zh-CN: 链接超时时间
en-US: Connection Timeout
ja-JP: 接続のタイムアウト
- field: currentThreadCount
type: 0
i18n:
zh-CN: 当前线程数
en-US: Current Thread Count
ja-JP: 現在のスレッド数
- field: currentThreadsBusy
type: 0
i18n:
zh-CN: 繁忙线程数
en-US: Current Threads Busy
ja-JP: 現在の忙しいスレッド数
- field: keepAliveCount
type: 0
i18n:
zh-CN: 心跳保持链接数量
en-US: Keep Alive Count
ja-JP: ハートビート数量
- field: keepAliveTimeout
type: 0
unit: ms
i18n:
zh-CN: 心跳超时时间
en-US: Keep Alive Timeout
ja-JP: ハートビートのタイムアウト
- field: maxConnections
type: 0
i18n:
zh-CN: 最大链接数
en-US: Max Connections
ja-JP: 最大接続数
- field: maxKeepAliveRequests
type: 0
i18n:
zh-CN: 最大链接保持请求
en-US: Max KeepAlive Requests
ja-JP: 最大KeepAliveリクエスト数
- field: maxThreads
type: 0
i18n:
zh-CN: 最大线程数
en-US: Max Threads
ja-JP: 最大スレッド数
- field: minSpareThreads
type: 0
i18n:
zh-CN: 最小备用线程数
en-US: Min Spare Threads
ja-JP: 最小予備スレッド数
- field: pollerThreadCount
type: 0
i18n:
zh-CN: 轮询线程数
en-US: Poller Thread Count
ja-JP: ポーラースレッド数
- field: pollerThreadPriority
type: 0
i18n:
zh-CN: 轮询线程级别
en-US: Poller Thread Priority
ja-JP: ポーラースレッド優先度
- field: running
type: 1
i18n:
zh-CN: 运行中
en-US: Running
ja-JP: 実行中
protocol: jmx
jmx:
host: ^_^host^_^
@@ -316,7 +316,7 @@ metrics:
type: 0
i18n:
zh-CN: 编号
en-US: 编号
en-US: Index
- field: hrSWInstalledName
type: 1
i18n:
@@ -357,14 +357,14 @@ metrics:
type: 0
i18n:
zh-CN: 编号
en-US: 编号
en-US: Index
- field: descr
type: 1
i18n:
zh-CN: 存储描述
en-US: Storage Description
label: true
- field: size
- field: Size
i18n:
zh-CN: 存储大小
en-US: Storage Size
@@ -400,7 +400,7 @@ metrics:
calculates:
- index=hrStorageIndex
- descr=hrStorageDescr
- size=hrStorageSize * hrStorageAllocationUnits
- Size=hrStorageSize * hrStorageAllocationUnits
- free=(hrStorageSize - hrStorageUsed) * hrStorageAllocationUnits
- used=hrStorageUsed * hrStorageAllocationUnits
- usage= hrStorageUsed / hrStorageSize * 100
@@ -72,7 +72,6 @@ resourceRole:
# rule: api===method
# eg: /api/v1/source3===get means /api/v1/source3===get can be access by anyone, no need auth.
excludedResource:
- /api/alerts/report/**===*
- /api/alert/sse/**===*
- /api/account/auth/**===*
- /api/i18n/**===get
@@ -29,7 +29,6 @@ import org.apache.hertzbeat.manager.dao.CollectorDao;
import org.apache.hertzbeat.manager.dao.CollectorMonitorBindDao;
import org.apache.hertzbeat.manager.dao.MonitorDao;
import org.apache.hertzbeat.manager.dao.ParamDao;
import org.apache.hertzbeat.manager.pojo.CollectorNode;
import org.apache.hertzbeat.manager.scheduler.netty.ManageServer;
import org.apache.hertzbeat.manager.service.AppService;
import org.junit.jupiter.api.BeforeEach;
@@ -64,7 +63,7 @@ public class CollectorJobSchedulerTest {
@InjectMocks
private CollectorJobScheduler collectorJobScheduler;
@Mock
private ConsistentHashCollectorKeeper consistentHashCollectorKeeper;
private ConsistentHash consistentHash;
@Mock
private CollectorDao collectorDao;
@Mock
@@ -86,8 +85,8 @@ public class CollectorJobSchedulerTest {
public void testCollectSyncJobData() {
assertDoesNotThrow(() -> {
Job job = new Job();
when(consistentHashCollectorKeeper.determineNode(any(Long.class))).thenReturn(null);
List<?> list = collectorJobScheduler.collectSyncJobData(job, null);
when(consistentHash.preDispatchJob(any(String.class))).thenReturn(null);
List<?> list = collectorJobScheduler.collectSyncJobData(job);
assertEquals(1, list.size());
});
}
@@ -128,8 +127,9 @@ public class CollectorJobSchedulerTest {
appDefine.setParams(Collections.emptyList());
when(appService.getAppDefine(anyString())).thenReturn(appDefine);
CollectorNode node = new CollectorNode(identity, collector.getMode(), collector.getIp(), System.currentTimeMillis(), null);
when(consistentHashCollectorKeeper.addJob(appDefine, identity)).thenReturn(node);
ConsistentHash.Node node = new ConsistentHash.Node(identity, collector.getMode(),
collector.getIp(), System.currentTimeMillis(), null);
when(consistentHash.getNode("collector-1")).thenReturn(node);
ManageServer manageServer = mock(ManageServer.class);
collectorJobScheduler.setManageServer(manageServer);
@@ -138,7 +138,7 @@ public class CollectorJobSchedulerTest {
// Capture the parameters of sendMsg
ArgumentCaptor<ClusterMsg.Message> msgCaptor = ArgumentCaptor.forClass(ClusterMsg.Message.class);
verify(manageServer, atLeastOnce()).sendMsg(eq(identity), msgCaptor.capture());
verify(manageServer, atLeastOnce()).sendMsg(eq("collector-1"), msgCaptor.capture());
ClusterMsg.Message message = msgCaptor.getValue();
Job job = JsonUtil.fromJson(message.getMsg().toStringUtf8(), Job.class);
@@ -1,101 +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.manager.scheduler;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.apache.hertzbeat.common.constants.CollectorStatus;
import org.apache.hertzbeat.common.entity.job.Job;
import org.apache.hertzbeat.common.util.SnowFlakeIdGenerator;
import org.apache.hertzbeat.manager.pojo.CollectorNode;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
* Test case for {@link ConsistentHashCollectorKeeper}
*/
public class ConsistentHashCollectorKeeperTest {
private ConsistentHashCollectorKeeper consistentHashCollectorKeeper;
@BeforeEach
void setUp() {
consistentHashCollectorKeeper = new ConsistentHashCollectorKeeper();
}
@Test
void testAddNode() {
long jobId1 = SnowFlakeIdGenerator.generateId();
long jobId2 = SnowFlakeIdGenerator.generateId();
long jobId3 = SnowFlakeIdGenerator.generateId();
CollectorNode node1 = new CollectorNode("node1", "public", "192.168.0.1", System.currentTimeMillis(), (byte) 10);
CollectorNode node2 = new CollectorNode("node2", "public", "192.168.0.2", System.currentTimeMillis(), (byte) 10);
consistentHashCollectorKeeper.addNode(node1);
consistentHashCollectorKeeper.determineNode(jobId1);
consistentHashCollectorKeeper.determineNode(jobId2);
consistentHashCollectorKeeper.determineNode(jobId3);
consistentHashCollectorKeeper.addNode(node2);
assertTrue(node2.getAssignJobs().getAddingJobs().containsAll(node1.getAssignJobs().getRemovingJobs()));
assertTrue(node2.getAssignJobs().getAddingJobs().containsAll(node2.getAssignJobs().getRemovingJobs()));
assertSame(consistentHashCollectorKeeper.getNode("node1"), node1);
assertSame(consistentHashCollectorKeeper.getNode("node2"), node2);
}
@Test
void testDispatchJob() {
long jobId1 = SnowFlakeIdGenerator.generateId();
CollectorNode res1 = consistentHashCollectorKeeper.determineNode(jobId1);
assertNull(res1);
CollectorNode node1 = new CollectorNode("node1", "public", "192.168.0.1", System.currentTimeMillis(), (byte) 10);
consistentHashCollectorKeeper.addNode(node1);
long jobId2 = SnowFlakeIdGenerator.generateId();
CollectorNode res2 = consistentHashCollectorKeeper.determineNode(jobId2);
assertSame(res2, node1);
assertTrue(consistentHashCollectorKeeper.getDispatchJobCache().isEmpty());
}
@Test
void testRemoveNode() {
CollectorNode node1 = new CollectorNode("node1", "public", "192.168.0.1", System.currentTimeMillis(), (byte) 10);
CollectorNode node2 = new CollectorNode("node2", "public", "192.168.0.2", System.currentTimeMillis(), (byte) 10);
consistentHashCollectorKeeper.addNode(node1);
consistentHashCollectorKeeper.addNode(node2);
long jobId1 = SnowFlakeIdGenerator.generateId();
long jobId2 = SnowFlakeIdGenerator.generateId();
long jobId3 = SnowFlakeIdGenerator.generateId();
long jobId4 = SnowFlakeIdGenerator.generateId();
consistentHashCollectorKeeper.addJob(Job.builder().id(jobId1).monitorId(jobId1).build(), null);
consistentHashCollectorKeeper.addJob(Job.builder().id(jobId2).monitorId(jobId2).build(), null);
consistentHashCollectorKeeper.addJob(Job.builder().id(jobId3).monitorId(jobId3).build(), null);
consistentHashCollectorKeeper.addJob(Job.builder().id(jobId4).monitorId(jobId4).build(), null);
consistentHashCollectorKeeper.changeStatus(node2.getIdentity(), CollectorStatus.OFFLINE);
assertTrue(node1.getAssignJobs().getAddingJobs().containsAll(node2.getAssignJobs().getRemovingJobs()));
assertSame(consistentHashCollectorKeeper.getNode("node1"), node1);
assertNull(consistentHashCollectorKeeper.getNode("node2"));
consistentHashCollectorKeeper.changeStatus(node1.getIdentity(), CollectorStatus.OFFLINE);
assertEquals(4, consistentHashCollectorKeeper.getDispatchJobCache().size());
}
}
@@ -0,0 +1,100 @@
/*
* 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.manager.scheduler;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.apache.hertzbeat.common.util.SnowFlakeIdGenerator;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/**
* Test case for {@link ConsistentHash}
*/
public class ConsistentHashTest {
private ConsistentHash consistentHash;
@BeforeEach
void setUp() {
consistentHash = new ConsistentHash();
}
@Test
void testAddNode() {
String job1 = "job1";
long jobId1 = SnowFlakeIdGenerator.generateId();
String job2 = "job2";
long jobId2 = SnowFlakeIdGenerator.generateId();
String job3 = "job3";
long jobId3 = SnowFlakeIdGenerator.generateId();
ConsistentHash.Node node1 = new ConsistentHash.Node("node1", "public", "192.168.0.1", System.currentTimeMillis(), (byte) 10);
ConsistentHash.Node node2 = new ConsistentHash.Node("node2", "public", "192.168.0.2", System.currentTimeMillis(), (byte) 10);
consistentHash.addNode(node1);
consistentHash.dispatchJob(job1, jobId1);
consistentHash.dispatchJob(job2, jobId2);
consistentHash.dispatchJob(job3, jobId3);
consistentHash.addNode(node2);
assertTrue(node2.getAssignJobs().getAddingJobs().containsAll(node1.getAssignJobs().getRemovingJobs()));
assertTrue(node2.getAssignJobs().getAddingJobs().containsAll(node2.getAssignJobs().getRemovingJobs()));
assertSame(consistentHash.getNode("node1"), node1);
assertSame(consistentHash.getNode("node2"), node2);
}
@Test
void testDispatchJob() {
String job1 = "job1";
long jobId1 = SnowFlakeIdGenerator.generateId();
ConsistentHash.Node res1 = consistentHash.dispatchJob(job1, jobId1);
assertNull(res1);
ConsistentHash.Node node1 = new ConsistentHash.Node("node1", "public", "192.168.0.1", System.currentTimeMillis(), (byte) 10);
consistentHash.addNode(node1);
String job2 = "job2";
long jobId2 = SnowFlakeIdGenerator.generateId();
ConsistentHash.Node res2 = consistentHash.dispatchJob(job2, jobId2);
assertSame(res2, node1);
assertTrue(consistentHash.getDispatchJobCache().isEmpty());
}
@Test
void testRemoveNode() {
String job1 = "job1";
long jobId1 = SnowFlakeIdGenerator.generateId();
String job2 = "job2";
long jobId2 = SnowFlakeIdGenerator.generateId();
String job3 = "job3";
long jobId3 = SnowFlakeIdGenerator.generateId();
ConsistentHash.Node node1 = new ConsistentHash.Node("node1", "public", "192.168.0.1", System.currentTimeMillis(), (byte) 10);
ConsistentHash.Node node2 = new ConsistentHash.Node("node2", "public", "192.168.0.2", System.currentTimeMillis(), (byte) 10);
consistentHash.addNode(node1);
consistentHash.addNode(node2);
consistentHash.dispatchJob(job1, jobId1);
consistentHash.dispatchJob(job2, jobId2);
consistentHash.dispatchJob(job3, jobId3);
consistentHash.removeNode(node2.getIdentity());
assertTrue(node1.getAssignJobs().getAddingJobs().containsAll(node2.getAssignJobs().getRemovingJobs()));
assertSame(consistentHash.getNode("node1"), node1);
assertNull(consistentHash.getNode("node2"));
consistentHash.removeNode(node1.getIdentity());
assertEquals(3, consistentHash.getDispatchJobCache().size());
}
}
@@ -32,7 +32,7 @@ import org.apache.hertzbeat.common.entity.manager.Collector;
import org.apache.hertzbeat.common.support.exception.CommonException;
import org.apache.hertzbeat.manager.dao.CollectorDao;
import org.apache.hertzbeat.manager.dao.CollectorMonitorBindDao;
import org.apache.hertzbeat.manager.scheduler.ConsistentHashCollectorKeeper;
import org.apache.hertzbeat.manager.scheduler.ConsistentHash;
import org.apache.hertzbeat.manager.scheduler.netty.ManageServer;
import org.apache.hertzbeat.manager.service.impl.CollectorServiceImpl;
import org.junit.jupiter.api.Test;
@@ -60,7 +60,7 @@ public class CollectorServiceTest {
private CollectorDao collectorDao;
@Mock
private ConsistentHashCollectorKeeper consistentHashCollectorKeeper;
private ConsistentHash consistentHash;
@Mock
private CollectorMonitorBindDao collectorMonitorBindDao;
@@ -46,7 +46,7 @@ import org.apache.hertzbeat.manager.dao.MonitorDao;
import org.apache.hertzbeat.manager.dao.ParamDao;
import org.apache.hertzbeat.manager.pojo.dto.AppCount;
import org.apache.hertzbeat.manager.pojo.dto.MonitorDto;
import org.apache.hertzbeat.manager.scheduler.CollectorJobScheduler;
import org.apache.hertzbeat.manager.scheduler.CollectJobScheduling;
import org.apache.hertzbeat.manager.service.impl.MonitorServiceImpl;
import org.apache.hertzbeat.manager.support.exception.MonitorDatabaseException;
import org.apache.hertzbeat.manager.support.exception.MonitorDetectException;
@@ -105,7 +105,7 @@ class MonitorServiceTest {
private LabelService tagService;
@Mock
private CollectorJobScheduler jobOperation;
private CollectJobScheduling collectJobScheduling;
@Mock
private AlertDefineBindDao alertDefineBindDao;
@@ -143,7 +143,7 @@ class MonitorServiceTest {
when(appService.getAppDefine(monitor.getApp())).thenReturn(job);
List<CollectRep.MetricsData> collectRep = new ArrayList<>();
when(jobOperation.collectSyncJobData(job, null)).thenReturn(collectRep);
when(collectJobScheduling.collectSyncJobData(job)).thenReturn(collectRep);
List<Param> params = Collections.singletonList(new Param());
assertThrows(MonitorDetectException.class, () -> monitorService.detectMonitor(monitor, params, null));
@@ -170,7 +170,7 @@ class MonitorServiceTest {
CollectRep.MetricsData failCode = CollectRep.MetricsData.newBuilder()
.setCode(CollectRep.Code.TIMEOUT).setMsg("collect timeout").build();
collectRep.add(failCode);
when(jobOperation.collectSyncJobData(job, null)).thenReturn(collectRep);
when(collectJobScheduling.collectSyncJobData(job)).thenReturn(collectRep);
List<Param> params = Collections.singletonList(new Param());
assertThrows(MonitorDetectException.class, () -> monitorService.detectMonitor(monitor, params, null));
@@ -186,7 +186,7 @@ class MonitorServiceTest {
.build();
Job job = new Job();
when(appService.getAppDefine(monitor.getApp())).thenReturn(job);
when(jobOperation.addAsyncCollectJob(job, null)).thenReturn(1L);
when(collectJobScheduling.addAsyncCollectJob(job, null)).thenReturn(1L);
when(monitorDao.save(monitor)).thenReturn(monitor);
List<Param> params = Collections.singletonList(new Param());
when(paramDao.saveAll(params)).thenReturn(params);
@@ -203,7 +203,7 @@ class MonitorServiceTest {
.build();
Job job = new Job();
when(appService.getAppDefine(monitor.getApp())).thenReturn(job);
when(jobOperation.addAsyncCollectJob(job, null)).thenReturn(1L);
when(collectJobScheduling.addAsyncCollectJob(job, null)).thenReturn(1L);
List<Param> params = Collections.singletonList(new Param());
when(monitorDao.save(monitor)).thenThrow(RuntimeException.class);
assertThrows(MonitorDatabaseException.class, () -> monitorService.addMonitor(monitor, params, null, null));
-1
View File
@@ -3,7 +3,6 @@ title: Cloud Monitoring System HertzBeat v1.0 Officially Released
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: Cloud Monitoring System HertzBeat v1.1.0 Released! Start Your Monitoring
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat Monitoring System v1.1.0 Released! Start Your Monitoring Journe
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat v1.1.1 is Publish
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: Cloud monitoring system HertzBeat v1.1.3 released!
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: Best Practices for SSL Certificate Expiration Monitoring
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat v1.2.0 Released! Easy-to-use and friendly open source real-time
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat v1.2.2Support K8S Monitor And More.
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: 恭喜 HertzBeat 迎来了两位新晋社区Committer
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat v1.2.3Support Prometheus,ShenYu and IotDb
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: Use HertzBeat Monitoring IoTDB
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat's Monitoring Practice for API Gateway Apache ShenYu
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
---
@@ -3,7 +3,6 @@ title: Monitoring Practices for DynamicTp Thread Pooling Framework with HertzBea
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome two new Committers from HertzBeat
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource]
---
-1
View File
@@ -3,7 +3,6 @@ title: Use the open source real-time monitoring tool HertzBeat to monitor and al
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
Keywords: [Open source monitoring tool, open source database monitoring, Mysql database monitoring]
---
-1
View File
@@ -3,7 +3,6 @@ title: Monitoring Linux Operating Systems Using Open Source Real-Time Monitoring
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [Open source monitoring tool, operating system monitoring, Linux monitoring]
---
-1
View File
@@ -3,7 +3,6 @@ title: Open source real-time monitoring tool HertzBeat v1.3.0 released, online c
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system, Linux monitoring]
---
@@ -3,7 +3,6 @@ title: Monitoring SpringBoot2 Metrics with HertzBeat in 5 minutes
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [opensource monitoring, SpringBoot monitoring, alert]
---
-1
View File
@@ -3,7 +3,6 @@ title: Open source real-time monitoring tool HertzBeat v1.3.1 released
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system, Linux monitoring]
---
-1
View File
@@ -3,7 +3,6 @@ title: GreptimeDB & HertzBeat, using the open source temporal database GreptimeD
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, open source temporal database, HertzBeat, GreptimeDB]
---
-1
View File
@@ -3,7 +3,6 @@ title: Open source monitoring HertzBeat v1.3.2 released, Easier to use
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system, Linux monitoring]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat v1.4.0 released, cluster is coming!
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system, Linux monitoring]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome to HertzBeat Community Committer!
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat v1.4.1 released, better experience!
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system, Linux monitoring]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat v1.4.2 released, custom notice template!
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system, Linux monitoring]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat v1.4.3 released, prometheus-compatible!
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome to HertzBeat Community Committer!
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: HertzBeat v1.4.4 released now!
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
+1 -2
View File
@@ -3,7 +3,6 @@ title: The open-source real-time monitoring HertzBeat is donated to the Apache I
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
@@ -22,7 +21,7 @@ We warmly welcome everyone to join the HertzBeat community. The community accept
## What is HertzBeat
[Apache HertzBeat](https://github.com/apache/hertzbeat) (incubating) is an easy-to-use, open source, real-time monitoring system with agentless, high performance cluster, prometheus-compatible, offers powerful custom monitoring and status page building capabilities.
[Apache HertzBeat](https://github.com/apache/hertzbeat) is an easy-to-use, open source, real-time monitoring system with agentless, high performance cluster, prometheus-compatible, offers powerful custom monitoring and status page building capabilities.
### Features
+3 -4
View File
@@ -3,14 +3,13 @@ title: HertzBeat First Apache version v1.6.0 released now!
author: tom
author_title: tom
author_url: https://github.com/tomsun28
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
tags: [opensource, practice]
keywords: [open source, monitoring, alerting]
---
**Hi guys, We are excited to announce that Apache HertzBeat (incubating) has released its first Apache version v1.6.0! 🎉.**
**Hi guys, We are excited to announce that Apache HertzBeat has released its first Apache version v1.6.0! 🎉.**
Through nearly five months of community development iteration and two months of Apache Incubator incubation process, Apache HertzBeat (incubating) v1.6.0 is finally out.
Through nearly five months of community development iteration and two months of Apache Incubator incubation process, Apache HertzBeat v1.6.0 is finally out.
In this version, we added monitoring for OpenAi, Redfish protocol servers, plugin mechanism, and support for NebulaGraph, Apache Yarn, HDFS, Hbase, Storm, and more functional features.
Due to license compatibility issues, we replaced multiple dependencies at the bottom layer, Hibernate -> EclipseLink, which is also a rare migration pitfall practice in the JPA ecosystem.
At the same time, some bugs were fixed and some functions were optimized, and more complete documents. Welcome everyone to try to use, put forward valuable opinions and suggestions, and promote the development of HertzBeat together.
@@ -23,7 +22,7 @@ Upgrade Guide: <https://hertzbeat.apache.org/blog/2024/06/11/hertzbeat-v1.6.0-up
## What is HertzBeat?
[Apache HertzBeat](https://github.com/apache/hertzbeat) (incubating) is an easy-to-use, open source, real-time monitoring system with agentless, high performance cluster, prometheus-compatible, offers powerful custom monitoring and status page building capabilities.
[Apache HertzBeat](https://github.com/apache/hertzbeat) is an easy-to-use, open source, real-time monitoring system with agentless, high performance cluster, prometheus-compatible, offers powerful custom monitoring and status page building capabilities.
## Features
-1
View File
@@ -3,7 +3,6 @@ title: Welcome to HertzBeat Community Committer!
author: crossoverJie
author_title: crossoverJie
author_url: https://github.com/crossoverjie
author_image_url: https://avatars.githubusercontent.com/u/15684156?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome to HertzBeat Community Committer!
author: zhangshenghang
author_title: zhangshenghang
author_url: https://github.com/zhangshenghang
author_image_url: https://avatars.githubusercontent.com/u/29418975?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome to HertzBeat Community Committer!
author: LiuTianyou
author_title: LiuTianyou
author_url: https://github.com/LiuTianyou
author_image_url: https://avatars.githubusercontent.com/u/30208283?v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome to HertzBeat Community Committer!
author: Calvin979
author_title: Calvin979
author_url: https://github.com/Calvin979
author_image_url: https://avatars.githubusercontent.com/u/131688897?v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome to HertzBeat Community Committer!
author: linDong
author_title: linDong
author_url: https://github.com/Yanshuming1
author_image_url: https://avatars.githubusercontent.com/u/118667222?v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome to HertzBeat Community Committer!
author: kerwin612
author_title: Le Zhang
author_url: https://github.com/kerwin612
author_image_url: https://avatars.githubusercontent.com/u/3371163?v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: Becoming an Apache Committer is a recognition of my participation in open
author: yuluo-yx
author_title: Shown Ji
author_url: https://github.com/yuluo-yx
author_image_url: https://avatars.githubusercontent.com/u/77964041
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system, Apache, Apache Committer, Hertzbeat]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome to HertzBeat Community Committer!
author: aias00
author_title: Hongyu Liu
author_url: https://github.com/Aias00
author_image_url: https://avatars.githubusercontent.com/u/25810623
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system, Apache, Apache Committer, Hertzbeat]
---
-1
View File
@@ -3,7 +3,6 @@ title: Warmly Welcome HertzBeat's New Community Committer!
author: zuobiao-zhou
author_title: Yuxuan Zhang
author_url: https://github.com/zuobiao-zhou
author_image_url: https://avatars.githubusercontent.com/u/61108539
tags: [opensource, practice]
keywords:
[
-1
View File
@@ -3,7 +3,6 @@ title: Announcement of Apache Hertzbeat 1.6.1 Release
author: zhangshenghang
author_title: zhangshenghang
author_url: https://github.com/zhangshenghang
author_image_url: https://avatars.githubusercontent.com/u/29418975?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
@@ -3,7 +3,6 @@ title: How to Participate in Developing Custom Collectors
author: zhangshenghang
author_title: zhangshenghang
author_url: https://github.com/zhangshenghang
author_image_url: https://avatars.githubusercontent.com/u/29418975?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: GSOC Google Summer of Code 2025 Recruitment is Underway | We Look Forward
author: zhangshenghang
author_title: zhangshenghang
author_url: https://github.com/zhangshenghang
author_image_url: https://avatars.githubusercontent.com/u/29418975?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: Warmly Welcome HertzBeat's New Community Committer!
author: yunfan24
author_title: Lixin Diao
author_url: https://github.com/yunfan24
author_image_url: https://avatars.githubusercontent.com/u/91836599?v=4
tags: [opensource, practice]
keywords:
[
-1
View File
@@ -3,7 +3,6 @@ title: From Commiter to PMC The Journey of Growth at Apache Hertzbeat
author: zhangshenghang
author_title: zhangshenghang
author_url: https://github.com/zhangshenghang
author_image_url: https://avatars.githubusercontent.com/u/29418975?s=400&v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
-1
View File
@@ -3,7 +3,6 @@ title: Announcement of Apache Hertzbeat 1.7.0 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]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome HertzBeat's New Community Committer!
author: pwallk
author_title: Kang Li
author_url: https://github.com/pwallk
author_image_url: https://avatars.githubusercontent.com/u/69385076
tags: [opensource, practice]
keywords:
[
-1
View File
@@ -3,7 +3,6 @@ title: Announcement of Apache Hertzbeat 1.7.1 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]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome HertzBeat's New Community Committer!
author: MasamiYui
author_title: Yijun Yin
author_url: https://github.com/MasamiYui
author_image_url: https://avatars.githubusercontent.com/u/22274133
tags: [opensource, practice]
keywords:
[
-1
View File
@@ -3,7 +3,6 @@ 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]
---
-1
View File
@@ -3,7 +3,6 @@ title: Welcome HertzBeat's New Community Committer!
author: bigcyy
author_title: Yang Chen
author_url: https://github.com/bigcyy
author_image_url: https://avatars.githubusercontent.com/u/73413979
tags: [opensource, practice]
keywords:
[
-1
View File
@@ -3,7 +3,6 @@ title: "From User to PPMC Member: Contributing to Open Source with Passion at Ap
author: liutianyou
author_title: liutianyou
author_url: https://github.com/Liutianyou
author_image_url: https://avatars.githubusercontent.com/u/30208283?v=4
tags: [opensource, practice]
keywords: [open source monitoring system, alerting system]
---
+1 -1
View File
@@ -4,7 +4,7 @@ title: Quick Tutorial Customize and adapt a monitoring based on HTTP protocol
sidebar_label: Tutorial Case
---
Through this tutorial, we describe step by step how to customize and adapt a monitoring type based on the http protocol under the Apache HertzBeat (incubating).
Through this tutorial, we describe step by step how to customize and adapt a monitoring type based on the http protocol under the Apache HertzBeat.
Before reading this tutorial, we hope that you are familiar with how to customize types, metrics, protocols, etc. from [Custom Monitoring](extend-point) and [Http Protocol Customization](extend-http).
+41 -41
View File
@@ -213,9 +213,9 @@ mvn clean package -Pcluster
The release package are here:
- `dist/apache-hertzbeat-{version}-incubating-bin.tar.gz`
- `dist/apache-hertzbeat-collector-{version}-incubating-bin.tar.gz`
- `dist/apache-hertzbeat-{version}-incubating-docker-compose.tar.gz`
- `dist/apache-hertzbeat-{version}-bin.tar.gz`
- `dist/apache-hertzbeat-collector-{version}-bin.tar.gz`
- `dist/apache-hertzbeat-{version}-docker-compose.tar.gz`
#### 3.4 Package the source code
@@ -224,12 +224,12 @@ The release package are here:
```shell
git archive \
--format=tar.gz \
--output="dist/apache-hertzbeat-1.6.0-incubating-src.tar.gz" \
--prefix=apache-hertzbeat-1.6.0-incubating-src/ \
--output="dist/apache-hertzbeat-1.6.0-src.tar.gz" \
--prefix=apache-hertzbeat-1.6.0-src/ \
release-1.6.0-rc1
```
The archive package is here `dist/apache-hertzbeat-1.6.0-incubating-src.tar.gz`
The archive package is here `dist/apache-hertzbeat-1.6.0-src.tar.gz`
### Sign package
@@ -252,18 +252,18 @@ for i in *.tar.gz; do echo $i; sha512sum $i > $i.sha512 ; done
> The final file list is as follows
```text
apache-hertzbeat-1.6.0-incubating-src.tar.gz
apache-hertzbeat-1.6.0-incubating-src.tar.gz.asc
apache-hertzbeat-1.6.0-incubating-src.tar.gz.sha512
apache-hertzbeat-1.6.0-incubating-bin.tar.gz
apache-hertzbeat-1.6.0-incubating-bin.tar.gz.asc
apache-hertzbeat-1.6.0-incubating-bin.tar.gz.sha512
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz.asc
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz.sha512
apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz
apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz.asc
apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz.sha512
apache-hertzbeat-1.6.0-src.tar.gz
apache-hertzbeat-1.6.0-src.tar.gz.asc
apache-hertzbeat-1.6.0-src.tar.gz.sha512
apache-hertzbeat-1.6.0-bin.tar.gz
apache-hertzbeat-1.6.0-bin.tar.gz.asc
apache-hertzbeat-1.6.0-bin.tar.gz.sha512
apache-hertzbeat-1.6.0-docker-compose.tar.gz
apache-hertzbeat-1.6.0-docker-compose.tar.gz.asc
apache-hertzbeat-1.6.0-docker-compose.tar.gz.sha512
apache-hertzbeat-collector-1.6.0-bin.tar.gz
apache-hertzbeat-collector-1.6.0-bin.tar.gz.asc
apache-hertzbeat-collector-1.6.0-bin.tar.gz.sha512
```
#### 3.6 Verify signature
@@ -274,15 +274,15 @@ $ cd dist
# Verify signature
$ for i in *.tar.gz; do echo $i; gpg --verify $i.asc $i ; done
apache-hertzbeat-1.6.0-incubating-src.tar.gz
apache-hertzbeat-1.6.0-src.tar.gz
gpg: Signature made Tue May 2 12:16:35 2023 CST
gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886
gpg: Good signature from "muchunjin (apache key) <muchunjin@apache.org>" [ultimate]
apache-hertzbeat_2.11-1.6.0-incubating-bin.tar.gz
apache-hertzbeat_2.11-1.6.0-bin.tar.gz
gpg: Signature made Tue May 2 12:16:36 2023 CST
gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886
gpg: Good signature from "muchunjin (apache key) <muchunjin@apache.org>" [ultimate]
apache-hertzbeat_2.12-1.6.0-incubating-bin.tar.gz
apache-hertzbeat_2.12-1.6.0-bin.tar.gz
gpg: Signature made Tue May 2 12:16:37 2023 CST
gpg: using RSA key 85778A4CE4DD04B7E07813ABACFB69E705016886
gpg: BAD signature from "muchunjin (apache key) <muchunjin@apache.org>" [ultimate]
@@ -290,14 +290,14 @@ gpg: BAD signature from "muchunjin (apache key) <muchunjin@apache.org>" [ultimat
# Verify SHA512
$ for i in *.tar.gz; do echo $i; sha512sum --check $i.sha512; done
apache-hertzbeat-1.6.0-incubating-src.tar.gz
apache-hertzbeat-1.6.0-incubating-src.tar.gz: OK
apache-hertzbeat-1.6.0-incubating-bin.tar.gz
apache-hertzbeat-1.6.0-incubating-bin.tar.gz: OK
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz
apache-hertzbeat-1.6.0-incubating-docker-compose.tar.gz: OK
apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz
apache-hertzbeat-collector-1.6.0-incubating-bin.tar.gz: OK
apache-hertzbeat-1.6.0-src.tar.gz
apache-hertzbeat-1.6.0-src.tar.gz: OK
apache-hertzbeat-1.6.0-bin.tar.gz
apache-hertzbeat-1.6.0-bin.tar.gz: OK
apache-hertzbeat-1.6.0-docker-compose.tar.gz
apache-hertzbeat-1.6.0-docker-compose.tar.gz: OK
apache-hertzbeat-collector-1.6.0-bin.tar.gz
apache-hertzbeat-collector-1.6.0-bin.tar.gz: OK
```
#### 3.7 Publish the dev directory of the Apache SVN material package
@@ -350,13 +350,13 @@ svn commit -m "release for HertzBeat 1.6.0"
Send a voting email in the community requires at least three `+1` and no `-1`.
> `Send to`: <dev@hertzbeat.apache.org> <br />
> `Title`: [VOTE] Release Apache HertzBeat (incubating) 1.6.0 rc1 <br />
> `Title`: [VOTE] Release Apache HertzBeat 1.6.0 rc1 <br />
> `Body`:
```text
Hello HertzBeat Community:
This is a call for vote to release Apache HertzBeat (incubating) version release-1.6.0-RC1.
This is a call for vote to release Apache HertzBeat version release-1.6.0-RC1.
Apache HertzBeat - a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
@@ -406,13 +406,13 @@ Thanks!
After 72 hours, the voting results will be counted, and the voting result email will be sent, as follows.
> `Send to`: <dev@hertzbeat.apache.org> <br />
> `Title`: [RESULT]\[VOTE\] Release Apache HertzBeat (incubating) 1.6.0-rc1 <br />
> `Title`: [RESULT]\[VOTE\] Release Apache HertzBeat 1.6.0-rc1 <br />
> `Body`:
```text
Dear HertzBeat community,
Thanks for your review and vote for "Release Apache HertzBeat (incubating) 1.6.0-rc1"
Thanks for your review and vote for "Release Apache HertzBeat 1.6.0-rc1"
I'm happy to announce the vote has passed:
---
4 binding +1, from:
@@ -441,14 +441,14 @@ One item of the email content is `Vote thread`, and the link is obtained here: <
Send a voting email in the incubator community requires at least three `+1` and no `-1`.
> `Send to`: <general@incubator.apache.org> <br />
> `Title`: [VOTE] Release Apache HertzBeat (incubating) 1.6.0-rc1 <br />
> `Title`: [VOTE] Release Apache HertzBeat 1.6.0-rc1 <br />
> `Body`:
```text
Hello Incubator Community:
This is a call for a vote to release Apache HertzBeat (incubating) version 1.6.0-RC1.
The Apache HertzBeat community has voted on and approved a proposal to release Apache HertzBeat (incubating) version 1.6.0-RC1.
This is a call for a vote to release Apache HertzBeat version 1.6.0-RC1.
The Apache HertzBeat community has voted on and approved a proposal to release Apache HertzBeat version 1.6.0-RC1.
We now kindly request the Incubator PPMC members review and vote on this incubator release.
Apache HertzBeat, a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
@@ -486,7 +486,7 @@ https://hertzbeat.apache.org/docs/community/development/#build-hertzbeat-binary-
---
Thanks,
On behalf of Apache HertzBeat (incubating) community
On behalf of Apache HertzBeat community
---
Best,
ChunJin Mu
@@ -507,13 +507,13 @@ Chunjin Mu
Then the voting results will be counted, and the voting result email will be sent, as follows.
> `Send to`: <general@incubator.apache.org> <br />
> `Title`: [RESULT]\[VOTE\] Release Apache HertzBeat (incubating) 1.6.0-rc1 <br />
> `Title`: [RESULT]\[VOTE\] Release Apache HertzBeat 1.6.0-rc1 <br />
> `Body`:
```text
Hi Incubator Community,
The vote to release Apache HertzBeat (incubating) 1.6.0-rc4 has passed with 3 +1 binding and no +0 or -1 votes.
The vote to release Apache HertzBeat 1.6.0-rc4 has passed with 3 +1 binding and no +0 or -1 votes.
3 binding votes, no +0 or -1 votes.
@@ -584,13 +584,13 @@ The rename the release-1.6.0-rc1 branch to release-1.6.0.
> `Send to`: <general@incubator.apache.org> <br />
> `cc`: <dev@hertzbeat.apache.org> <br />
> `Title`: [ANNOUNCE] Apache HertzBeat (incubating) 1.6.0 released <br />
> `Title`: [ANNOUNCE] Apache HertzBeat 1.6.0 released <br />
> `Body`:
```text
Hi Community,
We are glad to announce the release of Apache HertzBeat (incubating) 1.6.0.
We are glad to announce the release of Apache HertzBeat 1.6.0.
Thanks again for your help.
Apache HertzBeat (https://hertzbeat.apache.org/) - a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
+5 -8
View File
@@ -91,7 +91,7 @@ check result
> If something like the following appears, it means the signature is correct. Keyword: **`Good signature`**
```shell
apache-hertzbeat-xxx-incubating-src.tar.gz
apache-hertzbeat-xxx-src.tar.gz
gpg: Signature made XXXX
gpg: using RSA key XXXXX
gpg: Good signature from "xxx @apache.org>"
@@ -105,18 +105,16 @@ for i in *.tar.gz; do echo $i; sha512sum --check $i.sha512; done
#### 2.4 Check the binary package
unzip `apache-hertzbeat-${release.version}-incubating-bin.tar.gz`
unzip `apache-hertzbeat-${release.version}-bin.tar.gz`
```shell
tar -xzvf apache-hertzbeat-${release.version}-incubating-bin.tar.gz
tar -xzvf apache-hertzbeat-${release.version}-bin.tar.gz
```
check as follows:
- [ ] Check whether the source package contains unnecessary files, which makes the tar package too large
- [ ] Folder contains the word `incubating`
- [ ] There are `LICENSE` and `NOTICE` files
- [ ] There is a `DISCLAIMER` or `DISCLAIMER-WIP` file
- [ ] The year in the `NOTICE` file is correct
- [ ] Only text files exist, not binary files
- [ ] All files have ASF license at the beginning
@@ -127,10 +125,10 @@ check as follows:
> If the binary/web-binary package is uploaded, check the binary package.
Unzip `apache-hertzbeat-${release_version}-incubating-src.tar.gz`
Unzip `apache-hertzbeat-${release_version}-src.tar.gz`
```shell
cd apache-hertzbeat-${release_version}-incubating-src
cd apache-hertzbeat-${release_version}-src
```
compile the source code: [Build HertzBeat Binary Package](https://hertzbeat.apache.org/docs/community/development/#build-hertzbeat-binary-package)
@@ -138,7 +136,6 @@ compile the source code: [Build HertzBeat Binary Package](https://hertzbeat.apac
and check as follows:
- [ ] There are `LICENSE` and `NOTICE` files
- [ ] There is a `DISCLAIMER` or `DISCLAIMER-WIP` file
- [ ] The year in the `NOTICE` file is correct
- [ ] All text files have ASF license at the beginning
- [ ] Check the third-party dependent license:

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