2 lines
2.3 KiB
JavaScript
2 lines
2.3 KiB
JavaScript
import{_ as e,o as t,c as a,R as o}from"./chunks/framework.1625126e.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1687756292000}'),n={name:"guide/q7.md"},d=o('<h2 id="自定义-agent-监控项目" tabindex="-1">自定义 Agent 监控项目 <a class="header-anchor" href="#自定义-agent-监控项目" aria-label="Permalink to "自定义 Agent 监控项目""></a></h2><h4 id="自定义监控的网卡和硬盘分区" tabindex="-1">自定义监控的网卡和硬盘分区 <a class="header-anchor" href="#自定义监控的网卡和硬盘分区" aria-label="Permalink to "自定义监控的网卡和硬盘分区""></a></h4><ul><li>执行 <code>/opt/nezha/agent/nezha-agent --edit-agent-config</code> 来选择自定义的网卡和分区,然后重启 Agent 即可生效</li></ul><h4 id="其他运行参数" tabindex="-1">其他运行参数 <a class="header-anchor" href="#其他运行参数" aria-label="Permalink to "其他运行参数""></a></h4><p>通过执行 <code>./nezha-agent --help</code> 查看支持的参数,如果你使用了一键脚本安装Agent,可以编辑 <code>/etc/systemd/system/nezha-agent.service</code>,在 <code>ExecStart=</code> 这一行的末尾加上以下参数</p><ul><li><code>--report-delay</code> 控制系统信息上报的间隔,默认为 1 秒,可以设置为 3 来进一步降低 agent 端系统资源占用(配置区间 1-4)</li><li><code>--skip-conn</code> 不监控连接数,推荐 机场/连接密集型 服务器或CPU占用较高的服务器设置</li><li><code>--skip-procs</code> 不监控进程数,也可以降低 Agent 占用</li><li><code>--disable-auto-update</code> 禁止 <strong>自动更新</strong> Agent(安全特性)</li><li><code>--disable-force-update</code> 禁止 <strong>强制更新</strong> Agent(安全特性)</li><li><code>--disable-command-execute</code> 禁止在 Agent 上执行定时任务、打开在线终端(安全特性)</li><li><code>--tls</code> 启用 SSL/TLS 加密(使用 nginx 反向代理 Agent 的 grpc 连接,并且 nginx 开启 SSL/TLS 时,需要启用该项配置)</li></ul>',6),c=[d];function i(l,r,s,g,_,h){return t(),a("div",null,c)}const m=e(n,[["render",i]]);export{u as __pageData,m as default};
|