Compare commits

..
Author SHA1 Message Date
Logic 9090884588 Merge branch 'master' into update-docs 2025-08-16 15:58:20 +08:00
tomsun28 4050e91a13 [doc] update contribution doc 2025-08-16 15:25:06 +08:00
341 changed files with 876 additions and 5236 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
#
github:
description: Real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
description: Apache HertzBeat(incubating) is a 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,7 +67,6 @@ 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
@@ -0,0 +1,10 @@
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
Apache HertzBeat (incubating)
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) 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) (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.
### Features
+1 -1
View File
@@ -28,7 +28,7 @@
## 🎡 <font color="green">介绍</font>
[Apache HertzBeat](https://github.com/apache/hertzbeat) 是一个易用友好的开源实时监控告警系统,无需 Agent,高性能集群,兼容 Prometheus,提供强大的自定义监控和状态页构建能力。
[Apache HertzBeat](https://github.com/apache/hertzbeat) incubating是一个易用友好的开源实时监控告警系统,无需 Agent,高性能集群,兼容 Prometheus,提供强大的自定义监控和状态页构建能力。
### 特点
-85
View File
@@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.hertzbeat</groupId>
<artifactId>hertzbeat</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>hertzbeat-ai-agent</artifactId>
<version>${hertzbeat.version}</version>
<properties>
<spring-ai.version>1.0.1</spring-ai.version>
<java.version>17</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-openai</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hertzbeat</groupId>
<artifactId>hertzbeat-common</artifactId>
</dependency>
<dependency>
<groupId>com.usthe.sureness</groupId>
<artifactId>spring-boot3-starter-sureness</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-bom</artifactId>
<version>${spring-ai.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -1,41 +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.ai.agent.adapters;
import org.springframework.data.domain.Page;
import org.apache.hertzbeat.common.entity.manager.Monitor;
import java.util.List;
/**
* Interface that provides access to monitor information by retrieving monitor data
* through the underlying monitor service.
*/
public interface MonitorServiceAdapter {
Page<Monitor> getMonitors(
List<Long> ids,
String app,
String search,
Byte status,
String sort,
String order,
Integer pageIndex,
Integer pageSize,
String labels
);
}
@@ -1,100 +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.ai.agent.adapters.impl;
import com.usthe.sureness.subject.SubjectSum;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.ai.agent.adapters.MonitorServiceAdapter;
import org.apache.hertzbeat.ai.agent.config.McpContextHolder;
import org.springframework.data.domain.Page;
import org.apache.hertzbeat.common.entity.manager.Monitor;
import org.apache.hertzbeat.common.support.SpringContextHolder;
import org.springframework.stereotype.Component;
import java.lang.reflect.Method;
import java.util.List;
/**
* Implementation of the MonitorServiceAdapter interface that provides access to monitor information
* through reflection by invoking the underlying monitor service implementation.
*/
@Slf4j
@Component
public class MonitorServiceAdapterImpl implements MonitorServiceAdapter {
@Override
public Page<Monitor> getMonitors(
List<Long> ids,
String app,
String search,
Byte status,
String sort,
String order,
Integer pageIndex,
Integer pageSize,
String labels) {
try {
// Provide default values for all nullable parameters
if (sort == null || sort.trim().isEmpty()) {
sort = "gmtCreate";
}
if (order == null || order.trim().isEmpty()) {
order = "desc";
}
if (pageIndex == null) {
pageIndex = 0;
}
if (pageSize == null) {
pageSize = 8;
}
Object monitorService = null;
SubjectSum subjectSum = McpContextHolder.getSubject();
log.debug("Current security subject: {}", subjectSum);
try {
monitorService = SpringContextHolder.getBean("monitorServiceImpl");
} catch (Exception e) {
log.debug("Could not find bean by name 'monitorServiceImpl', trying by class name");
}
assert monitorService != null;
log.debug("MonitorService bean found: {}", monitorService.getClass().getSimpleName());
Method method = monitorService.getClass().getMethod(
"getMonitors",
List.class, String.class, String.class, Byte.class,
String.class, String.class, int.class, int.class, String.class);
@SuppressWarnings("unchecked")
Page<Monitor> result = (Page<Monitor>) method.invoke(
monitorService,
ids, app, search, status, sort, order, pageIndex, pageSize, labels);
log.debug("MonitorServiceAdapter.getMonitors result: {}", result.getContent());
return result;
} catch (NoSuchMethodException e) {
throw new RuntimeException("Method not found: getMonitors", e);
} catch (Exception e) {
log.debug("Failed to invoke getMonitors via adapter", e);
throw new RuntimeException("Failed to invoke getMonitors via adapter", e);
}
}
}
@@ -1,246 +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.ai.agent.config;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.usthe.sureness.mgt.SurenessSecurityManager;
import com.usthe.sureness.subject.SubjectSum;
import io.modelcontextprotocol.spec.McpError;
import io.modelcontextprotocol.spec.McpSchema;
import io.modelcontextprotocol.spec.McpServerSession;
import io.modelcontextprotocol.spec.McpServerTransport;
import io.modelcontextprotocol.spec.McpServerTransportProvider;
import io.modelcontextprotocol.util.Assert;
import java.io.IOException;
import java.time.Duration;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import jakarta.servlet.http.HttpServletRequest;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.web.servlet.function.RouterFunction;
import org.springframework.web.servlet.function.RouterFunctions;
import org.springframework.web.servlet.function.ServerRequest;
import org.springframework.web.servlet.function.ServerResponse;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
* Custom Server-Sent Events transport provider for Model Context Protocol.
*/
@Slf4j
public class CustomSseServerTransport implements McpServerTransportProvider {
private final ObjectMapper objectMapper;
private final String messageEndpoint;
private final String sseEndpoint;
private final String baseUrl;
@Getter
private final RouterFunction<ServerResponse> routerFunction;
@Setter
private McpServerSession.Factory sessionFactory;
private final Map<String, Object> sessionRequest = new HashMap<>();
private final ConcurrentHashMap<String, McpServerSession> sessions;
private volatile boolean isClosing;
public CustomSseServerTransport(ObjectMapper objectMapper, String messageEndpoint) {
this(objectMapper, messageEndpoint, "/sse");
}
public CustomSseServerTransport(ObjectMapper objectMapper, String messageEndpoint, String sseEndpoint) {
this(objectMapper, "", messageEndpoint, sseEndpoint);
}
public CustomSseServerTransport(ObjectMapper objectMapper, String baseUrl, String messageEndpoint, String sseEndpoint) {
this.sessions = new ConcurrentHashMap();
this.isClosing = false;
Assert.notNull(objectMapper, "ObjectMapper must not be null");
Assert.notNull(baseUrl, "Message base URL must not be null");
Assert.notNull(messageEndpoint, "Message endpoint must not be null");
Assert.notNull(sseEndpoint, "SSE endpoint must not be null");
this.objectMapper = objectMapper;
this.baseUrl = baseUrl;
this.messageEndpoint = messageEndpoint;
this.sseEndpoint = sseEndpoint;
this.routerFunction = RouterFunctions.route().GET(this.sseEndpoint, this::handleSseConnection).POST(this.messageEndpoint, this::handleMessage).build();
}
public Mono<Void> notifyClients(String method, Object params) {
if (this.sessions.isEmpty()) {
log.debug("No active sessions to broadcast message to");
return Mono.empty();
} else {
log.debug("Attempting to broadcast message to {} active sessions", this.sessions.size());
return Flux.fromIterable(this.sessions.values())
.flatMap((session) -> session.sendNotification(method, params)
.doOnError((e) -> log.error("Failed to send message to session {}: {}", session.getId(), e.getMessage()))
.onErrorComplete())
.then();
}
}
public Mono<Void> closeGracefully() {
return Flux.fromIterable(this.sessions.values()).doFirst(() -> {
this.isClosing = true;
log.debug("Initiating graceful shutdown with {} active sessions", this.sessions.size());
}).flatMap(McpServerSession::closeGracefully).then().doOnSuccess((v) -> log.debug("Graceful shutdown completed"));
}
private ServerResponse handleSseConnection(ServerRequest request) {
log.debug("Handling SSE connection for request: {}", request);
HttpServletRequest servletRequest = request.servletRequest();
try {
log.debug("Processing SSE connection for servlet request: {}", servletRequest);
log.debug("Authorization header: {}", servletRequest.getHeader("Authorization"));
} catch (Exception e) {
log.error("Authentication failed for SSE connection: {}", e.getMessage());
return ServerResponse.status(HttpStatus.UNAUTHORIZED).body("Unauthorized: " + e.getMessage());
}
if (this.isClosing) {
return ServerResponse.status(HttpStatus.SERVICE_UNAVAILABLE).body("Server is shutting down");
} else {
String sessionId = UUID.randomUUID().toString();
log.debug("Generated session ID for SSE connection: {}", sessionId);
log.debug("Creating new SSE connection for session: {}", sessionId);
return ServerResponse.sse((sseBuilder) -> {
sseBuilder.onComplete(() -> {
log.debug("SSE connection completed for session: {}", sessionId);
this.sessions.remove(sessionId);
});
sseBuilder.onTimeout(() -> {
log.debug("SSE connection timed out for session: {}", sessionId);
this.sessions.remove(sessionId);
});
CustomSseServerTransport.WebMvcMcpSessionTransport sessionTransport = new CustomSseServerTransport.WebMvcMcpSessionTransport(sessionId, sseBuilder);
McpServerSession session = this.sessionFactory.create(sessionTransport);
this.sessionRequest.put(sessionId, request.servletRequest());
this.sessions.put(sessionId, session);
try {
sseBuilder.id(sessionId).event("endpoint").data(this.baseUrl + this.messageEndpoint + "?sessionId=" + sessionId);
} catch (Exception e) {
log.error("Failed to send initial endpoint event: {}", e.getMessage());
sseBuilder.error(e);
}
}, Duration.ZERO);
}
}
private ServerResponse handleMessage(ServerRequest request) {
if (this.isClosing) {
return ServerResponse.status(HttpStatus.SERVICE_UNAVAILABLE).body("Server is shutting down");
} else if (request.param("sessionId").isEmpty()) {
return ServerResponse.badRequest().body(new McpError("Session ID missing in message endpoint"));
} else {
String sessionId = (String) request.param("sessionId").get();
McpServerSession session = (McpServerSession) this.sessions.get(sessionId);
log.debug("Authorization header for message request: {}", request.servletRequest().getHeader("Authorization"));
SubjectSum subject = SurenessSecurityManager.getInstance().checkIn(sessionRequest.get(sessionId));
McpContextHolder.setSubject(subject);
if (session == null) {
return ServerResponse.status(HttpStatus.NOT_FOUND).body(new McpError("Session not found: " + sessionId));
} else {
try {
String body = request.body(String.class);
McpSchema.JSONRPCMessage message = McpSchema.deserializeJsonRpcMessage(this.objectMapper, body);
session.handle(message).block();
return ServerResponse.ok().build();
} catch (IOException | IllegalArgumentException e) {
log.error("Failed to deserialize message: {}", ((Exception) e).getMessage());
return ServerResponse.badRequest().body(new McpError("Invalid message format"));
} catch (Exception e) {
log.error("Error handling message: {}", e.getMessage());
return ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR).body(new McpError(e.getMessage()));
}
}
}
}
private class WebMvcMcpSessionTransport implements McpServerTransport {
private final String sessionId;
private final ServerResponse.SseBuilder sseBuilder;
WebMvcMcpSessionTransport(String sessionId, ServerResponse.SseBuilder sseBuilder) {
this.sessionId = sessionId;
this.sseBuilder = sseBuilder;
log.debug("Session transport {} initialized with SSE builder", sessionId);
}
public Mono<Void> sendMessage(McpSchema.JSONRPCMessage message) {
return Mono.fromRunnable(() -> {
try {
String jsonText = CustomSseServerTransport.this.objectMapper.writeValueAsString(message);
this.sseBuilder.id(this.sessionId).event("message").data(jsonText);
log.debug("Message sent to session {}", this.sessionId);
} catch (Exception e) {
log.error("Failed to send message to session {}: {}", this.sessionId, e.getMessage());
this.sseBuilder.error(e);
}
});
}
public <T> T unmarshalFrom(Object data, TypeReference<T> typeRef) {
return (T) CustomSseServerTransport.this.objectMapper.convertValue(data, typeRef);
}
public Mono<Void> closeGracefully() {
return Mono.fromRunnable(() -> {
log.debug("Closing session transport: {}", this.sessionId);
try {
this.sseBuilder.complete();
log.debug("Successfully completed SSE builder for session {}", this.sessionId);
} catch (Exception e) {
log.warn("Failed to complete SSE builder for session {}: {}", this.sessionId, e.getMessage());
}
});
}
public void close() {
try {
this.sseBuilder.complete();
log.debug("Successfully completed SSE builder for session {}", this.sessionId);
} catch (Exception e) {
log.warn("Failed to complete SSE builder for session {}: {}", this.sessionId, e.getMessage());
}
}
}
}
@@ -1,37 +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.ai.agent.config;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.openai.OpenAiChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Configuration class for Large Language Model (LLM) settings.
*/
@Configuration
public class LlmConfig {
@Bean
public ChatClient openAiChatClient(OpenAiChatModel chatModel) {
return ChatClient.create(chatModel);
}
}
@@ -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.ai.agent.config;
import com.usthe.sureness.subject.SubjectSum;
import org.springframework.core.NamedInheritableThreadLocal;
/**
* Context holder for AI agent security context.
*/
public final class McpContextHolder {
private static final ThreadLocal<SubjectSum> subjectHolder =
new NamedInheritableThreadLocal<>("MCP Security and User Identification Context");
private McpContextHolder() {}
/**
* Attaches the user's context to the current thread.
*/
public static void setSubject(SubjectSum subject) {
subjectHolder.set(subject);
}
/**
* Retrieves the context from the current thread.
*/
public static SubjectSum getSubject() {
return subjectHolder.get();
}
/**
* Clears the context from the thread to prevent memory leaks.
*/
public static void clear() {
subjectHolder.remove();
}
}
@@ -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.ai.agent.config;
import org.springframework.stereotype.Component;
/**
* Provider for system prompts used in the AI agent
*/
@Component
public class PromptProvider {
/**
* Static version of the HertzBeat monitoring prompt
*/
public static final String HERTZBEAT_MONITORING_PROMPT = """
You are an AI assistant specialized in monitoring infrastructure and applications with HertzBeat.
Your role is to help users manage and analyze their monitoring data using the available tools.
You have access to the following HertzBeat monitoring tools:
- list_monitors: Query monitor information with flexible filtering and pagination
- add_monitor: Add a new monitor to the system
When users ask questions about their monitoring setup or data, identify which tool would be most helpful
and use it to provide relevant information. Always provide clear explanations of the monitoring data and
suggest next steps or insights based on the results.
For monitoring-related queries:
1. If users want to see their monitors, use list_monitors with appropriate filters
2. If users want to add a new monitor, use add_monitor with the necessary details
3. If the monitoring information shows potential issues, highlight them and suggest troubleshooting steps
For parameters that accept specific values:
- Monitor status values: 0 (no monitor), 1 (usable), 2 (disabled), 9 (all)
- Sort fields typically include: name, host, app, gmtCreate
- Sort order should be 'asc' or 'desc'
Keep responses focused on monitoring topics and HertzBeat capabilities.
If you're unsure about specific monitoring details, ask clarifying questions before using the tools.
""";
}
@@ -1,70 +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.ai.agent.controller;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.http.MediaType;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import org.apache.hertzbeat.ai.agent.pojo.dto.ChatRequestContext;
import org.apache.hertzbeat.ai.agent.service.ChatClientProviderService;
/**
* Controller class for handling chat-related HTTP requests.
*/
@RestController
@RequestMapping("/api/chat")
public class ChatController {
private final ChatClientProviderService chatClientProviderService;
@Autowired
public ChatController(@Qualifier("openAiChatClient") ChatClient openAiChatClient,
ChatClientProviderService chatClientProviderService) {
this.chatClientProviderService = chatClientProviderService;
}
/**
* Send a message and get a streaming response
*
* @param context The chat request context containing message and optional
* conversationId
* @return SSE emitter for streaming response
*/
@PostMapping(value = "/stream", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public SseEmitter streamChat(@RequestBody ChatRequestContext context) {
SseEmitter emitter = new SseEmitter();
new Thread(() -> {
try {
String aiResponse = chatClientProviderService.streamChat(context);
emitter.send(aiResponse);
emitter.complete();
} catch (Exception e) {
emitter.completeWithError(e);
}
}).start();
return emitter;
}
}
@@ -1,26 +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.ai.agent.controller;
/**
* Controller for managing conversations.
*/
public class ConversationController {
}
@@ -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.ai.agent.dao;
/**
* Data Access Object interface for Conversation entities.
*/
public interface ConversationDao {
}
@@ -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.ai.agent.dao;
/**
* Data Access Object interface for Message entities.
*/
public interface MessageDao {
}
@@ -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.ai.agent.dao;
/**
* Data Access Object interface for UserPreference entities.
*/
public interface UserPreferenceDao {
}
@@ -1,40 +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.ai.agent.pojo.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Chat request context for AI chat endpoint.
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ChatRequestContext {
/**
* The user's message (required)
*/
private String message;
/**
* Optional conversation ID for context
*/
private String conversationId;
}
@@ -1,26 +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.ai.agent.service;
/**
* Service interface for agent operations.
*/
public interface AgentService {
}
@@ -1,31 +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.ai.agent.service;
import org.apache.hertzbeat.ai.agent.pojo.dto.ChatRequestContext;
/**
* Service for interacting with LLM providers (like OpenAI, Anthropic, etc.)
*/
public interface ChatClientProviderService {
String complete(String message);
String streamChat(ChatRequestContext context);
}
@@ -1,71 +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.ai.agent.service;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
import java.util.List;
import java.util.Map;
/**
* Service for managing chat conversations and interactions with LLM providers.
*/
public interface ConversationService {
/**
* Send a message and receive a streaming response
*
* @param message The user's message
* @param conversationId Optional conversation ID for continuing a chat
* @return SseEmitter for streaming the response
*/
SseEmitter streamChat(String message, String conversationId);
/**
* Send a message and get a complete response
*
* @param message The user's message
* @param conversationId Optional conversation ID for continuing a chat
* @return Response object containing the AI's response and conversation metadata
*/
Map<String, Object> chat(String message, String conversationId);
/**
* Get conversation history for a specific conversation
*
* @param conversationId Conversation ID
* @return Conversation data including messages
*/
Map<String, Object> getConversation(String conversationId);
/**
* Get all conversations for the current user
*
* @return List of conversations
*/
List<Map<String, Object>> getAllConversations();
/**
* Delete a conversation
*
* @param conversationId Conversation ID to delete
*/
void deleteConversation(String conversationId);
}
@@ -1,28 +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.ai.agent.service;
import org.springframework.ai.tool.ToolCallbackProvider;
/**
* Service interface for MCP server operations.
*/
public interface McpServerService {
ToolCallbackProvider hertzbeatTools();
}
@@ -1,30 +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.ai.agent.service.impl;
import org.apache.hertzbeat.ai.agent.service.AgentService;
import org.springframework.stereotype.Service;
/**
* Implementation of the AgentService interface.
* This service provides functionality for handling AI agent operations.
*/
@Service
public class AgentServiceImpl implements AgentService {
}
@@ -1,70 +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.ai.agent.service.impl;
import org.apache.hertzbeat.ai.agent.config.PromptProvider;
import org.apache.hertzbeat.ai.agent.service.ChatClientProviderService;
import org.springframework.stereotype.Service;
import org.apache.hertzbeat.ai.agent.pojo.dto.ChatRequestContext;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
/**
* Implementation of the {@link ChatClientProviderService}.
* Provides functionality to interact with the ChatClient for handling chat
* messages.
*/
@Service
public class ChatClientProviderServiceImpl implements ChatClientProviderService {
private final ChatClient chatClient;
@Qualifier("hertzbeatTools")
@Autowired
private ToolCallbackProvider toolCallbackProvider;
@Autowired
public ChatClientProviderServiceImpl(@Qualifier("openAiChatClient") ChatClient openAiChatClient) {
this.chatClient = openAiChatClient;
}
@Override
public String complete(String message) {
return this.chatClient.prompt()
.user(message)
.call()
.content();
}
@Override
public String streamChat(ChatRequestContext context) {
try {
return this.chatClient.prompt(PromptProvider.HERTZBEAT_MONITORING_PROMPT)
.user(context.getMessage())
.toolCallbacks(toolCallbackProvider)
.call()
.content();
} catch (Exception e) {
return "Error: " + e.getMessage();
}
}
}
@@ -1,29 +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.ai.agent.service.impl;
import org.springframework.stereotype.Service;
/**
* Implementation of the ConversationService interface for managing chat conversations.
*/
@Service
public class ConversationServiceImpl {
}
@@ -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.ai.agent.service.impl;
import org.apache.hertzbeat.ai.agent.config.CustomSseServerTransport;
import org.apache.hertzbeat.ai.agent.service.McpServerService;
import org.springframework.ai.mcp.server.autoconfigure.McpServerProperties;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import org.apache.hertzbeat.ai.agent.tools.impl.MonitorToolsImpl;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.beans.factory.annotation.Autowired;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.web.servlet.function.RouterFunction;
import org.springframework.web.servlet.function.ServerResponse;
/**
* Implementation of the McpServerService interface.
* This service provides functionality for handling MCP server operations.
*/
@Service
@Configuration
public class McpServerServiceImpl implements McpServerService {
@Autowired
private MonitorToolsImpl monitorTools;
@Bean
public ToolCallbackProvider hertzbeatTools() {
return MethodToolCallbackProvider.builder().toolObjects(monitorTools).build();
}
/**
* Provides a custom SSE server transport for the MCP server.
*
* @param objectMapper the ObjectMapper instance for JSON serialization
* @param serverProperties the properties for the MCP server configuration
* @return a CustomSseServerTransport instance configured with the provided properties
*/
@Bean
public CustomSseServerTransport webMvcSseServerTransportProvider(
ObjectMapper objectMapper,
McpServerProperties serverProperties
) {
return new CustomSseServerTransport(
objectMapper,
serverProperties.getBaseUrl(),
serverProperties.getSseMessageEndpoint(),
serverProperties.getSseEndpoint()
);
}
/**
* Provides the MCP server transport bean.
*
* @param transport the custom SSE server transport
* @return the MCP server transport instance
*/
@Primary
@Bean
public RouterFunction<ServerResponse> mvcMcpRouterFunction(CustomSseServerTransport transport) {
return transport.getRouterFunction();
}
}
@@ -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.ai.agent.tools;
/**
* Tools for alert operations
*/
public interface AlertTools {
}
@@ -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.ai.agent.tools;
/**
* Tools for metrics operations
*/
public interface MetricsTools {
}
@@ -1,50 +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.ai.agent.tools;
import org.springframework.ai.chat.model.ToolContext;
import java.util.List;
/**
* Interface for Monitoring Tools
*/
public interface MonitorTools {
String addMonitor(String name, ToolContext context);
/**
* Query monitor information with flexible filtering and pagination.
* Supports filtering by monitor IDs, type, status, host, labels, sorting, and
* pagination.
* Returns results as plain JSON.
*/
String listMonitors(
List<Long> ids,
String app,
Byte status,
String search,
String labels,
String sort,
String order,
Integer pageIndex,
Integer pageSize,
ToolContext context);
}
@@ -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.ai.agent.tools.impl;
/**
* Implementation of Alert Tools functionality
*/
public class AlertToolsImpl {
}
@@ -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.ai.agent.tools.impl;
/**
* Implementation of Metrics Tools functionality
*/
public class MetricsToolsImpl {
}
@@ -1,87 +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.ai.agent.tools.impl;
import com.usthe.sureness.subject.SubjectSum;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.ai.agent.adapters.MonitorServiceAdapter;
import org.apache.hertzbeat.ai.agent.config.McpContextHolder;
import org.springframework.ai.chat.model.ToolContext;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
import org.apache.hertzbeat.ai.agent.tools.MonitorTools;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.apache.hertzbeat.common.entity.manager.Monitor;
import java.util.List;
/**
* Implementation of Monitoring Tools functionality
*/
@Slf4j
@Service
public class MonitorToolsImpl implements MonitorTools {
@Autowired
private MonitorServiceAdapter monitorServiceAdapter;
/**
* Tool to query monitor information with flexible filtering and pagination.
* Supports filtering by monitor IDs, type, status, host, labels, sorting, and
* pagination.
* Returns monitor names as string.
*/
@Override
@Tool(name = "list_monitors", returnDirect = true, description = """
Query monitor information with flexible filtering and pagination.
Supports filtering by monitor IDs, type, status, host, labels, sorting, and pagination.
Returns results as String. When no parameters are available, pass the default value as mentioned below. If the user doesn't provide any specific parameter, the default value will be used.
""")
public String listMonitors(
@ToolParam(description = "List of monitor IDs to filter (default: empty list)", required = false) List<Long> ids,
@ToolParam(description = "Monitor type, e.g., 'linux' (default: null)", required = false) String app,
@ToolParam(description = "Monitor status (0: no monitor, 1: usable, 2: disabled, 9: all) (default: null)", required = false) Byte status,
@ToolParam(description = "Fuzzy search for host or name (default: null)", required = false) String search,
@ToolParam(description = "Monitor labels, e.g., 'env:prod,instance:22' (default: null)", required = false) String labels,
@ToolParam(description = "Sort field, e.g., 'name' (default: gmtCreate)", required = false) String sort,
@ToolParam(description = "Sort order, 'asc' or 'desc' (default: desc)", required = false) String order,
@ToolParam(description = "Page index (default: 0)", required = false) Integer pageIndex,
@ToolParam(description = "Page size (default: 8)", required = false) Integer pageSize,
ToolContext context) {
try {
Page<Monitor> result = monitorServiceAdapter.getMonitors(ids, app, search, status, sort, order, pageIndex, pageSize, labels);
log.debug("MonitorServiceAdapter.getMonitors result: {}", result);
return result.getContent().stream().map(Monitor::getName).toList().toString();
} catch (Exception e) {
return "error is" + e.getMessage();
}
}
@Override
@Tool(name = "add_monitor", description = "Add a new monitor")
public String addMonitor(@ToolParam(description = "Name of the monitor") String name, ToolContext context) {
log.debug("Adding monitor with name: {}", name);
SubjectSum subjectSum = McpContextHolder.getSubject();
log.debug("Current subject in tool: {}", subjectSum);
return "Monitor added: " + name;
}
}
@@ -128,7 +128,11 @@ public class DashboardService {
? GrafanaConstants.generateUseDatasource(currentDatasourceName) : "";
String relativeDashboardUrl = grafanaDashboard.getUrl();
String fullDashboardUrl = grafanaProperties.exposeUrl().replaceAll("/$", "") + relativeDashboardUrl;
if (relativeDashboardUrl != null && grafanaProperties.getUrl() != null && relativeDashboardUrl.startsWith(grafanaProperties.getUrl())) {
relativeDashboardUrl = relativeDashboardUrl.substring(grafanaProperties.getUrl().length());
}
String fullDashboardUrl = grafanaProperties.exposeUrl().replaceAll("/$", "")
+ (relativeDashboardUrl != null ? relativeDashboardUrl.replaceAll("^/", "") : "");
grafanaDashboard.setUrl(fullDashboardUrl + KIOSK + REFRESH + INSTANCE + monitorId + useDatasource);
@@ -1,141 +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.grafana.service;
import org.apache.hertzbeat.common.entity.grafana.GrafanaDashboard;
import org.apache.hertzbeat.grafana.config.GrafanaProperties;
import org.apache.hertzbeat.grafana.dao.DashboardDao;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
/**
* Test case for {@link DashboardService}
*/
@ExtendWith(MockitoExtension.class)
public class DashboardServiceTest {
@Mock
private ServiceAccountService serviceAccountService;
@Mock
private DashboardDao dashboardDao;
@Mock
private GrafanaProperties grafanaProperties;
@Mock
private RestTemplate restTemplate;
@Mock
private DatasourceService datasourceService;
@InjectMocks
private DashboardService dashboardService;
static final String GRAFANA_API_RESULT = "{"
+ " \"folderUid\": \"\","
+ " \"id\": 3,"
+ " \"slug\": \"prometheus-dashboard\","
+ " \"status\": \"success\","
+ " \"uid\": \"5d7d89b0-b273-40fe-bb30-d652b82f47eb\","
+ " \"url\": \"/d/5d7d89b0-b273-40fe-bb30-d652b82f47eb/prometheus-dashboard\","
+ " \"version\": 3"
+ "}";
@BeforeEach
void setUp() {
when(datasourceService.getCurrentDatasourceName()).thenReturn("hertzbeat-vm-localhost-8428");
when(grafanaProperties.enabled()).thenReturn(Boolean.TRUE);
when(grafanaProperties.getPrefix()).thenReturn("");
when(grafanaProperties.getUrl()).thenReturn("http://127.0.0.1:3000");
when(grafanaProperties.exposeUrl()).thenReturn("http://127.0.0.1:3000");
when(serviceAccountService.getToken()).thenReturn("test-token");
}
@Test
void testCreateOrUpdateDashboard() {
ResponseEntity<String> responseEntity = new ResponseEntity<>(GRAFANA_API_RESULT, HttpStatus.OK);
when(restTemplate.postForEntity(
eq("http://127.0.0.1:3000/api/dashboards/db"), any(HttpEntity.class), eq(String.class)
)).thenReturn(responseEntity);
ArgumentCaptor<GrafanaDashboard> dashboardCaptor = ArgumentCaptor.forClass(GrafanaDashboard.class);
dashboardService.createOrUpdateDashboard("{\"id\":11}", 1L);
verify(dashboardDao).save(dashboardCaptor.capture());
GrafanaDashboard savedDashboard = dashboardCaptor.getValue();
assertNotNull(savedDashboard);
assertNotNull(savedDashboard.getUrl());
String expectedBaseUrl = "http://127.0.0.1:3000/d/5d7d89b0-b273-40fe-bb30-d652b82f47eb";
// Verify that the URL begins with the expected base URL.
assertTrue(savedDashboard.getUrl().startsWith(expectedBaseUrl), "URL should start with: " + expectedBaseUrl + ", but was: " + savedDashboard.getUrl());
assertTrue(savedDashboard.getUrl().contains("kiosk=tv"), "URL should contain kiosk parameter");
assertTrue(savedDashboard.getUrl().contains("refresh=15s"), "URL should contain refresh parameter");
assertTrue(savedDashboard.getUrl().contains("var-instance=1"), "URL should contain instance parameter");
}
@Test
void testCreateOrUpdateDashboardWithTrailingSlash() {
when(grafanaProperties.exposeUrl()).thenReturn("http://127.0.0.1:3000/");
ResponseEntity<String> responseEntity = new ResponseEntity<>(GRAFANA_API_RESULT, HttpStatus.OK);
when(restTemplate.postForEntity(
eq("http://127.0.0.1:3000/api/dashboards/db"), any(HttpEntity.class), eq(String.class)
)).thenReturn(responseEntity);
ArgumentCaptor<GrafanaDashboard> dashboardCaptor = ArgumentCaptor.forClass(GrafanaDashboard.class);
dashboardService.createOrUpdateDashboard("{\"id\":11}", 1L);
verify(dashboardDao).save(dashboardCaptor.capture());
GrafanaDashboard savedDashboard = dashboardCaptor.getValue();
assertNotNull(savedDashboard);
assertNotNull(savedDashboard.getUrl());
String expectedBaseUrl = "http://127.0.0.1:3000/d/5d7d89b0-b273-40fe-bb30-d652b82f47eb";
// Verify that the URL begins with the expected base URL.
assertTrue(savedDashboard.getUrl().startsWith(expectedBaseUrl), "URL should start with: " + expectedBaseUrl + ", but was: " + savedDashboard.getUrl());
assertTrue(savedDashboard.getUrl().contains("kiosk=tv"), "URL should contain kiosk parameter");
assertTrue(savedDashboard.getUrl().contains("refresh=15s"), "URL should contain refresh parameter");
assertTrue(savedDashboard.getUrl().contains("var-instance=1"), "URL should contain instance parameter");
}
}
-20
View File
@@ -210,11 +210,6 @@
<groupId>org.apache.arrow</groupId>
<artifactId>arrow-memory-netty</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hertzbeat</groupId>
<artifactId>hertzbeat-ai-agent</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
@@ -293,21 +288,6 @@
</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-->
@@ -52,4 +52,4 @@ public class Manager {
public void init() {
System.setProperty("jdk.jndi.object.factoriesFilter", "!com.zaxxer.hikari.HikariJNDIFactory");
}
}
}
@@ -19,33 +19,6 @@ spring:
name: ${HOSTNAME:@hertzbeat@}${PID}
profiles:
active: prod
ai:
mcp:
server:
enabled: true
stdio: false
name: sse-mcp-server
version: 1.0.0
resource-change-notification: true
tool-change-notification: true
prompt-change-notification: true
sse-endpoint: /api/sse
sse-message-endpoint: /api/mcp/message
type: SYNC
capabilities:
tool: true
resource: true
prompt: true
completion: true
chat:
client:
enabled: false
openai:
api-key: OPENAI_API_KEY
chat:
options:
model: gpt-4.1-nano-2025-04-14
mvc:
static-path-pattern: /**
jackson:
@@ -65,7 +38,6 @@ spring:
max-file-size: 100MB
max-request-size: 100MB
management:
health:
mail:
@@ -1,21 +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.
-- 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;
@@ -1,52 +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.
-- 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;
@@ -1,23 +0,0 @@
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License. You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied. See the License for the
-- specific language governing permissions and limitations
-- under the License.
-- 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;
@@ -1,619 +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.
# The monitoring type categoryservice-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
category: bigdata
# The monitoring type eg: linux windows tomcat mysql aws...
app: dolphinscheduler
# The monitoring i18n name
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
# Input params define for monitoring(render web ui by the definition)
params:
# field-param field key
- field: host
# name-param field display i18n name
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
required: true
# field-param field key
- field: port
# name-param field display i18n name
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
range: '[0,65535]'
# required-true or false
required: true
# default value
defaultValue: 12345
# field-param field key
- field: timeout
# name-param field display i18n name
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
required: false
# hide param-true or false
hide: true
# default value
defaultValue: 6000
# field-param field key
- field: ssl
# name-param field display i18n name
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
required: true
- field: token
# name-param field display i18n name
name:
zh-CN: 令牌
en-US: Token
ja-JP: トークン
type: text
limit: 100
required: true
# collect metrics config list
metrics:
- name: master
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
# 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
- field: host
type: 1
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: 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
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
calculates:
- host=json:apply($.heartBeatInfo).host
- port=json:apply($.heartBeatInfo).port
- serverStatus=json:apply($.heartBeatInfo).serverStatus
- processId=json:apply($.heartBeatInfo).processId
- runningTime=(now()-json:apply($.heartBeatInfo).startupTime)/86400000
- cpuUsage=json:apply($.heartBeatInfo).cpuUsage * 100
- memoryUsage=json:apply($.heartBeatInfo).memoryUsage * 100
- diskUsage=json:apply($.heartBeatInfo).diskUsage * 100
- jvmCpuUsage=json:apply($.heartBeatInfo).jvmCpuUsage
- jvmMemoryUsage=json:apply($.heartBeatInfo).jvmMemoryUsage
- jvmHeapUsed=json:apply($.heartBeatInfo).jvmHeapUsed
- jvmNonHeapUsed=json:apply($.heartBeatInfo).jvmNonHeapUsed
- jvmHeapMax=json:apply($.heartBeatInfo).jvmHeapMax
- jvmNonHeapMax=json:apply($.heartBeatInfo).jvmNonHeapMax
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# the config content when protocol is http
http:
# http host: ipv4 ipv6 domain
host: ^_^host^_^
# http port
port: ^_^port^_^
# http url
url: /dolphinscheduler/monitor/MASTER
# http method: GET POST PUT DELETE PATCH
method: GET
# if enabled https
ssl: ^_^ssl^_^
# http request header content
headers:
token: ^_^token^_^
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
parseType: jsonPath
parseScript: '$.data[*]'
- name: worker
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
# 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
- field: host
type: 1
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: 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
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
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
calculates:
- host=json:apply($.heartBeatInfo).host
- port=json:apply($.heartBeatInfo).port
- serverStatus=json:apply($.heartBeatInfo).serverStatus
- processId=json:apply($.heartBeatInfo).processId
- runningTime=(now()-json:apply($.heartBeatInfo).startupTime)/86400000
- cpuUsage=json:apply($.heartBeatInfo).cpuUsage * 100
- memoryUsage=json:apply($.heartBeatInfo).memoryUsage * 100
- diskUsage=json:apply($.heartBeatInfo).diskUsage * 100
- jvmCpuUsage=json:apply($.heartBeatInfo).jvmCpuUsage
- jvmMemoryUsage=json:apply($.heartBeatInfo).jvmMemoryUsage
- jvmHeapUsed=json:apply($.heartBeatInfo).jvmHeapUsed
- jvmNonHeapUsed=json:apply($.heartBeatInfo).jvmNonHeapUsed
- jvmHeapMax=json:apply($.heartBeatInfo).jvmHeapMax
- jvmNonHeapMax=json:apply($.heartBeatInfo).jvmNonHeapMax
- workerHostWeight=json:apply($.heartBeatInfo).workerHostWeight
- threadPoolUsage=json:apply($.heartBeatInfo).threadPoolUsage
- workerGroup=json:apply($.heartBeatInfo).workerGroup
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# the config content when protocol is http
http:
# http host: ipv4 ipv6 domain
host: ^_^host^_^
# http port
port: ^_^port^_^
# http url
url: /dolphinscheduler/monitor/WORKER
# http method: GET POST PUT DELETE PATCH
method: GET
# if enabled https
ssl: ^_^ssl^_^
# http request header content
headers:
token: ^_^token^_^
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
parseType: jsonPath
parseScript: '$.data[*]'
- name: alert-server
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
# 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
- field: host
type: 1
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: 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
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
calculates:
- host=json:apply($.heartBeatInfo).host
- port=json:apply($.heartBeatInfo).port
- serverStatus=json:apply($.heartBeatInfo).serverStatus
- processId=json:apply($.heartBeatInfo).processId
- runningTime=(now()-json:apply($.heartBeatInfo).startupTime)/86400000
- cpuUsage=json:apply($.heartBeatInfo).cpuUsage * 100
- memoryUsage=json:apply($.heartBeatInfo).memoryUsage * 100
- diskUsage=json:apply($.heartBeatInfo).diskUsage * 100
- jvmCpuUsage=json:apply($.heartBeatInfo).jvmCpuUsage
- jvmMemoryUsage=json:apply($.heartBeatInfo).jvmMemoryUsage
- jvmHeapUsed=json:apply($.heartBeatInfo).jvmHeapUsed
- jvmNonHeapUsed=json:apply($.heartBeatInfo).jvmNonHeapUsed
- jvmHeapMax=json:apply($.heartBeatInfo).jvmHeapMax
- jvmNonHeapMax=json:apply($.heartBeatInfo).jvmNonHeapMax
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# the config content when protocol is http
http:
# http host: ipv4 ipv6 domain
host: ^_^host^_^
# http port
port: ^_^port^_^
# http url
url: /dolphinscheduler/monitor/ALERT_SERVER
# http method: GET POST PUT DELETE PATCH
method: GET
# if enabled https
ssl: ^_^ssl^_^
# http request header content
headers:
token: ^_^token^_^
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
parseType: jsonPath
parseScript: '$.data[*]'
- name: database
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
# 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
- field: dbType
type: 1
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
- state
- maxConnections
- threadsConnections
- threadsRunningConnections
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
calculates:
- dbType=dbType
- state=state
- maxConnections=maxConnections
- threadsConnections=threadsConnections
- threadsRunningConnections=threadsRunningConnections
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
protocol: http
# the config content when protocol is http
http:
# http host: ipv4 ipv6 domain
host: ^_^host^_^
# http port
port: ^_^port^_^
# http url
url: /dolphinscheduler/monitor/databases
# http method: GET POST PUT DELETE PATCH
method: GET
# if enabled https
ssl: ^_^ssl^_^
# http request header content
headers:
token: ^_^token^_^
# http response data parse type: default-hertzbeat rule, jsonpath-jsonpath script, website-for website monitoring, prometheus-prometheus exporter rule
parseType: jsonPath
parseScript: '$.data[0]'
@@ -62,7 +62,6 @@ params:
type: number
required: false
hide: true
defaultValue: 6000
- field: authType
name:
zh-CN: 认证方式
@@ -126,7 +125,7 @@ metrics:
zh-CN: 状态
en-US: Status
ja-JP: ステータス
- field: Size
- field: size
type: 0
i18n:
zh-CN: 数量
@@ -138,18 +137,6 @@ 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
@@ -241,7 +228,7 @@ metrics:
priority: 1
fields:
- field: state
type: 1
type: 2
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,18 +172,6 @@ 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^_^
@@ -185,7 +185,7 @@ metrics:
# SQL Query MethodoneRow, multiRow, columns
queryType: oneRow
# sql
sql: "select * from sys.v_$instance"
sql: select * from sys.v_$instance
# JDBC url
url: ^_^url^_^
@@ -246,7 +246,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: multiRow
sql: "select file_id, file_name, tablespace_name, status, bytes / 1024 / 1024 as bytes, blocks from dba_data_files"
sql: select file_id, file_name, tablespace_name, status, bytes / 1024 / 1024 as bytes, blocks from dba_data_files
url: ^_^url^_^
- name: total_sessions
@@ -273,7 +273,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: oneRow
sql: "select count(*) as count from v$session"
sql: select count(*) as count from v$session
url: ^_^url^_^
- name: active_sessions
@@ -300,7 +300,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: oneRow
sql: "select count(*) as count from v$session where username is not null and status = 'ACTIVE'"
sql: select count(*) as count from v$session where username is not null and status = 'ACTIVE'
url: ^_^url^_^
- name: background_sessions
@@ -327,7 +327,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: oneRow
sql: "select count(*) as count from v$session where username is null"
sql: select count(*) as count from v$session where username is null
url: ^_^url^_^
- name: connection
@@ -361,7 +361,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: oneRow
sql: "SELECT username, count( username ) as count FROM v$session WHERE username IS NOT NULL GROUP BY username"
sql: SELECT username, count( username ) as count FROM v$session WHERE username IS NOT NULL GROUP BY username
url: ^_^url^_^
- name: performance
@@ -411,13 +411,13 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: columns
sql: "select metric_name, value from gv$sysmetric where metric_name = 'I/O Megabytes per Second' or metric_name = 'User Transaction Per Sec' or metric_name = 'I/O Requests per Second'"
sql: select metric_name, value from gv$sysmetric where metric_name = 'I/O Megabytes per Second' or metric_name = 'User Transaction Per Sec' or metric_name = 'I/O Requests per Second'
url: ^_^url^_^
- name: percentage
i18n:
zh-CN: 表空间百分比
zh-CN: 百分比
en-US: Percentage
ja-JP: パーセント
priority: 7
@@ -499,7 +499,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: oneRow
sql: "select count(*) as process_count from v$process"
sql: select count(*) as process_count from v$process
url: ^_^url^_^
- name: transaction
@@ -540,7 +540,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: columns
sql: "select metric_name, value from gv$sysmetric where metric_name = 'User Commits Per Sec' or metric_name = 'User Rollbacks Per Sec'"
sql: select metric_name, value from gv$sysmetric where metric_name = 'User Commits Per Sec' or metric_name = 'User Rollbacks Per Sec'
url: ^_^url^_^
- name: wait
@@ -635,7 +635,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: columns
sql: "select wait_class, sum(time_waited) total_wait_time from v$active_session_history where session_state = 'WAITING' GROUP BY wait_class ORDER BY total_wait_time DESC"
sql: select wait_class, sum(time_waited) total_wait_time from v$active_session_history where session_state = 'WAITING' GROUP BY wait_class ORDER BY total_wait_time DESC
url: ^_^url^_^
- name: cpu_stats
@@ -669,7 +669,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: multiRow
sql: "select stat_name as type, value as num from v$osstat where stat_name like '%CPU%' or stat_name like '%TIME'"
sql: select stat_name as type, value as num from v$osstat where stat_name like '%CPU%' or stat_name like '%TIME'
url: ^_^url^_^
- name: mem_stats
@@ -703,7 +703,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: multiRow
sql: "select stat_name as type, value as num from v$osstat where stat_name like '%BYTES'"
sql: select stat_name as type, value as num from v$osstat where stat_name like '%BYTES'
url: ^_^url^_^
- name: cache_hit_ratio
@@ -742,7 +742,7 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: columns
sql: "select metric_name, value from gv$sysmetric where metric_name like '%Cache Hit Ratio' order by end_time asc"
sql: select metric_name, value from gv$sysmetric where metric_name like '%Cache Hit Ratio' order by end_time asc
url: ^_^url^_^
- name: slow_query
@@ -832,69 +832,5 @@ metrics:
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: multiRow
sql: "SELECT * FROM (SELECT sql_id, child_number, executions, ROUND(CASE WHEN executions = 0 THEN NULL ELSE elapsed_time / (executions*1000000) END,4) AS per_secs, cpu_time / 1000000 AS cpu_secs, buffer_gets, disk_reads, fetches, parse_calls, optimizer_cost, sql_text FROM v$sql ) where rownum <= 10 ORDER BY per_secs DESC"
url: ^_^url^_^
- name: users
i18n:
zh-CN: 用户信息
en-US: Users
ja-JP: スロークエリ
priority: 15
fields:
- field: username
type: 1
i18n:
zh-CN: 用户名
en-US: User Name
ja-JP: ユーザー名
- field: account_status
type: 1
i18n:
zh-CN: 账号状态
en-US: Account Status
ja-JP: アカウントのステータス
- field: lock_date
type: 1
i18n:
zh-CN: 锁定时间
en-US: Lock Date
ja-JP: ロック日付
- field: expiry_date
type: 1
i18n:
zh-CN: 密码失效时间
en-US: Password Expiry Date
ja-JP: パスワードの有効期限
- field: expiry_seconds
type: 0
i18n:
zh-CN: 密码剩余有效时间
en-US: Password Validity Period Remaining
ja-JP: パスワードの有効期間残り
unit:
- field: created
type: 1
i18n:
zh-CN: 创建时间
en-US: Creation Date
ja-JP: 作成日
- field: authentication_type
type: 1
i18n:
zh-CN: 认证类型
en-US: Authentication Type
ja-JP: 認証タイプ
protocol: jdbc
jdbc:
host: ^_^host^_^
port: ^_^port^_^
platform: oracle
username: ^_^username^_^
password: ^_^password^_^
database: ^_^database^_^
timeout: ^_^timeout^_^
reuseConnection: ^_^reuseConnection^_^
queryType: multiRow
sql: "SELECT username,account_status,lock_date,expiry_date,ceil((expiry_date-sysdate)* 24 * 60 * 60) as expiry_seconds,created,authentication_type FROM DBA_USERS ORDER BY expiry_date ASC"
sql: SELECT * FROM (SELECT sql_id, child_number, executions, ROUND(CASE WHEN executions = 0 THEN NULL ELSE elapsed_time / (executions*1000000) END,4) AS per_secs, cpu_time / 1000000 AS cpu_secs, buffer_gets, disk_reads, fetches, parse_calls, optimizer_cost, sql_text FROM v$sql ) where rownum <= 10 ORDER BY per_secs DESC
url: ^_^url^_^
@@ -651,7 +651,7 @@ metrics:
zh-CN: 次数
en-US: Num
ja-JP: 数量
- field: Size
- field: size
type: 0
unit: B
i18n:
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -21,13 +21,11 @@ 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 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>」をクリックしてパラメタを設定した後、新規することができます。
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>”,導入已有配置。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/influxdb_promql
en-US: https://hertzbeat.apache.org/docs/help/influxdb_promql
@@ -39,7 +37,6 @@ 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
@@ -49,7 +46,6 @@ 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
@@ -64,7 +60,6 @@ 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
@@ -79,7 +74,6 @@ 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
@@ -92,7 +86,6 @@ 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
@@ -103,7 +96,6 @@ 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
@@ -116,7 +108,6 @@ params:
name:
zh-CN: 是否启用SSH隧道
en-US: Enable SSH Tunnel
ja-JP: SSHトンネルの有効化
type: boolean
required: true
hide: true
@@ -124,7 +115,6 @@ params:
name:
zh-CN: SSH Host
en-US: SSH Host
ja-JP: SSHホスト
type: text
required: false
placeholder: 'When Enable SSH Tunnel'
@@ -133,7 +123,6 @@ params:
name:
zh-CN: SSH端口
en-US: SSH Port
ja-JP: SSHポート
type: number
range: '[0,65535]'
required: false
@@ -144,7 +133,6 @@ params:
name:
zh-CN: SSH超时时间(ms)
en-US: SSH Timeout(ms)
ja-JP: SSHタイムアウト(ms)
type: number
required: false
range: '[400,200000]'
@@ -154,7 +142,6 @@ params:
name:
zh-CN: SSH用户名
en-US: SSH Username
ja-JP: SSHユーザー名
type: text
required: false
placeholder: 'When Enable SSH tunnel'
@@ -163,7 +150,6 @@ params:
name:
zh-CN: SSH密码
en-US: SSH Password
ja-JP: SSHパスワード
type: password
required: false
hide: true
@@ -171,7 +157,6 @@ params:
name:
zh-CN: 是否共享SSH连接
en-US: Share SSH Connection
ja-JP: SSH接続共有
type: boolean
required: true
defaultValue: true
@@ -180,7 +165,6 @@ params:
name:
zh-CN: SSH私钥
en-US: SSH PrivateKey
ja-JP: SSH秘密鍵
type: textarea
placeholder: -----BEGIN RSA PRIVATE KEY-----
required: false
@@ -189,7 +173,6 @@ params:
name:
zh-CN: SSH密钥短语
en-US: SSH PrivateKey PassPhrase
ja-JP: SSH秘密鍵フレーズ
type: password
required: false
hide: true
@@ -198,7 +181,6 @@ 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
@@ -209,145 +191,121 @@ 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
@@ -378,7 +336,6 @@ 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
@@ -389,49 +346,41 @@ 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
@@ -462,7 +411,6 @@ 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
@@ -473,229 +421,191 @@ 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
@@ -726,7 +636,6 @@ 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
@@ -737,37 +646,31 @@ 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
@@ -798,7 +701,6 @@ 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
@@ -809,31 +711,26 @@ 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,13 +21,11 @@ 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
@@ -39,7 +37,6 @@ 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
@@ -50,7 +47,6 @@ 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
@@ -65,7 +61,6 @@ 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
@@ -80,7 +75,6 @@ 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
@@ -92,7 +86,6 @@ 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
@@ -104,7 +97,6 @@ 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
@@ -117,7 +109,6 @@ 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
@@ -128,7 +119,6 @@ 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-----
@@ -142,7 +132,6 @@ 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
@@ -155,7 +144,6 @@ 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
@@ -167,7 +155,6 @@ 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
@@ -184,7 +171,6 @@ 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
@@ -199,7 +185,6 @@ 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
@@ -212,7 +197,6 @@ 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-----
@@ -227,7 +211,6 @@ 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
@@ -240,19 +223,16 @@ 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
@@ -292,7 +272,6 @@ metrics:
i18n:
zh-CN: CPU 信息
en-US: CPU Info
ja-JP: CPU情報
priority: 1
fields:
- field: info
@@ -300,38 +279,32 @@ 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
@@ -378,7 +351,6 @@ metrics:
i18n:
zh-CN: 内存信息
en-US: Memory Info
ja-JP: メモリ情報
priority: 2
fields:
- field: total
@@ -387,42 +359,36 @@ 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
@@ -465,7 +431,6 @@ metrics:
i18n:
zh-CN: 磁盘信息
en-US: Disk Info
ja-JP: ディスク情報
priority: 3
fields:
- field: disk_num
@@ -473,32 +438,27 @@ 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^_^
@@ -528,7 +488,6 @@ metrics:
i18n:
zh-CN: 网卡信息
en-US: Interface Info
ja-JP: ネットワークカード情報
priority: 4
fields:
- field: interface_name
@@ -537,21 +496,18 @@ 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
@@ -584,7 +540,6 @@ metrics:
i18n:
zh-CN: 文件系统
en-US: Disk Free
ja-JP: ファイルシステム
priority: 5
fields:
- field: filesystem
@@ -592,35 +547,30 @@ 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^_^
@@ -650,7 +600,6 @@ metrics:
i18n:
zh-CN: Top10 CPU 进程
en-US: Top10 CPU Process
ja-JP: トップ10 CPUプロセス
priority: 6
fields:
- field: pid
@@ -659,27 +608,23 @@ 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^_^
@@ -709,7 +654,6 @@ metrics:
i18n:
zh-CN: Top10 内存进程
en-US: Top10 Memory Process
ja-JP: トップ10 メモリプロセス
priority: 7
fields:
- field: pid
@@ -718,27 +662,23 @@ 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,13 +21,11 @@ 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
@@ -39,7 +37,6 @@ 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
@@ -50,7 +47,6 @@ 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
@@ -65,7 +61,6 @@ 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
@@ -80,7 +75,6 @@ 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
@@ -92,7 +86,6 @@ 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
@@ -104,56 +97,48 @@ 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
@@ -197,7 +182,6 @@ metrics:
i18n:
zh-CN: 线程信息
en-US: Thread Info
ja-JP: スレッド情報
priority: 1
fields:
- field: threadName
@@ -206,25 +190,21 @@ 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^_^
@@ -247,7 +227,6 @@ metrics:
i18n:
zh-CN: 节点监控
en-US: Node Monitor
ja-JP: ノード情報
priority: 1
fields:
- field: isMaster
@@ -256,289 +235,241 @@ 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: Spring Cloud Gateway
en-US: Spring Cloud Gateway
ja-JP: Spring Cloud Gateway
zh-CN: SpringGateway
en-US: SpringGateway
ja-JP: SpringGateway
# 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'>注意⚠️:如果要监控 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>
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>
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,13 +21,11 @@ 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
@@ -39,7 +37,6 @@ 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
@@ -50,7 +47,6 @@ 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
@@ -65,7 +61,6 @@ 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
@@ -80,7 +75,6 @@ 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
@@ -95,7 +89,6 @@ 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
@@ -109,7 +102,6 @@ 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
@@ -121,31 +113,26 @@ 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
@@ -168,7 +155,6 @@ metrics:
i18n:
zh-CN: 内存池
en-US: Memory Pool
ja-JP: メモリプール
fields:
- field: name
type: 1
@@ -176,35 +162,30 @@ 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
@@ -241,7 +222,6 @@ 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
@@ -250,19 +230,16 @@ 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^_^
@@ -277,7 +254,6 @@ 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
@@ -286,39 +262,33 @@ 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
@@ -335,7 +305,6 @@ metrics:
i18n:
zh-CN: 应用信息
en-US: Application
ja-JP: 応用情報
priority: 4
fields:
- field: name
@@ -344,99 +313,83 @@ 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: Index
en-US: 编号
- field: hrSWInstalledName
type: 1
i18n:
@@ -357,14 +357,14 @@ metrics:
type: 0
i18n:
zh-CN: 编号
en-US: Index
en-US: 编号
- 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
@@ -66,12 +66,12 @@ resourceRole:
- /api/bulletin/**===post===[admin,user]
- /api/bulletin/**===put===[admin,user]
- /api/bulletin/**===delete===[admin]
- /api/sse/**===get===[admin,user]
- /api/sse/**===post===[admin,user]
# config the resource restful api that need bypass auth protection
# 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
@@ -36,7 +36,6 @@ import java.util.Map;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.zip.GZIPOutputStream;
import com.google.common.collect.Maps;
@@ -107,8 +106,8 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
private final BlockingQueue<VictoriaMetricsDataStorage.VictoriaMetricsContent> metricsBufferQueue;
private HashedWheelTimer metricsFlushTimer = null;
private MetricsFlushTask metricsFlushtask = null;
private final VictoriaMetricsProperties.InsertConfig insertConfig;
private final AtomicBoolean draining = new AtomicBoolean(false);
public VictoriaMetricsDataStorage(VictoriaMetricsProperties victoriaMetricsProperties, RestTemplate restTemplate) {
if (victoriaMetricsProperties == null) {
@@ -130,8 +129,8 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
thread.setDaemon(true);
return thread;
}, 1, TimeUnit.SECONDS, 512);
// start flush interval timer
this.metricsFlushTimer.newTimeout(new MetricsFlushTask(null), insertConfig.flushInterval(), TimeUnit.SECONDS);
metricsFlushtask = new MetricsFlushTask();
this.metricsFlushTimer.newTimeout(metricsFlushtask, 0, TimeUnit.SECONDS);
}
private boolean checkVictoriaMetricsDatasourceAvailable() {
@@ -592,63 +591,36 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
}
}
// Refresh in advance to avoid waiting
if (metricsBufferQueue.size() >= insertConfig.bufferSize() * 0.8
&& draining.compareAndSet(false, true)) {
if (metricsBufferQueue.size() >= insertConfig.bufferSize() * 0.8) {
triggerImmediateFlush();
}
}
private void triggerImmediateFlush() {
List<VictoriaMetricsDataStorage.VictoriaMetricsContent> batch = new ArrayList<>(insertConfig.bufferSize());
metricsBufferQueue.drainTo(batch, insertConfig.bufferSize());
draining.set(false);
if (!batch.isEmpty()) {
metricsFlushTimer.newTimeout(new MetricsFlushTask(batch), 0, TimeUnit.MILLISECONDS);
}
metricsFlushTimer.newTimeout(metricsFlushtask, 0, TimeUnit.MILLISECONDS);
}
/**
* Regularly refresh the buffer queue to the vm
*/
private class MetricsFlushTask implements TimerTask {
private final List<VictoriaMetricsDataStorage.VictoriaMetricsContent> batch;
public MetricsFlushTask(List<VictoriaMetricsDataStorage.VictoriaMetricsContent> batch) {
this.batch = batch;
}
@Override
public void run(Timeout timeout) {
try {
if (batch == null) {
// If the batch is null, it means that the timer is triggered by flush interval timer
List<VictoriaMetricsDataStorage.VictoriaMetricsContent> batchT = new ArrayList<>(insertConfig.bufferSize());
metricsBufferQueue.drainTo(batchT, insertConfig.bufferSize());
triggerDoSaveData(batchT);
// Reschedule the next flush task
triggerIntervalFlushTimer();
} else {
// If the batch is not null, it means that the timer is triggered by the immediate flush
triggerDoSaveData(batch);
List<VictoriaMetricsDataStorage.VictoriaMetricsContent> batch = new ArrayList<>(insertConfig.bufferSize());
metricsBufferQueue.drainTo(batch, insertConfig.bufferSize());
if (!batch.isEmpty()) {
doSaveData(batch);
log.debug("[Victoria Metrics] Flushed {} metrics items", batch.size());
}
if (metricsFlushTimer != null && !metricsFlushTimer.isStop()) {
metricsFlushTimer.newTimeout(this, insertConfig.flushInterval(), TimeUnit.SECONDS);
log.debug("[Victoria Metrics] Rescheduled next flush task in {} seconds.", insertConfig.flushInterval());
}
} catch (Exception e) {
log.error("[VictoriaMetrics] flush task error: {}", e.getMessage(), e);
}
}
private void triggerDoSaveData(List<VictoriaMetricsContent> batch) {
if (!batch.isEmpty()) {
doSaveData(batch);
log.debug("[Victoria Metrics] Flushed {} metrics items", batch.size());
}
}
private void triggerIntervalFlushTimer() {
if (metricsFlushTimer != null && !metricsFlushTimer.isStop()) {
metricsFlushTimer.newTimeout(new MetricsFlushTask(null), insertConfig.flushInterval(), TimeUnit.SECONDS);
log.debug("[Victoria Metrics] Rescheduled next flush task in {} seconds.", insertConfig.flushInterval());
}
}
}
/**
@@ -21,8 +21,9 @@ import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.startsWith;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.times;
import org.apache.arrow.vector.types.pojo.ArrowType;
import org.apache.arrow.vector.types.pojo.Field;
@@ -52,7 +53,6 @@ import org.springframework.web.client.RestTemplate;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Test case for {@link VictoriaMetricsDataStorage}
@@ -72,33 +72,18 @@ class VictoriaMetricsDataStorageTest {
private VictoriaMetricsDataStorage victoriaMetricsDataStorage;
private final AtomicInteger postForEntityCount = new AtomicInteger(0);
@BeforeEach
void setUp() {
when(victoriaMetricsProperties.enabled()).thenReturn(true);
when(victoriaMetricsProperties.url()).thenReturn("http://localhost:8428");
when(victoriaMetricsProperties.username()).thenReturn("root");
when(victoriaMetricsProperties.password()).thenReturn("root");
// on successful write, VictoriaMetrics returns HTTP 204 (No Content)
when(responseEntity.getStatusCode()).thenReturn(HttpStatus.NO_CONTENT);
when(restTemplate.exchange(
anyString(),
eq(HttpMethod.GET),
any(HttpEntity.class),
eq(String.class)
)).thenReturn(responseEntity);
when(restTemplate.postForEntity(
startsWith(victoriaMetricsProperties.url()),
any(HttpEntity.class),
eq(String.class)
)).thenAnswer(invocation -> {
postForEntityCount.incrementAndGet();
return responseEntity;
});
when(restTemplate.exchange(anyString(), eq(HttpMethod.GET), any(HttpEntity.class), eq(String.class)))
.thenReturn(responseEntity);
when(restTemplate.postForEntity(anyString(), any(HttpEntity.class), eq(String.class)))
.thenReturn(responseEntity);
}
@Test
@@ -107,11 +92,14 @@ class VictoriaMetricsDataStorageTest {
victoriaMetricsDataStorage = new VictoriaMetricsDataStorage(victoriaMetricsProperties, restTemplate);
// execute one-time data insertion
victoriaMetricsDataStorage.saveData(generateMockedMetricsData());
// wait for the timer's first insertion task execution and verify if it was called once (default 3 seconds)
Awaitility.await()
.pollInterval(2, TimeUnit.SECONDS)
.atMost(7, TimeUnit.SECONDS)
.untilAsserted(() -> assertThat(postForEntityCount.get()).isEqualTo(1));
// wait for the timer's first insertion task execution and verify if it was called once
Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() ->
verify(restTemplate, times(1)).postForEntity(
startsWith(victoriaMetricsProperties.url()),
any(HttpEntity.class),
eq(String.class)
)
);
}
@Test
@@ -121,15 +109,28 @@ class VictoriaMetricsDataStorageTest {
10, Integer.MAX_VALUE, new VictoriaMetricsProperties.Compression(false)));
victoriaMetricsDataStorage = new VictoriaMetricsDataStorage(victoriaMetricsProperties, restTemplate);
victoriaMetricsDataStorage.saveData(generateMockedMetricsData());
// wait for the timer to execute its first insertion task
Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() ->
verify(restTemplate, times(1)).postForEntity(
startsWith(victoriaMetricsProperties.url()),
any(HttpEntity.class),
eq(String.class)
)
);
// triggers the buffer size insertion condition
for (int i = 0; i < 10 * 0.8; i++) {
victoriaMetricsDataStorage.saveData(generateMockedMetricsData());
}
// wait for the timer to execute the task
Awaitility.await()
.pollInterval(1, TimeUnit.SECONDS)
.atMost(5, TimeUnit.SECONDS)
.untilAsserted(() -> assertThat(postForEntityCount.get()).isEqualTo(1));
// wait for the timer to execute the task again
Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() ->
verify(restTemplate, times(2)).postForEntity(
startsWith(victoriaMetricsProperties.url()),
any(HttpEntity.class),
eq(String.class)
)
);
}
@Test
@@ -141,47 +142,22 @@ class VictoriaMetricsDataStorageTest {
victoriaMetricsDataStorage.saveData(generateMockedMetricsData());
// wait for the timer to execute its first insertion task
Awaitility.await()
.pollInterval(500, TimeUnit.MILLISECONDS)
.atMost(5, TimeUnit.SECONDS)
.untilAsserted(() -> assertThat(postForEntityCount.get()).isEqualTo(1));
Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() ->
verify(restTemplate, times(1)).postForEntity(
startsWith(victoriaMetricsProperties.url()),
any(HttpEntity.class),
eq(String.class)
)
);
victoriaMetricsDataStorage.saveData(generateMockedMetricsData());
// wait for the flush interval to be triggered again
Awaitility.await()
.pollInterval(500, TimeUnit.MILLISECONDS)
.atMost(5, TimeUnit.SECONDS)
.untilAsserted(() -> assertThat(postForEntityCount.get()).isEqualTo(2));
}
@Test
void testMultiThreadSaveDataBySize() {
int threadCount = 100;
int bufferSize = 10;
int writeSize = (int) (bufferSize * 0.8);
// verify insert process for buffer size, with the flush interval defined as an unreachable state
when(victoriaMetricsProperties.insert()).thenReturn(new VictoriaMetricsProperties.InsertConfig(
bufferSize, Integer.MAX_VALUE, new VictoriaMetricsProperties.Compression(false)));
victoriaMetricsDataStorage = new VictoriaMetricsDataStorage(victoriaMetricsProperties, restTemplate);
for (int i = 0; i < threadCount; i++) {
new Thread(() -> {
// triggers the buffer size insertion condition
for (int j = 0; j < writeSize; j++) {
victoriaMetricsDataStorage.saveData(generateMockedMetricsData());
}
}).start();
}
// wait for the timer to execute the task
Awaitility.await()
.pollInterval(3, TimeUnit.SECONDS)
.atMost(15, TimeUnit.SECONDS)
.untilAsserted(() ->
assertThat(postForEntityCount.get())
// minimum flushes: ensure all data is processed (threadCount * writeSize / bufferSize)
.isGreaterThanOrEqualTo(threadCount * writeSize / bufferSize));
// wait for the flush interval to be triggered
Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() ->
verify(restTemplate, times(2)).postForEntity(
startsWith(victoriaMetricsProperties.url()),
any(),
eq(String.class)
));
}
@AfterEach
+1
View File
@@ -3,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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]
---
+2 -1
View File
@@ -3,6 +3,7 @@ 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]
---
@@ -21,7 +22,7 @@ We warmly welcome everyone to join the HertzBeat community. The community accept
## What is HertzBeat
[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.
[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.
### Features
+4 -3
View File
@@ -3,13 +3,14 @@ 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 has released its first Apache version v1.6.0! 🎉.**
**Hi guys, We are excited to announce that Apache HertzBeat (incubating) 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 v1.6.0 is finally out.
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.
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.
@@ -22,7 +23,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) 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) (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.
## Features
+1
View File
@@ -3,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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,6 +3,7 @@ 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:
[

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