Compare commits

...
12 Commits
Author SHA1 Message Date
aias00 4a4fbc57aa Merge branch 'master' into new-ppmc 2025-03-31 14:33:55 +08:00
tomsun28 b4151a4e73 [improve] update monitor detail ui (#3199)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
2025-03-31 14:33:29 +08:00
jujin 1c1683d9c6 [doc] add blog bout How Does Metrics Collection Work (#3195) 2025-03-30 14:08:15 +08:00
tomsun28 f44e19e537 Merge branch 'master' into new-ppmc 2025-03-29 10:41:03 +08:00
tomsun28 49ad608ed9 [doc] update new hertzbeat ppmc 2025-03-29 10:40:33 +08:00
46d4fc2dd9 [bugfix] Modify inconsistent icons (#3190)
Co-authored-by: yinyijun <yingey2011>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-03-29 10:38:07 +08:00
Sarthak Aroraandtomsun28 ffa2487587 [docs] add collector user guide (#3187)
Signed-off-by: tomsun28 <tomsun28@outlook.com>
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-03-29 09:13:06 +08:00
tomsun28 22a7ae55e3 [doc] update new hertzbeat ppmc 2025-03-29 08:45:12 +08:00
30c7b22c4c [doc] add help documentation for Alarms Center (#3181)
Co-authored-by: yunfan24 <yunfan24@outlook.com>
Co-authored-by: aias00 <rokkki@163.com>
2025-03-29 00:06:40 +08:00
彭镜肇andtomsun28 7a3e23ec59 [improve] update import for package import (#3180)
Co-authored-by: tomsun28 <tomsun28@outlook.com>
2025-03-28 00:09:45 +08:00
Jast da6556641a [Doc] Modify the error records in the document (#3178) 2025-03-27 23:45:02 +08:00
Rickandrick b008f16b67 fix: Ai is a typo (#3176)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
2025-03-26 12:59:17 +08:00
28 changed files with 505 additions and 173 deletions
@@ -17,6 +17,7 @@
package org.apache.hertzbeat.alert.service.impl;
import jakarta.xml.bind.DatatypeConverter;
import lombok.extern.slf4j.Slf4j;
import org.apache.hertzbeat.alert.config.TencentSmsProperties;
import org.apache.hertzbeat.alert.service.SmsClient;
@@ -34,7 +35,6 @@ import org.apache.http.util.EntityUtils;
import org.apache.hertzbeat.common.util.JsonUtil;
import com.fasterxml.jackson.databind.JsonNode;
import javax.xml.bind.DatatypeConverter;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
@@ -445,15 +445,7 @@ public final class CollectRep {
if (value != null) {
// Check byte array size, Arrow buffer size is 32768 bytes
byte[] bytes = value.getBytes(StandardCharsets.UTF_8);
if (bytes.length > 32700) {
log.warn("Value too large for Arrow buffer ({}), truncating to 32700 bytes. Meta: {}",
bytes.length, JsonUtil.toJson(metadata));
byte[] truncatedBytes = new byte[32700];
System.arraycopy(bytes, 0, truncatedBytes, 0, 32700);
vector.set(rowIndex, truncatedBytes);
} else {
vector.set(rowIndex, bytes);
}
vector.setSafe(rowIndex, bytes);
}
}
}
@@ -0,0 +1,106 @@
---
title: "Behind the Scenes of HertzBeat: How Metric Collection Works"
author: JuJinPark
author_title: JuJin
author_url: https://github.com/JuJinPark
tags: [opensource, practice]
keywords: [open source monitoring system]
---
## Behind the Scenes of HertzBeat: How Metric Collection Works
HertzBeat is an open-source, real-time monitoring system designed for flexibility and ease of use. But how exactly does it collect, process, and store metrics from various systems?
In this post, well walk through the internal architecture behind **HertzBeats metric collection pipeline** — from job distribution to alerting and storage — with the help of a high-level system diagram.
---
### HertzBeats Metric Collection Architecture
![HertzBeat Architecture](/img/docs/hertzbeat-metrics-collection-arch.png)
> **Figure:** High-level architecture of HertzBeat's metric collection system. The Manager handles job scheduling, alerting, and storage, while Collectors (external or internal) perform the actual metric collection. Communication between the Manager and Collectors uses a custom Netty TCP protocol.
---
### 1. Job Distribution: Assigning What to Monitor
When the **Manager** component starts, it loads monitoring targets from the database. These targets define the host, collection interval, and other parameters.
To distribute the workload, the Manager sends jobs to **external Collectors** over a custom **Netty-based TCP protocol**. The `CollectJobScheduling` module handles this logic using **consistent hashing**, ensuring jobs are evenly distributed across collectors.
> 💡 HertzBeat also includes a built-in **main collector** (identified as `MAIN_COLLECTOR_NODE`) that runs directly inside the Manager. This allows HertzBeat to operate in **standalone mode** without requiring any external collectors.
---
### 2. Task Scheduling: When to Monitor
Once a Collector receives a job, it registers it with the **`TimerDispatch`** system.
- For **external collectors**, the Manager sends the task via the TCP connection.
- For the **main collector**, the Manager directly invokes `CollectJobService` within the same process.
Each Collector runs a **`Timer`** in a background thread, which schedules tasks according to their configured intervals. When the time is up, the timer triggers a `TimerTask` to begin metric collection.
---
### 3. Task Execution: How Metrics Are Collected
When a `TimerTask` is triggered, it creates a `MetricsCollect` task and passes it to `MetricsTaskDispatch`, which places it in the **`MetricsCollectorQueue`**.
- A dedicated thread (`CommonDispatcher`) continuously polls this queue.
- Tasks are executed by a **worker thread pool**, allowing multiple metric collections to run concurrently.
- Each task uses a specific **collector strategy** (e.g., HTTP, JDBC, SSH) to fetch metrics from the target system.
---
### 4. Result Processing: What Happens to Collected Data
Once metrics are collected, the results are processed by the **`CollectDataDispatch`** module.
- If the task is recurring, it is rescheduled via `TimerDispatch`.
- Results are added to a **`CommonDataQueue`** for further handling.
For external collectors, results are sent **back to the Manager** via the Netty TCP connection. For the main collector, results are forwarded **directly** to the next processing stage without network overhead.
---
### 5. Alerting & Storage: Making Metrics Useful
The Manager receives metric data and pushes it into the `MetricsDataToAlertQueue`, where it is processed through two main pipelines:
#### 🔔 Alerting
- The `RealTimeAlertCalculator` consumes metrics from the alert queue.
- It checks each metric against user-defined alert rules and triggers alerts if conditions are met.
#### 🧠 Storage
- After alert evaluation, metrics are added to the `MetricsDataToStorageQueue`.
- A background thread (`DataStorageDispatch`) processes this queue and stores the metrics in a database for long-term analysis and dashboard visualization.
---
### Standalone Mode: No External Collectors Required
Thanks to the built-in **main collector**, HertzBeat can operate entirely in standalone mode. This is especially useful for testing, small deployments, or quick setup. All core components — job scheduling, collection, alerting, and storage — run within a single process.
---
### 🧠 Conclusion
HertzBeats metric collection system is designed for **performance, scalability, and flexibility**. With its:
- **Queue-based, multi-threaded architecture**
- **Persistent TCP connections** for reliable job/result flow
- **Built-in main collector** for standalone operation
it handles large-scale monitoring workloads with minimal overhead and high efficiency.
---
### 🙌 Whats Next?
If you're curious to explore more:
- ⭐️ [Star the project on GitHub](https://github.com/apache/hertzbeat)
- 🤝 [Contribute or open an issue](https://github.com/apache/hertzbeat/issues)
+2 -2
View File
@@ -62,8 +62,8 @@ The HertzBeat install package will at `dist/hertzbeat-{version}.tar.gz`
2. Execute under the project root directory: `mvn clean install`
3. Cd to the `collector` directory: `cd collector`
3. Cd to the `hertzbeat-collector` directory: `cd hertzbeat-collector`
4. Execute under `collector` directory: `mvn clean package -Pcluster`
4. Execute under `hertzbeat-collector` directory: `mvn clean package -Pcluster`
The HertzBeat collector package will at `dist/hertzbeat-collector-{version}.tar.gz`
+57
View File
@@ -0,0 +1,57 @@
---
id: alarm_center
title: Alarm Center
sidebar_label: Alarm Center
keywords:
[open-source monitoring system, alarm center, alarm management, alarm display]
---
> The Alarm Center serves as a comprehensive visualization platform that displays all alarms after undergoing grouping, consolidation, suppression, and silencing processes. It encompasses both internally triggered threshold-based alarms and integrated third-party notifications.
## Alarm Sources
The HertzBeat Alarm Center manages notifications from two primary sources:
1. Internal Threshold-Triggered Alarms
- Generated when monitoring metrics exceed predefined thresholds
- Directly correlated with monitoring tasks and threshold rules configured within the system
- Manageable through adjustment of monitoring parameters and threshold configurations
2. Third-Party Integrated Alarms
- Received through API interfaces from external systems
- Compatible with various monitoring systems and alarm platforms
- Processed through identical workflow as internal alarms
## Alarm Processing Mechanism
Before appearing in the Alarm Center, all notifications undergo several processing stages:
1. Grouping
- Categorizes related alarms based on source, type, severity, and other attributes (labels)
- Facilitates efficient management of high-volume alarms
- Supports customizable grouping rules for diverse scenarios
2. Consolidation
- Mitigates notification fatigue from multiple similar alarms within short intervals
- Presents consolidated alarms in a streamlined format, eliminating redundancy
3. Suppression
- Manages alarm dependencies
- Suppresses secondary alarms when primary alarms are triggered
- Supports configurable suppression rules based on alarm dependencies
4. Silencing
- Temporarily mutes specific alarms during designated periods
- Ideal for system maintenance windows and known issue handling
- Enables time-based silence rule configuration
## Alarm Center Interface
![alarm_center](/img/docs/help/alarm-center-1.png)
The Alarm Center provides a comprehensive view of all system alarms:
1. Alarm Display
- Lists all alarms with crucial information including status, source, labels, and timestamps
- Offers detailed view functionality for comprehensive alarm information and context
2. Search Functionality
- Enables rapid alarm identification
- Supports multiple search criteria (labels, annotations, alarm status)
3. Alarm Management
- Alarm Deletion: Removes alarms no longer requiring attention
+131
View File
@@ -0,0 +1,131 @@
---
id: collector
title: HertzBeat Collector
sidebar_label: Collector
keywords: [monitoring, observability, collector, metrics]
---
> HertzBeat Collector is a lightweight data collection module that enables metrics collection, high availability deployments, and cloud-edge collaboration in Apache HertzBeat (incubating).
## Introduction
HertzBeat Collector is a versatile and lightweight metrics collection module within the Apache HertzBeat monitoring system. It's designed to gather monitoring data from various targets and send the collected metrics to the main HertzBeat server for processing, alerting, and visualization.
With the collector module, you can implement:
- **High Availability**: Deploy multiple collectors to ensure continuous monitoring even if some collector instances fail
- **Load Balancing**: Distribute monitoring tasks across multiple collectors to improve performance
- **Cloud-Edge Collaboration**: Monitor resources in isolated networks while managing everything from a central HertzBeat server
## Collector Architecture
The collector module is built with a modular design to make it easily extensible for various monitoring scenarios. The architecture consists of:
1. **Collector Entry Point**: The main entry point for running the collector module, from which collection tasks are executed after startup.
2. **collector-basic**: Contains implementations for common protocols like HTTP, JDBC, SSH, SNMP, etc. These collectors typically don't require additional proprietary dependencies and can handle most basic monitoring needs.
3. **collector-common**: Provides general utility classes and methods, such as connection pools and caching mechanisms that other modules can reuse.
4. **collector-xxx**: Extension modules for specific services or protocols (MongoDB, RocketMQ, Kafka, NebulaGraph, etc.). These modules often require specific dependencies for their respective services.
## Supported Protocols
HertzBeat Collector supports an extensive list of monitoring protocols:
| Protocol Category | Protocols |
| ----------------- | ------------------------------------------------------------------------------------- |
| Web/API | `http`, `ssl_cert`, `websocket` |
| Databases | `jdbc`, `redis`, `mongodb`, `memcached` |
| Operating Systems | `ssh`, `ipmi` |
| Network | `icmp` (ping), `telnet`, `snmp`, `modbus` |
| Messaging | `mqtt`, `rocketmq`, `kafka` |
| Email | `pop3`, `smtp`, `imap` |
| Cloud Services | `prometheus`, `nebulagraph`, `ngql` |
| Others | `jmx`, `dns`, `ftp`, `ntp`, `udp`, `nginx`, `redfish`, `script`, `registry`, `httpsd` |
## Deployment Options
You can deploy HertzBeat Collector in several ways depending on your environment and needs, once you log in to the HertzBeat web interface and go to the collector, you can see the deployment options.
Parameters explanation:
- `-e IDENTITY=custom-collector-name`: (Optional) Set a unique identifier for this collector. Must be unique across all collectors.
- `-e MODE=public`: Set the running mode (public or private), for public cluster or private cloud-edge mode.
- `-e MANAGER_HOST=192.168.1.100`: Important! Set the IP address of the main HertzBeat server. Replace with your actual server IP.
- `-e MANAGER_PORT=1158`: (Optional) Set the port of the main HertzBeat server, default is 1158.
- `-v $(pwd)/logs:/opt/hertzbeat-collector/logs`: (Optional) Mount the log files to the local host.
## Operating Modes
HertzBeat Collector supports two operating modes:
### Public Mode (Cluster Mode)
In public mode, collectors form a cluster with the main HertzBeat server. Tasks are automatically distributed among collectors, providing high availability and load balancing.
- Set `MODE=public` when deploying the collector
- All collectors must have connectivity to the main HertzBeat server
- Great for horizontal scaling to handle large numbers of monitoring tasks
### Private Mode (Cloud-Edge Mode)
In private mode, collectors operate in isolated networks while still reporting to a central HertzBeat server. This allows monitoring of resources in multiple separate networks.
- Set `MODE=private` when deploying the collector
- Collectors need outbound connectivity to the HertzBeat server, but inbound connectivity is not required
- Ideal for monitoring resources across different data centers, cloud providers, or network segments
## Configuration Parameters
| Parameter | Description | Default |
| -------------- | ----------------------------------- | ------------------------- |
| `identity` | Unique identifier for the collector | Auto-generated if not set |
| `mode` | Operating mode (public/private) | public |
| `manager-host` | IP address of the HertzBeat server | IP |
| `manager-port` | Port of the HertzBeat server | 1158 |
## Collector Management
You can manage collectors through the HertzBeat web interface:
1. Navigate to the Overview page to see all registered collectors
2. Monitor collector status (online/offline), metrics tasks, and system information
3. Enable or disable collectors as needed
## High Availability Setup
To achieve high availability with HertzBeat collectors:
1. Deploy multiple collector instances across different servers or containers
2. Ensure all collectors have the same `mode` setting
3. Connect all collectors to the same HertzBeat server
4. HertzBeat will automatically distribute monitoring tasks and handle failover
If a collector goes offline, its tasks will be reassigned to other available collectors. When the collector comes back online, it will receive new tasks based on the current load distribution.
## Cloud-Edge Collaboration
For monitoring across isolated networks:
1. Deploy HertzBeat Server in your central management network
2. Deploy collectors in each isolated network you need to monitor
3. Configure collectors with:
- `MODE=private`
- `MANAGER_HOST=` pointing to your central HertzBeat server
4. Ensure outbound connectivity from each isolated network to the central server
5. Manage all monitoring tasks from the central HertzBeat dashboard
## Advanced Features
### Custom Protocol Support
HertzBeat's architecture allows for extending the collector with custom protocols. Developers can create new collector modules following the project's modular design.
### Task Scheduling
The collector automatically handles task scheduling based on task priority, available resources, and current system load. Tasks are processed with intelligent prioritization to ensure critical monitoring is performed first.
### Resource Utilization
Collectors are designed to be lightweight and efficient with system resources, making them suitable for deployment on various hardware, from small edge devices to powerful servers.
+2
View File
@@ -107,6 +107,8 @@ sidebar_label: Help Center
> The triggered alarm information center provides query and filtering of alarm deletion, alarm processing, mark unprocessed, alarm level status, etc.
More details see&emsp;&#x1F449;&emsp;[Alarm center](alarm_center)
### Alarm configuration
> The Metric threshold configuration provides the Metric threshold configuration in the form of expression, which can set the alarm level, trigger times, alarm notification template and whether it is enabled, correlation monitoring and other functions.
@@ -48,7 +48,7 @@
"description": "The label of footer link with label=contact linking to /docs/community/contact"
},
"copyright": {
"message": "\n <div style=\"text-align: left;margin-top:30px\">\n <div style=\"align-items: center; display: flex\">\n <div style=\"width: 1200px; background-color: #282c77; padding: 10px; border-radius: 6px\">\n <a href=\"https://incubator.apache.org/\">\n <img src=\"/img/icons/apache-incubator.svg\" alt=\"Apache Incubator logo\">\n </a>\n </div>\n <div style=\"margin-left: 40px\">\n <p style=\"font-size: 14px;line-height: 25px;\">\n Apache HertzBeat is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. 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.\n </p>\n </div>\n </div>\n\n <div style=\"border-top: 1px solid #525252;min-height: 60px;line-height: 25px;text-align: left;font-size: 14px;display: flex;align-items: center;\">\n <span>\n Copyright © 2024 The Apache Software Foundation. Apache HertzBeat, HertzBeat, and its feather logo are trademarks of The Apache Software Foundation.\n </span>\n </div>\n </div>",
"message": "\n <div style=\"text-align: left;margin-top:30px\">\n <div style=\"align-items: center; display: flex\">\n <div style=\"width: 1200px; background-color: #282c77; padding: 10px; border-radius: 6px\">\n <a href=\"https://incubator.apache.org/\">\n <img src=\"/img/icons/apache-incubator.svg\" alt=\"Apache Incubator logo\">\n </a>\n </div>\n <div style=\"margin-left: 40px\">\n <p style=\"font-size: 14px;line-height: 25px;\">\n Apache HertzBeat is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. 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.\n </p>\n </div>\n </div>\n\n <div style=\"border-top: 1px solid #525252;min-height: 60px;line-height: 25px;text-align: left;font-size: 14px;display: flex;align-items: center;\">\n <span>\n Copyright © 2024-2025 The Apache Software Foundation. Apache HertzBeat, HertzBeat, and its feather logo are trademarks of The Apache Software Foundation.\n </span>\n </div>\n </div>",
"description": "The footer copyright"
}
}
@@ -128,11 +128,11 @@
"description": "The label for category NGQL in sidebar docs"
},
"sidebar.docs.category.llm": {
"message": "Ai大模型监控",
"message": "AI大模型监控",
"description": "The label for category llm in sidebar docs"
},
"sidebar.docs.category.aiConfig": {
"message": "Ai大模型配置",
"message": "AI大模型配置",
"description": "The label for category aiConfig in sidebar docs"
},
"sidebar.docs.category.install": {
@@ -65,8 +65,8 @@ HertzBeat 包将生成为 `dist/hertzbeat-{version}.tar.gz`
2. 在项目根目录运行: `mvn clean install`
3. 切换到 `collector` 目录: `cd collector`
3. 切换到 `hertzbeat-collector` 目录: `cd hertzbeat-collector`
4.`collector` 目录下执行: `mvn clean package -Pcluster`
4.`hertzbeat-collector` 目录下执行: `mvn clean package -Pcluster`
HertzBeat 采样器包将生成为 `dist/hertzbeat-collector-{version}.tar.gz`
@@ -0,0 +1,56 @@
---
id: alarm_center
title: 告警中心
sidebar_label: 告警中心
keywords: [开源监控系统, 告警中心, 告警管理,告警显示]
---
> 告警中心是一个展示平台,用于显示所有经过分组、收敛、抑制、静默等处理的告警,包括由内部系统阈值触发的告警和第三方接入告警。
## 告警来源
HertzBeat 的告警中心管理来自两个主要来源的告警:
1. 系统内部阈值触发的告警
- 当监控指标超过预定义阈值时生成
- 与系统中配置的监控任务和阈值规则直接相关
- 可以通过调整监控任务和阈值设置进行控制
2. 第三方接入告警
- 通过 API 接口从外部系统接收
- 支持与其他监控系统或告警平台集成
- 与内部告警一样经过相同的处理流程
## 告警处理机制
在显示到告警中心之前,所有告警都会经过几个处理步骤:
1. 分组
- 基于来源、类型、严重程度和其他属性(标签)对相关告警进行分类
- 帮助高效管理大量告警
- 支持针对不同场景的自定义分组规则
2. 收敛
- 减少短时间内发生的多个类似告警产生的干扰
- 以更简洁的方式呈现收敛后的告警,避免信息冗余
3. 抑制
- 处理告警之间的依赖关系
- 当关键告警触发时,可以抑制相关的次要告警
- 支持配置定义告警依赖关系的抑制规则
4. 静默
- 在特定时间段内暂时屏蔽某些告警
- 适用于系统维护、已知问题处理等场景
- 可以基于时间设置静默规则
## 告警中心界面
![alarm_center](/img/docs/help/alarm-center-1.png)
告警中心提供了系统所有告警的全面视图:
1. 告警显示
- 列出所有告警,包含告警状态、来源、标签和时间等关键信息
- 提供详细视图功能,显示完整的告警信息和上下文
2. 搜索功能
- 帮助快速定位特定告警
- 支持多种搜索(标签、注解、告警状态等)
3. 告警管理
- 告警删除:移除不再需要关注的告警
@@ -88,7 +88,7 @@ sidebar_label: 帮助入门
&emsp;&#x1F449;&emsp;[ElasticSearch](elasticsearch) <br />
&emsp;&#x1F449;&emsp;[Flink](flink) <br />
### Ai大模型监控
### AI大模型监控
&emsp;&#x1F449;&emsp;[OpenAi](openai) <br />
@@ -107,6 +107,8 @@ sidebar_label: 帮助入门
> 已触发的告警信息中心,提供告警删除,告警处理,标记未处理,告警级别状态等查询过滤。
详见&emsp;&#x1F449;&emsp;[告警中心](alarm_center)
### 告警配置
> 指标阈值配置,提供表达式形式的指标阈值配置,可设置告警级别,触发次数,告警通知模版和是否启用,关联监控等功能。
@@ -87,7 +87,7 @@ sidebar_label: 帮助入门
&emsp;&#x1F449;&emsp;[ElasticSearch](elasticsearch) <br />
&emsp;&#x1F449;&emsp;[Flink](flink) <br />
### Ai大模型监控
### AI大模型监控
&emsp;&#x1F449;&emsp;[OpenAi](openai) <br />
@@ -48,7 +48,7 @@
"description": "The label of footer link with label=contact linking to /docs/community/contact"
},
"copyright": {
"message": "\n <div style=\"text-align: left;margin-top:30px\">\n <div style=\"align-items: center; display: flex\">\n <div style=\"width: 1200px; background-color: #282c77; padding: 10px; border-radius: 6px\">\n <a href=\"https://incubator.apache.org/\">\n <img src=\"/img/icons/apache-incubator.svg\" alt=\"Apache Incubator logo\">\n </a>\n </div>\n <div style=\"margin-left: 40px\">\n <p style=\"font-size: 14px;line-height: 25px;\">\n Apache HertzBeat is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. 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.\n </p>\n </div>\n </div>\n\n <div style=\"border-top: 1px solid #525252;min-height: 60px;line-height: 25px;text-align: left;font-size: 14px;display: flex;align-items: center;\">\n <span>\n Copyright © 2024 The Apache Software Foundation. Apache HertzBeat, HertzBeat, and its feather logo are trademarks of The Apache Software Foundation.\n </span>\n </div>\n </div>",
"message": "\n <div style=\"text-align: left;margin-top:30px\">\n <div style=\"align-items: center; display: flex\">\n <div style=\"width: 1200px; background-color: #282c77; padding: 10px; border-radius: 6px\">\n <a href=\"https://incubator.apache.org/\">\n <img src=\"/img/icons/apache-incubator.svg\" alt=\"Apache Incubator logo\">\n </a>\n </div>\n <div style=\"margin-left: 40px\">\n <p style=\"font-size: 14px;line-height: 25px;\">\n Apache HertzBeat is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. 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.\n </p>\n </div>\n </div>\n\n <div style=\"border-top: 1px solid #525252;min-height: 60px;line-height: 25px;text-align: left;font-size: 14px;display: flex;align-items: center;\">\n <span>\n Copyright © 2024-2025 The Apache Software Foundation. Apache HertzBeat, HertzBeat, and its feather logo are trademarks of The Apache Software Foundation.\n </span>\n </div>\n </div>",
"description": "The footer copyright"
}
}
+23 -70
View File
@@ -23,28 +23,19 @@
{
"type": "category",
"label": "extern-deploy",
"items": [
"start/baota-deploy",
"start/rainbond-deploy"
]
"items": ["start/baota-deploy", "start/rainbond-deploy"]
}
]
},
{
"type": "category",
"label": "upgrade",
"items": [
"start/1.6.0-update",
"start/upgrade"
]
"items": ["start/1.6.0-update", "start/upgrade"]
},
{
"type": "category",
"label": "setting",
"items": [
"start/account-modify",
"start/custom-config"
]
"items": ["start/account-modify", "start/custom-config"]
},
{
"type": "category",
@@ -60,9 +51,7 @@
{
"type": "category",
"label": "use-case",
"items": [
"start/ssl-cert-practice"
]
"items": ["start/ssl-cert-practice"]
}
]
},
@@ -132,11 +121,7 @@
{
"type": "category",
"label": "cache",
"items": [
"help/redis",
"help/memcached",
"help/valkey"
]
"items": ["help/redis", "help/memcached", "help/valkey"]
},
{
"type": "category",
@@ -160,9 +145,7 @@
{
"type": "category",
"label": "server",
"items": [
"help/ipmi"
]
"items": ["help/ipmi"]
},
{
"type": "category",
@@ -212,55 +195,37 @@
{
"type": "category",
"label": "webserver",
"items": [
"help/tomcat",
"help/jetty"
]
"items": ["help/tomcat", "help/jetty"]
},
{
"type": "category",
"label": "cloud-native",
"items": [
"help/docker",
"help/kubernetes"
]
"items": ["help/docker", "help/kubernetes"]
},
{
"type": "category",
"label": "llm",
"items": [
"help/openai"
]
"items": ["help/openai"]
},
{
"type": "category",
"label": "aiConfig",
"items": [
"help/aiConfig"
]
"items": ["help/aiConfig"]
},
{
"type": "category",
"label": "custom",
"items": [
"help/kafka_promql",
"help/influxdb_promql"
]
"items": ["help/kafka_promql", "help/influxdb_promql"]
},
{
"type": "category",
"label": "network",
"items": [
"help/huawei_switch"
]
"items": ["help/huawei_switch"]
},
{
"type": "category",
"label": "threshold",
"items": [
"help/alert_threshold",
"help/alert_threshold_expr"
]
"items": ["help/alert_threshold", "help/alert_threshold_expr"]
},
{
"type": "category",
@@ -284,6 +249,8 @@
"help/plugin",
"help/time_expression",
"help/grafana_dashboard",
"help/collector",
"help/alarm_center",
"help/issue"
]
},
@@ -307,44 +274,32 @@
{
"type": "category",
"label": "jdbc",
"items": [
"advanced/extend-jdbc"
]
"items": ["advanced/extend-jdbc"]
},
{
"type": "category",
"label": "ssh",
"items": [
"advanced/extend-ssh"
]
"items": ["advanced/extend-ssh"]
},
{
"type": "category",
"label": "telnet",
"items": [
"advanced/extend-telnet"
]
"items": ["advanced/extend-telnet"]
},
{
"type": "category",
"label": "jmx",
"items": [
"advanced/extend-jmx"
]
"items": ["advanced/extend-jmx"]
},
{
"type": "category",
"label": "snmp",
"items": [
"advanced/extend-snmp"
]
"items": ["advanced/extend-snmp"]
},
{
"type": "category",
"label": "NGQL",
"items": [
"advanced/extend-ngql"
]
"items": ["advanced/extend-ngql"]
}
]
},
@@ -389,13 +344,11 @@
}
]
},
{
"type": "category",
"label": "Others",
"items": [
"others/resource"
]
"items": ["others/resource"]
}
]
}
+4 -4
View File
@@ -76,14 +76,14 @@
"githubId": "76642201",
"gitUrl": "https://github.com/cuipiheqiuqiu",
"name": "Dong Xiang"
}
],
"committer" : [
},
{
"githubId": "29418975",
"gitUrl": "https://github.com/zhangshenghang",
"name": "Shenghang Zhang"
},
}
],
"committer" : [
{
"githubId": "15684156",
"gitUrl": "https://github.com/crossoverJie",
Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB

@@ -21,7 +21,7 @@
[help_message_content]="'alert.help.inhibit' | i18n"
[guild_link]="'alert.help.inhibit.link' | i18n"
[module_name]="'menu.alert.inhibit'"
[icon_name]="'filter'"
[icon_name]="'delete-column'"
></app-help-message-show>
<nz-divider></nz-divider>
@@ -21,7 +21,7 @@
[help_message_content]="'alert.help.integration' | i18n"
[guild_link]="'alert.help.integration.link' | i18n"
[module_name]="'menu.alert.integration'"
[icon_name]="'filter'"
[icon_name]="'api'"
></app-help-message-show>
<nz-divider></nz-divider>
@@ -21,7 +21,7 @@
[help_message_content]="'bulletin.help.content' | i18n"
[guild_link]="'bulletin.help.link' | i18n"
[module_name]="'menu.monitor.bulletin'"
[icon_name]="'calculator'"
[icon_name]="'book'"
></app-help-message-show>
<nz-divider></nz-divider>
@@ -29,85 +29,59 @@
[nzLoading]="!app || loading"
[nzExtra]="card ? (!monitor ? metrics_card_extra : monitor_card_extra) : ''"
>
<div *ngIf="!!monitor">
<div nz-row nzGutter="16">
<div nz-col nzSpan="8"><p style="text-align: right">ID</p></div>
<div nz-col nzSpan="16"
><p style="text-align: left">{{ monitorId }}</p></div
>
</div>
<div nz-row nzGutter="16">
<div nz-col nzSpan="8"
><p style="text-align: right">{{ 'monitor.detail.name' | i18n }}</p></div
>
<div nz-col nzSpan="16"
><p style="text-align: left">{{ monitor.name }}</p></div
>
</div>
<div nz-row nzGutter="16">
<div nz-col nzSpan="8"><p style="text-align: right">HOST</p></div>
<div nz-col nzSpan="16"
><p style="text-align: left">{{ monitor.host }}</p></div
>
</div>
<div nz-row nzGutter="16">
<div nz-col nzSpan="8"
><p style="text-align: right">{{ 'monitor.detail.port' | i18n }}</p></div
>
<div nz-col nzSpan="16"
><p style="text-align: left">{{ port }}</p></div
>
</div>
<div nz-row nzGutter="16">
<div nz-col nzSpan="8"
><p style="text-align: right">{{ 'monitor.detail.description' | i18n }}</p></div
>
<div nz-col nzSpan="16"
><p style="text-align: left">{{ monitor.description }}</p></div
>
</div>
<div nz-row nzGutter="16">
<div nz-col nzSpan="8"
><p style="text-align: right">{{ 'monitor.detail.status' | i18n }}</p></div
>
<div nz-col nzSpan="16">
<nz-tag *ngIf="monitor.status == 0" nzColor="default">
<div *ngIf="!!monitor" class="monitor-detail-container">
<div class="monitor-basic-info">
<div class="monitor-info-header">
<div class="monitor-name">{{ monitor.name }}</div>
<nz-tag *ngIf="monitor.status == 0" [nzColor]="'#b2b2b2'" class="status-tag">
<i nz-icon nzType="meh" nzTheme="outline"></i>
<span>{{ 'monitor.status.paused' | i18n }}</span>
</nz-tag>
<nz-tag *ngIf="monitor.status == 1" nzColor="success">
<nz-tag *ngIf="monitor.status == 1" [nzColor]="'#498765'" class="status-tag">
<i nz-icon nzType="smile" nzTheme="outline"></i>
<span>{{ 'monitor.status.up' | i18n }}</span>
</nz-tag>
<nz-tag *ngIf="monitor.status == 2" nzColor="error">
<nz-tag *ngIf="monitor.status == 2" [nzColor]="'#fd4357'" class="status-tag">
<i nz-icon nzType="frown" nzTheme="outline"></i>
<span>{{ 'monitor.status.down' | i18n }}</span>
</nz-tag>
</div>
<div nz-row [nzGutter]="16">
<div nz-col [nzSpan]="24">
<nz-descriptions nzBordered [nzColumn]="{ xxl: 2, xl: 2, lg: 2, md: 1, sm: 1, xs: 1 }">
<nz-descriptions-item [nzTitle]="'ID'">{{ monitorId }}</nz-descriptions-item>
<nz-descriptions-item [nzTitle]="'HOST'">{{ monitor.host }}</nz-descriptions-item>
<nz-descriptions-item [nzTitle]="'monitor.detail.port' | i18n">{{ port }}</nz-descriptions-item>
<nz-descriptions-item [nzTitle]="'monitor.intervals' | i18n">{{ monitor.intervals }}s</nz-descriptions-item>
<nz-descriptions-item [nzTitle]="'label' | i18n" [nzSpan]="2">
<div class="tags-container">
<ng-container *ngFor="let label of getObjectEntries(monitor.labels)">
<nz-tag>{{ label[0] }}: {{ label[1] }}</nz-tag>
</ng-container>
</div>
</nz-descriptions-item>
<nz-descriptions-item [nzTitle]="'monitor.detail.description' | i18n" [nzSpan]="2">
{{ monitor.description }}
</nz-descriptions-item>
<nz-descriptions-item [nzTitle]="'common.new-time' | i18n">
{{ monitor.gmtCreate | date : 'YYYY-MM-dd HH:mm:ss' }}
</nz-descriptions-item>
<nz-descriptions-item [nzTitle]="'common.edit-time' | i18n">
{{ monitor.gmtUpdate | date : 'YYYY-MM-dd HH:mm:ss' }}
</nz-descriptions-item>
</nz-descriptions>
</div>
</div>
</div>
<div nz-row nzGutter="16">
<div nz-col nzSpan="8"
><p style="text-align: right">{{ 'monitor.intervals' | i18n }}</p></div
>
<div nz-col nzSpan="16"
><p style="text-align: left">{{ monitor.intervals }}s</p></div
>
</div>
<div nz-row nzGutter="16">
<div nz-col nzSpan="8"
><p style="text-align: right">{{ 'common.new-time' | i18n }}</p></div
>
<div nz-col nzSpan="16"
><p style="text-align: left">{{ monitor.gmtCreate | date : 'YYYY-MM-dd HH:mm:ss' }}</p></div
>
</div>
<div nz-row nzGutter="16">
<div nz-col nzSpan="8"
><p style="text-align: right">{{ 'common.edit-time' | i18n }}</p></div
>
<div nz-col nzSpan="16"
><p style="text-align: left">{{ monitor.gmtUpdate | date : 'YYYY-MM-dd HH:mm:ss' }}</p></div
>
<div class="monitor-annotations" *ngIf="monitor.annotations && getObjectLength(monitor.annotations) > 0">
<h3 class="section-title">{{ 'annotation' | i18n }}</h3>
<nz-descriptions nzBordered [nzColumn]="1" [nzSize]="'small'">
<nz-descriptions-item *ngFor="let annotation of getObjectEntries(monitor.annotations)" [nzTitle]="annotation[0]">
{{ annotation[1] }}
</nz-descriptions-item>
</nz-descriptions>
</div>
</div>
<nz-table
@@ -124,6 +98,7 @@
<tr>
<th style="text-align: center" *ngFor="let field of fields" nzWidth="100px">
{{ 'monitor.app.' + app + '.metrics.' + metrics + '.metric.' + field.name | i18nElse : field.name }}
<nz-tag *ngIf="field.unit" [nzBordered]="false">{{ field.unit }}</nz-tag>
</th>
</tr>
</thead>
@@ -133,8 +108,7 @@
<ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
<ng-template #contentTemplate>
{{ value.origin }}
<nz-tag *ngIf="value.origin == null" nzColor="warning">{{ 'monitor.detail.value.null' | i18n }}</nz-tag>
<nz-tag *ngIf="fields[i].unit" nzColor="success">{{ fields[i].unit }}</nz-tag>
<nz-tag *ngIf="value.origin == null">{{ 'monitor.detail.value.null' | i18n }}</nz-tag>
</ng-template>
</td>
</tr>
@@ -159,11 +133,11 @@
<tr *ngFor="let field of fields; let i = index">
<td>
{{ 'monitor.app.' + app + '.metrics.' + metrics + '.metric.' + field.name | i18nElse : field.name }}
<nz-tag *ngIf="field.unit" [nzBordered]="false">{{ field.unit }}</nz-tag>
</td>
<td
>{{ rowValues[i].origin }}
<nz-tag *ngIf="rowValues[i].origin == null" nzColor="warning">{{ 'monitor.detail.value.null' | i18n }}</nz-tag>
<nz-tag *ngIf="field.unit" nzColor="success">{{ field.unit }}</nz-tag>
<nz-tag *ngIf="rowValues[i].origin == null">{{ 'monitor.detail.value.null' | i18n }}</nz-tag>
</td>
</tr>
</tbody>
@@ -1,3 +1,5 @@
@import "~src/styles/theme";
p {
font-size: xx-small;
word-wrap: break-word;
@@ -18,3 +20,48 @@ p {
margin-bottom: inherit;
}
}
.monitor-detail-container {
display: flex;
flex-direction: column;
gap: 20px;
}
.monitor-basic-info {
width: 100%;
}
.monitor-info-header {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 16px;
}
.monitor-name {
font-size: 18px;
font-weight: 500;
}
.status-tag {
margin-left: auto;
}
.section-title {
font-size: 16px;
font-weight: 500;
margin-bottom: 12px;
border-left: 4px solid @primary-color;
padding-left: 10px;
}
.tags-container {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 8px;
}
.monitor-annotations {
width: 100%;
}
@@ -96,4 +96,14 @@ export class MonitorDataTableComponent implements OnInit {
}
);
}
getObjectLength(obj: Record<string, string> | undefined): number {
if (!obj) return 0;
return Object.keys(obj).length;
}
getObjectEntries(obj: Record<string, string> | undefined): Array<[string, string]> {
if (!obj) return [];
return Object.entries(obj);
}
}
@@ -22,6 +22,7 @@ import { NgModule, Type } from '@angular/core';
import { SharedModule } from '@shared';
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions';
import { NzDividerModule } from 'ng-zorro-antd/divider';
import { NzLayoutModule } from 'ng-zorro-antd/layout';
import { NzListModule } from 'ng-zorro-antd/list';
@@ -68,7 +69,8 @@ const COMPONENTS: Array<Type<void>> = [
ClipboardModule,
NzUploadModule,
SafePipe,
NzListModule
NzListModule,
NzDescriptionsModule
],
declarations: COMPONENTS
})
@@ -22,7 +22,7 @@
<div>
<div class="flex help_message_nav">
<a class="help_message_nav_item" [routerLink]="['/']" [queryParams]="{ app: app }">
<i class="help_link_span" nz-icon nzType="home"></i>
<i class="help_link_span" nz-icon nzType="dashboard"></i>
<span>{{ 'menu.dashboard' | i18n }}</span>
</a>
</div>
+1 -1
View File
@@ -591,7 +591,7 @@
"menu.monitor.cn": "云原生监控",
"menu.monitor.custom": "自定义监控",
"menu.monitor.db": "数据库监控",
"menu.monitor.llm": "Ai大模型",
"menu.monitor.llm": "AI大模型",
"menu.monitor.mid": "中间件监控",
"menu.monitor.network": "网络监控",
"menu.monitor.os": "操作系统监控",
+1 -1
View File
@@ -590,7 +590,7 @@
"menu.monitor.cn": "雲原生監控",
"menu.monitor.custom": "自定義監控",
"menu.monitor.db": "數據庫監控",
"menu.monitor.llm": "Ai大模型",
"menu.monitor.llm": "AI大模型",
"menu.monitor.mid": "中間件監控",
"menu.monitor.network": "網絡監控",
"menu.monitor.os": "操作系統監控",