更新以匹配上游修改

This commit is contained in:
Kris 2024-07-12 05:52:01 +02:00
parent e94693815f
commit 769d0dddf7
No known key found for this signature in database
GPG Key ID: 36AFAA97D2910652
3 changed files with 44 additions and 32 deletions

View File

@ -187,8 +187,8 @@ function getGuideSidebarZhCN() {
{ text: '面板数据迁移、备份和恢复', link: '/guide/q5.html' },
{ text: '设置每月重置流量统计', link: '/guide/q6.html' },
{ text: '自定义 Agent 监控项目', link: '/guide/q7.html' },
{ text: '使用 Cloudflare Access 作为 OAuth2 提供方', link: '/guide/q8' },
{ text: '启用 GPU 监控', link: '/guide/q9' },
{ text: '使用 Cloudflare Access 作为 OAuth2 提供方', link: '/guide/q8.html' },
{ text: '启用 GPU 监控', link: '/guide/q9.html' },
]
},
{
@ -257,9 +257,9 @@ function getGuideSidebarEnUS() {
{ text: 'Real-Time Channel Disconnection/Online Terminal Connection Failure', link: '/en_US/guide/q4.html' },
{ text: 'Perform Data Migration and Backup Recovery', link: '/en_US/guide/q5.html' },
{ text: 'Reset Traffic Statistics Monthly', link: '/en_US/guide/q6.html' },
{ text: 'Custom Agent Monitoring Projects', link: '/en_US/guide/q7.html' },
{ text: 'Use Cloudflare Access As OAuth2 Provider', link: '/en_US/guide/q8' },
{ text: 'Enable GPU monitoring', link: '/en_US/guide/q9' },
{ text: 'Customizing Agent Monitoring Items', link: '/en_US/guide/q7.html' },
{ text: 'Use Cloudflare Access As OAuth2 Provider', link: '/en_US/guide/q8.html' },
{ text: 'Enable GPU monitoring', link: '/en_US/guide/q9.html' },
]
},
{

View File

@ -1,28 +1,34 @@
# Custom Agent Monitoring Projects
---
outline: deep
---
# Customizing Agent Monitoring Items
## Customizing Monitored Network Interfaces and Disk Partitions
## Customize Monitoring for Network Interfaces and Disk Partitions
Execute the following command to select custom network interfaces and partitions, then restart the Agent for the changes to take effect:
Execute the following command to select network interfaces and partitions, then restart the Agent for changes to take effect:
```bash
/opt/nezha/agent/nezha-agent edit
```
## Other Runtime Parameters
To view the supported parameters, execute:
## Additional Runtime Parameters
### Viewing Supported Parameters
To view the supported runtime parameters, please execute the following command:
```bash
./nezha-agent --help
```
If you installed the Agent using the one-click script, you can edit `/etc/systemd/system/nezha-agent.service` and add the following parameters at the end of the `ExecStart=` line:
### Configuring Parameters
If you installed the Agent using a one-click script, you can add or modify parameters by editing the system service configuration. Edit the file `/etc/systemd/system/nezha-agent.service` and append your desired parameters at the end of the `ExecStart=` line:
- `--report-delay`: Controls the interval for reporting system information. The default is 1 second. You can set it to 3 to further reduce the agent's system resource usage (configuration range: 1-4).
- `--skip-conn`: Does not monitor connection counts. Recommended for servers with high connection density or high CPU usage.
- `--skip-procs`: Does not monitor process counts, which can also reduce Agent resource usage.
- `--disable-auto-update`: Disables **automatic updates** for the Agent (security feature).
- `--disable-force-update`: Disables **forced updates** for the Agent (security feature).
- `--disable-command-execute`: Disables the execution of scheduled tasks and the opening of the online terminal on the Agent (security feature).
- `--tls`: Enables SSL/TLS encryption (required if you use nginx to reverse proxy the Agent's gRPC connection and nginx has SSL/TLS enabled).
- `--gpu`: Enable GPU monitoring (may need extra dependencies while monitoring GPU utilization. Refer to FAQ - Enable GPU monitoring for any questions.)
- `--report-delay`: Sets the interval for reporting system information. The default is 1 second. To reduce system resource usage, you can set this to 3 (valid range: 1-4 seconds).
- `--skip-conn`: Disables monitoring of network connections. Recommended for servers with high numbers of connections or high CPU usage.
- `--skip-procs`: Disables monitoring of process counts, helping to reduce resource usage of the Agent.
- `--disable-auto-update`: Disables the **automatic update** feature of the Agent, enhancing security.
- `--disable-force-update`: Disables the **forced update** feature of the Agent, enhancing security.
- `--disable-command-execute`: Prevents execution of any scheduled tasks or use of the WebSSH on the Agent, enhancing security.
- `--tls`: Enables SSL/TLS encryption. This should be enabled when you are using nginx to reverse proxy the Agent's gRPC connections and nginx is configured with SSL/TLS.
- `--gpu`: Enables GPU monitoring. Note: Monitoring GPU usage may require installation of additional dependencies. For more details, refer to the documentation: [Enable GPU Monitoring](/en_US/guide/q9.html).
- `--temperature`: Enables hardware temperature monitoring. Only effective on supported hardware, some VPS may not be able to retrieve temperature information.
- `-q`, `--silent`: Enables silent mode, suppressing any output or logs to the console.

View File

@ -1,8 +1,11 @@
---
outline: deep
---
# 自定义 Agent 监控项目
## 自定义监控的网卡和硬盘分区
执行以下命令来选择自定义的网卡和分区,然后重启 Agent 即可生效:
执行以下命令来选择网卡和分区,然后重启 Agent 即可生效:
```bash
/opt/nezha/agent/nezha-agent edit
@ -10,19 +13,22 @@
## 其他运行参数
通过执行以下命令查看支持的参数:
### 查看支持的参数
要查看支持的运行参数,请执行以下命令:
```bash
./nezha-agent --help
```
如果你使用了一键脚本安装 Agent可以编辑 `/etc/systemd/system/nezha-agent.service`,在 `ExecStart=` 这一行的末尾加上以下参数:
### 配置参数
如果您通过一键脚本安装了 Agent可以通过编辑系统服务配置来添加或修改参数。编辑文件 `/etc/systemd/system/nezha-agent.service`,并在 `ExecStart=` 行的末尾添加您需要的参数:
- `--report-delay`:控制系统信息上报的间隔,默认为 1 秒,可以设置为 3 来进一步降低 agent 端系统资源占用(配置区间 1-4
- `--skip-conn`:不监控连接数,推荐在机场/连接密集型服务器或CPU占用较高的服务器上设置。
- `--skip-procs`:不监控进程数,也可以降低 Agent 占用。
- `--disable-auto-update`:禁止 **自动更新** Agent安全特性
- `--disable-force-update`:禁止 **强制更新** Agent安全特性
- `--disable-command-execute`:禁止在 Agent 上执行定时任务、打开在线终端(安全特性)。
- `--tls`:启用 SSL/TLS 加密(使用 nginx 反向代理 Agent 的 grpc 连接,并且 nginx 开启 SSL/TLS 时,需要启用该项配置)。
- `--gpu`: 启用 GPU 监控(其中 GPU 使用率监控可能需要安装额外依赖。相关问题请参见常见问题 - 启用 GPU 监控。)
- `--report-delay`:设置系统信息上报的间隔时间。默认为 1 秒。为了降低系统资源占用,可以设置为 3有效范围1-4 秒)。
- `--skip-conn`:不监控网络连接数。建议在连接数较多或 CPU 资源占用较高的服务器上使用此参数。
- `--skip-procs`:不监控进程数,有助于降低 Agent 的资源占用。
- `--disable-auto-update`:禁用 Agent 的**自动更新**功能,增强安全性。
- `--disable-force-update`:禁用 Agent 的**强制更新**功能,增强安全性。
- `--disable-command-execute`:禁止在 Agent 上执行任何定时任务或使用在线终端,增强安全性。
- `--tls`:启用 SSL/TLS 加密。当您使用 nginx 反向代理 Agent 的 gRPC 连接且 nginx 配置了 SSL/TLS 时,应启用此配置。
- `--gpu`:启用 GPU 监控。注意GPU 使用率监控可能需要安装额外的依赖包,详细信息可以参考文档:[启用 GPU 监控](/guide/q9.html)。
- `--temperature`:启用硬件温度监控。仅支持的硬件有效,部分 VPS 可能无法获取温度信息。
- `-q`, `--silent`:启用静默模式,不在控制台输出任何信息或日志。