mirror of
https://github.com/dromara/hertzbeat.git
synced 2026-09-17 18:19:02 +00:00
Compare commits
44
Commits
update-docs
...
v1.7.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67ad4b04ef | ||
|
|
6432d689dd | ||
|
|
2eb856fffb | ||
|
|
56312831ca | ||
|
|
fe54d42bc0 | ||
|
|
2ea24c1b3a | ||
|
|
e0040e2ede | ||
|
|
0ac0fd4a8d | ||
|
|
0ef87bcc08 | ||
|
|
660bda6e14 | ||
|
|
242cf40135 | ||
|
|
7319c55430 | ||
|
|
5ea29f610b | ||
|
|
b74aff0500 | ||
|
|
d2e8f2f4aa | ||
|
|
28681a1f9e | ||
|
|
6814c7c357 | ||
|
|
f475540508 | ||
|
|
44660a5042 | ||
|
|
339386fd2b | ||
|
|
faa7cb71db | ||
|
|
014a376c30 | ||
|
|
377172e44a | ||
|
|
5b9e19cc30 | ||
|
|
0457ec7d16 | ||
|
|
2947ee218e | ||
|
|
4e841a9fb1 | ||
|
|
b7ecb9b2ec | ||
|
|
7e1873bc10 | ||
|
|
8eb60210a3 | ||
|
|
d608f732f7 | ||
|
|
2d9a2955ef | ||
|
|
cae4423f30 | ||
|
|
f0e53a9fb3 | ||
|
|
79da1a198b | ||
|
|
64cb804147 | ||
|
|
344cb25229 | ||
|
|
74d21a7acd | ||
|
|
f315bf9607 | ||
|
|
810d54bef5 | ||
|
|
48eafa1382 | ||
|
|
4b6c1e0f08 | ||
|
|
edfd857030 | ||
|
|
408a06d3eb |
@@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
github:
|
||||
description: Apache HertzBeat(incubating) is a real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
|
||||
description: Real-time observability system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
|
||||
homepage: https://hertzbeat.apache.org/
|
||||
labels:
|
||||
- monitoring
|
||||
|
||||
@@ -67,6 +67,7 @@ header:
|
||||
- 'karma.conf.js'
|
||||
- 'proxy.conf.js'
|
||||
- '.helmignore'
|
||||
- 'script/helm/**'
|
||||
- 'web-app/src/app/core/**'
|
||||
- 'web-app/src/app/layout/**'
|
||||
- 'web-app/src/app/routes/exception/**'
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
Apache HertzBeat (incubating) is an effort undergoing incubation at the Apache
|
||||
Software Foundation (ASF), sponsored by the Apache Incubator PMC.
|
||||
|
||||
Incubation is required of all newly accepted projects until a further review
|
||||
indicates that the infrastructure, communications, and decision making process
|
||||
have stabilized in a manner consistent with other successful ASF projects.
|
||||
|
||||
While incubation status is not necessarily a reflection of the completeness
|
||||
or stability of the code, it does indicate that the project has yet to be
|
||||
fully endorsed by the ASF.
|
||||
@@ -1,4 +1,4 @@
|
||||
Apache HertzBeat (incubating)
|
||||
Apache HertzBeat™
|
||||
Copyright 2024-2025 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<b><a href="README.md">English</a></b> | <a href="README_CN.md">中文</a> | <a href="README_JP.md">日本語</a>
|
||||
</p>
|
||||
|
||||
> A real-time monitoring system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
|
||||
> A real-time observability system with agentless, performance cluster, prometheus-compatible, custom monitoring and status page building capabilities.
|
||||
|
||||
[](https://discord.gg/Fb6M73htGr)
|
||||
[](https://www.reddit.com/r/hertzbeat/)
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
## 🎡 <font color="green">Introduction</font>
|
||||
|
||||
[Apache HertzBeat](https://github.com/apache/hertzbeat) (incubating) is an easy-to-use, open source, real-time monitoring system with agentless, high performance cluster, prometheus-compatible, offers powerful custom monitoring and status page building capabilities.
|
||||
[Apache HertzBeat™](https://github.com/apache/hertzbeat) is an easy-to-use, open source, real-time observability system with agentless, high performance cluster, prometheus-compatible, offers powerful custom monitoring and status page building capabilities.
|
||||
|
||||
### Features
|
||||
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
<a href="README.md">English</a> | <b><a href="README_CN.md">中文</a></b> | <a href="README_JP.md">日本語</a>
|
||||
</p>
|
||||
|
||||
> 实时监控系统,无需 Agent,性能集群,兼容 Prometheus,自定义监控和状态页构建能力。
|
||||
> 实时观测系统,无需 Agent,性能集群,兼容 Prometheus,自定义监控和状态页构建能力。
|
||||
|
||||
[](https://discord.gg/Fb6M73htGr)
|
||||
[](https://www.reddit.com/r/hertzbeat/)
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
## 🎡 <font color="green">介绍</font>
|
||||
|
||||
[Apache HertzBeat](https://github.com/apache/hertzbeat) (incubating)是一个易用友好的开源实时监控告警系统,无需 Agent,高性能集群,兼容 Prometheus,提供强大的自定义监控和状态页构建能力。
|
||||
[Apache HertzBeat™](https://github.com/apache/hertzbeat) 是一个易用友好的开源实时监控告警系统,无需 Agent,高性能集群,兼容 Prometheus,提供强大的自定义监控和状态页构建能力。
|
||||
|
||||
### 特点
|
||||
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
# Security Policy
|
||||
|
||||
Apache HertzBeat follows the [ASF vulnerability handling process](https://apache.org/security/#vulnerability-handling)
|
||||
Apache HertzBeat™ follows the [ASF vulnerability handling process](https://apache.org/security/#vulnerability-handling)
|
||||
|
||||
## Supported Versions
|
||||
|
||||
@@ -17,6 +17,6 @@ To report a new vulnerability you have discovered please follow the [ASF vulnera
|
||||
|
||||
## Extra Information
|
||||
|
||||
- [Apache HertzBeat Security Model](https://hertzbeat.apache.org/docs/help/security_model)
|
||||
- [Apache HertzBeat™ Security Model](https://hertzbeat.apache.org/docs/help/security_model)
|
||||
- [ASF Security](https://www.apache.org/security/)
|
||||
- [Apache HertzBeat Document](https://hertzbeat.apache.org/docs/)
|
||||
- [Apache HertzBeat™ Document](https://hertzbeat.apache.org/docs/)
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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>
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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
|
||||
);
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.hertzbeat.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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+246
@@ -0,0 +1,246 @@
|
||||
/*
|
||||
* 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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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();
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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.
|
||||
""";
|
||||
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* 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 {
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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 {
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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 {
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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 {
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* 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 {
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* 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();
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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 {
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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 {
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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 {
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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 {
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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);
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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 {
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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 {
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
}
|
||||
+5
-3
@@ -640,11 +640,13 @@ public class HttpCollectImpl extends AbstractCollect {
|
||||
.collect(Collectors.toMap(MetricFamily.Label::getName, MetricFamily.Label::getValue));
|
||||
CollectRep.ValueRow.Builder valueRowBuilder = CollectRep.ValueRow.newBuilder();
|
||||
for (String aliasField : aliasFields) {
|
||||
if ("value".equals(aliasField)) {
|
||||
String columnValue = labelMap.get(aliasField);
|
||||
if (columnValue != null) {
|
||||
valueRowBuilder.addColumn(columnValue);
|
||||
} else if (CommonConstants.PROM_VALUE.equals(aliasField) || CommonConstants.PROM_METRIC_VALUE.equals(aliasField)) {
|
||||
valueRowBuilder.addColumn(String.valueOf(metric.getValue()));
|
||||
} else {
|
||||
String columnValue = labelMap.get(aliasField);
|
||||
valueRowBuilder.addColumn(columnValue == null ? CommonConstants.NULL_VALUE : columnValue);
|
||||
valueRowBuilder.addColumn(CommonConstants.NULL_VALUE);
|
||||
}
|
||||
}
|
||||
builder.addValueRow(valueRowBuilder.build());
|
||||
|
||||
+1
-2
@@ -60,7 +60,7 @@ public class PrometheusMatrixParser extends AbstractPrometheusParse {
|
||||
boolean setValueFlag = false;
|
||||
CollectRep.ValueRow.Builder valueRowBuilder = CollectRep.ValueRow.newBuilder();
|
||||
for (String aliasField : aliasFields) {
|
||||
if (!CollectUtil.assertPromRequireField(aliasField)) {
|
||||
if (!CollectUtil.assertPromRequireField(aliasField) || CollectUtil.isValueAsLabel(aliasField, r.getMetric())) {
|
||||
JsonElement jsonElement = r.getMetric().get(aliasField);
|
||||
if (jsonElement != null) {
|
||||
valueRowBuilder.addColumn(jsonElement.getAsString());
|
||||
@@ -93,7 +93,6 @@ public class PrometheusMatrixParser extends AbstractPrometheusParse {
|
||||
}
|
||||
builder.addValueRow(valueRowBuilder.build());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class PrometheusVectorParser extends AbstractPrometheusParse {
|
||||
for (PromVectorOrMatrix.Result r : result) {
|
||||
CollectRep.ValueRow.Builder valueRowBuilder = CollectRep.ValueRow.newBuilder();
|
||||
for (String aliasField : aliasFields) {
|
||||
if (!CollectUtil.assertPromRequireField(aliasField)) {
|
||||
if (!CollectUtil.assertPromRequireField(aliasField) || CollectUtil.isValueAsLabel(aliasField, r.getMetric())) {
|
||||
JsonElement jsonElement = r.getMetric().get(aliasField);
|
||||
if (jsonElement != null) {
|
||||
valueRowBuilder.addColumn(jsonElement.getAsString());
|
||||
|
||||
+252
@@ -25,7 +25,10 @@ import org.apache.hertzbeat.common.entity.message.CollectRep;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -289,4 +292,253 @@ class HttpCollectImplTest {
|
||||
firstRow = capturedRows.get(0);
|
||||
assertEquals("0.268751364291017", firstRow.getColumns(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testParsePromQlLabelValue() throws Exception {
|
||||
// Create Prometheus format test data
|
||||
String prometheusData = """
|
||||
{
|
||||
"status": "success",
|
||||
"data": {
|
||||
"resultType": "vector",
|
||||
"result": [
|
||||
{
|
||||
"metric": {
|
||||
"__name__": "taos_cluster_info_first_ep",
|
||||
"cluster_id": "590779086215866783",
|
||||
"instance": "host.docker.internal:6043",
|
||||
"job": "tdengine",
|
||||
"value": "localhost:6030"
|
||||
},
|
||||
"value": [
|
||||
1756233177.048,
|
||||
"1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}""";
|
||||
List<CollectRep.ValueRow> capturedRows = new ArrayList<>();
|
||||
CollectRep.MetricsData.Builder builder = new CollectRep.MetricsData.Builder() {
|
||||
@Override
|
||||
public CollectRep.MetricsData.Builder addValueRow(CollectRep.ValueRow valueRow) {
|
||||
capturedRows.add(valueRow);
|
||||
return super.addValueRow(valueRow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMetrics() {
|
||||
return "jvm_memory_used_bytes";
|
||||
}
|
||||
};
|
||||
Method parseMethod = HttpCollectImpl.class.getDeclaredMethod(
|
||||
"parseResponseByPromQl",
|
||||
String.class,
|
||||
List.class,
|
||||
HttpProtocol.class,
|
||||
CollectRep.MetricsData.Builder.class);
|
||||
parseMethod.setAccessible(true);
|
||||
|
||||
parseMethod.invoke(httpCollectImpl, prometheusData, Lists.newArrayList("cluster_id", "value"), new HttpProtocol(), builder);
|
||||
|
||||
// Verify the results
|
||||
assertEquals(1, capturedRows.size());
|
||||
CollectRep.ValueRow firstRow = capturedRows.get(0);
|
||||
assertEquals("590779086215866783", firstRow.getColumns(0));
|
||||
assertEquals("localhost:6030", firstRow.getColumns(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testParsePromQlMetricValue() throws Exception {
|
||||
// Create Prometheus format test data
|
||||
String prometheusData = """
|
||||
{
|
||||
"status": "success",
|
||||
"data": {
|
||||
"resultType": "vector",
|
||||
"result": [
|
||||
{
|
||||
"metric": {
|
||||
"__name__": "taos_cluster_info_first_ep",
|
||||
"cluster_id": "590779086215866783",
|
||||
"instance": "host.docker.internal:6043",
|
||||
"job": "tdengine",
|
||||
"value": "localhost:6030"
|
||||
},
|
||||
"value": [
|
||||
1756233177.048,
|
||||
"1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}""";
|
||||
List<CollectRep.ValueRow> capturedRows = new ArrayList<>();
|
||||
CollectRep.MetricsData.Builder builder = new CollectRep.MetricsData.Builder() {
|
||||
@Override
|
||||
public CollectRep.MetricsData.Builder addValueRow(CollectRep.ValueRow valueRow) {
|
||||
capturedRows.add(valueRow);
|
||||
return super.addValueRow(valueRow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMetrics() {
|
||||
return "jvm_memory_used_bytes";
|
||||
}
|
||||
};
|
||||
Method parseMethod = HttpCollectImpl.class.getDeclaredMethod(
|
||||
"parseResponseByPromQl",
|
||||
String.class,
|
||||
List.class,
|
||||
HttpProtocol.class,
|
||||
CollectRep.MetricsData.Builder.class);
|
||||
parseMethod.setAccessible(true);
|
||||
|
||||
parseMethod.invoke(httpCollectImpl, prometheusData, Lists.newArrayList("cluster_id", "value", "metric_value"), new HttpProtocol(), builder);
|
||||
|
||||
// Verify the results
|
||||
assertEquals(1, capturedRows.size());
|
||||
CollectRep.ValueRow firstRow = capturedRows.get(0);
|
||||
assertEquals("590779086215866783", firstRow.getColumns(0));
|
||||
assertEquals("localhost:6030", firstRow.getColumns(1));
|
||||
assertEquals("1", firstRow.getColumns(2));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testParsePromQlValue() throws Exception {
|
||||
// Create Prometheus format test data
|
||||
String prometheusData = """
|
||||
{
|
||||
"status": "success",
|
||||
"data": {
|
||||
"resultType": "vector",
|
||||
"result": [
|
||||
{
|
||||
"metric": {
|
||||
"__name__": "taos_cluster_info_first_ep",
|
||||
"cluster_id": "590779086215866783",
|
||||
"instance": "host.docker.internal:6043",
|
||||
"job": "tdengine"
|
||||
},
|
||||
"value": [
|
||||
1756233177.048,
|
||||
"1"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}""";
|
||||
List<CollectRep.ValueRow> capturedRows = new ArrayList<>();
|
||||
CollectRep.MetricsData.Builder builder = new CollectRep.MetricsData.Builder() {
|
||||
@Override
|
||||
public CollectRep.MetricsData.Builder addValueRow(CollectRep.ValueRow valueRow) {
|
||||
capturedRows.add(valueRow);
|
||||
return super.addValueRow(valueRow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMetrics() {
|
||||
return "jvm_memory_used_bytes";
|
||||
}
|
||||
};
|
||||
Method parseMethod = HttpCollectImpl.class.getDeclaredMethod(
|
||||
"parseResponseByPromQl",
|
||||
String.class,
|
||||
List.class,
|
||||
HttpProtocol.class,
|
||||
CollectRep.MetricsData.Builder.class);
|
||||
parseMethod.setAccessible(true);
|
||||
|
||||
parseMethod.invoke(httpCollectImpl, prometheusData, Lists.newArrayList("cluster_id", "value"), new HttpProtocol(), builder);
|
||||
|
||||
// Verify the results
|
||||
assertEquals(1, capturedRows.size());
|
||||
CollectRep.ValueRow firstRow = capturedRows.get(0);
|
||||
assertEquals("590779086215866783", firstRow.getColumns(0));
|
||||
assertEquals("1", firstRow.getColumns(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testParsePrometheusLabelValue() throws Exception {
|
||||
// Create Prometheus format test data
|
||||
String prometheusData = """
|
||||
# HELP jvm_memory_used_bytes The amount of used memory in bytes
|
||||
# TYPE jvm_memory_used_bytes gauge
|
||||
jvm_memory_used_bytes{area="heap",value="G1 Survivor Space"} 1048576
|
||||
""";
|
||||
InputStream inputStream = new ByteArrayInputStream(prometheusData.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
List<CollectRep.ValueRow> capturedRows = new ArrayList<>();
|
||||
CollectRep.MetricsData.Builder builder = new CollectRep.MetricsData.Builder() {
|
||||
@Override
|
||||
public CollectRep.MetricsData.Builder addValueRow(CollectRep.ValueRow valueRow) {
|
||||
capturedRows.add(valueRow);
|
||||
return super.addValueRow(valueRow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMetrics() {
|
||||
return "jvm_memory_used_bytes";
|
||||
}
|
||||
};
|
||||
Method parseMethod = HttpCollectImpl.class.getDeclaredMethod(
|
||||
"parseResponseByPrometheusExporter",
|
||||
InputStream.class,
|
||||
List.class,
|
||||
CollectRep.MetricsData.Builder.class);
|
||||
parseMethod.setAccessible(true);
|
||||
|
||||
parseMethod.invoke(httpCollectImpl, inputStream, Lists.newArrayList("area", "value"), builder);
|
||||
|
||||
// Verify the results
|
||||
assertEquals(1, capturedRows.size());
|
||||
CollectRep.ValueRow firstRow = capturedRows.get(0);
|
||||
assertEquals("heap", firstRow.getColumns(0));
|
||||
assertEquals("G1 Survivor Space", firstRow.getColumns(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testParsePrometheus() throws Exception {
|
||||
// Create Prometheus format test data
|
||||
String prometheusData = """
|
||||
# HELP jvm_memory_used_bytes The amount of used memory
|
||||
# TYPE jvm_memory_used_bytes gauge
|
||||
jvm_memory_used_bytes{area="heap",id="G1 Eden Space"} 1.63577856E8
|
||||
jvm_memory_used_bytes{area="heap",id="G1 Old Gen"} 2.7874304E7
|
||||
jvm_memory_used_bytes{area="heap",id="G1 Survivor Space"} 512032.0
|
||||
jvm_memory_used_bytes{area="nonheap",id="CodeCache"} 1.460288E7
|
||||
jvm_memory_used_bytes{area="nonheap",id="Compressed Class Space"} 5844504.0
|
||||
jvm_memory_used_bytes{area="nonheap",id="Metaspace"} 4.1576344E7
|
||||
""";
|
||||
InputStream inputStream = new ByteArrayInputStream(prometheusData.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
List<CollectRep.ValueRow> capturedRows = new ArrayList<>();
|
||||
CollectRep.MetricsData.Builder builder = new CollectRep.MetricsData.Builder() {
|
||||
@Override
|
||||
public CollectRep.MetricsData.Builder addValueRow(CollectRep.ValueRow valueRow) {
|
||||
capturedRows.add(valueRow);
|
||||
return super.addValueRow(valueRow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMetrics() {
|
||||
return "jvm_memory_used_bytes";
|
||||
}
|
||||
};
|
||||
Method parseMethod = HttpCollectImpl.class.getDeclaredMethod(
|
||||
"parseResponseByPrometheusExporter",
|
||||
InputStream.class,
|
||||
List.class,
|
||||
CollectRep.MetricsData.Builder.class);
|
||||
parseMethod.setAccessible(true);
|
||||
|
||||
parseMethod.invoke(httpCollectImpl, inputStream, Lists.newArrayList("area", "id"), builder);
|
||||
|
||||
// Verify the results
|
||||
assertEquals(6, capturedRows.size());
|
||||
CollectRep.ValueRow firstRow = capturedRows.get(0);
|
||||
assertEquals("heap", firstRow.getColumns(0));
|
||||
assertEquals("G1 Eden Space", firstRow.getColumns(1));
|
||||
capturedRows.forEach(t -> assertEquals(2, t.getColumnsList().size()));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ spring:
|
||||
|
||||
collector:
|
||||
info:
|
||||
version: ${COLLECTOR_VERSION:1.7.2}
|
||||
version: ${COLLECTOR_VERSION:1.7.3}
|
||||
ip: ${COLLECTOR_IP:}
|
||||
dispatch:
|
||||
entrance:
|
||||
|
||||
+10
-1
@@ -171,7 +171,16 @@ public final class CollectUtil {
|
||||
* assert prom field
|
||||
*/
|
||||
public static Boolean assertPromRequireField(String aliasField) {
|
||||
return CommonConstants.PROM_TIME.equals(aliasField) || CommonConstants.PROM_VALUE.equals(aliasField);
|
||||
return CommonConstants.PROM_TIME.equals(aliasField)
|
||||
|| CommonConstants.PROM_VALUE.equals(aliasField)
|
||||
|| CommonConstants.PROM_METRIC_VALUE.equals(aliasField);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if "value" field should be treated as a label instead of special field
|
||||
*/
|
||||
public static Boolean isValueAsLabel(String aliasField, JsonObject metric) {
|
||||
return CommonConstants.PROM_VALUE.equals(aliasField) && null != metric && metric.has(aliasField);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
@@ -197,6 +197,11 @@ public interface CommonConstants {
|
||||
*/
|
||||
String PROM_VALUE = "value";
|
||||
|
||||
/**
|
||||
* prometheus metric value alias
|
||||
*/
|
||||
String PROM_METRIC_VALUE = "metric_value";
|
||||
|
||||
/**
|
||||
* Parameter Type Number
|
||||
*/
|
||||
|
||||
+1
-5
@@ -128,11 +128,7 @@ public class DashboardService {
|
||||
? GrafanaConstants.generateUseDatasource(currentDatasourceName) : "";
|
||||
|
||||
String relativeDashboardUrl = grafanaDashboard.getUrl();
|
||||
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("^/", "") : "");
|
||||
String fullDashboardUrl = grafanaProperties.exposeUrl().replaceAll("/$", "") + relativeDashboardUrl;
|
||||
|
||||
grafanaDashboard.setUrl(fullDashboardUrl + KIOSK + REFRESH + INSTANCE + monitorId + useDatasource);
|
||||
|
||||
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -210,6 +210,11 @@
|
||||
<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>
|
||||
@@ -288,6 +293,21 @@
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>make-docker-zip</id>
|
||||
<!--Bound maven operation-->
|
||||
<phase>package</phase>
|
||||
<!--Run once-->
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>../dist</outputDirectory>
|
||||
<descriptors>
|
||||
<descriptor>../script/assembly/server/assembly-docker.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>make-docker-compose-script</id>
|
||||
<!--Bound maven operation-->
|
||||
|
||||
@@ -52,4 +52,4 @@ public class Manager {
|
||||
public void init() {
|
||||
System.setProperty("jdk.jndi.object.factoriesFilter", "!com.zaxxer.hikari.HikariJNDIFactory");
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
-8
@@ -17,10 +17,14 @@
|
||||
|
||||
package org.apache.hertzbeat.manager.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import org.springframework.data.domain.Page;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import org.apache.hertzbeat.common.constants.CommonConstants;
|
||||
import org.apache.hertzbeat.common.entity.dto.Message;
|
||||
@@ -37,6 +41,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
@@ -49,7 +54,7 @@ public class StatusPageController {
|
||||
|
||||
@Autowired
|
||||
private StatusPageService statusPageService;
|
||||
|
||||
|
||||
@GetMapping("/org")
|
||||
@Operation(summary = "Query Status Page Organization")
|
||||
public ResponseEntity<Message<StatusPageOrg>> queryStatusPageOrg() {
|
||||
@@ -66,35 +71,35 @@ public class StatusPageController {
|
||||
StatusPageOrg org = statusPageService.saveStatusPageOrg(statusPageOrg);
|
||||
return ResponseEntity.ok(Message.success(org));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/component")
|
||||
@Operation(summary = "Query Status Page Components")
|
||||
public ResponseEntity<Message<List<StatusPageComponent>>> queryStatusPageComponent() {
|
||||
List<StatusPageComponent> statusPageComponents = statusPageService.queryStatusPageComponents();
|
||||
return ResponseEntity.ok(Message.success(statusPageComponents));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/component")
|
||||
@Operation(summary = "Save Status Page Component")
|
||||
public ResponseEntity<Message<Void>> newStatusPageComponent(@Valid @RequestBody StatusPageComponent statusPageComponent) {
|
||||
statusPageService.newStatusPageComponent(statusPageComponent);
|
||||
return ResponseEntity.ok(Message.success("Add success"));
|
||||
}
|
||||
|
||||
|
||||
@PutMapping("/component")
|
||||
@Operation(summary = "Update Status Page Component")
|
||||
public ResponseEntity<Message<Void>> updateStatusPageComponent(@Valid @RequestBody StatusPageComponent statusPageComponent) {
|
||||
statusPageService.updateStatusPageComponent(statusPageComponent);
|
||||
return ResponseEntity.ok(Message.success("Update success"));
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping("/component/{id}")
|
||||
@Operation(summary = "Delete Status Page Component")
|
||||
public ResponseEntity<Message<Void>> deleteStatusPageComponent(@PathVariable("id") final long id) {
|
||||
statusPageService.deleteStatusPageComponent(id);
|
||||
return ResponseEntity.ok(Message.success("Delete success"));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/component/{id}")
|
||||
@Operation(summary = "Query Status Page Component")
|
||||
public ResponseEntity<Message<StatusPageComponent>> queryStatusPageComponent(@PathVariable("id") final long id) {
|
||||
@@ -132,8 +137,13 @@ public class StatusPageController {
|
||||
|
||||
@GetMapping("/incident")
|
||||
@Operation(summary = "Query Status Page Incidents")
|
||||
public ResponseEntity<Message<List<StatusPageIncident>>> queryStatusPageIncident() {
|
||||
List<StatusPageIncident> incidents = statusPageService.queryStatusPageIncidents();
|
||||
public ResponseEntity<Message<Page<StatusPageIncident>>> queryStatusPageIncident(
|
||||
@Parameter(description = "Search-Target", example = "x") @RequestParam(required = false) String search,
|
||||
@Parameter(description = "Start Time", example = "1756384301907") @RequestParam(required = false) Long startTime,
|
||||
@Parameter(description = "End Time", example = "1756384301907") @RequestParam(required = false) Long endTime,
|
||||
@Parameter(description = "List current page", example = "0") @RequestParam(defaultValue = "0") int pageIndex,
|
||||
@Parameter(description = "Number of list pages", example = "8") @RequestParam(defaultValue = "8") int pageSize) {
|
||||
Page<StatusPageIncident> incidents = statusPageService.queryStatusPageIncidents(search, startTime, endTime, pageIndex, pageSize);
|
||||
return ResponseEntity.ok(Message.success(incidents));
|
||||
}
|
||||
}
|
||||
|
||||
+15
-5
@@ -17,10 +17,14 @@
|
||||
|
||||
package org.apache.hertzbeat.manager.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import org.springframework.data.domain.Page;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.hertzbeat.common.constants.CommonConstants;
|
||||
import org.apache.hertzbeat.common.entity.dto.Message;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageIncident;
|
||||
@@ -32,6 +36,7 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
@@ -44,7 +49,7 @@ public class StatusPagePublicController {
|
||||
|
||||
@Autowired
|
||||
private StatusPageService statusPageService;
|
||||
|
||||
|
||||
@GetMapping("/org")
|
||||
@Operation(summary = "Query Status Page Organization")
|
||||
public ResponseEntity<Message<StatusPageOrg>> queryStatusPageOrg() {
|
||||
@@ -54,14 +59,14 @@ public class StatusPagePublicController {
|
||||
}
|
||||
return ResponseEntity.ok(Message.success(statusPageOrg));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/component")
|
||||
@Operation(summary = "Query Status Page Components")
|
||||
public ResponseEntity<Message<List<ComponentStatus>>> queryStatusPageComponent() {
|
||||
List<ComponentStatus> componentStatusList = statusPageService.queryComponentsStatus();
|
||||
return ResponseEntity.ok(Message.success(componentStatusList));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/component/{id}")
|
||||
@Operation(summary = "Query Status Page Component")
|
||||
public ResponseEntity<Message<ComponentStatus>> queryStatusPageComponent(@PathVariable("id") final long id) {
|
||||
@@ -71,8 +76,13 @@ public class StatusPagePublicController {
|
||||
|
||||
@GetMapping("/incident")
|
||||
@Operation(summary = "Query Status Page Incidents")
|
||||
public ResponseEntity<Message<List<StatusPageIncident>>> queryStatusPageIncident() {
|
||||
List<StatusPageIncident> incidents = statusPageService.queryStatusPageIncidents();
|
||||
public ResponseEntity<Message<Page<StatusPageIncident>>> queryStatusPageIncident(
|
||||
@Parameter(description = "Search-Target", example = "x") @RequestParam(required = false) String search,
|
||||
@Parameter(description = "Start Time", example = "1756384301907") @RequestParam(required = false) Long startTime,
|
||||
@Parameter(description = "End Time", example = "1756384301907") @RequestParam(required = false) Long endTime,
|
||||
@Parameter(description = "List current page", example = "0") @RequestParam(defaultValue = "0") int pageIndex,
|
||||
@Parameter(description = "Number of list pages", example = "10") @RequestParam(defaultValue = "10") int pageSize) {
|
||||
Page<StatusPageIncident> incidents = statusPageService.queryStatusPageIncidents(search, startTime, endTime, pageIndex, pageSize);
|
||||
return ResponseEntity.ok(Message.success(incidents));
|
||||
}
|
||||
}
|
||||
|
||||
+31
-10
@@ -18,10 +18,12 @@
|
||||
package org.apache.hertzbeat.manager.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageComponent;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageIncident;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageOrg;
|
||||
import org.apache.hertzbeat.manager.pojo.dto.ComponentStatus;
|
||||
import org.springframework.data.domain.Page;
|
||||
|
||||
/**
|
||||
* status page service interface.
|
||||
@@ -30,42 +32,49 @@ public interface StatusPageService {
|
||||
|
||||
/**
|
||||
* query status page organization.
|
||||
*
|
||||
* @return status page organization
|
||||
*/
|
||||
StatusPageOrg queryStatusPageOrg();
|
||||
|
||||
/**
|
||||
* save status page organization.
|
||||
*
|
||||
* @return status page organization
|
||||
*/
|
||||
StatusPageOrg saveStatusPageOrg(StatusPageOrg statusPageOrg);
|
||||
|
||||
|
||||
/**
|
||||
* query status page components.
|
||||
*
|
||||
* @return status page components
|
||||
*/
|
||||
List<StatusPageComponent> queryStatusPageComponents();
|
||||
|
||||
|
||||
/**
|
||||
* save status page component.
|
||||
*
|
||||
* @param statusPageComponent status page component
|
||||
*/
|
||||
void newStatusPageComponent(StatusPageComponent statusPageComponent);
|
||||
|
||||
|
||||
/**
|
||||
* update status page component.
|
||||
*
|
||||
* @param statusPageComponent status page component
|
||||
*/
|
||||
void updateStatusPageComponent(StatusPageComponent statusPageComponent);
|
||||
|
||||
/**
|
||||
* delete status page component.
|
||||
*
|
||||
* @param id status page component id
|
||||
*/
|
||||
void deleteStatusPageComponent(long id);
|
||||
|
||||
/**
|
||||
* query status page component.
|
||||
*
|
||||
* @param id status page component id
|
||||
* @return status page component
|
||||
*/
|
||||
@@ -73,44 +82,56 @@ public interface StatusPageService {
|
||||
|
||||
/**
|
||||
* query status page components status.
|
||||
*
|
||||
* @return status page components status
|
||||
*/
|
||||
List<ComponentStatus> queryComponentsStatus();
|
||||
|
||||
/**
|
||||
* query status page component status.
|
||||
*
|
||||
* @param id status page component id
|
||||
* @return status page component status
|
||||
*/
|
||||
ComponentStatus queryComponentStatus(long id);
|
||||
|
||||
|
||||
/**
|
||||
* query status page incidents.
|
||||
* @return status page incidents
|
||||
*
|
||||
* @param search Search Target
|
||||
* @param startTime Start Time
|
||||
* @param endTime End Time
|
||||
* @param pageIndex List current page
|
||||
* @param pageSize Number of list pages
|
||||
* @return The query results
|
||||
*/
|
||||
List<StatusPageIncident> queryStatusPageIncidents();
|
||||
|
||||
Page<StatusPageIncident> queryStatusPageIncidents(String search, Long startTime, Long endTime, int pageIndex, int pageSize);
|
||||
|
||||
/**
|
||||
* query status page incident.
|
||||
*
|
||||
* @param id status page incident id
|
||||
* @return status page incident
|
||||
*/
|
||||
StatusPageIncident queryStatusPageIncident(long id);
|
||||
|
||||
|
||||
/**
|
||||
* save status page incident.
|
||||
*
|
||||
* @param statusPageIncident status page incident
|
||||
*/
|
||||
void newStatusPageIncident(StatusPageIncident statusPageIncident);
|
||||
|
||||
|
||||
/**
|
||||
* update status page incident.
|
||||
*
|
||||
* @param statusPageIncident status page incident
|
||||
*/
|
||||
void updateStatusPageIncident(StatusPageIncident statusPageIncident);
|
||||
|
||||
|
||||
/**
|
||||
* delete status page incident.
|
||||
*
|
||||
* @param id status page incident id
|
||||
*/
|
||||
void deleteStatusPageIncident(long id);
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ public class AppServiceImpl implements AppService, InitializingBean {
|
||||
var name = job.getName();
|
||||
var i18nName = CommonUtil.getLangMappingValueFromI18nMap(lang, name);
|
||||
if (i18nName != null) {
|
||||
i18nMap.put("monitor.app." + job.getApp().toLowerCase(), i18nName);
|
||||
i18nMap.put("monitor.app." + job.getApp(), i18nName);
|
||||
}
|
||||
var help = job.getHelp();
|
||||
var i18nHelp = CommonUtil.getLangMappingValueFromI18nMap(lang, help);
|
||||
|
||||
+28
-2
@@ -21,9 +21,12 @@ import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import jakarta.persistence.criteria.Predicate;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.hertzbeat.common.constants.CommonConstants;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageComponent;
|
||||
@@ -40,8 +43,12 @@ import org.apache.hertzbeat.manager.dao.StatusPageOrgDao;
|
||||
import org.apache.hertzbeat.manager.pojo.dto.ComponentStatus;
|
||||
import org.apache.hertzbeat.manager.service.StatusPageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* status page service implement.
|
||||
@@ -257,9 +264,28 @@ public class StatusPageServiceImpl implements StatusPageService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StatusPageIncident> queryStatusPageIncidents() {
|
||||
public Page<StatusPageIncident> queryStatusPageIncidents(String search, Long startTime, Long endTime, int pageIndex, int pageSize) {
|
||||
// build search condition
|
||||
Specification<StatusPageIncident> specification = (root, query, criteriaBuilder) -> {
|
||||
List<Predicate> andList = new ArrayList<>();
|
||||
if (StringUtils.hasText(search)) {
|
||||
Predicate predicateName = criteriaBuilder.like(criteriaBuilder.lower(root.get("name")), "%" + search.toLowerCase() + "%");
|
||||
andList.add(predicateName);
|
||||
}
|
||||
if (startTime != null) {
|
||||
andList.add(criteriaBuilder.greaterThanOrEqualTo(root.get("startTime"), startTime));
|
||||
}
|
||||
if (endTime != null) {
|
||||
andList.add(criteriaBuilder.lessThanOrEqualTo(root.get("endTime"), endTime));
|
||||
}
|
||||
|
||||
Predicate[] predicates = new Predicate[andList.size()];
|
||||
return criteriaBuilder.and(andList.toArray(predicates));
|
||||
};
|
||||
|
||||
Sort sort = Sort.by(Sort.Direction.DESC, "startTime");
|
||||
return statusPageIncidentDao.findAll(sort);
|
||||
PageRequest pageRequest = PageRequest.of(pageIndex, pageSize, sort);
|
||||
return statusPageIncidentDao.findAll(specification, pageRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,6 +19,33 @@ 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:
|
||||
@@ -38,6 +65,7 @@ spring:
|
||||
max-file-size: 100MB
|
||||
max-request-size: 100MB
|
||||
|
||||
|
||||
management:
|
||||
health:
|
||||
mail:
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
-- or more contributor license agreements. See the NOTICE file
|
||||
-- distributed with this work for additional information
|
||||
-- regarding copyright ownership. The ASF licenses this file
|
||||
-- to you under the Apache License, Version 2.0 (the
|
||||
-- "License"); you may not use this file except in compliance
|
||||
-- with the License. You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing,
|
||||
-- software distributed under the License is distributed on an
|
||||
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
-- KIND, either express or implied. See the License for the
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
-- ensure every sql can rerun without error
|
||||
|
||||
-- Modify message column to TEXT (H2 TEXT is equivalent to CLOB)
|
||||
ALTER TABLE HZB_STATUS_PAGE_INCIDENT_CONTENT ALTER COLUMN message CLOB;
|
||||
@@ -0,0 +1,52 @@
|
||||
-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
-- or more contributor license agreements. See the NOTICE file
|
||||
-- distributed with this work for additional information
|
||||
-- regarding copyright ownership. The ASF licenses this file
|
||||
-- to you under the Apache License, Version 2.0 (the
|
||||
-- "License"); you may not use this file except in compliance
|
||||
-- with the License. You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing,
|
||||
-- software distributed under the License is distributed on an
|
||||
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
-- KIND, either express or implied. See the License for the
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
-- ensure every sql can rerun without error
|
||||
|
||||
-- Modify hzb_status_page_incident_content table columns to TEXT type to resolve MySQL row size limit issue
|
||||
|
||||
DELIMITER //
|
||||
CREATE PROCEDURE ModifyStatusIncidentContentColumns()
|
||||
BEGIN
|
||||
DECLARE table_exists INT;
|
||||
DECLARE col_exists INT;
|
||||
|
||||
-- Check if the table exists
|
||||
SELECT COUNT(*) INTO table_exists
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'HZB_STATUS_PAGE_INCIDENT_CONTENT';
|
||||
|
||||
IF table_exists = 1 THEN
|
||||
-- Check and modify message column to TEXT
|
||||
SELECT COUNT(*) INTO col_exists
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'HZB_STATUS_PAGE_INCIDENT_CONTENT'
|
||||
AND COLUMN_NAME = 'message'
|
||||
AND DATA_TYPE != 'text';
|
||||
|
||||
IF col_exists = 1 THEN
|
||||
ALTER TABLE HZB_STATUS_PAGE_INCIDENT_CONTENT MODIFY COLUMN message TEXT;
|
||||
END IF;
|
||||
END IF;
|
||||
END //
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
CALL ModifyStatusIncidentContentColumns();
|
||||
DROP PROCEDURE IF EXISTS ModifyStatusIncidentContentColumns;
|
||||
COMMIT;
|
||||
@@ -0,0 +1,23 @@
|
||||
-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
-- or more contributor license agreements. See the NOTICE file
|
||||
-- distributed with this work for additional information
|
||||
-- regarding copyright ownership. The ASF licenses this file
|
||||
-- to you under the Apache License, Version 2.0 (the
|
||||
-- "License"); you may not use this file except in compliance
|
||||
-- with the License. You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing,
|
||||
-- software distributed under the License is distributed on an
|
||||
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
-- KIND, either express or implied. See the License for the
|
||||
-- specific language governing permissions and limitations
|
||||
-- under the License.
|
||||
|
||||
-- ensure every sql can rerun without error
|
||||
|
||||
-- Modify message column to TEXT
|
||||
ALTER TABLE HZB_STATUS_PAGE_INCIDENT_CONTENT ALTER COLUMN message TYPE TEXT;
|
||||
|
||||
commit;
|
||||
@@ -0,0 +1,619 @@
|
||||
# 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 category:service-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 DolphinScheduler(v3.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]'
|
||||
@@ -490,7 +490,7 @@ metrics:
|
||||
zh-CN: 次数
|
||||
en-US: Num
|
||||
ja-JP: 数量
|
||||
- field: size
|
||||
- field: Size
|
||||
type: 0
|
||||
unit: B
|
||||
i18n:
|
||||
|
||||
@@ -62,6 +62,7 @@ params:
|
||||
type: number
|
||||
required: false
|
||||
hide: true
|
||||
defaultValue: 6000
|
||||
- field: authType
|
||||
name:
|
||||
zh-CN: 认证方式
|
||||
@@ -125,7 +126,7 @@ metrics:
|
||||
zh-CN: 状态
|
||||
en-US: Status
|
||||
ja-JP: ステータス
|
||||
- field: size
|
||||
- field: Size
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 数量
|
||||
@@ -137,6 +138,18 @@ metrics:
|
||||
zh-CN: 可用数量
|
||||
en-US: Available Size
|
||||
ja-JP: 利用可能なサイズ
|
||||
aliasFields:
|
||||
- $.app
|
||||
- $.category
|
||||
- $.status
|
||||
- $.size
|
||||
- $.availableSize
|
||||
calculates:
|
||||
- app=$.app
|
||||
- category=$.category
|
||||
- status=$.status
|
||||
- Size=$.size
|
||||
- availableSize=$.availableSize
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk, we use HTTP protocol here
|
||||
protocol: http
|
||||
# the config content when protocol is http
|
||||
@@ -228,7 +241,7 @@ metrics:
|
||||
priority: 1
|
||||
fields:
|
||||
- field: state
|
||||
type: 2
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 状态
|
||||
en-US: State
|
||||
|
||||
@@ -160,7 +160,7 @@ metrics:
|
||||
zh-CN: 状态
|
||||
en-US: Status
|
||||
ja-JP: ステータス
|
||||
- field: size
|
||||
- field: Size
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 数量
|
||||
@@ -172,6 +172,18 @@ metrics:
|
||||
zh-CN: 可用数量
|
||||
en-US: Available Size
|
||||
ja-JP: 利用可能なサイズ
|
||||
aliasFields:
|
||||
- $.app
|
||||
- $.category
|
||||
- $.status
|
||||
- $.size
|
||||
- $.availableSize
|
||||
calculates:
|
||||
- app=$.app
|
||||
- category=$.category
|
||||
- status=$.status
|
||||
- Size=$.size
|
||||
- availableSize=$.availableSize
|
||||
protocol: http
|
||||
http:
|
||||
host: ^_^host^_^
|
||||
|
||||
@@ -26,7 +26,7 @@ help:
|
||||
zh-CN: Hertzbeat 使用 Prometheus PromQL 从 Prometheus 服务器中查询到 InfluxDB 的通用指标数据来进行监控。此方案适用于 Prometheus 已监控 InfluxDB,需要从 Prometheus 服务器抓取 InfluxDB 的监控数据。<br>您可以点击 “<i>新建 InfluxDB-PromQL</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: HertzBeat uses Prometheus PromQL query metrics data from Prometheus Server to monitoring InfluxDB. This solution is suitable for Prometheus to monitor InfluxDB, and it need to capture InfluxDB monitoring data from the Prometheus server. <br>You could click the "<i>New InfluxDB-PromQL</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
|
||||
zh-TW: Hertzbeat 使用 Prometheus PromQL 從 Prometheus 服務器中查詢到 InfluxDB 的通用指標數據來進行監控。此方案適用于 Prometheus 已監控 InfluxDB,需要從 Prometheus 服務器抓取 InfluxDB 的監控數據。<br>您可以點擊 “<i>新建 InfluxDB-PromQL</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
|
||||
ja-JP: Hertzbeat は Prometheus PromQL を介して Prometheus サーバーに InfluxDB の一般的なパフォーマンスのメトリクスをクエリして監視します。このシナリオは、PrometheusがすでにInfluxDBを監視しており、PrometheusサーバーからInfluxDBの監視データを取得する必要がある場合に適用されます。。<br>「<i>新規 InfluxDB-PromQL</i>」をクリックして設定しましょう。
|
||||
ja-JP: Hertzbeat は Prometheus PromQL を介して Prometheus サーバーに InfluxDB の一般的なパフォーマンスのメトリクスをクエリして監視します。このシナリオは、PrometheusがすでにInfluxDBを監視しており、PrometheusサーバーからInfluxDBの監視データを取得する必要がある場合に適用されます。<br>「<i>新規 InfluxDB-PromQL</i>」をクリックして設定しましょう。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/influxdb_promql
|
||||
en-US: https://hertzbeat.apache.org/docs/help/influxdb_promql
|
||||
|
||||
@@ -26,7 +26,7 @@ help:
|
||||
zh-CN: Hertzbeat 使用 Prometheus PromQL 从 Prometheus 服务器中查询到 Kafka 的通用指标数据来进行监控。此方案适用于 Prometheus 已监控 Kafka,需要从 Prometheus 服务器抓取 Kafka 的监控数据。<br>您可以点击 “<i>新建 Kafka-PromQL</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: HertzBeat uses Prometheus PromQL query metrics data from Prometheus Server to monitoring Kafka. This solution is suitable for Prometheus to monitor Kafka, and it need to capture Kafka monitoring data from the Prometheus server. <br>You could click the "<i>New Kafka-PromQL</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
|
||||
zh-TW: Hertzbeat 使用 Prometheus PromQL 從 Prometheus 服務器中查詢到 Kafka 的通用指標數據來進行監控。此方案適用于 Prometheus 已監控 Kafka,需要從 Prometheus 服務器抓取 Kafka 的監控數據。<br>您可以點擊 “<i>新建 Kafka-PromQL</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
|
||||
ja-JP: Hertzbeat は Prometheus PromQL を介して Prometheus サーバーに Kafka の一般的なパフォーマンスのメトリクスをクエリして監視します。このシナリオは、PrometheusがすでにKafkaを監視しており、PrometheusサーバーからKafkaの監視データを取得する必要がある場合に適用されます。。<br>「<i>新規 Kafka-PromQL</i>」をクリックして設定しましょう。
|
||||
ja-JP: Hertzbeat は Prometheus PromQL を介して Prometheus サーバーに Kafka の一般的なパフォーマンスのメトリクスをクエリして監視します。このシナリオは、PrometheusがすでにKafkaを監視しており、PrometheusサーバーからKafkaの監視データを取得する必要がある場合に適用されます。<br>「<i>新規 Kafka-PromQL</i>」をクリックして設定しましょう。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/kafka_promql
|
||||
en-US: https://hertzbeat.apache.org/docs/help/kafka_promql
|
||||
|
||||
@@ -490,7 +490,7 @@ metrics:
|
||||
zh-CN: 次数
|
||||
en-US: Num
|
||||
ja-JP: 数量
|
||||
- field: size
|
||||
- field: Size
|
||||
type: 0
|
||||
unit: B
|
||||
i18n:
|
||||
|
||||
@@ -0,0 +1,750 @@
|
||||
# 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 category:service-application service monitoring db-database monitoring custom-custom monitoring os-operating system monitoring
|
||||
category: os
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: macos
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: macOS
|
||||
en-US: macOS
|
||||
ja-JP: macOS
|
||||
# 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> 对 macOS 操作系统的通用性能指标 (系统信息、CPU、内存、磁盘、网卡、文件系统、TOP资源进程等) 进行采集监控。<br>您可以点击“<i>新建 macOS</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 macOS 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 macOS</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> 對 macOS 操作系统的通用性能指標 (系統信息、CPU、內存、磁盤、網卡、文件系統、TOP資源進程等) 進行採集監控。<br>您可以點擊“<i>新建 macOS</i>”並配置HOST端口賬戶等相關參數進行添加,支持SSH賬戶密碼或密鑰認證。或者選擇“<i>更多操作</i>”,導入已有配寘。
|
||||
ja-JP: Hertzbeat は <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSHプロトコルを介して</a> macOS システムの一般的なパフォーマンスのメトリクスを監視します。<br>「<i>新規 macOS</i>」をクリックしてホストなどのパラメタを設定した後、新規することができます。SSHまたはキー認証をサポートします。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/macos/
|
||||
en-US: https://hertzbeat.apache.org/docs/help/macos/
|
||||
# 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: 22
|
||||
# field-param field key
|
||||
- field: timeout
|
||||
# name-param field display i18n name
|
||||
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
|
||||
range: '[400,200000]'
|
||||
# required-true or false
|
||||
required: false
|
||||
# default value
|
||||
defaultValue: 6000
|
||||
# field-param field key
|
||||
- field: reuseConnection
|
||||
# name-param field display i18n name
|
||||
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
|
||||
required: true
|
||||
defaultValue: true
|
||||
# field-param field key
|
||||
- field: useProxy
|
||||
# name-param field display i18n name
|
||||
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
|
||||
required: true
|
||||
defaultValue: false
|
||||
# field-param field key
|
||||
- field: username
|
||||
# name-param field display i18n name
|
||||
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
|
||||
limit: 50
|
||||
# required-true or false
|
||||
required: true
|
||||
# field-param field key
|
||||
- field: password
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
ja-JP: パスワード
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
required: false
|
||||
# field-param field key
|
||||
- field: privateKey
|
||||
# name-param field display i18n name
|
||||
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-----
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# field-param field key
|
||||
- field: privateKeyPassphrase
|
||||
# name-param field display i18n name
|
||||
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
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# field-param field key
|
||||
- field: proxyHost
|
||||
# name-param field display i18n name
|
||||
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
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
- field: proxyPort
|
||||
# name-param field display i18n name
|
||||
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
|
||||
range: '[0,65535]'
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# default value
|
||||
defaultValue: 22
|
||||
# field-param field key
|
||||
- field: proxyUsername
|
||||
# name-param field display i18n name
|
||||
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
|
||||
limit: 50
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# field-param field key
|
||||
- field: proxyPassword
|
||||
# name-param field display i18n name
|
||||
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
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# field-param field key
|
||||
- field: proxyPrivateKey
|
||||
# name-param field display i18n name
|
||||
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-----
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide param-true or false
|
||||
hide: true
|
||||
# collect metrics config list
|
||||
metrics:
|
||||
# metrics - basic, inner monitoring metrics (responseTime - response time)
|
||||
- name: basic
|
||||
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
|
||||
# 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: hostname
|
||||
type: 1
|
||||
label: true
|
||||
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
|
||||
ssh:
|
||||
# ssh host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# ssh port
|
||||
port: ^_^port^_^
|
||||
# ssh username
|
||||
username: ^_^username^_^
|
||||
# ssh password
|
||||
password: ^_^password^_^
|
||||
# ssh private key
|
||||
privateKey: ^_^privateKey^_^
|
||||
# ssh private key passphrase
|
||||
privateKeyPassphrase: ^_^privateKeyPassphrase^_^
|
||||
timeout: ^_^timeout^_^
|
||||
reuseConnection: ^_^reuseConnection^_^
|
||||
# whether to use proxy server for ssh connection
|
||||
useProxy: ^_^useProxy^_^
|
||||
# ssh proxy host: ipv4 domain
|
||||
proxyHost: ^_^proxyHost^_^
|
||||
# ssh proxy port
|
||||
proxyPort: ^_^proxyPort^_^
|
||||
# ssh proxy username
|
||||
proxyUsername: ^_^proxyUsername^_^
|
||||
# ssh proxy password
|
||||
proxyPassword: ^_^proxyPassword^_^
|
||||
# ssh proxy private key
|
||||
proxyPrivateKey: ^_^proxyPrivateKey^_^
|
||||
# ssh run collect script
|
||||
script: scutil --get ComputerName; echo "$(sw_vers -productName) $(sw_vers -productVersion) ($(sw_vers -buildVersion))"; uptime| awk '{print $1,$2,$3,$4}' | sed 's/,//'
|
||||
# ssh response data parse type: oneRow, multiRow
|
||||
parseType: oneRow
|
||||
|
||||
- name: cpu
|
||||
i18n:
|
||||
zh-CN: CPU 信息
|
||||
en-US: CPU Info
|
||||
ja-JP: CPU情報
|
||||
priority: 1
|
||||
fields:
|
||||
- field: info
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 型号
|
||||
en-US: Info
|
||||
ja-JP: バージョン
|
||||
- field: cores
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 核数
|
||||
en-US: Cores
|
||||
ja-JP: コア数
|
||||
- field: load
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 负载
|
||||
en-US: Load
|
||||
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
|
||||
- cores
|
||||
- load
|
||||
- idle
|
||||
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
|
||||
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
|
||||
calculates:
|
||||
- info=info
|
||||
- cores=cores
|
||||
- load=load
|
||||
- usage=idle
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
privateKey: ^_^privateKey^_^
|
||||
privateKeyPassphrase: ^_^privateKeyPassphrase^_^
|
||||
timeout: ^_^timeout^_^
|
||||
reuseConnection: ^_^reuseConnection^_^
|
||||
# whether to use proxy server for ssh connection
|
||||
useProxy: ^_^useProxy^_^
|
||||
# ssh proxy host: ipv4 domain
|
||||
proxyHost: ^_^proxyHost^_^
|
||||
# ssh proxy port
|
||||
proxyPort: ^_^proxyPort^_^
|
||||
# ssh proxy username
|
||||
proxyUsername: ^_^proxyUsername^_^
|
||||
# ssh proxy password
|
||||
proxyPassword: ^_^proxyPassword^_^
|
||||
# ssh proxy private key
|
||||
proxyPrivateKey: ^_^proxyPrivateKey^_^
|
||||
script: sysctl -n machdep.cpu.brand_string; sysctl -n hw.ncpu; sysctl -n vm.loadavg | awk '{print $2,$3,$4}'; top -l 1 | grep 'CPU usage' | awk '{print $3}' | sed 's/%//'
|
||||
parseType: oneRow
|
||||
|
||||
- name: memory
|
||||
i18n:
|
||||
zh-CN: 内存信息
|
||||
en-US: Memory Info
|
||||
ja-JP: メモリ情報
|
||||
priority: 2
|
||||
fields:
|
||||
- field: total
|
||||
type: 1
|
||||
unit: Mb
|
||||
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
|
||||
- free
|
||||
- buff_cache
|
||||
- available
|
||||
calculates:
|
||||
- total=total
|
||||
- used=used
|
||||
- free=free
|
||||
- buff_cache=buff_cache
|
||||
- available=available
|
||||
- usage=(used / total) * 100
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
privateKey: ^_^privateKey^_^
|
||||
privateKeyPassphrase: ^_^privateKeyPassphrase^_^
|
||||
timeout: ^_^timeout^_^
|
||||
reuseConnection: ^_^reuseConnection^_^
|
||||
# whether to use proxy server for ssh connection
|
||||
useProxy: ^_^useProxy^_^
|
||||
# ssh proxy host: ipv4 domain
|
||||
proxyHost: ^_^proxyHost^_^
|
||||
# ssh proxy port
|
||||
proxyPort: ^_^proxyPort^_^
|
||||
# ssh proxy username
|
||||
proxyUsername: ^_^proxyUsername^_^
|
||||
# ssh proxy password
|
||||
proxyPassword: ^_^proxyPassword^_^
|
||||
# ssh proxy private key
|
||||
proxyPrivateKey: ^_^proxyPrivateKey^_^
|
||||
script: echo "total used free buff_cache available"; vm_stat | awk 'BEGIN{cmd="sysctl -n hw.memsize";cmd|getline total;close(cmd);cmd="sysctl -n hw.pagesize";cmd|getline ps;close(cmd);total=total/1024/1024} /Pages free/{free=$3} /Pages active/{active=$3} /Pages inactive/{inactive=$3} /Pages wired/{wired=$4} /Pages occupied by compressor/{comp=$5} END{free_mb=free*ps/1024/1024;used_mb=(active+inactive+wired+comp)*ps/1024/1024;inactive_mb=inactive*ps/1024/1024;avail_mb=(free+inactive)*ps/1024/1024;printf "%.0f %.0f %.0f %.0f %.0f\n",total,used_mb,free_mb,inactive_mb,avail_mb}'
|
||||
parseType: multiRow
|
||||
|
||||
- name: disk
|
||||
i18n:
|
||||
zh-CN: 磁盘信息
|
||||
en-US: Disk Info
|
||||
ja-JP: ディスク情報
|
||||
priority: 3
|
||||
fields:
|
||||
- field: disk_num
|
||||
type: 1
|
||||
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^_^
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
privateKey: ^_^privateKey^_^
|
||||
privateKeyPassphrase: ^_^privateKeyPassphrase^_^
|
||||
timeout: ^_^timeout^_^
|
||||
reuseConnection: ^_^reuseConnection^_^
|
||||
# whether to use proxy server for ssh connection
|
||||
useProxy: ^_^useProxy^_^
|
||||
# ssh proxy host: ipv4 domain
|
||||
proxyHost: ^_^proxyHost^_^
|
||||
# ssh proxy port
|
||||
proxyPort: ^_^proxyPort^_^
|
||||
# ssh proxy username
|
||||
proxyUsername: ^_^proxyUsername^_^
|
||||
# ssh proxy password
|
||||
proxyPassword: ^_^proxyPassword^_^
|
||||
# ssh proxy private key
|
||||
proxyPrivateKey: ^_^proxyPrivateKey^_^
|
||||
script: iostat -d | awk 'NR==3{print $1}'; iostat -d | awk 'NR==3{print $2}'; vm_stat | awk '/Pages free/{print $3}' | tr -d ':'; vm_stat | awk '/Pages active/{print $3}' | tr -d ':'; sysctl -n hw.memsize | awk '{print int($1/1024/1024)}'
|
||||
parseType: oneRow
|
||||
|
||||
- name: interface
|
||||
i18n:
|
||||
zh-CN: 网卡信息
|
||||
en-US: Interface Info
|
||||
ja-JP: ネットワークカード情報
|
||||
priority: 4
|
||||
fields:
|
||||
- field: interface_name
|
||||
type: 1
|
||||
label: true
|
||||
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
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
privateKey: ^_^privateKey^_^
|
||||
privateKeyPassphrase: ^_^privateKeyPassphrase^_^
|
||||
timeout: ^_^timeout^_^
|
||||
reuseConnection: ^_^reuseConnection^_^
|
||||
# whether to use proxy server for ssh connection
|
||||
useProxy: ^_^useProxy^_^
|
||||
# ssh proxy host: ipv4 domain
|
||||
proxyHost: ^_^proxyHost^_^
|
||||
# ssh proxy port
|
||||
proxyPort: ^_^proxyPort^_^
|
||||
# ssh proxy username
|
||||
proxyUsername: ^_^proxyUsername^_^
|
||||
# ssh proxy password
|
||||
proxyPassword: ^_^proxyPassword^_^
|
||||
# ssh proxy private key
|
||||
proxyPrivateKey: ^_^proxyPrivateKey^_^
|
||||
script: netstat -ibn | awk 'NR==1{print "interface_name receive_bytes transmit_bytes"} NR>1 && $1!~/Name/ && $7~/^[0-9]+$/{print $1,$7,$10}'
|
||||
parseType: multiRow
|
||||
|
||||
- name: disk_free
|
||||
i18n:
|
||||
zh-CN: 文件系统
|
||||
en-US: Disk Free
|
||||
ja-JP: ファイルシステム
|
||||
priority: 5
|
||||
fields:
|
||||
- field: filesystem
|
||||
type: 1
|
||||
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^_^
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
privateKey: ^_^privateKey^_^
|
||||
privateKeyPassphrase: ^_^privateKeyPassphrase^_^
|
||||
timeout: ^_^timeout^_^
|
||||
reuseConnection: ^_^reuseConnection^_^
|
||||
# whether to use proxy server for ssh connection
|
||||
useProxy: ^_^useProxy^_^
|
||||
# ssh proxy host: ipv4 domain
|
||||
proxyHost: ^_^proxyHost^_^
|
||||
# ssh proxy port
|
||||
proxyPort: ^_^proxyPort^_^
|
||||
# ssh proxy username
|
||||
proxyUsername: ^_^proxyUsername^_^
|
||||
# ssh proxy password
|
||||
proxyPassword: ^_^proxyPassword^_^
|
||||
# ssh proxy private key
|
||||
proxyPrivateKey: ^_^proxyPrivateKey^_^
|
||||
script: df -m | tail -n +2 | awk 'BEGIN{ print "filesystem used available usage mounted"} {print $1,$3,$4,$5,$9}'
|
||||
parseType: multiRow
|
||||
|
||||
- name: top_cpu_process
|
||||
i18n:
|
||||
zh-CN: Top10 CPU 进程
|
||||
en-US: Top10 CPU Process
|
||||
ja-JP: トップ10 CPUプロセス
|
||||
priority: 6
|
||||
fields:
|
||||
- field: pid
|
||||
type: 1
|
||||
label: true
|
||||
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^_^
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
privateKey: ^_^privateKey^_^
|
||||
privateKeyPassphrase: ^_^privateKeyPassphrase^_^
|
||||
timeout: ^_^timeout^_^
|
||||
reuseConnection: ^_^reuseConnection^_^
|
||||
# whether to use proxy server for ssh connection
|
||||
useProxy: ^_^useProxy^_^
|
||||
# ssh proxy host: ipv4 domain
|
||||
proxyHost: ^_^proxyHost^_^
|
||||
# ssh proxy port
|
||||
proxyPort: ^_^proxyPort^_^
|
||||
# ssh proxy username
|
||||
proxyUsername: ^_^proxyUsername^_^
|
||||
# ssh proxy password
|
||||
proxyPassword: ^_^proxyPassword^_^
|
||||
# ssh proxy private key
|
||||
proxyPrivateKey: ^_^proxyPrivateKey^_^
|
||||
script: ps aux | sort -k3nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } {printf "%s %s %s ", $2, $3, $4; for (i=11; i<=NF; i++) { printf "%s", $i; if (i < NF) printf " "; } print ""}' | head -n 11
|
||||
parseType: multiRow
|
||||
|
||||
- name: top_mem_process
|
||||
i18n:
|
||||
zh-CN: Top10 内存进程
|
||||
en-US: Top10 Memory Process
|
||||
ja-JP: トップ10 メモリプロセス
|
||||
priority: 7
|
||||
fields:
|
||||
- field: pid
|
||||
type: 1
|
||||
label: true
|
||||
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^_^
|
||||
port: ^_^port^_^
|
||||
username: ^_^username^_^
|
||||
password: ^_^password^_^
|
||||
privateKey: ^_^privateKey^_^
|
||||
privateKeyPassphrase: ^_^privateKeyPassphrase^_^
|
||||
timeout: ^_^timeout^_^
|
||||
reuseConnection: ^_^reuseConnection^_^
|
||||
# whether to use proxy server for ssh connection
|
||||
useProxy: ^_^useProxy^_^
|
||||
# ssh proxy host: ipv4 domain
|
||||
proxyHost: ^_^proxyHost^_^
|
||||
# ssh proxy port
|
||||
proxyPort: ^_^proxyPort^_^
|
||||
# ssh proxy username
|
||||
proxyUsername: ^_^proxyUsername^_^
|
||||
# ssh proxy password
|
||||
proxyPassword: ^_^proxyPassword^_^
|
||||
# ssh proxy private key
|
||||
|
||||
proxyPrivateKey: ^_^proxyPrivateKey^_^
|
||||
script: ps aux | sort -k4nr | awk 'BEGIN{ print "pid cpu_usage mem_usage command" } NR>1{cmd=""; for(i=11;i<=NF;i++) cmd=cmd $i (i==NF?"":" "); printf "%s %s %s %s\n", $2, $3, $4, cmd}' | head -n 11
|
||||
parseType: multiRow
|
||||
@@ -185,7 +185,7 @@ metrics:
|
||||
# SQL Query Method:oneRow, 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,5 +832,69 @@ 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
|
||||
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"
|
||||
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,11 +21,13 @@ app: redis_sentinel
|
||||
name:
|
||||
zh-CN: Redis Sentinel
|
||||
en-US: Redis Sentinel
|
||||
ja-JP: Redis Sentinel
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: Hertzbeat 对 Redis Sentinel 的通用指标进行采集监控。<br>您可以点击 “<i>新建 Redis Cluster</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: Hertzbeat monitors Redis Database Sentinel's general performance metrics. You could click the "<i>New Redis Cluster</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
|
||||
zh-TW: Hertzbeat 對 Redis Sentinel 的通用指標進行采集監控。<br>您可以點擊 “<i>新建 Redis Cluster</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
|
||||
zh-CN: Hertzbeat 对 Redis Sentinel 的通用指标进行采集监控。<br>您可以点击 “<i>新建 Redis Sentinel</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: Hertzbeat monitors Redis Database Sentinel's general performance metrics. You could click the "<i>New Redis Sentinel</i>" button and proceed with the configuration or import an existing setup through the "<i>More Actions</i>" menu.
|
||||
zh-TW: Hertzbeat 對 Redis Sentinel 的通用指標進行采集監控。<br>您可以點擊 “<i>新建 Redis Sentinel</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
|
||||
ja-JP: Hertzbeat は Redis Sentinel の一般的なパフォーマンスのメトリクスを監視します。<br>「<i>新規 Redis Sentinel</i>」をクリックしてパラメタを設定した後、新規することができます。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/influxdb_promql
|
||||
en-US: https://hertzbeat.apache.org/docs/help/influxdb_promql
|
||||
@@ -37,6 +39,7 @@ params:
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
ja-JP: 目標ホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
@@ -46,6 +49,7 @@ params:
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -60,6 +64,7 @@ params:
|
||||
name:
|
||||
zh-CN: 查询超时时间(ms)
|
||||
en-US: Query Timeout(ms)
|
||||
ja-JP: クエリタイムアウト(ms)
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -74,6 +79,7 @@ params:
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
ja-JP: ユーザー名
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
@@ -86,6 +92,7 @@ params:
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
ja-JP: パスワード
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
@@ -96,6 +103,7 @@ params:
|
||||
name:
|
||||
zh-CN: 模式
|
||||
en-US: Pattern
|
||||
ja-JP: パターン
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# required-true or false
|
||||
@@ -108,6 +116,7 @@ params:
|
||||
name:
|
||||
zh-CN: 是否启用SSH隧道
|
||||
en-US: Enable SSH Tunnel
|
||||
ja-JP: SSHトンネルの有効化
|
||||
type: boolean
|
||||
required: true
|
||||
hide: true
|
||||
@@ -115,6 +124,7 @@ params:
|
||||
name:
|
||||
zh-CN: SSH Host
|
||||
en-US: SSH Host
|
||||
ja-JP: SSHホスト
|
||||
type: text
|
||||
required: false
|
||||
placeholder: 'When Enable SSH Tunnel'
|
||||
@@ -123,6 +133,7 @@ params:
|
||||
name:
|
||||
zh-CN: SSH端口
|
||||
en-US: SSH Port
|
||||
ja-JP: SSHポート
|
||||
type: number
|
||||
range: '[0,65535]'
|
||||
required: false
|
||||
@@ -133,6 +144,7 @@ params:
|
||||
name:
|
||||
zh-CN: SSH超时时间(ms)
|
||||
en-US: SSH Timeout(ms)
|
||||
ja-JP: SSHタイムアウト(ms)
|
||||
type: number
|
||||
required: false
|
||||
range: '[400,200000]'
|
||||
@@ -142,6 +154,7 @@ params:
|
||||
name:
|
||||
zh-CN: SSH用户名
|
||||
en-US: SSH Username
|
||||
ja-JP: SSHユーザー名
|
||||
type: text
|
||||
required: false
|
||||
placeholder: 'When Enable SSH tunnel'
|
||||
@@ -150,6 +163,7 @@ params:
|
||||
name:
|
||||
zh-CN: SSH密码
|
||||
en-US: SSH Password
|
||||
ja-JP: SSHパスワード
|
||||
type: password
|
||||
required: false
|
||||
hide: true
|
||||
@@ -157,6 +171,7 @@ params:
|
||||
name:
|
||||
zh-CN: 是否共享SSH连接
|
||||
en-US: Share SSH Connection
|
||||
ja-JP: SSH接続共有
|
||||
type: boolean
|
||||
required: true
|
||||
defaultValue: true
|
||||
@@ -165,6 +180,7 @@ params:
|
||||
name:
|
||||
zh-CN: SSH私钥
|
||||
en-US: SSH PrivateKey
|
||||
ja-JP: SSH秘密鍵
|
||||
type: textarea
|
||||
placeholder: -----BEGIN RSA PRIVATE KEY-----
|
||||
required: false
|
||||
@@ -173,6 +189,7 @@ params:
|
||||
name:
|
||||
zh-CN: SSH密钥短语
|
||||
en-US: SSH PrivateKey PassPhrase
|
||||
ja-JP: SSH秘密鍵フレーズ
|
||||
type: password
|
||||
required: false
|
||||
hide: true
|
||||
@@ -181,6 +198,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 服务器
|
||||
en-US: Server
|
||||
ja-JP: サーバー情報
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
@@ -191,121 +209,145 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 标识
|
||||
en-US: Identity
|
||||
ja-JP: ID
|
||||
- field: redis_version
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: Redis 版本
|
||||
en-US: Redis Version
|
||||
ja-JP: Redisバージョン
|
||||
- field: redis_git_sha1
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: Redis Git SHA1
|
||||
en-US: Redis Git SHA1
|
||||
ja-JP: Redis Git SHA1
|
||||
- field: redis_git_dirty
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: Redis Git Dirty
|
||||
en-US: Redis Git Dirty
|
||||
ja-JP: RedisサーバーのGitリポジトリ状態
|
||||
- field: redis_build_id
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: Redis Build ID
|
||||
en-US: Redis Build ID
|
||||
ja-JP: Redis ビルド Id
|
||||
- field: redis_mode
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: Redis 模式
|
||||
en-US: Redis Mode
|
||||
ja-JP: Redis モード
|
||||
- field: os
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 操作系统
|
||||
en-US: Operating System
|
||||
ja-JP: オーエス
|
||||
- field: arch_bits
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 架构位数
|
||||
en-US: Architecture Bits
|
||||
ja-JP: アーキテクチャ
|
||||
- field: multiplexing_api
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 多路复用 API
|
||||
en-US: Multiplexing API
|
||||
ja-JP: IO多重化API
|
||||
- field: atomicvar_api
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 原子变量 API
|
||||
en-US: Atomicvar API
|
||||
ja-JP: 原子操作API
|
||||
- field: gcc_version
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: GCC 版本
|
||||
en-US: GCC Version
|
||||
ja-JP: GCC バージョン
|
||||
- field: process_id
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 进程 ID
|
||||
en-US: Process ID
|
||||
ja-JP: プロセスID
|
||||
- field: process_supervised
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 进程监控
|
||||
en-US: Process Supervised
|
||||
ja-JP: プロセスの監視方法
|
||||
- field: run_id
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 运行 ID
|
||||
en-US: Run ID
|
||||
ja-JP: Run ID
|
||||
- field: tcp_port
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: TCP 端口
|
||||
en-US: TCP Port
|
||||
ja-JP: TCP ポート
|
||||
- field: server_time_usec
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 基于纪元的系统时间
|
||||
en-US: Server Time Usec
|
||||
ja-JP: サーバーのタイムスタンプ
|
||||
- field: uptime_in_seconds
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 运行时间(秒)
|
||||
en-US: Uptime In Seconds
|
||||
ja-JP: アップタイム(秒)
|
||||
- field: uptime_in_days
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 运行时间(天)
|
||||
en-US: Uptime In Days
|
||||
ja-JP: アップタイム(日)
|
||||
- field: hz
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 定时器频率
|
||||
en-US: Hz
|
||||
ja-JP: イベントの実行頻度
|
||||
- field: configured_hz
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 配置定时器频率
|
||||
en-US: Configured Hz
|
||||
ja-JP: 設定されたイベントの実行頻度
|
||||
- field: lru_clock
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: LRU 时钟
|
||||
en-US: LRU Clock
|
||||
ja-JP: LRU クロック
|
||||
- field: executable
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 可执行文件
|
||||
en-US: Executable
|
||||
ja-JP: サーバーの実行パス
|
||||
- field: config_file
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 配置文件
|
||||
en-US: Config File
|
||||
ja-JP: 設定されたサーバーの実行ファイル
|
||||
- field: io_threads_active
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 活动 IO 线程
|
||||
en-US: IO Threads Active
|
||||
ja-JP: 活動中のスレッド数
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: redis
|
||||
# the config content when protocol is redis
|
||||
@@ -336,6 +378,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 客户端
|
||||
en-US: Clients
|
||||
ja-JP: クライアント情報
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 1
|
||||
@@ -346,41 +389,49 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 已连接客户端
|
||||
en-US: Connected Clients
|
||||
ja-JP: 現在接続されているクライアントの数
|
||||
- field: cluster_connections
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 集群连接
|
||||
en-US: Cluster Connections
|
||||
ja-JP: クラスター内の接続数
|
||||
- field: maxclients
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最大客户端数
|
||||
en-US: Maxclients
|
||||
ja-JP: 最大クライアント数
|
||||
- field: client_recent_max_input_buffer
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 客户端最近最大输入缓冲区
|
||||
en-US: Client Recent Max Input Buffer
|
||||
ja-JP: クライアントの最近の最大入力バッファサイズ
|
||||
- field: client_recent_max_output_buffer
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 客户端最近最大输出缓冲区
|
||||
en-US: Client Recent Max Output Buffer
|
||||
ja-JP: クライアントの最近の最大出力バッファサイズ
|
||||
- field: blocked_clients
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 阻塞客户端
|
||||
en-US: Blocked Clients
|
||||
ja-JP: ブロックされたクライアント数
|
||||
- field: tracking_clients
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 跟踪客户端
|
||||
en-US: Tracking Clients
|
||||
ja-JP: トラッキングを使用するクライアントの数
|
||||
- field: clients_in_timeout_table
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 超时表中的客户端
|
||||
en-US: Clients In Timeout Table
|
||||
ja-JP: タイムアウトテーブル内のクライアント数
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: redis
|
||||
# the config content when protocol is redis
|
||||
@@ -411,6 +462,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 统计
|
||||
en-US: Stats
|
||||
ja-JP: 統計情報
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 2
|
||||
@@ -421,191 +473,229 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 收到总连接数
|
||||
en-US: Total Connections Received
|
||||
ja-JP: サーバーの起動後に受信された合計接続数
|
||||
- field: total_commands_processed
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 处理总命令数
|
||||
en-US: Total Commands Processed
|
||||
ja-JP: サーバーの起動後に処理した総コマンド数
|
||||
- field: instantaneous_ops_per_sec
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 瞬时每秒操作数
|
||||
en-US: Instantaneous Ops Per Sec
|
||||
ja-JP: 1秒当たりに処理されたコマンドの数
|
||||
- field: total_net_input_bytes
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 总网络输入字节
|
||||
en-US: Total Net Input Bytes
|
||||
ja-JP: 受信されたネットワークバイトの合計数
|
||||
- field: total_net_output_bytes
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 总网络输出字节
|
||||
en-US: Total Net Output Bytes
|
||||
ja-JP: 転送されたネットワークバイトの合計数
|
||||
- field: instantaneous_input_kbps
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 瞬时的输入 kbps
|
||||
en-US: Instantaneous Input Kbps
|
||||
ja-JP: 瞬間入力速度(kbps)
|
||||
- field: instantaneous_output_kbps
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 瞬时输出 kbps
|
||||
en-US: Instantaneous Output Kbps
|
||||
ja-JP: 瞬間出力速度(kbps)
|
||||
- field: rejected_connections
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 拒绝连接数
|
||||
en-US: Rejected Connections
|
||||
ja-JP: maxclients制限で拒否された接続数
|
||||
- field: sync_full
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 全量同步
|
||||
en-US: Sync Full
|
||||
ja-JP: 完全同期の回数
|
||||
- field: sync_partial_ok
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 部分同步成功
|
||||
en-US: Sync Partial Ok
|
||||
ja-JP: 部分同期の回数
|
||||
- field: sync_partial_err
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 部分同步失败
|
||||
en-US: Sync Partial Err
|
||||
ja-JP: 部分同期のエラー回数
|
||||
- field: expired_keys
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 过期键
|
||||
en-US: Expired Keys
|
||||
ja-JP: expireコマンドで削除されたキーの数
|
||||
- field: expired_stale_perc
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 过期key占比
|
||||
en-US: Expired Stale Perc
|
||||
ja-JP: 期限切れのステイルキーの比率
|
||||
- field: expired_time_cap_reached_count
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 达到过期时间上限计数
|
||||
en-US: Expired Time Cap Reached Count
|
||||
ja-JP: 満了時間の制限に達した回数
|
||||
- field: expire_cycle_cpu_milliseconds
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 过期周期 CPU 毫秒
|
||||
en-US: Expire Cycle CPU Milliseconds
|
||||
ja-JP: 満了サイクルでかかったCPU時間(ms)
|
||||
- field: evicted_keys
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 逐出键
|
||||
en-US: Evicted Keys
|
||||
ja-JP: メモリ不足で追放されたキーの数
|
||||
- field: keyspace_hits
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 命中键
|
||||
en-US: Keyspace Hits
|
||||
ja-JP: キースペースのヒット数
|
||||
- field: keyspace_misses
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 未命中键
|
||||
en-US: Keyspace Misses
|
||||
ja-JP: キースペースのミス数
|
||||
- field: pubsub_channels
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 发布订阅频道
|
||||
en-US: Pubsub Channels
|
||||
ja-JP: 有効になっているPub/Subチャネルに接続されているチャネルの数
|
||||
- field: pubsub_patterns
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 发布订阅模式
|
||||
en-US: Pubsub Patterns
|
||||
ja-JP: 有効になっているPub/Subパターンで接続されたパターンチャネルの数
|
||||
- field: latest_fork_usec
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最新 fork 毫秒
|
||||
en-US: Latest Fork Usec
|
||||
ja-JP: 最後のフォーク作業にかかった時間
|
||||
- field: total_forks
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 总 fork 数
|
||||
en-US: Total Forks
|
||||
ja-JP: 実行されたフォーク作業の合計数
|
||||
- field: migrate_cached_sockets
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 迁移缓存套接字
|
||||
en-US: Migrate Cached Sockets
|
||||
ja-JP: マイグレーションされたソケット数
|
||||
- field: slave_expires_tracked_keys
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 从节点过期跟踪键
|
||||
en-US: Slave Expires Tracked Keys
|
||||
ja-JP: スレーブで満了した、トラッキングされたキーの数
|
||||
- field: active_defrag_hits
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 活跃碎片整理命中
|
||||
en-US: Active Defrag Hits
|
||||
ja-JP: アクティブなデフラグ操作中に発生したヒットの数
|
||||
- field: active_defrag_misses
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 活跃碎片整理未命中
|
||||
en-US: Active Defrag Misses
|
||||
ja-JP: アクティブなデフラグ操作中に見逃したヒットの数
|
||||
- field: active_defrag_key_hits
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 活跃碎片整理键命中
|
||||
en-US: Active Defrag Key Hits
|
||||
ja-JP: デフラグ操作でヒットしたキーの数
|
||||
- field: active_defrag_key_misses
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 活跃碎片整理键未命中
|
||||
en-US: Active Defrag Key Misses
|
||||
ja-JP: デフラグ操作で見逃したキーの数
|
||||
- field: tracking_total_keys
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 跟踪键总数
|
||||
en-US: Tracking Total Keys
|
||||
ja-JP: トラッキングされたキーの合計数
|
||||
- field: tracking_total_items
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 跟踪项总数
|
||||
en-US: Tracking Total Items
|
||||
ja-JP: トラッキングされたアイテムの合計数
|
||||
- field: tracking_total_prefixes
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 跟踪前缀总数
|
||||
en-US: Tracking Total Prefixes
|
||||
ja-JP: トラッキングされたプレフィックスの合計数
|
||||
- field: unexpected_error_replies
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 意外错误回复
|
||||
en-US: Unexpected Error Replies
|
||||
ja-JP: 予期しないエラー応答の数
|
||||
- field: total_error_replies
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 总错误回复
|
||||
en-US: Total Error Replies
|
||||
ja-JP: 発生したエラーの合計応答の数
|
||||
- field: dump_payload_sanitizations
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 转储有效负载深度完整性验证的总数
|
||||
en-US: Dump Payload Sanitizations
|
||||
ja-JP: ダンプペイロードで実行された整理作業の数
|
||||
- field: total_reads_processed
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 总读取处理
|
||||
en-US: Total Reads Processed
|
||||
ja-JP: 処理された読み取り作業の合計数
|
||||
- field: total_writes_processed
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 总写入处理
|
||||
en-US: Total Writes Processed
|
||||
ja-JP: 処理された書き込み作業の合計数
|
||||
- field: io_threaded_reads_processed
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: IO 线程读取处理
|
||||
en-US: Io Threaded Reads Processed
|
||||
ja-JP: I/Oスレッドで処理された読み取り作業の数
|
||||
- field: io_threaded_writes_processed
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: IO 线程写入处理
|
||||
en-US: Io Threaded Writes Processed
|
||||
ja-JP: I/Oスレッドで処理された書き込み作業の数
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: redis
|
||||
# the config content when protocol is redis
|
||||
@@ -636,6 +726,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: CPU
|
||||
en-US: CPU
|
||||
ja-JP: CPU情報
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 3
|
||||
@@ -646,31 +737,37 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 系统已使用 CPU
|
||||
en-US: Sys CPU Used
|
||||
ja-JP: システムモードで使用されたCPUの合計時間
|
||||
- field: used_cpu_user
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 用户已使用 CPU
|
||||
en-US: User CPU Used
|
||||
ja-JP: ユーザーモードで使用されたCPUの合計時間
|
||||
- field: used_cpu_sys_children
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: Sys 子进程已使用 CPU
|
||||
en-US: Sys Children CPU Used
|
||||
ja-JP: 子プロセスがシステムモードで使用したCPU時間
|
||||
- field: used_cpu_user_children
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 用户子进程已使用 CPU
|
||||
en-US: User Children CPU Used
|
||||
ja-JP: 子プロセスがユーザーモードで使用したCPU時間
|
||||
- field: used_cpu_sys_main_thread
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 系统主线程已使用 CPU
|
||||
en-US: Sys Main Thread CPU Used
|
||||
ja-JP: プロセスがシステムモードで使用したCPU時間
|
||||
- field: used_cpu_user_main_thread
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 用户主线程已使用 CPU
|
||||
en-US: User Main Thread CPU Used
|
||||
ja-JP: プロセスがユーザーモードで使用したCPU時間
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: redis
|
||||
# the config content when protocol is redis
|
||||
@@ -701,6 +798,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 哨兵
|
||||
en-US: Sentinel
|
||||
ja-JP: Sentinel
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 4
|
||||
@@ -711,26 +809,31 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 主节点
|
||||
en-US: Masters
|
||||
ja-JP: マスターノード
|
||||
- field: sentinel_tilt
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 倾斜
|
||||
en-US: Tilt
|
||||
ja-JP: マスターをダウン状態としてマークする前の待機時間
|
||||
- field: sentinel_running_scripts
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 运行脚本
|
||||
en-US: Running Scripts
|
||||
ja-JP: 実行するスクリプト
|
||||
- field: sentinel_scripts_queue_length
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 脚本队列长度
|
||||
en-US: Scripts Queue Length
|
||||
ja-JP: 実行するスクリプトのキューの長さ
|
||||
- field: sentinel_simulate_failure_flags
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 模拟失败标志
|
||||
en-US: Simulate Failure Flags
|
||||
ja-JP: フェイルオーバー機能をテスト用のフラグ
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: redis
|
||||
# the config content when protocol is redis
|
||||
|
||||
@@ -21,11 +21,13 @@ app: rockylinux
|
||||
name:
|
||||
zh-CN: Rocky Linux
|
||||
en-US: Rocky Linux
|
||||
ja-JP: Rocky Linux
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: Hertzbeat 使用 <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSH 协议</a> 对 Rocky 操作系统的通用性能指标 (系统信息、CPU、内存、磁盘、网卡、文件系统、TOP资源进程等) 进行采集监控。<br>您可以点击“<i>新建 Rocky</i>”并配置HOST端口账户等相关参数进行添加,支持SSH账户密码或密钥认证。或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: HertzBeat uses <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSH protocol</a> to monitors Rocky operating system's general performance metrics such as cpu, memory, disk, basic, interface, disk_free, top_process etc. <br>You can click the "<i>New Rocky</i>" and config host port and other related params to add, auth support password or secretKey. Or import an existing setup through the "<i>More Actions</i>" menu.
|
||||
zh-TW: Hertzbeat 使用 <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSH 协议</a> 對 Rocky 操作系统的通用性能指標 (系統信息、CPU、內存、磁盤、網卡、文件系統、TOP資源進程等) 進行採集監控。<br>您可以點擊“<i>新建 Rocky</i>”並配置HOST端口賬戶等相關參數進行添加,支持SSH賬戶密碼或密鑰認證。或者選擇“<i>更多操作</i>”,導入已有配寘。
|
||||
ja-JP: Hertzbeat は <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSHプロトコルを介して</a> Rockyオーエスの一般的なパフォーマンスのメトリクスを監視します。<br>「<i>新規 Rocky</i>」をクリックしてホストなどのパラメタを設定した後、新規することができます。SSHまたはキー認証をサポートします。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/rockylinux
|
||||
en-US: https://hertzbeat.apache.org/docs/help/rockylinux
|
||||
@@ -37,6 +39,7 @@ params:
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
ja-JP: 目標ホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
@@ -47,6 +50,7 @@ params:
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -61,6 +65,7 @@ params:
|
||||
name:
|
||||
zh-CN: 超时时间(ms)
|
||||
en-US: Timeout(ms)
|
||||
ja-JP: タイムアウト(ms)
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -75,6 +80,7 @@ params:
|
||||
name:
|
||||
zh-CN: 复用连接
|
||||
en-US: Reuse Connection
|
||||
ja-JP: 接続再利用
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: boolean
|
||||
# required-true or false
|
||||
@@ -86,6 +92,7 @@ params:
|
||||
name:
|
||||
zh-CN: 使用代理
|
||||
en-US: Use Proxy Connection
|
||||
ja-JP: プロキシ接続利用
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: boolean
|
||||
# required-true or false
|
||||
@@ -97,6 +104,7 @@ params:
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
ja-JP: ユーザー名
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
@@ -109,6 +117,7 @@ params:
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
ja-JP: パスワード
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
@@ -119,6 +128,7 @@ params:
|
||||
name:
|
||||
zh-CN: 私钥
|
||||
en-US: PrivateKey
|
||||
ja-JP: 秘密鍵
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: textarea
|
||||
placeholder: -----BEGIN RSA PRIVATE KEY-----
|
||||
@@ -132,6 +142,7 @@ params:
|
||||
name:
|
||||
zh-CN: 密钥短语
|
||||
en-US: PrivateKey PassPhrase
|
||||
ja-JP: 秘密鍵フレーズ
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: password
|
||||
# required-true or false
|
||||
@@ -144,6 +155,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理主机
|
||||
en-US: Proxy Host
|
||||
ja-JP: プロキシホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# required-true or false
|
||||
@@ -155,6 +167,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理端口
|
||||
en-US: Proxy Port
|
||||
ja-JP: プロキシポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -171,6 +184,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理用户名
|
||||
en-US: Proxy Username
|
||||
ja-JP: プロキシユーザー名
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
@@ -185,6 +199,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理密码
|
||||
en-US: Proxy Password
|
||||
ja-JP: プロキシパスワード
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
@@ -197,6 +212,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理主机私钥
|
||||
en-US: proxyPrivateKey
|
||||
ja-JP: プロキシ秘密鍵
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: textarea
|
||||
placeholder: -----BEGIN RSA PRIVATE KEY-----
|
||||
@@ -211,6 +227,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 系统基本信息
|
||||
en-US: Basic Info
|
||||
ja-JP: システム基礎情報
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
@@ -223,16 +240,19 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 主机名称
|
||||
en-US: Host Name
|
||||
ja-JP: ホスト名
|
||||
- field: version
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 操作系统版本
|
||||
en-US: System Version
|
||||
ja-JP: システムバージョン
|
||||
- field: uptime
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 启动时间
|
||||
en-US: Uptime
|
||||
ja-JP: アップタイム
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: ssh
|
||||
# the config content when protocol is ssh
|
||||
@@ -272,6 +292,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: CPU 信息
|
||||
en-US: CPU Info
|
||||
ja-JP: CPU情報
|
||||
priority: 1
|
||||
fields:
|
||||
- field: info
|
||||
@@ -279,32 +300,38 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 型号
|
||||
en-US: Info
|
||||
ja-JP: バージョン
|
||||
- field: cores
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 核数
|
||||
en-US: Cores
|
||||
ja-JP: コア数
|
||||
- field: interrupt
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 中断数
|
||||
en-US: Interrupt
|
||||
ja-JP: 割り込み数
|
||||
- field: load
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 负载
|
||||
en-US: Load
|
||||
ja-JP: ロード
|
||||
- field: context_switch
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 上下文切换
|
||||
en-US: Context Switch
|
||||
ja-JP: コンテキストスイッチ
|
||||
- field: usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 使用率
|
||||
en-US: Usage
|
||||
ja-JP: 使用率
|
||||
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
|
||||
aliasFields:
|
||||
- info
|
||||
@@ -351,6 +378,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 内存信息
|
||||
en-US: Memory Info
|
||||
ja-JP: メモリ情報
|
||||
priority: 2
|
||||
fields:
|
||||
- field: total
|
||||
@@ -359,36 +387,42 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 总内存容量
|
||||
en-US: Total Memory
|
||||
ja-JP: メモリ容量
|
||||
- field: used
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 用户程序内存量
|
||||
en-US: User Program Memory
|
||||
ja-JP: ユーザープログラムメモリ
|
||||
- field: free
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 空闲内存容量
|
||||
en-US: Free Memory
|
||||
ja-JP: 空きメモリ
|
||||
- field: buff_cache
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 缓存占用内存
|
||||
en-US: Buff Cache Memory
|
||||
ja-JP: バッファメモリ
|
||||
- field: available
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 剩余可用内存
|
||||
en-US: Available Memory
|
||||
ja-JP: 使用可能のメモリ
|
||||
- field: usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 内存使用率
|
||||
en-US: Memory Usage
|
||||
ja-JP: メモリ使用率
|
||||
aliasFields:
|
||||
- total
|
||||
- used
|
||||
@@ -431,6 +465,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 磁盘信息
|
||||
en-US: Disk Info
|
||||
ja-JP: ディスク情報
|
||||
priority: 3
|
||||
fields:
|
||||
- field: disk_num
|
||||
@@ -438,27 +473,32 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 磁盘总数
|
||||
en-US: Disk Num
|
||||
ja-JP: ディスク番号
|
||||
- field: partition_num
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 分区总数
|
||||
en-US: Partition Num
|
||||
ja-JP: パーティション
|
||||
- field: block_write
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 写磁盘块数
|
||||
en-US: Block Write
|
||||
ja-JP: 書き込みディスクブロック数
|
||||
- field: block_read
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 读磁盘块数
|
||||
en-US: Block Read
|
||||
ja-JP: 読み取りブロック数
|
||||
- field: write_rate
|
||||
type: 0
|
||||
unit: iops
|
||||
i18n:
|
||||
zh-CN: 磁盘写速率
|
||||
en-US: Write Rate
|
||||
ja-JP: ディスク書き込み速度
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
@@ -488,6 +528,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 网卡信息
|
||||
en-US: Interface Info
|
||||
ja-JP: ネットワークカード情報
|
||||
priority: 4
|
||||
fields:
|
||||
- field: interface_name
|
||||
@@ -496,18 +537,21 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 网卡名称
|
||||
en-US: Interface Name
|
||||
ja-JP: ネットワークカード名
|
||||
- field: receive_bytes
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 入站数据流量
|
||||
en-US: Receive Bytes
|
||||
ja-JP: 受信されたバイト数
|
||||
- field: transmit_bytes
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 出站数据流量
|
||||
en-US: Transmit Bytes
|
||||
ja-JP: 転送されたバイト数
|
||||
units:
|
||||
- receive_bytes=B->MB
|
||||
- transmit_bytes=B->MB
|
||||
@@ -540,6 +584,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 文件系统
|
||||
en-US: Disk Free
|
||||
ja-JP: ファイルシステム
|
||||
priority: 5
|
||||
fields:
|
||||
- field: filesystem
|
||||
@@ -547,30 +592,35 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 文件系统
|
||||
en-US: Filesystem
|
||||
ja-JP: ファイルシステム
|
||||
- field: used
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 已使用量
|
||||
en-US: Used
|
||||
ja-JP: 使用済み
|
||||
- field: available
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 可用量
|
||||
en-US: Available
|
||||
ja-JP: 使用可能
|
||||
- field: usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 使用率
|
||||
en-US: Usage
|
||||
ja-JP: 使用率
|
||||
- field: mounted
|
||||
type: 1
|
||||
label: true
|
||||
i18n:
|
||||
zh-CN: 挂载点
|
||||
en-US: Mounted
|
||||
ja-JP: マウント
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
@@ -600,6 +650,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: Top10 CPU 进程
|
||||
en-US: Top10 CPU Process
|
||||
ja-JP: トップ10 CPUプロセス
|
||||
priority: 6
|
||||
fields:
|
||||
- field: pid
|
||||
@@ -608,23 +659,27 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 进程ID
|
||||
en-US: PID
|
||||
ja-JP: プロセスID
|
||||
- field: cpu_usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: CPU占用率
|
||||
en-US: CPU Usage
|
||||
ja-JP: CPU使用率
|
||||
- field: mem_usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 内存占用率
|
||||
en-US: Memory Usage
|
||||
ja-JP: メモリ使用率
|
||||
- field: command
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 执行命令
|
||||
en-US: Command
|
||||
ja-JP: コマンド
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
@@ -654,6 +709,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: Top10 内存进程
|
||||
en-US: Top10 Memory Process
|
||||
ja-JP: トップ10 メモリプロセス
|
||||
priority: 7
|
||||
fields:
|
||||
- field: pid
|
||||
@@ -662,23 +718,27 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 进程ID
|
||||
en-US: PID
|
||||
ja-JP: プロセスID
|
||||
- field: mem_usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 内存占用率
|
||||
en-US: Memory Usage
|
||||
ja-JP: メモリ使用率
|
||||
- field: cpu_usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: CPU占用率
|
||||
en-US: CPU Usage
|
||||
ja-JP: CPU使用率
|
||||
- field: command
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 执行命令
|
||||
en-US: Command
|
||||
ja-JP: コマンド
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
|
||||
@@ -21,11 +21,13 @@ app: seatunnel
|
||||
name:
|
||||
zh-CN: Seatunnel
|
||||
en-US: Seatunnel
|
||||
ja-JP: Seatunnel
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: Hertzbeat 对 Seatunnel 通用指标进行测量监控。<br>您可以点击 “<i>新建 Seatunnel</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: Hertzbeat measures and monitors the general metrics of Seatunnel.<br>You can click on “<i>Create New Seatunnel</i>” to configure it, or select “<i>More Actions</i>” to import an existing configuration.
|
||||
zh-TW: Hertzbeat 對 Seatunnel 通用指標進行測量監控。<br>您可以點擊 “<i>新建 Seatunnel</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
|
||||
ja-JP: Hertzbeat は Seatunnelの一般的なメトリクスを監視します。<br>「<i>新規 Seatunnel</i>」をクリックしてパラメタを設定した後、新規することができます。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/seatunnel
|
||||
en-US: https://hertzbeat.apache.org/docs/help/seatunnel
|
||||
@@ -37,6 +39,7 @@ params:
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
ja-JP: 目標ホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
@@ -47,6 +50,7 @@ params:
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -61,6 +65,7 @@ params:
|
||||
name:
|
||||
zh-CN: 查询超时时间
|
||||
en-US: Query Timeout
|
||||
ja-JP: クエリタイムアウト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# required-true or false
|
||||
@@ -75,6 +80,7 @@ params:
|
||||
name:
|
||||
zh-CN: 启用HTTPS
|
||||
en-US: SSL
|
||||
ja-JP: SSL
|
||||
# type-param field type(boolean mapping the html h tag)
|
||||
type: boolean
|
||||
# required-true or false
|
||||
@@ -86,6 +92,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 集群概览
|
||||
en-US: Cluster Overview
|
||||
ja-JP: クラスター概要
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
@@ -97,48 +104,56 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 项目版本
|
||||
en-US: Project Version
|
||||
ja-JP: プロジェクトバージョン
|
||||
- field: gitCommitAbbrev
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: Git提交编号
|
||||
en-US: Git Commit Abbrev
|
||||
ja-JP: GitコミットID
|
||||
- field: totalSlot
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 总槽位数
|
||||
en-US: Total Slot
|
||||
ja-JP: スロット数
|
||||
- field: unassignedSlot
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 未分配槽位数
|
||||
en-US: Unassigned Slot
|
||||
ja-JP: 未割り当てのスロット数
|
||||
- field: runningJobs
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 运行中任务数
|
||||
en-US: Running Jobs
|
||||
ja-JP: 実行中のタスク数
|
||||
- field: finishedJobs
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 已完成任务数
|
||||
en-US: Finished Jobs
|
||||
ja-JP: 完了したタスク数
|
||||
- field: failedJobs
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 失败任务数
|
||||
en-US: Failed Jobs
|
||||
ja-JP: 失敗したタスク数
|
||||
- field: cancelledJobs
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 取消任务数
|
||||
en-US: Cancelled Jobs
|
||||
ja-JP: キャンセルされたタスク数
|
||||
- field: workers
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: Worker数
|
||||
en-US: Workers
|
||||
ja-JP: ワーカー数
|
||||
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
|
||||
# (可选)监控指标别名, 做为中间字段与采集数据字段和指标字段映射转换
|
||||
aliasFields:
|
||||
- projectVersion
|
||||
- gitCommitAbbrev
|
||||
@@ -182,6 +197,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 线程信息
|
||||
en-US: Thread Info
|
||||
ja-JP: スレッド情報
|
||||
priority: 1
|
||||
fields:
|
||||
- field: threadName
|
||||
@@ -190,21 +206,25 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 线程名称
|
||||
en-US: Thread Name
|
||||
ja-JP: スレッド名
|
||||
- field: threadId
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 线程ID
|
||||
en-US: Thread ID
|
||||
ja-JP: スレッドID
|
||||
- field: threadState
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 线程状态
|
||||
en-US: Thread State
|
||||
ja-JP: スレッド状態
|
||||
- field: stackTrace
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 堆栈信息
|
||||
en-US: Stack Trace
|
||||
ja-JP: スタックトレース
|
||||
protocol: http
|
||||
http:
|
||||
host: ^_^host^_^
|
||||
@@ -227,6 +247,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 节点监控
|
||||
en-US: Node Monitor
|
||||
ja-JP: ノード情報
|
||||
priority: 1
|
||||
fields:
|
||||
- field: isMaster
|
||||
@@ -235,241 +256,289 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 是否主节点
|
||||
en-US: Is Master
|
||||
ja-JP: マスターノード
|
||||
- field: host
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: IP地址
|
||||
en-US: IP Address
|
||||
ja-JP: IPアドレス
|
||||
- field: port
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
- field: processors
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 处理器数
|
||||
en-US: Processors
|
||||
ja-JP: プロセッサ数
|
||||
- field: physical.memory.total
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 物理内存总量
|
||||
en-US: Physical Memory Total
|
||||
ja-JP: 物理メモリ容量
|
||||
- field: physical.memory.free
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 物理内存可用
|
||||
en-US: Physical Memory Free
|
||||
ja-JP: 利用可能な物理メモリ
|
||||
- field: swap.space.total
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 交换空间总量
|
||||
en-US: Swap Space Total
|
||||
ja-JP: スワップ領域容量
|
||||
- field: swap.space.free
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 交换空间可用
|
||||
en-US: Swap Space Free
|
||||
ja-JP: 利用可能なスワップ領域
|
||||
- field: heap.memory.used
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 堆内存已用
|
||||
en-US: Heap Memory Used
|
||||
ja-JP: 使用したヒープメモリ
|
||||
- field: heap.memory.free
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 堆内存可用
|
||||
en-US: Heap Memory Free
|
||||
ja-JP: 利用可能なヒープメモリ
|
||||
- field: heap.memory.total
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 堆内存总量
|
||||
en-US: Heap Memory Total
|
||||
ja-JP: ヒープメモリ容量
|
||||
- field: heap.memory.max
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 堆内存最大
|
||||
en-US: Heap Memory Max
|
||||
ja-JP: ヒープメモリの最大値
|
||||
- field: heap.memory.used/total
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 堆内存使用率
|
||||
en-US: Heap Memory Used/Total
|
||||
ja-JP: ヒープメモリの使用率
|
||||
- field: heap.memory.used/max
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 堆内存使用率最大
|
||||
en-US: Heap Memory Used/Max
|
||||
ja-JP: ヒープメモリの使用率の最大値
|
||||
- field: minor.gc.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 小垃圾回收次数
|
||||
en-US: Minor GC Count
|
||||
ja-JP: 若い領域GC回数
|
||||
- field: minor.gc.time
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 小垃圾回收时间
|
||||
en-US: Minor GC Time
|
||||
ja-JP: 若い領域GC時間
|
||||
- field: major.gc.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 大垃圾回收次数
|
||||
en-US: Major GC Count
|
||||
ja-JP: 古い領域GC回数
|
||||
- field: major.gc.time
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 大垃圾回收时间
|
||||
en-US: Major GC Time
|
||||
ja-JP: 古い領域GC時間
|
||||
- field: load.process
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 进程负载
|
||||
en-US: Load Process
|
||||
ja-JP: プロセスロード
|
||||
- field: load.system
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 系统负载
|
||||
en-US: Load System
|
||||
ja-JP: システムロード
|
||||
- field: load.systemAverage
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 系统平均负载
|
||||
en-US: Load System Average
|
||||
ja-JP: システムの平均ロード
|
||||
- field: thread.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 线程数
|
||||
en-US: Thread Count
|
||||
ja-JP: スレッド数
|
||||
- field: thread.peakCount
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 线程峰值
|
||||
en-US: Thread Peak Count
|
||||
ja-JP: 最大スレッド数
|
||||
- field: cluster.timeDiff
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 集群时间差
|
||||
en-US: Cluster Time Diff
|
||||
ja-JP: クラスター間の時差
|
||||
- field: event.q.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 事件队列大小
|
||||
en-US: Event Queue Size
|
||||
ja-JP: イベントキューのサイズ
|
||||
- field: executor.q.async.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 异步执行队列大小
|
||||
en-US: Executor Queue Async Size
|
||||
ja-JP: 非同期実行キューのサイズ
|
||||
- field: executor.q.client.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 客户端执行队列大小
|
||||
en-US: Executor Queue Client Size
|
||||
ja-JP: クライアントが実行するキューのサイズ
|
||||
- field: executor.q.client.query.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 客户端查询队列大小
|
||||
en-US: Executor Queue Client Query Size
|
||||
ja-JP: クライアントが実行するクエリキューのサイズ
|
||||
- field: executor.q.client.blocking.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 客户端阻塞队列大小
|
||||
en-US: Executor Queue Client Blocking Size
|
||||
ja-JP: クライアントが実行するブロッキングキューのサイズ
|
||||
- field: executor.q.query.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 查询队列大小
|
||||
en-US: Executor Queue Query Size
|
||||
ja-JP: クエリキューのサイズ
|
||||
- field: executor.q.scheduled.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 定时执行队列大小
|
||||
en-US: Executor Queue Scheduled Size
|
||||
ja-JP: スケジュールされたキューのサイズ
|
||||
- field: executor.q.io.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: IO队列大小
|
||||
en-US: Executor Queue IO Size
|
||||
ja-JP: IOキューのサイズ
|
||||
- field: executor.q.system.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 系统执行队列大小
|
||||
en-US: Executor Queue System Size
|
||||
ja-JP: システムキューのサイズ
|
||||
- field: executor.q.operations.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 操作队列大小
|
||||
en-US: Executor Queue Operations Size
|
||||
ja-JP: 操作キューのサイズ
|
||||
- field: executor.q.priorityOperation.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 优先操作队列大小
|
||||
en-US: Executor Queue Priority Operation Size
|
||||
ja-JP: 優先操作キューのサイズ
|
||||
- field: operations.completed.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 完成操作次数
|
||||
en-US: Operations Completed Count
|
||||
ja-JP: 操作完了の回数
|
||||
- field: executor.q.mapLoad.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 映射加载队列大小
|
||||
en-US: Executor Queue Map Load Size
|
||||
ja-JP: Mapからロードするキューのサイズ
|
||||
- field: executor.q.mapLoadAllKeys.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 映射加载所有键大小
|
||||
en-US: Executor Queue Map Load All Keys Size
|
||||
ja-JP: Mapから全てのキーをロードするキューのサイズ
|
||||
- field: executor.q.cluster.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 集群执行队列大小
|
||||
en-US: Executor Queue Cluster Size
|
||||
ja-JP: クラスターキューのサイズ
|
||||
- field: executor.q.response.size
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 响应队列大小
|
||||
en-US: Executor Queue Response Size
|
||||
ja-JP: 応答キューのサイズ
|
||||
- field: operations.running.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 正在运行的操作数量
|
||||
en-US: Operations Running Count
|
||||
ja-JP: 実行中のキューのサイズ
|
||||
- field: operations.pending.invocations.percentage
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 待处理调用百分比
|
||||
en-US: Operations Pending Invocations Percentage
|
||||
ja-JP: 待機中の操作の比率
|
||||
- field: operations.pending.invocations.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 待处理调用数量
|
||||
en-US: Operations Pending Invocations Count
|
||||
ja-JP: 待機中の操作数
|
||||
- field: proxy.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 代理数量
|
||||
en-US: Proxy Count
|
||||
ja-JP: プロキシ数
|
||||
- field: clientEndpoint.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 客户端端点数量
|
||||
en-US: Client Endpoint Count
|
||||
ja-JP: クライアントエンドポイントの数
|
||||
- field: connection.active.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 活动连接数
|
||||
en-US: Connection Active Count
|
||||
ja-JP: アクティブな接続数
|
||||
- field: client.connection.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 客户端连接数
|
||||
en-US: Client Connection Count
|
||||
ja-JP: クライアント接続数
|
||||
- field: connection.count
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 总连接数
|
||||
en-US: Connection Count
|
||||
ja-JP: 接続総数
|
||||
protocol: http
|
||||
http:
|
||||
host: ^_^host^_^
|
||||
|
||||
@@ -19,15 +19,15 @@ category: mid
|
||||
app: spring_gateway
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: SpringGateway
|
||||
en-US: SpringGateway
|
||||
ja-JP: SpringGateway
|
||||
zh-CN: Spring Cloud Gateway
|
||||
en-US: Spring Cloud Gateway
|
||||
ja-JP: Spring Cloud Gateway
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 对 <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a> 暴露的通用性能指标(globalfilters、routefilters、refresh、routes)进行采集监控。<span class='help_module_span'>注意⚠️:如果要监控 SpringGateway 中的信息,需要您的 SpringGateway 应用集成并开启 SpringBoot Actuator, <a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>点击查看具体步骤</a>。</span>
|
||||
en-US: HertzBeat collect and monitors SpringGateway through general performance metric that exposed by the SpringBoot Actuator. <br><span class='help_module_span'><br>Note⚠️:You should make sure that your SpringGateway application have already integrated and enabled the SpringBoot Actuator, <a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>click here to see the specific steps.</a></span>
|
||||
zh-TW: HertzBeat 對 <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a>暴露的通用性能指標(globalfilters、routefilters、refresh、routes)進行採集監控。<span class='help_module_span'>注意⚠️:如果要監控SpringGateway中的指標,需要您的SpringGateway應用集成並開啟SpringBoot Actuator,<a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>點擊查看具體步驟</a>。</span>
|
||||
ja-JP: HertzBeat は <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a> の一般的なパフォーマンスのメトリクスを監視します。<span class='help_module_span'>⚠️注意:SpringGateway で SpringBoot Actuatorを有効にする必要があります。<a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>クリックしてガイドを見ます</a>。</span>
|
||||
zh-CN: HertzBeat 对 <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a> 暴露的通用性能指标(globalfilters、routefilters、refresh、routes)进行采集监控。<span class='help_module_span'>注意⚠️:如果要监控 Spring Cloud Gateway 中的信息,需要您的 Spring Cloud Gateway 应用集成并开启 SpringBoot Actuator, <a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>点击查看具体步骤</a>。</span>
|
||||
en-US: HertzBeat collect and monitors SpringGateway through general performance metric that exposed by the SpringBoot Actuator. <br><span class='help_module_span'><br>Note⚠️:You should make sure that your Spring Cloud Gateway application have already integrated and enabled the SpringBoot Actuator, <a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>click here to see the specific steps.</a></span>
|
||||
zh-TW: HertzBeat 對 <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a>暴露的通用性能指標(globalfilters、routefilters、refresh、routes)進行採集監控。<span class='help_module_span'>注意⚠️:如果要監控 Spring Cloud Gateway 中的指標,需要您的 Spring Cloud Gateway 應用集成並開啟SpringBoot Actuator,<a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>點擊查看具體步驟</a>。</span>
|
||||
ja-JP: HertzBeat は <a class='help_module_content' href='https://www.tutorialspoint.com/spring_boot/spring_boot_actuator.htm'> SpringBoot Actuator </a> の一般的なパフォーマンスのメトリクスを監視します。<span class='help_module_span'>⚠️注意:Spring Cloud Gateway で SpringBoot Actuatorを有効にする必要があります。<a class='help_module_content' href='https://cloud.spring.io/spring-cloud-gateway/multi/multi__actuator_api.html'>クリックしてガイドを見ます</a>。</span>
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/spring_gateway
|
||||
en-US: https://hertzbeat.apache.org/docs/help/spring_gateway
|
||||
@@ -284,7 +284,7 @@ metrics:
|
||||
en-US: State
|
||||
ja-JP: 状態
|
||||
label: true
|
||||
- field: size
|
||||
- field: Size
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 数量
|
||||
@@ -294,7 +294,7 @@ metrics:
|
||||
- $.measurements[?(@.statistic == "VALUE")].value
|
||||
calculates:
|
||||
- state='^o^state^o^'
|
||||
- size=$.measurements[?(@.statistic == "VALUE")].value
|
||||
- Size=$.measurements[?(@.statistic == "VALUE")].value
|
||||
protocol: http
|
||||
http:
|
||||
host: ^_^host^_^
|
||||
|
||||
@@ -0,0 +1,863 @@
|
||||
# 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 category:service-application service monitoring db-database monitoring mid-middleware custom-custom monitoring os-operating system monitoring
|
||||
category: server
|
||||
# The monitoring type eg: linux windows tomcat mysql aws...
|
||||
app: synology
|
||||
# The monitoring i18n name
|
||||
name:
|
||||
zh-CN: Synology NAS
|
||||
en-US: Synology NAS
|
||||
ja-JP: Synology NAS
|
||||
# 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-snmp'> SNMP 协议</a> 对 Synology NAS 的通用指标进行采集监控。<br><span class='help_module_span'>注意⚠️:Synology NAS 要开启 SNMP 服务,<a class='help_module_content' href='https://kb.synology.cn/zh-cn/DSM/help/DSM/AdminCenter/system_snmp'>点击查看开启步骤</a>。</span>您可以点击 “<i>新建 Synology NAS</i>” 并进行配置SNMP相关参数添加,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: HertzBeat uses <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-snmp'> SNMP Protocol</a> to monitoring Synology NAS general performance metrics. <br><span class='help_module_span'>Note⚠️:Synology NAS need enable the SNMP services <a class='help_module_content' href='https://kb.synology.com/en-global/DSM/help/DSM/AdminCenter/system_snmp'>Click here to view the specific steps.</a></span> You can click the "<i>Synology NAS</i>" button and config snmp params to add monitor 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-snmp'> SNMP 协议</a> 对 Synology NAS 的通用指标进行采集监控。<br><span class='help_module_span'>注意⚠️:Synology NAS 需要开启 SNMP 服务,<a class='help_module_content' href='https://kb.synology.com/zh-tw/DSM/help/DSM/AdminCenter/system_snmp'>点击查看开启步骤</a>。</span>您可以点击 “<i>新建 Synology NAS</i>” 并进行配置SNMP相关参数添加,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
ja-JP: Hertzbeat は <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-snmp'> SNMP プロトコルを介して</a> Synology NAS 一般的なメトリクスを監視します。<br><span class='help_module_span'>注意⚠️:Synology NAS で SNMP サービスを有効にする必要があります,<a class='help_module_content' href='https://kb.synology.com/ja-jp/DSM/help/DSM/AdminCenter/system_snmp'>クリックしてガイドを見ます</a>。<br>「<i>新規 Synology NAS</i>」をクリックしてSNMPなどのパラメタを設定した後、新規することができます。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/synology_nas
|
||||
en-US: https://hertzbeat.apache.org/docs/help/synology_nas
|
||||
# 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: 161
|
||||
# field-param field key
|
||||
- field: snmpVersion
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: SNMP 版本
|
||||
en-US: SNMP Version
|
||||
ja-JP: SNMPバージョン
|
||||
# type-param field type(radio mapping the html radio tag)
|
||||
type: radio
|
||||
# required-true or false
|
||||
required: true
|
||||
# when type is radio checkbox, use option to show optional values {name1:value1,name2:value2}
|
||||
options:
|
||||
- label: SNMPv1
|
||||
value: 0
|
||||
- label: SNMPv2c
|
||||
value: 1
|
||||
- label: SNMPv3
|
||||
value: 3
|
||||
# field-param field key
|
||||
- field: community
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: SNMP 团体字
|
||||
en-US: SNMP Community
|
||||
ja-JP: SNMPコミュニティ
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 100
|
||||
# required-true or false
|
||||
required: false
|
||||
# param field input placeholder
|
||||
placeholder: 'Snmp community for v1 v2c'
|
||||
# dependent parameter values list
|
||||
depend:
|
||||
snmpVersion:
|
||||
- 0
|
||||
- 1
|
||||
# field-param field key
|
||||
- field: username
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: SNMP username
|
||||
en-US: SNMP username
|
||||
ja-JP: SNMPユーザー名
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 50
|
||||
# required-true or false
|
||||
required: false
|
||||
# param field input placeholder
|
||||
placeholder: 'Snmp username for v3'
|
||||
# dependent parameter values list
|
||||
depend:
|
||||
snmpVersion:
|
||||
- 3
|
||||
# field-param field key
|
||||
- field: contextName
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: SNMP contextName
|
||||
en-US: SNMP contextName
|
||||
ja-JP: SNMPコンテキスト名
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 100
|
||||
# required-true or false
|
||||
required: false
|
||||
# param field input placeholder
|
||||
placeholder: 'Snmp contextName for v3'
|
||||
# dependent parameter values list
|
||||
depend:
|
||||
snmpVersion:
|
||||
- 3
|
||||
# field-param field key
|
||||
- field: authPassphrase
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: SNMP authPassword
|
||||
en-US: SNMP authPassword
|
||||
ja-JP: SNMP認証パスワード
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 100
|
||||
# required-true or false
|
||||
required: false
|
||||
# param field input placeholder
|
||||
placeholder: 'Snmp authPassword for v3'
|
||||
# dependent parameter values list
|
||||
depend:
|
||||
snmpVersion:
|
||||
- 3
|
||||
# field-param field key
|
||||
- field: authPasswordEncryption
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: authPassword 加密方式
|
||||
en-US: authPassword Encryption
|
||||
ja-JP: 認証暗号
|
||||
# type-param field type(radio mapping the html radio tag)
|
||||
type: radio
|
||||
# required-true or false
|
||||
required: false
|
||||
# when type is radio checkbox, use option to show optional values {name1:value1,name2:value2}
|
||||
options:
|
||||
- label: MD5
|
||||
value: 0
|
||||
- label: SHA1
|
||||
value: 1
|
||||
# dependent parameter values list
|
||||
depend:
|
||||
snmpVersion:
|
||||
- 3
|
||||
# field-param field key
|
||||
- field: privPassphrase
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: SNMP privPassphrase
|
||||
en-US: SNMP privPassphrase
|
||||
ja-JP: SNMPパスワードフレーズ
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
limit: 100
|
||||
# required-true or false
|
||||
required: false
|
||||
# param field input placeholder
|
||||
placeholder: 'Snmp authPassword for v3'
|
||||
# dependent parameter values list
|
||||
depend:
|
||||
snmpVersion:
|
||||
- 3
|
||||
# field-param field key
|
||||
- field: privPasswordEncryption
|
||||
# name-param field display i18n name
|
||||
name:
|
||||
zh-CN: privPassword 加密方式
|
||||
en-US: privPassword Encryption
|
||||
ja-JP: パスワードの暗号
|
||||
# type-param field type(radio mapping the html radio tag)
|
||||
type: radio
|
||||
# required-true or false
|
||||
required: false
|
||||
# when type is radio checkbox, use option to show optional values {name1:value1,name2:value2}
|
||||
options:
|
||||
- label: DES
|
||||
value: 0
|
||||
- label: AES128
|
||||
value: 1
|
||||
# dependent parameter values list
|
||||
depend:
|
||||
snmpVersion:
|
||||
- 3
|
||||
# field-param field key
|
||||
- field: timeout
|
||||
# name-param field display i18n name
|
||||
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
|
||||
range: '[0,100000]'
|
||||
# required-true or false
|
||||
required: false
|
||||
# hide-is hide this field and put it in advanced layout
|
||||
hide: true
|
||||
# default value
|
||||
defaultValue: 6000
|
||||
# collect metrics config list
|
||||
metrics:
|
||||
# metrics - system
|
||||
- name: system
|
||||
i18n:
|
||||
zh-CN: 系统
|
||||
en-US: System
|
||||
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
|
||||
fields:
|
||||
- field: modelName
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 型号
|
||||
en-US: Name
|
||||
ja-JP: モデル
|
||||
- field: serialNumber
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 序列号
|
||||
en-US: Serial Number
|
||||
ja-JP: シリアル番号
|
||||
- field: version
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: DSM 版本
|
||||
en-US: Version
|
||||
ja-JP: DSM バージョン
|
||||
- field: controllerNumber
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 控制器编号
|
||||
en-US: Number of Users
|
||||
ja-JP: コントローラー番号
|
||||
protocol: snmp
|
||||
snmp:
|
||||
# server host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# server port
|
||||
port: ^_^port^_^
|
||||
# snmp username
|
||||
username: ^_^username^_^
|
||||
# snmp authPassphrase
|
||||
authPassphrase: ^_^authPassphrase^_^
|
||||
# snmp privPassphrase
|
||||
privPassphrase: ^_^privPassphrase^_^
|
||||
# snmp privPasswordEncryption
|
||||
privPasswordEncryption: ^_^privPasswordEncryption^_^
|
||||
# snmp authPasswordEncryption
|
||||
authPasswordEncryption: ^_^authPasswordEncryption^_^
|
||||
# contextName
|
||||
contextName: ^_^contextName^_^
|
||||
# snmp connect timeout
|
||||
timeout: ^_^timeout^_^
|
||||
# snmp community
|
||||
community: ^_^community^_^
|
||||
# snmp version
|
||||
version: ^_^snmpVersion^_^
|
||||
# snmp operation: get, walk
|
||||
operation: walk
|
||||
oids:
|
||||
modelName: 1.3.6.1.4.1.6574.1.5.1
|
||||
serialNumber: 1.3.6.1.4.1.6574.1.5.2
|
||||
version: 1.3.6.1.4.1.6574.1.5.3
|
||||
controllerNumber: 1.3.6.1.4.1.6574.1.6
|
||||
|
||||
- name: status
|
||||
i18n:
|
||||
zh-CN: 状态
|
||||
en-US: Status
|
||||
ja-JP: ステータス
|
||||
priority: 1
|
||||
fields:
|
||||
- field: powerStatus
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 电源
|
||||
en-US: Power
|
||||
ja-JP: 電源
|
||||
- field: systemFanStatus
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 系统风扇
|
||||
en-US: System Fan
|
||||
ja-JP: システムファン
|
||||
- field: cpuFanStatus
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: CPU 风扇
|
||||
en-US: CPU Fan
|
||||
ja-JP: CPUファン
|
||||
- field: systemStatus
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 系统分区
|
||||
en-US: System Partition
|
||||
ja-JP: システムパーティション
|
||||
- field: thermalStatus
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 散热状态
|
||||
en-US: Thermal Partition
|
||||
ja-JP: 熱源
|
||||
- field: temperature
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 温度
|
||||
en-US: Temperature
|
||||
ja-JP: 温度
|
||||
- field: cpuUtilization
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: CPU 利用率
|
||||
en-US: CPU Utilization
|
||||
ja-JP: CPU 使用率
|
||||
- field: memUtilization
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 内存利用率
|
||||
en-US: Memory Utilization
|
||||
ja-JP: メモリ使用率
|
||||
protocol: snmp
|
||||
snmp:
|
||||
# server host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# server port
|
||||
port: ^_^port^_^
|
||||
# snmp username
|
||||
username: ^_^username^_^
|
||||
# snmp authPassphrase
|
||||
authPassphrase: ^_^authPassphrase^_^
|
||||
# snmp privPassphrase
|
||||
privPassphrase: ^_^privPassphrase^_^
|
||||
# snmp privPasswordEncryption
|
||||
privPasswordEncryption: ^_^privPasswordEncryption^_^
|
||||
# snmp authPasswordEncryption
|
||||
authPasswordEncryption: ^_^authPasswordEncryption^_^
|
||||
# contextName
|
||||
contextName: ^_^contextName^_^
|
||||
# snmp connect timeout
|
||||
timeout: ^_^timeout^_^
|
||||
# snmp community
|
||||
community: ^_^community^_^
|
||||
# snmp version
|
||||
version: ^_^snmpVersion^_^
|
||||
# snmp operation: get, walk
|
||||
operation: walk
|
||||
oids:
|
||||
systemStatus: 1.3.6.1.4.1.6574.1.1
|
||||
temperature: 1.3.6.1.4.1.6574.1.2
|
||||
powerStatus: 1.3.6.1.4.1.6574.1.3
|
||||
systemFanStatus: 1.3.6.1.4.1.6574.1.4.1
|
||||
cpuFanStatus: 1.3.6.1.4.1.6574.1.4.2
|
||||
cpuUtilization: 1.3.6.1.4.1.6574.1.7.1
|
||||
memUtilization: 1.3.6.1.4.1.6574.1.7.2
|
||||
thermalStatus: 1.3.6.1.4.1.6574.1.78
|
||||
|
||||
- name: disk
|
||||
i18n:
|
||||
zh-CN: 硬盘
|
||||
en-US: Disk
|
||||
ja-JP: ディスク
|
||||
priority: 2
|
||||
fields:
|
||||
- field: diskID
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: ID
|
||||
en-US: ID
|
||||
ja-JP: ディスクID
|
||||
- field: diskModel
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 型号
|
||||
en-US: Model
|
||||
ja-JP: ディスクモデル
|
||||
- field: diskType
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 类型
|
||||
en-US: Type
|
||||
ja-JP: ディスクタイプ
|
||||
- field: diskStatus
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 状态
|
||||
en-US: Status
|
||||
ja-JP: ディスクステータス
|
||||
- field: diskTemperature
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 温度
|
||||
en-US: Temperature
|
||||
ja-JP: ディスク温度
|
||||
- field: diskRole
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 作用
|
||||
en-US: Role
|
||||
ja-JP: ディスク作用
|
||||
- field: diskRetry
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 连接重试次数
|
||||
en-US: Retry count
|
||||
ja-JP: ディスクリミネーション
|
||||
- field: diskBadSector
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 坏扇区数
|
||||
en-US: Bad Sector
|
||||
ja-JP: ディスクバッドセクタ
|
||||
- field: diskIdentifyFail
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 计数失败
|
||||
en-US: Identify Fail
|
||||
ja-JP: ディスク識別失敗
|
||||
- field: diskRemainLife
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 预计剩余寿命
|
||||
en-US: Remain Life
|
||||
ja-JP: ディスク残り寿命
|
||||
- field: diskName
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 保留名称
|
||||
en-US: Disk Name
|
||||
ja-JP: ディスク名
|
||||
- field: diskHealthStatus
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 健康状况
|
||||
en-US: Health Status
|
||||
ja-JP: ディスクヘルスステータス
|
||||
protocol: snmp
|
||||
snmp:
|
||||
# server host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# server port
|
||||
port: ^_^port^_^
|
||||
# snmp username
|
||||
username: ^_^username^_^
|
||||
# snmp authPassphrase
|
||||
authPassphrase: ^_^authPassphrase^_^
|
||||
# snmp privPassphrase
|
||||
privPassphrase: ^_^privPassphrase^_^
|
||||
# snmp privPasswordEncryption
|
||||
privPasswordEncryption: ^_^privPasswordEncryption^_^
|
||||
# snmp authPasswordEncryption
|
||||
authPasswordEncryption: ^_^authPasswordEncryption^_^
|
||||
# contextName
|
||||
contextName: ^_^contextName^_^
|
||||
# snmp connect timeout
|
||||
timeout: ^_^timeout^_^
|
||||
# snmp community
|
||||
community: ^_^community^_^
|
||||
# snmp version
|
||||
version: ^_^snmpVersion^_^
|
||||
# snmp operation: get, walk
|
||||
operation: walk
|
||||
oids:
|
||||
diskID: 1.3.6.1.4.1.6574.2.1.1.2
|
||||
diskModel: 1.3.6.1.4.1.6574.2.1.1.3
|
||||
diskType: 1.3.6.1.4.1.6574.2.1.1.4
|
||||
diskStatus: 1.3.6.1.4.1.6574.2.1.1.5
|
||||
diskTemperature: 1.3.6.1.4.1.6574.2.1.1.6
|
||||
diskRole: 1.3.6.1.4.1.6574.2.1.1.7
|
||||
diskRetry: 1.3.6.1.4.1.6574.2.1.1.8
|
||||
diskBadSector: 1.3.6.1.4.1.6574.2.1.1.9
|
||||
diskIdentifyFail: 1.3.6.1.4.1.6574.2.1.1.10
|
||||
diskRemainLife: 1.3.6.1.4.1.6574.2.1.1.11
|
||||
diskName: 1.3.6.1.4.1.6574.2.1.1.12
|
||||
diskHealthStatus: 1.3.6.1.4.1.6574.2.1.1.13
|
||||
|
||||
- name: raid
|
||||
i18n:
|
||||
zh-CN: RAID
|
||||
en-US: RAID
|
||||
ja-JP: RAID
|
||||
priority: 3
|
||||
fields:
|
||||
- field: raidName
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 名称
|
||||
en-US: Name
|
||||
ja-JP: 名
|
||||
- field: raidStatus
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 状态
|
||||
en-US: Status
|
||||
ja-JP: ディスクモデル
|
||||
- field: raidFreeSize
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 可用容量
|
||||
en-US: Free Size
|
||||
ja-JP: ディスク残りサイズ
|
||||
- field: raidTotalSize
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 总大小
|
||||
en-US: Total Size
|
||||
ja-JP: ディスクサイズ
|
||||
- field: raidHotspareCnt
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 热备数
|
||||
en-US: Hot Spare Count
|
||||
ja-JP: ディスクホットスパア数
|
||||
protocol: snmp
|
||||
snmp:
|
||||
# server host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# server port
|
||||
port: ^_^port^_^
|
||||
# snmp username
|
||||
username: ^_^username^_^
|
||||
# snmp authPassphrase
|
||||
authPassphrase: ^_^authPassphrase^_^
|
||||
# snmp privPassphrase
|
||||
privPassphrase: ^_^privPassphrase^_^
|
||||
# snmp privPasswordEncryption
|
||||
privPasswordEncryption: ^_^privPasswordEncryption^_^
|
||||
# snmp authPasswordEncryption
|
||||
authPasswordEncryption: ^_^authPasswordEncryption^_^
|
||||
# contextName
|
||||
contextName: ^_^contextName^_^
|
||||
# snmp connect timeout
|
||||
timeout: ^_^timeout^_^
|
||||
# snmp community
|
||||
community: ^_^community^_^
|
||||
# snmp version
|
||||
version: ^_^snmpVersion^_^
|
||||
# snmp operation: get, walk
|
||||
operation: walk
|
||||
oids:
|
||||
raidName: 1.3.6.1.4.1.6574.3.1.1.2
|
||||
raidStatus: 1.3.6.1.4.1.6574.3.1.1.3
|
||||
raidFreeSize: 1.3.6.1.4.1.6574.3.1.1.4
|
||||
raidTotalSize: 1.3.6.1.4.1.6574.3.1.1.5
|
||||
raidHotspareCnt: 1.3.6.1.4.1.6574.3.1.1.6
|
||||
|
||||
- name: smart
|
||||
i18n:
|
||||
zh-CN: S.M.A.R.T
|
||||
en-US: S.M.A.R.T
|
||||
ja-JP: S.M.A.R.T
|
||||
priority: 4
|
||||
fields:
|
||||
- field: diskSMARTInfoDevName
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 设备名称
|
||||
en-US: Device Name
|
||||
ja-JP: ディスク名
|
||||
- field: diskSMARTAttrName
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 属性名
|
||||
en-US: Attribute Name
|
||||
ja-JP: ディスク属性名
|
||||
- field: diskSMARTAttrId
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 属性 ID
|
||||
en-US: Attribute ID
|
||||
ja-JP: ディスク属性ID
|
||||
- field: diskSMARTAttrCurrent
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 当前值
|
||||
en-US: Attribute Current
|
||||
ja-JP: ディスク属性現在値
|
||||
- field: diskSMARTAttrWorst
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最差值
|
||||
en-US: Attribute Worst
|
||||
ja-JP: ディスク属性最差値
|
||||
- field: diskSMARTAttrThreshold
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 阈值
|
||||
en-US: Attribute Threshold
|
||||
ja-JP: ディスク属性しきい値
|
||||
- field: diskSMARTAttrRaw
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 原始值
|
||||
en-US: Raw
|
||||
ja-JP: ディスク属性原始値
|
||||
- field: diskSMARTAttrStatus
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 信息状态
|
||||
en-US: Attribute Status
|
||||
ja-JP: ディスク属性情報ステータス
|
||||
protocol: snmp
|
||||
snmp:
|
||||
# server host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# server port
|
||||
port: ^_^port^_^
|
||||
# snmp username
|
||||
username: ^_^username^_^
|
||||
# snmp authPassphrase
|
||||
authPassphrase: ^_^authPassphrase^_^
|
||||
# snmp privPassphrase
|
||||
privPassphrase: ^_^privPassphrase^_^
|
||||
# snmp privPasswordEncryption
|
||||
privPasswordEncryption: ^_^privPasswordEncryption^_^
|
||||
# snmp authPasswordEncryption
|
||||
authPasswordEncryption: ^_^authPasswordEncryption^_^
|
||||
# contextName
|
||||
contextName: ^_^contextName^_^
|
||||
# snmp connect timeout
|
||||
timeout: ^_^timeout^_^
|
||||
# snmp community
|
||||
community: ^_^community^_^
|
||||
# snmp version
|
||||
version: ^_^snmpVersion^_^
|
||||
# snmp operation: get, walk
|
||||
operation: walk
|
||||
oids:
|
||||
diskSMARTInfoDevName: 1.3.6.1.4.1.6574.5.1.1.2
|
||||
diskSMARTAttrName: 1.3.6.1.4.1.6574.5.1.1.3
|
||||
diskSMARTAttrId: 1.3.6.1.4.1.6574.5.1.1.4
|
||||
diskSMARTAttrCurrent: 1.3.6.1.4.1.6574.5.1.1.5
|
||||
diskSMARTAttrWorst: 1.3.6.1.4.1.6574.5.1.1.6
|
||||
diskSMARTAttrThreshold: 1.3.6.1.4.1.6574.5.1.1.7
|
||||
diskSMARTAttrRaw: 1.3.6.1.4.1.6574.5.1.1.8
|
||||
diskSMARTAttrStatus: 1.3.6.1.4.1.6574.5.1.1.9
|
||||
|
||||
- name: spaceio
|
||||
i18n:
|
||||
zh-CN: 存储空间 I/O
|
||||
en-US: Space I/O
|
||||
ja-JP: スペースI/O
|
||||
priority: 5
|
||||
fields:
|
||||
- field: spaceIODevice
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 设备名称
|
||||
en-US: Device Name
|
||||
ja-JP: ディスク名
|
||||
- field: spaceIOReads
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 读取访问次数
|
||||
en-US: Read Accesses Count
|
||||
ja-JP: ディスク属性読み込みアクセス回数
|
||||
- field: spaceIOWrites
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 写入访问次数
|
||||
en-US: Write Accesses Count
|
||||
ja-JP: ディスク属性書き込みアクセス回数
|
||||
- field: spaceIOLA
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 硬盘负载
|
||||
en-US: The load of disk
|
||||
ja-JP: ディスク属性ディスクロード
|
||||
- field: spaceIOLA1
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 1 分钟平均负载
|
||||
en-US: The 1-minute average load of disk
|
||||
ja-JP: 1分平均負荷
|
||||
- field: spaceIOLA5
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 5分钟平均负载
|
||||
en-US: The 5-minute average load of disk
|
||||
ja-JP: 5分平均負荷
|
||||
- field: spaceIOLA15
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 15 分钟平均负载
|
||||
en-US: The-15 minute average load of disk
|
||||
ja-JP: 15分平均負荷
|
||||
- field: spaceUUID
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 卷UUID
|
||||
en-US: UUID
|
||||
ja-JP: UUID
|
||||
protocol: snmp
|
||||
snmp:
|
||||
# server host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# server port
|
||||
port: ^_^port^_^
|
||||
# snmp username
|
||||
username: ^_^username^_^
|
||||
# snmp authPassphrase
|
||||
authPassphrase: ^_^authPassphrase^_^
|
||||
# snmp privPassphrase
|
||||
privPassphrase: ^_^privPassphrase^_^
|
||||
# snmp privPasswordEncryption
|
||||
privPasswordEncryption: ^_^privPasswordEncryption^_^
|
||||
# snmp authPasswordEncryption
|
||||
authPasswordEncryption: ^_^authPasswordEncryption^_^
|
||||
# contextName
|
||||
contextName: ^_^contextName^_^
|
||||
# snmp connect timeout
|
||||
timeout: ^_^timeout^_^
|
||||
# snmp community
|
||||
community: ^_^community^_^
|
||||
# snmp version
|
||||
version: ^_^snmpVersion^_^
|
||||
# snmp operation: get, walk
|
||||
operation: walk
|
||||
oids:
|
||||
spaceIODevice: 1.3.6.1.4.1.6574.102.1.1.2
|
||||
spaceIOReads: 1.3.6.1.4.1.6574.102.1.1.5
|
||||
spaceIOWrites: 1.3.6.1.4.1.6574.102.1.1.6
|
||||
spaceIOLA: 1.3.6.1.4.1.6574.102.1.1.7
|
||||
spaceIOLA1: 1.3.6.1.4.1.6574.102.1.1.8
|
||||
spaceIOLA5: 1.3.6.1.4.1.6574.102.1.1.9
|
||||
spaceIOLA15: 1.3.6.1.4.1.6574.102.1.1.10
|
||||
spaceUUID: 1.3.6.1.4.1.6574.102.1.1.13
|
||||
|
||||
- name: storageio
|
||||
i18n:
|
||||
zh-CN: 硬盘 I/O
|
||||
en-US: Storage I/O
|
||||
ja-JP: ハードディスクI/O
|
||||
priority: 6
|
||||
fields:
|
||||
- field: storageIODevice
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 设备名称
|
||||
en-US: Device Name
|
||||
ja-JP: ディスク名
|
||||
- field: storageIOReads
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 读取访问次数
|
||||
en-US: Read Accesses Count
|
||||
ja-JP: ディスク属性読み込みアクセス回数
|
||||
- field: storageIOWrites
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 写入访问次数
|
||||
en-US: Write Accesses Count
|
||||
ja-JP: ディスク属性書き込みアクセス回数
|
||||
- field: storageIOLA
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 硬盘负载
|
||||
en-US: The load of disk
|
||||
ja-JP: ディスク属性ディスクロード
|
||||
- field: storageIOLA1
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 1 分钟平均负载
|
||||
en-US: The 1-minute average load of disk
|
||||
ja-JP: 1分平均負荷
|
||||
- field: storageIOLA5
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 5分钟平均负载
|
||||
en-US: The 5-minute average load of disk
|
||||
ja-JP: 5分平均負荷
|
||||
- field: storageIOLA15
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 15 分钟平均负载
|
||||
en-US: The-15 minute average load of disk
|
||||
ja-JP: 15分平均負荷
|
||||
- field: storageIODeviceSerial
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 序列号
|
||||
en-US: Serial Number
|
||||
ja-JP: シリアルナンバー
|
||||
protocol: snmp
|
||||
snmp:
|
||||
# server host: ipv4 ipv6 domain
|
||||
host: ^_^host^_^
|
||||
# server port
|
||||
port: ^_^port^_^
|
||||
# snmp username
|
||||
username: ^_^username^_^
|
||||
# snmp authPassphrase
|
||||
authPassphrase: ^_^authPassphrase^_^
|
||||
# snmp privPassphrase
|
||||
privPassphrase: ^_^privPassphrase^_^
|
||||
# snmp privPasswordEncryption
|
||||
privPasswordEncryption: ^_^privPasswordEncryption^_^
|
||||
# snmp authPasswordEncryption
|
||||
authPasswordEncryption: ^_^authPasswordEncryption^_^
|
||||
# contextName
|
||||
contextName: ^_^contextName^_^
|
||||
# snmp connect timeout
|
||||
timeout: ^_^timeout^_^
|
||||
# snmp community
|
||||
community: ^_^community^_^
|
||||
# snmp version
|
||||
version: ^_^snmpVersion^_^
|
||||
# snmp operation: get, walk
|
||||
operation: walk
|
||||
oids:
|
||||
storageIODevice: 1.3.6.1.4.1.6574.101.1.1.2
|
||||
storageIOReads: 1.3.6.1.4.1.6574.101.1.1.5
|
||||
storageIOWrites: 1.3.6.1.4.1.6574.101.1.1.6
|
||||
storageIOLA: 1.3.6.1.4.1.6574.101.1.1.7
|
||||
storageIOLA1: 1.3.6.1.4.1.6574.101.1.1.8
|
||||
storageIOLA5: 1.3.6.1.4.1.6574.101.1.1.9
|
||||
storageIOLA15: 1.3.6.1.4.1.6574.101.1.1.10
|
||||
storageIODeviceSerial: 1.3.6.1.4.1.6574.101.1.1.13
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,11 +21,13 @@ app: tomcat
|
||||
name:
|
||||
zh-CN: Tomcat应用服务器
|
||||
en-US: Tomcat WebServer
|
||||
ja-JP: Tomcat WebServer
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: HertzBeat 使用 <a href="https://hertzbeat.apache.org/docs/advanced/extend-jmx">JMX 协议</a> 对 Tomcat 的通用性能指标(基础信息,内存池,类加载,线程信息等)进行采集监控。<br>⚠️注意:您需要在 Tomcat 应用中开启 JMX 服务,应用启动时添加 JMX 参数, 可自定义暴露端口,对外IP。<a href="https://hertzbeat.apache.org/zh-cn/docs/help/tomcat">点击查看开启步骤</a>。
|
||||
en-US: HertzBeat uses <a href='https://hertzbeat.apache.org/docs/advanced/extend-jmx'>JMX Protocol</a> to monitoring and collect general performance metric of Tomcat. <br>⚠️Note:You need to enable JMX services in Tomcat application, and add the JXM parameters when the application start. You can also customize external IP address and exposed port.<a href='https://hertzbeat.apache.org/docs/help/tomcat'>Click here to view the activation steps.</a>"
|
||||
zh-TW: HertzBeat 使用 <a href="https://hertzbeat.apache.org/docs/advanced/extend-jmx">JMX 協議</a> 對 Tomcat 的通用性能指標(基礎信息,內存池,類加載,線程信息等)進行采集監控。<br>⚠️注意:您需要在 Tomcat 應用中開啓 JMX 服務,應用啓動時添加 JMX 參數, 可自定義暴露端口,對外IP。<a href="https://hertzbeat.apache.org/zh-cn/docs/help/tomcat">點擊查看開啓步驟</a>。
|
||||
ja-JP: HertzBeat は <a href="https://hertzbeat.apache.org/docs/advanced/extend-jmx"> JMXプロトコルを介して</a> Tomcat の一般的なパフォーマンスのメトリクスを監視します。⚠️注意:Tomcat応用 で JMXサービス を有効にする必要があります。<a href="https://hertzbeat.apache.org/docs/help/tomcat">クリックしてガイドを見ます</a>。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/tomcat
|
||||
en-US: https://hertzbeat.apache.org/docs/help/tomcat
|
||||
@@ -37,6 +39,7 @@ params:
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
ja-JP: 目標ホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
@@ -47,6 +50,7 @@ params:
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -61,6 +65,7 @@ params:
|
||||
name:
|
||||
zh-CN: JMX URL
|
||||
en-US: JMX URL
|
||||
ja-JP: JMX URL
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# required-true or false
|
||||
@@ -75,6 +80,7 @@ params:
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
ja-JP: ユーザー名
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
@@ -89,6 +95,7 @@ params:
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
ja-JP: パスワード
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
@@ -102,6 +109,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: Tomcat 信息
|
||||
en-US: Tomcat Server
|
||||
ja-JP: Tomcatサーバー
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
@@ -113,26 +121,31 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 服务信息
|
||||
en-US: Server Info
|
||||
ja-JP: サーバー情報
|
||||
- field: serverNumber
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 服务版本
|
||||
en-US: Server Number
|
||||
ja-JP: サーバーバージョン
|
||||
- field: serverBuilt
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: Server Built
|
||||
en-US: Server Built
|
||||
ja-JP: サーバービルド
|
||||
- field: port
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
- field: address
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 地址
|
||||
en-US: Address
|
||||
ja-JP: アドレス
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: jmx
|
||||
# the config content when protocol is http
|
||||
@@ -155,6 +168,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 内存池
|
||||
en-US: Memory Pool
|
||||
ja-JP: メモリプール
|
||||
fields:
|
||||
- field: name
|
||||
type: 1
|
||||
@@ -162,30 +176,35 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 指标名称
|
||||
en-US: Name
|
||||
ja-JP: 名前
|
||||
- field: committed
|
||||
type: 0
|
||||
unit: MB
|
||||
i18n:
|
||||
zh-CN: 已分配内存
|
||||
en-US: Committed
|
||||
ja-JP: コミットされたメモリ
|
||||
- field: init
|
||||
type: 0
|
||||
unit: MB
|
||||
i18n:
|
||||
zh-CN: 初始化内存
|
||||
en-US: Init
|
||||
ja-JP: イニシャルメモリ
|
||||
- field: max
|
||||
type: 0
|
||||
unit: MB
|
||||
i18n:
|
||||
zh-CN: 最大内存
|
||||
en-US: Max
|
||||
ja-JP: 最大メモリ
|
||||
- field: used
|
||||
type: 0
|
||||
unit: MB
|
||||
i18n:
|
||||
zh-CN: 已使用内存
|
||||
en-US: Used
|
||||
ja-JP: 使用したメモリ
|
||||
units:
|
||||
- committed=B->MB
|
||||
- init=B->MB
|
||||
@@ -222,6 +241,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 类加载信息
|
||||
en-US: Class Loading
|
||||
ja-JP: クラスローディング情報
|
||||
# collect metrics content
|
||||
fields:
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
@@ -230,16 +250,19 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 当前已加载类数量
|
||||
en-US: Loaded Class Count
|
||||
ja-JP: ロードされたクラス数
|
||||
- field: TotalLoadedClassCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 已加载类总数量
|
||||
en-US: Total Loaded Class Count
|
||||
ja-JP: ロードされたクラス総数
|
||||
- field: UnloadedClassCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 未加载类总数量
|
||||
en-US: Unloaded Class Count
|
||||
ja-JP: アンロードされたクラス総数
|
||||
protocol: jmx
|
||||
jmx:
|
||||
host: ^_^host^_^
|
||||
@@ -254,6 +277,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 线程信息
|
||||
en-US: Thread
|
||||
ja-JP: スレッド情報
|
||||
# collect metrics content
|
||||
fields:
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
@@ -262,33 +286,39 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 已启动线程总数
|
||||
en-US: Total Started Thread Count
|
||||
ja-JP: スレッド総数
|
||||
- field: ThreadCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 活跃线程数
|
||||
en-US: Thread Count
|
||||
ja-JP: 活躍スレッド数
|
||||
- field: PeakThreadCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最大峰值线程数
|
||||
en-US: Peak Thread Count
|
||||
ja-JP: 最大スレッド数
|
||||
- field: DaemonThreadCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 活跃守护线程数
|
||||
en-US: Daemon Thread Count
|
||||
ja-JP: デーモンスレッド数
|
||||
- field: CurrentThreadUserTime
|
||||
type: 0
|
||||
unit: s
|
||||
i18n:
|
||||
zh-CN: 线程占用的CPU时间(用户态)
|
||||
en-US: Current Thread User Time
|
||||
ja-JP: 現在のスレッドユーザー時間
|
||||
- field: CurrentThreadCpuTime
|
||||
type: 0
|
||||
unit: s
|
||||
i18n:
|
||||
zh-CN: 线程占用的CPU时间
|
||||
en-US: Current Thread CPU Time
|
||||
ja-JP: 現在のスレッドシステム時間
|
||||
units:
|
||||
- CurrentThreadUserTime=NS->S
|
||||
- CurrentThreadCpuTime=NS->S
|
||||
@@ -305,6 +335,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 应用信息
|
||||
en-US: Application
|
||||
ja-JP: 応用情報
|
||||
priority: 4
|
||||
fields:
|
||||
- field: name
|
||||
@@ -313,83 +344,99 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 名称
|
||||
en-US: Name
|
||||
ja-JP: 名前
|
||||
- field: acceptCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 接收请求数
|
||||
en-US: Accept Count
|
||||
ja-JP: 受け入れたリクエスト数
|
||||
- field: acceptorThreadCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 接收处理线程数
|
||||
en-US: Acceptor Thread Count
|
||||
ja-JP: アクセプタスレッド数
|
||||
- field: acceptorThreadPriority
|
||||
type : 0
|
||||
i18n:
|
||||
zh-CN: 接收线程级别
|
||||
en-US: Acceptor Thread Priority
|
||||
ja-JP: アクセプタスレッド優先度
|
||||
- field: connectionTimeout
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 链接超时时间
|
||||
en-US: Connection Timeout
|
||||
ja-JP: 接続のタイムアウト
|
||||
- field: currentThreadCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 当前线程数
|
||||
en-US: Current Thread Count
|
||||
ja-JP: 現在のスレッド数
|
||||
- field: currentThreadsBusy
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 繁忙线程数
|
||||
en-US: Current Threads Busy
|
||||
ja-JP: 現在の忙しいスレッド数
|
||||
- field: keepAliveCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 心跳保持链接数量
|
||||
en-US: Keep Alive Count
|
||||
ja-JP: ハートビート数量
|
||||
- field: keepAliveTimeout
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 心跳超时时间
|
||||
en-US: Keep Alive Timeout
|
||||
ja-JP: ハートビートのタイムアウト
|
||||
- field: maxConnections
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最大链接数
|
||||
en-US: Max Connections
|
||||
ja-JP: 最大接続数
|
||||
- field: maxKeepAliveRequests
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最大链接保持请求
|
||||
en-US: Max KeepAlive Requests
|
||||
ja-JP: 最大KeepAliveリクエスト数
|
||||
- field: maxThreads
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最大线程数
|
||||
en-US: Max Threads
|
||||
ja-JP: 最大スレッド数
|
||||
- field: minSpareThreads
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最小备用线程数
|
||||
en-US: Min Spare Threads
|
||||
ja-JP: 最小予備スレッド数
|
||||
- field: pollerThreadCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 轮询线程数
|
||||
en-US: Poller Thread Count
|
||||
ja-JP: ポーラースレッド数
|
||||
- field: pollerThreadPriority
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 轮询线程级别
|
||||
en-US: Poller Thread Priority
|
||||
ja-JP: ポーラースレッド優先度
|
||||
- field: running
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 运行中
|
||||
en-US: Running
|
||||
ja-JP: 実行中
|
||||
protocol: jmx
|
||||
jmx:
|
||||
host: ^_^host^_^
|
||||
|
||||
@@ -21,11 +21,13 @@ app: ubuntu
|
||||
name:
|
||||
zh-CN: Ubuntu Linux
|
||||
en-US: Ubuntu Linux
|
||||
ja-JP: Ubuntu 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> 对 Ubuntu 操作系统的通用性能指标 (系统信息、CPU、内存、磁盘、网卡、文件系统、TOP资源进程等) 进行采集监控。<br>您可以点击“<i>新建 Ubuntu</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 Ubuntu 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 Ubuntu</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> 對 Ubuntu 操作系统的通用性能指標 (系統信息、CPU、內存、磁盤、網卡、文件系統、TOP資源進程等) 進行採集監控。<br>您可以點擊“<i>新建 Ubuntu</i>”並配置HOST端口賬戶等相關參數進行添加,支持SSH賬戶密碼或密鑰認證。或者選擇“<i>更多操作</i>”,導入已有配寘。
|
||||
ja-JP: Hertzbeat は <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-ssh'> SSHプロトコルを介して</a> Ubuntuシステムの一般的なパフォーマンスのメトリクスを監視します。<br>「<i>新規 Ubuntu</i>」をクリックしてホストなどのパラメタを設定した後、新規することができます。SSHまたはキー認証をサポートします。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/ubuntu
|
||||
en-US: https://hertzbeat.apache.org/docs/help/ubuntu
|
||||
@@ -37,6 +39,7 @@ params:
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
ja-JP: 目標ホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
@@ -47,6 +50,7 @@ params:
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -61,6 +65,7 @@ params:
|
||||
name:
|
||||
zh-CN: 超时时间(ms)
|
||||
en-US: Timeout(ms)
|
||||
ja-JP: タイムアウト(ms)
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -75,6 +80,7 @@ params:
|
||||
name:
|
||||
zh-CN: 复用连接
|
||||
en-US: Reuse Connection
|
||||
ja-JP: 接続再利用
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: boolean
|
||||
# required-true or false
|
||||
@@ -86,6 +92,7 @@ params:
|
||||
name:
|
||||
zh-CN: 使用代理
|
||||
en-US: Use Proxy Connection
|
||||
ja-JP: プロキシ接続利用
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: boolean
|
||||
# required-true or false
|
||||
@@ -97,6 +104,7 @@ params:
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
ja-JP: ユーザー名
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
@@ -109,6 +117,7 @@ params:
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
ja-JP: パスワード
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
@@ -119,6 +128,7 @@ params:
|
||||
name:
|
||||
zh-CN: 私钥
|
||||
en-US: PrivateKey
|
||||
ja-JP: 秘密鍵
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: textarea
|
||||
placeholder: -----BEGIN RSA PRIVATE KEY-----
|
||||
@@ -132,6 +142,7 @@ params:
|
||||
name:
|
||||
zh-CN: 密钥短语
|
||||
en-US: PrivateKey PassPhrase
|
||||
ja-JP: 秘密鍵フレーズ
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: password
|
||||
# required-true or false
|
||||
@@ -144,6 +155,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理主机
|
||||
en-US: Proxy Host
|
||||
ja-JP: プロキシホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# required-true or false
|
||||
@@ -155,6 +167,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理端口
|
||||
en-US: Proxy Port
|
||||
ja-JP: プロキシポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -171,6 +184,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理用户名
|
||||
en-US: Proxy Username
|
||||
ja-JP: プロキシユーザー名
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
@@ -185,6 +199,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理密码
|
||||
en-US: Proxy Password
|
||||
ja-JP: プロキシパスワード
|
||||
# type-param field type(most mapping the html input tag)
|
||||
type: password
|
||||
# required-true or false
|
||||
@@ -197,6 +212,7 @@ params:
|
||||
name:
|
||||
zh-CN: 代理主机私钥
|
||||
en-US: proxyPrivateKey
|
||||
ja-JP: プロキシ秘密鍵
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: textarea
|
||||
placeholder: -----BEGIN RSA PRIVATE KEY-----
|
||||
@@ -211,6 +227,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 系统基本信息
|
||||
en-US: Basic Info
|
||||
ja-JP: システム基礎情報
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
@@ -223,16 +240,19 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 主机名称
|
||||
en-US: Host Name
|
||||
ja-JP: ホスト名
|
||||
- field: version
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 操作系统版本
|
||||
en-US: System Version
|
||||
ja-JP: オーエスバージョン
|
||||
- field: uptime
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 启动时间
|
||||
en-US: Uptime
|
||||
ja-JP: アップタイム
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: ssh
|
||||
# the config content when protocol is ssh
|
||||
@@ -272,6 +292,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: CPU 信息
|
||||
en-US: CPU Info
|
||||
ja-JP: CPU情報
|
||||
priority: 1
|
||||
fields:
|
||||
- field: info
|
||||
@@ -279,32 +300,38 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 型号
|
||||
en-US: Info
|
||||
ja-JP: バージョン
|
||||
- field: cores
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 核数
|
||||
en-US: Cores
|
||||
ja-JP: コア数
|
||||
- field: interrupt
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 中断数
|
||||
en-US: Interrupt
|
||||
ja-JP: 割り込み数
|
||||
- field: load
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 负载
|
||||
en-US: Load
|
||||
ja-JP: ロード
|
||||
- field: context_switch
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 上下文切换
|
||||
en-US: Context Switch
|
||||
ja-JP: コンテキストスイッチ
|
||||
- field: usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 使用率
|
||||
en-US: Usage
|
||||
ja-JP: 使用率
|
||||
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
|
||||
aliasFields:
|
||||
- info
|
||||
@@ -351,6 +378,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 内存信息
|
||||
en-US: Memory Info
|
||||
ja-JP: メモリ情報
|
||||
priority: 2
|
||||
fields:
|
||||
- field: total
|
||||
@@ -359,36 +387,42 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 总内存容量
|
||||
en-US: Total Memory
|
||||
ja-JP: メモリ容量
|
||||
- field: used
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 用户程序内存量
|
||||
en-US: User Program Memory
|
||||
ja-JP: ユーザープログラムメモリ
|
||||
- field: free
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 空闲内存容量
|
||||
en-US: Free Memory
|
||||
ja-JP: 空きメモリ
|
||||
- field: buff_cache
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 缓存占用内存
|
||||
en-US: Buff Cache Memory
|
||||
ja-JP: バッファメモリ
|
||||
- field: available
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 剩余可用内存
|
||||
en-US: Available Memory
|
||||
ja-JP: 使用可能のメモリ
|
||||
- field: usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 内存使用率
|
||||
en-US: Memory Usage
|
||||
ja-JP: メモリ使用率
|
||||
aliasFields:
|
||||
- total
|
||||
- used
|
||||
@@ -431,6 +465,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 磁盘信息
|
||||
en-US: Disk Info
|
||||
ja-JP: ディスク情報
|
||||
priority: 3
|
||||
fields:
|
||||
- field: disk_num
|
||||
@@ -438,27 +473,32 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 磁盘总数
|
||||
en-US: Disk Num
|
||||
ja-JP: ディスク番号
|
||||
- field: partition_num
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 分区总数
|
||||
en-US: Partition Num
|
||||
ja-JP: パーティション
|
||||
- field: block_write
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 写磁盘块数
|
||||
en-US: Block Write
|
||||
ja-JP: 書き込みディスクブロック数
|
||||
- field: block_read
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 读磁盘块数
|
||||
en-US: Block Read
|
||||
ja-JP: 読み取りブロック数
|
||||
- field: write_rate
|
||||
type: 0
|
||||
unit: iops
|
||||
i18n:
|
||||
zh-CN: 磁盘写速率
|
||||
en-US: Write Rate
|
||||
ja-JP: ディスク書き込み速度
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
@@ -488,6 +528,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 网卡信息
|
||||
en-US: Interface Info
|
||||
ja-JP: ネットワークカード情報
|
||||
priority: 4
|
||||
fields:
|
||||
- field: interface_name
|
||||
@@ -496,18 +537,21 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 网卡名称
|
||||
en-US: Interface Name
|
||||
ja-JP: ネットワークカード名
|
||||
- field: receive_bytes
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 入站数据流量
|
||||
en-US: Receive Bytes
|
||||
ja-JP: 受信されたバイト数
|
||||
- field: transmit_bytes
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 出站数据流量
|
||||
en-US: Transmit Bytes
|
||||
ja-JP: 転送されたバイト数
|
||||
units:
|
||||
- receive_bytes=B->MB
|
||||
- transmit_bytes=B->MB
|
||||
@@ -540,6 +584,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 文件系统
|
||||
en-US: Disk Free
|
||||
ja-JP: ファイルシステム
|
||||
priority: 5
|
||||
fields:
|
||||
- field: filesystem
|
||||
@@ -547,30 +592,35 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 文件系统
|
||||
en-US: Filesystem
|
||||
ja-JP: ファイルシステム
|
||||
- field: used
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 已使用量
|
||||
en-US: Used
|
||||
ja-JP: 使用済み
|
||||
- field: available
|
||||
type: 0
|
||||
unit: Mb
|
||||
i18n:
|
||||
zh-CN: 可用量
|
||||
en-US: Available
|
||||
ja-JP: 使用可能
|
||||
- field: usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 使用率
|
||||
en-US: Usage
|
||||
ja-JP: 使用率
|
||||
- field: mounted
|
||||
type: 1
|
||||
label: true
|
||||
i18n:
|
||||
zh-CN: 挂载点
|
||||
en-US: Mounted
|
||||
ja-JP: マウント
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
@@ -600,6 +650,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: Top10 CPU 进程
|
||||
en-US: Top10 CPU Process
|
||||
ja-JP: トップ10 CPUプロセス
|
||||
priority: 6
|
||||
fields:
|
||||
- field: pid
|
||||
@@ -608,23 +659,27 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 进程ID
|
||||
en-US: PID
|
||||
ja-JP: プロセスID
|
||||
- field: cpu_usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: CPU占用率
|
||||
en-US: CPU Usage
|
||||
ja-JP: CPU使用率
|
||||
- field: mem_usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 内存占用率
|
||||
en-US: Memory Usage
|
||||
ja-JP: メモリ使用率
|
||||
- field: command
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 执行命令
|
||||
en-US: Command
|
||||
ja-JP: コマンド
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
@@ -654,6 +709,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: Top10 内存进程
|
||||
en-US: Top10 Memory Process
|
||||
ja-JP: トップ10 メモリプロセス
|
||||
priority: 7
|
||||
fields:
|
||||
- field: pid
|
||||
@@ -662,23 +718,27 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 进程ID
|
||||
en-US: PID
|
||||
ja-JP: プロセスID
|
||||
- field: mem_usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 内存占用率
|
||||
en-US: Memory Usage
|
||||
ja-JP: メモリ使用率
|
||||
- field: cpu_usage
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: CPU占用率
|
||||
en-US: CPU Usage
|
||||
ja-JP: CPU使用率
|
||||
- field: command
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 执行命令
|
||||
en-US: Command
|
||||
ja-JP: コマンド
|
||||
protocol: ssh
|
||||
ssh:
|
||||
host: ^_^host^_^
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,11 +21,13 @@ app: vastbase
|
||||
name:
|
||||
zh-CN: Vastbase数据库
|
||||
en-US: Vastbase DB
|
||||
ja-JP: Vastbase データベース
|
||||
# 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-jdbc'> JDBC 协议</a> 通过配置 SQL 对 Vastbase 数据库的通用性能指标 (basic、state、activity etc) 进行采集监控,支持版本为 Vastbase 9.2.4+。<br>您可以点击“<i>新建 Vastbase 数据库</i>”并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: HertzBeat uses <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-jdbc'> JDBC Protocol</a> to configure SQL for collecting general metrics of Vastbase database (basic、state、activity etc). Supported version is Vastbase 9.2.4+. <br>You can click "<i>New Vastbase Database</i>" and configure it, or select "<i>More Action</i>" to import the existing configuration.
|
||||
zh-TW: HertzBeat 使用 <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-jdbc'> JDBC 協議</a> 通過配置 SQL 對 Vastbase 數據庫的通用性能指標 (basic、state、activity etc)進行采集監控,支持版本爲 Vastbase 9.2.4+。<br>您可以點擊“<i>新建 Vastbase 數據庫</i>”並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
|
||||
ja-JP: Hertzbeat は <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-jdbc'> JDBCプロトコルを介して</a> Vastbase データベース(Vastbase 9.2.4+)の一般的なパフォーマンスのメトリクスを監視します。<br>「<i>新規 Vastbase データベース</i>」をクリックしてパラメタを設定した後、新規することができます。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/vastbase
|
||||
en-US: https://hertzbeat.apache.org/docs/help/vastbase
|
||||
@@ -37,6 +39,7 @@ params:
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
ja-JP: 目標ホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
@@ -47,6 +50,7 @@ params:
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -59,6 +63,7 @@ params:
|
||||
name:
|
||||
zh-CN: 查询超时时间(ms)
|
||||
en-US: Query Timeout(ms)
|
||||
ja-JP: クエリタイムアウト(ms)
|
||||
type: number
|
||||
range: '[400,200000]'
|
||||
required: false
|
||||
@@ -68,6 +73,7 @@ params:
|
||||
name:
|
||||
zh-CN: 数据库名称
|
||||
en-US: Database Name
|
||||
ja-JP: データベース名
|
||||
type: text
|
||||
defaultValue: postgres
|
||||
required: false
|
||||
@@ -75,6 +81,7 @@ params:
|
||||
name:
|
||||
zh-CN: 用户名
|
||||
en-US: Username
|
||||
ja-JP: ユーザー名
|
||||
type: text
|
||||
limit: 50
|
||||
required: false
|
||||
@@ -82,12 +89,14 @@ params:
|
||||
name:
|
||||
zh-CN: 密码
|
||||
en-US: Password
|
||||
ja-JP: パスワード
|
||||
type: password
|
||||
required: false
|
||||
- field: url
|
||||
name:
|
||||
zh-CN: URL
|
||||
en-US: URL
|
||||
ja-JP: URL
|
||||
type: text
|
||||
required: false
|
||||
hide: true
|
||||
@@ -99,6 +108,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 基本信息
|
||||
en-US: Basic Info
|
||||
ja-JP: 基礎情報
|
||||
# metrics scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel
|
||||
# priority 0's metrics is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue
|
||||
priority: 0
|
||||
@@ -111,26 +121,31 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 服务器版本
|
||||
en-US: Server Version
|
||||
ja-JP: バージョン
|
||||
- field: port
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
- field: server_encoding
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 服务器编码
|
||||
en-US: Server Encoding
|
||||
ja-JP: サーバーのエンコード
|
||||
- field: data_directory
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 数据目录
|
||||
en-US: Data Directory
|
||||
ja-JP: データディレクトリ
|
||||
- field: max_connections
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最大连接数
|
||||
en-US: Max Connections
|
||||
ja-JP: 最大接続数
|
||||
# the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk
|
||||
protocol: jdbc
|
||||
# the config content when protocol is jdbc
|
||||
@@ -155,6 +170,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 状态信息
|
||||
en-US: State Info
|
||||
ja-JP: 状態情報
|
||||
priority: 1
|
||||
fields:
|
||||
- field: db_name
|
||||
@@ -163,47 +179,55 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 数据库名称
|
||||
en-US: Database Name
|
||||
ja-JP: データベース名
|
||||
- field: conflicts
|
||||
type: 0
|
||||
unit: times
|
||||
i18n:
|
||||
zh-CN: 冲突次数
|
||||
en-US: Conflicts
|
||||
ja-JP: コンフリクト回数
|
||||
- field: deadlocks
|
||||
type: 0
|
||||
unit: times
|
||||
i18n:
|
||||
zh-CN: 死锁次数
|
||||
en-US: Deadlocks
|
||||
ja-JP: デッドロック回数
|
||||
- field: blks_read
|
||||
type: 0
|
||||
unit: blocks per second
|
||||
i18n:
|
||||
zh-CN: 读取块
|
||||
en-US: Blocks Read
|
||||
ja-JP: 読み取られたブロック
|
||||
- field: blks_hit
|
||||
type: 0
|
||||
unit: blocks per second
|
||||
i18n:
|
||||
zh-CN: 命中块
|
||||
en-US: Blocks Hit
|
||||
ja-JP: ヒットブロック
|
||||
- field: blk_read_time
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 读取时间
|
||||
en-US: Read Time
|
||||
ja-JP: 読み取られタイム
|
||||
- field: blk_write_time
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 写入时间
|
||||
en-US: Write Time
|
||||
ja-JP: 書き込まれタイム
|
||||
- field: stats_reset
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 统计重置
|
||||
en-US: Stats Reset
|
||||
ja-JP: 統計リセット
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -221,6 +245,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 活动信息
|
||||
en-US: Activity Info
|
||||
ja-JP: 活動情報
|
||||
priority: 2
|
||||
fields:
|
||||
- field: running
|
||||
@@ -229,6 +254,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 运行中
|
||||
en-US: Running
|
||||
ja-JP: 実行中
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -246,6 +272,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 资源配置
|
||||
en-US: Resource Config
|
||||
ja-JP: リソース設定
|
||||
priority: 3
|
||||
fields:
|
||||
- field: work_mem
|
||||
@@ -254,34 +281,40 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 工作内存
|
||||
en-US: Work Memory
|
||||
ja-JP: ワークメモリ
|
||||
- field: shared_buffers
|
||||
type: 0
|
||||
unit: MB
|
||||
i18n:
|
||||
zh-CN: 共享缓冲区
|
||||
en-US: Shared Buffers
|
||||
ja-JP: 共有バッファ
|
||||
- field: autovacuum
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 自动清理
|
||||
en-US: Auto Vacuum
|
||||
ja-JP: オートバキューム
|
||||
- field: max_connections
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 最大连接数
|
||||
en-US: Max Connections
|
||||
ja-JP: 最大接続数
|
||||
- field: effective_cache_size
|
||||
type: 0
|
||||
unit: MB
|
||||
i18n:
|
||||
zh-CN: 有效缓存大小
|
||||
en-US: Effective Cache Size
|
||||
ja-JP: キャッシュサイズ
|
||||
- field: wal_buffers
|
||||
type: 0
|
||||
unit: MB
|
||||
i18n:
|
||||
zh-CN: WAL缓冲区
|
||||
en-US: WAL Buffers
|
||||
ja-JP: WALバッファ
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -299,6 +332,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 连接信息
|
||||
en-US: Connection Info
|
||||
ja-JP: 接続情報
|
||||
priority: 4
|
||||
fields:
|
||||
- field: active
|
||||
@@ -306,6 +340,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 活动连接
|
||||
en-US: Active Connection
|
||||
ja-JP: 活躍的な接続
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -323,6 +358,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 连接状态
|
||||
en-US: Connection State
|
||||
ja-JP: 接続状態
|
||||
priority: 5
|
||||
fields:
|
||||
- field: state
|
||||
@@ -331,11 +367,13 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 状态
|
||||
en-US: State
|
||||
ja-JP: 状態
|
||||
- field: num
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 数量
|
||||
en-US: Num
|
||||
ja-JP: 数量
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -353,6 +391,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 连接数据库
|
||||
en-US: Connection Db
|
||||
ja-JP: 接続データベース
|
||||
priority: 6
|
||||
fields:
|
||||
- field: db_name
|
||||
@@ -361,11 +400,13 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 数据库名称
|
||||
en-US: Database Name
|
||||
ja-JP: データベース名
|
||||
- field: active
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 活动连接
|
||||
en-US: Active Connection
|
||||
ja-JP: 活躍的な接続
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -383,6 +424,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 元组信息
|
||||
en-US: Tuple Info
|
||||
ja-JP: 組情報
|
||||
priority: 7
|
||||
fields:
|
||||
- field: fetched
|
||||
@@ -390,26 +432,31 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 获取次数
|
||||
en-US: Fetched
|
||||
ja-JP: フェッチ回数
|
||||
- field: returned
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 返回次数
|
||||
en-US: Returned
|
||||
ja-JP: 戻る回数
|
||||
- field: inserted
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 插入次数
|
||||
en-US: Inserted
|
||||
ja-JP: インサート回数
|
||||
- field: updated
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 更新次数
|
||||
en-US: Updated
|
||||
ja-JP: 更新回数
|
||||
- field: deleted
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 删除次数
|
||||
en-US: Deleted
|
||||
ja-JP: 削除回数
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -427,6 +474,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 临时文件
|
||||
en-US: Temp File
|
||||
ja-JP: 一時ファイル
|
||||
priority: 8
|
||||
fields:
|
||||
- field: db_name
|
||||
@@ -435,17 +483,20 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 数据库名称
|
||||
en-US: Database Name
|
||||
ja-JP: データベース名
|
||||
- field: num
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 次数
|
||||
en-US: Num
|
||||
- field: size
|
||||
ja-JP: 数量
|
||||
- field: Size
|
||||
type: 0
|
||||
unit: B
|
||||
i18n:
|
||||
zh-CN: 大小
|
||||
en-US: Size
|
||||
ja-JP: サイズ
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -463,6 +514,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 锁信息
|
||||
en-US: Lock Info
|
||||
ja-JP: ロック情報
|
||||
priority: 9
|
||||
fields:
|
||||
- field: db_name
|
||||
@@ -471,18 +523,21 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 数据库名称
|
||||
en-US: Database Name
|
||||
ja-JP: データベース名
|
||||
- field: conflicts
|
||||
type: 0
|
||||
unit: times
|
||||
i18n:
|
||||
zh-CN: 冲突次数
|
||||
en-US: Conflicts
|
||||
ja-JP: コンフリクト回数
|
||||
- field: deadlocks
|
||||
type: 0
|
||||
unit: times
|
||||
i18n:
|
||||
zh-CN: 死锁次数
|
||||
en-US: Deadlocks
|
||||
ja-JP: デッドロック回数
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -500,6 +555,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 慢查询
|
||||
en-US: Slow Sql
|
||||
ja-JP: スローSQL
|
||||
priority: 10
|
||||
fields:
|
||||
- field: sql_text
|
||||
@@ -508,28 +564,33 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: SQL语句
|
||||
en-US: SQL Text
|
||||
ja-JP: SQL文のテキスト
|
||||
- field: calls
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 调用次数
|
||||
en-US: Calls
|
||||
ja-JP: コール回数
|
||||
- field: rows
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 行数
|
||||
en-US: Rows
|
||||
ja-JP: 行
|
||||
- field: avg_time
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 平均时间
|
||||
en-US: Avg Time
|
||||
ja-JP: 平均時間
|
||||
- field: total_time
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: 总时间
|
||||
en-US: Total Time
|
||||
ja-JP: 合計時間
|
||||
aliasFields:
|
||||
- query
|
||||
- calls
|
||||
@@ -557,6 +618,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 事务信息
|
||||
en-US: Transaction Info
|
||||
ja-JP: トランザクション情報
|
||||
priority: 11
|
||||
fields:
|
||||
- field: db_name
|
||||
@@ -565,18 +627,21 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 数据库名称
|
||||
en-US: Database Name
|
||||
ja-JP: データベース名
|
||||
- field: commits
|
||||
type: 0
|
||||
unit: times
|
||||
i18n:
|
||||
zh-CN: 提交次数
|
||||
en-US: Commits
|
||||
ja-JP: コミット回数
|
||||
- field: rollbacks
|
||||
type: 0
|
||||
unit: times
|
||||
i18n:
|
||||
zh-CN: 回滚次数
|
||||
en-US: Rollbacks
|
||||
ja-JP: ロールバック回数
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -594,6 +659,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 冲突信息
|
||||
en-US: Conflicts Info
|
||||
ja-JP: コンフリクト情報
|
||||
priority: 12
|
||||
fields:
|
||||
- field: db_name
|
||||
@@ -602,31 +668,37 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 数据库名称
|
||||
en-US: Database Name
|
||||
ja-JP: データベース名
|
||||
- field: tablespace
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 表空间
|
||||
en-US: Tablespace
|
||||
ja-JP: 表領域
|
||||
- field: lock
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 锁
|
||||
en-US: Lock
|
||||
ja-JP: ロック
|
||||
- field: snapshot
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 快照
|
||||
en-US: Snapshot
|
||||
ja-JP: スナップショット
|
||||
- field: bufferpin
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 缓冲区
|
||||
en-US: Bufferpin
|
||||
ja-JP: バッファ
|
||||
- field: deadlock
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 死锁
|
||||
en-US: Deadlock
|
||||
ja-JP: デッドロック
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -644,6 +716,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 缓存命中率
|
||||
en-US: Cache Hit Ratio
|
||||
ja-JP: キャッシュ命中率
|
||||
priority: 13
|
||||
fields:
|
||||
- field: db_name
|
||||
@@ -652,12 +725,14 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 数据库名称
|
||||
en-US: Database Name
|
||||
ja-JP: データベース名
|
||||
- field: ratio
|
||||
type: 0
|
||||
unit: '%'
|
||||
i18n:
|
||||
zh-CN: 命中率
|
||||
en-US: Hit Ratio
|
||||
ja-JP: 命中率
|
||||
aliasFields:
|
||||
- blks_hit
|
||||
- blks_read
|
||||
@@ -681,6 +756,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: Checkpoint信息
|
||||
en-US: Checkpoint Info
|
||||
ja-JP: チェックポイント情報
|
||||
priority: 14
|
||||
fields:
|
||||
- field: checkpoint_sync_time
|
||||
@@ -689,12 +765,14 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: Checkpoint同步时间
|
||||
en-US: Checkpoint Sync Time
|
||||
ja-JP: チェックポイント同期時間
|
||||
- field: checkpoint_write_time
|
||||
type: 0
|
||||
unit: ms
|
||||
i18n:
|
||||
zh-CN: Checkpoint写入时间
|
||||
en-US: Checkpoint Write Time
|
||||
ja-JP: Checkpoint書き込まれた時間
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
@@ -712,6 +790,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: Buffer信息
|
||||
en-US: Buffer Info
|
||||
ja-JP: バッファ情報
|
||||
priority: 15
|
||||
fields:
|
||||
- field: allocated
|
||||
@@ -719,26 +798,31 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 已分配
|
||||
en-US: Allocated
|
||||
ja-JP: 割り当てバッファ
|
||||
- field: fsync_calls_by_backend
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 后端进程直接执行的文件同步调用次数
|
||||
en-US: Fsync Calls By Backend
|
||||
ja-JP: バックエンド同期コール回数
|
||||
- field: written_directly_by_backend
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 后台写入到数据文件
|
||||
en-US: Written Directly By Backend
|
||||
ja-JP: バックエンドによる直接書き込まれたファイル
|
||||
- field: written_by_background_writer
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 后台写入
|
||||
en-US: Written By Background Writer
|
||||
ja-JP: バックグラウンドライターに書き込まれた
|
||||
- field: written_during_checkpoints
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 检查点期间写入
|
||||
en-US: Written During Checkpoints
|
||||
ja-JP: チェックポイント中の書き込み
|
||||
protocol: jdbc
|
||||
jdbc:
|
||||
host: ^_^host^_^
|
||||
|
||||
@@ -21,11 +21,13 @@ app: windows
|
||||
name:
|
||||
zh-CN: Windows操作系统
|
||||
en-US: OS Windows
|
||||
ja-JP: Windowsオーエス
|
||||
# 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-snmp'> SNMP 协议</a> 对 Windows操作系统 的通用指标(用户数、进程数量、响应时间等)进行采集监控。<br><span class='help_module_span'>注意⚠️:Windows 服务器需要开启 SNMP 服务,<a class='help_module_content' href='https://learn.microsoft.com/zh-cn/troubleshoot/windows-server/networking/configure-snmp-service'>点击查看开启步骤</a>。</span>您可以点击 “<i>新建 Windows操作系统</i>” 并进行配置SNMP相关参数添加,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: HertzBeat uses <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-snmp'> SNMP Protocol</a> to monitoring OS Windows general performance metrics such as number of users, number of processes, response time. <br><span class='help_module_span'>Note⚠️:Windows server need enable the SNMP services <a class='help_module_content' href='https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-snmp-service'>Click here to view the specific steps.</a></span> You can click the "<i>New OS Windows</i>" button and config snmp params to add monitor 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-snmp'> SNMP 协议</a> 对 Windows操作系统 的通用指标(用户数、进程数量、响应时间等)进行采集监控。<br><span class='help_module_span'>注意⚠️:Windows 服务器需要开启 SNMP 服务,<a class='help_module_content' href='https://learn.microsoft.com/zh-cn/troubleshoot/windows-server/networking/configure-snmp-service'>点击查看开启步骤</a>。</span>您可以点击 “<i>新建 Windows操作系统</i>” 并进行配置SNMP相关参数添加,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
ja-JP: Hertzbeat は <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-snmp'> SNMP プロトコルを介して</a> Windowsオーエスの一般的なメトリクスを監視します。<br><span class='help_module_span'>注意⚠️:Windowsサーバー で SNMP サービスを有効にする必要があります,<a class='help_module_content' href='https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-snmp-service'>クリックしてガイドを見ます</a>。<br>「<i>新規 Windowsオーエス</i>」をクリックしてSNMPなどのパラメタを設定した後、新規することができます。
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/windows
|
||||
en-US: https://hertzbeat.apache.org/docs/help/windows
|
||||
@@ -37,6 +39,7 @@ params:
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
ja-JP: 目標ホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
@@ -47,6 +50,7 @@ params:
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -61,6 +65,7 @@ params:
|
||||
name:
|
||||
zh-CN: SNMP 版本
|
||||
en-US: SNMP Version
|
||||
ja-JP: SNMPバージョン
|
||||
# type-param field type(radio mapping the html radio tag)
|
||||
type: radio
|
||||
# required-true or false
|
||||
@@ -77,6 +82,7 @@ params:
|
||||
name:
|
||||
zh-CN: SNMP 团体字
|
||||
en-US: SNMP Community
|
||||
ja-JP: SNMPコミュニティ
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: text
|
||||
# when type is text, use limit to limit string length
|
||||
@@ -96,6 +102,7 @@ params:
|
||||
name:
|
||||
zh-CN: 超时时间(ms)
|
||||
en-US: Timeout(ms)
|
||||
ja-JP: タイムアウト(ms)
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -113,6 +120,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 系统
|
||||
en-US: System
|
||||
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
|
||||
@@ -122,47 +130,56 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 名称
|
||||
en-US: Name
|
||||
ja-JP: 名前
|
||||
- field: descr
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 描述
|
||||
en-US: Description
|
||||
ja-JP: 説明
|
||||
- field: uptime
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 运行时间
|
||||
en-US: Uptime
|
||||
ja-JP: アップタイム
|
||||
- field: numUsers
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 用户数
|
||||
en-US: Number of Users
|
||||
ja-JP: ユーザー数
|
||||
- field: services
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 服务数
|
||||
en-US: Number of Services
|
||||
ja-JP: サービス数
|
||||
- field: processes
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 进程数
|
||||
en-US: Number of Processes
|
||||
ja-JP: プロセス数
|
||||
- field: responseTime
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 响应时间
|
||||
en-US: Response Time
|
||||
ja-JP: 応答時間
|
||||
unit: ms
|
||||
- field: location
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 位置
|
||||
en-US: Location
|
||||
ja-JP: 位置
|
||||
- field: memory
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 内存
|
||||
en-US: Memory
|
||||
ja-JP: メモリ
|
||||
unit: GB
|
||||
units:
|
||||
- memory=KB->GB
|
||||
@@ -188,6 +205,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 进程
|
||||
en-US: Processes
|
||||
ja-JP: プロセス
|
||||
priority: 1
|
||||
fields:
|
||||
- field: hrSWRunIndex
|
||||
@@ -195,48 +213,57 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 编号
|
||||
en-US: Index
|
||||
ja-JP: 番号
|
||||
- field: hrSWRunName
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 进程名称
|
||||
en-US: Process Name
|
||||
ja-JP: プロセス名
|
||||
label: true
|
||||
- field: hrSWRunID
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 进程 ID
|
||||
en-US: Process ID
|
||||
ja-JP: プロセスID
|
||||
- field: hrSWRunPath
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 进程路径
|
||||
en-US: Process Path
|
||||
ja-JP: プロセスパス
|
||||
- field: hrSWRunParameters
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 进程参数
|
||||
en-US: Process Parameters
|
||||
ja-JP: プロセスパラメータ
|
||||
- field: hrSWRunType
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 进程类型
|
||||
en-US: Process Type
|
||||
ja-JP: プロセスタイプ
|
||||
- field: hrSWRunStatus
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 进程状态
|
||||
en-US: Process Status
|
||||
ja-JP: プロセス状態
|
||||
- field: hrSWRunPerfCPU
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 进程占用 CPU
|
||||
en-US: Process CPU
|
||||
ja-JP: プロセスが使用したCPU
|
||||
unit: 's'
|
||||
- field: hrSWRunPerfMem
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 进程占用内存
|
||||
en-US: Process Memory
|
||||
ja-JP: プロセスが使用したメモリ
|
||||
unit: 'KB'
|
||||
calculates:
|
||||
- hrSWRunPerfCPU = hrSWRunPerfCPU / 100
|
||||
@@ -263,6 +290,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 服务
|
||||
en-US: Services
|
||||
ja-JP: サービス
|
||||
priority: 2
|
||||
fields:
|
||||
- field: svSvcName
|
||||
@@ -270,27 +298,32 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 服务名称
|
||||
en-US: Service Name
|
||||
ja-JP: サービス名
|
||||
label: true
|
||||
- field: svSvcInstalledState
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 服务安装状态
|
||||
en-US: Service Installed State
|
||||
ja-JP: サービスのインストール状態
|
||||
- field: svSvcOperatingState
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 服务运行状态
|
||||
en-US: Service Operating State
|
||||
ja-JP: サービスの実行状態
|
||||
- field: svSvcCanBeUninstalled
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 服务是否可以被卸载
|
||||
en-US: Service Can Be Uninstalled
|
||||
ja-JP: サービスはアンインストールできる
|
||||
- field: svSvcCanBePaused
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 服务是否可以被暂停
|
||||
en-US: Service Can Be Paused
|
||||
ja-JP: サービスは一時停止できる
|
||||
protocol: snmp
|
||||
snmp:
|
||||
host: ^_^host^_^
|
||||
@@ -310,29 +343,34 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 安装
|
||||
en-US: Installed
|
||||
ja-JP: インストール
|
||||
priority: 3
|
||||
fields:
|
||||
- field: hrSWInstalledIndex
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 编号
|
||||
en-US: 编号
|
||||
en-US: Index
|
||||
ja-JP: 番号
|
||||
- field: hrSWInstalledName
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 安装名称
|
||||
en-US: Installed Name
|
||||
ja-JP: インストール名
|
||||
label: true
|
||||
- field: hrSWInstalledID
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 安装 ID
|
||||
en-US: Installed ID
|
||||
ja-JP: インストールID
|
||||
- field: hrSWInstalledType
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 安装类型
|
||||
en-US: Installed Type
|
||||
ja-JP: インストールタイプ
|
||||
protocol: snmp
|
||||
snmp:
|
||||
host: ^_^host^_^
|
||||
@@ -351,23 +389,27 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 存储
|
||||
en-US: Storages
|
||||
ja-JP: ストレージ
|
||||
priority: 5
|
||||
fields:
|
||||
- field: index
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 编号
|
||||
en-US: 编号
|
||||
en-US: Index
|
||||
ja-JP: 番号
|
||||
- field: descr
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 存储描述
|
||||
en-US: Storage Description
|
||||
ja-JP: ストレージ説明
|
||||
label: true
|
||||
- field: size
|
||||
- field: Size
|
||||
i18n:
|
||||
zh-CN: 存储大小
|
||||
en-US: Storage Size
|
||||
ja-JP: ストレージサイズ
|
||||
type: 0
|
||||
unit: Mb
|
||||
- field: free
|
||||
@@ -375,18 +417,21 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 存储空闲
|
||||
en-US: Storage Free
|
||||
ja-JP: 空きストレージ
|
||||
unit: Mb
|
||||
- field: used
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 存储占用
|
||||
en-US: Storage Used
|
||||
ja-JP: 使用したストレージ
|
||||
unit: Mb
|
||||
- field: usage
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 存储使用率
|
||||
en-US: Storage Usage
|
||||
ja-JP: ストレージ使用率
|
||||
unit: '%'
|
||||
# (Not required) Monitor indicator alias, which maps to the indicator name above. The field used to collect interface data is not directly the final indicator name, and this alias is required for mapping translation
|
||||
aliasFields:
|
||||
@@ -400,7 +445,7 @@ metrics:
|
||||
calculates:
|
||||
- index=hrStorageIndex
|
||||
- descr=hrStorageDescr
|
||||
- size=hrStorageSize * hrStorageAllocationUnits
|
||||
- Size=hrStorageSize * hrStorageAllocationUnits
|
||||
- free=(hrStorageSize - hrStorageUsed) * hrStorageAllocationUnits
|
||||
- used=hrStorageUsed * hrStorageAllocationUnits
|
||||
- usage= hrStorageUsed / hrStorageSize * 100
|
||||
@@ -428,6 +473,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 接口详情
|
||||
en-US: Interfaces Detail
|
||||
ja-JP: ネットワークカード詳細
|
||||
priority: 8
|
||||
fields:
|
||||
- field: index
|
||||
@@ -435,65 +481,77 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 编号
|
||||
en-US: Index
|
||||
ja-JP: 番号
|
||||
- field: descr
|
||||
type: 1
|
||||
label: true
|
||||
i18n:
|
||||
zh-CN: 接口名称
|
||||
en-US: Interface Name
|
||||
ja-JP: ネットワークカード名
|
||||
- field: speed
|
||||
type: 0
|
||||
unit: 'Mbps'
|
||||
i18n:
|
||||
zh-CN: 接口速率
|
||||
en-US: Interface Speed
|
||||
ja-JP: ネットワークカード速度
|
||||
- field: in_octets
|
||||
type: 0
|
||||
unit: 'Kbps'
|
||||
i18n:
|
||||
zh-CN: 入流量
|
||||
en-US: In Octets
|
||||
ja-JP: 受信されたバイト数
|
||||
- field: out_octets
|
||||
type: 0
|
||||
unit: 'Kbps'
|
||||
i18n:
|
||||
zh-CN: 出流量
|
||||
en-US: Out Octets
|
||||
ja-JP: 転送されたバイト数
|
||||
- field: admin_status
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 配置状态
|
||||
en-US: Config Status
|
||||
ja-JP: 設定ステータス
|
||||
- field: oper_status
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 当前状态
|
||||
en-US: Current Status
|
||||
ja-JP: 現在のステータス
|
||||
- field: mtu
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: MTU
|
||||
en-US: MTU
|
||||
ja-JP: MTU
|
||||
- field: in_discards
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 入丢包数
|
||||
en-US: In Discards
|
||||
ja-JP: 受信されたパケットのロス数
|
||||
- field: in_errors
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 入错包数
|
||||
en-US: In Errors
|
||||
ja-JP: 受信異常パケット数
|
||||
- field: out_discards
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 出丢包数
|
||||
en-US: Out Discards
|
||||
ja-JP: 転送されたパケットロス数
|
||||
- field: out_errors
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 出错包数
|
||||
en-US: Out Errors
|
||||
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:
|
||||
- ifIndex
|
||||
@@ -555,6 +613,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 设备
|
||||
en-US: Devices
|
||||
ja-JP: デバイス
|
||||
priority: 9
|
||||
fields:
|
||||
- field: index
|
||||
@@ -562,17 +621,20 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 编号
|
||||
en-US: Index
|
||||
ja-JP: 番号
|
||||
label: true
|
||||
- field: descr
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 描述
|
||||
en-US: Description
|
||||
ja-JP: 説明
|
||||
- field: status
|
||||
type: 1
|
||||
i18n:
|
||||
zh-CN: 状态
|
||||
en-US: Status
|
||||
ja-JP: 状態
|
||||
aliasFields:
|
||||
- hrDeviceIndex
|
||||
- hrDeviceDescr
|
||||
|
||||
@@ -21,11 +21,13 @@ app: yarn
|
||||
name:
|
||||
zh-CN: Apache Yarn
|
||||
en-US: Apache Yarn
|
||||
ja-JP: Apache Yarn
|
||||
# The description and help of this monitoring type
|
||||
help:
|
||||
zh-CN: Hertzbeat 对 Yarn 节点监控指标进行监控。<br>您可以点击 “<i>新建 Apache Yarn</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
|
||||
en-US: Hertzbeat monitors the Yarn metrics. <br>You can click "<i>New Apache Yarn</i>" to configure, or select "<i>More Actions</i>" to import an existing configuration.
|
||||
zh-TW: Hertzbeat 對 Yarn 節點監控指標進行監控。<br>您可以點擊 “<i>新建 Apache Yarn</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
|
||||
ja-JP: Hertzbeat は Yarnノードの一般的なメトリクスを監視します。<br>「<i>新規 Yarn</i>」をクリックしてパラメタを設定した後、新規することができます。
|
||||
|
||||
helpLink:
|
||||
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/yarn/
|
||||
@@ -38,6 +40,7 @@ params:
|
||||
name:
|
||||
zh-CN: 目标Host
|
||||
en-US: Target Host
|
||||
ja-JP: 目標ホスト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: host
|
||||
# required-true or false
|
||||
@@ -48,6 +51,7 @@ params:
|
||||
name:
|
||||
zh-CN: 端口
|
||||
en-US: Port
|
||||
ja-JP: ポート
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# when type is number, range is required
|
||||
@@ -62,6 +66,7 @@ params:
|
||||
name:
|
||||
zh-CN: 查询超时时间
|
||||
en-US: Query Timeout
|
||||
ja-JP: クエリタイムアウト
|
||||
# type-param field type(most mapping the html input type)
|
||||
type: number
|
||||
# required-true or false
|
||||
@@ -74,6 +79,10 @@ params:
|
||||
metrics:
|
||||
# metrics - Server
|
||||
- name: ClusterMetrics
|
||||
i18n:
|
||||
zh-CN: 集群指标
|
||||
en-US: Cluster Metrics
|
||||
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
|
||||
@@ -85,30 +94,35 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 当前存活的 NodeManager 个数
|
||||
en-US: NumActiveNMs
|
||||
ja-JP: アクティブなNodeManager総数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: NumDecommissionedNMs
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 当前 Decommissioned 的 NodeManager 个数
|
||||
en-US: NumDecommissionedNMs
|
||||
ja-JP: オフラインしたNodeManager数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: NumDecommissioningNMs
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 集群正在下线的节点数
|
||||
en-US: NumDecommissioningNMs
|
||||
ja-JP: オフライン中のNodeManager数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: NumLostNMs
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 集群丢失的节点数
|
||||
en-US: NumLostNMs
|
||||
ja-JP: ロストしたNodeManager数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: NumUnhealthyNMs
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 集群不健康的节点数
|
||||
en-US: NumUnhealthyNMs
|
||||
ja-JP: 不健全なNodeManager数
|
||||
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
|
||||
aliasFields:
|
||||
- $.NumActiveNMs
|
||||
@@ -136,6 +150,10 @@ metrics:
|
||||
parseType: jsonPath
|
||||
parseScript: '$.beans[?(@.name == "Hadoop:service=ResourceManager,name=ClusterMetrics")]'
|
||||
- name: JvmMetrics
|
||||
i18n:
|
||||
zh-CN: JVM指标
|
||||
en-US: Jvm Metrics
|
||||
ja-JP: Java仮想マシンのメトリクス
|
||||
# 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
|
||||
@@ -149,6 +167,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: JVM当前非堆内存大小已提交大小
|
||||
en-US: MemNonHeapCommittedM
|
||||
ja-JP: コミットされたノンヒープメモリのサイズ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: MemNonHeapMaxM
|
||||
type: 0
|
||||
@@ -156,6 +175,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: JVM非堆最大可用内存
|
||||
en-US: MemNonHeapMaxM
|
||||
ja-JP: 使用可能なノンヒープメモリの最大サイズ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: MemNonHeapUsedM
|
||||
type: 0
|
||||
@@ -163,6 +183,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: JVM当前已使用的非堆内存大小
|
||||
en-US: MemNonHeapUsedM
|
||||
ja-JP: 使用したノンヒープメモリのサイズ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: MemHeapCommittedM
|
||||
type: 0
|
||||
@@ -170,6 +191,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: JVM当前已使用堆内存大小
|
||||
en-US: MemHeapCommittedM
|
||||
ja-JP: コミットされたヒープメモリのサイズ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: MemHeapMaxM
|
||||
type: 0
|
||||
@@ -177,6 +199,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: JVM堆内存最大可用内存
|
||||
en-US: MemHeapMaxM
|
||||
ja-JP: 配置のヒープメモリのサイズ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: MemHeapUsedM
|
||||
type: 0
|
||||
@@ -184,18 +207,21 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: JVM当前已使用堆内存大小
|
||||
en-US: MemHeapUsedM
|
||||
ja-JP: 使用したヒープメモリのサイズ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: GcTimeMillis
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: JVM GC时间
|
||||
en-US: GcTimeMillis
|
||||
ja-JP: GC時間
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: GcCount
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: JVM GC次数
|
||||
en-US: GcCount
|
||||
ja-JP: GC回数
|
||||
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
|
||||
aliasFields:
|
||||
- $.MemNonHeapCommittedM
|
||||
@@ -225,6 +251,10 @@ metrics:
|
||||
parseType: jsonPath
|
||||
parseScript: '$.beans[?(@.name == "Hadoop:service=ResourceManager,name=JvmMetrics")]'
|
||||
- name: QueueMetrics
|
||||
i18n:
|
||||
zh-CN: 队列指标
|
||||
en-US: Queue Metrics
|
||||
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
|
||||
@@ -238,30 +268,35 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 队列名称
|
||||
en-US: queue
|
||||
ja-JP: キュー
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AllocatedVCores
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 分配的虚拟核数(已分配)
|
||||
en-US: AllocatedVCores
|
||||
ja-JP: 割り当てられたコア数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: ReservedVCores
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 预留核数
|
||||
en-US: ReservedVCores
|
||||
ja-JP: 予約されているコア数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AvailableVCores
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 可用核数(尚未分配)
|
||||
en-US: AvailableVCores
|
||||
ja-JP: 利用可能なコア数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: PendingVCores
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 阻塞调度核数
|
||||
en-US: PendingVCores
|
||||
ja-JP: 保留中のコア数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AllocatedMB
|
||||
type: 0
|
||||
@@ -269,6 +304,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 已分配(已用)的内存大小
|
||||
en-US: AllocatedMB
|
||||
ja-JP: 割り当てられたメモリ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AvailableMB
|
||||
type: 0
|
||||
@@ -276,6 +312,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 可用内存(尚未分配)
|
||||
en-US: AvailableMB
|
||||
ja-JP: 使用可能なメモリ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: PendingMB
|
||||
type: 0
|
||||
@@ -283,6 +320,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 阻塞调度内存
|
||||
en-US: PendingMB
|
||||
ja-JP: 保留中のメモリ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: ReservedMB
|
||||
type: 0
|
||||
@@ -290,96 +328,112 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 预留内存
|
||||
en-US: ReservedMB
|
||||
ja-JP: 予約されているメモリ
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AllocatedContainers
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 已分配(已用)的container数
|
||||
en-US: AllocatedContainers
|
||||
ja-JP: 割り当てられたコンテナ数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: PendingContainers
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 阻塞调度container个数
|
||||
en-US: PendingContainers
|
||||
ja-JP: 保留中のコンテナ数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: ReservedContainers
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 预留container数
|
||||
en-US: ReservedContainers
|
||||
ja-JP: 予約されているコンテナ数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AggregateContainersAllocated
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 累积的container分配总数
|
||||
en-US: AggregateContainersAllocated
|
||||
ja-JP: 割り当てられたコンテナ総数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AggregateContainersReleased
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 累积的container释放总数
|
||||
en-US: AggregateContainersReleased
|
||||
ja-JP: リリースされたコンテナ総数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AppsCompleted
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 完成的任务数
|
||||
en-US: AppsCompleted
|
||||
ja-JP: 完了したタスク数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AppsKilled
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 被杀掉的任务数
|
||||
en-US: AppsKilled
|
||||
ja-JP: 終了したタスク数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AppsFailed
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 失败的任务数
|
||||
en-US: AppsFailed
|
||||
ja-JP: 失敗したタスク数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AppsPending
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 阻塞的任务数
|
||||
en-US: AppsPending
|
||||
ja-JP: ブロックされたタスク数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AppsRunning
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 提正在运行的任务数
|
||||
en-US: AppsRunning
|
||||
ja-JP: 実行中のタスク数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: AppsSubmitted
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 提交过的任务数
|
||||
en-US: AppsSubmitted
|
||||
ja-JP: 提出されたタスク数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: running_0
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 运行时间小于60分钟的作业个数
|
||||
en-US: running_0
|
||||
ja-JP: 実行時間60分未満のタスク数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: running_60
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 运行时间介于60~300分钟的作业个数
|
||||
en-US: running_60
|
||||
ja-JP: 実行時間が60分以上300分未満のタスク数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: running_300
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 运行时间介于300~1440分钟的作业个数
|
||||
en-US: running_300
|
||||
ja-JP: 実行時間が300分以上1440分未満のタスク数
|
||||
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
|
||||
- field: running_1440
|
||||
type: 0
|
||||
i18n:
|
||||
zh-CN: 运行时间大于1440分钟的作业个数
|
||||
en-US: running_1440
|
||||
ja-JP: 実行時間が1440分以上のタスク数
|
||||
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
|
||||
aliasFields:
|
||||
- $.['tag.Queue']
|
||||
@@ -442,6 +496,10 @@ metrics:
|
||||
parseScript: '$.beans[?(@.name =~ /Hadoop:service=ResourceManager,name=QueueMetrics.*/)]'
|
||||
|
||||
- name: runtime
|
||||
i18n:
|
||||
zh-CN: 运行时信息
|
||||
en-US: Runtime
|
||||
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: 3
|
||||
@@ -453,6 +511,7 @@ metrics:
|
||||
i18n:
|
||||
zh-CN: 启动时间戳
|
||||
en-US: StartTime
|
||||
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:
|
||||
- $.StartTime
|
||||
|
||||
@@ -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
|
||||
|
||||
+5
-7
@@ -25,8 +25,10 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.hertzbeat.common.constants.CommonConstants;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageComponent;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageIncident;
|
||||
@@ -219,14 +221,10 @@ class StatusPageControllerTest {
|
||||
|
||||
@Test
|
||||
public void testQueryStatusPageIncident() throws Exception {
|
||||
|
||||
List<StatusPageIncident> incidents = Collections.singletonList(new StatusPageIncident());
|
||||
when(statusPageService.queryStatusPageIncidents()).thenReturn(incidents);
|
||||
|
||||
mockMvc.perform(get("/api/status/page/incident")
|
||||
.accept(MediaType.APPLICATION_JSON))
|
||||
mockMvc.perform(get("/api/status/page/incident?pageIndex=0&pageSize=10"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE));
|
||||
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE))
|
||||
.andReturn();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-6
@@ -22,10 +22,11 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.hertzbeat.common.constants.CommonConstants;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageIncident;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageOrg;
|
||||
import org.apache.hertzbeat.manager.pojo.dto.ComponentStatus;
|
||||
import org.apache.hertzbeat.manager.service.StatusPageService;
|
||||
@@ -110,11 +111,7 @@ class StatusPagePublicControllerTest {
|
||||
@Test
|
||||
public void testQueryStatusPageIncident() throws Exception {
|
||||
|
||||
List<StatusPageIncident> incidents = Collections.singletonList(new StatusPageIncident());
|
||||
when(statusPageService.queryStatusPageIncidents()).thenReturn(incidents);
|
||||
|
||||
mockMvc.perform(get("/api/status/page/public/incident")
|
||||
.accept(MediaType.APPLICATION_JSON))
|
||||
mockMvc.perform(get("/api/status/page/public/incident"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value((int) CommonConstants.SUCCESS_CODE));
|
||||
}
|
||||
|
||||
+9
-8
@@ -18,11 +18,15 @@
|
||||
package org.apache.hertzbeat.manager.service;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.doNothing;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageComponent;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageIncident;
|
||||
import org.apache.hertzbeat.common.entity.manager.StatusPageOrg;
|
||||
@@ -38,7 +42,9 @@ import org.junit.jupiter.api.Test;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
|
||||
/**
|
||||
* test case for {@link StatusPageServiceImpl}
|
||||
@@ -121,13 +127,8 @@ class StatusPageServiceTest {
|
||||
@Test
|
||||
void testQueryStatusPageIncidents() {
|
||||
|
||||
StatusPageIncident incident = new StatusPageIncident();
|
||||
when(statusPageIncidentDao.findAll(Sort.by(Sort.Direction.DESC, "startTime"))).thenReturn(List.of(incident));
|
||||
|
||||
List<StatusPageIncident> incidents = statusPageService.queryStatusPageIncidents();
|
||||
|
||||
assertEquals(1, incidents.size());
|
||||
assertEquals(incident, incidents.get(0));
|
||||
when(statusPageIncidentDao.findAll(any(Specification.class), any(PageRequest.class))).thenReturn(Page.empty());
|
||||
assertNotNull(statusPageService.queryStatusPageIncidents(null, null, null, 1, 10));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+42
-14
@@ -36,6 +36,7 @@ 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;
|
||||
@@ -106,8 +107,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) {
|
||||
@@ -129,8 +130,8 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
|
||||
thread.setDaemon(true);
|
||||
return thread;
|
||||
}, 1, TimeUnit.SECONDS, 512);
|
||||
metricsFlushtask = new MetricsFlushTask();
|
||||
this.metricsFlushTimer.newTimeout(metricsFlushtask, 0, TimeUnit.SECONDS);
|
||||
// start flush interval timer
|
||||
this.metricsFlushTimer.newTimeout(new MetricsFlushTask(null), insertConfig.flushInterval(), TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
private boolean checkVictoriaMetricsDatasourceAvailable() {
|
||||
@@ -591,36 +592,63 @@ public class VictoriaMetricsDataStorage extends AbstractHistoryDataStorage {
|
||||
}
|
||||
}
|
||||
// Refresh in advance to avoid waiting
|
||||
if (metricsBufferQueue.size() >= insertConfig.bufferSize() * 0.8) {
|
||||
if (metricsBufferQueue.size() >= insertConfig.bufferSize() * 0.8
|
||||
&& draining.compareAndSet(false, true)) {
|
||||
triggerImmediateFlush();
|
||||
}
|
||||
}
|
||||
|
||||
private void triggerImmediateFlush() {
|
||||
metricsFlushTimer.newTimeout(metricsFlushtask, 0, TimeUnit.MILLISECONDS);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 {
|
||||
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());
|
||||
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);
|
||||
}
|
||||
} 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+70
-46
@@ -21,9 +21,8 @@ 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.mockito.Mockito.times;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.apache.arrow.vector.types.pojo.ArrowType;
|
||||
import org.apache.arrow.vector.types.pojo.Field;
|
||||
@@ -53,6 +52,7 @@ 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,18 +72,33 @@ 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(anyString(), any(HttpEntity.class), eq(String.class)))
|
||||
.thenReturn(responseEntity);
|
||||
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -92,14 +107,11 @@ 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
|
||||
Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() ->
|
||||
verify(restTemplate, times(1)).postForEntity(
|
||||
startsWith(victoriaMetricsProperties.url()),
|
||||
any(HttpEntity.class),
|
||||
eq(String.class)
|
||||
)
|
||||
);
|
||||
// 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));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -109,28 +121,15 @@ 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 again
|
||||
Awaitility.await().atMost(5, TimeUnit.SECONDS).untilAsserted(() ->
|
||||
verify(restTemplate, times(2)).postForEntity(
|
||||
startsWith(victoriaMetricsProperties.url()),
|
||||
any(HttpEntity.class),
|
||||
eq(String.class)
|
||||
)
|
||||
);
|
||||
// wait for the timer to execute the task
|
||||
Awaitility.await()
|
||||
.pollInterval(1, TimeUnit.SECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.untilAsserted(() -> assertThat(postForEntityCount.get()).isEqualTo(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -142,22 +141,47 @@ class VictoriaMetricsDataStorageTest {
|
||||
|
||||
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)
|
||||
)
|
||||
);
|
||||
Awaitility.await()
|
||||
.pollInterval(500, TimeUnit.MILLISECONDS)
|
||||
.atMost(5, TimeUnit.SECONDS)
|
||||
.untilAsserted(() -> assertThat(postForEntityCount.get()).isEqualTo(1));
|
||||
|
||||
victoriaMetricsDataStorage.saveData(generateMockedMetricsData());
|
||||
// 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)
|
||||
));
|
||||
// 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));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Cloud Monitoring System HertzBeat v1.0 Officially Released
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Cloud Monitoring System HertzBeat v1.1.0 Released! Start Your Monitoring
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: HertzBeat Monitoring System v1.1.0 Released! Start Your Monitoring Journe
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: HertzBeat v1.1.1 is Publish!
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Cloud monitoring system HertzBeat v1.1.3 released!
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Best Practices for SSL Certificate Expiration Monitoring
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource, practice]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: HertzBeat v1.2.0 Released! Easy-to-use and friendly open source real-time
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: HertzBeat v1.2.2!Support 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]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: 恭喜 HertzBeat 迎来了两位新晋社区Committer
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: HertzBeat v1.2.3!Support 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]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Use HertzBeat Monitoring IoTDB
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource, practice]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: HertzBeat's Monitoring Practice for API Gateway Apache ShenYu
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource, practice]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Monitoring Practices for DynamicTp Thread Pooling Framework with HertzBea
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource, practice]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Welcome two new Committers from HertzBeat
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource]
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Use the open source real-time monitoring tool HertzBeat to monitor and al
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource, practice]
|
||||
Keywords: [Open source monitoring tool, open source database monitoring, Mysql database monitoring]
|
||||
---
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Monitoring Linux Operating Systems Using Open Source Real-Time Monitoring
|
||||
author: tom
|
||||
author_title: tom
|
||||
author_url: https://github.com/tomsun28
|
||||
author_image_url: https://avatars.githubusercontent.com/u/24788200?s=400&v=4
|
||||
tags: [opensource, practice]
|
||||
keywords: [Open source monitoring tool, operating system monitoring, Linux monitoring]
|
||||
---
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user