This is an automated email from the ASF dual-hosted git repository.
shown pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new 7b886fe72 [doc] Add doc for linux_script and windows_script (#2646)
7b886fe72 is described below
commit 7b886fe72dac38955a68ed4c5f65120b398b0439
Author: Zhang Yuxuan <[email protected]>
AuthorDate: Tue Sep 3 22:26:25 2024 +0800
[doc] Add doc for linux_script and windows_script (#2646)
Co-authored-by: shown <[email protected]>
Co-authored-by: aias00 <[email protected]>
---
home/docs/help/linux_script.md | 100 +++++++++++++++++++++
home/docs/help/windows_script.md | 85 ++++++++++++++++++
.../current/help/linux_script.md | 100 +++++++++++++++++++++
.../current/help/windows_script.md | 85 ++++++++++++++++++
home/sidebars.json | 4 +-
.../src/main/resources/define/app-linux_script.yml | 4 +-
.../main/resources/define/app-windows_script.yml | 4 +-
7 files changed, 377 insertions(+), 5 deletions(-)
diff --git a/home/docs/help/linux_script.md b/home/docs/help/linux_script.md
new file mode 100644
index 000000000..fcb9c4f09
--- /dev/null
+++ b/home/docs/help/linux_script.md
@@ -0,0 +1,100 @@
+---
+id: linux_script
+title: Monitoring:Using Scripts to Monitor Linux Operating System
+sidebar_label: Using Scripts to Monitor Linux OS
+keywords: [open source monitoring system, open source network monitoring,
using scripts to monitor Linux OS]
+---
+
+### Preparation
+
+> 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.
+> When creating a monitoring task and selecting a collector, choose the
corresponding collector deployed on the target host.
+
+### Configuration Parameters
+
+| Parameter Name | Parameter Description |
+|:---------------|-----------------------------------------------------|---|
+| Monitor Host | The IPv4, IPv6, or domain of the monitored endpoint. Note
⚠️ Do not include protocol headers (e.g., https://, http://). |
+| Task Name | The name identifying this monitoring task, which needs to
be unique. |
+| Collector | Specifies which collector will be used for data
collection in this monitoring task. |
+| Monitoring Interval | The time interval for periodic data collection, in
seconds. |
+| Binding Tag | Classification management tags for monitoring resources. |
+| Description Notes | Additional notes to describe this monitoring task. Users
can add remarks here. |
+
+### Metrics Collection
+
+#### Metric Set: basic
+
+| Metric Name | Metric Unit | Metric Description |
+|-------------|-------------|--------------------------|
+| hostname | None | Name of the host |
+| version | None | Operating system version |
+| uptime | None | System uptime |
+
+#### Metric Set: cpu
+
+| Metric Name | Metric Unit | Metric Description
|
+|----------------|-------------|-----------------------------------------------|
+| info | None | CPU model
|
+| cores | Number | Number of CPU cores
|
+| interrupt | Count | Number of CPU interrupts
|
+| load | None | Average CPU load over the last 1/5/15 minutes
|
+| context_switch | Count | Current number of context switches
|
+| usage | % | CPU usage percentage
|
+
+#### Metric Set: memory
+
+| Metric Name | Metric Unit | Metric Description |
+|-------------|-------------|------------------------------|
+| total | Mb | Total memory capacity |
+| used | Mb | Memory used by user programs |
+| free | Mb | Free memory capacity |
+| buff_cache | Mb | Memory used by cache |
+| available | Mb | Available memory capacity |
+| usage | % | Memory usage percentage |
+
+#### Metric Set: disk
+
+| Metric Name | Metric Unit | Metric Description |
+|---------------|-------------|-------------------------------------------|
+| disk_num | Count | Total number of disks |
+| partition_num | Count | Total number of partitions |
+| block_write | Count | Total number of blocks written to disk |
+| block_read | Count | Total number of blocks read from disk |
+| write_rate | iops | Rate of blocks written to disk per second |
+
+#### Metric Set: interface
+
+| Metric Name | Metric Unit | Metric Description |
+|----------------|-------------|-------------------------------|
+| interface_name | None | Network interface name |
+| receive_bytes | byte | Inbound data traffic (bytes) |
+| transmit_bytes | byte | Outbound data traffic (bytes) |
+
+#### Metric Set: disk_free
+
+| Metric Name | Metric Unit | Metric Description |
+|-------------|-------------|------------------------|
+| filesystem | None | Name of the filesystem |
+| used | Mb | Used disk size |
+| available | Mb | Available disk size |
+| usage | % | Disk usage percentage |
+| mounted | None | Mount point directory |
+
+#### Metric Set: Top 10 Programs by CPU Usage
+
+| Metric Name | Metric Unit | Metric Description |
+|-------------|-------------|-------------------------|
+| id | None | Process ID |
+| cpu | % | CPU usage percentage |
+| ws | % | Memory usage percentage |
+| command | None | Executed command |
+
+#### Metric Set: Top 10 Programs by Memory Usage
+
+| Metric Name | Metric Unit | Metric Description |
+|-------------|-------------|-------------------------|
+| id | None | Process ID |
+| cpu | % | CPU usage percentage |
+| ws | % | Memory usage percentage |
+| command | None | Executed command |
diff --git a/home/docs/help/windows_script.md b/home/docs/help/windows_script.md
new file mode 100644
index 000000000..bf80e972e
--- /dev/null
+++ b/home/docs/help/windows_script.md
@@ -0,0 +1,85 @@
+---
+id: windows_script
+title: Monitoring:Using Scripts to Monitor Windows Operating System
+sidebar_label: Using Scripts to Monitor Windows OS
+keywords: [open source monitoring system, open source network monitoring,
using scripts to monitor Windows OS]
+---
+
+### Preparation
+
+> 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.
+> When creating a monitoring task and selecting a collector, choose the
corresponding collector deployed on the target host.
+
+### Configuration Parameters
+
+| Parameter Name | Parameter Description |
+|:---------------|-----------------------------------------------------|---|
+| Monitor Host | The IPv4, IPv6, or domain of the monitored endpoint. Note
⚠️ Do not include protocol headers (e.g., https://, http://). |
+| Task Name | The name identifying this monitoring task, which needs to
be unique. |
+| Collector | Specifies which collector will be used for data collection
in this monitoring task. |
+| Monitoring Interval | The time interval for periodic data collection, in
seconds. |
+| Binding Tag | Classification management tags for monitoring resources. |
+| Description Notes | Additional notes to describe this monitoring task. Users
can add remarks here. |
+
+### Metrics Collection
+
+#### Metric Set: basic
+
+| Metric Name | Metric Unit | Metric Description |
+|-------------|-------------|--------------------------|
+| hostname | None | Name of the host |
+| version | None | Operating system version |
+
+#### Metric Set: cpu
+
+| Metric Name | Metric Unit | Metric Description |
+|----------------|-------------|------------------------------------|
+| info | None | CPU model |
+| cores | Number | Number of CPU cores |
+| interrupt | Count | Number of CPU interrupts |
+| load | None | Average recent CPU load |
+| context_switch | Count | Current number of context switches |
+| usage | % | CPU usage percentage |
+
+#### Metric Set: memory
+
+| Metric Name | Metric Unit | Metric Description |
+|---------------|-------------|--------------------------------|
+| totalPhysical | Mb | Total physical memory capacity |
+| freePhysical | Mb | Free physical memory capacity |
+| totalVirtual | Mb | Total virtual memory capacity |
+| freeVirtual | Mb | Free virtual memory capacity |
+
+#### Metric Set: disk
+
+| Metric Name | Metric Unit | Metric Description |
+|----------------|-------------|----------------------------|
+| Model | None | Disk model |
+| Size | Mb | Disk size |
+| BytesPerSector | Bytes | Number of bytes per sector |
+
+#### Metric Set: disk_free
+
+| Metric Name | Metric Unit | Metric Description |
+|-------------|-------------|----------------------|
+| Caption | None | Disk label |
+| FreeSpace | Mb | Available disk space |
+| Size | Mb | Total disk space |
+
+#### Metric Set: Top 10 Programs by CPU Usage
+
+| Metric Name | Metric Unit | Metric Description |
+|-------------|-------------|---------------------|
+| name | None | Process name |
+| id | None | Process ID |
+| cpu | Seconds | CPU usage time |
+| ws | Mb | Memory usage |
+
+#### Metric Set: Top 10 Programs by Memory Usage
+
+| Metric Name | Metric Unit | Metric Description |
+|-------------|-------------|---------------------|
+| name | None | Process name |
+| id | None | Process ID |
+| cpu | Seconds | CPU usage time |
+| ws | Mb | Memory usage |
diff --git
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/linux_script.md
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/linux_script.md
new file mode 100644
index 000000000..7a722e414
--- /dev/null
+++
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/linux_script.md
@@ -0,0 +1,100 @@
+---
+id: linux_script
+title: 监控:使用脚本监控 Linux 操作系统
+sidebar_label: 使用脚本监控 Linux 操作系统
+keywords: [开源监控系统, 开源网络监控, 使用脚本监控 Linux 操作系统]
+---
+
+### 准备工作
+
+> 若要监控本机,部署 Hertzbeat
即可,若要监控其他主机,需在目标主机上部署采集器,部署采集器可参考[此链接](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package)的第
5 步。
+> 在创建监控任务选择采集器时,需选择目标主机上对应的采集器。
+
+### 配置参数
+
+| 参数名称 | 参数帮助描述 |
+|:-------|---------------------------------|---|
+| 监控 Host | 被监控的对端 IPV4,IPV6 或域名。注意⚠️不带协议头(eg: https://, http://)。 |
+| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | |
+| 采集器 | 配置此监控使用哪台采集器调度采集。 |
+| 监控周期 | 监控周期性采集数据间隔时间,单位秒。 |
+| 绑定标签 | 对监控资源的分类管理标签。 |
+| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 |
+
+### 采集指标
+
+#### 指标集合:basic
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|----------|------|--------|
+| hostname | 无 | 主机名称 |
+| version | 无 | 操作系统版本 |
+| uptime | 无 | 系统启动时间 |
+
+#### 指标集合:cpu
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|----------------|------|-----------------------|
+| info | 无 | CPU 型号 |
+| cores | 核数 | CPU 内核数量 |
+| interrupt | 个数 | CPU 中断数量 |
+| load | 无 | CPU 最近 1/5/15 分钟的平均负载 |
+| context_switch | 个数 | 当前上下文切换数量 |
+| usage | % | CPU 使用率 |
+
+#### 指标集合:memory
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|------------|------|----------|
+| total | Mb | 总内存容量 |
+| used | Mb | 用户程序内存量 |
+| free | Mb | 空闲内存容量 |
+| buff_cache | Mb | 缓存占用内存 |
+| available | Mb | 剩余可用内存容量 |
+| usage | % | 内存使用率 |
+
+#### 指标集合:disk
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|---------------|------|-----------|
+| disk_num | 块数 | 磁盘总数 |
+| partition_num | 分区数 | 分区总数 |
+| block_write | 块数 | 写入磁盘的总块数 |
+| block_read | 块数 | 从磁盘读出的块数 |
+| write_rate | iops | 每秒写磁盘块的速率 |
+
+#### 指标集合:interface
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|----------------|------|---------------|
+| interface_name | 无 | 网卡名称 |
+| receive_bytes | byte | 入站数据流量(bytes) |
+| transmit_bytes | byte | 出站数据流量(bytes) |
+
+#### 指标集合:disk_free
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|------------|------|---------|
+| filesystem | 无 | 文件系统的名称 |
+| used | Mb | 已使用磁盘大小 |
+| available | Mb | 可用磁盘大小 |
+| usage | % | 使用率 |
+| mounted | 无 | 挂载点目录 |
+
+#### 指标集合:CPU 占用率前10的程序
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|---------|------|---------|
+| id | 无 | 进程 id |
+| cpu | % | cpu 占用率 |
+| ws | % | 内存占用率 |
+| command | 无 | 执行的命令 |
+
+#### 指标集合:内存占用率前10的程序
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|---------|------|---------|
+| id | 无 | 进程 id |
+| cpu | % | cpu 占用率 |
+| ws | % | 内存占用率 |
+| command | 无 | 执行的命令 |
diff --git
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/windows_script.md
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/windows_script.md
new file mode 100644
index 000000000..38abacad6
--- /dev/null
+++
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/windows_script.md
@@ -0,0 +1,85 @@
+---
+id: windows_script
+title: 监控:使用脚本监控 Windows 操作系统
+sidebar_label: 使用脚本监控 Windows 操作系统
+keywords: [开源监控系统, 开源网络监控, 使用脚本监控 Windows 操作系统]
+---
+
+### 准备工作
+
+> 若要监控本机,部署 Hertzbeat
即可,若要监控其他主机,需在目标主机上部署采集器,部署采集器可参考[此链接](https://github.com/apache/hertzbeat?tab=readme-ov-file#2install-via-package)的第
5 步。
+> 在创建监控任务选择采集器时,需选择目标主机上对应的采集器。
+
+### 配置参数
+
+| 参数名称 | 参数帮助描述 |
+|:-------|---------------------------------|---|
+| 监控 Host | 被监控的对端 IPV4,IPV6 或域名。注意⚠️不带协议头(eg: https://, http://)。 |
+| 任务名称 | 标识此监控的名称,名称需要保证唯一性。 | |
+| 采集器 | 配置此监控使用哪台采集器调度采集。 |
+| 监控周期 | 监控周期性采集数据间隔时间,单位秒。 |
+| 绑定标签 | 对监控资源的分类管理标签。 |
+| 描述备注 | 更多标识和描述此监控的备注信息,用户可以在这里备注信息。 |
+
+### 采集指标
+
+#### 指标集合:basic
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|----------|------|--------|
+| hostname | 无 | 主机名称 |
+| version | 无 | 操作系统版本 |
+
+#### 指标集合:cpu
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|----------------|------|-------------|
+| info | 无 | CPU 型号 |
+| cores | 核数 | CPU 内核数量 |
+| interrupt | 个数 | CPU 中断数量 |
+| load | 无 | CPU 最近的平均负载 |
+| context_switch | 个数 | 当前上下文切换数量 |
+| usage | % | CPU 使用率 |
+
+#### 指标集合:memory
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|---------------|------|----------|
+| totalPhysical | Mb | 总物理内存容量 |
+| freePhysical | Mb | 空闲物理内存容量 |
+| totalVirtual | Mb | 总虚拟内存容量 |
+| freeVirtual | Mb | 空闲虚拟内存容量 |
+
+#### 指标集合:disk
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|----------------|------|---------|
+| Model | 无 | 磁盘型号 |
+| Size | Mb | 磁盘大小 |
+| BytesPerSector | 字节 | 每个扇区字节数 |
+
+#### 指标集合:disk_free
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|-----------|------|--------|
+| Caption | 无 | 盘符 |
+| FreeSpace | Mb | 可用空间大小 |
+| Size | Mb | 总空间大小 |
+
+#### 指标集合:CPU 占用率前10的程序
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|------|------|----------|
+| name | 无 | 进程名称 |
+| id | 无 | 进程 id |
+| cpu | 秒 | cpu 使用时间 |
+| ws | Mb | 内存占用量 |
+
+#### 指标集合:内存占用率前10的程序
+
+| 指标名称 | 指标单位 | 指标帮助描述 |
+|------|------|----------|
+| name | 无 | 进程名称 |
+| id | 无 | 进程 id |
+| cpu | 秒 | cpu 使用时间 |
+| ws | Mb | 内存占用量 |
diff --git a/home/sidebars.json b/home/sidebars.json
index 67ca4d7f0..15fe6e5fa 100755
--- a/home/sidebars.json
+++ b/home/sidebars.json
@@ -245,7 +245,9 @@
"help/freebsd",
"help/redhat",
"help/rockylinux",
- "help/euleros"
+ "help/euleros",
+ "help/linux_script",
+ "help/windows_script"
]
},
{
diff --git a/manager/src/main/resources/define/app-linux_script.yml
b/manager/src/main/resources/define/app-linux_script.yml
index 113c90f1a..51f5f683f 100644
--- a/manager/src/main/resources/define/app-linux_script.yml
+++ b/manager/src/main/resources/define/app-linux_script.yml
@@ -27,8 +27,8 @@ help:
en-US: Hertzbeat uses a collector as an agent to directly execute <a
class='help_module_content'
href='https://hertzbeat.apache.org/docs/advanced/extend-script'> Shell commands
</a> to collect and monitor general performance metrics of the Linux operating
system (system information, CPU, memory, disk, network card, file system, TOP
resource processes, etc.).<br>You can click “<i>Create New Linux Script</i>” to
add it. Or select “<i>More Actions</i>” to import an existing configuration.
zh-TW: Hertzbeat 使用采集器作為 agent 直接運行 <a class='help_module_content'
href='https://hertzbeat.apache.org/docs/advanced/extend-script'> Shell 命令 </a>
對 Linux 操作系統的通用性能指標 (系統信息、CPU、內存、磁盤、網卡、文件系統、TOP資源進程等) 進行採集監控。<br>您可以點擊“<i>新建
Linux Script</i>”進行添加。或者選擇“<i>更多操作</i>”,導入已有配置。
helpLink:
- zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/script
- en-US: https://hertzbeat.apache.org/docs/help/script
+ zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/linux_script
+ en-US: https://hertzbeat.apache.org/docs/help/linux_script
# Input params define for monitoring(render web ui by the definition)
params:
# field-param field key
diff --git a/manager/src/main/resources/define/app-windows_script.yml
b/manager/src/main/resources/define/app-windows_script.yml
index a13e9e248..e9581f55c 100644
--- a/manager/src/main/resources/define/app-windows_script.yml
+++ b/manager/src/main/resources/define/app-windows_script.yml
@@ -27,8 +27,8 @@ help:
en-US: Hertzbeat uses a collector as an agent to directly execute <a
class='help_module_content'
href='https://hertzbeat.apache.org/docs/advanced/extend-script'> CMD or
Powershell commands </a> to collect and monitor general performance metrics of
the Windows operating system (system information, CPU, memory, disk, network
card, file system, TOP resource processes, etc.).<br>You can click “<i>Create
New Linux Script</i>” to add it. Or select “<i>More Actions</i>” to import an
existing [...]
zh-TW: Hertzbeat 使用采集器作為 agent 直接運行 <a class='help_module_content'
href='https://hertzbeat.apache.org/docs/advanced/extend-script'> CMD 或
Powershell 命令 </a> 對 Windows 操作系統的通用性能指標 (系統信息、CPU、內存、磁盤、網卡、文件系統、TOP資源進程等)
進行採集監控。<br>您可以點擊“<i>新建 Linux Script</i>”進行添加。或者選擇“<i>更多操作</i>”,導入已有配置。
helpLink:
- zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/script
- en-US: https://hertzbeat.apache.org/docs/help/script
+ zh-CN: https://hertzbeat.apache.org/zh-cn/docs/help/windows_script
+ en-US: https://hertzbeat.apache.org/docs/help/windows_script
# Input params define for monitoring(render web ui by the definition)
params:
# field-param field key
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]