Compare commits

...
6 Commits
Author SHA1 Message Date
Logic e20552c3b1 ci: add mvnd support and update backend build
- Add installation and verification steps for mvnd in setup-deps action
- Update backend build step to use mvnd instead of mvn
2025-06-21 18:57:17 +08:00
Duansgandaias00 ddb1601290 [fix] antlr4 vectors and parse semantic fixes and optimizations (#3482)
Co-authored-by: aias00 <liuhongyu@apache.org>
2025-06-21 07:55:54 +08:00
Calvin 8e9d3c09f3 [doc] japanese hdfs datanode (#3487) 2025-06-21 00:07:53 +08:00
Calvin ade04d2cf2 [doc] japanese hbase region server (#3479) 2025-06-20 09:03:09 +08:00
Calvinandaias00 53555c88c7 [doc] japanese hbase master (#3477)
Co-authored-by: aias00 <liuhongyu@apache.org>
2025-06-19 19:14:43 +08:00
Logic 03bf31269d [docs](webhook): update Chinese documentation for alert integration (#3478) 2025-06-19 19:05:21 +08:00
16 changed files with 335 additions and 105 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ jobs:
- uses: ./script/ci/github-actions/setup-deps
- name: Build with Maven
run: mvn clean -B package -Prelease -Dmaven.test.skip=false --file pom.xml
run: mvnd clean -B package -Prelease -Dmaven.test.skip=false --file pom.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
@@ -25,6 +25,8 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
/**
* Alert expression visitor implement
@@ -32,7 +34,9 @@ import java.util.Map;
public class AlertExpressionEvalVisitor extends AlertExpressionBaseVisitor<List<Map<String, Object>>> {
private static final String THRESHOLD = "__threshold__";
private static final String NAME = "__name__";
private static final String VALUE = "__value__";
private static final String TIMESTAMP = "__timestamp__";
private final QueryExecutor executor;
private final CommonTokenStream tokens;
@@ -84,42 +88,26 @@ public class AlertExpressionEvalVisitor extends AlertExpressionBaseVisitor<List<
public List<Map<String, Object>> visitAndExpr(AlertExpressionParser.AndExprContext ctx) {
List<Map<String, Object>> leftOperand = visit(ctx.left);
List<Map<String, Object>> rightOperand = visit(ctx.right);
List<Map<String, Object>> results = new ArrayList<>();
Map<String, Object> leftMap = null;
boolean leftMatch = false;
Map<String, Object> rightMap = null;
boolean rightMatch = false;
for (Map<String, Object> item : leftOperand) {
if (leftMap == null) {
leftMap = item;
// build a hash set of the right-side tag collection
Set<String> rightLabelsSet = rightOperand.stream()
.filter(item -> item.get(VALUE) != null)
.map(this::labelKey)
.collect(Collectors.toSet());
// iterate over the left side, O(1) match
for (Map<String, Object> leftItem : leftOperand) {
Object leftVal = leftItem.get(VALUE);
if (leftVal == null) {
continue;
}
if (item.get(VALUE) != null) {
leftMap = item;
leftMatch = true;
break;
String labelKey = labelKey(leftItem);
if (rightLabelsSet.contains(labelKey)) {
results.add(new HashMap<>(leftItem));
}
}
for (Map<String, Object> item : rightOperand) {
if (rightMap == null) {
rightMap = item;
}
if (item.get(VALUE) != null) {
rightMap = item;
rightMatch = true;
break;
}
}
if (leftMatch && rightMatch) {
rightMap.putAll(leftMap);
return new LinkedList<>(List.of(rightMap));
} else if (leftMap != null) {
leftMap.put(VALUE, null);
return new LinkedList<>(List.of(leftMap));
} else if (rightMap != null) {
rightMap.put(VALUE, null);
return new LinkedList<>(List.of(rightMap));
}
return new LinkedList<>();
return results;
}
@Override
@@ -327,4 +315,20 @@ public class AlertExpressionEvalVisitor extends AlertExpressionBaseVisitor<List<
String script = text.substring(1, text.length() - 1);
return executor.execute(script);
}
}
/**
* Generate tag key (excluding `__name__` and `__value__` and `__timestamp__`)
*/
private String labelKey(Map<String, Object> labelsMap) {
if (null == labelsMap || labelsMap.isEmpty()) {
return "-";
}
String key = labelsMap.entrySet().stream()
.filter(e -> !e.getKey().equals(VALUE) && !e.getKey().equals(NAME) && !e.getKey().equals(TIMESTAMP))
.sorted(Map.Entry.comparingByKey())
.map(e -> e.getKey() + "=" + (e.getValue() == null ? "" : e.getValue()))
.collect(Collectors.joining(","));
return key.isEmpty() ? "-" : key;
}
}
@@ -320,11 +320,11 @@ class AlertExpressionEvalVisitorTest {
List.of(new HashMap<>(Map.of("__value__", 250.0))));
when(mockExecutor.execute("select min(response_time) from api_metrics where endpoint = '/api/users'")).thenReturn(
List.of(new HashMap<>(Map.of("__value__", 50.0))));
List<Map<String, Object>> result = evaluate("(select max(response_time) from api_metrics where endpoint = '/api/users') > 200");
assertEquals(1, result.size());
assertEquals(250.0, result.get(0).get("__value__"));
result = evaluate("(select min(response_time) from api_metrics where endpoint = '/api/users') < 100");
assertEquals(1, result.size());
assertEquals(50.0, result.get(0).get("__value__"));
@@ -473,6 +473,115 @@ class AlertExpressionEvalVisitorTest {
assertEquals(80, result.get(0).get("__value__"));
}
@Test
void testAndOpPromql() {
String promql = "http_server_requests_seconds_count > 10 and http_server_requests_seconds_max > 5";
Map<String, Object> countValue1 = new HashMap<>() {
{
put("exception", "none");
put("instance", "host.docker.internal:8989");
put("__value__", 1307);
put("method", "GET");
put("__name__", "http_server_requests_seconds_count");
put("__timestamp__", "1.750320922467E9");
put("error", "none");
put("job", "spring-boot-app");
put("uri", "/actuator/prometheus");
put("outcome", "SUCCESS");
put("status", "200");
}
};
Map<String, Object> countValue2 = new HashMap<>() {
{
put("exception", "none");
put("instance", "host.docker.internal:8989");
put("__value__", 16);
put("method", "GET");
put("__name__", "http_server_requests_seconds_count");
put("__timestamp__", "1.750320922467E9");
put("error", "none");
put("job", "spring-boot-app");
put("uri", "/**");
put("outcome", "SUCCESS");
put("status", "200");
}
};
Map<String, Object> countValue3 = new HashMap<>() {
{
put("exception", "none");
put("instance", "host.docker.internal:8989");
put("__value__", 7);
put("method", "GET");
put("__name__", "http_server_requests_seconds_count");
put("__timestamp__", "1.750320922467E9");
put("error", "none");
put("job", "spring-boot-app");
put("uri", "/actuator/health");
put("outcome", "SUCCESS");
put("status", "200");
}
};
Map<String, Object> maxValue1 = new HashMap<>() {
{
put("exception", "none");
put("instance", "host.docker.internal:8989");
put("__value__", 10.007799125);
put("method", "GET");
put("__name__", "http_server_requests_seconds_max");
put("__timestamp__", "1.750320922467E9");
put("error", "none");
put("job", "spring-boot-app");
put("uri", "/actuator/prometheus");
put("outcome", "SUCCESS");
put("status", "200");
}
};
Map<String, Object> maxValue2 = new HashMap<>() {
{
put("exception", "none");
put("instance", "host.docker.internal:8989");
put("__value__", 10);
put("method", "GET");
put("__name__", "http_server_requests_seconds_count");
put("__timestamp__", "1.750320922467E9");
put("error", "none");
put("job", "spring-boot-app");
put("uri", "/**");
put("outcome", "SUCCESS");
put("status", "200");
}
};
Map<String, Object> maxValue3 = new HashMap<>() {
{
put("exception", "none");
put("instance", "host.docker.internal:8989");
put("__value__", 0);
put("method", "GET");
put("__name__", "http_server_requests_seconds_count");
put("__timestamp__", "1.750320922467E9");
put("error", "none");
put("job", "spring-boot-app");
put("uri", "/actuator/health");
put("outcome", "SUCCESS");
put("status", "200");
}
};
when(mockExecutor.execute("http_server_requests_seconds_count")).thenReturn(List.of(countValue1, countValue2, countValue3));
when(mockExecutor.execute("http_server_requests_seconds_max")).thenReturn(List.of(maxValue1, maxValue2, maxValue3));
List<Map<String, Object>> result = evaluate(promql);
assertEquals(2, result.size());
assertEquals(1307, result.get(0).get("__value__"));
assertEquals(16, result.get(1).get("__value__"));
}
private List<Map<String, Object>> evaluate(String expression) {
AlertExpressionLexer lexer = new AlertExpressionLexer(CharStreams.fromString(expression));
CommonTokenStream tokens = new CommonTokenStream(lexer);
@@ -17,11 +17,6 @@
package org.apache.hertzbeat.alert.service;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import java.util.HashMap;
import com.github.benmanes.caffeine.cache.Cache;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.tree.ParseTree;
@@ -29,17 +24,24 @@ import org.apache.hertzbeat.alert.service.impl.DataSourceServiceImpl;
import org.apache.hertzbeat.warehouse.db.QueryExecutor;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.mockito.Mockito;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
/**
* test case for {@link DataSourceService}
*/
class DataSourceServiceTest {
private DataSourceServiceImpl dataSourceService;
@BeforeEach
void setUp() {
dataSourceService = new DataSourceServiceImpl();
@@ -51,12 +53,12 @@ class DataSourceServiceTest {
new HashMap<>(Map.of("__value__", 100.0, "timestamp", 1343554, "instance", "node1")),
new HashMap<>(Map.of("__value__", 200.0, "timestamp", 1343555, "instance", "node2"))
);
QueryExecutor mockExecutor = Mockito.mock(QueryExecutor.class);
Mockito.when(mockExecutor.support("promql")).thenReturn(true);
Mockito.when(mockExecutor.execute(Mockito.anyString())).thenReturn(prometheusData);
dataSourceService.setExecutors(List.of(mockExecutor));
List<Map<String, Object>> result = dataSourceService.calculate("promql", "node_cpu_seconds_total > 150");
assertEquals(2, result.size());
assertNull(result.get(0).get("__value__"));
@@ -296,45 +298,36 @@ class DataSourceServiceTest {
@Test
void calculate15() {
List<Map<String, Object>> prometheusData1 = List.of(
new HashMap<>(Map.of("__value__", 100.0, "timestamp", 1343554, "instance", "node1")),
new HashMap<>(Map.of("__value__", 200.0, "timestamp", 1343555, "instance", "node2"))
new HashMap<>(Map.of("__value__", 1))
);
List<Map<String, Object>> prometheusData2 = List.of(
new HashMap<>(Map.of("__value__", 100.0, "timestamp", 1343554, "instance", "node1")),
new HashMap<>(Map.of("__value__", 200.0, "timestamp", 1343555, "instance", "node2"))
);
QueryExecutor mockExecutor = Mockito.mock(QueryExecutor.class);
Mockito.when(mockExecutor.support("promql")).thenReturn(true);
Mockito.when(mockExecutor.execute("node_cpu_seconds_total{mode=\"user\"}")).thenReturn(prometheusData1);
Mockito.when(mockExecutor.execute("node_cpu_seconds_total{mode=\"idle\"}")).thenReturn(prometheusData2);
Mockito.when(mockExecutor.execute("count(node_cpu_seconds_total{mode=\"user\"} > 250)")).thenReturn(prometheusData1);
Mockito.when(mockExecutor.execute("count(node_cpu_seconds_total{mode=\"idle\"} < 220 )")).thenReturn(new ArrayList<>());
dataSourceService.setExecutors(List.of(mockExecutor));
List<Map<String, Object>> result = dataSourceService.calculate("promql", "node_cpu_seconds_total{mode=\"user\"} > 250 and node_cpu_seconds_total{mode=\"idle\"} < 220");
assertEquals(1, result.size());
assertNull(result.get(0).get("__value__"));
List<Map<String, Object>> result = dataSourceService.calculate("promql", "count(node_cpu_seconds_total{mode=\"user\"} > 250) > 0 and count(node_cpu_seconds_total{mode=\"idle\"} < 220 ) > 0");
assertEquals(0, result.size());
}
@Test
void calculate16() {
List<Map<String, Object>> prometheusData1 = List.of(
new HashMap<>(Map.of("__value__", 100.0, "timestamp", 1343554, "instance", "node1")),
new HashMap<>(Map.of("__value__", 200.0, "timestamp", 1343555, "instance", "node2"))
new HashMap<>(Map.of("__value__", 1))
);
List<Map<String, Object>> prometheusData2 = List.of(
new HashMap<>(Map.of("__value__", 100.0, "timestamp", 1343554, "instance", "node1")),
new HashMap<>(Map.of("__value__", 200.0, "timestamp", 1343555, "instance", "node2"))
new HashMap<>(Map.of("__value__", 1))
);
QueryExecutor mockExecutor = Mockito.mock(QueryExecutor.class);
Mockito.when(mockExecutor.support("promql")).thenReturn(true);
Mockito.when(mockExecutor.execute("node_cpu_seconds_total{mode=\"user\"}")).thenReturn(prometheusData1);
Mockito.when(mockExecutor.execute("node_cpu_seconds_total{mode=\"idle\"}")).thenReturn(prometheusData2);
Mockito.when(mockExecutor.execute("count(node_cpu_seconds_total{mode=\"user\"} > 250)")).thenReturn(prometheusData1);
Mockito.when(mockExecutor.execute("count(node_cpu_seconds_total{mode=\"idle\"} < 220 )")).thenReturn(prometheusData2);
dataSourceService.setExecutors(List.of(mockExecutor));
List<Map<String, Object>> result = dataSourceService.calculate("promql", "node_cpu_seconds_total{mode=\"user\"} > 50 and node_cpu_seconds_total{mode=\"idle\"} < 20");
List<Map<String, Object>> result = dataSourceService.calculate("promql", "count(node_cpu_seconds_total{mode=\"user\"} > 250) > 0 and count(node_cpu_seconds_total{mode=\"idle\"} < 220 ) > 0");
assertEquals(1, result.size());
assertNull(result.get(0).get("__value__"));
assertNotNull(result.get(0).get("__value__"));
}
@Test
@@ -453,7 +453,7 @@ metrics:
i18n:
zh-CN: 已分配内存
en-US: Committed
ja-JP: コミットメモリ
ja-JP: コミットメモリ
- field: init
type: 0
unit: MB
@@ -73,7 +73,7 @@ params:
name:
zh-CN: 启用HTTPS
en-US: SSL
ja-JP: HTTPS利用
ja-JP: SSL利用
type: boolean
required: false
defaultValue: false
@@ -232,7 +232,7 @@ metrics:
i18n:
zh-CN: 状态
en-US: state
ja-JP: ステート
ja-JP: 状態
type: 1
- field: status
i18n:
@@ -113,7 +113,7 @@ metrics:
i18n:
zh-CN: 概要
en-US: Basic
ja-JP: 情報
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
@@ -108,7 +108,7 @@ metrics:
i18n:
zh-CN: 基本信息
en-US: Basic Info
ja-JP: 情報
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
@@ -170,7 +170,7 @@ metrics:
i18n:
zh-CN: 状态信息
en-US: State Info
ja-JP: ステート情報
ja-JP: 状態情報
priority: 1
fields:
- field: db_name
@@ -367,7 +367,7 @@ metrics:
i18n:
zh-CN: 状态
en-US: State
ja-JP: ステート
ja-JP: 状態
- field: num
type: 0
i18n:
@@ -27,7 +27,7 @@ help:
zh-CN: Hertzbeat 使用 <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-snmp'> SNMP 协议</a> 对 华三交换机 的通用指标(可用性,系统信息,端口流量等)进行采集监控。<br>您可以点击 “<i>新建 华三通用交换机</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 H3C Switch general performance metrics. <br>You can click the "<i>New H3C Switch</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> 對 華三交換機 的通用指標(可用性,系統信息,端口流量等)進行采集監控。<br>您可以點擊 “<i>新建 華三通用交換機</i>” 並進行配置SNMP相關參數添加,或者選擇“<i>更多操作</i>”,導入已有配置。
ja-JP: Hertzbeat は <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-snmp'> SNMP プロトコルを介して</a> H3Cスイッチングハブの一般的なメトリック監視します。<br>「<i>新規 シスコ・スイッチングハブ</i>」をクリックしてSNMPなどのパラメタを設定した後、新規することができます。
ja-JP: Hertzbeat は <a class='help_module_content' href='https://hertzbeat.apache.org/docs/advanced/extend-snmp'> SNMP プロトコルを介して</a> H3Cスイッチングハブの一般的なメトリック監視します。<br>「<i>新規 H3Cスイッチングハブ</i>」をクリックしてSNMPなどのパラメタを設定した後、新規することができます。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/h3c_switch
en-US: https://hertzbeat.apache.org/docs/help/h3c_switch
@@ -27,7 +27,7 @@ help:
zh-CN: HertzBeat 使用<a class='help_module_content' href='https://baijiahao.baidu.com/s?id=1605937053950156833&wfr=spider&for=pc'> JMX 协议</a>对 Hadoop 的 JVM 虚拟机的通用性能指标(memory pool,限JDK8及以下的code cache、class loading、thread)进行采集监控。<br><span class='help_module_span'>⚠️注意:您需要在 Hadoop 应用开启 JMX 服务, <a class='help_module_content' href='https://hertzbeat.apache.org/zh-cn/docs/help/hadoop#hadoop%E5%BA%94%E7%94%A8%E5%BC%80%E5%90%AFjmx%E5%8D%8F%E8%AE%AE%E6%AD%A5%E9%AA%A4'>点击查看开启步骤</a>。</span>
en-US: "HertzBeat monitors general performance metrics(memory pool, class loading, thread) of Hadoop VMware through <a class='help_module_content' href='https://zh.wikipedia.org/JMX'>JMX protocol</a>. <br><span class='help_module_span'>⚠️Note: You should enable the JMX service in Hadoop application, and the metric of code cache is only available to JDK8 and below.<a class='help_module_content' href='https://hertzbeat.apache.org/docs/help/hadoop#hadoop%E5%BA%94%E7%94%A8%E5%BC%80%E5%90%AFjmx%E5%8D%8F%E8%AE%AE%E6%AD%A5%E9%AA%A4'>Click here to view the specific steps.</a></span>"
zh-TW: HertzBeat使用<a class='help_ module_ content' href='https://baijiahao.baidu.com/s?id=1605937053950156833&wfr=spider&for=pc'> JMX協定</a>對Hadoop的JVM虛擬機器的通用性能指標(memory pool,限JDK8及以下的code cache、class loading、thread)進行採集監控。<br><span class='help_ module_ span'> ⚠️ ️注意:您需要在Hadoop應用開啟JMX服務,<a class='help_ module_ content' href='https://hertzbeat.apache.org/zh-cn/docs/help/hadoop#hadoop%E5%BA%94%E7%94%A8%E5%BC%80%E5%90%AFjmx%E5%8D%8F%E8%AE%AE%E6%AD%A5%E9%AA%A4'>點擊查看開啟步驟</a>。</span>
ja-JP: HertzBeatは <a class='help_module_content' href='https://baijiahao.baidu.com/s?id=1605937053950156833&wfr=spider&for=pc'> JMXプロトコルを介して</a> Hadoopのランタイムステータス、ノード、トピック、その他の関連メトリックを監視します。<br><span class='help_module_span'> ⚠️注意:Hadoop で JMX サービスを有効にする必要があります。<a class='help_module_content' href=' https://hertzbeat.apache.org/zh-cn/docs/help/hadoop#hadoop%E5%BA%94%E7%94%A8%E5%BC%80%E5%90%AFjmx%E5%8D%8F%E8%AE%AE%E6%AD%A5%E9%AA%A4'>クリックしてガイドを見ます</a>。</span>
ja-JP: HertzBeatは <a class='help_module_content' href='https://baijiahao.baidu.com/s?id=1605937053950156833&wfr=spider&for=pc'> JMXプロトコルを介して</a> HadoopのJava仮想マシンの一般的なパフォーマンスのメトリックを監視します。<br><span class='help_module_span'> ⚠️注意:Hadoop で JMX サービスを有効にする必要があります。<a class='help_module_content' href=' https://hertzbeat.apache.org/zh-cn/docs/help/hadoop#hadoop%E5%BA%94%E7%94%A8%E5%BC%80%E5%90%AFjmx%E5%8D%8F%E8%AE%AE%E6%AD%A5%E9%AA%A4'>クリックしてガイドを見ます</a>。</span>
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hadoop/
en-US: https://hertzbeat.apache.org/docs/help/hadoop/
@@ -240,7 +240,7 @@ metrics:
i18n:
zh-CN: 已分配内存
en-US: Committed
ja-JP: コミットメモリ
ja-JP: コミットメモリ
- field: init
type: 0
i18n:
@@ -21,12 +21,13 @@ app: hbase_master
name:
zh-CN: Apache Hbase Master
en-US: Apache Hbase Master
ja-JP: Apache Hbase Master
# The description and help of this monitoring type
help:
zh-CN: Hertzbeat 对 Hbase 数据库 Master 节点监控指标进行监控。<br>您可以点击 “<i>新建 Apache Hbase Master</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat monitors the Master node monitoring indicators of the Hbase database. <br>You can click "<i>New Apache Hbase Master</i>" to configure, or select "<i>More Actions</i>" to import an existing configuration.
zh-TW: Hertzbeat 對 Hbase 數據庫 Master 节點監控指標進行監控。<br>您可以點擊 “<i>新建 Apache Hbase Master</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
ja-JP: Hertzbeat は HbaseデータベースのMasterノードの一般的なメトリック監視します。<br>「<i>新規 Apache Hbase Master</i>」をクリックしてパラメタを設定した後、新規することができます。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hbase_master/
en-US: https://hertzbeat.apache.org/docs/help/hbase_master/
@@ -38,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
@@ -48,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
@@ -62,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
@@ -76,6 +80,7 @@ params:
name:
zh-CN: 启用HTTPS
en-US: HTTPS
ja-JP: HTTPS
# type-param field type(most mapping the html input type)
type: boolean
# required-true or false
@@ -87,6 +92,7 @@ metrics:
i18n:
zh-CN: Master服务信息
en-US: Master Service Info
ja-JP: Masterサービス情報
# 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
@@ -98,21 +104,25 @@ metrics:
i18n:
zh-CN: 活跃RegionServer数量
en-US: numRegionServers
ja-JP: 活躍的なRegionServer数
- field: numDeadRegionServers
type: 0
i18n:
zh-CN: 异常RegionServer数量
en-US: numDeadRegionServers
ja-JP: 異常的なRegionServer数
- field: averageLoad
type: 0
i18n:
zh-CN: 集群平均负载
en-US: averageLoad
ja-JP: 平均ロード
- field: clusterRequests
type: 0
i18n:
zh-CN: 集群请求数量
en-US: clusterRequests
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:
- $.numRegionServers
@@ -137,6 +147,7 @@ metrics:
i18n:
zh-CN: Region In Transition 信息
en-US: Region In Transition Info
ja-JP: Region In Transition 情報
# 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
@@ -148,16 +159,19 @@ metrics:
i18n:
zh-CN: 当前的 RIT 数量
en-US: ritCount
ja-JP: RIT数
- field: ritCountOverThreshold
type: 0
i18n:
zh-CN: 超过阈值的 RIT 数量
en-US: ritCountOverThreshold
ja-JP: 閾値を超えたRIT数
- field: ritOldestAge
type: 0
i18n:
zh-CN: 最老的RIT的持续时间
en-US: ritOldestAge
ja-JP: 最古のRITのスパン
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- $.ritCount
@@ -180,6 +194,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: 2
@@ -191,48 +206,57 @@ metrics:
i18n:
zh-CN: 当前活跃RegionServer列表
en-US: liveRegionServers
ja-JP: 活躍的なRegionServer
- field: deadRegionServers
type: 1
i18n:
zh-CN: 当前离线RegionServer列表
en-US: deadRegionServers
ja-JP: オフラインRegionServer
- field: zookeeperQuorum
type: 1
i18n:
zh-CN: Zookeeper列表
en-US: zookeeperQuorum
ja-JP: zookeeper定足数
- field: masterHostName
type: 1
i18n:
zh-CN: Master节点
en-US: masterHostName
ja-JP: Masterホスト名
- field: BalancerCluster_num_ops
type: 0
i18n:
zh-CN: 集群负载均衡次数
en-US: BalancerCluster_num_ops
ja-JP: クラスターのロードバランシング回数
- field: numActiveHandler
type: 0
i18n:
zh-CN: RPC句柄数
en-US: numActiveHandler
ja-JP: RPCハンドル数
- field: receivedBytes
type: 0
unit: 'MB'
i18n:
zh-CN: 集群接收数据量(MB)
en-US: receivedBytes
ja-JP: 受信バイト
- field: sentBytes
type: 0
unit: 'MB'
i18n:
zh-CN: 集群发送数据量(MB)
en-US: sentBytes
ja-JP: 送信バイト
- field: clusterRequests
type: 0
i18n:
zh-CN: 集群总请求数量
en-US: clusterRequests
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:
- $.beans[?(@.name == "Hadoop:service=HBase,name=Master,sub=Server")].['tag.liveRegionServers']
@@ -21,11 +21,13 @@ app: hbase_regionserver
name:
zh-CN: Apache Hbase RegionServer
en-US: Apache Hbase RegionServer
ja-JP: Apache Hbase RegionServer
# The description and help of this monitoring type
help:
zh-CN: Hertzbeat 对 Hbase 数据库 RegionServer 节点监控指标进行监控。<br>您可以点击 “<i>新建 Apache Hbase RegionServer</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat monitors the RegionServer node monitoring indicators of the Hbase database. <br>You can click "<i>New Apache Hbase RegionServer</i>" to configure, or select "<i>More Actions</i>" to import an existing configuration.
zh-TW: Hertzbeat 對 Hbase 數據庫 RegionServer 节點監控指標進行監控。<br>您可以點擊 “<i>新建 Apache Hbase RegionServer</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
ja-JP: Hertzbeat は HbaseデータベースのRegionServerノードの一般的なメトリック監視します。<br>「<i>新規 Apache Hbase RegionServer</i>」をクリックしてパラメタを設定した後、新規することができます。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hbase_regionserver/
@@ -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
@@ -76,6 +81,7 @@ params:
name:
zh-CN: 启用HTTPS
en-US: HTTPS
ja-JP: HTTPS
# type-param field type(most mapping the html input type)
type: boolean
# required-true or false
@@ -87,6 +93,7 @@ metrics:
i18n:
zh-CN: RegionServer 服务信息
en-US: RegionServer Service Info
ja-JP: RegionServerサービス情報
# 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
@@ -98,24 +105,28 @@ metrics:
i18n:
zh-CN: Region数量
en-US: regionCount
ja-JP: Region数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: readRequestCount
type: 0
i18n:
zh-CN: 重启集群后的读请求数量
en-US: readRequestCount
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: writeRequestCount
type: 0
i18n:
zh-CN: 重启集群后的写请求数量
en-US: writeRequestCount
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: averageRegionSize
type: 0
i18n:
zh-CN: 平均Region大小
en-US: averageRegionSize
ja-JP: Regionの平均サイズ
unit: 'MB'
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: totalRequestCount
@@ -123,108 +134,126 @@ metrics:
i18n:
zh-CN: 全部请求数量
en-US: totalRequestCount
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: ScanTime_num_ops
type: 0
i18n:
zh-CN: Scan 请求总量
en-US: ScanTime_num_ops
ja-JP: Scan操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: Append_num_ops
type: 0
i18n:
zh-CN: Append 请求量
en-US: Append_num_ops
ja-JP: Append操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: Increment_num_ops
type: 0
i18n:
zh-CN: Increment请求量
en-US: Increment_num_ops
ja-JP: Increment操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: Get_num_ops
type: 0
i18n:
zh-CN: Get 请求量
en-US: Get_num_ops
ja-JP: Get操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: Delete_num_ops
type: 0
i18n:
zh-CN: Delete 请求量
en-US: Delete_num_ops
ja-JP: Delete操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: Put_num_ops
type: 0
i18n:
zh-CN: Put 请求量
en-US: Put_num_ops
ja-JP: Put操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: ScanTime_mean
type: 0
i18n:
zh-CN: 平均 Scan 请求时间
en-US: ScanTime_mean
ja-JP: Scan操作の平均時間
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: ScanTime_min
type: 0
i18n:
zh-CN: 最小 Scan 请求时间
en-US: ScanTime_min
ja-JP: Scan操作の最小時間
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: ScanTime_max
type: 0
i18n:
zh-CN: 最大 Scan 请求时间
en-US: ScanTime_max
ja-JP: Scan操作の最大時間
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: ScanSize_mean
type: 0
i18n:
zh-CN: 平均 Scan 请求大小
en-US: ScanSize_mean
ja-JP: Scan操作の平均サイズ
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: ScanSize_min
type: 0
i18n:
zh-CN: 最小 Scan 请求大小
en-US: ScanSize_min
ja-JP: Scan操作の最小サイズ
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: ScanSize_max
type: 0
i18n:
zh-CN: 最大 Scan 请求大小
en-US: ScanSize_max
ja-JP: Scan操作の最大サイズ
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: slowPutCount
type: 0
i18n:
zh-CN: 慢操作次数/Put
en-US: slowPutCount
ja-JP: スローPut操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: slowGetCount
type: 0
i18n:
zh-CN: 慢操作次数/Get
en-US: slowGetCount
ja-JP: スローGet操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: slowAppendCount
type: 0
i18n:
zh-CN: 慢操作次数/Append
en-US: slowAppendCount
ja-JP: スローAppend操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: slowIncrementCount
type: 0
i18n:
zh-CN: 慢操作次数/Increment
en-US: slowIncrementCount
ja-JP: スローIncrement操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: slowDeleteCount
type: 0
i18n:
zh-CN: 慢操作次数/Delete
en-US: slowDeleteCount
ja-JP: スローDelete操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: blockCacheSize
type: 0
@@ -232,36 +261,42 @@ metrics:
i18n:
zh-CN: 缓存块内存占用大小
en-US: blockCacheSize
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: blockCacheCount
type: 0
i18n:
zh-CN: 缓存块数量_Block Cache 中的 Block 数量
en-US: blockCacheCount
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: blockCacheExpressHitPercent
type: 0
i18n:
zh-CN: 读缓存命中率
en-US: blockCacheExpressHitPercent
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: memStoreSize
type: 0
i18n:
zh-CN: Memstore 大小
en-US: memStoreSize
ja-JP: Memstoreサイズ
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: FlushTime_num_ops
type: 0
i18n:
zh-CN: RS写磁盘次数/MemStore Flush 写磁盘次数
en-US: FlushTime_num_ops
ja-JP: MemStore Flush操作回数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: flushQueueLength
type: 0
i18n:
zh-CN: Region Flush 队列长度
en-US: flushQueueLength
ja-JP: Region Flushキューの長さ
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: flushedCellsSize
type: 0
@@ -269,18 +304,21 @@ metrics:
i18n:
zh-CN: flush到磁盘大小
en-US: flushedCellsSize
ja-JP: flushedサイズ
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: storeCount
type: 0
i18n:
zh-CN: Store 个数
en-US: storeCount
ja-JP: Store数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: storeFileCount
type: 0
i18n:
zh-CN: Storefile 个数
en-US: storeFileCount
ja-JP: Storeファイル数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: storeFileSize
type: 0
@@ -288,36 +326,42 @@ metrics:
i18n:
zh-CN: Storefile 大小
en-US: storeFileSize
ja-JP: Storeファイルサイズ
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: compactionQueueLength
type: 0
i18n:
zh-CN: Compaction 队列长度
en-US: compactionQueueLength
ja-JP: Compactionキューの長さ
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: percentFilesLocal
type: 0
i18n:
zh-CN: Region 的 HFile 位于本地 HDFS data node的比例
en-US: percentFilesLocal
ja-JP: Regionのローカルファイルのパーセント
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: percentFilesLocalSecondaryRegions
type: 0
i18n:
zh-CN: Region 副本的 HFile 位于本地 HDFS data node的比例
en-US: percentFilesLocalSecondaryRegions
ja-JP: Secondary Regionのローカルファイルのパーセント
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: hlogFileCount
type: 0
i18n:
zh-CN: WAL 文件数量
en-US: hlogFileCount
ja-JP: WALファイル数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: hlogFileSize
type: 0
i18n:
zh-CN: WAL 文件大小
en-US: hlogFileSize
ja-JP: WALファイルサイズ
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- $.regionCount
@@ -414,6 +458,7 @@ metrics:
i18n:
zh-CN: RegionServer IPC 信息
en-US: RegionServer IPC Info
ja-JP: RegionServer IPC 情報
# 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
@@ -425,24 +470,28 @@ metrics:
i18n:
zh-CN: RPC句柄数
en-US: numActiveHandler
ja-JP: RPCハンドル数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: NotServingRegionException
type: 0
i18n:
zh-CN: NotServingRegionException 异常数量
en-US: NotServingRegionException
ja-JP: NotServingRegionException
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: RegionMovedException
type: 0
i18n:
zh-CN: RegionMovedException异常数量
en-US: RegionMovedException
ja-JP: RegionMovedException
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: RegionTooBusyException
type: 0
i18n:
zh-CN: RegionTooBusyException异常数量
en-US: RegionTooBusyException
ja-JP: RegionTooBusyException
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- $.numActiveHandler
@@ -468,6 +517,7 @@ metrics:
i18n:
zh-CN: RegionServer JVM 信息
en-US: RegionServer JVM Info
ja-JP: RegionServer 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: 2
@@ -480,6 +530,7 @@ metrics:
i18n:
zh-CN: 进程使用的非堆内存大小
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: MemNonHeapCommittedM
type: 0
@@ -487,6 +538,7 @@ metrics:
i18n:
zh-CN: 进程 commit 的非堆内存大小
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: MemHeapUsedM
type: 0
@@ -494,6 +546,7 @@ metrics:
i18n:
zh-CN: 进程使用的堆内存大小
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: MemHeapCommittedM
type: 0
@@ -501,6 +554,7 @@ metrics:
i18n:
zh-CN: 进程 commit 的堆内存大小
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
@@ -508,6 +562,7 @@ metrics:
i18n:
zh-CN: 进程最大的堆内存大小
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: MemMaxM
type: 0
@@ -515,12 +570,14 @@ metrics:
i18n:
zh-CN: 进程最大内存大小
en-US: MemMaxM
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: GcCount
type: 0
i18n:
zh-CN: Young 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:
- $.MemNonHeapUsedM
@@ -21,11 +21,13 @@ app: hdfs_datanode
name:
zh-CN: Apache HDFS DataNode
en-US: Apache HDFS DataNode
ja-JP: Apache HDFS DataNode
# The description and help of this monitoring type
help:
zh-CN: Hertzbeat 对 HDFS DataNode 节点监控指标进行监控。<br>您可以点击 “<i>新建 Apache HDFS DataNode</i>” 并进行配置,或者选择“<i>更多操作</i>”,导入已有配置。
en-US: Hertzbeat monitors the HDFS DataNode metrics. <br>You can click "<i>New Apache HDFS DataNode</i>" to configure, or select "<i>More Actions</i>" to import an existing configuration.
zh-TW: Hertzbeat 對 HDFS DataNode 節點監控指標進行監控。<br>您可以點擊 “<i>新建 Apache HDFS DataNode</i>” 並進行配置,或者選擇“<i>更多操作</i>”,導入已有配置。
ja-JP: Hertzbeat は HDFS DataNodeの一般的なメトリック監視します。<br>「<i>新規 Apache HDFS DataNode</i>」をクリックしてパラメタを設定した後、新規することができます。
helpLink:
zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/hdfs_datanode/
@@ -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
@@ -86,6 +91,7 @@ metrics:
i18n:
zh-CN: DataNode HDFS使用量
en-US: DfsUsed
ja-JP: 使用済みのHDFS容量
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: Remaining
type: 0
@@ -93,6 +99,7 @@ metrics:
i18n:
zh-CN: DataNode HDFS剩余空间
en-US: Remaining
ja-JP: 使用可能のHDFS容量
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: Capacity
type: 0
@@ -100,6 +107,7 @@ metrics:
i18n:
zh-CN: DataNode HDFS空间总量
en-US: Capacity
ja-JP: HDFS容量合計
units:
- DfsUsed=B->GB
- Remaining=B->GB
@@ -134,60 +142,70 @@ metrics:
i18n:
zh-CN: JVM 当前已经使用的 NonHeapMemory 的大小
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: MemNonHeapCommittedM
type: 0
i18n:
zh-CN: JVM 配置的 NonHeapCommittedM 的大小
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: MemHeapUsedM
type: 0
i18n:
zh-CN: JVM 当前已经使用的 HeapMemory 的大小
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: MemHeapCommittedM
type: 0
i18n:
zh-CN: JVM HeapMemory 提交大小
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
i18n:
zh-CN: JVM 配置的 HeapMemory 的大小
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: MemMaxM
type: 0
i18n:
zh-CN: JVM 运行时可以使用的最大内存大小
en-US: MemMaxM
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: ThreadsRunnable
type: 0
i18n:
zh-CN: 处于 RUNNABLE 状态的线程数量
en-US: ThreadsRunnable
ja-JP: RUNNABLE スレッド数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: ThreadsBlocked
type: 0
i18n:
zh-CN: 处于 BLOCKED 状态的线程数量
en-US: ThreadsBlocked
ja-JP: BLOCKED スレッド数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: ThreadsWaiting
type: 0
i18n:
zh-CN: 处于 WAITING 状态的线程数量
en-US: ThreadsWaiting
ja-JP: WAITING スレッド数
# field-metric name, type-metric type(0-number,1-string), unit-metric unit('%','ms','MB'), label-whether it is a metrics label field
- field: ThreadsTimedWaiting
type: 0
i18n:
zh-CN: 处于 TIMED WAITING 状态的线程数量
en-US: ThreadsTimedWaiting
ja-JP: TIMED WAITING スレッド数
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- $.MemNonHeapUsedM
@@ -232,6 +250,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:
- $.beans[?(@.name == "java.lang:type=Runtime")].StartTime
+16 -1
View File
@@ -16,7 +16,7 @@
# under the License.
name: setup-deps
description: Install host system dependencies
description: Install host system dependencies (with mvnd)
runs:
using: composite
@@ -26,3 +26,18 @@ runs:
with:
distribution: "zulu"
java-version: 17
- name: Install mvnd
shell: bash
run: |
MVND_VERSION=1.0.2
curl -sL https://downloads.apache.org/maven/mvnd/${MVND_VERSION}/maven-mvnd-${MVND_VERSION}-linux-amd64.zip -o mvnd.zip
unzip -q mvnd.zip
mkdir -p $HOME/.local
mv maven-mvnd-${MVND_VERSION}-linux-amd64 $HOME/.local/mvnd
echo "$HOME/.local/mvnd/bin" >> $GITHUB_PATH
echo "MVND_HOME=$HOME/.local/mvnd" >> $GITHUB_ENV
- name: Verify mvnd installation
shell: bash
run: mvnd --version
@@ -1,15 +1,21 @@
> HertzBeat 对外提供 api 接口,外部系统可以通过 Webhook 方式调用此接口将告警数据推送到 HertzBeat 告警平台。
HertzBeat 提供 API 接口,外部系统可以通过 Webhook 方式调用此接口将告警数据推送到 HertzBeat 告警平台。
### 接口端点
## 接口端点
`POST /api/alerts/report`
### 请求头
- `Content-Type`: `application/json`
- `Authorization`: `Bearer {token}`
### 请求
## 请求
* `Content-Type`: `application/json`
* `Authorization`: `Bearer {token}`
## 请求体
```json
{
@@ -30,30 +36,32 @@
}
```
字段
### 字段
- `labels`: 告警標籤
- `alertname`: 告警規則名稱
- `priority`: 告警級別 (warning, critical)
- `instance`: 告警
- `annotations`: 告警註釋信息
- `summary`: 告警摘要
- `description`: 告警詳細描述
- `content`: 告警
- `status`: 告警狀態 (firing, resolved)
- `triggerTimes`: 告警觸發次數
- `startAt`: 告警開始時間
- `activeAt`: 告警激活時間
- `endAt`: 告警結束時間
* `labels`: 告警标签
* `alertname`: 告警规则名称
* `priority`: 告警级别 (`warning`, `critical`)
* `instance`: 告警
* `annotations`: 告警注释信息
* `summary`: 告警摘要
* `description`: 告警详细描述
* `content`: 告警
* `status`: 告警状态 (`firing`, `resolved`)
* `triggerTimes`: 告警触发次数
* `startAt`: 告警开始时间
* `activeAt`: 告警激活时间
* `endAt`: 告警结束时间
### 配置验证
- 第三方系统触发告警后通过 webhook 回调 HertzBeat 的 `/api/alerts/report` 接口,将告警数据推送到 HertzBeat 告警平台。
- 在 HertzBeat 告警平台中对告警数据处理查看,验证告警数据是否正确。
## 配置验证
* 第三方系统触发告警后,通过 Webhook 回调 HertzBeat 的 `/api/alerts/report` 接口,将告警数据推送到 HertzBeat 告警平台。
* 在 HertzBeat 告警平台中处理并查看告警数据,验证告警数据是否正确。
### 数据流转:
## 数据流转
```mermaid
graph LR
@@ -67,7 +75,8 @@ graph LR
```
### 常见问题
- 确保 HertzBeat URL 可以被第三方系统服务器访问。
- 检查第三方系统日志中是否有告警发送成功失败的消息。
## 常见问题
* 确保 HertzBeat URL 可以被第三方系统服务器访问。
* 检查第三方系统日志中是否有告警发送成功或失败的消息。