提交项目
我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜
diff --git a/404.html b/404.html index 18d99053..c6ab27c9 100644 --- a/404.html +++ b/404.html @@ -9,11 +9,13 @@ + +
404
But if you don't change your direction, and if you keep looking, you may end up where you are heading.
贡献者:
项目地址:nezha_api_tgbot
镜像备份(非实时更新):nezha_api_tgbot
机器人可以通过API向面板请求服务器状态信息,得到信息后发送给用户
你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板
贡献者:
项目地址:nezha_api_tgbot
镜像备份(非实时更新):nezha_api_tgbot
机器人可以通过API向面板请求服务器状态信息,得到信息后发送给用户
你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板
当前版本:V1.0
贡献者:
使用iPhone或iPad扫描以下二维码,获取快捷指令
MacOS用户请访问这里,获取快捷指令
面板URL
、API Token
、服务器ID
WARNING
每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等
当前版本:V1.0
贡献者:
使用iPhone或iPad扫描以下二维码,获取快捷指令
MacOS用户请访问这里,获取快捷指令
面板URL
、API Token
、服务器ID
WARNING
每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等
贡献者:
项目地址:nezha_telegram_bot
镜像备份(非实时更新):nezha_telegram_bot
开源Telegram机器人项目,可以基于API实时查询哪吒面板的服务器信息。
命令 | 功能 | 仅私聊 |
---|---|---|
start | 开始使用键盘主菜单 | ✔️ |
help | 帮助列表 | ❌ |
add | 添加面板链接和token | ✔️ |
url | 添加面板链接 | ✔️ |
token | 添加面板token | ✔️ |
info | 获取保存的面板链接和token | ✔️ |
delete | 删除保存的面板链接和token | ✔️ |
id | 命令后面添加整数id,来进行单个服务器信息查询(私聊带刷新按钮,群聊不带) | ❌ |
all | 查询所有服务器的统计信息 | ❌ |
search | 在服务器名字中搜索关键字(支持多个,用空格分开) | ❌ |
贡献者:
项目地址:nezha_telegram_bot
镜像备份(非实时更新):nezha_telegram_bot
开源Telegram机器人项目,可以基于API实时查询哪吒面板的服务器信息。
命令 | 功能 | 仅私聊 |
---|---|---|
start | 开始使用键盘主菜单 | ✔️ |
help | 帮助列表 | ❌ |
add | 添加面板链接和token | ✔️ |
url | 添加面板链接 | ✔️ |
token | 添加面板token | ✔️ |
info | 获取保存的面板链接和token | ✔️ |
delete | 删除保存的面板链接和token | ✔️ |
id | 命令后面添加整数id,来进行单个服务器信息查询(私聊带刷新按钮,群聊不带) | ❌ |
all | 查询所有服务器的统计信息 | ❌ |
search | 在服务器名字中搜索关键字(支持多个,用空格分开) | ❌ |
还在因为自己的小鸡配置太差被朋友嘲笑吗?
还在想参加以针会友活动却因为小鸡不够排面而觉得羞耻吗?
还在因为在哪吒TG群里机器人排名太低而觉得自己低人一等吗?
今天开始!找回自信!
来自南京的名老中医 dysf888 独家秘方!让你找回男人本色,激情畅享!
安装 Fake Agent,可随意修改服务器监测数据的倍数上传到 Dashboard,让你的小鸡 脱!胎!换!骨! 让你在 MJJ 面前硬起来!
镜像备份(非实时更新):Fake Agent
哪吒监控创始人奶爸也在用:
男人用了都说好:
还在因为自己的小鸡配置太差被朋友嘲笑吗?
还在想参加以针会友活动却因为小鸡不够排面而觉得羞耻吗?
还在因为在哪吒TG群里机器人排名太低而觉得自己低人一等吗?
今天开始!找回自信!
来自南京的名老中医 dysf888 独家秘方!让你找回男人本色,激情畅享!
安装 Fake Agent,可随意修改服务器监测数据的倍数上传到 Dashboard,让你的小鸡 脱!胎!换!骨! 让你在 MJJ 面前硬起来!
镜像备份(非实时更新):Fake Agent
哪吒监控创始人奶爸也在用:
男人用了都说好:
贡献者:
项目地址:Argo-Nezha-Service-Container
镜像备份(非实时更新):Argo-Nezha-Service-Container
网络
选项将 gRPC
开关打开面板域名加上 https://
开头,回调地址再加上 /oauth2/callback
结尾
Argo 隧道认证方式有 json 和 token,使用两个方式其中之一。推荐前者,理由脚本会处理好所有的 Argo 隧道参数和路径,后者需要到 Cloudflare 官网手动设置,容易出错。
proto.NezhaService
镜像 fscarmen/argo-nezha:latest
, 支持 amd64 和 arm64 架构
用到的变量
变量名 | 是否必须 | 备注 |
---|---|---|
GH_USER | 是 | github 的用户名,用于面板管理授权 |
GH_CLIENTID | 是 | 在 github 上申请 |
GH_CLIENTSECRET | 是 | 在 github 上申请 |
GH_BACKUP_USER | 否 | 在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致 |
GH_REPO | 否 | 在 github 上备份哪吒服务端数据库文件的 github 库 |
GH_EMAIL | 否 | github 的邮箱,用于备份的 git 推送到远程库 |
GH_PAT | 否 | github 的 PAT |
ARGO_AUTH | 是 | Json: 从 https://fscarmen.cloudflare.now.cc 获取的 Argo Json Token: 从 Cloudflare 官网获取 |
ARGO_DOMAIN | 是 | Argo 域名 |
Koyeb
docker run -dit \\
+import{_ as a,o as e,c as s,R as t}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"使用 Argo 隧道的哪吒服务端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1715016176000}'),l={name:"case/case5.md"},n=t(`使用 Argo 隧道的哪吒服务端
贡献者:
项目地址:Argo-Nezha-Service-Container
镜像备份(非实时更新):Argo-Nezha-Service-Container
目录
- 项目特点
- 准备需要用的变量
- Argo 认证的获取方式: json 或 token
- PaaS 部署实例
- VPS 部署方式 1 --- docker
- VPS 部署方式 2 --- 宿主机
- 客户端接入
- SSH 接入
- 手动备份数据
- 自动还原备份
- 手动还原备份
- 完美搬家
- 主体目录文件及说明
- 鸣谢下列作者的文章和项目
- 免责声明
项目特点:
- 适用范围更广 --- 只要能连通网络,就能安装哪吒服务端,如 LXC, OpenVZ VPS,Nas 虚拟机 , Container PaaS 等
- Argo 隧道突破需要公网入口的限制 --- 传统的哪吒需要有两个公网端口,一个用于面板的访问,另一个用于客户端上报数据,本项目借用 Cloudflare Argo 隧道,使用内网穿透的办法
- IPv4 / v6 具备更高的灵活性 --- 传统哪吒需要处理服务端和客户端的 IPv4/v6 兼容性问题,还需要通过 warp 等工具来解决不对应的情况。然而,本项目可以完全不需要考虑这些问题,可以任意对接,更加方便和简便
- 一条 Argo 隧道分流多个域名和协议 --- 建立一条内网穿透的 Argo 隧道,即可分流三个域名(hostname)和协议(protocal),分别用于面板的访问(http),客户端上报数据(tcp)和 ssh(可选)
- GrpcWebProxy 反向代理的 gRPC 数据端口 --- 配上证书做 tls 终结,然后 Argo 的隧道配置用 https 服务指向这个反向代理,启用http2回源,grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent
- 每天自动备份 --- 北京时间每天 4 时 0 分自动备份整个哪吒面板文件夹到指定的 github 私库,包括面板主题,面板设置,探针数据和隧道信息,备份保留近 5 天数据;鉴于内容十分重要,必须要放在私库
- 每天自动更新面板 -- 北京时间每天 4 时 0 分自动检测最新的官方面板版本,有升级时自动更新
- 手/自一体还原备份 --- 每分钟检测一次在线还原文件的内容,遇到有更新立刻还原
- 默认内置本机探针 --- 能很方便的监控自身服务器信息
- 数据更安全 --- Argo 隧道使用TLS加密通信,可以将应用程序流量安全地传输到 Cloudflare 网络,提高了应用程序的安全性和可靠性。此外,Argo Tunnel也可以防止IP泄露和DDoS攻击等网络威胁

准备需要用的变量
- 到 Cloudflare 官网,选择使用的域名,打开
网络
选项将 gRPC
开关打开

- 获取 github 认证授权: https://github.com/settings/applications/new
面板域名加上 https://
开头,回调地址再加上 /oauth2/callback
结尾


- 获取 github 的 PAT (Personal Access Token): https://github.com/settings/tokens/new


- 创建 github 用于备份的私库: https://github.com/new

Argo 认证的获取方式: json 或 token
Argo 隧道认证方式有 json 和 token,使用两个方式其中之一。推荐前者,理由脚本会处理好所有的 Argo 隧道参数和路径,后者需要到 Cloudflare 官网手动设置,容易出错。
(方式 1 - Json):
通过 Cloudflare Json 生成网轻松获取 Argo 隧道 json 信息: https://fscarmen.cloudflare.now.cc

(方式 2 - Token): 通过 Cloudflare 官网,手动生成 Argo 隧道 token 信息
到 cf 官网:https://dash.cloudflare.com/
- 进入 zero trust 里生成 token 隧道和信息。
- 其中数据路径 443/https 为
proto.NezhaService
- ssh 路径 22/ssh 为 < client id >







PaaS 部署实例
镜像 fscarmen/argo-nezha:latest
, 支持 amd64 和 arm64 架构
用到的变量
变量名 是否必须 备注 GH_USER 是 github 的用户名,用于面板管理授权 GH_CLIENTID 是 在 github 上申请 GH_CLIENTSECRET 是 在 github 上申请 GH_BACKUP_USER 否 在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致 GH_REPO 否 在 github 上备份哪吒服务端数据库文件的 github 库 GH_EMAIL 否 github 的邮箱,用于备份的 git 推送到远程库 GH_PAT 否 github 的 PAT ARGO_AUTH 是 Json: 从 https://fscarmen.cloudflare.now.cc 获取的 Argo Json
Token: 从 Cloudflare 官网获取 ARGO_DOMAIN 是 Argo 域名
Koyeb





VPS 部署方式 1 --- docker
- 注意: ARGO_DOMAIN= 后面需要有单引号,不能去掉
- 如果 VPS 是 IPv6 only 的,请先安装 WARP IPv4 或者双栈: https://gitlab.com/fscarmen/warp
- 备份目录为当前路径的 dashboard 文件夹
docker 部署
docker run -dit \\
--name nezha_dashboard \\
--pull always \\
--restart always \\
diff --git a/assets/case_case5.md.d6f88c81.lean.js b/assets/case_case5.md.5da2adf9.lean.js
similarity index 85%
rename from assets/case_case5.md.d6f88c81.lean.js
rename to assets/case_case5.md.5da2adf9.lean.js
index bd0f2605..a9692d7d 100644
--- a/assets/case_case5.md.d6f88c81.lean.js
+++ b/assets/case_case5.md.5da2adf9.lean.js
@@ -1 +1 @@
-import{_ as a,o as e,c as s,R as t}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"使用 Argo 隧道的哪吒服务端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1714697355000}'),l={name:"case/case5.md"},n=t("",89),r=[n];function o(c,i,p,h,d,g){return e(),s("div",null,r)}const u=a(l,[["render",o]]);export{m as __pageData,u as default};
+import{_ as a,o as e,c as s,R as t}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"使用 Argo 隧道的哪吒服务端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1715016176000}'),l={name:"case/case5.md"},n=t("",89),r=[n];function o(c,i,p,h,d,g){return e(),s("div",null,r)}const u=a(l,[["render",o]]);export{m as __pageData,u as default};
diff --git a/assets/case_index.md.d968b048.js b/assets/case_index.md.351a05cb.js
similarity index 88%
rename from assets/case_index.md.d968b048.js
rename to assets/case_index.md.351a05cb.js
index 5f24c2e0..fc09d4b2 100644
--- a/assets/case_index.md.d968b048.js
+++ b/assets/case_index.md.351a05cb.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"社区项目","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"社区项目","hero":{"name":"哪吒监控社区项目","text":"社区贡献的相关项目","tagline":"为哪吒监控提供了更多扩展","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"提交项目","details":"我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜"},{"title":"注意事项","details":"所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1714697355000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return t(),a("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"社区项目","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"社区项目","hero":{"name":"哪吒监控社区项目","text":"社区贡献的相关项目","tagline":"为哪吒监控提供了更多扩展","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"提交项目","details":"我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜"},{"title":"注意事项","details":"所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1715016176000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return t(),a("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default};
diff --git a/assets/case_index.md.d968b048.lean.js b/assets/case_index.md.351a05cb.lean.js
similarity index 88%
rename from assets/case_index.md.d968b048.lean.js
rename to assets/case_index.md.351a05cb.lean.js
index 5f24c2e0..fc09d4b2 100644
--- a/assets/case_index.md.d968b048.lean.js
+++ b/assets/case_index.md.351a05cb.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"社区项目","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"社区项目","hero":{"name":"哪吒监控社区项目","text":"社区贡献的相关项目","tagline":"为哪吒监控提供了更多扩展","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"提交项目","details":"我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜"},{"title":"注意事项","details":"所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1714697355000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return t(),a("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"社区项目","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"社区项目","hero":{"name":"哪吒监控社区项目","text":"社区贡献的相关项目","tagline":"为哪吒监控提供了更多扩展","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"提交项目","details":"我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜"},{"title":"注意事项","details":"所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1715016176000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return t(),a("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default};
diff --git a/assets/developer_index.md.d7fbae7e.js b/assets/developer_index.md.31d91cea.js
similarity index 92%
rename from assets/developer_index.md.d7fbae7e.js
rename to assets/developer_index.md.31d91cea.js
index 681f5173..9baf479f 100644
--- a/assets/developer_index.md.d7fbae7e.js
+++ b/assets/developer_index.md.31d91cea.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"哪吒监控","titleTemplate":"开发手册","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"开发手册","hero":{"name":"开发手册","text":"哪吒监控开发手册","tagline":"我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/theme"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1714697355000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return t(),a("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"哪吒监控","titleTemplate":"开发手册","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"开发手册","hero":{"name":"开发手册","text":"哪吒监控开发手册","tagline":"我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/theme"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1715016176000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return t(),a("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default};
diff --git a/assets/developer_index.md.d7fbae7e.lean.js b/assets/developer_index.md.31d91cea.lean.js
similarity index 92%
rename from assets/developer_index.md.d7fbae7e.lean.js
rename to assets/developer_index.md.31d91cea.lean.js
index 681f5173..9baf479f 100644
--- a/assets/developer_index.md.d7fbae7e.lean.js
+++ b/assets/developer_index.md.31d91cea.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"哪吒监控","titleTemplate":"开发手册","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"开发手册","hero":{"name":"开发手册","text":"哪吒监控开发手册","tagline":"我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/theme"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1714697355000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return t(),a("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"哪吒监控","titleTemplate":"开发手册","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"开发手册","hero":{"name":"开发手册","text":"哪吒监控开发手册","tagline":"我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/theme"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1715016176000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return t(),a("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default};
diff --git a/assets/developer_l10n.md.86d7c4b3.js b/assets/developer_l10n.md.904de4f2.js
similarity index 95%
rename from assets/developer_l10n.md.86d7c4b3.js
rename to assets/developer_l10n.md.904de4f2.js
index 5fd9b2a8..08f32970 100644
--- a/assets/developer_l10n.md.86d7c4b3.js
+++ b/assets/developer_l10n.md.904de4f2.js
@@ -1 +1 @@
-import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1714697355000}'),l={name:"developer/l10n.md"},r=t('哪吒监控的 Dashboard 已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化
介绍
- 你可以直接使用
/resource/l10n/zh-CN.toml
中已有的文本配置来替换新功能中的文本 - 如果新功能中有新增文本,请参考
zh-CN.toml
的配置文本,将新文本拉取到 zh-CN.toml
等其他语言的配置文件中,并添加翻译
新本地化文本的添加
- 在
/resource/l10n/
中添加新的语言文本配置 - 在新的语言文本配置中拉取其他语言已有的文本配置
- 为新的语言文本配置添加翻译
',5),c=[r];function d(n,i,s,_,h,p){return o(),a("div",null,c)}const f=e(l,[["render",d]]);export{u as __pageData,f as default};
+import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1715016176000}'),l={name:"developer/l10n.md"},r=t('哪吒监控的 Dashboard 已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化
介绍
- 你可以直接使用
/resource/l10n/zh-CN.toml
中已有的文本配置来替换新功能中的文本 - 如果新功能中有新增文本,请参考
zh-CN.toml
的配置文本,将新文本拉取到 zh-CN.toml
等其他语言的配置文件中,并添加翻译
新本地化文本的添加
- 在
/resource/l10n/
中添加新的语言文本配置 - 在新的语言文本配置中拉取其他语言已有的文本配置
- 为新的语言文本配置添加翻译
',5),c=[r];function d(n,i,s,_,h,p){return o(),a("div",null,c)}const f=e(l,[["render",d]]);export{u as __pageData,f as default};
diff --git a/assets/developer_l10n.md.86d7c4b3.lean.js b/assets/developer_l10n.md.904de4f2.lean.js
similarity index 84%
rename from assets/developer_l10n.md.86d7c4b3.lean.js
rename to assets/developer_l10n.md.904de4f2.lean.js
index 02d30336..2f53d338 100644
--- a/assets/developer_l10n.md.86d7c4b3.lean.js
+++ b/assets/developer_l10n.md.904de4f2.lean.js
@@ -1 +1 @@
-import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1714697355000}'),l={name:"developer/l10n.md"},r=t("",5),c=[r];function d(n,i,s,_,h,p){return o(),a("div",null,c)}const f=e(l,[["render",d]]);export{u as __pageData,f as default};
+import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1715016176000}'),l={name:"developer/l10n.md"},r=t("",5),c=[r];function d(n,i,s,_,h,p){return o(),a("div",null,c)}const f=e(l,[["render",d]]);export{u as __pageData,f as default};
diff --git a/assets/developer_theme.md.10ad696b.js b/assets/developer_theme.md.861d7d94.js
similarity index 96%
rename from assets/developer_theme.md.10ad696b.js
rename to assets/developer_theme.md.861d7d94.js
index a9314b8d..324dcd3d 100644
--- a/assets/developer_theme.md.10ad696b.js
+++ b/assets/developer_theme.md.861d7d94.js
@@ -1 +1 @@
-import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1714697355000}'),c={name:"developer/theme.md"},l=t('哪吒主题开发环境
哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题
WARNING
请注意: 此开发环境仅支持 dashboard v0.13.16
及更新版本。
使用说明
- 克隆此仓库到本地
- 修改
data/config.yaml
中的 Oauth2 配置(回调连接可以填 http://localhost
) - 运行
docker-compose up
- 开始开发
- 主题制作完成之后可以将
theme-custom
放置到服务器上的 /opt/nezha/dashboard/theme-custom
位置
FAQ
- 如果不能使用
80
端口,在 docker-compose.yaml
中修改配置。
',7),d=[l];function r(s,i,h,n,m,_){return o(),a("div",null,d)}const f=e(c,[["render",r]]);export{u as __pageData,f as default};
+import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1715016176000}'),c={name:"developer/theme.md"},l=t('哪吒主题开发环境
哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题
WARNING
请注意: 此开发环境仅支持 dashboard v0.13.16
及更新版本。
使用说明
- 克隆此仓库到本地
- 修改
data/config.yaml
中的 Oauth2 配置(回调连接可以填 http://localhost
) - 运行
docker-compose up
- 开始开发
- 主题制作完成之后可以将
theme-custom
放置到服务器上的 /opt/nezha/dashboard/theme-custom
位置
FAQ
- 如果不能使用
80
端口,在 docker-compose.yaml
中修改配置。
',7),d=[l];function r(s,i,h,n,m,_){return o(),a("div",null,d)}const f=e(c,[["render",r]]);export{u as __pageData,f as default};
diff --git a/assets/developer_theme.md.10ad696b.lean.js b/assets/developer_theme.md.861d7d94.lean.js
similarity index 84%
rename from assets/developer_theme.md.10ad696b.lean.js
rename to assets/developer_theme.md.861d7d94.lean.js
index c5b140ee..b046c247 100644
--- a/assets/developer_theme.md.10ad696b.lean.js
+++ b/assets/developer_theme.md.861d7d94.lean.js
@@ -1 +1 @@
-import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1714697355000}'),c={name:"developer/theme.md"},l=t("",7),d=[l];function r(s,i,h,n,m,_){return o(),a("div",null,d)}const f=e(c,[["render",r]]);export{u as __pageData,f as default};
+import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1715016176000}'),c={name:"developer/theme.md"},l=t("",7),d=[l];function r(s,i,h,n,m,_){return o(),a("div",null,d)}const f=e(c,[["render",r]]);export{u as __pageData,f as default};
diff --git a/assets/en_US_case_case1.md.d1271cf4.js b/assets/en_US_case_case1.md.9f04d3a4.js
similarity index 95%
rename from assets/en_US_case_case1.md.d1271cf4.js
rename to assets/en_US_case_case1.md.9f04d3a4.js
index 0d119723..39ed3f6a 100644
--- a/assets/en_US_case_case1.md.d1271cf4.js
+++ b/assets/en_US_case_case1.md.9f04d3a4.js
@@ -1 +1 @@
-import{_ as e,o as t,c as r,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"Build your own Telegram bot to query server information","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case1.md","filePath":"en_US/case/case1.md","lastUpdated":1714697355000}'),a={name:"en_US/case/case1.md"},n=o('Build your own Telegram bot to query server information
Contributors:
Project: nezha_api_tgbot (Chinese)
Mirror backup, non-real-time update: nezha_api_tgbot (Chinese)
The bot can request server status information from the Dashboard through the API, and then send the information to the user.
You can build this bot to easily view the current status of a given server without opening the Dashboard.
',6),i=[n];function s(h,_,l,u,c,p){return t(),r("div",null,i)}const m=e(a,[["render",s]]);export{d as __pageData,m as default};
+import{_ as e,o as t,c as r,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"Build your own Telegram bot to query server information","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case1.md","filePath":"en_US/case/case1.md","lastUpdated":1715016176000}'),a={name:"en_US/case/case1.md"},n=o('Build your own Telegram bot to query server information
Contributors:
Project: nezha_api_tgbot (Chinese)
Mirror backup, non-real-time update: nezha_api_tgbot (Chinese)
The bot can request server status information from the Dashboard through the API, and then send the information to the user.
You can build this bot to easily view the current status of a given server without opening the Dashboard.
',6),i=[n];function s(h,_,l,u,c,p){return t(),r("div",null,i)}const m=e(a,[["render",s]]);export{d as __pageData,m as default};
diff --git a/assets/en_US_case_case1.md.d1271cf4.lean.js b/assets/en_US_case_case1.md.9f04d3a4.lean.js
similarity index 86%
rename from assets/en_US_case_case1.md.d1271cf4.lean.js
rename to assets/en_US_case_case1.md.9f04d3a4.lean.js
index f4e0a606..3eaec1c0 100644
--- a/assets/en_US_case_case1.md.d1271cf4.lean.js
+++ b/assets/en_US_case_case1.md.9f04d3a4.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as r,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"Build your own Telegram bot to query server information","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case1.md","filePath":"en_US/case/case1.md","lastUpdated":1714697355000}'),a={name:"en_US/case/case1.md"},n=o("",6),i=[n];function s(h,_,l,u,c,p){return t(),r("div",null,i)}const m=e(a,[["render",s]]);export{d as __pageData,m as default};
+import{_ as e,o as t,c as r,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"Build your own Telegram bot to query server information","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case1.md","filePath":"en_US/case/case1.md","lastUpdated":1715016176000}'),a={name:"en_US/case/case1.md"},n=o("",6),i=[n];function s(h,_,l,u,c,p){return t(),r("div",null,i)}const m=e(a,[["render",s]]);export{d as __pageData,m as default};
diff --git a/assets/en_US_case_case2.md.560173e5.js b/assets/en_US_case_case2.md.cd1f8ef9.js
similarity index 97%
rename from assets/en_US_case_case2.md.560173e5.js
rename to assets/en_US_case_case2.md.cd1f8ef9.js
index 366352ec..2d90099b 100644
--- a/assets/en_US_case_case2.md.560173e5.js
+++ b/assets/en_US_case_case2.md.cd1f8ef9.js
@@ -1 +1 @@
-import{_ as e}from"./chunks/qrcode.59c44dde.js";import{_ as t,o as r,c as o,R as s}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Use Siri to run shortcut to check server status in iOS/MacOS","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case2.md","filePath":"en_US/case/case2.md","lastUpdated":1714697355000}'),a={name:"en_US/case/case2.md"},c=s('Use Siri to run shortcut to check server status in iOS/MacOS
Current Version:V1.0 (Chinese)
Contributor:
- 白歌 hhhkkk520
Get shortcut command
Scan the following QR code with your iPhone or iPad to get the shortcut

MacOS users please visit here to get the shortcut
How to use
- After getting the shortcut, open and edit the shortcut
- Fill in
Dashboard URL
, API Token
, Server ID
in the three text boxes - Save the edit and test run, if you can get the result, the setting is correct.
- Modify the name of the shortcut, such as: Server Status, then you can use Siri command: "Hey Siri, Server Status" to get the server status.
WARNING
Each shortcut can only monitor one server, if you need to monitor more than one server, please copy this shortcut several times and configure them separately, then modify the shortcut name separately, such as; Server 1 Status, Server 2 Status, etc.
',8),i=[c];function h(n,u,l,d,m,_){return r(),o("div",null,i)}const b=t(a,[["render",h]]);export{f as __pageData,b as default};
+import{_ as e}from"./chunks/qrcode.59c44dde.js";import{_ as t,o as r,c as o,R as s}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Use Siri to run shortcut to check server status in iOS/MacOS","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case2.md","filePath":"en_US/case/case2.md","lastUpdated":1715016176000}'),a={name:"en_US/case/case2.md"},c=s('Use Siri to run shortcut to check server status in iOS/MacOS
Current Version:V1.0 (Chinese)
Contributor:
- 白歌 hhhkkk520
Get shortcut command
Scan the following QR code with your iPhone or iPad to get the shortcut

MacOS users please visit here to get the shortcut
How to use
- After getting the shortcut, open and edit the shortcut
- Fill in
Dashboard URL
, API Token
, Server ID
in the three text boxes - Save the edit and test run, if you can get the result, the setting is correct.
- Modify the name of the shortcut, such as: Server Status, then you can use Siri command: "Hey Siri, Server Status" to get the server status.
WARNING
Each shortcut can only monitor one server, if you need to monitor more than one server, please copy this shortcut several times and configure them separately, then modify the shortcut name separately, such as; Server 1 Status, Server 2 Status, etc.
',8),i=[c];function h(n,u,l,d,m,_){return r(),o("div",null,i)}const b=t(a,[["render",h]]);export{f as __pageData,b as default};
diff --git a/assets/en_US_case_case2.md.560173e5.lean.js b/assets/en_US_case_case2.md.cd1f8ef9.lean.js
similarity index 87%
rename from assets/en_US_case_case2.md.560173e5.lean.js
rename to assets/en_US_case_case2.md.cd1f8ef9.lean.js
index 7c816b44..78349a46 100644
--- a/assets/en_US_case_case2.md.560173e5.lean.js
+++ b/assets/en_US_case_case2.md.cd1f8ef9.lean.js
@@ -1 +1 @@
-import{_ as e}from"./chunks/qrcode.59c44dde.js";import{_ as t,o as r,c as o,R as s}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Use Siri to run shortcut to check server status in iOS/MacOS","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case2.md","filePath":"en_US/case/case2.md","lastUpdated":1714697355000}'),a={name:"en_US/case/case2.md"},c=s("",8),i=[c];function h(n,u,l,d,m,_){return r(),o("div",null,i)}const b=t(a,[["render",h]]);export{f as __pageData,b as default};
+import{_ as e}from"./chunks/qrcode.59c44dde.js";import{_ as t,o as r,c as o,R as s}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Use Siri to run shortcut to check server status in iOS/MacOS","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case2.md","filePath":"en_US/case/case2.md","lastUpdated":1715016176000}'),a={name:"en_US/case/case2.md"},c=s("",8),i=[c];function h(n,u,l,d,m,_){return r(),o("div",null,i)}const b=t(a,[["render",h]]);export{f as __pageData,b as default};
diff --git a/assets/en_US_case_case3.md.2bb377fa.js b/assets/en_US_case_case3.md.b4b057ff.js
similarity index 98%
rename from assets/en_US_case_case3.md.2bb377fa.js
rename to assets/en_US_case_case3.md.b4b057ff.js
index 8a37cc16..e8c500db 100644
--- a/assets/en_US_case_case3.md.2bb377fa.js
+++ b/assets/en_US_case_case3.md.b4b057ff.js
@@ -1 +1 @@
-import{_ as t,o as e,c as r,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Build your own server status query Telegram bot with multi-language and multi-user support","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1714697355000}'),d={name:"en_US/case/case3.md"},i=a('Build your own server status query Telegram bot with multi-language and multi-user support
Contributor:
GitHub project: nezha_telegram_bot(English is already supported)
Mirror backup, non-real-time update : nezha_telegram_bot(English is already supported)
Features
- [x] Support Chinese/English multi-language switch
- [x] Support tag statistics (CPU, disk, memory, upstream and downstream speed, traffic statistics, etc.)
- [x] Support real-time refresh of single server data
- [x] Support keyboard interactive query
- [x] Support query by command
- [x] Support adding bot to group, privacy protection of bot replies in group chat
- [x] Support bot messages automatic deletion in group chat within 20 seconds
- [x] Support docker deployment
Commands list
Command Description Private chat only start Getting started with the keyboard main menu ✔️ help help message ❌ add Add Nezha monitoring url link and token ✔️ url Add Nezha monitoring url link ✔️ token Add Nezha monitoring token ✔️ info Get saved Nezha monitoring url link and token ✔️ delete Delete saved Nezha monitoring url link and token ✔️ id Add an integer id after the command to query the information of a single server (refresh button only available in private chat) ❌ all Query statistics for all servers ❌ search Search for keywords in server names (multiple keywords supported, split by spaces) ❌
',9),o=[i];function s(l,n,u,h,p,m){return e(),r("div",null,o)}const _=t(d,[["render",s]]);export{g as __pageData,_ as default};
+import{_ as t,o as e,c as r,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Build your own server status query Telegram bot with multi-language and multi-user support","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1715016176000}'),d={name:"en_US/case/case3.md"},i=a('Build your own server status query Telegram bot with multi-language and multi-user support
Contributor:
GitHub project: nezha_telegram_bot(English is already supported)
Mirror backup, non-real-time update : nezha_telegram_bot(English is already supported)
Features
- [x] Support Chinese/English multi-language switch
- [x] Support tag statistics (CPU, disk, memory, upstream and downstream speed, traffic statistics, etc.)
- [x] Support real-time refresh of single server data
- [x] Support keyboard interactive query
- [x] Support query by command
- [x] Support adding bot to group, privacy protection of bot replies in group chat
- [x] Support bot messages automatic deletion in group chat within 20 seconds
- [x] Support docker deployment
Commands list
Command Description Private chat only start Getting started with the keyboard main menu ✔️ help help message ❌ add Add Nezha monitoring url link and token ✔️ url Add Nezha monitoring url link ✔️ token Add Nezha monitoring token ✔️ info Get saved Nezha monitoring url link and token ✔️ delete Delete saved Nezha monitoring url link and token ✔️ id Add an integer id after the command to query the information of a single server (refresh button only available in private chat) ❌ all Query statistics for all servers ❌ search Search for keywords in server names (multiple keywords supported, split by spaces) ❌
',9),o=[i];function s(l,n,u,h,p,m){return e(),r("div",null,o)}const _=t(d,[["render",s]]);export{g as __pageData,_ as default};
diff --git a/assets/en_US_case_case3.md.2bb377fa.lean.js b/assets/en_US_case_case3.md.b4b057ff.lean.js
similarity index 87%
rename from assets/en_US_case_case3.md.2bb377fa.lean.js
rename to assets/en_US_case_case3.md.b4b057ff.lean.js
index e50a7674..1503629a 100644
--- a/assets/en_US_case_case3.md.2bb377fa.lean.js
+++ b/assets/en_US_case_case3.md.b4b057ff.lean.js
@@ -1 +1 @@
-import{_ as t,o as e,c as r,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Build your own server status query Telegram bot with multi-language and multi-user support","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1714697355000}'),d={name:"en_US/case/case3.md"},i=a("",9),o=[i];function s(l,n,u,h,p,m){return e(),r("div",null,o)}const _=t(d,[["render",s]]);export{g as __pageData,_ as default};
+import{_ as t,o as e,c as r,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Build your own server status query Telegram bot with multi-language and multi-user support","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1715016176000}'),d={name:"en_US/case/case3.md"},i=a("",9),o=[i];function s(l,n,u,h,p,m){return e(),r("div",null,o)}const _=t(d,[["render",s]]);export{g as __pageData,_ as default};
diff --git a/assets/en_US_case_case4.md.2dc2c5b3.js b/assets/en_US_case_case4.md.f3673051.js
similarity index 94%
rename from assets/en_US_case_case4.md.2dc2c5b3.js
rename to assets/en_US_case_case4.md.f3673051.js
index 6a25e42c..b9a5e5a7 100644
--- a/assets/en_US_case_case4.md.2dc2c5b3.js
+++ b/assets/en_US_case_case4.md.f3673051.js
@@ -1 +1 @@
-import{_ as e,o as a,c as t,R as r}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1714697355000}'),n={name:"en_US/case/case4.md"},o=r('Fake-agent, monitoring data cheater
Contributor:
GitHub project: fake-nezha-agent(Chinese)
Mirror backup, non-real-time update :fake-nezha-agent(Chinese)
You can modify the monitoring data uploaded to Dashboard by the Agent
Use it for cheating 😈
',5),i=[o];function s(c,h,_,d,f,l){return a(),t("div",null,i)}const m=e(n,[["render",s]]);export{g as __pageData,m as default};
+import{_ as e,o as a,c as t,R as r}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1715016176000}'),n={name:"en_US/case/case4.md"},o=r('Fake-agent, monitoring data cheater
Contributor:
GitHub project: fake-nezha-agent(Chinese)
Mirror backup, non-real-time update :fake-nezha-agent(Chinese)
You can modify the monitoring data uploaded to Dashboard by the Agent
Use it for cheating 😈
',5),i=[o];function s(c,h,_,d,f,l){return a(),t("div",null,i)}const m=e(n,[["render",s]]);export{g as __pageData,m as default};
diff --git a/assets/en_US_case_case4.md.2dc2c5b3.lean.js b/assets/en_US_case_case4.md.f3673051.lean.js
similarity index 85%
rename from assets/en_US_case_case4.md.2dc2c5b3.lean.js
rename to assets/en_US_case_case4.md.f3673051.lean.js
index 9457b208..1a7e31d4 100644
--- a/assets/en_US_case_case4.md.2dc2c5b3.lean.js
+++ b/assets/en_US_case_case4.md.f3673051.lean.js
@@ -1 +1 @@
-import{_ as e,o as a,c as t,R as r}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1714697355000}'),n={name:"en_US/case/case4.md"},o=r("",5),i=[o];function s(c,h,_,d,f,l){return a(),t("div",null,i)}const m=e(n,[["render",s]]);export{g as __pageData,m as default};
+import{_ as e,o as a,c as t,R as r}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1715016176000}'),n={name:"en_US/case/case4.md"},o=r("",5),i=[o];function s(c,h,_,d,f,l){return a(),t("div",null,i)}const m=e(n,[["render",s]]);export{g as __pageData,m as default};
diff --git a/assets/en_US_case_case5.md.3a57cd76.js b/assets/en_US_case_case5.md.d734fc17.js
similarity index 99%
rename from assets/en_US_case_case5.md.3a57cd76.js
rename to assets/en_US_case_case5.md.d734fc17.js
index f4aecf0f..f1000402 100644
--- a/assets/en_US_case_case5.md.3a57cd76.js
+++ b/assets/en_US_case_case5.md.d734fc17.js
@@ -1,4 +1,4 @@
-import{_ as e,o as a,c as t,R as s}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Nezha server over Argo tunnel","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case5.md","filePath":"en_US/case/case5.md","lastUpdated":1714697355000}'),n={name:"en_US/case/case5.md"},o=s(`Nezha server over Argo tunnel
Contributors:
GitHub project: Argo-Nezha-Service-Container
Mirror backup (not live update): Argo-Nezha-Service-Container
Catalog
- Project Features
- How to get Argo authentication: json or token
- Variables to be used
- PaaS Deployment Example
- VPS Deployment Method 1 --- docker
- VPS Deployment Method 2 --- hosts
- Client Access
- SSH Access
- Manual Backup data
- Auto Restore Backup
- Manual Restore Backup
- Migrating data
- Main Directory Files and Descriptions
- Acknowledgment of articles and projects by the following authors
- Disclaimer
Project Features.
- Wider scope of application --- As long as there is a network connection, Nezha server can be installed, such as LXC, OpenVZ VPS, Nas Virtual Machine, Container PaaS, etc.
- Argo tunnel breaks through the restriction of requiring a public network portal --- The traditional Nezha requires two public network ports, one for panel visiting and the other for client reporting, this project uses Cloudflare Argo tunnels and uses intranet tunneling.
- IPv4 / v6 with higher flexibility --- The traditional Nezha needs to deal with IPv4/v6 compatibility between server and client, and also needs to resolve mismatches through tools such as warp. However, this project does not need to consider these issues at all, and can be docked arbitrarily, which is much more convenient and easy!
- One Argo tunnel for multiple domains and protocols --- Create an intranet-penetrating Argo tunnel for three domains (hostname) and protocols, which can be used for panel access (http), client reporting (tcp) and ssh (optional).
- GrpcWebProxy reverse proxy gRPC data port --- with a certificate for tls termination, then Argo's tunnel configuration with https service pointing to this reverse proxy, enable http2 back to the source, grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent
- Daily automatic backup --- every day at 04:00 BST, the entire Nezha panel folder is automatically backed up to a designated private github repository, including panel themes, panel settings, probe data and tunnel information, the backup retains nearly 5 days of data; the content is so important that it must be placed in the private repository.
- Automatic daily panel update -- the latest official panel version is automatically detected every day at 4:00 BST, and updated when there is an upgrade.
- Manual/automatic restore backup --- check the content of online restore file once a minute, and restore immediately when there is any update.
- Default built-in local probes --- can easily monitor their own server information
- More secure data --- Argo Tunnel uses TLS encrypted communication to securely transmit application traffic to the Cloudflare network, improving application security and reliability. In addition, Argo Tunnel protects against network threats such as IP leaks and DDoS attacks.

Prepare variables to be used
- Visit the Cloudflare website, select the domain name you want to use, and turn on the
network
option to turn the gRPC
switch on.

- Get github authentication license: https://github.com/settings/applications/new
Add https://
to the beginning of the panel's domain name and /oauth2/callback
to the end of the callback address.


- Get a PAT (Personal Access Token) for github: https://github.com/settings/tokens/new


- Create a private github repository for backups: https://github.com/new

How to get Argo authentication: json or token
Argo tunnel authentication methods include json and token, use one of the two methods. The former is recommended because the script will handle all the Argo tunnel parameters and paths, while the latter needs to be set manually on the Cloudflare website and is prone to errors.
(Methods 1 - Json):
Easily get Argo tunnel json information through Cloudflare Json Generation Network: https://fscarmen.cloudflare.now.cc

(Methods 2 - Token): Manually generate Argo tunnel token information via Cloudflare website.
Go to the cf website: https://dash.cloudflare.com/
- Go to zero trust and generate token tunnel and message.
- The data path 443/https is proto.
- ssh path 22/ssh for < client id >.







PaaS Deployment Example
Image fscarmen/argo-nezha:latest
, supports amd64 and arm64 architectures.
Variables used
Variable Name Required Remarks GH_USER Yes github username for panel admin authorization GH_CLIENTID yes apply on github GH_CLIENTSECRET yes apply on github GH_BACKUP_USER No The github username for backing up Nezha's server-side database on github, if not filled in, it is the same as the account GH_USER for panel management authorization GH_REPO No The github repository for backing up Nezha's server-side database files on github GH_EMAIL No github's mailbox for git push backups to remote repositories GH_PAT No github's PAT ARGO_AUTH Yes Argo Json from https://fscarmen.cloudflare.now.cc
Argo token from Cloudflare official website ARGO_DOMAIN Yes Argo domain
Koyeb





VPS Deployment Method 1 --- docker
- Note: ARGO_DOMAIN= must be followed by single quotes, which cannot be removed.
- If the VPS is IPv6 only, please install WARP IPv4 or dual-stack first: https://github.com/fscarmen/warp
- The backup directory is the dashboard folder in the current path.
docker deployment
docker run -dit \\
+import{_ as e,o as a,c as t,R as s}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Nezha server over Argo tunnel","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case5.md","filePath":"en_US/case/case5.md","lastUpdated":1715016176000}'),n={name:"en_US/case/case5.md"},o=s(`Nezha server over Argo tunnel
Contributors:
GitHub project: Argo-Nezha-Service-Container
Mirror backup (not live update): Argo-Nezha-Service-Container
Catalog
- Project Features
- How to get Argo authentication: json or token
- Variables to be used
- PaaS Deployment Example
- VPS Deployment Method 1 --- docker
- VPS Deployment Method 2 --- hosts
- Client Access
- SSH Access
- Manual Backup data
- Auto Restore Backup
- Manual Restore Backup
- Migrating data
- Main Directory Files and Descriptions
- Acknowledgment of articles and projects by the following authors
- Disclaimer
Project Features.
- Wider scope of application --- As long as there is a network connection, Nezha server can be installed, such as LXC, OpenVZ VPS, Nas Virtual Machine, Container PaaS, etc.
- Argo tunnel breaks through the restriction of requiring a public network portal --- The traditional Nezha requires two public network ports, one for panel visiting and the other for client reporting, this project uses Cloudflare Argo tunnels and uses intranet tunneling.
- IPv4 / v6 with higher flexibility --- The traditional Nezha needs to deal with IPv4/v6 compatibility between server and client, and also needs to resolve mismatches through tools such as warp. However, this project does not need to consider these issues at all, and can be docked arbitrarily, which is much more convenient and easy!
- One Argo tunnel for multiple domains and protocols --- Create an intranet-penetrating Argo tunnel for three domains (hostname) and protocols, which can be used for panel access (http), client reporting (tcp) and ssh (optional).
- GrpcWebProxy reverse proxy gRPC data port --- with a certificate for tls termination, then Argo's tunnel configuration with https service pointing to this reverse proxy, enable http2 back to the source, grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent
- Daily automatic backup --- every day at 04:00 BST, the entire Nezha panel folder is automatically backed up to a designated private github repository, including panel themes, panel settings, probe data and tunnel information, the backup retains nearly 5 days of data; the content is so important that it must be placed in the private repository.
- Automatic daily panel update -- the latest official panel version is automatically detected every day at 4:00 BST, and updated when there is an upgrade.
- Manual/automatic restore backup --- check the content of online restore file once a minute, and restore immediately when there is any update.
- Default built-in local probes --- can easily monitor their own server information
- More secure data --- Argo Tunnel uses TLS encrypted communication to securely transmit application traffic to the Cloudflare network, improving application security and reliability. In addition, Argo Tunnel protects against network threats such as IP leaks and DDoS attacks.

Prepare variables to be used
- Visit the Cloudflare website, select the domain name you want to use, and turn on the
network
option to turn the gRPC
switch on.

- Get github authentication license: https://github.com/settings/applications/new
Add https://
to the beginning of the panel's domain name and /oauth2/callback
to the end of the callback address.


- Get a PAT (Personal Access Token) for github: https://github.com/settings/tokens/new


- Create a private github repository for backups: https://github.com/new

How to get Argo authentication: json or token
Argo tunnel authentication methods include json and token, use one of the two methods. The former is recommended because the script will handle all the Argo tunnel parameters and paths, while the latter needs to be set manually on the Cloudflare website and is prone to errors.
(Methods 1 - Json):
Easily get Argo tunnel json information through Cloudflare Json Generation Network: https://fscarmen.cloudflare.now.cc

(Methods 2 - Token): Manually generate Argo tunnel token information via Cloudflare website.
Go to the cf website: https://dash.cloudflare.com/
- Go to zero trust and generate token tunnel and message.
- The data path 443/https is proto.
- ssh path 22/ssh for < client id >.







PaaS Deployment Example
Image fscarmen/argo-nezha:latest
, supports amd64 and arm64 architectures.
Variables used
Variable Name Required Remarks GH_USER Yes github username for panel admin authorization GH_CLIENTID yes apply on github GH_CLIENTSECRET yes apply on github GH_BACKUP_USER No The github username for backing up Nezha's server-side database on github, if not filled in, it is the same as the account GH_USER for panel management authorization GH_REPO No The github repository for backing up Nezha's server-side database files on github GH_EMAIL No github's mailbox for git push backups to remote repositories GH_PAT No github's PAT ARGO_AUTH Yes Argo Json from https://fscarmen.cloudflare.now.cc
Argo token from Cloudflare official website ARGO_DOMAIN Yes Argo domain
Koyeb





VPS Deployment Method 1 --- docker
- Note: ARGO_DOMAIN= must be followed by single quotes, which cannot be removed.
- If the VPS is IPv6 only, please install WARP IPv4 or dual-stack first: https://github.com/fscarmen/warp
- The backup directory is the dashboard folder in the current path.
docker deployment
docker run -dit \\
--name nezha_dashboard \\
--pull always \\
--restart always \\
diff --git a/assets/en_US_case_case5.md.3a57cd76.lean.js b/assets/en_US_case_case5.md.d734fc17.lean.js
similarity index 85%
rename from assets/en_US_case_case5.md.3a57cd76.lean.js
rename to assets/en_US_case_case5.md.d734fc17.lean.js
index e2f6e0f3..d4d45bad 100644
--- a/assets/en_US_case_case5.md.3a57cd76.lean.js
+++ b/assets/en_US_case_case5.md.d734fc17.lean.js
@@ -1 +1 @@
-import{_ as e,o as a,c as t,R as s}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Nezha server over Argo tunnel","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case5.md","filePath":"en_US/case/case5.md","lastUpdated":1714697355000}'),n={name:"en_US/case/case5.md"},o=s("",89),r=[o];function l(i,c,h,p,d,u){return a(),t("div",null,r)}const f=e(n,[["render",l]]);export{g as __pageData,f as default};
+import{_ as e,o as a,c as t,R as s}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Nezha server over Argo tunnel","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case5.md","filePath":"en_US/case/case5.md","lastUpdated":1715016176000}'),n={name:"en_US/case/case5.md"},o=s("",89),r=[o];function l(i,c,h,p,d,u){return a(),t("div",null,r)}const f=e(n,[["render",l]]);export{g as __pageData,f as default};
diff --git a/assets/en_US_case_index.md.2c98943e.js b/assets/en_US_case_index.md.ed77047b.js
similarity index 95%
rename from assets/en_US_case_index.md.2c98943e.js
rename to assets/en_US_case_index.md.ed77047b.js
index 600df0c1..3da22aa9 100644
--- a/assets/en_US_case_index.md.2c98943e.js
+++ b/assets/en_US_case_index.md.ed77047b.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Community Project","hero":{"name":"Nezha Monitoring","text":"Community Project","tagline":"Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Learn More →","link":"/en_US/case/case1"}]},"features":[{"title":"Submit a project","details":"We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information."},{"title":"Important Notes","details":"All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc."}]},"headers":[],"relativePath":"en_US/case/index.md","filePath":"en_US/case/index.md","lastUpdated":1714697355000}'),o={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return t(),a("div")}const h=e(o,[["render",i]]);export{u as __pageData,h as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Community Project","hero":{"name":"Nezha Monitoring","text":"Community Project","tagline":"Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Learn More →","link":"/en_US/case/case1"}]},"features":[{"title":"Submit a project","details":"We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information."},{"title":"Important Notes","details":"All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc."}]},"headers":[],"relativePath":"en_US/case/index.md","filePath":"en_US/case/index.md","lastUpdated":1715016176000}'),o={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return t(),a("div")}const h=e(o,[["render",i]]);export{u as __pageData,h as default};
diff --git a/assets/en_US_case_index.md.2c98943e.lean.js b/assets/en_US_case_index.md.ed77047b.lean.js
similarity index 95%
rename from assets/en_US_case_index.md.2c98943e.lean.js
rename to assets/en_US_case_index.md.ed77047b.lean.js
index 600df0c1..3da22aa9 100644
--- a/assets/en_US_case_index.md.2c98943e.lean.js
+++ b/assets/en_US_case_index.md.ed77047b.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Community Project","hero":{"name":"Nezha Monitoring","text":"Community Project","tagline":"Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Learn More →","link":"/en_US/case/case1"}]},"features":[{"title":"Submit a project","details":"We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information."},{"title":"Important Notes","details":"All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc."}]},"headers":[],"relativePath":"en_US/case/index.md","filePath":"en_US/case/index.md","lastUpdated":1714697355000}'),o={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return t(),a("div")}const h=e(o,[["render",i]]);export{u as __pageData,h as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Community Project","hero":{"name":"Nezha Monitoring","text":"Community Project","tagline":"Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Learn More →","link":"/en_US/case/case1"}]},"features":[{"title":"Submit a project","details":"We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information."},{"title":"Important Notes","details":"All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc."}]},"headers":[],"relativePath":"en_US/case/index.md","filePath":"en_US/case/index.md","lastUpdated":1715016176000}'),o={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return t(),a("div")}const h=e(o,[["render",i]]);export{u as __pageData,h as default};
diff --git a/assets/en_US_developer_index.md.7f723a9d.js b/assets/en_US_developer_index.md.a8a2196a.js
similarity index 91%
rename from assets/en_US_developer_index.md.7f723a9d.js
rename to assets/en_US_developer_index.md.a8a2196a.js
index 001ce166..51c02250 100644
--- a/assets/en_US_developer_index.md.7f723a9d.js
+++ b/assets/en_US_developer_index.md.a8a2196a.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const c=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Development Manual","hero":{"name":"Development Manual","text":"Nezha Monitoring Development Manual.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/theme"}]}},"headers":[],"relativePath":"en_US/developer/index.md","filePath":"en_US/developer/index.md","lastUpdated":1714697355000}'),n={name:"en_US/developer/index.md"};function o(r,i,l,s,p,d){return t(),a("div")}const _=e(n,[["render",o]]);export{c as __pageData,_ as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const c=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Development Manual","hero":{"name":"Development Manual","text":"Nezha Monitoring Development Manual.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/theme"}]}},"headers":[],"relativePath":"en_US/developer/index.md","filePath":"en_US/developer/index.md","lastUpdated":1715016176000}'),n={name:"en_US/developer/index.md"};function o(r,i,l,s,p,d){return t(),a("div")}const _=e(n,[["render",o]]);export{c as __pageData,_ as default};
diff --git a/assets/en_US_developer_index.md.7f723a9d.lean.js b/assets/en_US_developer_index.md.a8a2196a.lean.js
similarity index 91%
rename from assets/en_US_developer_index.md.7f723a9d.lean.js
rename to assets/en_US_developer_index.md.a8a2196a.lean.js
index 001ce166..51c02250 100644
--- a/assets/en_US_developer_index.md.7f723a9d.lean.js
+++ b/assets/en_US_developer_index.md.a8a2196a.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const c=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Development Manual","hero":{"name":"Development Manual","text":"Nezha Monitoring Development Manual.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/theme"}]}},"headers":[],"relativePath":"en_US/developer/index.md","filePath":"en_US/developer/index.md","lastUpdated":1714697355000}'),n={name:"en_US/developer/index.md"};function o(r,i,l,s,p,d){return t(),a("div")}const _=e(n,[["render",o]]);export{c as __pageData,_ as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const c=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Development Manual","hero":{"name":"Development Manual","text":"Nezha Monitoring Development Manual.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/theme"}]}},"headers":[],"relativePath":"en_US/developer/index.md","filePath":"en_US/developer/index.md","lastUpdated":1715016176000}'),n={name:"en_US/developer/index.md"};function o(r,i,l,s,p,d){return t(),a("div")}const _=e(n,[["render",o]]);export{c as __pageData,_ as default};
diff --git a/assets/en_US_developer_l10n.md.ae24b6aa.js b/assets/en_US_developer_l10n.md.86938de6.js
similarity index 96%
rename from assets/en_US_developer_l10n.md.ae24b6aa.js
rename to assets/en_US_developer_l10n.md.86938de6.js
index a52fc2f9..b918c27a 100644
--- a/assets/en_US_developer_l10n.md.ae24b6aa.js
+++ b/assets/en_US_developer_l10n.md.86938de6.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1714697355000}'),o={name:"en_US/developer/l10n.md"},i=n('Nezha Monitoring's Dashboard has added localization to support multiple languages, and you can follow these steps to support localization when developing new features
Introduction
- You can directly use the text configuration already available in
/resource/l10n/en-US.toml
to replace the text in the new feature. - If there is new text in the new feature, please refer to the configuration text in
en-US.toml
, pull the new text into the configuration files of other languages such as en-US.toml
, and add translations.
Adding a new localized text file
- Add a new language text configuration in
/resource/l10n/
. - Pull existing text configurations from other languages in the new language text configuration.
- Add translations for the new language text configuration.
',5),l=[i];function r(d,c,s,u,h,f){return t(),a("div",null,l)}const p=e(o,[["render",r]]);export{g as __pageData,p as default};
+import{_ as e,o as t,c as a,R as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1715016176000}'),o={name:"en_US/developer/l10n.md"},i=n('Nezha Monitoring's Dashboard has added localization to support multiple languages, and you can follow these steps to support localization when developing new features
Introduction
- You can directly use the text configuration already available in
/resource/l10n/en-US.toml
to replace the text in the new feature. - If there is new text in the new feature, please refer to the configuration text in
en-US.toml
, pull the new text into the configuration files of other languages such as en-US.toml
, and add translations.
Adding a new localized text file
- Add a new language text configuration in
/resource/l10n/
. - Pull existing text configurations from other languages in the new language text configuration.
- Add translations for the new language text configuration.
',5),l=[i];function r(d,c,s,u,h,f){return t(),a("div",null,l)}const p=e(o,[["render",r]]);export{g as __pageData,p as default};
diff --git a/assets/en_US_developer_l10n.md.ae24b6aa.lean.js b/assets/en_US_developer_l10n.md.86938de6.lean.js
similarity index 85%
rename from assets/en_US_developer_l10n.md.ae24b6aa.lean.js
rename to assets/en_US_developer_l10n.md.86938de6.lean.js
index cb6f1134..5d6c0f12 100644
--- a/assets/en_US_developer_l10n.md.ae24b6aa.lean.js
+++ b/assets/en_US_developer_l10n.md.86938de6.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1714697355000}'),o={name:"en_US/developer/l10n.md"},i=n("",5),l=[i];function r(d,c,s,u,h,f){return t(),a("div",null,l)}const p=e(o,[["render",r]]);export{g as __pageData,p as default};
+import{_ as e,o as t,c as a,R as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1715016176000}'),o={name:"en_US/developer/l10n.md"},i=n("",5),l=[i];function r(d,c,s,u,h,f){return t(),a("div",null,l)}const p=e(o,[["render",r]]);export{g as __pageData,p as default};
diff --git a/assets/en_US_developer_theme.md.8f060058.js b/assets/en_US_developer_theme.md.009660d4.js
similarity index 96%
rename from assets/en_US_developer_theme.md.8f060058.js
rename to assets/en_US_developer_theme.md.009660d4.js
index 6860f0ea..fa6e92b9 100644
--- a/assets/en_US_developer_theme.md.8f060058.js
+++ b/assets/en_US_developer_theme.md.009660d4.js
@@ -1 +1 @@
-import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1714697355000}'),n={name:"en_US/developer/theme.md"},c=a('Nezha Theme Development Environment
Nezha Monitoring provides a theme development environment that you can use to create new Nezha Monitoring themes
WARNING
Please note: This development environment only supports dashboard v0.13.16
and newer versions.
How to use
- Clone this repository to local
- Modify the Oauth2 configuration in
data/config.yaml
(The callback connection can be filled with http://localhost
) - Run
docker-compose up
- Start development
- Once the theme has been created, you can place
theme-custom
in /opt/nezha/dashboard/theme-custom
on the server
FAQ
- If you can't use port
80
, change the configuration in docker-compose.yaml
.
',7),r=[c];function l(i,h,d,s,m,p){return o(),t("div",null,r)}const v=e(n,[["render",l]]);export{_ as __pageData,v as default};
+import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1715016176000}'),n={name:"en_US/developer/theme.md"},c=a('Nezha Theme Development Environment
Nezha Monitoring provides a theme development environment that you can use to create new Nezha Monitoring themes
WARNING
Please note: This development environment only supports dashboard v0.13.16
and newer versions.
How to use
- Clone this repository to local
- Modify the Oauth2 configuration in
data/config.yaml
(The callback connection can be filled with http://localhost
) - Run
docker-compose up
- Start development
- Once the theme has been created, you can place
theme-custom
in /opt/nezha/dashboard/theme-custom
on the server
FAQ
- If you can't use port
80
, change the configuration in docker-compose.yaml
.
',7),r=[c];function l(i,h,d,s,m,p){return o(),t("div",null,r)}const v=e(n,[["render",l]]);export{_ as __pageData,v as default};
diff --git a/assets/en_US_developer_theme.md.8f060058.lean.js b/assets/en_US_developer_theme.md.009660d4.lean.js
similarity index 84%
rename from assets/en_US_developer_theme.md.8f060058.lean.js
rename to assets/en_US_developer_theme.md.009660d4.lean.js
index 43e56a61..8e387998 100644
--- a/assets/en_US_developer_theme.md.8f060058.lean.js
+++ b/assets/en_US_developer_theme.md.009660d4.lean.js
@@ -1 +1 @@
-import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1714697355000}'),n={name:"en_US/developer/theme.md"},c=a("",7),r=[c];function l(i,h,d,s,m,p){return o(),t("div",null,r)}const v=e(n,[["render",l]]);export{_ as __pageData,v as default};
+import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1715016176000}'),n={name:"en_US/developer/theme.md"},c=a("",7),r=[c];function l(i,h,d,s,m,p){return o(),t("div",null,r)}const v=e(n,[["render",l]]);export{_ as __pageData,v as default};
diff --git a/assets/en_US_guide_agent.md.1afbbc34.js b/assets/en_US_guide_agent.md.f3d0bc8d.js
similarity index 99%
rename from assets/en_US_guide_agent.md.1afbbc34.js
rename to assets/en_US_guide_agent.md.f3d0bc8d.js
index ba9c6713..32fe04b2 100644
--- a/assets/en_US_guide_agent.md.1afbbc34.js
+++ b/assets/en_US_guide_agent.md.f3d0bc8d.js
@@ -1,4 +1,4 @@
-import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1714697355000}'),o={name:"en_US/guide/agent.md"},e=l(`The service in the monitored server is called Agent. This document will describe how to install the Agent on the monitored server and connect it with Dashboard
TIP
Agent binary repository: https://github.com/nezhahq/agent/releases
Install Agent using one-click script
Nezha Monitoring now supports one-click installation of the Agent on Windows and Linux. Follow the steps in this document and you can easily deploy it on your server
Preparation
First of all, you need to set up the communication domain name in the settings page of the admin panel, this domain name can not connect to the CDN, here is the sample communication domain name "data.example.com" mentioned earlier for demonstration
Enter the administration panel, go to the "Settings" page, in the item "CDN Bypassed Domain/IP ", fill in the communication domain name, and then click "Save"
One-click installation on Linux (Ubuntu, Debian, CentOS)
- First add a server in the admin panel
- Click on the green Linux icon button next to the newly added server and copy the one-click installation command
- Run the copied one-click installation command on the monitored server, wait for the installation to complete, and then return to the Dashboard home page to see if the server is online.
One-click installation on Windows
- First add a server in the admin panel
- Click on the green Linux icon button next to the newly added server and copy the one-click installation command
- Login to Windows Server, open PowerShell, and run the copied installation command in PowerShell
- If you encounter the prompt "Implement Policy Change" please select Y
- Wait for the installation to complete and return to the Dashboard home page to see if the server is online
Other ways to install Agent
Installing Agent on Linux (Ubuntu, Debian, CentOS)
- First add a server in the admin panel
- In the monitored server, run the script:
bashcurl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
Select “Install_agent”
Input the communication domain name, e.g. "data.example.com"
Input RPC port, default is 5555
Input the Agent Secret, which is generated when adding a server in the administration panel and can be found in the " Servers " page of the administration panel
Wait for the installation to complete and return to the Dashboard home page to see if the server is online
Installing Agent on other Linux (such as alpine use oprec not systemd)
Contributed by unknown0054
- Edit SERVER,SECRET,TLS then run it in Shell
shellcat >/etc/init.d/nezha-agent<< EOF
+import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1715016176000}'),o={name:"en_US/guide/agent.md"},e=l(`The service in the monitored server is called Agent. This document will describe how to install the Agent on the monitored server and connect it with Dashboard
TIP
Agent binary repository: https://github.com/nezhahq/agent/releases
Install Agent using one-click script
Nezha Monitoring now supports one-click installation of the Agent on Windows and Linux. Follow the steps in this document and you can easily deploy it on your server
Preparation
First of all, you need to set up the communication domain name in the settings page of the admin panel, this domain name can not connect to the CDN, here is the sample communication domain name "data.example.com" mentioned earlier for demonstration
Enter the administration panel, go to the "Settings" page, in the item "CDN Bypassed Domain/IP ", fill in the communication domain name, and then click "Save"
One-click installation on Linux (Ubuntu, Debian, CentOS)
- First add a server in the admin panel
- Click on the green Linux icon button next to the newly added server and copy the one-click installation command
- Run the copied one-click installation command on the monitored server, wait for the installation to complete, and then return to the Dashboard home page to see if the server is online.
One-click installation on Windows
- First add a server in the admin panel
- Click on the green Linux icon button next to the newly added server and copy the one-click installation command
- Login to Windows Server, open PowerShell, and run the copied installation command in PowerShell
- If you encounter the prompt "Implement Policy Change" please select Y
- Wait for the installation to complete and return to the Dashboard home page to see if the server is online
Other ways to install Agent
Installing Agent on Linux (Ubuntu, Debian, CentOS)
- First add a server in the admin panel
- In the monitored server, run the script:
bashcurl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
Select “Install_agent”
Input the communication domain name, e.g. "data.example.com"
Input RPC port, default is 5555
Input the Agent Secret, which is generated when adding a server in the administration panel and can be found in the " Servers " page of the administration panel
Wait for the installation to complete and return to the Dashboard home page to see if the server is online
Installing Agent on other Linux (such as alpine use oprec not systemd)
Contributed by unknown0054
- Edit SERVER,SECRET,TLS then run it in Shell
shellcat >/etc/init.d/nezha-agent<< EOF
#!/sbin/openrc-run
SERVER="" #Dashboard address ip:port
SECRET="" #SECRET
diff --git a/assets/en_US_guide_agent.md.1afbbc34.lean.js b/assets/en_US_guide_agent.md.f3d0bc8d.lean.js
similarity index 84%
rename from assets/en_US_guide_agent.md.1afbbc34.lean.js
rename to assets/en_US_guide_agent.md.f3d0bc8d.lean.js
index 04d0bd10..6a4ec1df 100644
--- a/assets/en_US_guide_agent.md.1afbbc34.lean.js
+++ b/assets/en_US_guide_agent.md.f3d0bc8d.lean.js
@@ -1 +1 @@
-import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1714697355000}'),o={name:"en_US/guide/agent.md"},e=l("",71),p=[e];function t(r,c,i,D,y,C){return n(),a("div",null,p)}const u=s(o,[["render",t]]);export{h as __pageData,u as default};
+import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1715016176000}'),o={name:"en_US/guide/agent.md"},e=l("",71),p=[e];function t(r,c,i,D,y,C){return n(),a("div",null,p)}const u=s(o,[["render",t]]);export{h as __pageData,u as default};
diff --git a/assets/en_US_guide_agentq.md.00de4ad7.js b/assets/en_US_guide_agentq.md.3e8e3840.js
similarity index 96%
rename from assets/en_US_guide_agentq.md.00de4ad7.js
rename to assets/en_US_guide_agentq.md.3e8e3840.js
index 9ca16405..8dc98ebd 100644
--- a/assets/en_US_guide_agentq.md.00de4ad7.js
+++ b/assets/en_US_guide_agentq.md.3e8e3840.js
@@ -1 +1 @@
-import{_ as e,o as a,c as t,R as n}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1714697355000}'),o={name:"en_US/guide/agentq.md"},i=n('Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?
Please check Dashboard - Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?
Error on one-click script installation
curl: Failed to connect to raw.githubusercontent.com...
Please check if your server can connect to Github, try again, or check Other ways to install Agent
sudo: command not found
Please install sudo first
',7),r=[i];function c(h,d,l,s,u,p){return a(),t("div",null,r)}const f=e(o,[["render",c]]);export{_ as __pageData,f as default};
+import{_ as e,o as a,c as t,R as n}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1715016176000}'),o={name:"en_US/guide/agentq.md"},i=n('Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?
Please check Dashboard - Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?
Error on one-click script installation
curl: Failed to connect to raw.githubusercontent.com...
Please check if your server can connect to Github, try again, or check Other ways to install Agent
sudo: command not found
Please install sudo first
',7),r=[i];function c(h,d,l,s,u,p){return a(),t("div",null,r)}const f=e(o,[["render",c]]);export{_ as __pageData,f as default};
diff --git a/assets/en_US_guide_agentq.md.00de4ad7.lean.js b/assets/en_US_guide_agentq.md.3e8e3840.lean.js
similarity index 84%
rename from assets/en_US_guide_agentq.md.00de4ad7.lean.js
rename to assets/en_US_guide_agentq.md.3e8e3840.lean.js
index 06a34b25..30843ca2 100644
--- a/assets/en_US_guide_agentq.md.00de4ad7.lean.js
+++ b/assets/en_US_guide_agentq.md.3e8e3840.lean.js
@@ -1 +1 @@
-import{_ as e,o as a,c as t,R as n}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1714697355000}'),o={name:"en_US/guide/agentq.md"},i=n("",7),r=[i];function c(h,d,l,s,u,p){return a(),t("div",null,r)}const f=e(o,[["render",c]]);export{_ as __pageData,f as default};
+import{_ as e,o as a,c as t,R as n}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1715016176000}'),o={name:"en_US/guide/agentq.md"},i=n("",7),r=[i];function c(h,d,l,s,u,p){return a(),t("div",null,r)}const f=e(o,[["render",c]]);export{_ as __pageData,f as default};
diff --git a/assets/en_US_guide_api.md.7613fb45.js b/assets/en_US_guide_api.md.ac10c4cd.js
similarity index 99%
rename from assets/en_US_guide_api.md.7613fb45.js
rename to assets/en_US_guide_api.md.ac10c4cd.js
index a4383c5b..9c8df637 100644
--- a/assets/en_US_guide_api.md.7613fb45.js
+++ b/assets/en_US_guide_api.md.ac10c4cd.js
@@ -1,4 +1,4 @@
-import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1714697355000}'),t={name:"en_US/guide/api.md"},e=o(`Nezha Monitoring now supports querying the status information of the Agent in the Dashboard using the API
Create Token
API allows Token authentication method and Cookies authentication method
To create a new Token, after entering the admin panel, click on the avatar in the upper right corner and select "API Token" to enter the Token management page
Click "Add Token" and after customizing the notes, click "Add"
To delete a Token, please select the corresponding Token and click the delete icon on the right
WARNING
Token is the authentication tool of API, it is very important for your Dashboard's information security, please don't leak your Token to others
Authentication method
Token authentication method:
Request Headers:
+import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1715016176000}'),t={name:"en_US/guide/api.md"},e=o(`Nezha Monitoring now supports querying the status information of the Agent in the Dashboard using the API
Create Token
API allows Token authentication method and Cookies authentication method
To create a new Token, after entering the admin panel, click on the avatar in the upper right corner and select "API Token" to enter the Token management page
Click "Add Token" and after customizing the notes, click "Add"
To delete a Token, please select the corresponding Token and click the delete icon on the right
WARNING
Token is the authentication tool of API, it is very important for your Dashboard's information security, please don't leak your Token to others
Authentication method
Token authentication method:
Request Headers:
Authorization: Token
How to use
WARNING
The negative timestamp in the example below is (0000-00-00)
It is currently used to indicate that the Agent has never reported since the Dashboard went live
However, it is not recommended to use positivity or negativity to determine the status
TIP
The request method is Get
and the return format is JSON
.
- Get a list of servers:
GET /api/v1/server/list?tag=
query: tag (ServerTag means the group of servers, if this value is provided, only the servers in this group are queried)
JSON Return Example:
{
"code": 0,
"message": "success",
diff --git a/assets/en_US_guide_api.md.7613fb45.lean.js b/assets/en_US_guide_api.md.ac10c4cd.lean.js
similarity index 84%
rename from assets/en_US_guide_api.md.7613fb45.lean.js
rename to assets/en_US_guide_api.md.ac10c4cd.lean.js
index 8ca3dc95..df928823 100644
--- a/assets/en_US_guide_api.md.7613fb45.lean.js
+++ b/assets/en_US_guide_api.md.ac10c4cd.lean.js
@@ -1 +1 @@
-import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1714697355000}'),t={name:"en_US/guide/api.md"},e=o("",16),l=[e];function p(u,c,i,r,q,C){return n(),a("div",null,l)}const d=s(t,[["render",p]]);export{y as __pageData,d as default};
+import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1715016176000}'),t={name:"en_US/guide/api.md"},e=o("",16),l=[e];function p(u,c,i,r,q,C){return n(),a("div",null,l)}const d=s(t,[["render",p]]);export{y as __pageData,d as default};
diff --git a/assets/en_US_guide_dashboard.md.e241654e.js b/assets/en_US_guide_dashboard.md.0e70af45.js
similarity index 99%
rename from assets/en_US_guide_dashboard.md.e241654e.js
rename to assets/en_US_guide_dashboard.md.0e70af45.js
index a31b7703..2f3c2389 100644
--- a/assets/en_US_guide_dashboard.md.e241654e.js
+++ b/assets/en_US_guide_dashboard.md.0e70af45.js
@@ -1,4 +1,4 @@
-import{_ as e,o as a,c as t,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1714697355000}'),s={name:"en_US/guide/dashboard.md"},n=o(`Preparations
To setup a Nezha monitorning Dashboard, you need these things:
- A VPS that can connect to the Internet, firewall and security policies need to open ports 8008 and 5555, otherwise it will be inaccessible and unable to receive data. A 1 core 512MB RAM server is sufficient for most usage scenarios
- A domain name that has been set up with an A record that resolves to the Dashboard server IP
TIP
If you want to use CDN, please prepare two domains, one connect to CDN for public access, CDN needs to support WebSocket protocol; the other domain should not connect to CDN, use it as Agent to send data to Dashboard.
This document uses "cdn.example.com" and "data.example.com" domains to demonstrate respectively
- A Github or Gitlab account
This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only
WARNING
This project does not rely on aaPanel, you can choose to use any server panel you like, and if you are capable enough, you can manually install NginX or Caddy to configure SSL and reverse proxy.
If you don't think it's necessary to use port 80 or 443 to access Dashboard, you don't even need to install NginX and you can just use the install script.
Get the Client ID and Client Secret on Github/Gitlab
Nezha Monitor uses a Github account as the login account for the admin panel
- First we need to create a new authentication application, after logging into Github, open https://github.com/settings/developers and select "OAuth Apps" - "New OAuth App "
Application name
- Fill in as you like
Homepage URL
- Fill in the panel's access domain name, such as: "http://cdn.example.com"
Authorization callback URL
- Fill in the callback address, e.g., "http://cdn.example.com/oauth2/callback" - Click on "Registration Application"
- Remember the Client ID in the page, then click "Generate a new client secret" to create a new Client Secret, the new secret will be displayed only once, please save it properly
- If you're using Gitlab, you'll need to go to https://gitlab.com/-/profile/applications to create a new application
- Fill in
Redirect URL
with the callback address - In
Scopes
, select read_user
and read_api
- Once created, save the Application ID and Secret
Installing Dashboard on the server
- In the panel server, run the installation script:
bashcurl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
After waiting for the Docker installation to complete, input the following settings:
OAuth2 provider
- Github or Gitlab
Client ID
- Previously saved Client ID
Client Secret
- Previously saved secret
GitHub/Gitee login name
- Github o Gitlab username
Site title
- Custom site title
Site access port
- Public access port, customizable, default 8008
RPC port
- The communication port between Agent and Dashboard, default 5555
After the input is complete, wait to pull the mirror
After the installation, if everything is fine, you can visit the domain + port number, such as "http://cdn.example.com:8008" to view the Dashboard
In the future, if you need to run the script again, you can run:
bash./nezha.sh
to open the management script
Configure reverse proxy
Create a new site in the aaPanel, fill in the public access domain name, such as "http://cdn.example.com", then click "Settings" to enter the site settings option, select " Reverse proxy" - "New reverse proxy"
Customize a proxy name, fill in http://127.0.0.1
in the "Target URL" and click "Save"
Open the " configuration" to the right of the new reverse proxy you just created and replace the configuration file with the following:
nginx#PROXY-START/
+import{_ as e,o as a,c as t,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1715016176000}'),s={name:"en_US/guide/dashboard.md"},n=o(`Preparations
To setup a Nezha monitorning Dashboard, you need these things:
- A VPS that can connect to the Internet, firewall and security policies need to open ports 8008 and 5555, otherwise it will be inaccessible and unable to receive data. A 1 core 512MB RAM server is sufficient for most usage scenarios
- A domain name that has been set up with an A record that resolves to the Dashboard server IP
TIP
If you want to use CDN, please prepare two domains, one connect to CDN for public access, CDN needs to support WebSocket protocol; the other domain should not connect to CDN, use it as Agent to send data to Dashboard.
This document uses "cdn.example.com" and "data.example.com" domains to demonstrate respectively
- A Github or Gitlab account
This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only
WARNING
This project does not rely on aaPanel, you can choose to use any server panel you like, and if you are capable enough, you can manually install NginX or Caddy to configure SSL and reverse proxy.
If you don't think it's necessary to use port 80 or 443 to access Dashboard, you don't even need to install NginX and you can just use the install script.
Get the Client ID and Client Secret on Github/Gitlab
Nezha Monitor uses a Github account as the login account for the admin panel
- First we need to create a new authentication application, after logging into Github, open https://github.com/settings/developers and select "OAuth Apps" - "New OAuth App "
Application name
- Fill in as you like
Homepage URL
- Fill in the panel's access domain name, such as: "http://cdn.example.com"
Authorization callback URL
- Fill in the callback address, e.g., "http://cdn.example.com/oauth2/callback" - Click on "Registration Application"
- Remember the Client ID in the page, then click "Generate a new client secret" to create a new Client Secret, the new secret will be displayed only once, please save it properly
- If you're using Gitlab, you'll need to go to https://gitlab.com/-/profile/applications to create a new application
- Fill in
Redirect URL
with the callback address - In
Scopes
, select read_user
and read_api
- Once created, save the Application ID and Secret
Installing Dashboard on the server
- In the panel server, run the installation script:
bashcurl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
After waiting for the Docker installation to complete, input the following settings:
OAuth2 provider
- Github or Gitlab
Client ID
- Previously saved Client ID
Client Secret
- Previously saved secret
GitHub/Gitee login name
- Github o Gitlab username
Site title
- Custom site title
Site access port
- Public access port, customizable, default 8008
RPC port
- The communication port between Agent and Dashboard, default 5555
After the input is complete, wait to pull the mirror
After the installation, if everything is fine, you can visit the domain + port number, such as "http://cdn.example.com:8008" to view the Dashboard
In the future, if you need to run the script again, you can run:
bash./nezha.sh
to open the management script
Configure reverse proxy
Create a new site in the aaPanel, fill in the public access domain name, such as "http://cdn.example.com", then click "Settings" to enter the site settings option, select " Reverse proxy" - "New reverse proxy"
Customize a proxy name, fill in http://127.0.0.1
in the "Target URL" and click "Save"
Open the " configuration" to the right of the new reverse proxy you just created and replace the configuration file with the following:
nginx#PROXY-START/
location / {
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $http_host;
diff --git a/assets/en_US_guide_dashboard.md.e241654e.lean.js b/assets/en_US_guide_dashboard.md.0e70af45.lean.js
similarity index 85%
rename from assets/en_US_guide_dashboard.md.e241654e.lean.js
rename to assets/en_US_guide_dashboard.md.0e70af45.lean.js
index 55c75dd6..3cfd7921 100644
--- a/assets/en_US_guide_dashboard.md.e241654e.lean.js
+++ b/assets/en_US_guide_dashboard.md.0e70af45.lean.js
@@ -1 +1 @@
-import{_ as e,o as a,c as t,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1714697355000}'),s={name:"en_US/guide/dashboard.md"},n=o("",41),l=[n];function r(i,p,c,d,h,u){return a(),t("div",null,l)}const m=e(s,[["render",r]]);export{y as __pageData,m as default};
+import{_ as e,o as a,c as t,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1715016176000}'),s={name:"en_US/guide/dashboard.md"},n=o("",41),l=[n];function r(i,p,c,d,h,u){return a(),t("div",null,l)}const m=e(s,[["render",r]]);export{y as __pageData,m as default};
diff --git a/assets/en_US_guide_dashboardq.md.22032e1a.js b/assets/en_US_guide_dashboardq.md.6fe712f0.js
similarity index 98%
rename from assets/en_US_guide_dashboardq.md.22032e1a.js
rename to assets/en_US_guide_dashboardq.md.6fe712f0.js
index ec1ef471..2925b375 100644
--- a/assets/en_US_guide_dashboardq.md.22032e1a.js
+++ b/assets/en_US_guide_dashboardq.md.6fe712f0.js
@@ -1,4 +1,4 @@
-import{_ as e,o as a,c as s,R as o}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1714697355000}'),t={name:"en_US/guide/dashboardq.md"},n=o(`Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?
First of all, explain how the IP displayed in the admin panel is gotten: the Agent will request the IP-API every once in a while, get the IP information and report it to the Dashboard, the IP-API currently used can be viewed here: myip.go
If you find that the IP displayed in the admin panel is not the same as the IP provided to you by the service provider, the biggest possibility is that the service provider gave you the entry IP, but the Agent tested out your exit IP. This problem may also occur in BGP servers and Leased line.
TIP
To take a simple and very common example, the service provider to provide you a anti-DDoS server, in order to meet the goals of both DDoS protection and low network disruption rate, the IP provided to you may be the mapped anti-DDoS IP and not the real exit IP of your server
You can also test the exit IP by running the following command in the Agent server:
shellcurl https://ipapi.co/ip/
+import{_ as e,o as a,c as s,R as o}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1715016176000}'),t={name:"en_US/guide/dashboardq.md"},n=o(`Why the IP displayed in the admin panel and the actual IP of the Agent are not the same?
First of all, explain how the IP displayed in the admin panel is gotten: the Agent will request the IP-API every once in a while, get the IP information and report it to the Dashboard, the IP-API currently used can be viewed here: myip.go
If you find that the IP displayed in the admin panel is not the same as the IP provided to you by the service provider, the biggest possibility is that the service provider gave you the entry IP, but the Agent tested out your exit IP. This problem may also occur in BGP servers and Leased line.
TIP
To take a simple and very common example, the service provider to provide you a anti-DDoS server, in order to meet the goals of both DDoS protection and low network disruption rate, the IP provided to you may be the mapped anti-DDoS IP and not the real exit IP of your server
You can also test the exit IP by running the following command in the Agent server:
shellcurl https://ipapi.co/ip/
curl ip.sb
curl ip-api.com
Forgot your access password or deleted your access password
Please view or edit the /opt/nezha/dashboard/data/config.yaml
file.
The password is located in the site-viewpassword item.
Dashboard install/restart/update failed: iptables ......
First, try restarting docker and retrying again
shellsystemctl status docker
systemctl restart docker
diff --git a/assets/en_US_guide_dashboardq.md.22032e1a.lean.js b/assets/en_US_guide_dashboardq.md.6fe712f0.lean.js
similarity index 70%
rename from assets/en_US_guide_dashboardq.md.22032e1a.lean.js
rename to assets/en_US_guide_dashboardq.md.6fe712f0.lean.js
index e3a5f1c5..60005142 100644
--- a/assets/en_US_guide_dashboardq.md.22032e1a.lean.js
+++ b/assets/en_US_guide_dashboardq.md.6fe712f0.lean.js
@@ -1 +1 @@
-import{_ as e,o as a,c as s,R as o}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1714697355000}'),t={name:"en_US/guide/dashboardq.md"},n=o("",22),r=[n];function l(i,c,d,p,h,u){return a(),s("div",null,r)}const g=e(t,[["render",l]]);export{b as __pageData,g as default};
+import{_ as e,o as a,c as s,R as o}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1715016176000}'),t={name:"en_US/guide/dashboardq.md"},n=o("",22),r=[n];function l(i,c,d,p,h,u){return a(),s("div",null,r)}const g=e(t,[["render",l]]);export{b as __pageData,g as default};
diff --git a/assets/en_US_guide_loginq.md.012b065c.js b/assets/en_US_guide_loginq.md.944f9f44.js
similarity index 98%
rename from assets/en_US_guide_loginq.md.012b065c.js
rename to assets/en_US_guide_loginq.md.944f9f44.js
index b88eec51..52146210 100644
--- a/assets/en_US_guide_loginq.md.012b065c.js
+++ b/assets/en_US_guide_loginq.md.944f9f44.js
@@ -1 +1 @@
-import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1714697355000}'),r={name:"en_US/guide/loginq.md"},i=a('Page refuses to connect or timeout after login callback
- Your server cannot connect to Github, consider trying several times or switching to Gitlab.
- You have configured the wrong callback URL, make sure your callback URL is correct and port and protocol are correct!
- An unknown error occurred in Dashboard, you can use the script to check the logs.
TIP
What is a protocol?
In the browser, your domain name ending with ://
is the protocol, usually http
and https
. Since the Dashboard may be accessible by multiple protocols + domain + port combinations under normal deployment, please make sure to choose the most appropriate one as the callback.
How do I check if my callback URL is wrong?
Please make sure the protocol+domain+port displayed by your browser before login and the protocol+domain+port you jump to after login are the same.
Please make sure your path is /oauth2/callback
, all lowercase.
Dashboard errors after login
http: named cookie not present
- Clear your browser cookies and log in again, or change your browser.
- Check the callback address to ensure that your callback address is correct and that both the port and protocol are correct! The address from which the request is initiated needs to be in the same domain as the callback address, and the port, protocol, and domain name (or IP) all need to be consistent.
lookup xxx
DNS resolution failure, in most cases, is due to iptables-related configuration changes.
It is recommended to restart docker first, sudo systemctl restart docker
, and then use the script to restart the Dashboard.
If the lookup error still occurs, it is recommended to check whether there are other tools to control iptables, such as Aapanel Firewall.
This problem may also be related to the kernel, please try to change the official kernel.
The authorization method is invalid, or the login callback URL is invalid, expired, or has been revoked
Suggest changing the authentication method to Github/Gitlab.
oauth2: server response missing access_token
It may be caused by a number of factors, the most likely is a network problem, we suggest to check the network and retry.
If you can't solve it, we suggest changing the authentication method to Github/Gitlab.
This user is not the administrator or cannot login
You have logged into the wrong account or configured the wrong username, note that username is not email, you can use a script to modify it.
dial tcp xxx:443 i/o timeout
If the server has network problems, you can restart docker first, sudo systemctl restart docker
, and then use the script to restart the Dashboard.
You can also change to another OAuth method if necessary.
net/http: TLS handshake timeout
Same as above.
',20),s=[i];function n(l,c,h,d,u,m){return o(),t("div",null,s)}const k=e(r,[["render",n]]);export{b as __pageData,k as default};
+import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1715016176000}'),r={name:"en_US/guide/loginq.md"},i=a('Page refuses to connect or timeout after login callback
- Your server cannot connect to Github, consider trying several times or switching to Gitlab.
- You have configured the wrong callback URL, make sure your callback URL is correct and port and protocol are correct!
- An unknown error occurred in Dashboard, you can use the script to check the logs.
TIP
What is a protocol?
In the browser, your domain name ending with ://
is the protocol, usually http
and https
. Since the Dashboard may be accessible by multiple protocols + domain + port combinations under normal deployment, please make sure to choose the most appropriate one as the callback.
How do I check if my callback URL is wrong?
Please make sure the protocol+domain+port displayed by your browser before login and the protocol+domain+port you jump to after login are the same.
Please make sure your path is /oauth2/callback
, all lowercase.
Dashboard errors after login
http: named cookie not present
- Clear your browser cookies and log in again, or change your browser.
- Check the callback address to ensure that your callback address is correct and that both the port and protocol are correct! The address from which the request is initiated needs to be in the same domain as the callback address, and the port, protocol, and domain name (or IP) all need to be consistent.
lookup xxx
DNS resolution failure, in most cases, is due to iptables-related configuration changes.
It is recommended to restart docker first, sudo systemctl restart docker
, and then use the script to restart the Dashboard.
If the lookup error still occurs, it is recommended to check whether there are other tools to control iptables, such as Aapanel Firewall.
This problem may also be related to the kernel, please try to change the official kernel.
The authorization method is invalid, or the login callback URL is invalid, expired, or has been revoked
Suggest changing the authentication method to Github/Gitlab.
oauth2: server response missing access_token
It may be caused by a number of factors, the most likely is a network problem, we suggest to check the network and retry.
If you can't solve it, we suggest changing the authentication method to Github/Gitlab.
This user is not the administrator or cannot login
You have logged into the wrong account or configured the wrong username, note that username is not email, you can use a script to modify it.
dial tcp xxx:443 i/o timeout
If the server has network problems, you can restart docker first, sudo systemctl restart docker
, and then use the script to restart the Dashboard.
You can also change to another OAuth method if necessary.
net/http: TLS handshake timeout
Same as above.
',20),s=[i];function n(l,c,h,d,u,m){return o(),t("div",null,s)}const k=e(r,[["render",n]]);export{b as __pageData,k as default};
diff --git a/assets/en_US_guide_loginq.md.012b065c.lean.js b/assets/en_US_guide_loginq.md.944f9f44.lean.js
similarity index 84%
rename from assets/en_US_guide_loginq.md.012b065c.lean.js
rename to assets/en_US_guide_loginq.md.944f9f44.lean.js
index 66c72c76..ebff45b9 100644
--- a/assets/en_US_guide_loginq.md.012b065c.lean.js
+++ b/assets/en_US_guide_loginq.md.944f9f44.lean.js
@@ -1 +1 @@
-import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1714697355000}'),r={name:"en_US/guide/loginq.md"},i=a("",20),s=[i];function n(l,c,h,d,u,m){return o(),t("div",null,s)}const k=e(r,[["render",n]]);export{b as __pageData,k as default};
+import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1715016176000}'),r={name:"en_US/guide/loginq.md"},i=a("",20),s=[i];function n(l,c,h,d,u,m){return o(),t("div",null,s)}const k=e(r,[["render",n]]);export{b as __pageData,k as default};
diff --git a/assets/en_US_guide_notifications.md.401d0ed8.js b/assets/en_US_guide_notifications.md.20045398.js
similarity index 99%
rename from assets/en_US_guide_notifications.md.401d0ed8.js
rename to assets/en_US_guide_notifications.md.20045398.js
index 675b2f25..30afbb19 100644
--- a/assets/en_US_guide_notifications.md.401d0ed8.js
+++ b/assets/en_US_guide_notifications.md.20045398.js
@@ -1,4 +1,4 @@
-import{_ as o,o as s,c as e,R as t}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1714697355000}'),n={name:"en_US/guide/notifications.md"},a=t(`Nezha Monitoring supports monitoring of server load, CPU, memory, hard disk, data transfer, monthly data transfer, number of processes, number of connections, and sends alarm notifications when one of these items reaches a user-set limit.
Flexible notification methods
In panel messages, the placeholder #DATETIME#
represents the timestamp of when an event occurs. When the notification is triggered, the panel automatically replaces #DATETIME# with the actual time of the event.
#NEZHA#
is the panel message placeholder, the panel will automatically replace the placeholder with the actual message when it triggers the notification
The content of Body is in JSON
format:When the request type is FORM,the value is in the form of key:value
,value
can contain placeholders that will be automatically replaced when notified. When the request type is JSON It will only do string substitution and submit to the URL
directly.
Placeholders can also be placed inside the URL, and it will perform a simple string substitution when requested.
Refer to the example below, it is very flexible.
Bark Example
Name: Bark
URL: The first part is the key, followed by three matches/: key/: body or/: key/: title/: body or/: key/: category/: title/: body
Request method: GET
Request Type: Default
Body: null
Name: Bark
URL:/push
Request method: POST
Request type: FORM
Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":" https://xxxxxxxx/nz.png "}
Telegram Example, contributed by @haitau
- Name:Telegram Robot message notification
- URL:https://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA#
- Request method: GET
- Request type: default
- Body: null
- Notes for this method:The XXXXXX in botXXXXXX is the token provided when you follow the official @Botfather in Telegram and enter /newbot to create a new bot. (In the line after Use this token to access the HTTP API). The 'bot' are essential. After creating a bot, you need to talk to the BOT in Telegram (send a random message) before you can send a message by using API. YYYYYY is Telegram user's ID, you can get it by talking to the bot @userinfobot.
Email notification example - Outlook
- Name: MS Mail Notification
- URL:https://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail
- Request method: POST
- Request type: JSON
- Header:
{"Content-type":"application/json", "Authorization":"Bearer {Token}"}
- Body:
json{
+import{_ as o,o as s,c as e,R as t}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1715016176000}'),n={name:"en_US/guide/notifications.md"},a=t(`Nezha Monitoring supports monitoring of server load, CPU, memory, hard disk, data transfer, monthly data transfer, number of processes, number of connections, and sends alarm notifications when one of these items reaches a user-set limit.
Flexible notification methods
In panel messages, the placeholder #DATETIME#
represents the timestamp of when an event occurs. When the notification is triggered, the panel automatically replaces #DATETIME# with the actual time of the event.
#NEZHA#
is the panel message placeholder, the panel will automatically replace the placeholder with the actual message when it triggers the notification
The content of Body is in JSON
format:When the request type is FORM,the value is in the form of key:value
,value
can contain placeholders that will be automatically replaced when notified. When the request type is JSON It will only do string substitution and submit to the URL
directly.
Placeholders can also be placed inside the URL, and it will perform a simple string substitution when requested.
Refer to the example below, it is very flexible.
Bark Example
Name: Bark
URL: The first part is the key, followed by three matches/: key/: body or/: key/: title/: body or/: key/: category/: title/: body
Request method: GET
Request Type: Default
Body: null
Name: Bark
URL:/push
Request method: POST
Request type: FORM
Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":" https://xxxxxxxx/nz.png "}
Telegram Example, contributed by @haitau
- Name:Telegram Robot message notification
- URL:https://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA#
- Request method: GET
- Request type: default
- Body: null
- Notes for this method:The XXXXXX in botXXXXXX is the token provided when you follow the official @Botfather in Telegram and enter /newbot to create a new bot. (In the line after Use this token to access the HTTP API). The 'bot' are essential. After creating a bot, you need to talk to the BOT in Telegram (send a random message) before you can send a message by using API. YYYYYY is Telegram user's ID, you can get it by talking to the bot @userinfobot.
Email notification example - Outlook
- Name: MS Mail Notification
- URL:https://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail
- Request method: POST
- Request type: JSON
- Header:
{"Content-type":"application/json", "Authorization":"Bearer {Token}"}
- Body:
json{
"message": {
"subject": "Server Status Notification",
"body": {
diff --git a/assets/en_US_guide_notifications.md.401d0ed8.lean.js b/assets/en_US_guide_notifications.md.20045398.lean.js
similarity index 85%
rename from assets/en_US_guide_notifications.md.401d0ed8.lean.js
rename to assets/en_US_guide_notifications.md.20045398.lean.js
index e8bb5728..66c18418 100644
--- a/assets/en_US_guide_notifications.md.401d0ed8.lean.js
+++ b/assets/en_US_guide_notifications.md.20045398.lean.js
@@ -1 +1 @@
-import{_ as o,o as s,c as e,R as t}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1714697355000}'),n={name:"en_US/guide/notifications.md"},a=t("",28),l=[a];function p(r,c,i,u,D,y){return s(),e("div",null,l)}const q=o(n,[["render",p]]);export{F as __pageData,q as default};
+import{_ as o,o as s,c as e,R as t}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1715016176000}'),n={name:"en_US/guide/notifications.md"},a=t("",28),l=[a];function p(r,c,i,u,D,y){return s(),e("div",null,l)}const q=o(n,[["render",p]]);export{F as __pageData,q as default};
diff --git a/assets/en_US_guide_q2.md.5c9e53ef.js b/assets/en_US_guide_q2.md.9ad6d763.js
similarity index 96%
rename from assets/en_US_guide_q2.md.5c9e53ef.js
rename to assets/en_US_guide_q2.md.9ad6d763.js
index 7a3d4787..5b2d8df6 100644
--- a/assets/en_US_guide_q2.md.5c9e53ef.js
+++ b/assets/en_US_guide_q2.md.9ad6d763.js
@@ -1 +1 @@
-import{_ as e,o as t,c as o,R as n}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1714697355000}'),r={name:"en_US/guide/q2.md"},a=n('Let the Agent start/on-line, and the self-test process of the problem
- Run
//opt/nezha/agent/nezha-agent -s IP/Domin(Panel IP or Domain not connected to CDN):port(Panel RPC port) -p secret(Agent Secret) -d
Check the logs to see if the timeout is due to a DNS problem or poor network nc -v domain/IP port(Panel RPC port)
or telnet domain/IP port(Panel RPC port)
to check if it' s a network problem, check the inbound and outbound firewall between the local machine and the panel server, if you can' t determine the problem you can check it with the port checking tool provided by https://port.ping.pe/- If the above steps work and the Agent is online, please try to turn off SELinux on the panel server. How to close SELinux?
',2),s=[a];function l(i,c,h,p,d,_){return t(),o("div",null,s)}const u=e(r,[["render",l]]);export{m as __pageData,u as default};
+import{_ as e,o as t,c as o,R as n}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1715016176000}'),r={name:"en_US/guide/q2.md"},a=n('Let the Agent start/on-line, and the self-test process of the problem
- Run
//opt/nezha/agent/nezha-agent -s IP/Domin(Panel IP or Domain not connected to CDN):port(Panel RPC port) -p secret(Agent Secret) -d
Check the logs to see if the timeout is due to a DNS problem or poor network nc -v domain/IP port(Panel RPC port)
or telnet domain/IP port(Panel RPC port)
to check if it' s a network problem, check the inbound and outbound firewall between the local machine and the panel server, if you can' t determine the problem you can check it with the port checking tool provided by https://port.ping.pe/- If the above steps work and the Agent is online, please try to turn off SELinux on the panel server. How to close SELinux?
',2),s=[a];function l(i,c,h,p,d,_){return t(),o("div",null,s)}const u=e(r,[["render",l]]);export{m as __pageData,u as default};
diff --git a/assets/en_US_guide_q2.md.5c9e53ef.lean.js b/assets/en_US_guide_q2.md.9ad6d763.lean.js
similarity index 84%
rename from assets/en_US_guide_q2.md.5c9e53ef.lean.js
rename to assets/en_US_guide_q2.md.9ad6d763.lean.js
index 81214829..5d9abff0 100644
--- a/assets/en_US_guide_q2.md.5c9e53ef.lean.js
+++ b/assets/en_US_guide_q2.md.9ad6d763.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as o,R as n}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1714697355000}'),r={name:"en_US/guide/q2.md"},a=n("",2),s=[a];function l(i,c,h,p,d,_){return t(),o("div",null,s)}const u=e(r,[["render",l]]);export{m as __pageData,u as default};
+import{_ as e,o as t,c as o,R as n}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1715016176000}'),r={name:"en_US/guide/q2.md"},a=n("",2),s=[a];function l(i,c,h,p,d,_){return t(),o("div",null,s)}const u=e(r,[["render",l]]);export{m as __pageData,u as default};
diff --git a/assets/en_US_guide_q3.md.7852e00e.js b/assets/en_US_guide_q3.md.257e7599.js
similarity index 99%
rename from assets/en_US_guide_q3.md.7852e00e.js
rename to assets/en_US_guide_q3.md.257e7599.js
index 76a43c23..339eb327 100644
--- a/assets/en_US_guide_q3.md.7852e00e.js
+++ b/assets/en_US_guide_q3.md.257e7599.js
@@ -1,4 +1,4 @@
-import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1714697355000}'),o={name:"en_US/guide/q3.md"},p=l(`Reverse Proxy gRPC Port (support Cloudflare CDN)
Use Nginx or Caddy to reverse proxy gRPC
- Nginx configuration files
nginxserver {
+import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1715016176000}'),o={name:"en_US/guide/q3.md"},p=l(`Reverse Proxy gRPC Port (support Cloudflare CDN)
Use Nginx or Caddy to reverse proxy gRPC
- Nginx configuration files
nginxserver {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name data.example.com; # The domain name where the Agent connects to Dashboard
diff --git a/assets/en_US_guide_q3.md.7852e00e.lean.js b/assets/en_US_guide_q3.md.257e7599.lean.js
similarity index 84%
rename from assets/en_US_guide_q3.md.7852e00e.lean.js
rename to assets/en_US_guide_q3.md.257e7599.lean.js
index 770d70dd..4f51cc21 100644
--- a/assets/en_US_guide_q3.md.7852e00e.lean.js
+++ b/assets/en_US_guide_q3.md.257e7599.lean.js
@@ -1 +1 @@
-import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1714697355000}'),o={name:"en_US/guide/q3.md"},p=l("",15),e=[p];function t(c,r,D,C,y,i){return n(),a("div",null,e)}const d=s(o,[["render",t]]);export{A as __pageData,d as default};
+import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1715016176000}'),o={name:"en_US/guide/q3.md"},p=l("",15),e=[p];function t(c,r,D,C,y,i){return n(),a("div",null,e)}const d=s(o,[["render",t]]);export{A as __pageData,d as default};
diff --git a/assets/en_US_guide_q4.md.caed5d01.js b/assets/en_US_guide_q4.md.20525ba9.js
similarity index 94%
rename from assets/en_US_guide_q4.md.caed5d01.js
rename to assets/en_US_guide_q4.md.20525ba9.js
index 731b9eff..cd5f17b8 100644
--- a/assets/en_US_guide_q4.md.caed5d01.js
+++ b/assets/en_US_guide_q4.md.20525ba9.js
@@ -1 +1 @@
-import{_ as a,o as t,c as o,z as e,a as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1714697355000}'),i={name:"en_US/guide/q4.md"},r=e("h4",{id:"real-time-channel-disconnection-online-terminal-connection-failure",tabindex:"-1"},[n("Real-time channel disconnection/online terminal connection failure "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection-online-terminal-connection-failure","aria-label":'Permalink to "Real-time channel disconnection/online terminal connection failure"'},"")],-1),c=e("ul",null,[e("li",null,"If you are using a CDN, please make sure that the CDN provider provides WebSocket service and that WebSocket is enabled"),e("li",null,[n("Confirm that you are using a reverse proxy requires special configuration of the WebSocket for the "),e("code",null,"/ws"),n(" and "),e("code",null,"/terminal"),n(" paths, you can "),e("a",{href:"/en_US/guide/dashboard.html#configure-reverse-proxy"},"click here"),n(" to see the reverse proxy configuration")])],-1),l=[r,c];function s(d,u,h,m,f,_){return t(),o("div",null,l)}const k=a(i,[["render",s]]);export{g as __pageData,k as default};
+import{_ as a,o as t,c as o,z as e,a as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1715016176000}'),i={name:"en_US/guide/q4.md"},r=e("h4",{id:"real-time-channel-disconnection-online-terminal-connection-failure",tabindex:"-1"},[n("Real-time channel disconnection/online terminal connection failure "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection-online-terminal-connection-failure","aria-label":'Permalink to "Real-time channel disconnection/online terminal connection failure"'},"")],-1),c=e("ul",null,[e("li",null,"If you are using a CDN, please make sure that the CDN provider provides WebSocket service and that WebSocket is enabled"),e("li",null,[n("Confirm that you are using a reverse proxy requires special configuration of the WebSocket for the "),e("code",null,"/ws"),n(" and "),e("code",null,"/terminal"),n(" paths, you can "),e("a",{href:"/en_US/guide/dashboard.html#configure-reverse-proxy"},"click here"),n(" to see the reverse proxy configuration")])],-1),l=[r,c];function s(d,u,h,m,f,_){return t(),o("div",null,l)}const k=a(i,[["render",s]]);export{g as __pageData,k as default};
diff --git a/assets/en_US_guide_q4.md.caed5d01.lean.js b/assets/en_US_guide_q4.md.20525ba9.lean.js
similarity index 94%
rename from assets/en_US_guide_q4.md.caed5d01.lean.js
rename to assets/en_US_guide_q4.md.20525ba9.lean.js
index 731b9eff..cd5f17b8 100644
--- a/assets/en_US_guide_q4.md.caed5d01.lean.js
+++ b/assets/en_US_guide_q4.md.20525ba9.lean.js
@@ -1 +1 @@
-import{_ as a,o as t,c as o,z as e,a as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1714697355000}'),i={name:"en_US/guide/q4.md"},r=e("h4",{id:"real-time-channel-disconnection-online-terminal-connection-failure",tabindex:"-1"},[n("Real-time channel disconnection/online terminal connection failure "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection-online-terminal-connection-failure","aria-label":'Permalink to "Real-time channel disconnection/online terminal connection failure"'},"")],-1),c=e("ul",null,[e("li",null,"If you are using a CDN, please make sure that the CDN provider provides WebSocket service and that WebSocket is enabled"),e("li",null,[n("Confirm that you are using a reverse proxy requires special configuration of the WebSocket for the "),e("code",null,"/ws"),n(" and "),e("code",null,"/terminal"),n(" paths, you can "),e("a",{href:"/en_US/guide/dashboard.html#configure-reverse-proxy"},"click here"),n(" to see the reverse proxy configuration")])],-1),l=[r,c];function s(d,u,h,m,f,_){return t(),o("div",null,l)}const k=a(i,[["render",s]]);export{g as __pageData,k as default};
+import{_ as a,o as t,c as o,z as e,a as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1715016176000}'),i={name:"en_US/guide/q4.md"},r=e("h4",{id:"real-time-channel-disconnection-online-terminal-connection-failure",tabindex:"-1"},[n("Real-time channel disconnection/online terminal connection failure "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection-online-terminal-connection-failure","aria-label":'Permalink to "Real-time channel disconnection/online terminal connection failure"'},"")],-1),c=e("ul",null,[e("li",null,"If you are using a CDN, please make sure that the CDN provider provides WebSocket service and that WebSocket is enabled"),e("li",null,[n("Confirm that you are using a reverse proxy requires special configuration of the WebSocket for the "),e("code",null,"/ws"),n(" and "),e("code",null,"/terminal"),n(" paths, you can "),e("a",{href:"/en_US/guide/dashboard.html#configure-reverse-proxy"},"click here"),n(" to see the reverse proxy configuration")])],-1),l=[r,c];function s(d,u,h,m,f,_){return t(),o("div",null,l)}const k=a(i,[["render",s]]);export{g as __pageData,k as default};
diff --git a/assets/en_US_guide_q5.md.7a46387a.js b/assets/en_US_guide_q5.md.1eac383c.js
similarity index 94%
rename from assets/en_US_guide_q5.md.7a46387a.js
rename to assets/en_US_guide_q5.md.1eac383c.js
index eabe68f3..be5bcc92 100644
--- a/assets/en_US_guide_q5.md.7a46387a.js
+++ b/assets/en_US_guide_q5.md.1eac383c.js
@@ -1 +1 @@
-import{_ as a,o,c as r,z as e,a as t}from"./chunks/framework.44fd0451.js";const w=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1714697355000}'),s={name:"en_US/guide/q5.md"},n=e("h4",{id:"how-do-i-migrate-my-data-to-the-new-server-and-restore-my-backups",tabindex:"-1"},[t("How do I migrate my data to the new server and restore my backups? "),e("a",{class:"header-anchor",href:"#how-do-i-migrate-my-data-to-the-new-server-and-restore-my-backups","aria-label":'Permalink to "How do I migrate my data to the new server and restore my backups?"'},"")],-1),d=e("ol",null,[e("li",null,[t("First use the one-click script and select "),e("code",null,"Stop Panel")]),e("li",null,[t("Compress the "),e("code",null,"/opt/nezha"),t(" folder to the same path as the new server")]),e("li",null,[t("Run the one-click script in the new server, select "),e("code",null,"Launch Panel")])],-1),l=[n,d];function c(i,h,m,p,u,_){return o(),r("div",null,l)}const k=a(s,[["render",c]]);export{w as __pageData,k as default};
+import{_ as a,o,c as r,z as e,a as t}from"./chunks/framework.44fd0451.js";const w=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1715016176000}'),s={name:"en_US/guide/q5.md"},n=e("h4",{id:"how-do-i-migrate-my-data-to-the-new-server-and-restore-my-backups",tabindex:"-1"},[t("How do I migrate my data to the new server and restore my backups? "),e("a",{class:"header-anchor",href:"#how-do-i-migrate-my-data-to-the-new-server-and-restore-my-backups","aria-label":'Permalink to "How do I migrate my data to the new server and restore my backups?"'},"")],-1),d=e("ol",null,[e("li",null,[t("First use the one-click script and select "),e("code",null,"Stop Panel")]),e("li",null,[t("Compress the "),e("code",null,"/opt/nezha"),t(" folder to the same path as the new server")]),e("li",null,[t("Run the one-click script in the new server, select "),e("code",null,"Launch Panel")])],-1),l=[n,d];function c(i,h,m,p,u,_){return o(),r("div",null,l)}const k=a(s,[["render",c]]);export{w as __pageData,k as default};
diff --git a/assets/en_US_guide_q5.md.7a46387a.lean.js b/assets/en_US_guide_q5.md.1eac383c.lean.js
similarity index 94%
rename from assets/en_US_guide_q5.md.7a46387a.lean.js
rename to assets/en_US_guide_q5.md.1eac383c.lean.js
index eabe68f3..be5bcc92 100644
--- a/assets/en_US_guide_q5.md.7a46387a.lean.js
+++ b/assets/en_US_guide_q5.md.1eac383c.lean.js
@@ -1 +1 @@
-import{_ as a,o,c as r,z as e,a as t}from"./chunks/framework.44fd0451.js";const w=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1714697355000}'),s={name:"en_US/guide/q5.md"},n=e("h4",{id:"how-do-i-migrate-my-data-to-the-new-server-and-restore-my-backups",tabindex:"-1"},[t("How do I migrate my data to the new server and restore my backups? "),e("a",{class:"header-anchor",href:"#how-do-i-migrate-my-data-to-the-new-server-and-restore-my-backups","aria-label":'Permalink to "How do I migrate my data to the new server and restore my backups?"'},"")],-1),d=e("ol",null,[e("li",null,[t("First use the one-click script and select "),e("code",null,"Stop Panel")]),e("li",null,[t("Compress the "),e("code",null,"/opt/nezha"),t(" folder to the same path as the new server")]),e("li",null,[t("Run the one-click script in the new server, select "),e("code",null,"Launch Panel")])],-1),l=[n,d];function c(i,h,m,p,u,_){return o(),r("div",null,l)}const k=a(s,[["render",c]]);export{w as __pageData,k as default};
+import{_ as a,o,c as r,z as e,a as t}from"./chunks/framework.44fd0451.js";const w=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1715016176000}'),s={name:"en_US/guide/q5.md"},n=e("h4",{id:"how-do-i-migrate-my-data-to-the-new-server-and-restore-my-backups",tabindex:"-1"},[t("How do I migrate my data to the new server and restore my backups? "),e("a",{class:"header-anchor",href:"#how-do-i-migrate-my-data-to-the-new-server-and-restore-my-backups","aria-label":'Permalink to "How do I migrate my data to the new server and restore my backups?"'},"")],-1),d=e("ol",null,[e("li",null,[t("First use the one-click script and select "),e("code",null,"Stop Panel")]),e("li",null,[t("Compress the "),e("code",null,"/opt/nezha"),t(" folder to the same path as the new server")]),e("li",null,[t("Run the one-click script in the new server, select "),e("code",null,"Launch Panel")])],-1),l=[n,d];function c(i,h,m,p,u,_){return o(),r("div",null,l)}const k=a(s,[["render",c]]);export{w as __pageData,k as default};
diff --git a/assets/en_US_guide_q6.md.e7c1916d.js b/assets/en_US_guide_q6.md.3b011902.js
similarity index 95%
rename from assets/en_US_guide_q6.md.e7c1916d.js
rename to assets/en_US_guide_q6.md.3b011902.js
index ef4f2cf4..959439aa 100644
--- a/assets/en_US_guide_q6.md.e7c1916d.js
+++ b/assets/en_US_guide_q6.md.3b011902.js
@@ -1 +1 @@
-import{_ as t,o as e,c as s,R as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1714697355000}'),o={name:"en_US/guide/q6.md"},i=a('How to set up a monthly reset of transfer statistics?
In the home page, the traffic statistics will be reset when the server is restarted.
If you want to set the traffic statistics to be reset once a month, you can do it like this:
- Go to the
Notification
page of the admin panel - Refer to this document to create a monthly transfer statistics notification
- Return to the home page and you can see the monthly transfer statistics in the
Service
page, where the statistics will not be reset when the server is restarted
TIP
This method can be set to any period, including and not limited to hourly/daily/weekly/monthly/yearly reset transfer statistics, very flexible!
',4),n=[i];function r(c,l,h,d,f,_){return e(),s("div",null,n)}const u=t(o,[["render",r]]);export{m as __pageData,u as default};
+import{_ as t,o as e,c as s,R as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1715016176000}'),o={name:"en_US/guide/q6.md"},i=a('How to set up a monthly reset of transfer statistics?
In the home page, the traffic statistics will be reset when the server is restarted.
If you want to set the traffic statistics to be reset once a month, you can do it like this:
- Go to the
Notification
page of the admin panel - Refer to this document to create a monthly transfer statistics notification
- Return to the home page and you can see the monthly transfer statistics in the
Service
page, where the statistics will not be reset when the server is restarted
TIP
This method can be set to any period, including and not limited to hourly/daily/weekly/monthly/yearly reset transfer statistics, very flexible!
',4),n=[i];function r(c,l,h,d,f,_){return e(),s("div",null,n)}const u=t(o,[["render",r]]);export{m as __pageData,u as default};
diff --git a/assets/en_US_guide_q6.md.e7c1916d.lean.js b/assets/en_US_guide_q6.md.3b011902.lean.js
similarity index 84%
rename from assets/en_US_guide_q6.md.e7c1916d.lean.js
rename to assets/en_US_guide_q6.md.3b011902.lean.js
index 645d45b8..f16825d2 100644
--- a/assets/en_US_guide_q6.md.e7c1916d.lean.js
+++ b/assets/en_US_guide_q6.md.3b011902.lean.js
@@ -1 +1 @@
-import{_ as t,o as e,c as s,R as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1714697355000}'),o={name:"en_US/guide/q6.md"},i=a("",4),n=[i];function r(c,l,h,d,f,_){return e(),s("div",null,n)}const u=t(o,[["render",r]]);export{m as __pageData,u as default};
+import{_ as t,o as e,c as s,R as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1715016176000}'),o={name:"en_US/guide/q6.md"},i=a("",4),n=[i];function r(c,l,h,d,f,_){return e(),s("div",null,n)}const u=t(o,[["render",r]]);export{m as __pageData,u as default};
diff --git a/assets/en_US_guide_q7.md.10feeffb.js b/assets/en_US_guide_q7.md.1a176b96.js
similarity index 97%
rename from assets/en_US_guide_q7.md.10feeffb.js
rename to assets/en_US_guide_q7.md.1a176b96.js
index fd69063c..e16137e3 100644
--- a/assets/en_US_guide_q7.md.10feeffb.js
+++ b/assets/en_US_guide_q7.md.1a176b96.js
@@ -1 +1 @@
-import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1714697355000}'),i={name:"en_US/guide/q7.md"},n=a('Customize Agent
Customize the NIC and hard drive partitions to be monitored
- Run
/opt/nezha/agent/nezha-agent --edit-agent-config
to select a custom NIC and partition, and then restart Agent
Other Flags
Run ./nezha-agent --help
to view supported flags,if you are already using the one-click script, you can edit /etc/systemd/system/nezha-agent.service
,at the end of this line ExecStart=
add:
--report-delay
System information reporting interval, default is 1 second, can be set to 3 to reduce the system resource usage on the agent side (configuration range 1-4)--skip-conn
Not monitoring the number of connections, if it is a server with a large number of connections, the CPU usage will be high. It is recommended to set this to reduce CPU usage--skip-procs
Disable monitoring the number of processes can also reduce CPU and memory usage--disable-auto-update
Disable Automatic Update Agent (security feature)--disable-force-update
Disable Forced Update Agent (security feature)--disable-command-execute
Disable execution of scheduled tasks, disallow WebShell (security feature)--tls
Enable SSL/TLS encryption (If you are using nginx to reverse proxy Agent´s grpc connections, and if nginx has SSL/TLS enabled, you need to enable this configuration)
',6),s=[n];function r(d,c,l,u,h,g){return t(),o("div",null,s)}const f=e(i,[["render",r]]);export{p as __pageData,f as default};
+import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1715016176000}'),i={name:"en_US/guide/q7.md"},n=a('Customize Agent
Customize the NIC and hard drive partitions to be monitored
- Run
/opt/nezha/agent/nezha-agent --edit-agent-config
to select a custom NIC and partition, and then restart Agent
Other Flags
Run ./nezha-agent --help
to view supported flags,if you are already using the one-click script, you can edit /etc/systemd/system/nezha-agent.service
,at the end of this line ExecStart=
add:
--report-delay
System information reporting interval, default is 1 second, can be set to 3 to reduce the system resource usage on the agent side (configuration range 1-4)--skip-conn
Not monitoring the number of connections, if it is a server with a large number of connections, the CPU usage will be high. It is recommended to set this to reduce CPU usage--skip-procs
Disable monitoring the number of processes can also reduce CPU and memory usage--disable-auto-update
Disable Automatic Update Agent (security feature)--disable-force-update
Disable Forced Update Agent (security feature)--disable-command-execute
Disable execution of scheduled tasks, disallow WebShell (security feature)--tls
Enable SSL/TLS encryption (If you are using nginx to reverse proxy Agent´s grpc connections, and if nginx has SSL/TLS enabled, you need to enable this configuration)
',6),s=[n];function r(d,c,l,u,h,g){return t(),o("div",null,s)}const f=e(i,[["render",r]]);export{p as __pageData,f as default};
diff --git a/assets/en_US_guide_q7.md.10feeffb.lean.js b/assets/en_US_guide_q7.md.1a176b96.lean.js
similarity index 84%
rename from assets/en_US_guide_q7.md.10feeffb.lean.js
rename to assets/en_US_guide_q7.md.1a176b96.lean.js
index 1a093cc9..8797dfe7 100644
--- a/assets/en_US_guide_q7.md.10feeffb.lean.js
+++ b/assets/en_US_guide_q7.md.1a176b96.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1714697355000}'),i={name:"en_US/guide/q7.md"},n=a("",6),s=[n];function r(d,c,l,u,h,g){return t(),o("div",null,s)}const f=e(i,[["render",r]]);export{p as __pageData,f as default};
+import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1715016176000}'),i={name:"en_US/guide/q7.md"},n=a("",6),s=[n];function r(d,c,l,u,h,g){return t(),o("div",null,s)}const f=e(i,[["render",r]]);export{p as __pageData,f as default};
diff --git a/assets/en_US_guide_q8.md.ffa7022d.js b/assets/en_US_guide_q8.md.2eafb117.js
similarity index 98%
rename from assets/en_US_guide_q8.md.ffa7022d.js
rename to assets/en_US_guide_q8.md.2eafb117.js
index 3420936f..5e093c40 100644
--- a/assets/en_US_guide_q8.md.ffa7022d.js
+++ b/assets/en_US_guide_q8.md.2eafb117.js
@@ -1,4 +1,4 @@
-import{_ as e,o as a,c as o,R as c}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1714697355000}'),t={name:"en_US/guide/q8.md"},s=c(`Example Config:
yamlOauth2:
+import{_ as e,o as a,c as o,R as c}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1715016176000}'),t={name:"en_US/guide/q8.md"},s=c(`Example Config:
yamlOauth2:
Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
diff --git a/assets/en_US_guide_q8.md.ffa7022d.lean.js b/assets/en_US_guide_q8.md.2eafb117.lean.js
similarity index 84%
rename from assets/en_US_guide_q8.md.ffa7022d.lean.js
rename to assets/en_US_guide_q8.md.2eafb117.lean.js
index 0b1c0362..35fdca70 100644
--- a/assets/en_US_guide_q8.md.ffa7022d.lean.js
+++ b/assets/en_US_guide_q8.md.2eafb117.lean.js
@@ -1 +1 @@
-import{_ as e,o as a,c as o,R as c}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1714697355000}'),t={name:"en_US/guide/q8.md"},s=c("",7),n=[s];function l(d,p,i,r,D,h){return a(),o("div",null,n)}const y=e(t,[["render",l]]);export{f as __pageData,y as default};
+import{_ as e,o as a,c as o,R as c}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1715016176000}'),t={name:"en_US/guide/q8.md"},s=c("",7),n=[s];function l(d,p,i,r,D,h){return a(),o("div",null,n)}const y=e(t,[["render",l]]);export{f as __pageData,y as default};
diff --git a/assets/en_US_guide_servers.md.02668fdf.js b/assets/en_US_guide_servers.md.39b7a1b4.js
similarity index 99%
rename from assets/en_US_guide_servers.md.02668fdf.js
rename to assets/en_US_guide_servers.md.39b7a1b4.js
index 70238f81..bc59abfb 100644
--- a/assets/en_US_guide_servers.md.02668fdf.js
+++ b/assets/en_US_guide_servers.md.39b7a1b4.js
@@ -1,4 +1,4 @@
-import{_ as e,o as a,c as s,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Servers","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1714697355000}'),n={name:"en_US/guide/servers.md"},l=o(`Servers
Introduction
The Servers area is responsible for managing the Agent, the most basic area in Nezha Monitoring, and the basis for other functions.
Add a server
The first step is to add a servers, which can be customized with names, groups, display index and notes.
Servers in the same group will be displayed in groups in supported themes, and notes will only be displayed in the admin panel, no need to worry about leaking information.
Install Agent
Please refer to the previous article: Install Agent
We recommend using one-click installation, that is, after configuring the communication domain name, click the button on the column one-click installation and copy it to the monitored servers for installation.
Forced Updates
The flags related to the update of the Agent are: --disable-auto-update
and --disable-force-update
. Please refer to Customize Agent
By default, the Agent is updated automatically, but when the user turns off automatic updates, the specified servers can also be selected for forced updates.
This feature does not take effect when -disable-force-update
is turned on.
Data List
- Version number: Record the current version of Agent
- Secret: Used when configuring the Agent
- One-Click Installation: A more convenient way to install Agent
- Manage: WebShell on the left, Edit in the middle, Delete on the right
Webshell
This feature does not take effect when disable-command-execute
is turned on.
Both Linux and Windows are available and can be pasted using Ctrl+Shift+V.
For connection failure, please refer to Real-time channel disconnection/online terminal connection failure.
Note that in theWebShell function, the Agent also connects to the Domain names for public access via WebSocket, not via grpc.
DDNS
DDNS feature is suitable for servers that have dynamic IP addresses. When a different IP is reported by Agent, Dashboard will update DNS record automatically using configured settings.
Why choose Nezha's DDNS feature
- Manage your DDNS configuration centrally, without deploying a single service on every server.
- Save your credentials only on the Dashboard server to prevent data leaks.
Configuration description
Currently, DDNS supports two types of configurations: Single and Multiple. If Single is chosen, all Agent servers will use the same configuration to update DNS records, whereas selecting Multiple allows each server to use a specified configuration.
Single
yamlDDNS:
+import{_ as e,o as a,c as s,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Servers","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1715016176000}'),n={name:"en_US/guide/servers.md"},l=o(`Servers
Introduction
The Servers area is responsible for managing the Agent, the most basic area in Nezha Monitoring, and the basis for other functions.
Add a server
The first step is to add a servers, which can be customized with names, groups, display index and notes.
Servers in the same group will be displayed in groups in supported themes, and notes will only be displayed in the admin panel, no need to worry about leaking information.
Install Agent
Please refer to the previous article: Install Agent
We recommend using one-click installation, that is, after configuring the communication domain name, click the button on the column one-click installation and copy it to the monitored servers for installation.
Forced Updates
The flags related to the update of the Agent are: --disable-auto-update
and --disable-force-update
. Please refer to Customize Agent
By default, the Agent is updated automatically, but when the user turns off automatic updates, the specified servers can also be selected for forced updates.
This feature does not take effect when -disable-force-update
is turned on.
Data List
- Version number: Record the current version of Agent
- Secret: Used when configuring the Agent
- One-Click Installation: A more convenient way to install Agent
- Manage: WebShell on the left, Edit in the middle, Delete on the right
Webshell
This feature does not take effect when disable-command-execute
is turned on.
Both Linux and Windows are available and can be pasted using Ctrl+Shift+V.
For connection failure, please refer to Real-time channel disconnection/online terminal connection failure.
Note that in theWebShell function, the Agent also connects to the Domain names for public access via WebSocket, not via grpc.
DDNS
DDNS feature is suitable for servers that have dynamic IP addresses. When a different IP is reported by Agent, Dashboard will update DNS record automatically using configured settings.
Why choose Nezha's DDNS feature
- Manage your DDNS configuration centrally, without deploying a single service on every server.
- Save your credentials only on the Dashboard server to prevent data leaks.
Configuration description
Currently, DDNS supports two types of configurations: Single and Multiple. If Single is chosen, all Agent servers will use the same configuration to update DNS records, whereas selecting Multiple allows each server to use a specified configuration.
Single
yamlDDNS:
Enable: true
Provider: "webhook"
AccessID: ""
diff --git a/assets/en_US_guide_servers.md.02668fdf.lean.js b/assets/en_US_guide_servers.md.39b7a1b4.lean.js
similarity index 70%
rename from assets/en_US_guide_servers.md.02668fdf.lean.js
rename to assets/en_US_guide_servers.md.39b7a1b4.lean.js
index b8cd28de..6d56ae97 100644
--- a/assets/en_US_guide_servers.md.02668fdf.lean.js
+++ b/assets/en_US_guide_servers.md.39b7a1b4.lean.js
@@ -1 +1 @@
-import{_ as e,o as a,c as s,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Servers","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1714697355000}'),n={name:"en_US/guide/servers.md"},l=o("",64),t=[l];function r(p,i,c,d,h,u){return a(),s("div",null,t)}const b=e(n,[["render",r]]);export{y as __pageData,b as default};
+import{_ as e,o as a,c as s,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Servers","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1715016176000}'),n={name:"en_US/guide/servers.md"},l=o("",64),t=[l];function r(p,i,c,d,h,u){return a(),s("div",null,t)}const b=e(n,[["render",r]]);export{y as __pageData,b as default};
diff --git a/assets/en_US_guide_services.md.2c7593b0.js b/assets/en_US_guide_services.md.fd084d4f.js
similarity index 98%
rename from assets/en_US_guide_services.md.2c7593b0.js
rename to assets/en_US_guide_services.md.fd084d4f.js
index 8dc9dc83..77e57e84 100644
--- a/assets/en_US_guide_services.md.2c7593b0.js
+++ b/assets/en_US_guide_services.md.fd084d4f.js
@@ -1 +1 @@
-import{_ as e,o as t,c as o,R as i}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1714697355000}'),n={name:"en_US/guide/services.md"},a=i('Service area is a function setting area for setting up Agents to monitor external websites or servers
The monitoring results can be viewed on the "Services" page in the home page
How to use
To add a new monitor, you can go to the "Services" page in the administration panel and click "Add Service Monitor".
To add a service monitor, you need to complete the following settings:
Name
- Customize a name
Type
- Select a monitoring type. Nezha currently supports three monitoring types: "HTTP-GET", "ICMP-Ping" and "TCP-Ping".
Target
- Depending on the type you choose, the target is set in different ways
HTTP-GET
: Selecting this type, you should enter a URL as the target, the URL should be added with http://
or https://
If your target URL is https://
, it will also monitor the SSL certificate of that URL and trigger a notification when the SSL certificate expires or changes.
For example: https://example.com
ICMP-Ping
: When selecting this type, you should enter a domain name or IP without a port number
For example: 1.1.1.1 or example.com
TCP-Ping
: When selecting this type, you should enter a domain name or IP and include the port number
For example: 1.1.1.1:80 or example.com:22
Interval
: Sets the time interval in seconds between each time Agent sends requests to the target
Coverage
: Select a rule to determine which Agents to use to send requests to the target
Specific Servers
: Use with coverage to select the Agent to be excluded from the rule
Notification Group
: Select the notification method you have set up on the "Notification" page. Click here for more information
Enable Failure Notification
: Select whether to receive target failure notifications as needed, default is inactive
After setting, click "Add" and you are done.
Wait for a moment to go to the "Services" page on the home page to view the monitoring results
Notification of delay changes
Nezha Monitoring monitors and statistics the delay between the Agent and the target server, and sends notifications in case of significant changes
Use this feature to help you monitor your server's routes for changes
Enable delay notifications
:When enabled, notifications will be sent when the Agent to target server delay is higher than the Max delay
or lower than the Min delay
Management Monitor
To manage existing service monitoring, you can go to the "Services" page in the administration panel
Select a monitoring configuration and click the icon on the right to edit or delete it
',15),r=[a];function c(s,l,d,h,u,p){return t(),o("div",null,r)}const f=e(n,[["render",c]]);export{m as __pageData,f as default};
+import{_ as e,o as t,c as o,R as i}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1715016176000}'),n={name:"en_US/guide/services.md"},a=i('Service area is a function setting area for setting up Agents to monitor external websites or servers
The monitoring results can be viewed on the "Services" page in the home page
How to use
To add a new monitor, you can go to the "Services" page in the administration panel and click "Add Service Monitor".
To add a service monitor, you need to complete the following settings:
Name
- Customize a name
Type
- Select a monitoring type. Nezha currently supports three monitoring types: "HTTP-GET", "ICMP-Ping" and "TCP-Ping".
Target
- Depending on the type you choose, the target is set in different ways
HTTP-GET
: Selecting this type, you should enter a URL as the target, the URL should be added with http://
or https://
If your target URL is https://
, it will also monitor the SSL certificate of that URL and trigger a notification when the SSL certificate expires or changes.
For example: https://example.com
ICMP-Ping
: When selecting this type, you should enter a domain name or IP without a port number
For example: 1.1.1.1 or example.com
TCP-Ping
: When selecting this type, you should enter a domain name or IP and include the port number
For example: 1.1.1.1:80 or example.com:22
Interval
: Sets the time interval in seconds between each time Agent sends requests to the target
Coverage
: Select a rule to determine which Agents to use to send requests to the target
Specific Servers
: Use with coverage to select the Agent to be excluded from the rule
Notification Group
: Select the notification method you have set up on the "Notification" page. Click here for more information
Enable Failure Notification
: Select whether to receive target failure notifications as needed, default is inactive
After setting, click "Add" and you are done.
Wait for a moment to go to the "Services" page on the home page to view the monitoring results
Notification of delay changes
Nezha Monitoring monitors and statistics the delay between the Agent and the target server, and sends notifications in case of significant changes
Use this feature to help you monitor your server's routes for changes
Enable delay notifications
:When enabled, notifications will be sent when the Agent to target server delay is higher than the Max delay
or lower than the Min delay
Management Monitor
To manage existing service monitoring, you can go to the "Services" page in the administration panel
Select a monitoring configuration and click the icon on the right to edit or delete it
',15),r=[a];function c(s,l,d,h,u,p){return t(),o("div",null,r)}const f=e(n,[["render",c]]);export{m as __pageData,f as default};
diff --git a/assets/en_US_guide_services.md.2c7593b0.lean.js b/assets/en_US_guide_services.md.fd084d4f.lean.js
similarity index 85%
rename from assets/en_US_guide_services.md.2c7593b0.lean.js
rename to assets/en_US_guide_services.md.fd084d4f.lean.js
index fe11a92f..3517a620 100644
--- a/assets/en_US_guide_services.md.2c7593b0.lean.js
+++ b/assets/en_US_guide_services.md.fd084d4f.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as o,R as i}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1714697355000}'),n={name:"en_US/guide/services.md"},a=i("",15),r=[a];function c(s,l,d,h,u,p){return t(),o("div",null,r)}const f=e(n,[["render",c]]);export{m as __pageData,f as default};
+import{_ as e,o as t,c as o,R as i}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1715016176000}'),n={name:"en_US/guide/services.md"},a=i("",15),r=[a];function c(s,l,d,h,u,p){return t(),o("div",null,r)}const f=e(n,[["render",c]]);export{m as __pageData,f as default};
diff --git a/assets/en_US_guide_settings.md.33285167.js b/assets/en_US_guide_settings.md.cd0fb1df.js
similarity index 99%
rename from assets/en_US_guide_settings.md.33285167.js
rename to assets/en_US_guide_settings.md.cd0fb1df.js
index 2f6f694b..cec117f2 100644
--- a/assets/en_US_guide_settings.md.33285167.js
+++ b/assets/en_US_guide_settings.md.cd0fb1df.js
@@ -1,4 +1,4 @@
-import{_ as s,o as a,c as n,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1714697355000}'),e={name:"en_US/guide/settings.md"},l=o(`Site Title
You can customize your site title here
Admin List
If you have changed your Github, Gitlab, Jihulab, Gitee username, you can change it in this item, otherwise you can't log in, please separate multiple users with commas: user1,user2
To change your administrator account, please go to /opt/nezha/dashboard/data/config.yaml
to set the new administrator Client ID
and Client Secret
.
Theme
Select the home page theme here, and update the panel if there is not an existing theme in the options
Language
Nezha Monitoring currently supports the following languages:
- 简体中文
- English
- Español

We welcome corrections to translations and contributions of additional languages
Custom code (style, script)
Change logo, change color tone, add statistics code, etc.
WARNING
The custom code only takes effect in the visitor's home page, not in the admin panel.
Since the code of different themes is different, if you really need to modify the content of the admin panel, please enter Docker to changes it by yourself.
Example of changing the default theme progress bar color
html<style>
+import{_ as s,o as a,c as n,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1715016176000}'),e={name:"en_US/guide/settings.md"},l=o(`Site Title
You can customize your site title here
Admin List
If you have changed your Github, Gitlab, Jihulab, Gitee username, you can change it in this item, otherwise you can't log in, please separate multiple users with commas: user1,user2
To change your administrator account, please go to /opt/nezha/dashboard/data/config.yaml
to set the new administrator Client ID
and Client Secret
.
Theme
Select the home page theme here, and update the panel if there is not an existing theme in the options
Language
Nezha Monitoring currently supports the following languages:
- 简体中文
- English
- Español

We welcome corrections to translations and contributions of additional languages
Custom code (style, script)
Change logo, change color tone, add statistics code, etc.
WARNING
The custom code only takes effect in the visitor's home page, not in the admin panel.
Since the code of different themes is different, if you really need to modify the content of the admin panel, please enter Docker to changes it by yourself.
Example of changing the default theme progress bar color
html<style>
.ui.fine.progress> .bar {
background-color: pink !important;
}
diff --git a/assets/en_US_guide_settings.md.33285167.lean.js b/assets/en_US_guide_settings.md.cd0fb1df.lean.js
similarity index 85%
rename from assets/en_US_guide_settings.md.33285167.lean.js
rename to assets/en_US_guide_settings.md.cd0fb1df.lean.js
index 8e5a735d..56ae1611 100644
--- a/assets/en_US_guide_settings.md.33285167.lean.js
+++ b/assets/en_US_guide_settings.md.cd0fb1df.lean.js
@@ -1 +1 @@
-import{_ as s,o as a,c as n,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1714697355000}'),e={name:"en_US/guide/settings.md"},l=o("",37),t=[l];function p(r,c,i,y,D,F){return a(),n("div",null,t)}const u=s(e,[["render",p]]);export{d as __pageData,u as default};
+import{_ as s,o as a,c as n,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1715016176000}'),e={name:"en_US/guide/settings.md"},l=o("",37),t=[l];function p(r,c,i,y,D,F){return a(),n("div",null,t)}const u=s(e,[["render",p]]);export{d as __pageData,u as default};
diff --git a/assets/en_US_guide_tasks.md.456ec638.js b/assets/en_US_guide_tasks.md.be234a99.js
similarity index 98%
rename from assets/en_US_guide_tasks.md.456ec638.js
rename to assets/en_US_guide_tasks.md.be234a99.js
index 89251b9d..91f8ad8a 100644
--- a/assets/en_US_guide_tasks.md.456ec638.js
+++ b/assets/en_US_guide_tasks.md.be234a99.js
@@ -1 +1 @@
-import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1714697355000}'),i={name:"en_US/guide/tasks.md"},s=a('In the task area, you can set up scheduled tasks, Trigger tasks, and multi-server batch execution tasks
Nezha monitoring supports pushing commands to the Agent for execution, so this feature is very flexible and can be used to periodically back up the server in conjunction with restic, rclone. Periodically restart a service to reset the network connection. It can also be used with notifications to perform a task when a notification is triggered, such as running a script when the CPU is at high occupancy for a long period of time.
How to use
Go to the "Tasks" page of the admin panel and click "Add Scheduled Task"
To add a scheduled task you need to make the following settings:
Name
- Customize a task name
Task Type
- select the type of task
Scheduled Tasks - Tasks are executed periodically at the scheduled time set below
Trigger Tasks - Tasks that are triggered only by API or notification rules and are executed once per trigger
Cron Expression
- (Not valid when using the trigger task type) Set schedule time, the Cron Expression is like:: * * * * * *
sec min hour day month week
, see details in CRON Expression Format
For example: 0 0 3 * * *
is Every day at 3 o'clock
Command
- Just like writing shell/bat scripts, but line wrap is not recommended, Multiple Commands should be connected with &&/&
For example, to execute a periodic reboot command, you can type reboot
here
Coverage
and Specific Servers
- Similar to the settings on the Services page, select rules to determine which Agents need to execute scheduled tasks
When using the trigger task type, you can select Only servers that are included in the notification rule
Notification Group
- Select the notification method you have set up on the "Notification" page. Click here for more information
Send Success Notification
- When this item is activated, a message notification will be triggered when the task is successfully executed
Manage tasks
To manage existing scheduled tasks, you can go to the "Tasks" page in the administration panel
Select a task configuration and the three icons on the right, which are:
Execute Now
- When clicked, the scheduled time will be ignored and the task will be executed immediatelyEdit
- Click to modify the task configurationDelete
- Delete this scheduled task
FAQ
- Command not found
Command not found may cause by missing PATH environment variable, for Linux Server, you may try adding source ~/.bashrc
at beginning of your command or execute by absolute path.
',10),n=[s];function r(c,d,l,h,u,p){return t(),o("div",null,n)}const k=e(i,[["render",r]]);export{g as __pageData,k as default};
+import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1715016176000}'),i={name:"en_US/guide/tasks.md"},s=a('In the task area, you can set up scheduled tasks, Trigger tasks, and multi-server batch execution tasks
Nezha monitoring supports pushing commands to the Agent for execution, so this feature is very flexible and can be used to periodically back up the server in conjunction with restic, rclone. Periodically restart a service to reset the network connection. It can also be used with notifications to perform a task when a notification is triggered, such as running a script when the CPU is at high occupancy for a long period of time.
How to use
Go to the "Tasks" page of the admin panel and click "Add Scheduled Task"
To add a scheduled task you need to make the following settings:
Name
- Customize a task name
Task Type
- select the type of task
Scheduled Tasks - Tasks are executed periodically at the scheduled time set below
Trigger Tasks - Tasks that are triggered only by API or notification rules and are executed once per trigger
Cron Expression
- (Not valid when using the trigger task type) Set schedule time, the Cron Expression is like:: * * * * * *
sec min hour day month week
, see details in CRON Expression Format
For example: 0 0 3 * * *
is Every day at 3 o'clock
Command
- Just like writing shell/bat scripts, but line wrap is not recommended, Multiple Commands should be connected with &&/&
For example, to execute a periodic reboot command, you can type reboot
here
Coverage
and Specific Servers
- Similar to the settings on the Services page, select rules to determine which Agents need to execute scheduled tasks
When using the trigger task type, you can select Only servers that are included in the notification rule
Notification Group
- Select the notification method you have set up on the "Notification" page. Click here for more information
Send Success Notification
- When this item is activated, a message notification will be triggered when the task is successfully executed
Manage tasks
To manage existing scheduled tasks, you can go to the "Tasks" page in the administration panel
Select a task configuration and the three icons on the right, which are:
Execute Now
- When clicked, the scheduled time will be ignored and the task will be executed immediatelyEdit
- Click to modify the task configurationDelete
- Delete this scheduled task
FAQ
- Command not found
Command not found may cause by missing PATH environment variable, for Linux Server, you may try adding source ~/.bashrc
at beginning of your command or execute by absolute path.
',10),n=[s];function r(c,d,l,h,u,p){return t(),o("div",null,n)}const k=e(i,[["render",r]]);export{g as __pageData,k as default};
diff --git a/assets/en_US_guide_tasks.md.456ec638.lean.js b/assets/en_US_guide_tasks.md.be234a99.lean.js
similarity index 84%
rename from assets/en_US_guide_tasks.md.456ec638.lean.js
rename to assets/en_US_guide_tasks.md.be234a99.lean.js
index 39d4bf0b..c768ded3 100644
--- a/assets/en_US_guide_tasks.md.456ec638.lean.js
+++ b/assets/en_US_guide_tasks.md.be234a99.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1714697355000}'),i={name:"en_US/guide/tasks.md"},s=a("",10),n=[s];function r(c,d,l,h,u,p){return t(),o("div",null,n)}const k=e(i,[["render",r]]);export{g as __pageData,k as default};
+import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1715016176000}'),i={name:"en_US/guide/tasks.md"},s=a("",10),n=[s];function r(c,d,l,h,u,p){return t(),o("div",null,n)}const k=e(i,[["render",r]]);export{g as __pageData,k as default};
diff --git a/assets/en_US_index.md.6053725d.js b/assets/en_US_index.md.f46ccb32.js
similarity index 95%
rename from assets/en_US_index.md.6053725d.js
rename to assets/en_US_index.md.f46ccb32.js
index 87c4f5dc..3b08ae1e 100644
--- a/assets/en_US_index.md.6053725d.js
+++ b/assets/en_US_index.md.f46ccb32.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"A open source, lightweight server and website monitoring and O&M tool","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Preview","link":"https://ops.naibahq.com"},{"theme":"alt","text":"Learn More →","link":"/en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Support one-click script installation Dashboard and Agent services for easy use; mainstream systems such as Linux, Windows, MacOS, OpenWRT, etc. are all supported."},{"title":"Real-time monitoring","details":"Supports monitoring the system status of multiple servers simultaneously, including monitoring the status of web pages, ports, and SSL certificates. It also supports sending notifications when there are failures or when data reaches the limit. Multiple notification methods are supported, such as Telegram, email, and WeChat."},{"title":"Easy O&M","details":"Support WebSSH, support data monitoring, support setting scheduled tasks, and support batch execution of tasks on servers."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1714697355000}'),s={name:"en_US/index.md"};function n(i,o,r,l,p,d){return t(),a("div")}const m=e(s,[["render",n]]);export{u as __pageData,m as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"A open source, lightweight server and website monitoring and O&M tool","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Preview","link":"https://ops.naibahq.com"},{"theme":"alt","text":"Learn More →","link":"/en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Support one-click script installation Dashboard and Agent services for easy use; mainstream systems such as Linux, Windows, MacOS, OpenWRT, etc. are all supported."},{"title":"Real-time monitoring","details":"Supports monitoring the system status of multiple servers simultaneously, including monitoring the status of web pages, ports, and SSL certificates. It also supports sending notifications when there are failures or when data reaches the limit. Multiple notification methods are supported, such as Telegram, email, and WeChat."},{"title":"Easy O&M","details":"Support WebSSH, support data monitoring, support setting scheduled tasks, and support batch execution of tasks on servers."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1715016176000}'),s={name:"en_US/index.md"};function n(i,o,r,l,p,d){return t(),a("div")}const m=e(s,[["render",n]]);export{u as __pageData,m as default};
diff --git a/assets/en_US_index.md.6053725d.lean.js b/assets/en_US_index.md.f46ccb32.lean.js
similarity index 95%
rename from assets/en_US_index.md.6053725d.lean.js
rename to assets/en_US_index.md.f46ccb32.lean.js
index 87c4f5dc..3b08ae1e 100644
--- a/assets/en_US_index.md.6053725d.lean.js
+++ b/assets/en_US_index.md.f46ccb32.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"A open source, lightweight server and website monitoring and O&M tool","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Preview","link":"https://ops.naibahq.com"},{"theme":"alt","text":"Learn More →","link":"/en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Support one-click script installation Dashboard and Agent services for easy use; mainstream systems such as Linux, Windows, MacOS, OpenWRT, etc. are all supported."},{"title":"Real-time monitoring","details":"Supports monitoring the system status of multiple servers simultaneously, including monitoring the status of web pages, ports, and SSL certificates. It also supports sending notifications when there are failures or when data reaches the limit. Multiple notification methods are supported, such as Telegram, email, and WeChat."},{"title":"Easy O&M","details":"Support WebSSH, support data monitoring, support setting scheduled tasks, and support batch execution of tasks on servers."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1714697355000}'),s={name:"en_US/index.md"};function n(i,o,r,l,p,d){return t(),a("div")}const m=e(s,[["render",n]]);export{u as __pageData,m as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"A open source, lightweight server and website monitoring and O&M tool","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Preview","link":"https://ops.naibahq.com"},{"theme":"alt","text":"Learn More →","link":"/en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Support one-click script installation Dashboard and Agent services for easy use; mainstream systems such as Linux, Windows, MacOS, OpenWRT, etc. are all supported."},{"title":"Real-time monitoring","details":"Supports monitoring the system status of multiple servers simultaneously, including monitoring the status of web pages, ports, and SSL certificates. It also supports sending notifications when there are failures or when data reaches the limit. Multiple notification methods are supported, such as Telegram, email, and WeChat."},{"title":"Easy O&M","details":"Support WebSSH, support data monitoring, support setting scheduled tasks, and support batch execution of tasks on servers."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1715016176000}'),s={name:"en_US/index.md"};function n(i,o,r,l,p,d){return t(),a("div")}const m=e(s,[["render",n]]);export{u as __pageData,m as default};
diff --git a/assets/guide_agent.md.526ca89e.js b/assets/guide_agent.md.26027953.js
similarity index 76%
rename from assets/guide_agent.md.526ca89e.js
rename to assets/guide_agent.md.26027953.js
index 0a312739..cdab4c8d 100644
--- a/assets/guide_agent.md.526ca89e.js
+++ b/assets/guide_agent.md.26027953.js
@@ -1,4 +1,4 @@
-import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1714697355000}'),p={name:"guide/agent.md"},o=l(`哪吒监控的被控端服务被称为 Agent,本文档将介绍如何在被控端服务器上安装 Agent,并与 Dashboard 连接
TIP
Agent 二进制文件仓库地址为:https://github.com/nezhahq/agent/releases
一键安装 Agent
目前哪吒监控已支持在 Windows 和 Linux上一键安装 Agent,遵循本文档的步骤,你可以很轻松的在服务器上部署它
准备工作
你需要提前在管理面板中设置好通信域名,此域名不可以接入CDN,这里以示例通信域名 “data.example.com” 来做演示
进入后台管理面板,转到“设置”页,在“未接入 CDN 的面板服务器域名/IP”项中填入通信域名,然后点击"保存"
在 Linux 中一键安装 (Ubuntu、Debian、CentOS)
- 首先在管理面板中添加一台服务器
- 点击新添加的服务器旁,绿色的 Linux 图标按钮,复制一键安装命令
- 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线
在 Windows 中一键安装
- 首先在管理面板中添加一台服务器
- 点击新添加的服务器旁,绿色的 Windows 图标按钮,复制一键安装命令
- 进入 Windows 服务器,运行 PowerShell,在 PowerShell 中运行复制的安装命令
- 如遇到确认「执行策略变更」请选择 Y
- 等待安装完成后返回 Dashboard 主页查看服务器是否上线
WARNING
如果在 Powershell 中运行一键安装命令时遇到错误,请尝试下方的在 Windows 中手动安装 Agent
其他方式安装 Agent
在 Linux 中安装 Agent (Ubuntu、Debian、CentOS)
- 首先在管理面板中添加一台服务器
- 在被控服务器中,运行脚本(位于中国大陆的服务器请使用镜像):
bashcurl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
如果你的被控服务器位于中国大陆,可以使用镜像:
bashcurl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
- 选择“安装监控 Agent”
- 输入通信域名,如:”data.example.com“
- 输入面板通信端口( gRPC 端口),默认为 5555
- 输入 Agent 密钥,Agent 密钥在管理面板中添加服务器时生成,可以在管理面板中的“服务器”页中找到
- 等待安装完成后返回 Dashboard 主页查看服务器是否上线
在 其他 Linux 如 Alpine 使用 Openrc 的发行版 安装 Agent
本节内容由 unknown0054 贡献
- 修改 SERVER、SECRET、TLS 然后在 shell 中执行
shellcat >/etc/init.d/nezha-agent<< EOF
+import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1715016176000}'),p={name:"guide/agent.md"},o=l(`哪吒监控的被控端服务被称为 Agent,本文档将介绍如何在被控端服务器上安装 Agent,并与 Dashboard 连接
TIP
Agent 二进制文件仓库地址为:https://github.com/nezhahq/agent/releases
一键安装 Agent
目前哪吒监控已支持在 Windows 和 Linux上一键安装 Agent,遵循本文档的步骤,你可以很轻松的在服务器上部署它
准备工作
你需要提前在管理面板中设置好通信域名,此域名不可以接入CDN,这里以示例通信域名 “data.example.com” 来做演示
进入后台管理面板,转到“设置”页,在“未接入 CDN 的面板服务器域名/IP”项中填入通信域名,然后点击"保存"
在 Linux 中一键安装 (Ubuntu、Debian、CentOS)
- 首先在管理面板中添加一台服务器
- 点击新添加的服务器旁,绿色的 Linux 图标按钮,复制一键安装命令
- 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线
在 Windows 中一键安装
- 首先在管理面板中添加一台服务器
- 点击新添加的服务器旁,绿色的 Windows 图标按钮,复制一键安装命令
- 进入 Windows 服务器,运行 PowerShell,在 PowerShell 中运行复制的安装命令
- 如遇到确认「执行策略变更」请选择 Y
- 等待安装完成后返回 Dashboard 主页查看服务器是否上线
WARNING
如果在 Powershell 中运行一键安装命令时遇到错误,请尝试下方的在 Windows 中手动安装 Agent
其他方式安装 Agent
在 Linux 中安装 Agent (Ubuntu、Debian、CentOS)
点击展开/收起
- 首先在管理面板中添加一台服务器
- 在被控服务器中,运行脚本(位于中国大陆的服务器请使用镜像):
bashcurl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
如果你的被控服务器位于中国大陆,可以使用镜像:
bashcurl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
- 选择“安装监控 Agent”
- 输入通信域名,如:”data.example.com“
- 输入面板通信端口(gRPC 端口),默认为 5555
- 输入 Agent 密钥,Agent 密钥在管理面板中添加服务器时生成,可以在管理面板中的“服务器”页中找到
- 等待安装完成后返回 Dashboard 主页查看服务器是否上线
在 其他 Linux 如 Alpine 使用 Openrc 的发行版 安装 Agent
点击展开/收起
本节内容由 unknown0054 贡献
- 修改 SERVER、SECRET、TLS 然后在 shell 中执行
shellcat >/etc/init.d/nezha-agent<< EOF
#!/sbin/openrc-run
SERVER="" #Dashboard 地址 ip:port
SECRET="" #SECRET
@@ -59,7 +59,7 @@ import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=
checkconfig || return $?
fi
}
-EOF
增加运行权限
shellchmod +x /etc/init.d/nezha-agent
运行 Nezha-Agent
shellrc-service nezha-agent start
添加开机自启动
shellrc-update add nezha-agent
在 Windows 中手动安装 Agent
- 请参考社区文章:
哪吒探针 - Windows 客户端安装
在 群晖DSM 中安装 Agent
Systemd 实现 仅适用于 DSM7:
sh# 客户端路径
+EOF
增加运行权限
shellchmod +x /etc/init.d/nezha-agent
运行 Nezha-Agent
shellrc-service nezha-agent start
添加开机自启动
shellrc-update add nezha-agent
在 Windows 中手动安装 Agent
- 请参考社区文章:
哪吒探针 - Windows 客户端安装
在 群晖DSM 中安装 Agent
点击展开/收起
Systemd 实现 仅适用于 DSM7:
sh# 客户端路径
EXEC="/PATH/TO/nezha-agent"
# 日志路径地址
LOG="\${EXEC}.log"
@@ -94,7 +94,7 @@ import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=
# 启动服务
systemctl start nezha
# 服务自启动
-systemctl enable nezha
‼️修改对应信息后‼️
使用 root
账号执行上述命令即可安装完成
在 MacOS 中安装 Agent
本节内容改编自 Mitsea Blog,改编已获得原作者授权
WARNING
安装过程中如提示“macOS 无法验证此 app“,请前往系统设置手动允许程序运行
- 首先在管理面板中添加一台服务器
- 前往 Release 页下载 Agent 二进制文件,根据 CPU 架构选择下载 darwin amd64 还是 arm64 的 Agent
如 Intel CPU 下载 amd64,Apple Silicon 下载 arm64 版本。下载完成后解压 Agent 二进制文件,如解压到下载文件夹 - 新建一个名为
nezha_agent.plist
的文件并保存,修改文件内容如下:
xml<?xml version="1.0" encoding="UTF-8"?>
+systemctl enable nezha
‼️修改对应信息后‼️
使用 root
账号执行上述命令即可安装完成
在 macOS 中安装 Agent
点击展开/收起
本节内容改编自 Mitsea Blog,改编已获得原作者授权
WARNING
安装过程中如提示“macOS 无法验证此 app“,请前往系统设置手动允许程序运行
- 首先在管理面板中添加一台服务器
- 前往 Release 页下载 Agent 二进制文件,根据 CPU 架构选择下载 darwin amd64 还是 arm64 的 Agent
如 Intel CPU 下载 amd64,Apple Silicon 下载 arm64 版本。下载完成后解压 Agent 二进制文件,如解压到下载文件夹 - 新建一个名为
nezha_agent.plist
的文件并保存,修改文件内容如下:
xml<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@@ -115,9 +115,9 @@ import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=
<key>RunAtLoad</key>
<true/>
</dict>
-</plist>
- 在 Terminal 中使用下面的命令加载 plist 文件到 launchd 里,注意替换文件路径
shelllaunchctl load /Users/123/Desktop/nezha_agent.plist
- 启动进程
shelllaunchctl start nezha_agent
- 检查进程是否运行
shelllaunchctl list | grep nezha_agent
- 停止进程并移除
shelllaunchctl stop nezha_agent
shelllaunchctl remove nezha_agent
在 macOS 中使用 Homebrew 安装 Agent
本节内容改编自 🐿️松鼠收集🌰,改编已获得原作者授权
- 添加 Homebrew 第三方仓库
由于暂未提交到 Homebrew Core 官方库,暂时放在上述博客作者参与维护的第三方 Homebrew 仓库中
shbrew tap brewforge/chinese
- 安装 Nezha Agent
shbrew install nezha-agent
- 添加环境变量
shecho 'export HOMEBREW_NEZHA_AGENT_PASSWORD="你的密钥,在你的服务页面获取"' >> ~/.zshrc
+</plist>
- 在 Terminal 中使用下面的命令加载 plist 文件到 launchd 里,注意替换文件路径
shelllaunchctl load /Users/123/Desktop/nezha_agent.plist
- 启动进程
shelllaunchctl start nezha_agent
- 检查进程是否运行
shelllaunchctl list | grep nezha_agent
- 停止进程并移除
shelllaunchctl stop nezha_agent
shelllaunchctl remove nezha_agent
在 macOS 中使用 Homebrew 安装 Agent
点击展开/收起
本节内容改编自 🐿️松鼠收集🌰,改编已获得原作者授权
- 添加 Homebrew 第三方仓库
DANGER
请注意,此 Homebrew 仓库由第三方维护,与哪吒监控无关。
Nezha 项目组不对该仓库的可用性和安全性等方面作出背书。在使用前,请自行评估风险!!
由于暂未提交到 Homebrew Core 官方库,暂时放在上述博客作者参与维护的第三方 Homebrew 仓库中
shbrew tap brewforge/chinese
- 安装 Nezha Agent
shbrew install nezha-agent
- 添加环境变量
shecho 'export HOMEBREW_NEZHA_AGENT_PASSWORD="通信密钥,在服务页面获取"' >> ~/.zshrc
echo 'export HOMEBREW_NEZHA_AGENT_SERVER="你的服务器和端口,格式 your.domain:5555 "' >> ~/.zshrc
-source ~/.zshrc
- 通过 Homebrew 启动 Nezha Agent 服务
shbrew services start nezha-agent
- 检查服务状态
shbrew services info nezha-agent
- 停止服务
shbrew services stop nezha-agent
- 卸载 Nezha Agent
shbrew rm nezha-agent
在 OpenWRT 中安装 Agent
如何 一步到位,解决安装过程疑难杂症
- 请参考项目:
NZ-OpenWrt
如何使 旧版 OpenWRT/LEDE 自启动
- 请参考项目:
哪吒监控 For OpenWRT
如何使 新版 OpenWRT 自启动?来自 @艾斯德斯
- 首先在 release 下载对应的二进制解压 zip 包后放置到
/root
- 运行
chmod +x /root/nezha-agent
赋予执行权限,然后创建 /etc/init.d/nezha-service
:
shell#!/bin/sh /etc/rc.common
+source ~/.zshrc
- 通过 Homebrew 启动 Nezha Agent 服务
shbrew services start nezha-agent
- 检查服务状态
shbrew services info nezha-agent
- 停止服务
shbrew services stop nezha-agent
- 卸载 Nezha Agent
shbrew rm nezha-agent
在 OpenWRT 中安装 Agent
点击展开/收起
如何 一步到位,解决安装过程疑难杂症
- 请参考项目:
NZ-OpenWrt
如何使 旧版 OpenWRT/LEDE 自启动
- 请参考项目:
哪吒监控 For OpenWRT
如何使 新版 OpenWRT 自启动?来自 @艾斯德斯
- 首先在 release 下载对应的二进制解压 zip 包后放置到
/root
- 运行
chmod +x /root/nezha-agent
赋予执行权限,然后创建 /etc/init.d/nezha-service
:
shell#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
@@ -137,4 +137,4 @@ import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=
stop
sleep 2
start
-}
- 运行
chmod +x /etc/init.d/nezha-service
赋予执行权限 - 启动服务:
/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
FAQ
Agent 有 Docker 镜像吗?
Agent 目前没有推出 Docker 镜像。
Agent 的设计思路和 Dashboard 相反,Dashboard 要尽可能不影响宿主机工作,但 Agent 则需要在宿主机中执行监控服务和运行命令。
将 Agent 放入容器中确实可以继续执行监控任务,但 WebShell 等功能无法正常运行,因此不提供 Docker 镜像。
`,75),e=[o];function t(c,r,D,y,C,i){return a(),n("div",null,e)}const h=s(p,[["render",t]]);export{A as __pageData,h as default};
+}
- 运行
chmod +x /etc/init.d/nezha-service
赋予执行权限 - 启动服务:
/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
常见问题
Agent 有 Docker 镜像吗?
Agent 目前没有推出 Docker 镜像。
Agent 的设计思路和 Dashboard 相反,Dashboard 要尽可能不影响宿主机工作,但 Agent 则需要在宿主机中执行监控服务和运行命令。
将 Agent 放入容器中确实可以继续执行监控任务,但 WebShell 等功能无法正常运行,因此不提供 Docker 镜像。
`,35),e=[o];function t(c,r,D,y,C,i){return a(),n("div",null,e)}const h=s(p,[["render",t]]);export{A as __pageData,h as default};
diff --git a/assets/guide_agent.md.526ca89e.lean.js b/assets/guide_agent.md.26027953.lean.js
similarity index 69%
rename from assets/guide_agent.md.526ca89e.lean.js
rename to assets/guide_agent.md.26027953.lean.js
index 7a38d8e3..175d9670 100644
--- a/assets/guide_agent.md.526ca89e.lean.js
+++ b/assets/guide_agent.md.26027953.lean.js
@@ -1 +1 @@
-import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1714697355000}'),p={name:"guide/agent.md"},o=l("",75),e=[o];function t(c,r,D,y,C,i){return a(),n("div",null,e)}const h=s(p,[["render",t]]);export{A as __pageData,h as default};
+import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1715016176000}'),p={name:"guide/agent.md"},o=l("",35),e=[o];function t(c,r,D,y,C,i){return a(),n("div",null,e)}const h=s(p,[["render",t]]);export{A as __pageData,h as default};
diff --git a/assets/guide_agentq.md.a6ef9d30.js b/assets/guide_agentq.md.6ccc3ac1.js
similarity index 68%
rename from assets/guide_agentq.md.a6ef9d30.js
rename to assets/guide_agentq.md.6ccc3ac1.js
index b06c33a5..cccd42b7 100644
--- a/assets/guide_agentq.md.a6ef9d30.js
+++ b/assets/guide_agentq.md.6ccc3ac1.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1714697355000}'),n={name:"guide/agentq.md"},r=o('后台显示的 IP 和 Agent 实际 IP 不一致?
请查看 Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?
在此不再赘述。
一键脚本安装时出错
curl: Failed to connect to raw.githubusercontent.com......
多出现在国内主机中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者手动安装 Agent,别忘了使用镜像。
sudo: command not found
请先手动安装 sudo。
',7),d=[r];function c(i,s,u,h,l,m){return t(),a("div",null,d)}const g=e(n,[["render",c]]);export{p as __pageData,g as default};
+import{_ as t,o as e,c as a,R as o}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1715016176000}'),n={name:"guide/agentq.md"},r=o('后台显示的 IP 和 Agent 实际 IP 不一致?
请查看 Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?
在此不再赘述。
一键脚本安装时出错
curl: Failed to connect to raw.githubusercontent.com......
多出现在国内主机中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者手动安装 Agent。
另外,也可以自行寻找第三方 Github 加速服务或者镜像,并在一键安装脚本中设置。
sudo: command not found
请先手动安装 sudo。
',7),d=[r];function c(i,u,s,h,l,m){return e(),a("div",null,d)}const g=t(n,[["render",c]]);export{p as __pageData,g as default};
diff --git a/assets/guide_agentq.md.6ccc3ac1.lean.js b/assets/guide_agentq.md.6ccc3ac1.lean.js
new file mode 100644
index 00000000..111cdfb6
--- /dev/null
+++ b/assets/guide_agentq.md.6ccc3ac1.lean.js
@@ -0,0 +1 @@
+import{_ as t,o as e,c as a,R as o}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1715016176000}'),n={name:"guide/agentq.md"},r=o("",7),d=[r];function c(i,u,s,h,l,m){return e(),a("div",null,d)}const g=t(n,[["render",c]]);export{p as __pageData,g as default};
diff --git a/assets/guide_agentq.md.a6ef9d30.lean.js b/assets/guide_agentq.md.a6ef9d30.lean.js
deleted file mode 100644
index 7e57a9ff..00000000
--- a/assets/guide_agentq.md.a6ef9d30.lean.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1714697355000}'),n={name:"guide/agentq.md"},r=o("",7),d=[r];function c(i,s,u,h,l,m){return t(),a("div",null,d)}const g=e(n,[["render",c]]);export{p as __pageData,g as default};
diff --git a/assets/guide_api.md.3a6213b0.js b/assets/guide_api.md.08c8f917.js
similarity index 99%
rename from assets/guide_api.md.3a6213b0.js
rename to assets/guide_api.md.08c8f917.js
index 80eec491..150f31eb 100644
--- a/assets/guide_api.md.3a6213b0.js
+++ b/assets/guide_api.md.08c8f917.js
@@ -1,4 +1,4 @@
-import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1714697355000}'),l={name:"guide/api.md"},p=o(`哪吒面板现在已经支持使用 API 接口查询面板中 Agent 的状态信息
创建 Token
哪吒面板的 API 接口允许使用 Token 认证与 Cookies 认证
要新建一个 Token,在进入管理面板后,点击右上角的头像,选择 “API Token”,进入 Token 管理页面
点击 “添加 Token”,自定义备注后,点击 “添加”
如需删除一个 Token,请选择相应的 Token,点击右侧的删除图标
WARNING
Token 是 API 接口的鉴权工具,它对你的面板的信息安全非常重要,请不要泄漏你的 Token 给他人
认证方式
Token 认证方式:
Request Headers:
+import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1715016176000}'),l={name:"guide/api.md"},p=o(`哪吒面板现在已经支持使用 API 接口查询面板中 Agent 的状态信息
创建 Token
哪吒面板的 API 接口允许使用 Token 认证与 Cookies 认证
要新建一个 Token,在进入管理面板后,点击右上角的头像,选择 “API Token”,进入 Token 管理页面
点击 “添加 Token”,自定义备注后,点击 “添加”
如需删除一个 Token,请选择相应的 Token,点击右侧的删除图标
WARNING
Token 是 API 接口的鉴权工具,它对你的面板的信息安全非常重要,请不要泄漏你的 Token 给他人
认证方式
Token 认证方式:
Request Headers:
Authorization: Token
使用说明
WARNING
下面示例中的负数时间戳为(0000-00-00)
目前表示 Dashboard 上线后该 Agent 从未汇报过
但不建议用正负性判断状态
TIP
请求方式为 Get
,返回格式为 JSON
- 获取服务器列表:
GET /api/v1/server/list?tag=
query: tag (ServerTag 是服务器的分组,提供此参数则仅查询该分组中的服务器)
JSON 返回示例:
{
"code": 0,
"message": "success",
diff --git a/assets/guide_api.md.3a6213b0.lean.js b/assets/guide_api.md.08c8f917.lean.js
similarity index 84%
rename from assets/guide_api.md.3a6213b0.lean.js
rename to assets/guide_api.md.08c8f917.lean.js
index 040920a3..16ff1177 100644
--- a/assets/guide_api.md.3a6213b0.lean.js
+++ b/assets/guide_api.md.08c8f917.lean.js
@@ -1 +1 @@
-import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1714697355000}'),l={name:"guide/api.md"},p=o("",16),t=[p];function e(c,u,q,C,A,i){return n(),a("div",null,t)}const D=s(l,[["render",e]]);export{y as __pageData,D as default};
+import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1715016176000}'),l={name:"guide/api.md"},p=o("",16),t=[p];function e(c,u,q,C,A,i){return n(),a("div",null,t)}const D=s(l,[["render",e]]);export{y as __pageData,D as default};
diff --git a/assets/guide_dashboard.md.36f2764f.js b/assets/guide_dashboard.md.36f2764f.js
new file mode 100644
index 00000000..f3f29871
--- /dev/null
+++ b/assets/guide_dashboard.md.36f2764f.js
@@ -0,0 +1,21 @@
+import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const D=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1715016176000}'),l={name:"guide/dashboard.md"},n=o(`准备工作
搭建一个哪吒监控,你需要:
- 一台可以连接公网的 VPS,防火墙和安全策略需要放行 8008 和 5555 端口,否则会无法访问和无法接收数据。单核 512MB 内存的服务器配置就足以满足大多数使用场景
- 一个已经设置好 A 记录,指向 Dashboard 服务器 ip 的域名
TIP
如果你想使用 CDN,请准备两个域名,一个配置好 CDN 用作公开访问,CDN 需要支持 WebSocket 协议;另一个域名不要使用 CDN,用作 Agent 端与 Dashboard 的通信
本文档分别以 "dashboard.example.com" 和 "data.example.com" 两个域名来演示
- 一个 Github 账号(或:Gitlab、Gitee)
本文档将以宝塔面板反代面板的过程作为范例,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考
WARNING
本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,或手动安装 NginX 或 Caddy 来配置 SSL 和反代。
如果你认为没有必要使用 80、443 端口来访问 Dashboard,你甚至不需要安装 NginX 就可以直接使用安装脚本安装并运行哪吒监控。
获取 Github 的 Client ID 和密钥
哪吒监控接入 Github、Gitlab、Gitee 作为后台管理员账号
- 首先我们需要新建一个验证应用,以 Github 为例,登录 Github 后,打开 https://github.com/settings/developers ,依次选择“OAuth Apps” - “New OAuth App”
Application name
- 随意填写
Homepage URL
- 填写面板的访问域名,如:"http://dashboard.example.com" (你的域名)
Authorization callback URL
- 填写回调地址,如:"http://dashboard.example.com/oauth2/callback" (不要忘记/oauth2/callback
) - 点击 “Register application”
- 保存页面中的 Client ID,然后点击 “Generate a new client secret“,创建一个新的 Client Secret,新建的密钥仅会显示一次,请妥善保存
获取 Cloudflare Access 作为 OAuth2 提供方
位于中国大陆的用户可能无法直接连接 Github,如您在使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,您可以优先考虑切换 使用 Cloudflare Access 作为 OAuth2 提供方作为登录方式
新建 SaaS-OIDC 应用流程
- 前往 Zero Trust Dashboard,使用 Cloudflare 账号登录;
My Team
-> Users
-> <具体用户>
-> 获取 User ID
并保存;Access
-> Application
-> Add an Application
;- 选择
SaaS
,在 Application
中输入自定义的应用名称(例如 nezha),选择 OIDC
后点击 Add application
; Scopes
选择 openid
, email
, profile
, groups
;Redirect URLs
填写你的 callback 地址,例如 https://dashboard.example.com/oauth2/callback
;- 保存
Client ID
、Client Secret
、Issuer
地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com
如使用此方式,安装 Dashboard 完成后,需要修改配置文件 /opt/nezha/dashboard/data/config.yaml
,将 Endpoint
配置修改为之前保存的Issuer
地址,例如 https://xxxxx.cloudflareaccess.com
,保存后需重启 Dashboard
在服务器中安装 Dashboard
- 在面板服务器中,运行安装脚本:
bashcurl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
如果你的面板服务器位于中国大陆,可以使用镜像:
bashcurl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
等待 Docker 安装完毕后,分别输入以下值:
OAuth提供商
- github,cloudflare,gitlab,gitee 中选择一个
Client ID
- 之前保存的 Client ID
Client Secret
- 之前保存的 Client Secret
用户名
- OAuth 提供商中的用户名/User ID
站点标题
- 自定义站点标题
访问端口
- 公开访问端口,可自定义,默认 8008
Agent的通信端口
- Agent 与 Dashboard 的通信端口,默认 5555
输入完成后,等待拉取镜像
安装结束后,如果一切正常,此时你可以访问域名+端口号,如 “http://dashboard.example.com:8008” 来查看面板
将来如果需要再次运行脚本,可以运行:
bash./nezha.sh
来打开管理脚本
配置反向代理
在宝塔面板中新建一个站点,域名填写公开访问域名,如 “http://dashboard.example.com“ ,然后点击“设置”进入站点设置选项,选择“反向代理” - “新建反向代理”
自定义一个代理名称,在下方“目标 URL”中填入 http://127.0.0.1
然后点击“保存”
打开刚刚新建的反向代理右边的“配置文件”,将配置文件替换为以下内容:
nginx#PROXY-START/
+location / {
+ proxy_pass http://127.0.0.1:8008;
+ proxy_set_header Host $http_host;
+ proxy_set_header Upgrade $http_upgrade;
+}
+location ~ ^/(ws|terminal/.+)$ {
+ proxy_pass http://127.0.0.1:8008;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "Upgrade";
+ proxy_set_header Host $http_host;
+}
+#PROXY-END/
- 点击“保存”
现在,你应该可以直接使用域名,如:“http://dashboard.example.com“ 来访问面板了
扩展内容:
CaddyServer v1(v2 无需特别配置)
proxy /ws http://ip:8008 {
+ websocket
+ header_upstream -Origin
+}
+proxy /terminal/* http://ip:8008 {
+ websocket
+ header_upstream -Origin
+}
在宝塔面板中配置 SSL
首先,先暂时关闭反向代理
正如在其他网站中配置 SSL 证书一样,进入站点设置中的 “SSL”,你可以选择自动申请 Let´s Encrypt 证书或手动配置已有的证书
完成 SSL 的设置后,你需要回到 https://github.com/settings/developers ,编辑之前创建的验证应用程序,将之前我们填入的 "Homepage URL" 和 "Authorization callback URL" 中的域名全部从http
改为https
,如:"https://dashboard.example.com" 和 "https://dashboard.example.com/oauth2/callback" ,不更改此项可能会导致你无法登录面板后台
常见问题
启用 HTTPS 后 /terminal 或 /ws 不能正常连接怎么办?
常常是由于证书不完整造成的,请在 agent 运行参数中添加 -d,若 log 中有 x509:certificate signed by unknown authority,更换完整证书则可解决该问题。
我对面板提供的数据修改/增加功能不满意,我想要自己修改/增加数据怎么办?
常见于批量插入 Agent 等需求中,可以直接修改数据库。
请注意,数据库中并非什么都可以修改,错误的修改会导致数据混乱无法启动 Dashboard,请勿随意修改数据库!
DANGER
再重复一遍,请勿随意修改数据库!
如需要在数据库中修改数据,请先停止面板容器再修改。
数据库类型是 sqlite3,位于 /opt/nezha/dashboard/data/sqlite.db
,修改前请备份
Dashboard 会自动更新吗?
Agent通常情况下会自动更新,但Dashboard并不会,需要手动更新。
如何更新 Dashboard?
运行脚本 ./nezha.sh
,选择重启面板并更新
`,46),t=[n];function p(r,c,d,i,h,C){return s(),e("div",null,t)}const A=a(l,[["render",p]]);export{D as __pageData,A as default};
diff --git a/assets/guide_dashboard.md.36f2764f.lean.js b/assets/guide_dashboard.md.36f2764f.lean.js
new file mode 100644
index 00000000..3e053dee
--- /dev/null
+++ b/assets/guide_dashboard.md.36f2764f.lean.js
@@ -0,0 +1 @@
+import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const D=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1715016176000}'),l={name:"guide/dashboard.md"},n=o("",46),t=[n];function p(r,c,d,i,h,C){return s(),e("div",null,t)}const A=a(l,[["render",p]]);export{D as __pageData,A as default};
diff --git a/assets/guide_dashboard.md.a14108da.js b/assets/guide_dashboard.md.a14108da.js
deleted file mode 100644
index 9a784ec2..00000000
--- a/assets/guide_dashboard.md.a14108da.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import{_ as a,o as s,c as e,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1714697355000}'),n={name:"guide/dashboard.md"},o=l(`准备工作
搭建一个哪吒监控,你需要:
- 一台可以连接公网的 VPS,防火墙和安全策略需要放行 8008 和 5555 端口,否则会无法访问和无法接收数据。单核 512MB 内存的服务器配置就足以满足大多数使用场景
- 一个已经设置好 A 记录,指向 Dashboard 服务器 ip 的域名
TIP
如果你想使用 CDN,请准备两个域名,一个配置好 CDN 用作公开访问,CDN 需要支持WebSocket 协议;另一个域名不要使用 CDN,用作 Agent 端与 Dashboard 的通信
本文档分别以 "cdn.example.com" 和 "data.example.com" 两个域名来演示
- 一个 Github 账号(或:Gitlab、Gitee)
本文档将以宝塔面板反代面板的过程作为范例,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考
WARNING
本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,或手动安装 NginX 或 Caddy 来配置 SSL 和反代。
如果你认为没有必要使用 80、443 端口来访问 Dashboard,你甚至不需要安装 NginX 就可以直接使用安装脚本安装并运行哪吒监控。
获取 Github 的 Client ID 和密钥
哪吒监控接入 Github、Gitlab、Gitee 作为后台管理员账号
- 首先我们需要新建一个验证应用,以 Github 为例,登录 Github 后,打开 https://github.com/settings/developers ,依次选择“OAuth Apps” - “New OAuth App”
Application name
- 随意填写
Homepage URL
- 填写面板的访问域名,如:"http://cdn.example.com" (你的域名)
Authorization callback URL
- 填写回调地址,如:"http://cdn.example.com/oauth2/callback" (不要忘记/oauth2/callback
) - 点击 “Register application”
- 保存页面中的 Client ID,然后点击 “Generate a new client secret“,创建一个新的 Client Secret,新建的密钥仅会显示一次,请妥善保存
在服务器中安装 Dashboard
- 在面板服务器中,运行安装脚本:
bashcurl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
如果你的面板服务器位于中国大陆,可以使用镜像:
bashcurl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
等待Docker安装完毕后,分别输入以下值:
OAuth提供商
- Github,Gitlab,Gitee 中选择一个
Client ID
- 之前保存的 Client ID
Client Secret
- 之前保存的密钥
用户名
- OAuth 提供商中的用户名
站点标题
- 自定义站点标题
访问端口
- 公开访问端口,可自定义,默认 8008
Agent的通信端口
- Agent 与 Dashboard 的通信端口,默认 5555
输入完成后,等待拉取镜像
安装结束后,如果一切正常,此时你可以访问域名+端口号,如 “http://cdn.example.com:8008” 来查看面板
将来如果需要再次运行脚本,可以运行:
bash./nezha.sh
来打开管理脚本
配置反向代理
在宝塔面板中新建一个站点,域名填写公开访问域名,如 “http://cdn.example.com“ ,然后点击“设置”进入站点设置选项,选择“反向代理” - “新建反向代理”
自定义一个代理名称,在下方“目标 URL”中填入 http://127.0.0.1
然后点击“保存”
打开刚刚新建的反向代理右边的“配置文件”,将配置文件替换为以下内容:
nginx#PROXY-START/
-location / {
- proxy_pass http://127.0.0.1:8008;
- proxy_set_header Host $http_host;
- proxy_set_header Upgrade $http_upgrade;
-}
-location ~ ^/(ws|terminal/.+)$ {
- proxy_pass http://127.0.0.1:8008;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "Upgrade";
- proxy_set_header Host $http_host;
-}
-#PROXY-END/
- 点击“保存”
现在,你应该可以直接使用域名,如:“http://cdn.example.com“ 来访问面板了
扩展内容:
CaddyServer v1(v2 无需特别配置)
proxy /ws http://ip:8008 {
- websocket
- header_upstream -Origin
-}
-proxy /terminal/* http://ip:8008 {
- websocket
- header_upstream -Origin
-}
在宝塔面板中配置 SSL
首先,先暂时关闭反向代理
正如在其他网站中配置 SSL 证书一样,进入站点设置中的 “SSL”,你可以选择自动申请 Let´s Encrypt 证书或手动配置已有的证书
完成 SSL 的设置后,你需要回到 https://github.com/settings/developers ,编辑之前创建的验证应用程序,将之前我们填入的 "Homepage URL" 和 "Authorization callback URL" 中的域名全部从http
改为https
,如:"https://cdn.example.com" 和 "https://cdn.example.com/oauth2/callback" ,不更改此项可能会导致你无法登录面板后台
FAQ
启用 HTTPS 后 /terminal 或 /ws 不能正常连接怎么办?
常常是由于证书不完整造成的,请在 agent 运行参数中添加 -d,若 log 中有 x509:certificate signed by unknown authority,更换完整证书则可解决该问题。
我对面板提供的数据修改/增加功能不满意,我想要自己修改/增加数据怎么办?
常见于批量插入 Agent 等需求中,可以直接修改数据库。
请注意,数据库中并非什么都可以修改,错误的修改会导致数据混乱无法启动 Dashboard,请勿随意修改数据库!
DANGER
再重复一遍,请勿随意修改数据库!
如需要在数据库中修改数据,请先停止面板容器再修改。
数据库类型是 sqlite3,位于 /opt/nezha/dashboard/data/sqlite.db
,修改前请备份
Dashboard 会自动更新吗?
Agent通常情况下会自动更新,但Dashboard并不会,需要手动更新。
如何更新 Dashboard?
运行脚本 ./nezha.sh
,选择重启面板并更新
`,41),t=[o];function p(r,c,i,h,d,C){return s(),e("div",null,t)}const y=a(n,[["render",p]]);export{A as __pageData,y as default};
diff --git a/assets/guide_dashboard.md.a14108da.lean.js b/assets/guide_dashboard.md.a14108da.lean.js
deleted file mode 100644
index 92a3fa39..00000000
--- a/assets/guide_dashboard.md.a14108da.lean.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as a,o as s,c as e,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1714697355000}'),n={name:"guide/dashboard.md"},o=l("",41),t=[o];function p(r,c,i,h,d,C){return s(),e("div",null,t)}const y=a(n,[["render",p]]);export{A as __pageData,y as default};
diff --git a/assets/guide_dashboardq.md.e814f68e.js b/assets/guide_dashboardq.md.790461ce.js
similarity index 73%
rename from assets/guide_dashboardq.md.e814f68e.js
rename to assets/guide_dashboardq.md.790461ce.js
index de5ca76b..a84cc53a 100644
--- a/assets/guide_dashboardq.md.e814f68e.js
+++ b/assets/guide_dashboardq.md.790461ce.js
@@ -1,10 +1,10 @@
-import{_ as s,o as a,c as e,R as n}from"./chunks/framework.44fd0451.js";const C=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1714697355000}'),o={name:"guide/dashboardq.md"},l=n(`为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?
首先解释管理面板中显示的IP是怎么得到的:Agent 会每隔一段时间请求一遍 IP-API,获取到 IP 信息后上报到 Dashboard,目前使用的 IP-API 可在此查看:myip.go。
如您发现管理面板中显示的 IP 和服务商提供给您的 IP 不一致,最大的可能是服务商给您的是入口 IP,但 Agent 测试的是您的出口 IP。这个问题也可能会出现在多线服务器和 IPLC 专线中。
TIP
举个简单也十分常见的例子,服务商给您提供的是一台高防服务器,为了同时满足高防和低网络中断率的目标,提供给您的 IP 可能是经过映射后的高防 IP 而并非您服务器的真实出口 IP
您也可以在 Agent 服务器中运行以下命令测试出口IP:
shellcurl https://ipapi.co/ip/
+import{_ as s,o as a,c as e,R as n}from"./chunks/framework.44fd0451.js";const C=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1715016176000}'),o={name:"guide/dashboardq.md"},l=n(`为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?
首先解释管理面板中显示的IP是怎么得到的:Agent 会每隔一段时间请求一遍 IP-API,获取到 IP 信息后上报到 Dashboard,目前使用的 IP-API 可在此查看:myip.go。
如您发现管理面板中显示的 IP 和服务商提供给您的 IP 不一致,最大的可能是服务商给您的是入口 IP,但 Agent 测试的是您的出口 IP。这个问题也可能会出现在多线服务器和 IPLC 专线中。
TIP
举个简单也十分常见的例子,服务商给您提供的是一台高防服务器,为了同时满足高防和低网络中断率的目标,提供给您的 IP 可能是经过映射后的高防 IP 而并非您服务器的真实出口 IP
您也可以在 Agent 服务器中运行以下命令测试出口IP:
shellcurl https://ipapi.co/ip/
curl ip.sb
curl ip-api.com
忘记查看密码\\删除查看密码
请查看或编辑 /opt/nezha/dashboard/data/config.yaml
文件。
密码位于 site-viewpassword 项中。
面板安装/重启/更新失败: iptables ......
首先尝试重启 Docker 再操作
shellsystemctl status docker
systemctl restart docker
-systemctl status docker
重启后尝试重新安装面板。
若依然出现 iptables... 等错误,则考虑直接关闭 iptables 甚至移除 iptables。
这个问题也可能与内核有关,也可以尝试更换官方内核。
面板重启失败:Invalid hostPort: nz_site_port 等
通常不会出现这个情况,如出现可以通过安装脚本修改配置,或者直接修改 /opt/nezha/dashboard/docker-compose.yaml
文件。
面板布局错误、CSS 资源无法被加载
如果出现 Dashboard 页面布局出现错误,通常的原因是 CSS 文件丢失或无法被加载
出现此类错误,可以先尝试 重启并更新面板
如果更新面板后问题没有得到解决,那么可能是你的 vhost 配置文件内有不适用的配置,你可以编辑 NginX 的 vhost 文件或在宝塔面板内:
- 在
网站
中找到安装 Dashboard 时配置的站点,点击右侧设置
- 选择
配置文件
,删除配置文件中的:
nginxlocation ~ .*\\.(js|css)?$
+systemctl status docker
重启后尝试重新安装面板。
若依然出现 iptables... 等错误,则考虑直接关闭 iptables 甚至移除 iptables。
这个问题也可能与内核有关,也可以尝试更换官方内核。
面板重启失败:Invalid hostPort: nz_site_port 等
如出现可以通过安装脚本修改配置,或者直接修改 /opt/nezha/dashboard/docker-compose.yaml
文件。
面板布局错误、CSS 资源无法被加载
如果出现 Dashboard 页面布局出现错误,通常的原因是 CSS 文件丢失或无法被加载
出现此类错误,可以先尝试 重启并更新面板
如果更新面板后问题没有得到解决,那么可能是你的 vhost 配置文件内有不适用的配置,你可以编辑 NginX 的 vhost 文件或在宝塔面板内:
- 在
网站
中找到安装 Dashboard 时配置的站点,点击右侧设置
- 选择
配置文件
,删除配置文件中的:
nginxlocation ~ .*\\.(js|css)?$
{
expires 12h;
error_log /dev/null;
access_log /dev/null;
- }
- 保存配置,并清空浏览器、NginX、CDN 中的缓存,此时刷新页面应恢复正常
面板无法启动:panic: 无法找到配置的DDNS提供者...
填入的DDNS provider的值有误,目前仅支持 webhook
、cloudflare
,tencentcloud
和 dummy
。
面板更新DDNS崩溃:panic: interface conversion: interface {} is nil, not []interface {}
填入的DDNS AccessID
或 AccessSecret
有误。
`,22),t=[l];function p(c,r,i,d,h,y){return a(),e("div",null,t)}const b=s(o,[["render",p]]);export{C as __pageData,b as default};
+ }
- 保存配置,并清空浏览器、NginX、CDN 中的缓存,此时刷新页面应恢复正常
面板无法启动:panic: 无法找到配置的DDNS提供者...
填入的DDNS provider的值有误,目前仅支持 webhook
、cloudflare
,tencentcloud
和 dummy
。
面板更新DDNS崩溃:panic: interface conversion: interface {} is nil, not []interface {}
填入的DDNS AccessID
或 AccessSecret
有误。
打开网络监控页显示:server monitor history not found
出现此错误说明没有在服务页中设置 TCP-Ping 和 ICMP-Ping 类型的监控或者监控数据还未生成。
如已经设置完毕,可以等待一段时间后再查看。
`,24),t=[l];function p(r,c,i,d,h,y){return a(),e("div",null,t)}const b=s(o,[["render",p]]);export{C as __pageData,b as default};
diff --git a/assets/guide_dashboardq.md.e814f68e.lean.js b/assets/guide_dashboardq.md.790461ce.lean.js
similarity index 55%
rename from assets/guide_dashboardq.md.e814f68e.lean.js
rename to assets/guide_dashboardq.md.790461ce.lean.js
index ba2bdd48..592edf6e 100644
--- a/assets/guide_dashboardq.md.e814f68e.lean.js
+++ b/assets/guide_dashboardq.md.790461ce.lean.js
@@ -1 +1 @@
-import{_ as s,o as a,c as e,R as n}from"./chunks/framework.44fd0451.js";const C=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1714697355000}'),o={name:"guide/dashboardq.md"},l=n("",22),t=[l];function p(c,r,i,d,h,y){return a(),e("div",null,t)}const b=s(o,[["render",p]]);export{C as __pageData,b as default};
+import{_ as s,o as a,c as e,R as n}from"./chunks/framework.44fd0451.js";const C=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1715016176000}'),o={name:"guide/dashboardq.md"},l=n("",24),t=[l];function p(r,c,i,d,h,y){return a(),e("div",null,t)}const b=s(o,[["render",p]]);export{C as __pageData,b as default};
diff --git a/assets/guide_loginq.md.89d439e0.js b/assets/guide_loginq.md.89d439e0.js
new file mode 100644
index 00000000..00bfccef
--- /dev/null
+++ b/assets/guide_loginq.md.89d439e0.js
@@ -0,0 +1 @@
+import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1715016176000}'),r={name:"guide/loginq.md"},s=o('登录回调后页面卡住\\拒绝连接\\响应时间过长
还有其他一些表现形式,总之登录后浏览器无法正常显示。
- 您的服务器无法连接到 Github/Gitee,最常见于国内服务器配置 Github 情况下,可以考虑多尝试几次或者切换到 Cloudflare Access。
- 您配置错了回调地址,确保您的回调地址正确且端口与协议均正确!
- Dashboard 发生未知错误,您可以使用脚本查看日志。
TIP
什么是协议?
在浏览器中,您的域名以://
结尾的字符串即为协议,通常为 http
和 https
两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。
如何检查我的回调地址是否错误?
请确保登录前浏览器显示的协议+域名+端口和登录后跳转到的协议+域名+端口一致。
请确保您的路径为/oauth2/callback
,全部小写
登录后面板报错
http: named cookie not present
- 清理 cookies 后重新登录,或换个浏览器
- 检查回调地址,确保您的回调地址正确且端口与协议均正确!发起请求的地址需要和回调地址处于同域,端口、协议和域名(或IP)都需要一致。
lookup xxx
容器DNS解析失败,多数情况下为修改了iptables相关配置。
建议先重启docker,sudo systemctl restart docker
,再使用脚本重启面板。
仍然出现lookup错误建议查看是否有其他控制iptables的工具,如宝塔防火墙等。
这个问题也可能与内核有关系,请尝试更换官方内核。
授权方式无效,或者登录回调地址无效、过期或已被撤销
只出现在 Gitee 登录方式中,原因不明,建议更换到 GitHub。
oauth2: server response missing access_token
可能由多种因素引起,最大可能性是网络问题,建议检查网络后重试。
无法解决的话建议更换 Github 等。
该用户不是本站点管理员,无法登录
您登陆错了账号或者配置错了用户名,注意用户名不是邮箱,可使用脚本修改。
Cloudflare Access 用户请注意,您的用户名不是邮箱,而是User ID。
dial tcp xxx:443 i/o timeout
网络问题,可先重启 Docker,sudo systemctl restart docker
,再使用脚本重启面板。
如为国内服务器配置 Github 登陆方式,则建议切换到 Cloudflare Access 以避免网络干扰。
net/http: TLS handshake timeout
同上。
',21),i=[s];function l(n,c,d,h,p,u){return t(),a("div",null,i)}const k=e(r,[["render",l]]);export{m as __pageData,k as default};
diff --git a/assets/guide_loginq.md.fd27f46b.lean.js b/assets/guide_loginq.md.89d439e0.lean.js
similarity index 54%
rename from assets/guide_loginq.md.fd27f46b.lean.js
rename to assets/guide_loginq.md.89d439e0.lean.js
index 41cdd6ee..4d66acaa 100644
--- a/assets/guide_loginq.md.fd27f46b.lean.js
+++ b/assets/guide_loginq.md.89d439e0.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1714697355000}'),i={name:"guide/loginq.md"},r=o("",21),s=[r];function n(l,h,c,d,p,u){return t(),a("div",null,s)}const k=e(i,[["render",n]]);export{m as __pageData,k as default};
+import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1715016176000}'),r={name:"guide/loginq.md"},s=o("",21),i=[s];function l(n,c,d,h,p,u){return t(),a("div",null,i)}const k=e(r,[["render",l]]);export{m as __pageData,k as default};
diff --git a/assets/guide_loginq.md.fd27f46b.js b/assets/guide_loginq.md.fd27f46b.js
deleted file mode 100644
index 31d87ef1..00000000
--- a/assets/guide_loginq.md.fd27f46b.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1714697355000}'),i={name:"guide/loginq.md"},r=o('登录回调后页面卡住\\拒绝连接\\响应时间过长
还有其他一些表现形式,总之登录后浏览器无法正常显示。
- 您的服务器无法连接到 Github/Gitee,最常见于国内服务器配置 Github 情况下,可以考虑多尝试几次或者切换到 Gitee。
- 您配置错了回调地址,确保您的回调地址正确且端口与协议均正确!
- Dashboard 发生未知错误,您可以使用脚本查看日志。
TIP
什么是协议?
在浏览器中,您的域名以://
结尾的字符串即为协议,通常为 http
和 https
两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。
如何检查我的回调地址是否错误?
请确保登录前浏览器显示的协议+域名+端口和登录后跳转到的协议+域名+端口一致。
请确保您的路径为/oauth2/callback
,全部小写
登录后面板报错
http: named cookie not present
- 清理cookies后重新登录,或换个浏览器
- 检查回调地址,确保您的回调地址正确且端口与协议均正确!发起请求的地址需要和回调地址处于同域,端口、协议和域名(或IP)都需要一致。
lookup xxx
容器DNS解析失败,多数情况下为修改了iptables相关配置。
建议先重启docker,sudo systemctl restart docker
,再使用脚本重启面板。
仍然出现lookup错误建议查看是否有其他控制iptables的工具,如宝塔防火墙等。
这个问题也可能与内核有关系,请尝试更换官方内核。
授权方式无效,或者登录回调地址无效、过期或已被撤销
只出现在 Gitee 登录方式中,原因不明,建议更换到 GitHub。
oauth2: server response missing access_token
可能由多种因素引起,最大可能性是网络问题,建议检查网络后重试。
无法解决的话建议更换 Github 等。
该用户不是本站点管理员,无法登录
您登陆错了账号或者配置错了用户名,注意用户名不是邮箱,可使用脚本修改。
dial tcp xxx:443 i/o timeout
网络问题,可先重启 Docker,sudo systemctl restart docker
,再使用脚本重启面板。
如为国内服务器配置 Github 登陆方式,则建议切换到Jihulab以避免网络干扰。
net/http: TLS handshake timeout
同上。
',21),s=[r];function n(l,h,c,d,p,u){return t(),a("div",null,s)}const k=e(i,[["render",n]]);export{m as __pageData,k as default};
diff --git a/assets/guide_notifications.md.03125a1f.js b/assets/guide_notifications.md.03125a1f.js
deleted file mode 100644
index 337e7ea9..00000000
--- a/assets/guide_notifications.md.03125a1f.js
+++ /dev/null
@@ -1,31 +0,0 @@
-import{_ as o,o as s,c as l,R as n}from"./chunks/framework.44fd0451.js";const C=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1714697355000}'),a={name:"guide/notifications.md"},t=n(`哪吒监控支持对服务器的负载、CPU、内存、硬盘、流量、月流量、进程数、连接数进行监控,并在其中某项达到用户设定值时发送告警通知
灵活的通知方式
在面板消息中,占位符 #DATETIME#
代表事件发生的时间戳。当通知被触发时,面板会自动将 #DATETIME#
替换为事件的实际时间。
#NEZHA#
是面板消息占位符,面板触发通知时会自动用实际消息替换占位符
Body 内容是JSON
格式的:当请求类型为 FORM 时,值为 key:value
的形式,value
里面可放置占位符,通知时会自动替换。当请求类型为 JSON 时 只会简单进行字符串替换后直接提交到URL
。
URL 里面也可放置占位符,请求时会进行简单的字符串替换。
- 你可以参考以下的通知方式示例,也可以根据自己的需求灵活设置推送方式
Bark 示例
- 名称:Bark
- URL 组成: 第一个部分是 key,之后有三个匹配 /:key/:body or /:key/:title/:body or /:key/:category/:title/:body
- 请求方式: GET
- 请求类型: 默认
- Body: 空
- 名称:Bark
- URL 组成: /push
- 请求方式: POST
- 请求类型: form
- Body:
{"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}
Server 酱示例
- 名称:Server 酱
- URL:https://sc.ftqq.com/SCUrandomkeys.send?title=哪吒告警信息&desp=#NEZHA#
- 请求方式: GET
- 请求类型: 默认
- Body: 空
Server 酱进阶
- 名称:Server 酱
- URL:https://sc.ftqq.com/SCUrandomkeys.send
- 请求方式: POST
- 请求类型: FORM
- Body:
json{
- "title": "#SERVER.NAME#",
- "desp":"**#NEZHA#\\n\\n
- 平均负载: \\"#SERVER.LOAD1#\\",\\"#SERVER.LOAD5#\\",\\"#SERVER.LOAD15#\\"\\n\\n
- ## [点击访问面板](https://你的面板域名)\\n\\n
- "
-}

wxpusher 示例,需要关注你的应用
- 名称: wxpusher
- URL:http://wxpusher.zjiecode.com/api/send/message
- 请求方式: POST
- 请求类型: JSON
- Body:
{"appToken":"你的appToken","topicIds":[],"content":"#NEZHA#","contentType":"1","uids":["你的uid"]}
Telegram 示例 贡献者:@haitau
- 名称:telegram 机器人消息通知
- URL:https://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA#
- 请求方式: GET
- 请求类型: 默认
- Body: 空
- URL 参数获取说明:botXXXXXX 中的 XXXXXX 是在 telegram 中关注官方 @Botfather ,输入/newbot ,创建新的机器人(bot)时,会提供的 token(在提示 Use this token to access the HTTP API:后面一行)这里 'bot' 三个字母不可少。创建 bot 后,需要先在 telegram 中与 BOT 进行对话(随便发个消息),然后才可用 API 发送消息。YYYYYY 是 telegram 用户的数字 ID。与机器人@userinfobot 对话可获得。
邮件通知示例 - SendCloud 贡献者:@白歌
注意:SendCloud 有每日免费发送邮件限额限制,这里仅作示例,你可以选择付费服务或其他类似的免费服务,使用方法类似。
- 名称:邮件告警
- URL:https://api.sendcloud.net/apiv2/mail/send?apiUser=<替换APIUSER>apiKey=<替换APIKEY>&from=<自定义发件邮箱>&fromName=Nezha&to=<自定义收件邮箱>&subject=Nezha-Notification&html=#NEZHA#
- 请求方式: POST
- 请求类型: JSON
- Header: 留空
- Body: 留空
URL 参数获取说明:此方式需提前在 SendCloud 注册账号,创建发件邮箱,然后在这里获取 APIUSER 和 APIKEY,替换 URL 中的 <替换APIUSER> 和 <替换APIKEY> 为自己的 APIUSER 和 APIKEY,替换 URL 中的 <自定义发件邮箱> 和 <自定义收件邮箱> 为自己的发件邮箱和收件邮箱。
钉钉群机器人配置 示例
- 名称: 哪吒探针小跟班
- URL:https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxx
- 请求方式: POST
- 请求类型: JSON
- Header:
{"Content-Type": "application/json"}
- Body:
{"msgtype": "text","text": {"content":"哪吒探针:\\n#NEZHA#"}}
- URL 参数获取说明:机器人URL在钉钉群-管理机器人-创建机器人后获取,安全方式选择自定义关键词,Body中content中需包含该关键词
企业微信 群机器人 示例 贡献者:@ChowRex
支持的占位符一览
json{
- "content": "#NEZHA#",
- "ServerName": "#SERVER.NAME#",
- "ServerIP": "#SERVER.IP#",
- "ServerIPV4": "#SERVER.IPV4#",
- "ServerIPV6": "#SERVER.IPV6#",
- "CPU": "#SERVER.CPU#",
- "MEM": "#SERVER.MEM#",
- "SWAP": "#SERVER.SWAP#",
- "DISK": "#SERVER.DISK#",
- "NetInSpeed": "#SERVER.NETINSPEED#",
- "NetOutSpeed": "#SERVER.NETOUTSPEED#",
- "TransferIn": "#SERVER.TRANSFERIN#",
- "TranferOut": "#SERVER.TRANSFEROUT#",
- "Load1": "#SERVER.LOAD1#",
- "Load5": "#SERVER.LOAD5#",
- "Load15": "#SERVER.LOAD15#",
- "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT", # 无效
- "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT", # 无效
-}
名称:企业微信群机器人
URL:https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
请求方式: POST
请求类型: JSON
Body:
json{
- "msgtype": "markdown",
- "markdown": {
- "content": "# 哪吒通知消息\\n\\n\\"#NEZHA#\\"\\n\\n> 名称: \\"#SERVER.NAME#\\"\\n> IP: \\"#SERVER.IP#\\"\\n> IPv4: \\"#SERVER.IPV4#\\"\\n> IPv6: \\"#SERVER.IPV6#\\"\\n> CPU: \\"#SERVER.CPU#\\"\\n> 内存: \\"#SERVER.MEM#\\"\\n> 交换分区: \\"#SERVER.SWAP#\\"\\n> 存储: \\"#SERVER.DISK#\\"\\n> 实时上传速度: \\"#SERVER.NETINSPEED#\\"\\n> 实时下载速度: \\"#SERVER.NETOUTSPEED#\\"\\n> 总上传: \\"#SERVER.TRANSFERIN#\\"\\n> 总下载: \\"#SERVER.TRANSFEROUT#\\"\\n> 1分钟内负载: \\"#SERVER.LOAD1#\\"\\n> 5分钟内负载: \\"#SERVER.LOAD5#\\"\\n> 15分钟内负载: \\"#SERVER.LOAD15#\\"\\n> TCP连接数: \\"#SERVER.TCPCONNCOUNT\\"\\n> UDP连接数: \\"#SERVER.UDPCONNCOUNT\\"\\n\\n"
- }
-}
根据需求删减相关内容信息即可

飞书群机器人配置 示例 贡献者:@eya46
- 名称: 哪吒面板Bot
- URL:https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxxxxxxxxxxx
- 请求方式: POST
- 请求类型: JSON
- Body:
{"content":{"text":"#NEZHA#\\n#DATETIME#"},"msg_type":"text"}
- URL 参数获取说明:机器人URL通过飞书群-群机器人-添加机器人-自定义机器人(webhook)创建后获取
告警规则说明
基本规则
- type:可选取一个或多个类型,如在一个规则中选择了多个类型,需要同时满足所有选择的类型才会触发通知(可参考后面的示例)
cpu
、memory
、swap
、disk
net_in_speed
入站网速、net_out_speed
出站网速、net_all_speed
双向网速、transfer_in
入站流量、transfer_out
出站流量、transfer_all
双向流量offline
离线监控load1
、load5
、load15
负载process_count
进程数 目前取线程数占用资源太多,暂时不支持tcp_conn_count
、udp_conn_count
连接数
- duration:持续数秒,数秒内采样记录 30% 以上触发阈值才会告警(防数据插针)
- min 或 max:
- 流量、网速类数值 为字节(1KB=1024B,1MB = 1024*1024B)
- 内存、硬盘、CPU 以占用百分比计数
- 离线监控无需设置此项
- cover:
0
监控所有,通过 ignore
忽略特定服务器1
忽略所有,通过 ignore
监控特定服务器
例如:[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
- ignore: 选择忽略特定服务器,搭配
cover
使用,内容为服务器 id 和布尔值,例如:{"1": true, "2":false}
完整示例:
添加一个离线告警
- 名称:离线通知
- 规则:
[{"Type":"offline","Duration":10}]
- 启用:√
添加一个监控 CPU 持续 10s 超过 50% 且 内存持续 20s 占用低于 20% 的告警
- 名称:CPU+内存
- 规则:
[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
- 启用:√
将特定的服务器通知发送到特定的通知分组
示例场景:
你有 1、2、3、4 四台服务器和 A、B 两个不同的通知组
1、2 这两台服务器掉线十分钟后给通知组 A 发送通知
3、4 这两台服务器掉线十分钟后给通知组 B 发送通知
首先你需要先设置好 A、B 两个通知组,然后添加两条告警规则:
规则一:
- 名称:1、2 离线,发送给通知组 A
- 规则:
[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
- 通知方式组: A
- 启用:√
规则二:
- 名称:3、4 离线,发送给通知组 B
- 规则:
[{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
- 通知方式组: B
- 启用:√
灵活使用参数可以让你的告警功能被充分使用
特殊:任意周期流量告警
可以用作月流量告警
- type:
transfer_in_cycle
周期内的入站流量transfer_out_cycle
周期内的出站流量transfer_all_cycle
周期内双向流量和
- cycle_start: 统计周期开始日期(可以是你机器计费周期的开始日期),时间格式为RFC3339,例如北京时间为
2022-01-11T08:00:00.00+08:00
- cycle_interval:每隔多少个周期单位(例如,周期单位为天,该值为 7,则代表每隔 7 天统计一次)
- cycle_unit 统计周期单位,默认
hour
,可选(hour
, day
, week
, month
, year
) - min/max、cover、ignore 参考基本规则配置
示例:
ID 为 3 和 4 的服务器(ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时告警
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]
通知触发模式说明
- 始终触发:每当 Agent 上报的状态符合告警的规则时,都会触发一次通知
- 单次触发:仅状态改变时触发一次通知,如从正常状态改变为异常状态,或异常状态恢复为正常状态
设置告警时执行任务
如果你需要在发出告警消息的同时执行某项任务,可以设置此项目
告警时触发任务
当告警状态符合从“正常”变更为“事件”时,所要执行的任务,任务应提前在任务页设置恢复时触发任务
当告警状态符合从“事件”恢复为“正常”时,所要执行的任务,任务应提前在任务页设置
`,28),e=[t];function p(r,c,D,u,i,y){return s(),l("div",null,e)}const F=o(a,[["render",p]]);export{C as __pageData,F as default};
diff --git a/assets/guide_notifications.md.03125a1f.lean.js b/assets/guide_notifications.md.03125a1f.lean.js
deleted file mode 100644
index aa9afe2f..00000000
--- a/assets/guide_notifications.md.03125a1f.lean.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as o,o as s,c as l,R as n}from"./chunks/framework.44fd0451.js";const C=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1714697355000}'),a={name:"guide/notifications.md"},t=n("",28),e=[t];function p(r,c,D,u,i,y){return s(),l("div",null,e)}const F=o(a,[["render",p]]);export{C as __pageData,F as default};
diff --git a/assets/guide_notifications.md.831aafa5.js b/assets/guide_notifications.md.831aafa5.js
new file mode 100644
index 00000000..8e935c26
--- /dev/null
+++ b/assets/guide_notifications.md.831aafa5.js
@@ -0,0 +1,36 @@
+import{_ as o,o as s,c as t,R as l}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1715016176000}'),a={name:"guide/notifications.md"},e=l(`哪吒监控支持对服务器的负载、CPU、内存、硬盘、流量、月流量、进程数、连接数进行监控,并在其中某项达到用户设定值时发送告警通知
灵活的通知方式
- 在面板消息中,占位符
#DATETIME#
代表事件发生的时间戳。当通知被触发时,面板会自动将 #DATETIME#
替换为事件的实际时间。 #NEZHA#
是面板消息占位符,面板触发通知时会自动用实际消息替换占位符- Body 内容是
JSON
格式的:当请求类型为 FORM 时,值为 key:value
的形式,value
里面可放置占位符,通知时会自动替换。当请求类型为 JSON 时 只会简单进行字符串替换后直接提交到URL
。 - URL 里面也可放置占位符,请求时会进行简单的字符串替换。
请参考以下的通知方式示例,也可以根据自己的需求灵活设置推送方式
Bark 示例
点击展开/收起
名称:Bark
URL 组成: 第一个部分是 key,之后有三个匹配 /:key/:body or /:key/:title/:body or /:key/:category/:title/:body
请求方式: GET
请求类型: 默认
Body: 空
名称:Bark
URL 组成: /push
请求方式: POST
请求类型: form
Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}
Server 酱示例
点击展开/收起
- 名称:Server 酱
- URL:https://sc.ftqq.com/SCUrandomkeys.send?title=哪吒告警信息&desp=#NEZHA#
- 请求方式: GET
- 请求类型: 默认
- Body: 空
Server 酱进阶
- 名称:Server 酱
- URL:https://sc.ftqq.com/SCUrandomkeys.send
- 请求方式: POST
- 请求类型: FORM
- Body:
json{
+"title": "#SERVER.NAME#",
+"desp":"**#NEZHA#\\n\\n
+平均负载: \\"#SERVER.LOAD1#\\",\\"#SERVER.LOAD5#\\",\\"#SERVER.LOAD15#\\"\\n\\n
+## [点击访问面板](https://你的面板域名)\\n\\n
+"
+}

wxpusher 示例
需要提前关注你的应用
点击展开/收起
- 名称: wxpusher
- URL:http://wxpusher.zjiecode.com/api/send/message
- 请求方式: POST
- 请求类型: JSON
- Body:
{"appToken":"你的appToken","topicIds":[],"content":"#NEZHA#","contentType":"1","uids":["你的uid"]}
Telegram 示例 贡献者:@haitau
点击展开/收起
- 名称:telegram 机器人消息通知
- URL:https://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA#
- 请求方式: GET
- 请求类型: 默认
- Body: 空
- URL 参数获取说明:botXXXXXX 中的 XXXXXX 是在 telegram 中关注官方 @Botfather ,输入/newbot ,创建新的机器人(bot)时,会提供的 token(在提示 Use this token to access the HTTP API:后面一行)这里 'bot' 三个字母不可少。创建 bot 后,需要先在 telegram 中与 BOT 进行对话(随便发个消息),然后才可用 API 发送消息。YYYYYY 是 telegram 用户的数字 ID。与机器人@userinfobot 对话可获得。
邮件通知示例 - SendCloud 贡献者:@白歌
点击展开/收起
注意:SendCloud 有每日免费发送邮件限额限制,这里仅作示例,你可以选择付费服务或其他类似的免费服务,使用方法类似。
- 名称:邮件告警
- URL:https://api.sendcloud.net/apiv2/mail/send?apiUser=<替换APIUSER>apiKey=<替换APIKEY>&from=<自定义发件邮箱>&fromName=Nezha&to=<自定义收件邮箱>&subject=Nezha-Notification&html=#NEZHA#
- 请求方式: POST
- 请求类型: JSON
- Header: 留空
- Body: 留空
URL 参数获取说明:此方式需提前在 SendCloud 注册账号,创建发件邮箱,然后在这里获取 APIUSER 和 APIKEY,替换 URL 中的 <替换APIUSER> 和 <替换APIKEY> 为自己的 APIUSER 和 APIKEY,替换 URL 中的 <自定义发件邮箱> 和 <自定义收件邮箱> 为自己的发件邮箱和收件邮箱。
钉钉群机器人配置 示例
点击展开/收起
- 名称: 哪吒探针小跟班
- URL:https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxx
- 请求方式: POST
- 请求类型: JSON
- Header:
{"Content-Type": "application/json"}
- Body:
{"msgtype": "text","text": {"content":"哪吒探针:\\n#NEZHA#"}}
- URL 参数获取说明:机器人URL在钉钉群-管理机器人-创建机器人后获取,安全方式选择自定义关键词,Body中content中需包含该关键词
企业微信 群机器人 示例 贡献者:@ChowRex
点击展开/收起
支持的占位符一览
json{
+ "content": "#NEZHA#",
+ "ServerName": "#SERVER.NAME#",
+ "ServerIP": "#SERVER.IP#",
+ "ServerIPV4": "#SERVER.IPV4#",
+ "ServerIPV6": "#SERVER.IPV6#",
+ "CPU": "#SERVER.CPU#",
+ "MEM": "#SERVER.MEM#",
+ "SWAP": "#SERVER.SWAP#",
+ "DISK": "#SERVER.DISK#",
+ "NetInSpeed": "#SERVER.NETINSPEED#",
+ "NetOutSpeed": "#SERVER.NETOUTSPEED#",
+ "TransferIn": "#SERVER.TRANSFERIN#",
+ "TranferOut": "#SERVER.TRANSFEROUT#",
+ "Load1": "#SERVER.LOAD1#",
+ "Load5": "#SERVER.LOAD5#",
+ "Load15": "#SERVER.LOAD15#",
+ "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT", # 无效
+ "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT", # 无效
+}
名称:企业微信群机器人
URL:https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
请求方式: POST
请求类型: JSON
Body:
\`\`\`json
+{
+ "msgtype": "markdown",
+ "markdown": {
+ "content": "# 哪吒通知消息\\n\\n\\"#NEZHA#\\"\\n\\n> 名称: \\"#SERVER.NAME#\\"\\n> IP: \\"#SERVER.IP#\\"\\n> IPv4: \\"#SERVER.IPV4#\\"\\n> IPv6: \\"#SERVER.IPV6#\\"\\n> CPU: \\"#SERVER.CPU#\\"\\n> 内存: \\"#SERVER.MEM#\\"\\n> 交换分区: \\"#SERVER.SWAP#\\"\\n> 存储: \\"#SERVER.DISK#\\"\\n> 实时上传速度: \\"#SERVER.NETINSPEED#\\"\\n> 实时下载速度: \\"#SERVER.NETOUTSPEED#\\"\\n> 总上传: \\"#SERVER.TRANSFERIN#\\"\\n> 总下载: \\"#SERVER.TRANSFEROUT#\\"\\n> 1分钟内负载: \\"#SERVER.LOAD1#\\"\\n> 5分钟内负载: \\"#SERVER.LOAD5#\\"\\n> 15分钟内负载: \\"#SERVER.LOAD15#\\"\\n> TCP连接数: \\"#SERVER.TCPCONNCOUNT\\"\\n> UDP连接数: \\"#SERVER.UDPCONNCOUNT\\"\\n\\n"
+ }
+}
+\`\`\`
+
+根据需求删减相关内容信息即可
+

飞书群机器人配置 示例 贡献者:@eya46
点击展开/收起
- 名称: 哪吒面板Bot
- URL:https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxxxxxxxxxxx
- 请求方式: POST
- 请求类型: JSON
- Body:
{"content":{"text":"#NEZHA#\\n#DATETIME#"},"msg_type":"text"}
- URL 参数获取说明:机器人URL通过飞书群-群机器人-添加机器人-自定义机器人(webhook)创建后获取
告警规则说明
基本规则
- type:可选取一个或多个类型,如在一个规则中选择了多个类型,需要同时满足所有选择的类型才会触发通知(可参考后面的示例)
cpu
、memory
、swap
、disk
net_in_speed
入站网速、net_out_speed
出站网速、net_all_speed
双向网速、transfer_in
入站流量、transfer_out
出站流量、transfer_all
双向流量offline
离线监控load1
、load5
、load15
负载process_count
进程数 目前取线程数占用资源太多,暂时不支持tcp_conn_count
、udp_conn_count
连接数
- duration:持续数秒,数秒内采样记录 30% 以上触发阈值才会告警(防数据插针)
- min 或 max:
- 流量、网速类数值 为字节(1KB=1024B,1MB = 1024*1024B)
- 内存、硬盘、CPU 以占用百分比计数
- 离线监控无需设置此项
- cover:
0
监控所有,通过 ignore
忽略特定服务器1
忽略所有,通过 ignore
监控特定服务器
例如:[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
- ignore: 选择忽略特定服务器,搭配
cover
使用,内容为服务器 id 和布尔值,例如:{"1": true, "2":false}
完整示例:
添加一个离线告警
- 名称:离线通知
- 规则:
[{"Type":"offline","Duration":10}]
- 启用:√
添加一个监控 CPU 持续 10s 超过 50% 且 内存持续 20s 占用低于 20% 的告警
- 名称:CPU+内存
- 规则:
[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
- 启用:√
将特定的服务器通知发送到特定的通知分组
示例场景:
你有 1、2、3、4 四台服务器和 A、B 两个不同的通知组
1、2 这两台服务器掉线十分钟后给通知组 A 发送通知
3、4 这两台服务器掉线十分钟后给通知组 B 发送通知
首先你需要先设置好 A、B 两个通知组,然后添加两条告警规则:
规则一:
- 名称:1、2 离线,发送给通知组 A
- 规则:
[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
- 通知方式组: A
- 启用:√
规则二:
- 名称:3、4 离线,发送给通知组 B
- 规则:
[{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
- 通知方式组: B
- 启用:√
灵活使用参数可以让你的告警功能被充分使用
特殊:任意周期流量告警
可以用作月流量告警
- type:
transfer_in_cycle
周期内的入站流量transfer_out_cycle
周期内的出站流量transfer_all_cycle
周期内双向流量和
- cycle_start: 统计周期开始日期(可以是你机器计费周期的开始日期),时间格式为RFC3339,例如北京时间为
2022-01-11T08:00:00.00+08:00
- cycle_interval:每隔多少个周期单位(例如,周期单位为天,该值为 7,则代表每隔 7 天统计一次)
- cycle_unit 统计周期单位,默认
hour
,可选(hour
, day
, week
, month
, year
) - min/max、cover、ignore 参考基本规则配置
示例:
ID 为 3 和 4 的服务器(ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时告警
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]
通知触发模式
- 始终触发:每当 Agent 上报的状态符合告警的规则时,都会触发一次通知
- 单次触发:仅状态改变时触发一次通知,如从正常状态改变为异常状态,或异常状态恢复为正常状态
设置告警时执行任务
如果你需要在发出告警消息的同时执行某项任务,可以设置此项目
告警时触发任务
当告警状态符合从“正常”变更为“事件”时,所要执行的任务,任务应提前在任务页设置恢复时触发任务
当告警状态符合从“事件”恢复为“正常”时,所要执行的任务,任务应提前在任务页设置
`,41),n=[e];function p(r,c,u,i,D,q){return s(),t("div",null,n)}const F=o(a,[["render",p]]);export{d as __pageData,F as default};
diff --git a/assets/guide_notifications.md.831aafa5.lean.js b/assets/guide_notifications.md.831aafa5.lean.js
new file mode 100644
index 00000000..552ffce6
--- /dev/null
+++ b/assets/guide_notifications.md.831aafa5.lean.js
@@ -0,0 +1 @@
+import{_ as o,o as s,c as t,R as l}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1715016176000}'),a={name:"guide/notifications.md"},e=l("",41),n=[e];function p(r,c,u,i,D,q){return s(),t("div",null,n)}const F=o(a,[["render",p]]);export{d as __pageData,F as default};
diff --git a/assets/guide_q1.md.aedcf27f.js b/assets/guide_q1.md.2838a9d5.js
similarity index 99%
rename from assets/guide_q1.md.aedcf27f.js
rename to assets/guide_q1.md.2838a9d5.js
index d2e8f51a..b1e69a71 100644
--- a/assets/guide_q1.md.aedcf27f.js
+++ b/assets/guide_q1.md.2838a9d5.js
@@ -1,4 +1,4 @@
-import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1714697355000}'),p={name:"guide/q1.md"},o=l(`准备工作
你可以选择 CloudFlare 的 workers 进行反代,但大陆的网络你懂的,这里介绍用你自己服务器反代方式
搭建一个 TGbot api 反代,你需要:
1.一个不受 GFW 封锁的服务器(且安装好 Nginx)
2.一个域名(提前申请 SSL 证书)
NGINX 配置
编辑你 Nginx 的配置文件,在 http{} 中加上如下配置
nginx# http强制跳转到htpps
+import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1715016176000}'),p={name:"guide/q1.md"},o=l(`准备工作
你可以选择 CloudFlare 的 workers 进行反代,但大陆的网络你懂的,这里介绍用你自己服务器反代方式
搭建一个 TGbot api 反代,你需要:
1.一个不受 GFW 封锁的服务器(且安装好 Nginx)
2.一个域名(提前申请 SSL 证书)
NGINX 配置
编辑你 Nginx 的配置文件,在 http{} 中加上如下配置
nginx# http强制跳转到htpps
server {
listen 80;
listen [::]:80;
diff --git a/assets/guide_q1.md.aedcf27f.lean.js b/assets/guide_q1.md.2838a9d5.lean.js
similarity index 83%
rename from assets/guide_q1.md.aedcf27f.lean.js
rename to assets/guide_q1.md.2838a9d5.lean.js
index 14a528eb..ac60fda6 100644
--- a/assets/guide_q1.md.aedcf27f.lean.js
+++ b/assets/guide_q1.md.2838a9d5.lean.js
@@ -1 +1 @@
-import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1714697355000}'),p={name:"guide/q1.md"},o=l("",11),e=[o];function t(r,c,C,y,D,A){return a(),n("div",null,e)}const d=s(p,[["render",t]]);export{F as __pageData,d as default};
+import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1715016176000}'),p={name:"guide/q1.md"},o=l("",11),e=[o];function t(r,c,C,y,D,A){return a(),n("div",null,e)}const d=s(p,[["render",t]]);export{F as __pageData,d as default};
diff --git a/assets/guide_q2.md.7f2f4466.js b/assets/guide_q2.md.1d950da7.js
similarity index 95%
rename from assets/guide_q2.md.7f2f4466.js
rename to assets/guide_q2.md.1d950da7.js
index c52dae79..f42f2156 100644
--- a/assets/guide_q2.md.7f2f4466.js
+++ b/assets/guide_q2.md.1d950da7.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1714697355000}'),n={name:"guide/q2.md"},r=o('Agent 启动/上线 问题自检流程
- 直接执行
/opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d
查看日志是否是因为 DNS、网络不佳导致超时(timeout) nc -v 域名/IP 面板RPC端口
或者 telnet 域名/IP 面板RPC端口
来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 https://port.ping.pe/ 提供的端口检查工具进行检测。- 如果上面步骤检测正常,Agent 正常上线,尝试关闭 SELinux,如何关闭 SELinux?
',2),i=[r];function c(s,_,d,l,p,h){return t(),a("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default};
+import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1715016176000}'),n={name:"guide/q2.md"},r=o('Agent 启动/上线 问题自检流程
- 直接执行
/opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d
查看日志是否是因为 DNS、网络不佳导致超时(timeout) nc -v 域名/IP 面板RPC端口
或者 telnet 域名/IP 面板RPC端口
来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 https://port.ping.pe/ 提供的端口检查工具进行检测。- 如果上面步骤检测正常,Agent 正常上线,尝试关闭 SELinux,如何关闭 SELinux?
',2),i=[r];function c(s,_,d,l,p,h){return t(),a("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default};
diff --git a/assets/guide_q2.md.7f2f4466.lean.js b/assets/guide_q2.md.1d950da7.lean.js
similarity index 83%
rename from assets/guide_q2.md.7f2f4466.lean.js
rename to assets/guide_q2.md.1d950da7.lean.js
index fb05e86a..4aee457e 100644
--- a/assets/guide_q2.md.7f2f4466.lean.js
+++ b/assets/guide_q2.md.1d950da7.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1714697355000}'),n={name:"guide/q2.md"},r=o("",2),i=[r];function c(s,_,d,l,p,h){return t(),a("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default};
+import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1715016176000}'),n={name:"guide/q2.md"},r=o("",2),i=[r];function c(s,_,d,l,p,h){return t(),a("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default};
diff --git a/assets/guide_q3.md.4d0fcecc.js b/assets/guide_q3.md.c4637fea.js
similarity index 99%
rename from assets/guide_q3.md.4d0fcecc.js
rename to assets/guide_q3.md.c4637fea.js
index cdc84057..6a3edb30 100644
--- a/assets/guide_q3.md.4d0fcecc.js
+++ b/assets/guide_q3.md.c4637fea.js
@@ -1,4 +1,4 @@
-import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1714697355000}'),p={name:"guide/q3.md"},o=l(`反向代理 gRPC 端口(支持 Cloudflare CDN)
使用 Nginx 或者 Caddy 反向代理 gRPC
- Nginx 配置
nginxserver {
+import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1715016176000}'),p={name:"guide/q3.md"},o=l(`反向代理 gRPC 端口(支持 Cloudflare CDN)
使用 Nginx 或者 Caddy 反向代理 gRPC
- Nginx 配置
nginxserver {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name data.example.com; # 你的 Agent 连接 Dashboard 的域名
diff --git a/assets/guide_q3.md.4d0fcecc.lean.js b/assets/guide_q3.md.c4637fea.lean.js
similarity index 83%
rename from assets/guide_q3.md.4d0fcecc.lean.js
rename to assets/guide_q3.md.c4637fea.lean.js
index 96d7fd31..22cfc7f4 100644
--- a/assets/guide_q3.md.4d0fcecc.lean.js
+++ b/assets/guide_q3.md.c4637fea.lean.js
@@ -1 +1 @@
-import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1714697355000}'),p={name:"guide/q3.md"},o=l("",15),e=[o];function t(c,r,D,C,y,F){return n(),a("div",null,e)}const d=s(p,[["render",t]]);export{i as __pageData,d as default};
+import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1715016176000}'),p={name:"guide/q3.md"},o=l("",15),e=[o];function t(c,r,D,C,y,F){return n(),a("div",null,e)}const d=s(p,[["render",t]]);export{i as __pageData,d as default};
diff --git a/assets/guide_q4.md.f0523d74.js b/assets/guide_q4.md.dbf1f8e0.js
similarity index 93%
rename from assets/guide_q4.md.f0523d74.js
rename to assets/guide_q4.md.dbf1f8e0.js
index 9c8e17c8..7f239916 100644
--- a/assets/guide_q4.md.f0523d74.js
+++ b/assets/guide_q4.md.dbf1f8e0.js
@@ -1 +1 @@
-import{_ as a,o,c as s,z as e,a as t}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1714697355000}'),r={name:"guide/q4.md"},d=e("h4",{id:"实时通道断开-在线终端连接失败",tabindex:"-1"},[t("实时通道断开/在线终端连接失败 "),e("a",{class:"header-anchor",href:"#实时通道断开-在线终端连接失败","aria-label":'Permalink to "实时通道断开/在线终端连接失败"'},"")],-1),n=e("ul",null,[e("li",null,"如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket"),e("li",null,[t("确认你的反代规则中针对 /ws,/terminal 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置")])],-1),c=[d,n];function l(i,_,h,u,m,p){return o(),s("div",null,c)}const k=a(r,[["render",l]]);export{b as __pageData,k as default};
+import{_ as a,o,c as s,z as e,a as t}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1715016176000}'),r={name:"guide/q4.md"},d=e("h4",{id:"实时通道断开-在线终端连接失败",tabindex:"-1"},[t("实时通道断开/在线终端连接失败 "),e("a",{class:"header-anchor",href:"#实时通道断开-在线终端连接失败","aria-label":'Permalink to "实时通道断开/在线终端连接失败"'},"")],-1),n=e("ul",null,[e("li",null,"如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket"),e("li",null,[t("确认你的反代规则中针对 /ws,/terminal 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置")])],-1),c=[d,n];function l(i,_,h,u,m,p){return o(),s("div",null,c)}const k=a(r,[["render",l]]);export{b as __pageData,k as default};
diff --git a/assets/guide_q4.md.f0523d74.lean.js b/assets/guide_q4.md.dbf1f8e0.lean.js
similarity index 93%
rename from assets/guide_q4.md.f0523d74.lean.js
rename to assets/guide_q4.md.dbf1f8e0.lean.js
index 9c8e17c8..7f239916 100644
--- a/assets/guide_q4.md.f0523d74.lean.js
+++ b/assets/guide_q4.md.dbf1f8e0.lean.js
@@ -1 +1 @@
-import{_ as a,o,c as s,z as e,a as t}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1714697355000}'),r={name:"guide/q4.md"},d=e("h4",{id:"实时通道断开-在线终端连接失败",tabindex:"-1"},[t("实时通道断开/在线终端连接失败 "),e("a",{class:"header-anchor",href:"#实时通道断开-在线终端连接失败","aria-label":'Permalink to "实时通道断开/在线终端连接失败"'},"")],-1),n=e("ul",null,[e("li",null,"如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket"),e("li",null,[t("确认你的反代规则中针对 /ws,/terminal 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置")])],-1),c=[d,n];function l(i,_,h,u,m,p){return o(),s("div",null,c)}const k=a(r,[["render",l]]);export{b as __pageData,k as default};
+import{_ as a,o,c as s,z as e,a as t}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1715016176000}'),r={name:"guide/q4.md"},d=e("h4",{id:"实时通道断开-在线终端连接失败",tabindex:"-1"},[t("实时通道断开/在线终端连接失败 "),e("a",{class:"header-anchor",href:"#实时通道断开-在线终端连接失败","aria-label":'Permalink to "实时通道断开/在线终端连接失败"'},"")],-1),n=e("ul",null,[e("li",null,"如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket"),e("li",null,[t("确认你的反代规则中针对 /ws,/terminal 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置")])],-1),c=[d,n];function l(i,_,h,u,m,p){return o(),s("div",null,c)}const k=a(r,[["render",l]]);export{b as __pageData,k as default};
diff --git a/assets/guide_q5.md.e7bc20ce.js b/assets/guide_q5.md.66a26e0c.js
similarity index 93%
rename from assets/guide_q5.md.e7bc20ce.js
rename to assets/guide_q5.md.66a26e0c.js
index bcee03c5..6b3174ce 100644
--- a/assets/guide_q5.md.e7bc20ce.js
+++ b/assets/guide_q5.md.66a26e0c.js
@@ -1 +1 @@
-import{_ as a,o as l,c as o,z as e,a as t}from"./chunks/framework.44fd0451.js";const x=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1714697355000}'),n={name:"guide/q5.md"},s=e("h4",{id:"如何进行数据迁移、备份恢复",tabindex:"-1"},[t("如何进行数据迁移、备份恢复? "),e("a",{class:"header-anchor",href:"#如何进行数据迁移、备份恢复","aria-label":'Permalink to "如何进行数据迁移、备份恢复?"'},"")],-1),d=e("ol",null,[e("li",null,[t("先运行一键脚本,选择 "),e("code",null,"停止面板")]),e("li",null,[t("在旧服务器中打包 "),e("code",null,"/opt/nezha"),t(" 文件夹,复制到新环境相同位置解压")]),e("li",null,[t("在新环境中运行一键脚本,选择 "),e("code",null,"启动面板")])],-1),c=[s,d];function r(i,_,u,p,h,m){return l(),o("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default};
+import{_ as a,o as l,c as o,z as e,a as t}from"./chunks/framework.44fd0451.js";const x=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1715016176000}'),n={name:"guide/q5.md"},s=e("h4",{id:"如何进行数据迁移、备份恢复",tabindex:"-1"},[t("如何进行数据迁移、备份恢复? "),e("a",{class:"header-anchor",href:"#如何进行数据迁移、备份恢复","aria-label":'Permalink to "如何进行数据迁移、备份恢复?"'},"")],-1),d=e("ol",null,[e("li",null,[t("先运行一键脚本,选择 "),e("code",null,"停止面板")]),e("li",null,[t("在旧服务器中打包 "),e("code",null,"/opt/nezha"),t(" 文件夹,复制到新环境相同位置解压")]),e("li",null,[t("在新环境中运行一键脚本,选择 "),e("code",null,"启动面板")])],-1),c=[s,d];function r(i,_,u,p,h,m){return l(),o("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default};
diff --git a/assets/guide_q5.md.e7bc20ce.lean.js b/assets/guide_q5.md.66a26e0c.lean.js
similarity index 93%
rename from assets/guide_q5.md.e7bc20ce.lean.js
rename to assets/guide_q5.md.66a26e0c.lean.js
index bcee03c5..6b3174ce 100644
--- a/assets/guide_q5.md.e7bc20ce.lean.js
+++ b/assets/guide_q5.md.66a26e0c.lean.js
@@ -1 +1 @@
-import{_ as a,o as l,c as o,z as e,a as t}from"./chunks/framework.44fd0451.js";const x=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1714697355000}'),n={name:"guide/q5.md"},s=e("h4",{id:"如何进行数据迁移、备份恢复",tabindex:"-1"},[t("如何进行数据迁移、备份恢复? "),e("a",{class:"header-anchor",href:"#如何进行数据迁移、备份恢复","aria-label":'Permalink to "如何进行数据迁移、备份恢复?"'},"")],-1),d=e("ol",null,[e("li",null,[t("先运行一键脚本,选择 "),e("code",null,"停止面板")]),e("li",null,[t("在旧服务器中打包 "),e("code",null,"/opt/nezha"),t(" 文件夹,复制到新环境相同位置解压")]),e("li",null,[t("在新环境中运行一键脚本,选择 "),e("code",null,"启动面板")])],-1),c=[s,d];function r(i,_,u,p,h,m){return l(),o("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default};
+import{_ as a,o as l,c as o,z as e,a as t}from"./chunks/framework.44fd0451.js";const x=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1715016176000}'),n={name:"guide/q5.md"},s=e("h4",{id:"如何进行数据迁移、备份恢复",tabindex:"-1"},[t("如何进行数据迁移、备份恢复? "),e("a",{class:"header-anchor",href:"#如何进行数据迁移、备份恢复","aria-label":'Permalink to "如何进行数据迁移、备份恢复?"'},"")],-1),d=e("ol",null,[e("li",null,[t("先运行一键脚本,选择 "),e("code",null,"停止面板")]),e("li",null,[t("在旧服务器中打包 "),e("code",null,"/opt/nezha"),t(" 文件夹,复制到新环境相同位置解压")]),e("li",null,[t("在新环境中运行一键脚本,选择 "),e("code",null,"启动面板")])],-1),c=[s,d];function r(i,_,u,p,h,m){return l(),o("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default};
diff --git a/assets/guide_q6.md.27d95708.js b/assets/guide_q6.md.ee9618d9.js
similarity index 95%
rename from assets/guide_q6.md.27d95708.js
rename to assets/guide_q6.md.ee9618d9.js
index 03c10918..fd8eac93 100644
--- a/assets/guide_q6.md.27d95708.js
+++ b/assets/guide_q6.md.ee9618d9.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1714697355000}'),i={name:"guide/q6.md"},c=o('如何每月重置流量统计?
主页中的流量统计每次服务器重启时都会重置,如果要实现每月重置一次流量计数,可以这样实现:
- 进入管理面板的
告警
页 - 参考这篇文档,创建一个月流量告警
- 返回主页,在
服务
页中就可以看到月流量统计了,这里的统计数据不会因为服务器重启而重置
TIP
此方式可以设置任何周期,包括且不限于每小时/每天/每周/每月/每年重置流量统计,非常灵活!
',4),s=[c];function d(l,_,r,n,p,h){return t(),a("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default};
+import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1715016176000}'),i={name:"guide/q6.md"},c=o('如何每月重置流量统计?
主页中的流量统计每次服务器重启时都会重置,如果要实现每月重置一次流量计数,可以这样实现:
- 进入管理面板的
告警
页 - 参考这篇文档,创建一个月流量告警
- 返回主页,在
服务
页中就可以看到月流量统计了,这里的统计数据不会因为服务器重启而重置
TIP
此方式可以设置任何周期,包括且不限于每小时/每天/每周/每月/每年重置流量统计,非常灵活!
',4),s=[c];function d(l,_,r,n,p,h){return t(),a("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default};
diff --git a/assets/guide_q6.md.27d95708.lean.js b/assets/guide_q6.md.ee9618d9.lean.js
similarity index 83%
rename from assets/guide_q6.md.27d95708.lean.js
rename to assets/guide_q6.md.ee9618d9.lean.js
index 2c5e2d6c..e01d5f5d 100644
--- a/assets/guide_q6.md.27d95708.lean.js
+++ b/assets/guide_q6.md.ee9618d9.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1714697355000}'),i={name:"guide/q6.md"},c=o("",4),s=[c];function d(l,_,r,n,p,h){return t(),a("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default};
+import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1715016176000}'),i={name:"guide/q6.md"},c=o("",4),s=[c];function d(l,_,r,n,p,h){return t(),a("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default};
diff --git a/assets/guide_q7.md.78a6da82.js b/assets/guide_q7.md.5d5583bd.js
similarity index 97%
rename from assets/guide_q7.md.78a6da82.js
rename to assets/guide_q7.md.5d5583bd.js
index 167d4b77..1c587158 100644
--- a/assets/guide_q7.md.78a6da82.js
+++ b/assets/guide_q7.md.5d5583bd.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1714697355000}'),n={name:"guide/q7.md"},d=o('自定义 Agent 监控项目
自定义监控的网卡和硬盘分区
- 执行
/opt/nezha/agent/nezha-agent --edit-agent-config
来选择自定义的网卡和分区,然后重启 Agent 即可生效
其他运行参数
通过执行 ./nezha-agent --help
查看支持的参数,如果你使用了一键脚本安装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 时,需要启用该项配置)
',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};
+import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1715016176000}'),n={name:"guide/q7.md"},d=o('自定义 Agent 监控项目
自定义监控的网卡和硬盘分区
- 执行
/opt/nezha/agent/nezha-agent --edit-agent-config
来选择自定义的网卡和分区,然后重启 Agent 即可生效
其他运行参数
通过执行 ./nezha-agent --help
查看支持的参数,如果你使用了一键脚本安装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 时,需要启用该项配置)
',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};
diff --git a/assets/guide_q7.md.78a6da82.lean.js b/assets/guide_q7.md.5d5583bd.lean.js
similarity index 83%
rename from assets/guide_q7.md.78a6da82.lean.js
rename to assets/guide_q7.md.5d5583bd.lean.js
index 89e77dbc..7ce1ed5f 100644
--- a/assets/guide_q7.md.78a6da82.lean.js
+++ b/assets/guide_q7.md.5d5583bd.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1714697355000}'),n={name:"guide/q7.md"},d=o("",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};
+import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1715016176000}'),n={name:"guide/q7.md"},d=o("",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};
diff --git a/assets/guide_q8.md.3155c2a0.js b/assets/guide_q8.md.3155c2a0.js
new file mode 100644
index 00000000..ef072df5
--- /dev/null
+++ b/assets/guide_q8.md.3155c2a0.js
@@ -0,0 +1,6 @@
+import{_ as e,o as a,c as o,R as c}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1715016176000}'),s={name:"guide/q8.md"},t=c(`相较于 Github,Cloudflare Access 对于中国大陆用户更加友好。如您当前使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,您可以考虑切换 Cloudflare Access 作为 OAuth2 提供方
示例配置:
yamlOauth2:
+ Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
+ ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
+ ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
+ Endpoint: "https://xxxxx.cloudflareaccess.com"
+ Type: cloudflare
配置说明:
参数 获取方式 Admin My Team
-> Users
-> <具体用户>
-> User ID
ClientID/ClientSecret Access
-> Application
-> Add an Application
-> SaaS
-> OIDC
Endpoint Access
-> Application
-> Application URL
-> 只保留协议+域名的部分,路径不需要
新建 SaaS-OIDC 应用流程
前往 Zero Trust Dashboard: https://one.dash.cloudflare.com
My Team
-> Users
-> <具体用户>
-> 获取 User ID
并保存;Access
-> Application
-> Add an Application
;- 选择
SaaS
,在 Application
中输入自定义的应用名称(例如 nezha),选择 OIDC
后点击 Add application
; Scopes
选择 openid
, email
, profile
, groups
;Redirect URLs
填写你的 CallBack 地址,例如 https://dashboard.example.com/oauth2/callback
;- 记录
Client ID
、Client Secret
、Issuer
地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com
- 编辑 Dashboard 配置文件(通常在
/opt/nezha/dashboard/data/config.yaml)
,参考示例配置修改 Oauth2
配置,并重启 Dashboard 服务
身份验证策略配置
在完成 Dashboard 的设置后,您还需要在 Zero Trust Dashboard 中 Access
-> Applications
-> <应用名>
-> Policies
配置验证策略。您可以选择包括邮件OTP验证、硬件密钥验证、等十多种 SSO 验证方式,详细配置请参考 Cloudflare Zero Trust 文档
`,10),d=[t];function l(n,r,p,i,h,D){return a(),o("div",null,d)}const C=e(s,[["render",l]]);export{A as __pageData,C as default};
diff --git a/assets/guide_q8.md.3155c2a0.lean.js b/assets/guide_q8.md.3155c2a0.lean.js
new file mode 100644
index 00000000..16da1ab5
--- /dev/null
+++ b/assets/guide_q8.md.3155c2a0.lean.js
@@ -0,0 +1 @@
+import{_ as e,o as a,c as o,R as c}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1715016176000}'),s={name:"guide/q8.md"},t=c("",10),d=[t];function l(n,r,p,i,h,D){return a(),o("div",null,d)}const C=e(s,[["render",l]]);export{A as __pageData,C as default};
diff --git a/assets/guide_q8.md.fae88f0d.js b/assets/guide_q8.md.fae88f0d.js
deleted file mode 100644
index 1c0e3cf0..00000000
--- a/assets/guide_q8.md.fae88f0d.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import{_ as e,o as a,c as o,R as s}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1714697355000}'),c={name:"guide/q8.md"},t=s(`示例配置:
yamlOauth2:
- Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
- ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
- ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
- Endpoint: "https://akkia.cloudflareaccess.com"
- Type: cloudflare
配置说明:
参数 获取方式 Admin My Team
-> Users
-> <具体用户>
-> User ID
ClientID/ClientSecret Access
-> Application
-> Add an Application
-> SaaS
-> OIDC
Endpoint Access
-> Application
-> Application URL
-> 只保留协议+域名的部分,路径不需要
新建SaaS-OIDC应用流程
Zero Trust Dashboard: https://one.dash.cloudflare.com
Access
-> Application
-> Add an Application
;- 选择
SaaS
,在Application
中输入自定义的应用名称(例如nezha),选择OIDC
后点击Add application
; Scopes
选择openid
, email
, profile
, groups
;Redirect URLs
填写你的CallBack地址,例如 https://monitor.example.com/oauth2/callback
;- 记录
Client ID
、Client Secret
、Issuer
地址中协议与域名的部分,例如https://akkia.cloudflareaccess.com
- 编辑Dashboard配置文件(通常在
/opt/nezha/dashboard/data/config.yaml)
,参考示例配置修改Oauth2
配置,并重启Dashboard服务
`,7),l=[t];function d(n,p,r,i,h,D){return a(),o("div",null,l)}const A=e(c,[["render",d]]);export{y as __pageData,A as default};
diff --git a/assets/guide_q8.md.fae88f0d.lean.js b/assets/guide_q8.md.fae88f0d.lean.js
deleted file mode 100644
index 4ff714e9..00000000
--- a/assets/guide_q8.md.fae88f0d.lean.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as e,o as a,c as o,R as s}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1714697355000}'),c={name:"guide/q8.md"},t=s("",7),l=[t];function d(n,p,r,i,h,D){return a(),o("div",null,l)}const A=e(c,[["render",d]]);export{y as __pageData,A as default};
diff --git a/assets/guide_servers.md.52611fd4.lean.js b/assets/guide_servers.md.52611fd4.lean.js
deleted file mode 100644
index d32b4efd..00000000
--- a/assets/guide_servers.md.52611fd4.lean.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1714697355000}'),l={name:"guide/servers.md"},n=o("",63),p=[n];function t(r,c,d,i,D,h){return s(),e("div",null,p)}const C=a(l,[["render",t]]);export{u as __pageData,C as default};
diff --git a/assets/guide_servers.md.52611fd4.js b/assets/guide_servers.md.6457054d.js
similarity index 53%
rename from assets/guide_servers.md.52611fd4.js
rename to assets/guide_servers.md.6457054d.js
index 467bf2c4..28a5b373 100644
--- a/assets/guide_servers.md.52611fd4.js
+++ b/assets/guide_servers.md.6457054d.js
@@ -1,4 +1,4 @@
-import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1714697355000}'),l={name:"guide/servers.md"},n=o(`服务器
介绍
服务器区域负责管理 Agent,是哪吒探针中最基础的区域,也是其他功能的基础。
新增服务器
第一步是新增服务器,可以自定义名称、分组、排序和备注。
拥有相同分组的服务器会在受支持的主题中划分到一起进行显示,备注仅会在后台显示,无需担心泄露信息。
安装 Agent
请参考前文安装 Agent
推荐使用一键安装,即配置好参数后,点击服务器一键安装列上的对应的系统图标即可复制安装命令,在相应服务器上进行安装。
强制更新
Agent 更新相关的参数是 自定义 Agent 监控项目 中的 --disable-auto-update
和 --disable-force-update
。
默认情况下,Agent 会自动更新,无需干预。但当用户关闭自动更新后,也可以选中指定服务器进行强制更新。
disable-force-update
开启时此功能不生效。
数据列
- 版本号: 记录 Agent 当前版本
- 对游客隐藏: 为 True 时,游客在面板中无法查看到此服务器
- 启用DDNS: 为 True 时,当该服务器IP发生变化,Dashboard 会自动更新 DNS 记录
- DDNS域名:为该服务器配置的 DDNS 域名
- 密钥: 即 secret\\key,配置 Agent 时会用到,用于验证 Agent 与 Dashboard 的通信
- 一键安装: 点击相应的系统按钮,复制命令到服务器执行即可一键安装
- 管理: 分别为连接 WebShell,修改服务器配置,删除服务器
在线终端
即 WebShell,disable-command-execute
开启时此功能不生效。
Linux 和 Windows 均可用,可使用 Ctrl+Shift+V 粘贴。
连接失败请参考实时通道断开/在线终端连接失败。
注意在线终端功能中,Agent 也是通过 WebSocket 连接到公开访问域名,而非通过 gRPC 交互。
DDNS 功能
DDNS 功能适用于使用动态 IP 的服务器,当 Agent 上报了一个新的 IP,Dashboard 会根据配置自动更新 DNS 记录。
为什么我要使用哪吒监控的 DDNS 功能?
- 方便集中管理 DDNS 设置,而不是在每台机器上都部署一个 DDNS 服务;
- 仅在面板机上保存您的机密信息,防止外泄。
配置说明
目前 DDNS 功能支持两种形式的配置:单配置和多配置。如使用单配置,则所有 Agent 服务器都使用相同的配置更新 DDNS;如使用多配置,则可为每台服务器指定一个配置更新 DDNS,灵活性更强。
单配置
yamlDDNS:
+import{_ as s,o as a,c as o,R as e}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1715016176000}'),l={name:"guide/servers.md"},n=e(`服务器
介绍
服务器区域负责管理 Agent,是哪吒探针中最基础的区域,也是其他功能的基础。
新增服务器
第一步是新增服务器,可以自定义名称、分组、排序和备注。
拥有相同分组的服务器会在受支持的主题中划分到一起进行显示,备注仅会在后台显示,无需担心泄露信息。
安装 Agent
请参考前文安装 Agent
推荐使用一键安装,即配置好参数后,点击服务器一键安装列上的对应的系统图标即可复制安装命令,在相应服务器上进行安装。
强制更新
Agent 更新相关的参数是 自定义 Agent 监控项目 中的 --disable-auto-update
和 --disable-force-update
。
默认情况下,Agent 会自动更新,无需干预。但当用户关闭自动更新后,也可以选中指定服务器进行强制更新。
disable-force-update
开启时此功能不生效。
数据列
- 版本号: 记录 Agent 当前版本
- 对游客隐藏: 为 True 时,游客在面板中无法查看到此服务器
- 启用DDNS: 为 True 时,当该服务器IP发生变化,Dashboard 会自动更新 DNS 记录
- DDNS域名:为该服务器配置的 DDNS 域名
- 密钥: 即 secret\\key,配置 Agent 时会用到,用于验证 Agent 与 Dashboard 的通信
- 一键安装: 点击相应的系统按钮,复制命令到服务器执行即可一键安装
- 管理: 分别为连接 WebShell,修改服务器配置,删除服务器
在线终端
即 WebShell,disable-command-execute
开启时此功能不生效。
Linux 和 Windows 均可用,可使用 Ctrl+Shift+V 粘贴。
连接失败请参考实时通道断开/在线终端连接失败。
注意在线终端功能中,Agent 也是通过 WebSocket 连接到公开访问域名,而非通过 gRPC 交互。
DDNS 功能
DDNS 功能适用于使用动态 IP 的服务器,当 Agent 上报了一个新的 IP,Dashboard 会根据配置自动更新 DNS 记录
为什么我要使用哪吒监控的 DDNS 功能?
- 方便集中管理 DDNS 设置,而不是在每台机器上都部署一个 DDNS 服务
- 仅在面板机上保存您的机密信息,防止外泄
配置说明
目前 DDNS 功能支持两种形式的配置:单配置和多配置。如使用单配置,则所有 Agent 服务器都使用相同的配置更新 DDNS;如使用多配置,则可为每台服务器指定一个配置更新 DDNS,灵活性更强
单配置
yamlDDNS:
Enable: true
Provider: "webhook"
AccessID: ""
@@ -8,10 +8,10 @@ import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const u=
WebhookRequestBody: ""
WebhookHeaders: ""
MaxRetries: 3
- Profiles: null
Enable
布尔值,选择是否开启 DDNS 功能。
Provider
DDNS 供应商的名称。目前支持 webhook
、cloudflare
以及 tencentcloud
。
AccessID
DDNS 供应商的令牌 ID。
仅适用于供应商 tencentcloud
。
AccessSecret
DDNS 供应商的令牌 Secret。
仅适用于供应商 cloudflare
及 tencentcloud
。
WebhookMethod
Webhook 的请求方法。例如 GET
、POST
等。
仅适用于供应商 webhook
。
WebhookURL
Webhook 的请求地址。
仅适用于供应商 webhook
。
WebhookRequestBody
Webhook 的请求体。
仅适用于供应商 webhook
。
WebhookHeaders
Webhook 的请求头。
仅适用于供应商 webhook
。
MaxRetries
当请求失败时,重试请求的次数。
Profiles
多配置设定。在单配置设定中,此项不进行处理。
TIP
WebhookURL
、WebhookRequestBody
以及WebhookHeaders
可以使用如下参数:
{ip}
- 主机当前IP
{domain}
- ddns域名
{type}
- IP类型,可能为"ipv4"和"ipv6"
{access_id}
- 凭据1
{access_secret}
- 凭据2
例如以下配置:
WebhookHeaders: |
+ Profiles: null
Enable
布尔值,选择是否开启 DDNS 功能Provider
DDNS 供应商的名称;目前支持 webhook
、cloudflare
以及 tencentcloud
AccessID
DDNS 供应商的令牌 ID;仅适用于供应商 tencentcloud
AccessSecret
DDNS 供应商的令牌 Secret;仅适用于供应商 cloudflare
及 tencentcloud
WebhookMethod
Webhook 的请求方法。例如 GET
、POST
等;仅适用于供应商 webhook
WebhookURL
Webhook 的请求地址;仅适用于供应商 webhook
WebhookRequestBody
Webhook 的请求体;仅适用于供应商 webhook
WebhookHeaders
Webhook 的请求头;仅适用于供应商 webhook
MaxRetries
当请求失败时,重试请求的次数Profiles
多配置设定;在单配置设定中,此项忽略
WebhookURL
、WebhookRequestBody
以及WebhookHeaders
可以包含以下参数:
{ip}
- 主机当前IP{domain}
- ddns域名{type}
- IP类型,可能为"ipv4"和"ipv6"{access_id}
- 凭据1{access_secret}
- 凭据2
配置示例:
WebhookHeaders: |
a:{access_id}
b:{access_secret}
-WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'
多配置
当使用多配置时,请将 DDNS.Provider
留空。如 DDNS.Provider
的值不为空,多配置设定将被无视。
yamlDDNS:
+WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'
多配置
当使用多配置时,请将 DDNS.Provider
留空。如 DDNS.Provider
的值不为空,多配置设定将被忽略
yamlDDNS:
Enable: true
MaxRetries: 3
Profiles:
@@ -22,5 +22,5 @@ import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const u=
WebhookMethod: ""
WebhookURL: ""
WebhookRequestBody: ""
- WebhookHeaders: ""
Profiles
多配置设定。
example
你的 DDNS 配置名,可填任意字符串。
其它选项请参考单配置段。
Dashboard 配置
修改好配置文件后,还需要在 Dashboard 中修改服务器设置才能使 DDNS 生效。 DDNS 相关选项说明:
- 启用DDNS 为此服务器启用 DDNS 功能。
- 启用DDNS IPv4 更新 DDNS 记录时,启用 IPv4 解析。
- 启用DDNS IPv6 更新 DDNS 记录时,启用 IPv6 解析。
- DDNS域名 记录指向的域名。
- DDNS配置 在多配置情况下,要使用的 DDNS 配置。
TIP
在 Dashboard 设置中修改配置并保存时,会在 config.yaml
中填入默认配置选项,此时 DDNS 段中会同时存在单配置和多配置的选项。
如需使用单配置,请无视 Profiles
选项相关内容。
如需使用多配置,请将 DDNS.Provider
留空。如 DDNS.Provider
的值不为空,多配置设定将被无视。
查看日志
在 Dashboard 的日志中,可以看到 DDNS 功能的相关日志,配置正确时,更新 DNS 记录时会有相应的日志记录。
shelldashboard_1 | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3)
-dashboard_1 | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功
`,63),p=[n];function t(r,c,d,i,D,h){return s(),e("div",null,p)}const C=a(l,[["render",t]]);export{u as __pageData,C as default};
+ WebhookHeaders: ""
Profiles
多配置设定example
可替换为 DDNS 配置名,可填任意字符串
其它选项请参考单配置段。
Dashboard 配置
修改配置文件后,还需要在 Dashboard 中修改服务器设置才能使 DDNS 生效
DDNS 相关选项说明:
启用DDNS
为此服务器启用 DDNS 功能启用DDNS IPv4
更新 DDNS 记录时,启用 IPv4 解析启用DDNS IPv6
更新 DDNS 记录时,启用 IPv6 解析DDNS域名
记录指向的域名DDNS配置
在多配置情况下,要使用的 DDNS 配置名
WARNING
在 Dashboard 设置中修改配置并保存时,会在 config.yaml
中填入默认配置选项,此时 DDNS 段中会同时存在单配置和多配置
- 如需使用单配置,请配置
DDNS.Provider
,并忽略 Profiles
选项相关内容。 - 如需使用多配置,请将
DDNS.Provider
留空。如 DDNS.Provider
的值不为空,多配置设定将被忽略。
查看日志
在 Dashboard 的日志中,可以看到 DDNS 功能的相关日志,配置正确时,更新 DNS 记录时会有相应的日志记录。
shelldashboard_1 | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3)
+dashboard_1 | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功
`,40),p=[n];function c(t,r,D,d,i,y){return a(),o("div",null,p)}const h=s(l,[["render",c]]);export{F as __pageData,h as default};
diff --git a/assets/guide_servers.md.6457054d.lean.js b/assets/guide_servers.md.6457054d.lean.js
new file mode 100644
index 00000000..7b17a2bf
--- /dev/null
+++ b/assets/guide_servers.md.6457054d.lean.js
@@ -0,0 +1 @@
+import{_ as s,o as a,c as o,R as e}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1715016176000}'),l={name:"guide/servers.md"},n=e("",40),p=[n];function c(t,r,D,d,i,y){return a(),o("div",null,p)}const h=s(l,[["render",c]]);export{F as __pageData,h as default};
diff --git a/assets/guide_services.md.1263f8b6.js b/assets/guide_services.md.2d2aed5a.js
similarity index 98%
rename from assets/guide_services.md.1263f8b6.js
rename to assets/guide_services.md.2d2aed5a.js
index ce39ec40..05b3b2e8 100644
--- a/assets/guide_services.md.1263f8b6.js
+++ b/assets/guide_services.md.2d2aed5a.js
@@ -1 +1 @@
-import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1714697355000}'),l={name:"guide/services.md"},c=a('服务区域是设置 Agent 监控外部网站或服务器的功能设置区
设置好的服务监控可以在主页中的 “服务” 页查看过去 30 天的可用性监控结果
使用方法
如需新增一个监控,可以进入管理面板中的 “服务” 页,点击“添加监控”
新增一个服务监控,你需要设置以下参数:
名称
- 自定义一个名称
类型
- 选择一个监控类型,目前哪吒监控支持三种监控类型,分别是 “HTTP-GET”、“ICMP-Ping” 和 “TCP-Ping”
目标
- 根据你选择的类型不同,目标的设置方法也不同
HTTP-GET
: 选择此类型,你应该输入一个URL作为目标,URL需添加 http://
或 https://
如果你的目标URL是 https://
,将会同时监控该URL的SSL证书,当SSL证书到期或发生变更,会触发提醒
例如: https://example.com
ICMP-Ping
: 选择此类型时,你应该输入一个域名或IP,不含端口号
例如:1.1.1.1 或 example.com
TCP-Ping
: 选择此类型时,你应该输入一个域名或IP并包含端口号
例如:1.1.1.1:80 或 example.com:22
请求间隔
: 设定 Agent 每次请求目标的时间间隔,以秒为单位
覆盖范围
: 选择一条规则来确定要使用哪些 Agent 来请求目标
特定服务器
: 配合覆盖范围使用,选择规则内需要排除的 Agent
通知方式组
: 选择你已经在 “告警” 页设置好的通知方式,点击这里了解详情
启用故障通知
: 根据需要选择是否接收目标故障通知,默认为不勾选
设置完成后,点击 “添加” 即可
稍等片刻前往主页的 “服务” 页,查看监控结果
延迟变化告警
哪吒监控可以监测并统计 Agent 到目标服务器之间的延迟,在发生较大变化的情况下发送通知
利用此功能可以帮助你监控服务器的线路是否发生了变化
启用延迟通知
: 开启时,当 Agent 至目标服务器的延迟大于最高延迟
或小于最低延迟
时,将会发送告警通知
告警时触发任务
如果你需要在服务监控告警触发时执行一些任务,可以勾选 “启用触发任务” 并在“告警时触发任务”和“恢复时触发任务”中选择你已经提前设置好的触发任务
网络延迟图表
在服务页中设置的 TCP-Ping 和 ICMP-Ping 类型的监控都会自动启用监控图表功能
在主页的 “网络” 页中,你可以查看历史网络延迟监控图表
图表中的数据是根据 Agent 到目标服务器的延迟统计而来,你可以点击 Agent 的名称来切换图表
在图表中,可以取消勾选目标服务器的名称来隐藏或显示对应的数据
管理监控
如需对已有的服务监控进行管理,可以前往管理面板中的 “服务” 页
选择一条监控配置,点击右侧的图标进行编辑或删除
',19),r=[c];function i(d,n,p,s,h,u){return o(),t("div",null,r)}const g=e(l,[["render",i]]);export{_ as __pageData,g as default};
+import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1715016176000}'),l={name:"guide/services.md"},c=a('服务区域是设置 Agent 监控外部网站或服务器的功能设置区
设置好的服务监控可以在主页中的 “服务” 页查看过去 30 天的可用性监控结果
使用方法
如需新增一个监控,可以进入管理面板中的 “服务” 页,点击“添加监控”
新增一个服务监控,你需要设置以下参数:
名称
- 自定义一个名称
类型
- 选择一个监控类型,目前哪吒监控支持三种监控类型,分别是 “HTTP-GET”、“ICMP-Ping” 和 “TCP-Ping”
目标
- 根据你选择的类型不同,目标的设置方法也不同
HTTP-GET
: 选择此类型,你应该输入一个URL作为目标,URL需添加 http://
或 https://
如果你的目标URL是 https://
,将会同时监控该URL的SSL证书,当SSL证书到期或发生变更,会触发提醒
例如: https://example.com
ICMP-Ping
: 选择此类型时,你应该输入一个域名或IP,不含端口号
例如:1.1.1.1 或 example.com
TCP-Ping
: 选择此类型时,你应该输入一个域名或IP并包含端口号
例如:1.1.1.1:80 或 example.com:22
请求间隔
: 设定 Agent 每次请求目标的时间间隔,以秒为单位
覆盖范围
: 选择一条规则来确定要使用哪些 Agent 来请求目标
特定服务器
: 配合覆盖范围使用,选择规则内需要排除的 Agent
通知方式组
: 选择你已经在 “告警” 页设置好的通知方式,点击这里了解详情
启用故障通知
: 根据需要选择是否接收目标故障通知,默认为不勾选
设置完成后,点击 “添加” 即可
稍等片刻前往主页的 “服务” 页,查看监控结果
延迟变化告警
哪吒监控可以监测并统计 Agent 到目标服务器之间的延迟,在发生较大变化的情况下发送通知
利用此功能可以帮助你监控服务器的线路是否发生了变化
启用延迟通知
: 开启时,当 Agent 至目标服务器的延迟大于最高延迟
或小于最低延迟
时,将会发送告警通知
告警时触发任务
如果你需要在服务监控告警触发时执行一些任务,可以勾选 “启用触发任务” 并在“告警时触发任务”和“恢复时触发任务”中选择你已经提前设置好的触发任务
网络延迟图表
在服务页中设置的 TCP-Ping 和 ICMP-Ping 类型的监控都会自动启用监控图表功能
在主页的 “网络” 页中,你可以查看历史网络延迟监控图表
图表中的数据是根据 Agent 到目标服务器的延迟统计而来,你可以点击 Agent 的名称来切换图表
在图表中,可以取消勾选目标服务器的名称来隐藏或显示对应的数据
管理监控
如需对已有的服务监控进行管理,可以前往管理面板中的 “服务” 页
选择一条监控配置,点击右侧的图标进行编辑或删除
',19),r=[c];function i(d,n,p,s,h,u){return o(),t("div",null,r)}const g=e(l,[["render",i]]);export{_ as __pageData,g as default};
diff --git a/assets/guide_services.md.1263f8b6.lean.js b/assets/guide_services.md.2d2aed5a.lean.js
similarity index 84%
rename from assets/guide_services.md.1263f8b6.lean.js
rename to assets/guide_services.md.2d2aed5a.lean.js
index 04439c08..a13e8be4 100644
--- a/assets/guide_services.md.1263f8b6.lean.js
+++ b/assets/guide_services.md.2d2aed5a.lean.js
@@ -1 +1 @@
-import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1714697355000}'),l={name:"guide/services.md"},c=a("",19),r=[c];function i(d,n,p,s,h,u){return o(),t("div",null,r)}const g=e(l,[["render",i]]);export{_ as __pageData,g as default};
+import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1715016176000}'),l={name:"guide/services.md"},c=a("",19),r=[c];function i(d,n,p,s,h,u){return o(),t("div",null,r)}const g=e(l,[["render",i]]);export{_ as __pageData,g as default};
diff --git a/assets/guide_settings.md.7dbd439f.js b/assets/guide_settings.md.50a66d39.js
similarity index 99%
rename from assets/guide_settings.md.7dbd439f.js
rename to assets/guide_settings.md.50a66d39.js
index e016e9d5..9e6f4d7c 100644
--- a/assets/guide_settings.md.7dbd439f.js
+++ b/assets/guide_settings.md.50a66d39.js
@@ -1,4 +1,4 @@
-import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1714697355000}'),o={name:"guide/settings.md"},p=l(`站点标题
你可以在此项中自定义站点标题
管理员列表
如果你修改了自己的 Github, Gitlab 或 Gitee 的用户名,需要在此项中同步修改,否则无法登录,多个用户请用逗号隔开: user1,user2
如需更改管理员账户,请前往 /opt/nezha/dashboard/data/config.yaml
,重新设置新的管理员 Client ID
和 Client Secret
界面主题
在这里选择前台和后台界面主题,如果选项中没有某个已存在的主题,请更新面板
启用 Custom 主题前,你需要在提前安装自定义主题,否则启用该项后,面板将无法正常显示
Language
哪吒监控目前支持以下语言:
- 简体中文
- 繁體中文
- English
- Español
我们欢迎您对翻译进行勘误或贡献更多语言
自定义代码
可以在此修改 LOGO、修改色调、添加美化代码和统计代码等。
WARNING
自定义代码仅在游客首页生效,管理面板不生效
由于不同主题的代码不同,如确需修改管理面板中的内容,请修改 Docker 中的主题文件
默认主题更改进度条颜色示例
html<style>
+import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1715016176000}'),o={name:"guide/settings.md"},p=l(`站点标题
你可以在此项中自定义站点标题
管理员列表
如果你修改了自己的 Github, Gitlab 或 Gitee 的用户名,需要在此项中同步修改,否则无法登录,多个用户请用逗号隔开: user1,user2
如需更改管理员账户,请前往 /opt/nezha/dashboard/data/config.yaml
,重新设置新的管理员 Client ID
和 Client Secret
界面主题
在这里选择前台和后台界面主题,如果选项中没有某个已存在的主题,请更新面板
启用 Custom 主题前,你需要在提前安装自定义主题,否则启用该项后,面板将无法正常显示
Language
哪吒监控目前支持以下语言:
- 简体中文
- 繁體中文
- English
- Español
我们欢迎您对翻译进行勘误或贡献更多语言
自定义代码
可以在此修改 LOGO、修改色调、添加美化代码和统计代码等。
WARNING
自定义代码仅在游客首页生效,管理面板不生效
由于不同主题的代码不同,如确需修改管理面板中的内容,请修改 Docker 中的主题文件
默认主题更改进度条颜色示例
html<style>
.ui.fine.progress> .bar {
background-color: pink !important;
}
diff --git a/assets/guide_settings.md.7dbd439f.lean.js b/assets/guide_settings.md.50a66d39.lean.js
similarity index 70%
rename from assets/guide_settings.md.7dbd439f.lean.js
rename to assets/guide_settings.md.50a66d39.lean.js
index 0f30afdf..dc6cb49b 100644
--- a/assets/guide_settings.md.7dbd439f.lean.js
+++ b/assets/guide_settings.md.50a66d39.lean.js
@@ -1 +1 @@
-import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1714697355000}'),o={name:"guide/settings.md"},p=l("",40),e=[p];function t(r,c,D,F,y,i){return a(),n("div",null,e)}const A=s(o,[["render",t]]);export{h as __pageData,A as default};
+import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1715016176000}'),o={name:"guide/settings.md"},p=l("",40),e=[p];function t(r,c,D,F,y,i){return a(),n("div",null,e)}const A=s(o,[["render",t]]);export{h as __pageData,A as default};
diff --git a/assets/guide_tasks.md.19a7bc71.js b/assets/guide_tasks.md.47a7396a.js
similarity index 98%
rename from assets/guide_tasks.md.19a7bc71.js
rename to assets/guide_tasks.md.47a7396a.js
index a8c8aa46..946f637d 100644
--- a/assets/guide_tasks.md.19a7bc71.js
+++ b/assets/guide_tasks.md.47a7396a.js
@@ -1 +1 @@
-import{_ as e,o,c as a,R as c}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1714697355000}'),d={name:"guide/tasks.md"},t=c('在任务区域中,可以设置计划任务,触发任务,多服务器批量执行任务
哪吒监控支持推送命令到 Agent 执行,因此此功能非常灵活,使用此功能可以定期结合 restic、rclone 给服务器备份,定期重启某项服务来重置网络连接。也可以配合告警通知,在触发告警时执行某项任务,如 CPU 在长时期处于高占用的情况下运行某个脚本。
使用方法
进入管理面板的 “任务” 页,点击 “添加计划任务”
添加计划任务你需要填入以下参数:
名称
- 自定义一个任务名称
任务类型
- 选择任务的类型
计划任务 - 按下方设置的计划时间,周期性执行任务
触发任务 - 仅被 API 或告警规则触发的任务,每次触发执行一次
计划
- (使用触发任务类型时不生效)设置计划时间,时间的格式为: * * * * * *
分别对应 秒 分 时 天 月 星期
,详情见计划表达式格式
如:0 0 3 * * *
对应为 每天3点
命令
- 你可以在这里设置需要执行的命令,就像写 Shell/Bat 脚本一样,但是不推荐换行,多个命令使用 &&/&
连接
例如执行定期重启命令,可以在这里输入 reboot
覆盖范围
和 特定服务器
- 跟“服务”页中的设置类似,选择规则来确定哪些 Agent 执行计划任务
使用触发任务类型时,可选择由触发的服务器执行
通知方式组
- 选择你已经在 “告警” 页设置好的通知方式,点击这里了解详情
推送成功的消息
- 勾选此项,任务执行成功后会触发消息通知
管理任务
如需对已有的计划任务进行管理,可以前往管理面板中的 “任务” 页
选择一条任务配置,右侧的三个图标,分别是:
立即执行
- 点击后将忽略计划时间,立刻执行任务编辑
- 点击可以修改任务配置删除
- 删除这条计划任务
常见问题
- xxx 命令找不到
如果运行失败,提示 xxx 命令找不到,可能是 PATH 环境变量的问题,Linux 服务器在命令开头加入 source ~/.bashrc
或者使用绝对路径执行
',10),r=[t];function i(l,s,n,p,_,h){return o(),a("div",null,r)}const m=e(d,[["render",i]]);export{u as __pageData,m as default};
+import{_ as e,o,c as a,R as c}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1715016176000}'),d={name:"guide/tasks.md"},t=c('在任务区域中,可以设置计划任务,触发任务,多服务器批量执行任务
哪吒监控支持推送命令到 Agent 执行,因此此功能非常灵活,使用此功能可以定期结合 restic、rclone 给服务器备份,定期重启某项服务来重置网络连接。也可以配合告警通知,在触发告警时执行某项任务,如 CPU 在长时期处于高占用的情况下运行某个脚本。
使用方法
进入管理面板的 “任务” 页,点击 “添加计划任务”
添加计划任务你需要填入以下参数:
名称
- 自定义一个任务名称
任务类型
- 选择任务的类型
计划任务 - 按下方设置的计划时间,周期性执行任务
触发任务 - 仅被 API 或告警规则触发的任务,每次触发执行一次
计划
- (使用触发任务类型时不生效)设置计划时间,时间的格式为: * * * * * *
分别对应 秒 分 时 天 月 星期
,详情见计划表达式格式
如:0 0 3 * * *
对应为 每天3点
命令
- 你可以在这里设置需要执行的命令,就像写 Shell/Bat 脚本一样,但是不推荐换行,多个命令使用 &&/&
连接
例如执行定期重启命令,可以在这里输入 reboot
覆盖范围
和 特定服务器
- 跟“服务”页中的设置类似,选择规则来确定哪些 Agent 执行计划任务
使用触发任务类型时,可选择由触发的服务器执行
通知方式组
- 选择你已经在 “告警” 页设置好的通知方式,点击这里了解详情
推送成功的消息
- 勾选此项,任务执行成功后会触发消息通知
管理任务
如需对已有的计划任务进行管理,可以前往管理面板中的 “任务” 页
选择一条任务配置,右侧的三个图标,分别是:
立即执行
- 点击后将忽略计划时间,立刻执行任务编辑
- 点击可以修改任务配置删除
- 删除这条计划任务
常见问题
- xxx 命令找不到
如果运行失败,提示 xxx 命令找不到,可能是 PATH 环境变量的问题,Linux 服务器在命令开头加入 source ~/.bashrc
或者使用绝对路径执行
',10),r=[t];function i(l,s,n,p,_,h){return o(),a("div",null,r)}const m=e(d,[["render",i]]);export{u as __pageData,m as default};
diff --git a/assets/guide_tasks.md.19a7bc71.lean.js b/assets/guide_tasks.md.47a7396a.lean.js
similarity index 84%
rename from assets/guide_tasks.md.19a7bc71.lean.js
rename to assets/guide_tasks.md.47a7396a.lean.js
index c77ce29c..127cb7f3 100644
--- a/assets/guide_tasks.md.19a7bc71.lean.js
+++ b/assets/guide_tasks.md.47a7396a.lean.js
@@ -1 +1 @@
-import{_ as e,o,c as a,R as c}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1714697355000}'),d={name:"guide/tasks.md"},t=c("",10),r=[t];function i(l,s,n,p,_,h){return o(),a("div",null,r)}const m=e(d,[["render",i]]);export{u as __pageData,m as default};
+import{_ as e,o,c as a,R as c}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1715016176000}'),d={name:"guide/tasks.md"},t=c("",10),r=[t];function i(l,s,n,p,_,h){return o(),a("div",null,r)}const m=e(d,[["render",i]]);export{u as __pageData,m as default};
diff --git a/assets/index.md.8d0bff6a.js b/assets/index.md.1261be22.js
similarity index 95%
rename from assets/index.md.8d0bff6a.js
rename to assets/index.md.1261be22.js
index 641c2462..6c00baae 100644
--- a/assets/index.md.8d0bff6a.js
+++ b/assets/index.md.1261be22.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"使用文档","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"使用文档","hero":{"name":"哪吒监控","text":"开源、轻量、易用的服务器监控、运维工具","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"预览","link":"https://ops.naibahq.com"},{"theme":"alt","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键安装","details":"支持一键安装面板和监控服务,使用方便。主流系统包括Linux、Windows、MacOS、OpenWRT以及群晖均受支持"},{"title":"实时监控","details":"支持同时监控多个服务器的状态,提供历史延迟图表,并可监控网页、端口可用性和SSL证书状态。支持故障和流量等状态告警,可通过Telegram、邮件、微信等多种通知方式进行提醒"},{"title":"轻松运维","details":"可使用API获取服务器状态,支持WebSSH、DDNS和流量监控,可设置定时和触发任务并批量执行服务器任务"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1714697355000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return t(),a("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"使用文档","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"使用文档","hero":{"name":"哪吒监控","text":"开源、轻量、易用的服务器监控、运维工具","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"预览","link":"https://ops.naibahq.com"},{"theme":"alt","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键安装","details":"支持一键安装面板和监控服务,使用方便。主流系统包括Linux、Windows、MacOS、OpenWRT以及群晖均受支持"},{"title":"实时监控","details":"支持同时监控多个服务器的状态,提供历史延迟图表,并可监控网页、端口可用性和SSL证书状态。支持故障和流量等状态告警,可通过Telegram、邮件、微信等多种通知方式进行提醒"},{"title":"轻松运维","details":"可使用API获取服务器状态,支持WebSSH、DDNS和流量监控,可设置定时和触发任务并批量执行服务器任务"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1715016176000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return t(),a("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default};
diff --git a/assets/index.md.8d0bff6a.lean.js b/assets/index.md.1261be22.lean.js
similarity index 95%
rename from assets/index.md.8d0bff6a.lean.js
rename to assets/index.md.1261be22.lean.js
index 641c2462..6c00baae 100644
--- a/assets/index.md.8d0bff6a.lean.js
+++ b/assets/index.md.1261be22.lean.js
@@ -1 +1 @@
-import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"使用文档","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"使用文档","hero":{"name":"哪吒监控","text":"开源、轻量、易用的服务器监控、运维工具","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"预览","link":"https://ops.naibahq.com"},{"theme":"alt","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键安装","details":"支持一键安装面板和监控服务,使用方便。主流系统包括Linux、Windows、MacOS、OpenWRT以及群晖均受支持"},{"title":"实时监控","details":"支持同时监控多个服务器的状态,提供历史延迟图表,并可监控网页、端口可用性和SSL证书状态。支持故障和流量等状态告警,可通过Telegram、邮件、微信等多种通知方式进行提醒"},{"title":"轻松运维","details":"可使用API获取服务器状态,支持WebSSH、DDNS和流量监控,可设置定时和触发任务并批量执行服务器任务"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1714697355000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return t(),a("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default};
+import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"使用文档","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"使用文档","hero":{"name":"哪吒监控","text":"开源、轻量、易用的服务器监控、运维工具","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"预览","link":"https://ops.naibahq.com"},{"theme":"alt","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键安装","details":"支持一键安装面板和监控服务,使用方便。主流系统包括Linux、Windows、MacOS、OpenWRT以及群晖均受支持"},{"title":"实时监控","details":"支持同时监控多个服务器的状态,提供历史延迟图表,并可监控网页、端口可用性和SSL证书状态。支持故障和流量等状态告警,可通过Telegram、邮件、微信等多种通知方式进行提醒"},{"title":"轻松运维","details":"可使用API获取服务器状态,支持WebSSH、DDNS和流量监控,可设置定时和触发任务并批量执行服务器任务"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1715016176000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return t(),a("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default};
diff --git a/case/case1.html b/case/case1.html
index 26013874..7745c7fb 100644
--- a/case/case1.html
+++ b/case/case1.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/case/case2.html b/case/case2.html
index 0035b39f..b4840697 100644
--- a/case/case2.html
+++ b/case/case2.html
@@ -11,13 +11,15 @@
-
+
+
+
-
-
diff --git a/case/case3.html b/case/case3.html
index c278d75d..d78f9ed0 100644
--- a/case/case3.html
+++ b/case/case3.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/case/case4.html b/case/case4.html
index e43363f4..07382324 100644
--- a/case/case4.html
+++ b/case/case4.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/case/case5.html b/case/case5.html
index 77f01c00..122618bc 100644
--- a/case/case5.html
+++ b/case/case5.html
@@ -10,8 +10,10 @@
-
+
+
+
@@ -61,8 +63,8 @@
|-- nezha.pem # SSL/TLS 证书文件
|-- cloudflared # Cloudflare Argo 隧道主程序
|-- grpcwebproxy # gRPC 反代主程序
-`-- nezha-agent # 哪吒客户端,用于监控本地 localhost
鸣谢下列作者的文章和项目:
- 热心的朝阳群众 Robin,讨论哪吒服务端与客户端的关系,从而诞生了此项目
- 哪吒官网: https://nezha.wiki/ , TG 群: https://t.me/nezhamonitoring
- 共穷国际老中医: http://solitud.es/
- Akkia's Blog: https://blog.akkia.moe/
- 胡桃's Blog: https://blog.萝莉.org/
- HiFeng's Blog: https://www.hicairo.com/
- 用 Cloudflare Tunnel 进行内网穿透: https://blog.outv.im/2021/cloudflared-tunnel/
- 如何给 GitHub Actions 添加自己的 Runner 主机: https://cloud.tencent.com/developer/article/1756690
- github self-hosted runner 添加与启动: https://blog.csdn.net/sinat_32188225/article/details/125978331
- 如何从Docker镜像中导出文件: https://www.pkslow.com/archives/extract-files-from-docker-image
- grpcwebproxy: https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy
- Applexad 的哪吒官方改版的面板二进制文件: https://github.com/applexad/nezha-binary-build
免责声明:
- 本程序仅供学习了解, 非盈利目的,请于下载后 24 小时内删除, 不得用作任何商业用途, 文字、数据及图片均有所属版权, 如转载须注明来源。
- 使用本程序必循遵守部署免责声明。使用本程序必循遵守部署服务器所在地、所在国家和用户所在国家的法律法规, 程序作者不对使用者任何不当行为负责。
-
diff --git a/case/index.html b/case/index.html
index 25641e10..52902d6d 100644
--- a/case/index.html
+++ b/case/index.html
@@ -10,13 +10,15 @@
-
+
+
+
Skip to content 
提交项目
我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜
注意事项
所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任
-
diff --git a/developer/index.html b/developer/index.html
index 951c481f..909774b9 100644
--- a/developer/index.html
+++ b/developer/index.html
@@ -10,13 +10,15 @@
-
+
+
+
-
diff --git a/developer/l10n.html b/developer/l10n.html
index f93ade4d..385d303a 100644
--- a/developer/l10n.html
+++ b/developer/l10n.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/developer/theme.html b/developer/theme.html
index 5f4705a6..6c979b92 100644
--- a/developer/theme.html
+++ b/developer/theme.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/en_US/case/case1.html b/en_US/case/case1.html
index e8a56234..1f2f4f56 100644
--- a/en_US/case/case1.html
+++ b/en_US/case/case1.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/en_US/case/case2.html b/en_US/case/case2.html
index 6a6c2298..37e59edf 100644
--- a/en_US/case/case2.html
+++ b/en_US/case/case2.html
@@ -11,13 +11,15 @@
-
+
+
+
-
-
diff --git a/en_US/case/case3.html b/en_US/case/case3.html
index d00d50c2..f6d77326 100644
--- a/en_US/case/case3.html
+++ b/en_US/case/case3.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/en_US/case/case4.html b/en_US/case/case4.html
index 16caa7b1..2e9cc038 100644
--- a/en_US/case/case4.html
+++ b/en_US/case/case4.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/en_US/case/case5.html b/en_US/case/case5.html
index d56ee343..6d77c6fd 100644
--- a/en_US/case/case5.html
+++ b/en_US/case/case5.html
@@ -10,8 +10,10 @@
-
+
+
+
@@ -61,8 +63,8 @@
|-- nezha.pem # SSL/TLS certificate file.
|-- cloudflared # Cloudflare Argo tunnel main program.
|-- grpcwebproxy # gRPC reverse proxy main program.
-`-- nezha-agent # Nezha client, used to monitor the localhost.
Acknowledgements for articles and projects by
- Robin, an enthusiastic sunrise crowd, for discussing the relationship between Nezha's server and client, which led to the birth of this project.
- Nezha website: https://nezha.wiki/ , TG Group: https://t.me/nezhamonitoring
- Common Poverty International Old Chinese Medicine: http://solitud.es/
- Akkia's Blog: https://blog.akkia.moe/
- Ayaka's Blog: https://blog.萝莉.org/
- HiFeng's Blog: https://www.hicairo.com/
- Intranet Penetration with Cloudflare Tunnel: https://blog.outv.im/2021/cloudflared-tunnel/
- How to add your own Runner host to GitHub Actions: https://cloud.tencent.com/developer/article/1756690
- github self-hosted runner addition and startup: https://blog.csdn.net/sinat_32188225/article/details/125978331
- How to export a file from a Docker image: https://www.pkslow.com/archives/extract-files-from-docker-image
- grpcwebproxy: https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy
- Applexad's binary of Nezha's officially dashboard: https://github.com/applexad/nezha-binary-build
Disclaimer
- This program is only for learning and understanding, non-profit purposes, please delete within 24 hours after downloading, not for any commercial purposes, text, data and images are copyrighted, if reproduced must indicate the source.
- Use of this program is subject to the deployment disclaimer. Use of this program must follow the deployment of the server location, the country and the user's country laws and regulations, the author of the program is not responsible for any misconduct of the user.
-
diff --git a/en_US/case/index.html b/en_US/case/index.html
index ef19155c..92870bb4 100644
--- a/en_US/case/index.html
+++ b/en_US/case/index.html
@@ -10,13 +10,15 @@
-
+
+
+
Skip to content Nezha Monitoring
Community Project
Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.

Submit a project
We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information.
Important Notes
All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc.
-
diff --git a/en_US/developer/index.html b/en_US/developer/index.html
index 5135996d..61ea8135 100644
--- a/en_US/developer/index.html
+++ b/en_US/developer/index.html
@@ -10,13 +10,15 @@
-
+
+
+
-
diff --git a/en_US/developer/l10n.html b/en_US/developer/l10n.html
index ff43a535..cf535b72 100644
--- a/en_US/developer/l10n.html
+++ b/en_US/developer/l10n.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/en_US/developer/theme.html b/en_US/developer/theme.html
index 9eaa6859..7420f693 100644
--- a/en_US/developer/theme.html
+++ b/en_US/developer/theme.html
@@ -10,13 +10,15 @@
-
+
+
+
-
-
diff --git a/en_US/guide/agent.html b/en_US/guide/agent.html
index f96f85a3..a9cd6855 100644
--- a/en_US/guide/agent.html
+++ b/en_US/guide/agent.html
@@ -10,8 +10,10 @@
-
+
+
+
@@ -150,8 +152,8 @@
stop
sleep 2
start
-}
- Give it permission to execute:
chmod +x /etc/init.d/nezha-service
- Start the service
/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
FAQ
Is there a Docker image for Agent?
There is currently no Docker image for Agent.
The Agent is designed to be the opposite of the Dashboard, in that the Dashboard is designed to work without affecting the server as much as possible, while the Agent needs to execute monitoring services and run commands in the server.
Putting the Agent in a container does continue to execute monitoring services, but features such as WebShell do not work, so we do not provide Docker image of the Agent.
First, temporarily disable the reverse proxy
As with other websites, you can choose to automatically apply for a Let´s Encrypt certificate or manually configure an existing certificate by going to "SSL" in the site settings
After you finish setting up SSL, you need to go back to https://github.com/settings/developers and edit the authentication application you created before, change all the domain names in the "Homepage URL" and "Authorization callback URL" you filled in before from http
to https
, such as: "https://cdn.example.com" and "https://cdn.example.com/oauth2/callback", If you don't change these links, you may not be able to log into the admin panel
It is often caused by incomplete certificates. Please add -d to the agent running parameters. If there is x509: certificate signed by unknown authority in the log, replacing the complete certificate can solve the problem 100%.
Commonly used in requirements such as batch installation of Agents, where you can modify the database directly.
Please note that not everything can be modified in the database, wrong modification will lead to data confusion and failure to start Dashboard, please do not modify the database at will!
DANGER
Again, please do not modify the database at will!
If you need to modify the data in the database, please stop the Dashboard container before modifying it.
The database type is sqlite3, located in /opt/nezha/dashboard/data/sqlite.db
, please backup before modifying the data
The documentation does not provide an explanation of the database. If you have the ability to modify the database, you should be able to read it with a little thinking.
The Agent normally updates automatically, but the Dashboard does not and needs to be updated manually.
Run the script . /nezha.sh
and select restart Dashboard and update
The value entered for the DDNS provider is incorrect. Currently, only webhook
, cloudflare
, tencentcloud
, and dummy
are supported.
The DDNS AccessID
or AccessSecret
filled is incorrect.
Delete relevant content information as needed
cpu
、memory
、swap
、disk
net_in_speed
Inbound speed, net_out_speed
Outbound speed, net_all_speed
Inbound + Outbound speed, transfer_in
Inbound Transfer, transfer_out
Outbound Transfer, transfer_all
Total Transferoffline
Offline monitoringload1
、load5
、load15
Loadprocess_count
Number of processes Currently, counting the number of processes takes up too many resources and is not supported at the momenttcp_conn_count
、udp_conn_count
Number of connections[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
0
Cover all, use ignore
to ignore specific servers1
Ignore all, use ignore
to monitoring specific servers[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
cover
with server id and boolean, e.g.: {"1": true, "2":false}
Complete examples:
Add an offline notification
- Name: Offline notification
- Rules:
[{"Type":"offline","Duration":10}]
- Enable: √
Add an notification when the CPU exceeds 50% for 10s but the memory usage is below 20% for 20s
- Name: CPU and RAM
- Rules:
[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
- Enable: √
Send specific server notifications to specific notification groups
Case:
You have four servers, 1, 2, 3, 4, and two different notification groups, A and B
1, 2 The two servers are down for 10 minutes and send a notification to Notification Group A
3, 4 These two servers are down for ten minutes and then send a notification to Notification Group BFirst you need to set up two notification groups, A and B, and then add two alarm rules:
Rule I:
- Name: 1, 2 Off-line, send notification to group A
- Rules:
[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
- Notification group: A
- Enable: √
Rule II:
- Name: 3, 4 Off-line, send notification to group B
- Rules:
[{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
- Notification group: B
- Enable: √
Using these rules flexibly will help you to make full use of the notification function
Can be used as monthly transfer notificatin
type
transfer_in_cycle
Inbound transfer during the cycletransfer_out_cycle
Outbound transfer during the cycletransfer_all_cycle
The sum of inbound and outbound transfer during the cyclecycle_start
Start date of the statistical cycle (can be the start date of your server's billing cycle), the time format is RFC3339, for example, the format in Beijing time zone is 2022-01-11T08:00:00.00+08:00
cycle_interval
Interval time cycle (For example, if the cycle is in days and the value is 7, it means that the statistics are counted every 7 days)
cycle_unit
Statistics cycle unit, default hour
, optional (hour
, day
, week
, month
, year
)
min/max
, cover
, ignore
Please refer to the basic rules to configure
Example:
The servers with ID 3 and 4 (defined in the
ignore
) are counted on the 1st of each month, and a notification is triggered when the monthly outbound transfer reaches 1TB during the cycle.
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]
If you need to perform a task while sending a notification message, you can set those items
Tasks to be triggered in case of failure
The task to be executed when the notification status matches the change from "normal" to "failure", the task should be set in advance in the tasks pageTasks to be triggered after fault recovery
The task to be executed when the notification status matches the change from " failure " to " normal ", the task should be set in advance in the tasks pageName | How to Obtain |
---|---|
Admin | My Team -> Users -> <Specific User> -> User ID |
ClientID/ClientSecret | Access -> Application -> Add an Application -> SaaS -> OIDC |
Endpoint | Access -> Application -> Application URL -> Only Schema&Domain part |
Zero Trust Dashboard: https://one.dash.cloudflare.com
Access
-> Application
-> Add an Application
;SaaS
, Input your custom application name in Application
field,select OIDC
and click Add application
;openid
, email
, profile
, groups
in Scopes
field;Redirect URLs
field (e.g. https://monitor.example.com/oauth2/callback
);Client ID
, Client Secret
and Schemas&Domain part in Issuer
(e.g. https://akkia.cloudflareaccess.com
);/opt/nezha/dashboard/data/config.yaml
), and restart Dashboard service;Multiple configuration setting.
Name of DDNS configuration, can be any string.
For other options, view Single.
After configuring config.yaml
, you will need to modify server settings in Dashboard to make DDNS function effective.
Explanation of DDNS-related options:
TIP
When modifying settings in the Dashboard and saving them, default configuration options will be filled into the config.yaml
file. At this time, in the DDNS field, there will be both single configuration and multiple configurations options available.
If you need to use a single configuration, please ignore the content related to the Profiles option.
Please leave DDNS.Provider
field blank while using Multiple configuration. If not, the Multiple configuration will be ignored.
In the Dashboard's logs, you can view the relevant logs for the DDNS. When configured correctly, there will be corresponding log entries when the DNS records are updated.
dashboard_1 | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3)
-dashboard_1 | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功
If you don't want to show your homepage directly, you can set a access password here
After setting the password, you need to enter the password to access the homepage
This setting is a prerequisite for using the one-click script to install the Agent, see here for details
If you want to be notified when a server's ip changes, you can set it up here
Select a rule here to determine which servers need to be monitored, and you can choose according to your needs
In conjunction with the coverage settings, set the exclusions for the selected rule here
Select the notification method, please set the notification method in the "Notifications" page
WARNING
When the settings are completed, the notification takes effect when enabled
is activated
WARNING
IP Change Alert does not show ip by default, if you don't want to hide it, you can activate "Do NOT desensitize Server IP In Notification Messages"
A open source, lightweight server and website monitoring and O&M tool
Support one-click script installation Dashboard and Agent services for easy use; mainstream systems such as Linux, Windows, MacOS, OpenWRT, etc. are all supported.
Supports monitoring the system status of multiple servers simultaneously, including monitoring the status of web pages, ports, and SSL certificates. It also supports sending notifications when there are failures or when data reaches the limit. Multiple notification methods are supported, such as Telegram, email, and WeChat.
Support WebSSH, support data monitoring, support setting scheduled tasks, and support batch execution of tasks on servers.