Skip to content

Commit d2a8725

Browse files
authored
Merge branch 'master' into e-branch
2 parents 578337c + cdf060e commit d2a8725

File tree

9 files changed

+160
-7
lines changed

9 files changed

+160
-7
lines changed

hertzbeat-collector/hertzbeat-collector-basic/src/main/java/org/apache/hertzbeat/collector/collect/database/JdbcCommonCollect.java

+7
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,13 @@ private String constructDatabaseUrl(JdbcProtocol jdbcProtocol) {
292292
if (Objects.nonNull(jdbcProtocol.getUrl())
293293
&& !Objects.equals("", jdbcProtocol.getUrl())
294294
&& jdbcProtocol.getUrl().startsWith("jdbc")) {
295+
String url = jdbcProtocol.getUrl().toLowerCase(); // convert the URL to lowercase for case-insensitive checking
296+
// check whether the parameter is valid
297+
if (url.contains("create trigger") || url.contains("create alias") || url.contains("runscript from")
298+
|| url.contains("allowloadlocalinfile") || url.contains("allowloadlocalinfileinpath")
299+
|| url.contains("uselocalinfile")) {
300+
throw new IllegalArgumentException("Invalid JDBC URL: contains malicious characters.");
301+
}
295302
// when has config jdbc url, use it
296303
return jdbcProtocol.getUrl();
297304
}

home/docs/help/linux_script.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ keywords: [open source monitoring system, open source network monitoring, using
88
### Preparation
99

1010
> To monitor the local machine, simply deploy Hertzbeat. To monitor other hosts, you need to deploy a collector on the target host. Refer to [this link](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package) for step 5 of the installation process.
11+
If the collector is installed using Docker, it will cause the collector to be unable to monitor the process information on the host machine, because Docker containers run in an isolated environment, with each container having its own process space.
1112
> When creating a monitoring task and selecting a collector, choose the corresponding collector deployed on the target host.
1213
1314
### Configuration Parameters

home/docs/help/windows.md

+72-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ References:
3232

3333
#### Metric set:system
3434

35-
| Metric name | Metric unit | Metric help description |
35+
| Metric name | Metric unit | Metric help description |
3636
|--------------|-------------|------------------------------|
3737
| name | none | Host name |
3838
| descr | none | Operating system description |
@@ -41,3 +41,74 @@ References:
4141
| services | number | Current number of services |
4242
| processes | number | Current number of processes |
4343
| responseTime | ms | Collection response time |
44+
| location | none | Location |
45+
| memory | GB | System memory |
46+
47+
#### Metric set: process
48+
49+
| Field name | Metric unit | Metric help description |
50+
|-------------------|-------------|-------------------------|
51+
| hrSWRunIndex | none | Index |
52+
| hrSWRunName | none | Process name |
53+
| hrSWRunID | none | Process ID |
54+
| hrSWRunPath | none | Process path |
55+
| hrSWRunParameters | none | Process parameters |
56+
| hrSWRunType | none | Process type |
57+
| hrSWRunStatus | none | Process status |
58+
| hrSWRunPerfCPU | s | Process CPU usage |
59+
| hrSWRunPerfMem | KB | Process memory usage |
60+
61+
#### Metric set: service
62+
63+
| Field name | Metric unit | Metric help description |
64+
|-----------------------|-------------|-------------------------|
65+
| svSvcName | none | Service name |
66+
| svSvcInstalledState | none | Service installed state |
67+
| svSvcOperatingState | none | Service operating state |
68+
| svSvcCanBeUninstalled | none | Can be uninstalled |
69+
| svSvcCanBePaused | none | Can be paused |
70+
71+
#### Metric set: installation
72+
73+
| Field name | Metric unit | Metric help description |
74+
|--------------------|-------------|-------------------------|
75+
| hrSWInstalledIndex | none | Index |
76+
| hrSWInstalledName | none | Installed name |
77+
| hrSWInstalledID | none | Installed ID |
78+
| hrSWInstalledType | none | Installed type |
79+
80+
#### Metric set: storage
81+
82+
| Field name | Metric unit | Metric help description |
83+
|------------|-------------|-------------------------|
84+
| index | none | Index |
85+
| descr | none | Storage description |
86+
| size | Mb | Storage size |
87+
| free | Mb | Free space |
88+
| used | Mb | Used space |
89+
| usage | % | Usage percentage |
90+
91+
#### Metric set: interface details
92+
93+
| Field name | Metric unit | Metric help description |
94+
|--------------|-------------|----------------------------|
95+
| index | none | Index |
96+
| descr | none | Interface name |
97+
| speed | Mbps | Interface speed |
98+
| in_octets | Kbps | Inbound traffic |
99+
| out_octets | Kbps | Outbound traffic |
100+
| admin_status | none | Administrative status |
101+
| oper_status | none | Operational status |
102+
| mtu | B | MTU |
103+
| in_discards | number | Inbound discarded packets |
104+
| in_errors | number | Inbound error packets |
105+
| out_discards | number | Outbound discarded packets |
106+
| out_errors | number | Outbound error packets |
107+
108+
#### Metric set: device
109+
110+
| Field name | Metric unit | Metric help description |
111+
|------------|-------------|-------------------------|
112+
| index | none | Index |
113+
| descr | none | Description |
114+
| status | none | Status |

home/docs/help/windows_script.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ keywords: [open source monitoring system, open source network monitoring, using
88
### Preparation
99

1010
> To monitor the local machine, simply deploy Hertzbeat. To monitor other hosts, you need to deploy a collector on the target host. Refer to [this link](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package) for step 5 of the installation process.
11+
> If the collector is installed using Docker, it will cause the collector to be unable to monitor the process information on the host machine, because Docker containers run in an isolated environment, with each container having its own process space.
1112
> When creating a monitoring task and selecting a collector, choose the corresponding collector deployed on the target host.
1213
1314
### Configuration Parameters

home/docs/introduce.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Do you believe that users can just write a monitoring template on the UI page, c
6767
[Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml),
6868
[DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml),
6969
[ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml),
70-
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml)
70+
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml),
7171
[Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml),
7272
[Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml)
7373
* [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml),
@@ -198,7 +198,7 @@ Built-in support for monitoring types include:
198198
[Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml),
199199
[DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml),
200200
[ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml),
201-
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml)
201+
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml),
202202
[Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml),
203203
[Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml)
204204
* [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml),

home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/linux_script.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ keywords: [开源监控系统, 开源网络监控, 使用脚本监控 Linux 操
88
### 准备工作
99

1010
> 若要监控本机,部署 Hertzbeat 即可,若要监控其他主机,需在目标主机上部署采集器,部署采集器可参考[此链接](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package)的第 5 步。
11+
> 如果使用 Docker 安装采集器,则会导致采集器监控不到宿主机上的进程信息,因为 Docker 容器在一个独立的环境中运行,每个容器都有自己的进程空间。
1112
> 在创建监控任务选择采集器时,需选择目标主机上对应的采集器。
1213
1314
### 配置参数

home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/windows.md

+73-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ keywords: [开源监控系统, 开源操作系统监控, Windows操作系统监
3030

3131
### 采集指标
3232

33-
#### 指标集合:system
33+
#### 指标集合:系统
3434

35-
| 指标名称 | 指标单位 | 指标帮助描述 |
35+
| 指标名称 | 指标单位 | 指标帮助描述 |
3636
|--------------|------|--------|
3737
| name || 主机名称 |
3838
| descr || 操作系统描述 |
@@ -41,3 +41,74 @@ keywords: [开源监控系统, 开源操作系统监控, Windows操作系统监
4141
| services | 个数 | 当前服务数量 |
4242
| processes | 个数 | 当前进程数量 |
4343
| responseTime | ms | 采集响应时间 |
44+
| location || 位置 |
45+
| memory | GB | 系统内存 |
46+
47+
#### 指标集合:进程
48+
49+
| 字段名称 | 指标单位 | 指标帮助描述 |
50+
|-------------------|------|----------|
51+
| hrSWRunIndex || 编号 |
52+
| hrSWRunName || 进程名称 |
53+
| hrSWRunID || 进程 ID |
54+
| hrSWRunPath || 进程路径 |
55+
| hrSWRunParameters || 进程参数 |
56+
| hrSWRunType || 进程类型 |
57+
| hrSWRunStatus || 进程状态 |
58+
| hrSWRunPerfCPU | s | 进程占用 CPU |
59+
| hrSWRunPerfMem | KB | 进程占用内存 |
60+
61+
#### 指标集合:服务
62+
63+
| 字段名称 | 指标单位 | 指标帮助描述 |
64+
|-----------------------|------|-----------|
65+
| svSvcName || 服务名称 |
66+
| svSvcInstalledState || 服务安装状态 |
67+
| svSvcOperatingState || 服务运行状态 |
68+
| svSvcCanBeUninstalled || 服务是否可以被卸载 |
69+
| svSvcCanBePaused || 服务是否可以被暂停 |
70+
71+
#### 指标集合:安装
72+
73+
| 字段名称 | 指标单位 | 指标帮助描述 |
74+
|--------------------|------|--------|
75+
| hrSWInstalledIndex || 编号 |
76+
| hrSWInstalledName || 安装名称 |
77+
| hrSWInstalledID || 安装 ID |
78+
| hrSWInstalledType || 安装类型 |
79+
80+
#### 指标集合:存储
81+
82+
| 字段名称 | 指标单位 | 指标帮助描述 |
83+
|-------|------|--------|
84+
| index || 编号 |
85+
| descr || 存储描述 |
86+
| size | Mb | 存储大小 |
87+
| free | Mb | 存储空闲 |
88+
| used | Mb | 存储占用 |
89+
| usage | % | 存储使用率 |
90+
91+
#### 指标集合:接口详情
92+
93+
| 字段名称 | 指标单位 | 指标帮助描述 |
94+
|--------------|------|--------|
95+
| index || 编号 |
96+
| descr || 接口名称 |
97+
| speed | Mbps | 接口速率 |
98+
| in_octets | Kbps | 入流量 |
99+
| out_octets | Kbps | 出流量 |
100+
| admin_status || 配置状态 |
101+
| oper_status || 当前状态 |
102+
| mtu | B | MTU |
103+
| in_discards | 个数 | 入丢包数 |
104+
| in_errors | 个数 | 入错包数 |
105+
| out_discards | 个数 | 出丢包数 |
106+
| out_errors | 个数 | 出错包数 |
107+
108+
#### 指标集合:设备
109+
110+
| 字段名称 | 指标单位 | 指标帮助描述 |
111+
|----------|------|--------|
112+
| index || 编号 |
113+
| descr || 描述 |
114+
| status || 状态 |

home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/windows_script.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ keywords: [开源监控系统, 开源网络监控, 使用脚本监控 Windows
88
### 准备工作
99

1010
> 若要监控本机,部署 Hertzbeat 即可,若要监控其他主机,需在目标主机上部署采集器,部署采集器可参考[此链接](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package)的第 5 步。
11+
> 如果使用 Docker 安装采集器,则会导致采集器监控不到宿主机上的进程信息,因为 Docker 容器在一个独立的环境中运行,每个容器都有自己的进程空间。
1112
> 在创建监控任务选择采集器时,需选择目标主机上对应的采集器。
1213
1314
### 配置参数

home/i18n/zh-cn/docusaurus-plugin-content-docs/current/introduce.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ HertzBeat 使用这些已有的标准协议或规范,将他们抽象规范可
6666
[Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml),
6767
[DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml),
6868
[ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml),
69-
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml)
69+
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml),
7070
[Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml),
7171
[Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml)
7272
- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml),
@@ -197,7 +197,7 @@ Docker 环境下运行一条命令即可:`docker run -d -p 1157:1157 -p 1158:1
197197
[Oracle](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-oracle.yml), [MongoDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-mongodb.yml),
198198
[DM](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-dm.yml), [OpenGauss](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-opengauss.yml),
199199
[ClickHouse](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-clickhouse.yml), [IoTDB](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-iotdb.yml),
200-
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml)
200+
[Redis Cluster](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_cluster.yml), [Redis Sentinel](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-redis_sentinel.yml),
201201
[Doris BE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_be.yml), [Doris FE](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-doris_fe.yml),
202202
[Memcached](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-memcached.yml), [NebulaGraph](https://github.com/apache/hertzbeat/blob/master/hertzbeat-manager/src/main/resources/define/app-nebula_graph.yml)
203203
- [Linux](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-linux.yml), [Ubuntu](https://raw.githubusercontent.com/apache/hertzbeat/master/hertzbeat-manager/src/main/resources/define/app-ubuntu.yml),

0 commit comments

Comments
 (0)