diff --git a/collector/src/main/java/org/dromara/hertzbeat/collector/collect/telnet/TelnetCollectImpl.java b/collector/src/main/java/org/dromara/hertzbeat/collector/collect/telnet/TelnetCollectImpl.java index 42a5c8569f2..dd0f850a1c1 100644 --- a/collector/src/main/java/org/dromara/hertzbeat/collector/collect/telnet/TelnetCollectImpl.java +++ b/collector/src/main/java/org/dromara/hertzbeat/collector/collect/telnet/TelnetCollectImpl.java @@ -87,7 +87,7 @@ public void collect(CollectRep.MetricsData.Builder builder, long appId, String a builder.addValues(valueRowBuilder.build()); } else { builder.setCode(CollectRep.Code.UN_CONNECTABLE); - builder.setMsg("对端连接失败,Timeout " + timeout + "ms"); + builder.setMsg("Peer connect failed,Timeout " + timeout + "ms"); return; } telnetClient.disconnect(); @@ -100,7 +100,7 @@ public void collect(CollectRep.MetricsData.Builder builder, long appId, String a String errorMsg = CommonUtil.getMessageFromThrowable(ioException); log.info(errorMsg); builder.setCode(CollectRep.Code.UN_CONNECTABLE); - builder.setMsg("Peer connection failed: " + errorMsg); + builder.setMsg("Peer connect failed: " + errorMsg); } catch (Exception e) { String errorMsg = CommonUtil.getMessageFromThrowable(e); log.warn(errorMsg, e); diff --git a/collector/src/main/java/org/dromara/hertzbeat/collector/collect/udp/UdpCollectImpl.java b/collector/src/main/java/org/dromara/hertzbeat/collector/collect/udp/UdpCollectImpl.java new file mode 100644 index 00000000000..5e18963c7a6 --- /dev/null +++ b/collector/src/main/java/org/dromara/hertzbeat/collector/collect/udp/UdpCollectImpl.java @@ -0,0 +1,102 @@ +/* + * 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.dromara.hertzbeat.collector.collect.udp; + +import lombok.extern.slf4j.Slf4j; +import org.dromara.hertzbeat.collector.collect.AbstractCollect; +import org.dromara.hertzbeat.collector.dispatch.DispatchConstants; +import org.dromara.hertzbeat.collector.util.CollectUtil; +import org.dromara.hertzbeat.common.constants.CollectorConstants; +import org.dromara.hertzbeat.common.constants.CommonConstants; +import org.dromara.hertzbeat.common.entity.job.Metrics; +import org.dromara.hertzbeat.common.entity.job.protocol.UdpProtocol; +import org.dromara.hertzbeat.common.entity.message.CollectRep; +import org.dromara.hertzbeat.common.util.CommonUtil; + +import java.net.*; +import java.nio.charset.StandardCharsets; + +/** + * udp探测协议采集实现 + * + * @author tom + */ +@Slf4j +public class UdpCollectImpl extends AbstractCollect { + + private static final byte[] HELLO = "hello".getBytes(StandardCharsets.UTF_8); + + public UdpCollectImpl() { + } + + @Override + public void collect(CollectRep.MetricsData.Builder builder, long appId, String app, Metrics metrics) { + long startTime = System.currentTimeMillis(); + // 简单校验必有参数 + if (metrics == null || metrics.getUdp() == null) { + builder.setCode(CollectRep.Code.FAIL); + builder.setMsg("Udp collect must has udp params"); + return; + } + UdpProtocol udpProtocol = metrics.getUdp(); + // 超时时间默认6000毫秒 + int timeout = CollectUtil.getTimeout(udpProtocol.getTimeout()); + try (DatagramSocket socket = new DatagramSocket()) { + socket.setSoTimeout(timeout); + String content = udpProtocol.getContent(); + byte[] buffer = CollectUtil.fromHexString(content); + buffer = buffer == null ? HELLO : buffer; + SocketAddress socketAddress = new InetSocketAddress(udpProtocol.getHost(), Integer.parseInt(udpProtocol.getPort())); + DatagramPacket request = new DatagramPacket(buffer, buffer.length, socketAddress); + socket.send(request); + byte[] responseBuffer = new byte[1]; + DatagramPacket response = new DatagramPacket(responseBuffer, responseBuffer.length); + socket.receive(response); + long responseTime = System.currentTimeMillis() - startTime; + CollectRep.ValueRow.Builder valueRowBuilder = CollectRep.ValueRow.newBuilder(); + for (String alias : metrics.getAliasFields()) { + if (CollectorConstants.RESPONSE_TIME.equalsIgnoreCase(alias)) { + valueRowBuilder.addColumns(Long.toString(responseTime)); + } else { + valueRowBuilder.addColumns(CommonConstants.NULL_VALUE); + } + } + builder.addValues(valueRowBuilder.build()); + } catch (SocketTimeoutException timeoutException) { + String errorMsg = CommonUtil.getMessageFromThrowable(timeoutException); + log.info(errorMsg); + builder.setCode(CollectRep.Code.UN_CONNECTABLE); + builder.setMsg("Peer connect failed: " + errorMsg); + } catch (PortUnreachableException portUnreachableException) { + String errorMsg = CommonUtil.getMessageFromThrowable(portUnreachableException); + log.info(errorMsg); + builder.setCode(CollectRep.Code.UN_AVAILABLE); + builder.setMsg("Peer port unreachable"); + } catch (Exception exception) { + String errorMsg = CommonUtil.getMessageFromThrowable(exception); + log.warn(errorMsg, exception); + builder.setCode(CollectRep.Code.FAIL); + builder.setMsg(errorMsg); + } + } + + @Override + public String supportProtocol() { + return DispatchConstants.PROTOCOL_UDP; + } +} diff --git a/collector/src/main/java/org/dromara/hertzbeat/collector/dispatch/DispatchConstants.java b/collector/src/main/java/org/dromara/hertzbeat/collector/dispatch/DispatchConstants.java index 14020fa82e4..39ce1145913 100644 --- a/collector/src/main/java/org/dromara/hertzbeat/collector/dispatch/DispatchConstants.java +++ b/collector/src/main/java/org/dromara/hertzbeat/collector/dispatch/DispatchConstants.java @@ -35,6 +35,10 @@ public interface DispatchConstants { * protocol telnet */ String PROTOCOL_TELNET = "telnet"; + /** + * protocol udp + */ + String PROTOCOL_UDP = "udp"; /** * protocol jdbc */ @@ -47,15 +51,10 @@ public interface DispatchConstants { * protocol redis */ String PROTOCOL_REDIS = "redis"; - /** * protocol mongodb */ String PROTOCOL_MONGODB = "mongodb"; - /** - * protocol - */ - String PROTOCOL_DM = "dm"; /** * protocol jmx */ diff --git a/collector/src/main/java/org/dromara/hertzbeat/collector/util/CollectUtil.java b/collector/src/main/java/org/dromara/hertzbeat/collector/util/CollectUtil.java index d18c1efb4e5..a05e94b1162 100644 --- a/collector/src/main/java/org/dromara/hertzbeat/collector/util/CollectUtil.java +++ b/collector/src/main/java/org/dromara/hertzbeat/collector/util/CollectUtil.java @@ -41,6 +41,7 @@ public class CollectUtil { private static final int DEFAULT_TIMEOUT = 60000; + private static final int HEX_STR_WIDTH = 2; private static final String SMILING_PLACEHOLDER = "^_^"; private static final String SMILING_PLACEHOLDER_REX = "\\^_\\^"; private static final String SMILING_PLACEHOLDER_REGEX = "(\\^_\\^)(\\w|-|$|\\.)+(\\^_\\^)"; @@ -413,4 +414,27 @@ public static void replaceFieldsForPushStyleMonitor(Metrics metrics, Map 十进制 + bytes[i] = (byte) Integer.parseInt(hex, 16); + } + return bytes; + } } diff --git a/collector/src/main/resources/META-INF/services/org.dromara.hertzbeat.collector.collect.AbstractCollect b/collector/src/main/resources/META-INF/services/org.dromara.hertzbeat.collector.collect.AbstractCollect index 99981b7a192..23332b2feda 100644 --- a/collector/src/main/resources/META-INF/services/org.dromara.hertzbeat.collector.collect.AbstractCollect +++ b/collector/src/main/resources/META-INF/services/org.dromara.hertzbeat.collector.collect.AbstractCollect @@ -10,4 +10,5 @@ org.dromara.hertzbeat.collector.collect.ssh.SshCollectImpl org.dromara.hertzbeat.collector.collect.telnet.TelnetCollectImpl org.dromara.hertzbeat.collector.collect.ftp.FtpCollectImpl org.dromara.hertzbeat.collector.collect.mq.RocketmqSingleCollectImpl -org.dromara.hertzbeat.collector.collect.push.PushCollectImpl \ No newline at end of file +org.dromara.hertzbeat.collector.collect.udp.UdpCollectImpl +org.dromara.hertzbeat.collector.collect.push.PushCollectImpl diff --git a/common/src/main/java/org/dromara/hertzbeat/common/entity/job/Metrics.java b/common/src/main/java/org/dromara/hertzbeat/common/entity/job/Metrics.java index a8525e3742f..44225a9fb0a 100644 --- a/common/src/main/java/org/dromara/hertzbeat/common/entity/job/Metrics.java +++ b/common/src/main/java/org/dromara/hertzbeat/common/entity/job/Metrics.java @@ -119,10 +119,10 @@ public class Metrics { */ private TelnetProtocol telnet; /** - * Use tcp or ucp implemented by socket for service port detection configuration information - * 使用socket实现的tcp或ucp进行服务端口探测配置信息 + * Use udp implemented by socket for service port detection configuration information + * 使用socket实现的udp进行服务端口探测配置信息 */ - private TcpUdpProtocol tcpUdp; + private UdpProtocol udp; /** * Database configuration information implemented using the public jdbc specification * 使用公共的jdbc规范实现的数据库配置信息 diff --git a/common/src/main/java/org/dromara/hertzbeat/common/entity/job/protocol/TcpUdpProtocol.java b/common/src/main/java/org/dromara/hertzbeat/common/entity/job/protocol/UdpProtocol.java similarity index 81% rename from common/src/main/java/org/dromara/hertzbeat/common/entity/job/protocol/TcpUdpProtocol.java rename to common/src/main/java/org/dromara/hertzbeat/common/entity/job/protocol/UdpProtocol.java index a507905e5f1..f09a4708f0b 100644 --- a/common/src/main/java/org/dromara/hertzbeat/common/entity/job/protocol/TcpUdpProtocol.java +++ b/common/src/main/java/org/dromara/hertzbeat/common/entity/job/protocol/UdpProtocol.java @@ -23,7 +23,7 @@ import lombok.NoArgsConstructor; /** - * 使用socket实现的tcp或ucp进行服务端口可用性探测 + * 使用socket实现的udp进行服务端口可用性探测 * @author tomsun28 * */ @@ -31,17 +31,24 @@ @Builder @AllArgsConstructor @NoArgsConstructor -public class TcpUdpProtocol { - /** - * 具体协议类型 tcp, udp - */ - private String protocol; +public class UdpProtocol { /** * 对端主机ip或域名 */ private String host; + /** * 端口号 */ - private Integer port; + private String port; + + /** + * 超时时间 + */ + private String timeout; + + /** + * 自定义协议数据包 hexString 16进制字符串 + */ + private String content; } diff --git a/manager/src/main/resources/define/app-docker.yml b/manager/src/main/resources/define/app-docker.yml index 1c4b4970e88..ae8fbb366f5 100644 --- a/manager/src/main/resources/define/app-docker.yml +++ b/manager/src/main/resources/define/app-docker.yml @@ -29,7 +29,7 @@ name: help: zh-CN: HertzBeat 对 Docker 容器的通用性能指标(system、containers、stats)进行采集监控
⚠️注意:为了监控 Docker 中的容器信息,您需要打开端口,让采集请求获取到对应的信息, 点击查看开启步骤 en-US: "HertzBeat monitors Docker through general performance metrics such as containers, status,
⚠️Note: In order to monitor container information of Docker, you need to enable the port so that the collection request can obtain the corresponding information.Click here to view the specific steps." - zh-TW: HertzBeat對Docker容器的通用性能指標(system、containers、stats)進行採集監控
⚠️ 注意:為了監控Docker中的容器資訊,您需要打開埠,讓採集請求獲取到對應的資訊,點擊查看開啟步驟 + zh-TW: HertzBeat對Docker容器的通用性能指標(system、containers、stats)進行採集監控
⚠️ 注意:為了監控Docker中的容器指標,您需要打開埠,讓採集請求獲取到對應的指標,點擊查看開啟步驟 helpLink: zh-CN: https://hertzbeat.com/zh-cn/docs/help/docker/ en-US: https://hertzbeat.com/docs/help/docker/ diff --git a/manager/src/main/resources/define/app-kubernetes.yml b/manager/src/main/resources/define/app-kubernetes.yml index 12c04faaa53..49ba7619ce7 100644 --- a/manager/src/main/resources/define/app-kubernetes.yml +++ b/manager/src/main/resources/define/app-kubernetes.yml @@ -29,7 +29,7 @@ name: help: zh-CN: HertzBeat 对 kubernetes 的通用性能指标(nodes、namespaces、pods、services)进行采集监控。
⚠️注意:为了监控 Kubernetes 中的信息,则需要获取到可访问 Api Server 的授权 TOKEN,让采集请求获取到对应的信息,点击查看获取步骤 en-US: "HertzBeat monitors kubernetes through general performance metrics such as nodes, namespaces and pods.
⚠️Note: In order to monitor the information of Kubernetes, Hertzbeat need to obtain the authorized TOKEN that can access Api Server. Click here to view the specific steps." - zh-TW: HertzBeat對kubernetes的通用性能指標(nodes、namespaces、pods、services)進行採集監控。
⚠️ 注意:為了監控Kubernetes中的資訊,則需要獲取到可訪問Api Server的授權TOKEN,讓採集請求獲取到對應的資訊,點擊查看獲取步驟 + zh-TW: HertzBeat對kubernetes的通用性能指標(nodes、namespaces、pods、services)進行採集監控。
⚠️ 注意:為了監控Kubernetes中的指標,則需要獲取到可訪問Api Server的授權TOKEN,讓採集請求獲取到對應的指標,點擊查看獲取步驟 helpLink: zh-CN: https://hertzbeat.com/zh-cn/docs/help/kubernetes en-US: https://hertzbeat.com/docs/help/kubernetes diff --git a/manager/src/main/resources/define/app-port.yml b/manager/src/main/resources/define/app-port.yml index 2c6957780fb..7762eb60ea7 100644 --- a/manager/src/main/resources/define/app-port.yml +++ b/manager/src/main/resources/define/app-port.yml @@ -26,9 +26,9 @@ name: # The description and help of this monitoring type # 监控类型的帮助描述信息 help: - zh-CN: HertzBeat 通过判断对端服务中暴露的端口是否可用,进而判断对端服务是否可用。同时以ms为指标,对响应时间等指标进行监测。您可以点击“新建 端口可用性”并进行配置,或者选择“更多操作”,导入已有配置。 - en-US: HertzBeat determines whether the exposed ports in the peer service are available, thereby determining whether the peer service is available. Simultaneously monitoring response time and other metrics using ms as metric unit. You could click the "New port" button and proceed with the configuration or import an existing setup through the "More Actions" menu. - zh-TW: HertzBeat通過判斷對端服務中暴露的埠是否可用,進而判斷對端服務是否可用。 同時以ms為名額,對回應時間等名額進行監測。 您可以點擊“新建埠可用性”並進行配寘,或者選擇“更多操作”,導入已有配寘。 + zh-CN: HertzBeat 通过判断对端服务中暴露的TCP端口是否可用,进而判断对端服务是否可用。同时以ms为指标,对响应时间等指标进行监测。您可以点击“新建 端口可用性”并进行配置,或者选择“更多操作”,导入已有配置。 + en-US: HertzBeat determines whether the exposed tcp ports in the peer service are available, thereby determining whether the peer service is available. Simultaneously monitoring response time and other metrics using ms as metric unit. You could click the "New port" button and proceed with the configuration or import an existing setup through the "More Actions" menu. + zh-TW: HertzBeat 通過判斷對端服務中暴露的TCP端口是否可用,進而判斷對端服務是否可用。 同時以ms為指标,對回應時間等指标進行監測。 您可以點擊“新建埠可用性”並進行配寘,或者選擇“更多操作”,導入已有配寘。 helpLink: zh-CN: https://hertzbeat.com/zh-cn/docs/help/port en-US: https://hertzbeat.com/docs/help/port diff --git a/manager/src/main/resources/define/app-springboot2.yml b/manager/src/main/resources/define/app-springboot2.yml index aff20ab95a7..d027e78419f 100644 --- a/manager/src/main/resources/define/app-springboot2.yml +++ b/manager/src/main/resources/define/app-springboot2.yml @@ -29,7 +29,7 @@ name: help: zh-CN: HertzBeat对 SpringBoot2.0 Actuator 暴露的通用性能指标(health、environment、threads、memory_used)进行采集监控。⚠️注意:如果要监控 SpringBoot 中的信息,需要您的 SpringBoot 应用集成并开启 SpringBoot Actuator, 点击查看具体步骤 en-US: "HertzBeat collects and monitors SpringBoot through general performance metric(health, environment, threads, memory_used) that exposed by the SpringBoot2.0 Actuator.
⚠️Note: You should make sure that your SpringBoot application have already integrated and enabled the SpringBoot Actuator, click here to see the specific steps." - zh-TW: HertzBeat對 SpringBoot2.0 Actuator 暴露的通用性能指標(health、environment、threads、memory_used)進行採集監控。< span class='help_module_span'> ⚠️ 注意:如果要監控SpringBoot中的資訊,需要您的SpringBoot應用集成並開啟SpringBoot Actuator,點擊查看具體步驟。 + zh-TW: HertzBeat對 SpringBoot2.0 Actuator 暴露的通用性能指標(health、environment、threads、memory_used)進行採集監控。< span class='help_module_span'> ⚠️ 注意:如果要監控SpringBoot中的指標,需要您的SpringBoot應用集成並開啟SpringBoot Actuator,點擊查看具體步驟。 helpLink: zh-CN: https://hertzbeat.com/zh-cn/docs/help/springboot2 en-US: https://hertzbeat.com/docs/help/springboot2 diff --git a/manager/src/main/resources/define/app-springboot3.yml b/manager/src/main/resources/define/app-springboot3.yml index cd95933d652..5870e08b3e8 100644 --- a/manager/src/main/resources/define/app-springboot3.yml +++ b/manager/src/main/resources/define/app-springboot3.yml @@ -30,7 +30,7 @@ name: help: zh-CN: HertzBeat对 SpringBoot3.0 Actuator 暴露的通用性能指标(health、environment、threads、memory_used)进行采集监控。⚠️注意:如果要监控 SpringBoot 中的信息,需要您的 SpringBoot 应用集成并开启 SpringBoot Actuator, 点击查看具体步骤 en-US: "HertzBeat collect and monitors SpringBoot through general performance metric that exposed by the SpringBoot3.0 Actuator.

⚠️Note: You should make sure that your SpringBoot application have already integrated and enabled the SpringBoot Actuator, click here to see the specific steps.
" - zh-TW: HertzBeat對 SpringBoot3.0 Actuator 暴露的通用性能指標(health、environment、threads、memory_used)進行採集監控。< span class='help_module_span'> ⚠️ 注意:如果要監控SpringBoot中的資訊,需要您的SpringBoot應用集成並開啟SpringBoot Actuator,點擊查看具體步驟。 + zh-TW: HertzBeat對 SpringBoot3.0 Actuator 暴露的通用性能指標(health、environment、threads、memory_used)進行採集監控。< span class='help_module_span'> ⚠️ 注意:如果要監控SpringBoot中的指標,需要您的SpringBoot應用集成並開啟SpringBoot Actuator,點擊查看具體步驟。 helpLink: zh-CN: https://hertzbeat.com/zh-cn/docs/help/springboot3 en-US: https://hertzbeat.com/docs/help/springboot3 diff --git a/manager/src/main/resources/define/app-udp_port.yml b/manager/src/main/resources/define/app-udp_port.yml new file mode 100644 index 00000000000..84e80227666 --- /dev/null +++ b/manager/src/main/resources/define/app-udp_port.yml @@ -0,0 +1,136 @@ +# 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 +# 监控类型所属类别:service-应用服务监控 db-数据库监控 mid-中间件 custom-自定义监控 os-操作系统监控 cn-云原生cloud native network-网络监控 +category: service +# The monitoring type eg: linux windows tomcat mysql aws... +# 监控类型 eg: linux windows tomcat mysql aws... +app: udp_port +# 监控类型国际化名称 +name: + zh-CN: UDP端口可用性 + en-US: UDP PORT +# The description and help of this monitoring type +# 监控类型的帮助描述信息 +help: + zh-CN: UDP是面向无连接的传输层协议,其端口可用性状态我们通过在应用层发送请求报文获得响应来判断,配置信息我们需要填充能使对端响应的应用层16进制报文内容。建议使用wireshark抓包来获取发送报文内容。
您可以点击“新建 UDP端口可用性”并进行配置,或者选择“更多操作”,导入已有配置。 + en-US: UDP is a connectionless transport layer protocol. We can judge its port availability status by sending a request message at the application layer and getting a response. We need to input the application layer hexadecimal message content that enables the peer to respond. Suggest using wireshark to capture packets to obtain the send package content.
You could click the "New UDP Port" button and proceed with the configuration or import an existing setup through the "More Actions" menu. + zh-TW: UDP是面向無連接的傳輸層協議,其連接埠可用性狀態我們透過在應用層發送請求封包獲得回應來判斷,設定指標我們需要填充能使對端回應的應用層16進位封包 內容。建議使用wireshark抓包來取得報文內容。
您可以點選“新 UDP連接埠可用性”並進行配置,或選擇“更多操作”,匯入已有配置。 +helpLink: + zh-CN: https://hertzbeat.com/zh-cn/docs/help/port + en-US: https://hertzbeat.com/docs/help/port +# 监控所需输入参数定义(根据定义渲染页面UI) +# Input params define for monitoring(render web ui by the definition) +params: + # field-param field key + # field-字段名称标识符 + - field: host + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 主机Host + en-US: Host + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: host + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: true + # field-param field key + # field-字段名称标识符 + - field: port + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 端口 + en-US: Port + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # when type is number, range is required + # 当type为number时,用range表示范围 + range: '[0,65535]' + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: true + # default value 81 + # 默认值 81 + defaultValue: 81 + # field-param field key + # field-字段名称标识符 + - field: timeout + # name-param field display i18n name + # name-参数字段显示名称 + name: + zh-CN: 超时时间(ms) + en-US: Timeout(ms) + # type-param field type(most mapping the html input type) + # type-字段类型,样式(大部分映射input标签type属性) + type: number + # when type is number, range is required + # 当type为number时,用range表示范围 + range: '[0,100000]' + # required-true or false + # 是否是必输项 true-必填 false-可选 + required: true + # default value 6000 + # 默认值 6000 + defaultValue: 6000 + # field-param field key + # field-变量字段标识符 + - field: content + name: + zh-CN: 发送报文内容(16进制串) + en-US: Send Package Content(HexString) + type: text + placeholder: 3025020101040 + required: false +# collect metrics config list +# 采集指标组配置列表 +metrics: + # metrics - summary + # 监控指标组 - summary + - name: summary + # metrics group scheduling priority(0->127)->(high->low), metrics with the same priority will be scheduled in parallel + # priority 0's metrics group is availability metrics, it will be scheduled first, only availability metrics collect success will the scheduling continue + # 指标组调度优先级(0->127)->(优先级高->低) 优先级低的指标组会等优先级高的指标组采集完成后才会被调度, 相同优先级的指标组会并行调度采集 + # 优先级为0的指标组为可用性指标组,即它会被首先调度,采集成功才会继续调度其它指标组,采集失败则中断调度 + priority: 0 + # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 + # field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), instance-if is metrics group unique identifier + # field-指标名称, type-指标类型(0-number数字,1-string字符串), unit-指标单位('%','ms','MB'), instance-是否是指标集合唯一标识符字段 + fields: + - field: responseTime + type: 0 + unit: ms + # the protocol used for monitoring, eg: sql, ssh, http, telnet, wmi, snmp, sdk + # 采集协议, 目前支持sql, ssh, http, telnet, wmi, snmp, sdk + protocol: udp + # Specific collection configuration when protocol is telnet protocol + # 当protocol为telnet协议时具体的采集配置 + udp: + # telnet host + # 远程登录主机 + host: ^_^host^_^ + # port + # 端口 + port: ^_^port^_^ + # timeout + # 超时时间 + timeout: ^_^timeout^_^ + # protocol content + # udp 上层协议的16进制报文内容 + content: ^_^content^_^ diff --git a/web-app/src/assets/i18n/zh-TW.json b/web-app/src/assets/i18n/zh-TW.json index e7c596a9fa1..441dabf7fb2 100644 --- a/web-app/src/assets/i18n/zh-TW.json +++ b/web-app/src/assets/i18n/zh-TW.json @@ -212,13 +212,13 @@ "alert.center.confirm.mark-done": "請確認是否標記已處理!", "alert.center.confirm.mark-no-batch": "請確認是否批量標記未處理!", "alert.center.confirm.mark-no": "請確認是否標記未處理!", - "alert.help.notice": "消息通知用於指定告警通知的接收人以及接收方式,使得閾值觸發後發送告警資訊,通過指定管道通知到接收人(現時支持郵箱、釘釘、微信,Webhook等),點擊查看具體配寘步驟
⚠\uFE0F注意:配寘“新增接收人後”,您還需要配寘“新增通知策略”來指定哪些消息發給哪些接收人,點擊查看可能遇見的問題。", + "alert.help.notice": "消息通知用於指定告警通知的接收人以及接收方式,使得閾值觸發後發送告警指標,通過指定管道通知到接收人(現時支持郵箱、釘釘、微信,Webhook等),點擊查看具體配寘步驟
⚠\uFE0F注意:配寘“新增接收人後”,您還需要配寘“新增通知策略”來指定哪些消息發給哪些接收人,點擊查看可能遇見的問題。", "alert.help.notice.link":"https://hertzbeat.com/zh-cn/docs/help/alert_threshold", "alert.help.converge": "告警收斂支持對指定時間段內的相同重複告警消息進行去重收斂。您可以點擊”新增收斂策略“,並進行配寘。
當通過閾值規則判斷觸發告警後,會進入到告警收斂,告警收斂會根據規則對特定時間段的重複告警消息去重收斂,以避免大量重複性告警導致接收人告警麻木。", "alert.help.converge.link":"https://hertzbeat.com/zh-cn/docs/#%E5%91%8A%E8%AD%A6%E6%94%B6%E6%95%9B", "alert.help.center": "告警中心展示了已觸發閾值告警總覽,支持接入外部渠道告警。 Hertzbeat支持告警處理,告警標記未處理,告警删除清空等批量操作。", "alert.help.center.link":"https://hertzbeat.com/zh-cn/docs/#%E5%91%8A%E8%AD%A6%E4%B8%AD%E5%BF%83", - "alert.help.setting": "閾值規則用於監控指標告警閾值規則管理。點擊“新增閾值”對監控名額進行告警閾值配寘,系統將根據配寘和採集名額數據計算觸發告警。 您也可以根據需要修改已有配寘,如需進行閾值關聯監控,請先關閉全域默認。
注意 ⚠\uFE0F: 配寘完畢後,已經被成功觸發的告警資訊可以在【告警中心】中查看,您也可以在【消息通知】中設定告警資訊的通知管道以及通知人員。", + "alert.help.setting": "閾值規則用於監控指標告警閾值規則管理。點擊“新增閾值”對監控名額進行告警閾值配寘,系統將根據配寘和採集名額數據計算觸發告警。 您也可以根據需要修改已有配寘,如需進行閾值關聯監控,請先關閉全域默認。
注意 ⚠\uFE0F: 配寘完畢後,已經被成功觸發的告警指標可以在【告警中心】中查看,您也可以在【消息通知】中設定告警指標的通知管道以及通知人員。", "alert.help.setting.link":"https://hertzbeat.com/zh-cn/docs/help/alert_threshold", "alert.help.silence": "告警靜默管理用於您不想在系統維護期間或週末晚上受到打擾時,可以點擊”新增靜默策略“,設定指定時間段內遮罩所有的告警通知,避免在週末或者晚上受到打擾。
告警靜默規則支持一次性時間段或週期性時間段,支持標籤匹配和告警級別匹配", "alert.help.silence.link":"https://hertzbeat.com/zh-cn/docs/#%E5%91%8A%E8%AD%A6%E9%9D%99%E9%BB%98",