diff --git a/404.html b/404.html deleted file mode 100644 index b7073067..00000000 --- a/404.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - 404 | 哪吒服务器监控 - - - - - - - - - - - - - - - -
- - - - \ No newline at end of file diff --git a/_headers b/_headers deleted file mode 100644 index f7fa3afc..00000000 --- a/_headers +++ /dev/null @@ -1,3 +0,0 @@ -/assets/* - cache-control: max-age=31536000 - cache-control: immutable \ No newline at end of file diff --git a/ads.txt b/ads.txt deleted file mode 100755 index ca0f1193..00000000 --- a/ads.txt +++ /dev/null @@ -1 +0,0 @@ -google.com, pub-3632738952115558, DIRECT, f08c47fec0942fa0 \ No newline at end of file diff --git a/assets/1.BL34OYdd.png b/assets/1.BL34OYdd.png deleted file mode 100644 index 053eaa02..00000000 Binary files a/assets/1.BL34OYdd.png and /dev/null differ diff --git a/assets/1.VA-CzEkF.jpeg b/assets/1.VA-CzEkF.jpeg deleted file mode 100644 index 0ce0b2ba..00000000 Binary files a/assets/1.VA-CzEkF.jpeg and /dev/null differ diff --git a/assets/1_en_US.CE_aSW8N.png b/assets/1_en_US.CE_aSW8N.png deleted file mode 100644 index 4e98ca72..00000000 Binary files a/assets/1_en_US.CE_aSW8N.png and /dev/null differ diff --git a/assets/2.BqfHYLGJ.png b/assets/2.BqfHYLGJ.png deleted file mode 100644 index 959e5da7..00000000 Binary files a/assets/2.BqfHYLGJ.png and /dev/null differ diff --git a/assets/2.r5IbCoDU.png b/assets/2.r5IbCoDU.png deleted file mode 100644 index ace88cda..00000000 Binary files a/assets/2.r5IbCoDU.png and /dev/null differ diff --git a/assets/2_en_US.Dm8rLo_N.png b/assets/2_en_US.Dm8rLo_N.png deleted file mode 100644 index 24e574b6..00000000 Binary files a/assets/2_en_US.Dm8rLo_N.png and /dev/null differ diff --git a/assets/3.D4KlWCds.png b/assets/3.D4KlWCds.png deleted file mode 100644 index 6dfab2c6..00000000 Binary files a/assets/3.D4KlWCds.png and /dev/null differ diff --git a/assets/3_en_US.SUOW4yEM.png b/assets/3_en_US.SUOW4yEM.png deleted file mode 100644 index f967461d..00000000 Binary files a/assets/3_en_US.SUOW4yEM.png and /dev/null differ diff --git a/assets/4.DAp6JO4C.jpg b/assets/4.DAp6JO4C.jpg deleted file mode 100644 index ecf50370..00000000 Binary files a/assets/4.DAp6JO4C.jpg and /dev/null differ diff --git a/assets/5.DI5HceD6.png b/assets/5.DI5HceD6.png deleted file mode 100644 index dd678e68..00000000 Binary files a/assets/5.DI5HceD6.png and /dev/null differ diff --git a/assets/6.B0QVmape.png b/assets/6.B0QVmape.png deleted file mode 100644 index 4776913a..00000000 Binary files a/assets/6.B0QVmape.png and /dev/null differ diff --git a/assets/Download_on_the_App_Store_Badge_CNSC_RGB_blk_092917.B6iCCvXs.svg b/assets/Download_on_the_App_Store_Badge_CNSC_RGB_blk_092917.B6iCCvXs.svg deleted file mode 100644 index e3f29cd1..00000000 --- a/assets/Download_on_the_App_Store_Badge_CNSC_RGB_blk_092917.B6iCCvXs.svg +++ /dev/null @@ -1,29 +0,0 @@ - - Download_on_the_App_Store_Badge_CNSC_RGB_blk_092917 - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917.CVyK0T4N.svg b/assets/Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917.CVyK0T4N.svg deleted file mode 100644 index 072b425a..00000000 --- a/assets/Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917.CVyK0T4N.svg +++ /dev/null @@ -1,46 +0,0 @@ - - Download_on_the_App_Store_Badge_US-UK_RGB_blk_4SVG_092917 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/app.Bt7GXCP9.js b/assets/app.Bt7GXCP9.js deleted file mode 100644 index 62fa2d7d..00000000 --- a/assets/app.Bt7GXCP9.js +++ /dev/null @@ -1 +0,0 @@ -import{U as o,a5 as p,a6 as u,a7 as l,a8 as c,a9 as f,aa as d,ab as m,ac as h,ad as g,ae as A,d as P,u as v,y,x as w,af as C,ag as R,ah as b,a3 as E}from"./chunks/framework.BmdFiWrL.js";import{R as S}from"./chunks/theme.D1TJKLdg.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=D(),a=x();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function x(){return h(T)}function D(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp}; diff --git a/assets/case_case1.md.Ce-PdIPb.js b/assets/case_case1.md.Ce-PdIPb.js deleted file mode 100644 index e3e7b768..00000000 --- a/assets/case_case1.md.Ce-PdIPb.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as r}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"自建一个TG机器人来查询服务器信息","description":"","frontmatter":{},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1732521523000}'),s={name:"case/case1.md"},o=r('

自建一个TG机器人来查询服务器信息

贡献者:

项目地址:nezha_api_tgbot

机器人可以通过API向面板请求服务器状态信息,得到信息后发送给用户
你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板

',5),_=[o];function i(c,n,p,l,h,d){return a(),t("div",null,_)}const u=e(s,[["render",i]]);export{m as __pageData,u as default}; diff --git a/assets/case_case1.md.Ce-PdIPb.lean.js b/assets/case_case1.md.Ce-PdIPb.lean.js deleted file mode 100644 index 4649eaa1..00000000 --- a/assets/case_case1.md.Ce-PdIPb.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as r}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"自建一个TG机器人来查询服务器信息","description":"","frontmatter":{},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1732521523000}'),s={name:"case/case1.md"},o=r("",5),_=[o];function i(c,n,p,l,h,d){return a(),t("div",null,_)}const u=e(s,[["render",i]]);export{m as __pageData,u as default}; diff --git a/assets/case_case2.md.DqTRdA-m.js b/assets/case_case2.md.DqTRdA-m.js deleted file mode 100644 index e3b4d466..00000000 --- a/assets/case_case2.md.DqTRdA-m.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a}from"./chunks/qrcode.CZOxHFH-.js";import{_ as e,c as r,o as i,a4 as t}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"在iOS/MacOS中使用Siri运行快捷指令查询服务器状态","description":"","frontmatter":{},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1732521523000}'),o={name:"case/case2.md"},c=t('

在iOS/MacOS中使用Siri运行快捷指令查询服务器状态

当前版本:V1.0
贡献者:

获取快捷指令

使用iPhone或iPad扫描以下二维码,获取快捷指令

coode

MacOS用户请访问这里,获取快捷指令

使用说明

WARNING

每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等

',8),s=[c];function l(d,n,h,_,p,m){return i(),r("div",null,s)}const S=e(o,[["render",l]]);export{b as __pageData,S as default}; diff --git a/assets/case_case2.md.DqTRdA-m.lean.js b/assets/case_case2.md.DqTRdA-m.lean.js deleted file mode 100644 index 095dc8f1..00000000 --- a/assets/case_case2.md.DqTRdA-m.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a}from"./chunks/qrcode.CZOxHFH-.js";import{_ as e,c as r,o as i,a4 as t}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"在iOS/MacOS中使用Siri运行快捷指令查询服务器状态","description":"","frontmatter":{},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1732521523000}'),o={name:"case/case2.md"},c=t("",8),s=[c];function l(d,n,h,_,p,m){return i(),r("div",null,s)}const S=e(o,[["render",l]]);export{b as __pageData,S as default}; diff --git a/assets/case_case3.md.Dv6Xc9yU.js b/assets/case_case3.md.Dv6Xc9yU.js deleted file mode 100644 index 00c2a86b..00000000 --- a/assets/case_case3.md.Dv6Xc9yU.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a,a4 as d}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人","description":"","frontmatter":{},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1732521523000}'),r={name:"case/case3.md"},l=d('

自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人

贡献者:

项目地址:nezha_telegram_bot

项目特色

开源Telegram机器人项目,可以基于API实时查询哪吒面板的服务器信息。

命令列表

命令功能仅私聊
start开始使用键盘主菜单✔️
help帮助列表
add添加面板链接和token✔️
url添加面板链接✔️
token添加面板token✔️
info获取保存的面板链接和token✔️
delete删除保存的面板链接和token✔️
id命令后面添加整数id,来进行单个服务器信息查询(私聊带刷新按钮,群聊不带)
all查询所有服务器的统计信息
search在服务器名字中搜索关键字(支持多个,用空格分开)

效果展示

imageimage

',11),i=[l];function o(h,c,s,n,_,m){return a(),e("div",null,i)}const b=t(r,[["render",o]]);export{f as __pageData,b as default}; diff --git a/assets/case_case3.md.Dv6Xc9yU.lean.js b/assets/case_case3.md.Dv6Xc9yU.lean.js deleted file mode 100644 index 28066096..00000000 --- a/assets/case_case3.md.Dv6Xc9yU.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a,a4 as d}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人","description":"","frontmatter":{},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1732521523000}'),r={name:"case/case3.md"},l=d("",11),i=[l];function o(h,c,s,n,_,m){return a(),e("div",null,i)}const b=t(r,[["render",o]]);export{f as __pageData,b as default}; diff --git a/assets/case_case4.md.CSymfuHV.js b/assets/case_case4.md.CSymfuHV.js deleted file mode 100644 index 009e31cb..00000000 --- a/assets/case_case4.md.CSymfuHV.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as t,o as e,a4 as a}from"./chunks/framework.BmdFiWrL.js";const r="/assets/2.r5IbCoDU.png",n="/assets/5.DI5HceD6.png",o="/assets/6.B0QVmape.png",p="/assets/4.DAp6JO4C.jpg",c="/assets/1.VA-CzEkF.jpeg",z=JSON.parse('{"title":"重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑","description":"","frontmatter":{},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1732521523000}'),_={name:"case/case4.md"},i=a('

重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑



2

还在因为自己的小鸡配置太差被朋友嘲笑吗?
还在想参加以针会友活动却因为小鸡不够排面而觉得羞耻吗?
还在因为在哪吒TG群里机器人排名太低而觉得自己低人一等吗?


今天开始!找回自信!

来自南京的名老中医 dysf888 独家秘方!让你找回男人本色,激情畅享!
安装 Fake Agent,可随意修改服务器监测数据的倍数上传到 Dashboard,让你的小鸡 脱!胎!换!骨! 让你在 MJJ 面前起来!


哪吒监控创始人奶爸也在用:
5


男人用了都说好:
6
4



1

',12),l=[i];function g(b,f,m,d,h,y){return e(),t("div",null,l)}const k=s(_,[["render",g]]);export{z as __pageData,k as default}; diff --git a/assets/case_case4.md.CSymfuHV.lean.js b/assets/case_case4.md.CSymfuHV.lean.js deleted file mode 100644 index 825f7447..00000000 --- a/assets/case_case4.md.CSymfuHV.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as t,o as e,a4 as a}from"./chunks/framework.BmdFiWrL.js";const r="/assets/2.r5IbCoDU.png",n="/assets/5.DI5HceD6.png",o="/assets/6.B0QVmape.png",p="/assets/4.DAp6JO4C.jpg",c="/assets/1.VA-CzEkF.jpeg",z=JSON.parse('{"title":"重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑","description":"","frontmatter":{},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1732521523000}'),_={name:"case/case4.md"},i=a("",12),l=[i];function g(b,f,m,d,h,y){return e(),t("div",null,l)}const k=s(_,[["render",g]]);export{z as __pageData,k as default}; diff --git a/assets/case_case5.md.B16IKmIX.js b/assets/case_case5.md.B16IKmIX.js deleted file mode 100644 index c318d795..00000000 --- a/assets/case_case5.md.B16IKmIX.js +++ /dev/null @@ -1,47 +0,0 @@ -import{_ as a,c as e,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"使用 Argo 隧道的哪吒服务端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1732521523000}'),n={name:"case/case5.md"},r=t(`

使用 Argo 隧道的哪吒服务端

贡献者:

项目地址:Argo-Nezha-Service-Container


目录


项目特点:

image

准备需要用的变量

image

面板域名加上 https:// 开头,回调地址再加上 /oauth2/callback 结尾

imageimageimageimageimage

Argo 认证的获取方式: json 或 token

Argo 隧道认证方式有 json 和 token,使用两个方式其中之一。推荐前者,理由脚本会处理好所有的 Argo 隧道参数和路径,后者需要到 Cloudflare 官网手动设置,容易出错。

(方式 1 - Json):

通过 Cloudflare Json 生成网轻松获取 Argo 隧道 json 信息: https://fscarmen.cloudflare.now.cc

image

(方式 2 - Token): 通过 Cloudflare 官网,手动生成 Argo 隧道 token 信息

到 cf 官网:https://dash.cloudflare.com/

imageimageimageimageimageimageimage

PaaS 部署实例

镜像 fscarmen/argo-nezha:latest , 支持 amd64 和 arm64 架构

用到的变量

变量名是否必须备注
GH_USERgithub 的用户名,用于面板管理授权
GH_CLIENTID在 github 上申请
GH_CLIENTSECRET在 github 上申请
GH_BACKUP_USER在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致
GH_REPO在 github 上备份哪吒服务端数据库文件的 github 库
GH_EMAILgithub 的邮箱,用于备份的 git 推送到远程库
GH_PATgithub 的 PAT
ARGO_AUTHJson: 从 https://fscarmen.cloudflare.now.cc 获取的 Argo Json
Token: 从 Cloudflare 官网获取
ARGO_DOMAINArgo 域名

Koyeb

Deploy to Koyeb

imageimageimageimageimage

VPS 部署方式 1 --- docker

docker 部署

docker run -dit \\
-           --name nezha_dashboard \\
-           --pull always \\
-           --restart always \\
-           -e GH_USER=<填 github 用户名> \\
-           -e GH_EMAIL=<填 github 邮箱> \\
-           -e GH_PAT=<填获取的> \\
-           -e GH_REPO=<填自定义的> \\
-           -e GH_CLIENTID=<填获取的>  \\
-           -e GH_CLIENTSECRET=<填获取的> \\
-           -e ARGO_AUTH='<填获取的 Argo json 或者 token>' \\
-           -e ARGO_DOMAIN=<填自定义的> \\
-           -e GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量> \\
-           fscarmen/argo-nezha

docker-compose 部署

version: '3.8'
-services:
-    argo-nezha:
-        image: fscarmen/argo-nezha
-        pull: always
-        container_name: nezha_dashboard
-        restart: always
-        environment:
-            - GH_USER=<填 github 用户名>
-            - GH_EMAIL=<<填 github 邮箱>
-            - GH_PAT=<填获取的>
-            - GH_REPO=<填自定义的>
-            - GH_CLIENTID=<填获取的>
-            - GH_CLIENTSECRET=<填获取的>
-            - ARGO_AUTH='<填获取的 Argo json 或者 token>'
-            - ARGO_DOMAIN=<填自定义的>
-            - GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量>

VPS 部署方式 2 --- 宿主机

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

客户端接入

通过gRPC传输,无需额外配置。使用面板给到的安装方式,举例

curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent nezha.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH 接入

<file path>/cloudflared access ssh --hostname nezha.seales.nom.za/<GH_CLIENTID>
imageimageimage

手动备份数据

方法一: 把 Github 备份库里的 README.md 文件内容改为 backup

image

方法二: ssh 进去后,容器版本运行 /dashboard/backup.sh; 非容器版本运行 /opt/nezha/dashboard/backup.sh

自动还原备份

下图为以还原文件名为 dashboard-2023-04-23-13:08:37.tar.gz 作示例

image

手动还原备份

bash /dashboard/restore.sh <文件名>
image

完美搬家

tar czvf dashboard.tar.gz /dashboard

主体目录文件及说明

/dashboard/
-|-- app                  # 哪吒面板主程序
-|-- argo.json            # Argo 隧道 json 文件,记录着使用隧道的信息
-|-- argo.yml             # Argo 隧道 yml 文件,用于在一同隧道下,根据不同域名来分流 web, gRPC 和 ssh 协议的作用
-|-- backup.sh            # 备份数据脚本
-|-- restore.sh           # 还原备份脚本
-|-- dbfile               # 记录最新的还原或备份文件名
-|-- resource             # 面板主题、语言和旗帜等资料的文件夹
-|-- data
-|   |-- config.yaml      # 哪吒面板的配置,如 Github OAuth2 / gRPC 域名 / 端口 / 是否启用 TLS 等信息
-|   \`-- sqlite.db        # SQLite 数据库文件,记录着面板设置的所有 severs 和 cron 等信息
-|-- entrypoint.sh        # 主脚本,容器运行后执行
-|-- nezha.csr            # SSL/TLS 证书签名请求
-|-- nezha.key            # SSL/TLS 证书的私钥信息
-|-- nezha.pem            # SSL/TLS 证书文件
-|-- cloudflared          # Cloudflare Argo 隧道主程序
-|-- grpcwebproxy         # gRPC 反代主程序
-\`-- nezha-agent          # 哪吒客户端,用于监控本地 localhost

鸣谢下列作者的文章和项目:

免责声明:

`,88),l=[r];function i(o,c,h,p,d,g){return s(),e("div",null,l)}const m=a(n,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/case_case5.md.B16IKmIX.lean.js b/assets/case_case5.md.B16IKmIX.lean.js deleted file mode 100644 index 362b604d..00000000 --- a/assets/case_case5.md.B16IKmIX.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as e,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"使用 Argo 隧道的哪吒服务端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1732521523000}'),n={name:"case/case5.md"},r=t("",88),l=[r];function i(o,c,h,p,d,g){return s(),e("div",null,l)}const m=a(n,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/case_case6.md.8CRS1o6R.js b/assets/case_case6.md.8CRS1o6R.js deleted file mode 100644 index 696a618d..00000000 --- a/assets/case_case6.md.8CRS1o6R.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as e,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const s="/assets/Download_on_the_App_Store_Badge_CNSC_RGB_blk_092917.B6iCCvXs.svg",r="/assets/1.BL34OYdd.png",i="/assets/2.BqfHYLGJ.png",l="/assets/3.D4KlWCds.png",k=JSON.parse('{"title":"Nezha Mobile - Nezha Dashboard 的 iOS 客户端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case6.md","filePath":"case/case6.md","lastUpdated":1732521523000}'),n={name:"case/case6.md"},h=o('

Nezha Mobile - Nezha Dashboard 的 iOS 客户端

贡献者:

为项目作出贡献

项目地址

INFO

我们欢迎对项目的任何贡献,并将积极合并你的修改至下一次的Release,但我们可能会对不符合App Review Guidelines的内容(或潜在内容)进行一些修改。

从 App Store 下载

Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917

WARNING

App Store版本的Nezha Mobile由于ICP备案原因不在中国大陆提供服务。

TestFlight 测试计划

加入 TestFlight 测试

使用说明

配置小组件(可选)

',15),p=[h];function d(c,_,b,g,m,u){return t(),e("div",null,p)}const N=a(n,[["render",d]]);export{k as __pageData,N as default}; diff --git a/assets/case_case6.md.8CRS1o6R.lean.js b/assets/case_case6.md.8CRS1o6R.lean.js deleted file mode 100644 index 91bd430a..00000000 --- a/assets/case_case6.md.8CRS1o6R.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as e,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const s="/assets/Download_on_the_App_Store_Badge_CNSC_RGB_blk_092917.B6iCCvXs.svg",r="/assets/1.BL34OYdd.png",i="/assets/2.BqfHYLGJ.png",l="/assets/3.D4KlWCds.png",k=JSON.parse('{"title":"Nezha Mobile - Nezha Dashboard 的 iOS 客户端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case6.md","filePath":"case/case6.md","lastUpdated":1732521523000}'),n={name:"case/case6.md"},h=o("",15),p=[h];function d(c,_,b,g,m,u){return t(),e("div",null,p)}const N=a(n,[["render",d]]);export{k as __pageData,N as default}; diff --git a/assets/case_case7.md.CeE0DjzU.js b/assets/case_case7.md.CeE0DjzU.js deleted file mode 100644 index f616d789..00000000 --- a/assets/case_case7.md.CeE0DjzU.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,a as r}from"./chunks/webssh.Cvv4PsOJ.js";import{_ as a,c as t,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const k=JSON.parse('{"title":"Broker for Nezha - 拓展 Nezha 接入平台","description":"","frontmatter":{},"headers":[],"relativePath":"case/case7.md","filePath":"case/case7.md","lastUpdated":1732521523000}'),l={name:"case/case7.md"},n=i('

Broker for Nezha - 拓展 Nezha 接入平台

贡献者:

Broker for Nezha 是一个 Nezha Agent 的修改版本,其通过分离 Agent 的数据收集和 gRPC 上报功能,可使小型设备接入 Nezha Dashboard。

项目地址:https://codeberg.org/uubulb/broker

文档:Broker for Nezha

与原项目的不同

Broker for Nezha 需要与特定的数据收集软件一同使用。目前提供两种数据获取方式:

  1. HTTP 主动获取(HTTP/1.1)
  2. TCP 被动获取(推荐)

如需获取现有的数据收集软件,可以参考项目 README。

因数据获取方式缺乏安全性,建议仅在信任的网络环境使用。

编写数据收集端

如需自行编写数据收集端,除实现基本 HTTP 服务器或 TCP 客户端外,还需要使用特定的数据格式才可被 Broker 正常接收。具体请参考:数据类型

效果参考

Dashboard
Dashboard

WebSSH
WebSSH
',18),s=[n];function h(c,p,f,u,_,b){return o(),t("div",null,s)}const m=a(l,[["render",h]]);export{k as __pageData,m as default}; diff --git a/assets/case_case7.md.CeE0DjzU.lean.js b/assets/case_case7.md.CeE0DjzU.lean.js deleted file mode 100644 index 726df83a..00000000 --- a/assets/case_case7.md.CeE0DjzU.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,a as r}from"./chunks/webssh.Cvv4PsOJ.js";import{_ as a,c as t,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const k=JSON.parse('{"title":"Broker for Nezha - 拓展 Nezha 接入平台","description":"","frontmatter":{},"headers":[],"relativePath":"case/case7.md","filePath":"case/case7.md","lastUpdated":1732521523000}'),l={name:"case/case7.md"},n=i("",18),s=[n];function h(c,p,f,u,_,b){return o(),t("div",null,s)}const m=a(l,[["render",h]]);export{k as __pageData,m as default}; diff --git a/assets/case_index.md.DDEdRxEt.js b/assets/case_index.md.DDEdRxEt.js deleted file mode 100644 index a8b45692..00000000 --- a/assets/case_index.md.DDEdRxEt.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return a(),t("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default}; diff --git a/assets/case_index.md.DDEdRxEt.lean.js b/assets/case_index.md.DDEdRxEt.lean.js deleted file mode 100644 index a8b45692..00000000 --- a/assets/case_index.md.DDEdRxEt.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return a(),t("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default}; diff --git a/assets/chunks/VPAlgoliaSearchBox.CntkNbWN.js b/assets/chunks/VPAlgoliaSearchBox.CntkNbWN.js deleted file mode 100644 index ec701d31..00000000 --- a/assets/chunks/VPAlgoliaSearchBox.CntkNbWN.js +++ /dev/null @@ -1,17 +0,0 @@ -import{d as mo,ai as po,L as vo,y as ho,v as yo,R as go,o as bo,c as _o}from"./framework.BmdFiWrL.js";import{u as Oo}from"./theme.D1TJKLdg.js";/*! @docsearch/js 3.6.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function lr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function I(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function se(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var i,a,c=[],u=!0,s=!1;try{for(o=o.call(r);!(u=(i=o.next()).done)&&(c.push(i.value),!n||c.length!==n);u=!0);}catch(l){s=!0,a=l}finally{try{u||o.return==null||o.return()}finally{if(s)throw a}}return c}}(t,e)||_n(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ft(t){return function(e){if(Array.isArray(e))return qt(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||_n(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _n(t,e){if(t){if(typeof t=="string")return qt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qt(t,e):void 0}}function qt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r3)for(r=[r],i=3;i0?Ie(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=r,v.__b=r.__b+1,(p=b[l])===null||p&&v.key==p.key&&v.type===p.type)b[l]=void 0;else for(m=0;m<_;m++){if((p=b[m])&&v.key==p.key&&v.type===p.type){b[m]=void 0;break}p=null}Yt(t,v,p=p||mt,o,i,a,c,u,s),d=v.__e,(m=v.ref)&&p.ref!=m&&(y||(y=[]),p.ref&&y.push(p.ref,null,v),y.push(m,v.__c||d,v)),d!=null?(h==null&&(h=d),typeof v.type=="function"&&v.__k!=null&&v.__k===p.__k?v.__d=u=Pn(v,u,t):u=In(t,v,p,b,d,u),s||r.type!=="option"?typeof r.type=="function"&&(r.__d=u):t.value=""):u&&p.__e==u&&u.parentNode!=t&&(u=Ke(p))}for(r.__e=h,l=_;l--;)b[l]!=null&&(typeof r.type=="function"&&b[l].__e!=null&&b[l].__e==r.__d&&(r.__d=Ke(n,l+1)),An(b[l],b[l]));if(y)for(l=0;l3)for(r=[r],i=3;i=r.__.length&&r.__.push({}),r.__[t]}function Gt(t){return pe=1,xn(Nn,t)}function xn(t,e,r){var n=Je(de++,2);return n.t=t,n.__c||(n.__=[r?r(e):Nn(void 0,e),function(o){var i=n.t(n.__[0],o);n.__[0]!==i&&(n.__=[i,n.__[1]],n.__c.setState({}))}],n.__c=L),n.__}function Xt(t,e){var r=Je(de++,3);!w.__s&&er(r.__H,e)&&(r.__=t,r.__H=e,L.__H.__h.push(r))}function _r(t,e){var r=Je(de++,4);!w.__s&&er(r.__H,e)&&(r.__=t,r.__H=e,L.__h.push(r))}function Pt(t,e){var r=Je(de++,7);return er(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function ko(){Ht.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(ut),t.__H.__h.forEach(Ut),t.__H.__h=[]}catch(e){t.__H.__h=[],w.__e(e,t.__v)}}),Ht=[]}w.__b=function(t){L=null,dr&&dr(t)},w.__r=function(t){hr&&hr(t),de=0;var e=(L=t.__c).__H;e&&(e.__h.forEach(ut),e.__h.forEach(Ut),e.__h=[])},w.diffed=function(t){yr&&yr(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(Ht.push(e)!==1&&vr===w.requestAnimationFrame||((vr=w.requestAnimationFrame)||function(r){var n,o=function(){clearTimeout(i),Or&&cancelAnimationFrame(n),setTimeout(r)},i=setTimeout(o,100);Or&&(n=requestAnimationFrame(o))})(ko)),L=void 0},w.__c=function(t,e){e.some(function(r){try{r.__h.forEach(ut),r.__h=r.__h.filter(function(n){return!n.__||Ut(n)})}catch(n){e.some(function(o){o.__h&&(o.__h=[])}),e=[],w.__e(n,r.__v)}}),gr&&gr(t,e)},w.unmount=function(t){br&&br(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(ut)}catch(r){w.__e(r,e.__v)}};var Or=typeof requestAnimationFrame=="function";function ut(t){var e=L;typeof t.__c=="function"&&t.__c(),L=e}function Ut(t){var e=L;t.__c=t.__(),L=e}function er(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function Nn(t,e){return typeof e=="function"?e(t):e}function Tn(t,e){for(var r in e)t[r]=e[r];return t}function Ft(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var n in e)if(n!=="__source"&&t[n]!==e[n])return!0;return!1}function Bt(t){this.props=t}(Bt.prototype=new W).isPureReactComponent=!0,Bt.prototype.shouldComponentUpdate=function(t,e){return Ft(this.props,t)||Ft(this.state,e)};var Sr=w.__b;w.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Sr&&Sr(t)};var Do=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,wr=function(t,e){return t==null?null:$($(t).map(e))},Ao={map:wr,forEach:wr,count:function(t){return t?$(t).length:0},only:function(t){var e=$(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:$},Co=w.__e;function ct(){this.__u=0,this.t=null,this.__b=null}function Rn(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function je(){this.u=null,this.o=null}w.__e=function(t,e,r){if(t.then){for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e)}Co(t,e,r)},(ct.prototype=new W).__c=function(t,e){var r=e.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=Rn(n.__v),i=!1,a=function(){i||(i=!0,r.componentWillUnmount=r.__c,o?o(c):c())};r.__c=r.componentWillUnmount,r.componentWillUnmount=function(){a(),r.__c&&r.__c()};var c=function(){if(!--n.__u){if(n.state.__e){var s=n.state.__e;n.__v.__k[0]=function m(p,v,d){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(h){return m(h,v,d)}),p.__c&&p.__c.__P===v&&(p.__e&&d.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=d)),p}(s,s.__c.__P,s.__c.__O)}var l;for(n.setState({__e:n.__b=null});l=n.t.pop();)l.forceUpdate()}},u=e.__h===!0;n.__u++||u||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(a,a)},ct.prototype.componentWillUnmount=function(){this.t=[]},ct.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function i(a,c,u){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(s){typeof s.__c=="function"&&s.__c()}),a.__c.__H=null),(a=Tn({},a)).__c!=null&&(a.__c.__P===u&&(a.__c.__P=c),a.__c=null),a.__k=a.__k&&a.__k.map(function(s){return i(s,c,u)})),a}(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__e&&K(X,null,t.fallback);return o&&(o.__h=null),[K(X,null,e.__e?null:t.children),o]};var jr=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),e.i.removeChild(n)}}),We(K(xo,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Ln(t,e){return K(No,{__v:t,i:e})}(je.prototype=new W).__e=function(t){var e=this,r=Rn(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),jr(e,t,n)):o()};r?r(i):i()}},je.prototype.render=function(t){this.u=null,this.o=new Map;var e=$(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},je.prototype.componentDidUpdate=je.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){jr(t,r,e)})};var qn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,To=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ro=function(t){return(typeof Symbol<"u"&&Ve(Symbol())=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};function Mn(t,e,r){return e.__k==null&&(e.textContent=""),We(t,e),typeof r=="function"&&r(),t?t.__c:null}W.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(W.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Er=w.event;function Lo(){}function qo(){return this.cancelBubble}function Mo(){return this.defaultPrevented}w.event=function(t){return Er&&(t=Er(t)),t.persist=Lo,t.isPropagationStopped=qo,t.isDefaultPrevented=Mo,t.nativeEvent=t};var Hn,Pr={configurable:!0,get:function(){return this.class}},Ir=w.vnode;w.vnode=function(t){var e=t.type,r=t.props,n=r;if(typeof e=="string"){for(var o in n={},r){var i=r[o];o==="value"&&"defaultValue"in r&&i==null||(o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&i===!0?i="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+e)&&!Ro(r.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():To.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():i===null&&(i=void 0),n[o]=i)}e=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=$(r.children).forEach(function(a){a.props.selected=n.value.indexOf(a.props.value)!=-1})),e=="select"&&n.defaultValue!=null&&(n.value=$(r.children).forEach(function(a){a.props.selected=n.multiple?n.defaultValue.indexOf(a.props.value)!=-1:n.defaultValue==a.props.value})),t.props=n}e&&r.class!=r.className&&(Pr.enumerable="className"in r,r.className!=null&&(n.class=r.className),Object.defineProperty(n,"className",Pr)),t.$$typeof=qn,Ir&&Ir(t)};var kr=w.__r;w.__r=function(t){kr&&kr(t),Hn=t.__c};var Ho={ReactCurrentDispatcher:{current:{readContext:function(t){return Hn.__n[t.__c].props.value}}}};(typeof performance>"u"?"undefined":Ve(performance))=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function Dr(t){return!!t&&t.$$typeof===qn}var f={useState:Gt,useReducer:xn,useEffect:Xt,useLayoutEffect:_r,useRef:function(t){return pe=5,Pt(function(){return{current:t}},[])},useImperativeHandle:function(t,e,r){pe=6,_r(function(){typeof t=="function"?t(e()):t&&(t.current=e())},r==null?r:r.concat(t))},useMemo:Pt,useCallback:function(t,e){return pe=8,Pt(function(){return t},e)},useContext:function(t){var e=L.context[t.__c],r=Je(de++,9);return r.__c=t,e?(r.__==null&&(r.__=!0,e.sub(L)),e.props.value):t.__},useDebugValue:function(t,e){w.useDebugValue&&w.useDebugValue(e?e(t):t)},version:"16.8.0",Children:Ao,render:Mn,hydrate:function(t,e,r){return Cn(t,e),typeof r=="function"&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(We(null,t),!0)},createPortal:Ln,createElement:K,createContext:function(t,e){var r={__c:e="__cC"+Sn++,__:t,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(Mt)},this.sub=function(a){o.push(a);var c=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),c&&c.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r},createFactory:function(t){return K.bind(null,t)},cloneElement:function(t){return Dr(t)?Io.apply(null,arguments):t},createRef:function(){return{current:null}},Fragment:X,isValidElement:Dr,findDOMNode:function(t){return t&&(t.base||t.nodeType===1&&t)||null},Component:W,PureComponent:Bt,memo:function(t,e){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!a:Ft(this.props,o)}function n(o){return this.shouldComponentUpdate=r,K(t,o)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n},forwardRef:function(t){function e(r,n){var o=Tn({},r);return delete o.ref,t(o,(n=r.ref||n)&&(Ve(n)!="object"||"current"in n)?n:null)}return e.$$typeof=Do,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e},unstable_batchedUpdates:function(t,e){return t(e)},StrictMode:X,Suspense:ct,SuspenseList:je,lazy:function(t){var e,r,n;function o(i){if(e||(e=t()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw e;return K(r,i)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ho};function Uo(){return f.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},f.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function Un(){return f.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},f.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Fo=["translations"];function Vt(){return Vt=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var Vo=f.forwardRef(function(t,e){var r=t.translations,n=r===void 0?{}:r,o=Bo(t,Fo),i=n.buttonText,a=i===void 0?"Search":i,c=n.buttonAriaLabel,u=c===void 0?"Search":c,s=Fn(Gt(null),2),l=s[0],m=s[1];return Xt(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?m("⌘"):m("Ctrl"))},[]),f.createElement("button",Vt({type:"button",className:"DocSearch DocSearch-Button","aria-label":u},o,{ref:e}),f.createElement("span",{className:"DocSearch-Button-Container"},f.createElement(Un,null),f.createElement("span",{className:"DocSearch-Button-Placeholder"},a)),f.createElement("span",{className:"DocSearch-Button-Keys"},l!==null&&f.createElement(f.Fragment,null,f.createElement(Cr,{reactsToKey:l==="Ctrl"?"Ctrl":"Meta"},l==="Ctrl"?f.createElement(Uo,null):l),f.createElement(Cr,{reactsToKey:"k"},"K"))))});function Cr(t){var e=t.reactsToKey,r=t.children,n=Fn(Gt(!1),2),o=n[0],i=n[1];return Xt(function(){if(e)return window.addEventListener("keydown",a),window.addEventListener("keyup",c),function(){window.removeEventListener("keydown",a),window.removeEventListener("keyup",c)};function a(u){u.key===e&&i(!0)}function c(u){u.key!==e&&u.key!=="Meta"||i(!1)}},[e]),f.createElement("kbd",{className:o?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},r)}function Bn(t,e){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;it.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Rr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function ve(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n=3||r===2&&n>=4||r===1&&n>=10);function i(a,c,u){if(o&&u!==void 0){var s=u[0].__autocomplete_algoliaCredentials,l={"X-Algolia-Application-Id":s.appId,"X-Algolia-API-Key":s.apiKey};t.apply(void 0,[a].concat(Ge(c),[{headers:l}]))}else t.apply(void 0,[a].concat(Ge(c)))}return{init:function(a,c){t("init",{appId:a,apiKey:c})},setUserToken:function(a){t("setUserToken",a)},clickedObjectIDsAfterSearch:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&i("clickedObjectIDsAfterSearch",Xe(c),c[0].items)},clickedObjectIDs:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&i("clickedObjectIDs",Xe(c),c[0].items)},clickedFilters:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&t.apply(void 0,["clickedFilters"].concat(c))},convertedObjectIDsAfterSearch:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&i("convertedObjectIDsAfterSearch",Xe(c),c[0].items)},convertedObjectIDs:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&i("convertedObjectIDs",Xe(c),c[0].items)},convertedFilters:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&t.apply(void 0,["convertedFilters"].concat(c))},viewedObjectIDs:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&c.reduce(function(s,l){var m=l.items,p=Kn(l,$o);return[].concat(Ge(s),Ge(Zo(ve(ve({},p),{},{objectIDs:(m==null?void 0:m.map(function(v){return v.objectID}))||p.objectIDs})).map(function(v){return{items:m,payload:v}})))},[]).forEach(function(s){var l=s.items;return i("viewedObjectIDs",[s.payload],l)})},viewedFilters:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&t.apply(void 0,["viewedFilters"].concat(c))}}}function Go(t){var e=t.items.reduce(function(r,n){var o;return r[n.__autocomplete_indexName]=((o=r[n.__autocomplete_indexName])!==null&&o!==void 0?o:[]).concat(n),r},{});return Object.keys(e).map(function(r){return{index:r,items:e[r],algoliaSource:["autocomplete"]}})}function kt(t){return t.objectID&&t.__autocomplete_indexName&&t.__autocomplete_queryID}function De(t){return De=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(t)}function ie(t){return function(e){if(Array.isArray(e))return Dt(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,r){if(e){if(typeof e=="string")return Dt(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dt(e,r)}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Dt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&ti({onItemsChange:n,items:p,insights:c,state:m}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(l){var m=l.setContext,p=l.onSelect,v=l.onActive;a("addAlgoliaAgent","insights-plugin"),m({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:c}}),p(function(d){var h=d.item,y=d.state,b=d.event;kt(h)&&o({state:y,event:b,insights:c,item:h,insightsEvents:[G({eventName:"Item Selected"},Nr({item:h,items:u.current}))]})}),v(function(d){var h=d.item,y=d.state,b=d.event;kt(h)&&i({state:y,event:b,insights:c,item:h,insightsEvents:[G({eventName:"Item Active"},Nr({item:h,items:u.current}))]})})},onStateChange:function(l){var m=l.state;s({state:m})},__autocomplete_pluginOptions:t}}function lt(t,e){var r=e;return{then:function(n,o){return lt(t.then(et(n,r,t),et(o,r,t)),r)},catch:function(n){return lt(t.catch(et(n,r,t)),r)},finally:function(n){return n&&r.onCancelList.push(n),lt(t.finally(et(n&&function(){return r.onCancelList=[],n()},r,t)),r)},cancel:function(){r.isCanceled=!0;var n=r.onCancelList;r.onCancelList=[],n.forEach(function(o){o()})},isCanceled:function(){return r.isCanceled===!0}}}function qr(t){return lt(t,{isCanceled:!1,onCancelList:[]})}function et(t,e,r){return t?function(n){return e.isCanceled?n:t(n)}:r}function Mr(t,e,r,n){if(!r)return null;if(t<0&&(e===null||n!==null&&e===0))return r+t;var o=(e===null?-1:e)+t;return o<=-1||o>=r?n===null?null:0:o}function Hr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function Ur(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0},reshape:function(i){return i.sources}},t),{},{id:(r=t.id)!==null&&r!==void 0?r:"autocomplete-".concat(Ko++),plugins:o,initialState:ae({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},t.initialState),onStateChange:function(i){var a;(a=t.onStateChange)===null||a===void 0||a.call(t,i),o.forEach(function(c){var u;return(u=c.onStateChange)===null||u===void 0?void 0:u.call(c,i)})},onSubmit:function(i){var a;(a=t.onSubmit)===null||a===void 0||a.call(t,i),o.forEach(function(c){var u;return(u=c.onSubmit)===null||u===void 0?void 0:u.call(c,i)})},onReset:function(i){var a;(a=t.onReset)===null||a===void 0||a.call(t,i),o.forEach(function(c){var u;return(u=c.onReset)===null||u===void 0?void 0:u.call(c,i)})},getSources:function(i){return Promise.all([].concat(ci(o.map(function(a){return a.getSources})),[t.getSources]).filter(Boolean).map(function(a){return function(c,u){var s=[];return Promise.resolve(c(u)).then(function(l){return Promise.all(l.filter(function(m){return!!m}).map(function(m){if(m.sourceId,s.includes(m.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(m.sourceId)," is not unique."));s.push(m.sourceId);var p={getItemInputValue:function(d){return d.state.query},getItemUrl:function(){},onSelect:function(d){(0,d.setIsOpen)(!1)},onActive:vt,onResolve:vt};Object.keys(p).forEach(function(d){p[d].__default=!0});var v=Ur(Ur({},p),m);return Promise.resolve(v)}))})}(a,i)})).then(function(a){return ze(a)}).then(function(a){return a.map(function(c){return ae(ae({},c),{},{onSelect:function(u){c.onSelect(u),e.forEach(function(s){var l;return(l=s.onSelect)===null||l===void 0?void 0:l.call(s,u)})},onActive:function(u){c.onActive(u),e.forEach(function(s){var l;return(l=s.onActive)===null||l===void 0?void 0:l.call(s,u)})},onResolve:function(u){c.onResolve(u),e.forEach(function(s){var l;return(l=s.onResolve)===null||l===void 0?void 0:l.call(s,u)})}})})})},navigator:ae({navigate:function(i){var a=i.itemUrl;n.location.assign(a)},navigateNewTab:function(i){var a=i.itemUrl,c=n.open(a,"_blank","noopener");c==null||c.focus()},navigateNewWindow:function(i){var a=i.itemUrl;n.open(a,"_blank","noopener")}},t.navigator)})}function Te(t){return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(t)}function Kr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function rt(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var Jr,xt,ot,we=null,$r=(Jr=-1,xt=-1,ot=void 0,function(t){var e=++Jr;return Promise.resolve(t).then(function(r){return ot&&e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Me(t){return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(t)}var Oi=["props","refresh","store"],Si=["inputElement","formElement","panelElement"],wi=["inputElement"],ji=["inputElement","maxLength"],Ei=["sourceIndex"],Pi=["sourceIndex"],Ii=["item","source","sourceIndex"];function Zr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function R(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Di(t){var e=t.props,r=t.refresh,n=t.store,o=re(t,Oi),i=function(a,c){return c!==void 0?"".concat(a,"-").concat(c):a};return{getEnvironmentProps:function(a){var c=a.inputElement,u=a.formElement,s=a.panelElement;function l(m){!n.getState().isOpen&&n.pendingRequests.isEmpty()||m.target===c||[u,s].some(function(p){return v=p,d=m.target,v===d||v.contains(d);var v,d})===!1&&(n.dispatch("blur",null),e.debug||n.pendingRequests.cancelAll())}return R({onTouchStart:l,onMouseDown:l,onTouchMove:function(m){n.getState().isOpen!==!1&&c===e.environment.document.activeElement&&m.target!==c&&c.blur()}},re(a,Si))},getRootProps:function(a){return R({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(e.id,"-list"):void 0,"aria-labelledby":"".concat(e.id,"-label")},a)},getFormProps:function(a){return a.inputElement,R({action:"",noValidate:!0,role:"search",onSubmit:function(c){var u;c.preventDefault(),e.onSubmit(R({event:c,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),(u=a.inputElement)===null||u===void 0||u.blur()},onReset:function(c){var u;c.preventDefault(),e.onReset(R({event:c,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),(u=a.inputElement)===null||u===void 0||u.focus()}},re(a,wi))},getLabelProps:function(a){var c=a||{},u=c.sourceIndex,s=re(c,Ei);return R({htmlFor:"".concat(i(e.id,u),"-input"),id:"".concat(i(e.id,u),"-label")},s)},getInputProps:function(a){var c;function u(y){(e.openOnFocus||n.getState().query)&&le(R({event:y,props:e,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var s=a||{},l=(s.inputElement,s.maxLength),m=l===void 0?512:l,p=re(s,ji),v=fe(n.getState()),d=function(y){return!!(y&&y.match(oi))}(((c=e.environment.navigator)===null||c===void 0?void 0:c.userAgent)||""),h=v!=null&&v.itemUrl&&!d?"go":"search";return R({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&n.getState().activeItemId!==null?"".concat(e.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(e.id,"-list"):void 0,"aria-labelledby":"".concat(e.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(e.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:h,spellCheck:"false",autoFocus:e.autoFocus,placeholder:e.placeholder,maxLength:m,type:"search",onChange:function(y){le(R({event:y,props:e,query:y.currentTarget.value.slice(0,m),refresh:r,store:n},o))},onKeyDown:function(y){(function(b){var _=b.event,S=b.props,O=b.refresh,g=b.store,P=_i(b,gi);if(_.key==="ArrowUp"||_.key==="ArrowDown"){var C=function(){var M=S.environment.document.getElementById("".concat(S.id,"-item-").concat(g.getState().activeItemId));M&&(M.scrollIntoViewIfNeeded?M.scrollIntoViewIfNeeded(!1):M.scrollIntoView(!1))},q=function(){var M=fe(g.getState());if(g.getState().activeItemId!==null&&M){var Ot=M.item,St=M.itemInputValue,$e=M.itemUrl,B=M.source;B.onActive(te({event:_,item:Ot,itemInputValue:St,itemUrl:$e,refresh:O,source:B,state:g.getState()},P))}};_.preventDefault(),g.getState().isOpen===!1&&(S.openOnFocus||g.getState().query)?le(te({event:_,props:S,query:g.getState().query,refresh:O,store:g},P)).then(function(){g.dispatch(_.key,{nextActiveItemId:S.defaultActiveItemId}),q(),setTimeout(C,0)}):(g.dispatch(_.key,{}),q(),C())}else if(_.key==="Escape")_.preventDefault(),g.dispatch(_.key,null),g.pendingRequests.cancelAll();else if(_.key==="Tab")g.dispatch("blur",null),g.pendingRequests.cancelAll();else if(_.key==="Enter"){if(g.getState().activeItemId===null||g.getState().collections.every(function(M){return M.items.length===0}))return void(S.debug||g.pendingRequests.cancelAll());_.preventDefault();var x=fe(g.getState()),D=x.item,N=x.itemInputValue,U=x.itemUrl,F=x.source;if(_.metaKey||_.ctrlKey)U!==void 0&&(F.onSelect(te({event:_,item:D,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P)),S.navigator.navigateNewTab({itemUrl:U,item:D,state:g.getState()}));else if(_.shiftKey)U!==void 0&&(F.onSelect(te({event:_,item:D,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P)),S.navigator.navigateNewWindow({itemUrl:U,item:D,state:g.getState()}));else if(!_.altKey){if(U!==void 0)return F.onSelect(te({event:_,item:D,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P)),void S.navigator.navigate({itemUrl:U,item:D,state:g.getState()});le(te({event:_,nextState:{isOpen:!1},props:S,query:N,refresh:O,store:g},P)).then(function(){F.onSelect(te({event:_,item:D,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P))})}}})(R({event:y,props:e,refresh:r,store:n},o))},onFocus:u,onBlur:vt,onClick:function(y){a.inputElement!==e.environment.document.activeElement||n.getState().isOpen||u(y)}},p)},getPanelProps:function(a){return R({onMouseDown:function(c){c.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},a)},getListProps:function(a){var c=a||{},u=c.sourceIndex,s=re(c,Pi);return R({role:"listbox","aria-labelledby":"".concat(i(e.id,u),"-label"),id:"".concat(i(e.id,u),"-list")},s)},getItemProps:function(a){var c=a.item,u=a.source,s=a.sourceIndex,l=re(a,Ii);return R({id:"".concat(i(e.id,s),"-item-").concat(c.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===c.__autocomplete_id,onMouseMove:function(m){if(c.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",c.__autocomplete_id);var p=fe(n.getState());if(n.getState().activeItemId!==null&&p){var v=p.item,d=p.itemInputValue,h=p.itemUrl,y=p.source;y.onActive(R({event:m,item:v,itemInputValue:d,itemUrl:h,refresh:r,source:y,state:n.getState()},o))}}},onMouseDown:function(m){m.preventDefault()},onClick:function(m){var p=u.getItemInputValue({item:c,state:n.getState()}),v=u.getItemUrl({item:c,state:n.getState()});(v?Promise.resolve():le(R({event:m,nextState:{isOpen:!1},props:e,query:p,refresh:r,store:n},o))).then(function(){u.onSelect(R({event:m,item:c,itemInputValue:p,itemUrl:v,refresh:r,source:u,state:n.getState()},o))})}},l)}}}function He(t){return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(t)}function Yr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function Ai(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Gi(t){var e=t.translations,r=e===void 0?{}:e,n=Yi(t,Qi),o=r.noResultsText,i=o===void 0?"No results for":o,a=r.suggestedQueryText,c=a===void 0?"Try searching for":a,u=r.reportMissingResultsText,s=u===void 0?"Believe this query should return results?":u,l=r.reportMissingResultsLinkText,m=l===void 0?"Let us know.":l,p=n.state.context.searchSuggestions;return f.createElement("div",{className:"DocSearch-NoResults"},f.createElement("div",{className:"DocSearch-Screen-Icon"},f.createElement(Ji,null)),f.createElement("p",{className:"DocSearch-Title"},i,' "',f.createElement("strong",null,n.state.query),'"'),p&&p.length>0&&f.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},f.createElement("p",{className:"DocSearch-Help"},c,":"),f.createElement("ul",null,p.slice(0,3).reduce(function(v,d){return[].concat(Zi(v),[f.createElement("li",{key:d},f.createElement("button",{className:"DocSearch-Prefill",key:d,type:"button",onClick:function(){n.setQuery(d.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},d))])},[]))),n.getMissingResultsUrl&&f.createElement("p",{className:"DocSearch-Help"},"".concat(s," "),f.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},m)))}var Xi=["hit","attribute","tagName"];function rn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function nn(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function on(t,e){return e.split(".").reduce(function(r,n){return r!=null&&r[n]?r[n]:null},t)}function ce(t){var e=t.hit,r=t.attribute,n=t.tagName;return K(n===void 0?"span":n,nn(nn({},ta(t,Xi)),{},{dangerouslySetInnerHTML:{__html:on(e,"_snippetResult.".concat(r,".value"))||on(e,r)}}))}function an(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var i,a,c=[],u=!0,s=!1;try{for(o=o.call(r);!(u=(i=o.next()).done)&&(c.push(i.value),!n||c.length!==n);u=!0);}catch(l){s=!0,a=l}finally{try{u||o.return==null||o.return()}finally{if(s)throw a}}return c}}(t,e)||function(r,n){if(r){if(typeof r=="string")return un(r,n);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor&&(o=r.constructor.name),o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return un(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function un(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r|<\/mark>)/g,oa=RegExp($n.source);function Qn(t){var e,r,n=t;if(!n.__docsearch_parent&&!t._highlightResult)return t.hierarchy.lvl0;var o=((n.__docsearch_parent?(e=n.__docsearch_parent)===null||e===void 0||(e=e._highlightResult)===null||e===void 0||(e=e.hierarchy)===null||e===void 0?void 0:e.lvl0:(r=t._highlightResult)===null||r===void 0||(r=r.hierarchy)===null||r===void 0?void 0:r.lvl0)||{}).value;return o&&oa.test(o)?o.replace($n,""):o}function Jt(){return Jt=Object.assign||function(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function ca(t){var e=t.translations,r=e===void 0?{}:e,n=ua(t,aa),o=r.recentSearchesTitle,i=o===void 0?"Recent":o,a=r.noRecentSearchesText,c=a===void 0?"No recent searches":a,u=r.saveRecentSearchButtonTitle,s=u===void 0?"Save this search":u,l=r.removeRecentSearchButtonTitle,m=l===void 0?"Remove this search from history":l,p=r.favoriteSearchesTitle,v=p===void 0?"Favorite":p,d=r.removeFavoriteSearchButtonTitle,h=d===void 0?"Remove this search from favorites":d;return n.state.status==="idle"&&n.hasCollections===!1?n.disableUserPersonalization?null:f.createElement("div",{className:"DocSearch-StartScreen"},f.createElement("p",{className:"DocSearch-Help"},c)):n.hasCollections===!1?null:f.createElement("div",{className:"DocSearch-Dropdown-Container"},f.createElement(zt,ht({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(Ui,null))},renderAction:function(y){var b=y.item,_=y.runFavoriteTransition,S=y.runDeleteTransition;return f.createElement(f.Fragment,null,f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:s,type:"submit",onClick:function(O){O.preventDefault(),O.stopPropagation(),_(function(){n.favoriteSearches.add(b),n.recentSearches.remove(b),n.refresh()})}},f.createElement(tn,null))),f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(O){O.preventDefault(),O.stopPropagation(),S(function(){n.recentSearches.remove(b),n.refresh()})}},f.createElement(Wt,null))))}})),f.createElement(zt,ht({},n,{title:v,collection:n.state.collections[1],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(tn,null))},renderAction:function(y){var b=y.item,_=y.runDeleteTransition;return f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:h,type:"submit",onClick:function(S){S.preventDefault(),S.stopPropagation(),_(function(){n.favoriteSearches.remove(b),n.refresh()})}},f.createElement(Wt,null)))}})))}var la=["translations"];function yt(){return yt=Object.assign||function(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var fa=f.memo(function(t){var e=t.translations,r=e===void 0?{}:e,n=sa(t,la);if(n.state.status==="error")return f.createElement($i,{translations:r==null?void 0:r.errorScreen});var o=n.state.collections.some(function(i){return i.items.length>0});return n.state.query?o===!1?f.createElement(Gi,yt({},n,{translations:r==null?void 0:r.noResultsScreen})):f.createElement(ia,n):f.createElement(ca,yt({},n,{hasCollections:o,translations:r==null?void 0:r.startScreen}))},function(t,e){return e.state.status==="loading"||e.state.status==="stalled"}),ma=["translations"];function gt(){return gt=Object.assign||function(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function va(t){var e=t.translations,r=e===void 0?{}:e,n=pa(t,ma),o=r.resetButtonTitle,i=o===void 0?"Clear the query":o,a=r.resetButtonAriaLabel,c=a===void 0?"Clear the query":a,u=r.cancelButtonText,s=u===void 0?"Cancel":u,l=r.cancelButtonAriaLabel,m=l===void 0?"Cancel":l,p=r.searchInputLabel,v=p===void 0?"Search":p,d=n.getFormProps({inputElement:n.inputRef.current}).onReset;return f.useEffect(function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()},[n.autoFocus,n.inputRef]),f.useEffect(function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()},[n.isFromSelection,n.inputRef]),f.createElement(f.Fragment,null,f.createElement("form",{className:"DocSearch-Form",onSubmit:function(h){h.preventDefault()},onReset:d},f.createElement("label",gt({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),f.createElement(Un,null),f.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},v)),f.createElement("div",{className:"DocSearch-LoadingIndicator"},f.createElement(Hi,null)),f.createElement("input",gt({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:64}))),f.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},f.createElement(Wt,null))),f.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":m,onClick:n.onClose},s))}var da=["_highlightResult","_snippetResult"];function ha(t,e){if(t==null)return{};var r,n,o=function(a,c){if(a==null)return{};var u,s,l={},m=Object.keys(a);for(s=0;s=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function ya(t){return function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch{return!1}}()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(e){return window.localStorage.setItem(t,JSON.stringify(e))},getItem:function(){var e=window.localStorage.getItem(t);return e?JSON.parse(e):[]}}}function sn(t){var e=t.key,r=t.limit,n=r===void 0?5:r,o=ya(e),i=o.getItem().slice(0,n);return{add:function(a){var c=a,u=(c._highlightResult,c._snippetResult,ha(c,da)),s=i.findIndex(function(l){return l.objectID===u.objectID});s>-1&&i.splice(s,1),i.unshift(u),i=i.slice(0,n),o.setItem(i)},remove:function(a){i=i.filter(function(c){return c.objectID!==a.objectID}),o.setItem(i)},getAll:function(){return i}}}var ga=["facetName","facetQuery"];function ba(t){var e,r="algoliasearch-client-js-".concat(t.key),n=function(){return e===void 0&&(e=t.localStorage||window.localStorage),e},o=function(){return JSON.parse(n().getItem(r)||"{}")},i=function(c){n().setItem(r,JSON.stringify(c))},a=function(){var c=t.timeToLive?1e3*t.timeToLive:null,u=o(),s=Object.fromEntries(Object.entries(u).filter(function(m){return se(m,2)[1].timestamp!==void 0}));if(i(s),c){var l=Object.fromEntries(Object.entries(s).filter(function(m){var p=se(m,2)[1],v=new Date().getTime();return!(p.timestamp+c2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){a();var l=JSON.stringify(c);return o()[l]}).then(function(l){return Promise.all([l?l.value:u(),l!==void 0])}).then(function(l){var m=se(l,2),p=m[0],v=m[1];return Promise.all([p,v||s.miss(p)])}).then(function(l){return se(l,1)[0]})},set:function(c,u){return Promise.resolve().then(function(){var s=o();return s[JSON.stringify(c)]={timestamp:new Date().getTime(),value:u},n().setItem(r,JSON.stringify(s)),u})},delete:function(c){return Promise.resolve().then(function(){var u=o();delete u[JSON.stringify(c)],n().setItem(r,JSON.stringify(u))})},clear:function(){return Promise.resolve().then(function(){n().removeItem(r)})}}}function Ee(t){var e=ft(t.caches),r=e.shift();return r===void 0?{get:function(n,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return o().then(function(a){return Promise.all([a,i.miss(a)])}).then(function(a){return se(a,1)[0]})},set:function(n,o){return Promise.resolve(o)},delete:function(n){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(n,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(n,o,i).catch(function(){return Ee({caches:e}).get(n,o,i)})},set:function(n,o){return r.set(n,o).catch(function(){return Ee({caches:e}).set(n,o)})},delete:function(n){return r.delete(n).catch(function(){return Ee({caches:e}).delete(n)})},clear:function(){return r.clear().catch(function(){return Ee({caches:e}).clear()})}}}function Tt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},e={};return{get:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},i=JSON.stringify(r);if(i in e)return Promise.resolve(t.serializable?JSON.parse(e[i]):e[i]);var a=n(),c=o&&o.miss||function(){return Promise.resolve()};return a.then(function(u){return c(u)}).then(function(){return a})},set:function(r,n){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear:function(){return e={},Promise.resolve()}}}function _a(t){for(var e=t.length-1;e>0;e--){var r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}function Zn(t,e){return e&&Object.keys(e).forEach(function(r){t[r]=e[r](t)}),t}function bt(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n0?n:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var me={Read:1,Write:2,Any:3},Yn=1,Oa=2,Gn=3;function Xn(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yn;return I(I({},t),{},{status:e,lastUpdate:Date.now()})}function eo(t){return typeof t=="string"?{protocol:"https",url:t,accept:me.Any}:{protocol:t.protocol||"https",url:t.url,accept:t.accept||me.Any}}var $t="GET",_t="POST";function Sa(t,e){return Promise.all(e.map(function(r){return t.get(r,function(){return Promise.resolve(Xn(r))})})).then(function(r){var n=r.filter(function(a){return function(c){return c.status===Yn||Date.now()-c.lastUpdate>12e4}(a)}),o=r.filter(function(a){return function(c){return c.status===Gn&&Date.now()-c.lastUpdate<=12e4}(a)}),i=[].concat(ft(n),ft(o));return{getTimeout:function(a,c){return(o.length===0&&a===0?1:o.length+3+a)*c},statelessHosts:i.length>0?i.map(function(a){return eo(a)}):e}})}function mn(t,e,r,n){var o=[],i=function(p,v){if(!(p.method===$t||p.data===void 0&&v.data===void 0)){var d=Array.isArray(p.data)?p.data:I(I({},p.data),v.data);return JSON.stringify(d)}}(r,n),a=function(p,v){var d=I(I({},p.headers),v.headers),h={};return Object.keys(d).forEach(function(y){var b=d[y];h[y.toLowerCase()]=b}),h}(t,n),c=r.method,u=r.method!==$t?{}:I(I({},r.data),n.data),s=I(I(I({"x-algolia-agent":t.userAgent.value},t.queryParameters),u),n.queryParameters),l=0,m=function p(v,d){var h=v.pop();if(h===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:pn(o)};var y={data:i,headers:a,method:c,url:ja(h,r.path,s),connectTimeout:d(l,t.timeouts.connect),responseTimeout:d(l,n.timeout)},b=function(S){var O={request:y,response:S,host:h,triesLeft:v.length};return o.push(O),O},_={onSuccess:function(S){return function(O){try{return JSON.parse(O.content)}catch(g){throw function(P,C){return{name:"DeserializationError",message:P,response:C}}(g.message,O)}}(S)},onRetry:function(S){var O=b(S);return S.isTimedOut&&l++,Promise.all([t.logger.info("Retryable failure",ro(O)),t.hostsCache.set(h,Xn(h,S.isTimedOut?Gn:Oa))]).then(function(){return p(v,d)})},onFail:function(S){throw b(S),function(O,g){var P=O.content,C=O.status,q=P;try{q=JSON.parse(P).message}catch{}return function(x,D,N){return{name:"ApiError",message:x,status:D,transporterStackTrace:N}}(q,C,g)}(S,pn(o))}};return t.requester.send(y).then(function(S){return function(O,g){return function(P){var C=P.status;return P.isTimedOut||function(q){var x=q.isTimedOut,D=q.status;return!x&&~~D==0}(P)||~~(C/100)!=2&&~~(C/100)!=4}(O)?g.onRetry(O):~~(O.status/100)==2?g.onSuccess(O):g.onFail(O)}(S,_)})};return Sa(t.hostsCache,e).then(function(p){return m(ft(p.statelessHosts).reverse(),p.getTimeout)})}function wa(t){var e={value:"Algolia for JavaScript (".concat(t,")"),add:function(r){var n="; ".concat(r.segment).concat(r.version!==void 0?" (".concat(r.version,")"):"");return e.value.indexOf(n)===-1&&(e.value="".concat(e.value).concat(n)),e}};return e}function ja(t,e,r){var n=to(r),o="".concat(t.protocol,"://").concat(t.url,"/").concat(e.charAt(0)==="/"?e.substr(1):e);return n.length&&(o+="?".concat(n)),o}function to(t){return Object.keys(t).map(function(e){return bt("%s=%s",e,(r=t[e],Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]"?JSON.stringify(t[e]):t[e]));var r}).join("&")}function pn(t){return t.map(function(e){return ro(e)})}function ro(t){var e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return I(I({},t),{},{request:I(I({},t.request),{},{headers:I(I({},t.request.headers),e)})})}var Ea=function(t){var e=t.appId,r=function(i,a,c){var u={"x-algolia-api-key":c,"x-algolia-application-id":a};return{headers:function(){return i===st.WithinHeaders?u:{}},queryParameters:function(){return i===st.WithinQueryParameters?u:{}}}}(t.authMode!==void 0?t.authMode:st.WithinHeaders,e,t.apiKey),n=function(i){var a=i.hostsCache,c=i.logger,u=i.requester,s=i.requestsCache,l=i.responsesCache,m=i.timeouts,p=i.userAgent,v=i.hosts,d=i.queryParameters,h={hostsCache:a,logger:c,requester:u,requestsCache:s,responsesCache:l,timeouts:m,userAgent:p,headers:i.headers,queryParameters:d,hosts:v.map(function(y){return eo(y)}),read:function(y,b){var _=fn(b,h.timeouts.read),S=function(){return mn(h,h.hosts.filter(function(g){return(g.accept&me.Read)!=0}),y,_)};if((_.cacheable!==void 0?_.cacheable:y.cacheable)!==!0)return S();var O={request:y,mappedRequestOptions:_,transporter:{queryParameters:h.queryParameters,headers:h.headers}};return h.responsesCache.get(O,function(){return h.requestsCache.get(O,function(){return h.requestsCache.set(O,S()).then(function(g){return Promise.all([h.requestsCache.delete(O),g])},function(g){return Promise.all([h.requestsCache.delete(O),Promise.reject(g)])}).then(function(g){var P=se(g,2);return P[0],P[1]})})},{miss:function(g){return h.responsesCache.set(O,g)}})},write:function(y,b){return mn(h,h.hosts.filter(function(_){return(_.accept&me.Write)!=0}),y,fn(b,h.timeouts.write))}};return h}(I(I({hosts:[{url:"".concat(e,"-dsn.algolia.net"),accept:me.Read},{url:"".concat(e,".algolia.net"),accept:me.Write}].concat(_a([{url:"".concat(e,"-1.algolianet.com")},{url:"".concat(e,"-2.algolianet.com")},{url:"".concat(e,"-3.algolianet.com")}]))},t),{},{headers:I(I(I({},r.headers()),{"content-type":"application/x-www-form-urlencoded"}),t.headers),queryParameters:I(I({},r.queryParameters()),t.queryParameters)})),o={transporter:n,appId:e,addAlgoliaAgent:function(i,a){n.userAgent.add({segment:i,version:a})},clearCache:function(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then(function(){})}};return Zn(o,t.methods)},Pa=function(t){return function(e,r){return e.method===$t?t.transporter.read(e,r):t.transporter.write(e,r)}},no=function(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={transporter:t.transporter,appId:t.appId,indexName:e};return Zn(n,r.methods)}},vn=function(t){return function(e,r){var n=e.map(function(o){return I(I({},o),{},{params:to(o.params||{})})});return t.transporter.read({method:_t,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)}},dn=function(t){return function(e,r){return Promise.all(e.map(function(n){var o=n.params,i=o.facetName,a=o.facetQuery,c=wo(o,ga);return no(t)(n.indexName,{methods:{searchForFacetValues:oo}}).searchForFacetValues(i,a,I(I({},r),c))}))}},Ia=function(t){return function(e,r,n){return t.transporter.read({method:_t,path:bt("1/answers/%s/prediction",t.indexName),data:{query:e,queryLanguages:r},cacheable:!0},n)}},ka=function(t){return function(e,r){return t.transporter.read({method:_t,path:bt("1/indexes/%s/query",t.indexName),data:{query:e},cacheable:!0},r)}},oo=function(t){return function(e,r,n){return t.transporter.read({method:_t,path:bt("1/indexes/%s/facets/%s/query",t.indexName,e),data:{facetQuery:r},cacheable:!0},n)}},Da=1,Aa=2,Ca=3;function io(t,e,r){var n,o={appId:t,apiKey:e,timeouts:{connect:1,read:2,write:30},requester:{send:function(i){return new Promise(function(a){var c=new XMLHttpRequest;c.open(i.method,i.url,!0),Object.keys(i.headers).forEach(function(m){return c.setRequestHeader(m,i.headers[m])});var u,s=function(m,p){return setTimeout(function(){c.abort(),a({status:0,content:p,isTimedOut:!0})},1e3*m)},l=s(i.connectTimeout,"Connection timeout");c.onreadystatechange=function(){c.readyState>c.OPENED&&u===void 0&&(clearTimeout(l),u=s(i.responseTimeout,"Socket timeout"))},c.onerror=function(){c.status===0&&(clearTimeout(l),clearTimeout(u),a({content:c.responseText||"Network request failed",status:c.status,isTimedOut:!1}))},c.onload=function(){clearTimeout(l),clearTimeout(u),a({content:c.responseText,status:c.status,isTimedOut:!1})},c.send(i.data)})}},logger:(n=Ca,{debug:function(i,a){return Da>=n&&console.debug(i,a),Promise.resolve()},info:function(i,a){return Aa>=n&&console.info(i,a),Promise.resolve()},error:function(i,a){return console.error(i,a),Promise.resolve()}}),responsesCache:Tt(),requestsCache:Tt({serializable:!1}),hostsCache:Ee({caches:[ba({key:"".concat("4.19.1","-").concat(t)}),Tt()]}),userAgent:wa("4.19.1").add({segment:"Browser",version:"lite"}),authMode:st.WithinQueryParameters};return Ea(I(I(I({},o),r),{},{methods:{search:vn,searchForFacetValues:dn,multipleQueries:vn,multipleSearchForFacetValues:dn,customRequest:Pa,initIndex:function(i){return function(a){return no(i)(a,{methods:{search:ka,searchForFacetValues:oo,findAnswers:Ia}})}}}}))}io.version="4.19.1";var xa=["footer","searchBox"];function Be(){return Be=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function La(t){var e=t.appId,r=t.apiKey,n=t.indexName,o=t.placeholder,i=o===void 0?"Search docs":o,a=t.searchParameters,c=t.maxResultsPerGroup,u=t.onClose,s=u===void 0?na:u,l=t.transformItems,m=l===void 0?ln:l,p=t.hitComponent,v=p===void 0?Mi:p,d=t.resultsFooterComponent,h=d===void 0?function(){return null}:d,y=t.navigator,b=t.initialScrollY,_=b===void 0?0:b,S=t.transformSearchClient,O=S===void 0?ln:S,g=t.disableUserPersonalization,P=g!==void 0&&g,C=t.initialQuery,q=C===void 0?"":C,x=t.translations,D=x===void 0?{}:x,N=t.getMissingResultsUrl,U=t.insights,F=U!==void 0&&U,M=D.footer,Ot=D.searchBox,St=Ra(D,xa),$e=Ta(f.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),B=$e[0],ao=$e[1],tr=f.useRef(null),wt=f.useRef(null),rr=f.useRef(null),Qe=f.useRef(null),he=f.useRef(null),Q=f.useRef(10),nr=f.useRef(typeof window<"u"?window.getSelection().toString().slice(0,64):"").current,ee=f.useRef(q||nr).current,or=function(j,k,T){return f.useMemo(function(){var H=io(j,k);return H.addAlgoliaAgent("docsearch","3.6.0"),/docsearch.js \(.*\)/.test(H.transporter.userAgent.value)===!1&&H.addAlgoliaAgent("docsearch-react","3.6.0"),T(H)},[j,k,T])}(e,r,O),oe=f.useRef(sn({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,ye=f.useRef(sn({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:oe.getAll().length===0?7:4})).current,ge=f.useCallback(function(j){if(!P){var k=j.type==="content"?j.__docsearch_parent:j;k&&oe.getAll().findIndex(function(T){return T.objectID===k.objectID})===-1&&ye.add(k)}},[oe,ye,P]),uo=f.useCallback(function(j){if(B.context.algoliaInsightsPlugin&&j.__autocomplete_id){var k=j,T={eventName:"Item Selected",index:k.__autocomplete_indexName,items:[k],positions:[j.__autocomplete_id],queryID:k.__autocomplete_queryID};B.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(T)}},[B.context.algoliaInsightsPlugin]),be=f.useMemo(function(){return Ri({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:ee,context:{searchSuggestions:[]}},insights:F,navigator:y,onStateChange:function(j){ao(j.state)},getSources:function(j){var k=j.query,T=j.state,H=j.setContext,Z=j.setStatus;if(!k)return P?[]:[{sourceId:"recentSearches",onSelect:function(A){var V=A.item,_e=A.event;ge(V),at(_e)||s()},getItemUrl:function(A){return A.item.url},getItems:function(){return ye.getAll()}},{sourceId:"favoriteSearches",onSelect:function(A){var V=A.item,_e=A.event;ge(V),at(_e)||s()},getItemUrl:function(A){return A.item.url},getItems:function(){return oe.getAll()}}];var Y=!!F;return or.search([{query:k,indexName:n,params:Rt({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(Q.current),"hierarchy.lvl2:".concat(Q.current),"hierarchy.lvl3:".concat(Q.current),"hierarchy.lvl4:".concat(Q.current),"hierarchy.lvl5:".concat(Q.current),"hierarchy.lvl6:".concat(Q.current),"content:".concat(Q.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:Y},a)}]).catch(function(A){throw A.name==="RetryError"&&Z("error"),A}).then(function(A){var V=A.results[0],_e=V.hits,so=V.nbHits,jt=cn(_e,function(Et){return Qn(Et)},c);T.context.searchSuggestions.length0&&(ir(),he.current&&he.current.focus())},[ee,ir]),f.useEffect(function(){function j(){if(wt.current){var k=.01*window.innerHeight;wt.current.style.setProperty("--docsearch-vh","".concat(k,"px"))}}return j(),window.addEventListener("resize",j),function(){window.removeEventListener("resize",j)}},[]),f.createElement("div",Be({ref:tr},lo({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",B.status==="stalled"&&"DocSearch-Container--Stalled",B.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(j){j.target===j.currentTarget&&s()}}),f.createElement("div",{className:"DocSearch-Modal",ref:wt},f.createElement("header",{className:"DocSearch-SearchBar",ref:rr},f.createElement(va,Be({},be,{state:B,autoFocus:ee.length===0,inputRef:he,isFromSelection:!!ee&&ee===nr,translations:Ot,onClose:s}))),f.createElement("div",{className:"DocSearch-Dropdown",ref:Qe},f.createElement(fa,Be({},be,{indexName:n,state:B,hitComponent:v,resultsFooterComponent:h,disableUserPersonalization:P,recentSearches:ye,favoriteSearches:oe,inputRef:he,translations:St,getMissingResultsUrl:N,onItemClick:function(j,k){uo(j),ge(j),at(k)||s()}}))),f.createElement("footer",{className:"DocSearch-Footer"},f.createElement(qi,{translations:M}))))}function Qt(){return Qt=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&arguments[1]!==void 0?arguments[1]:window;return typeof e=="string"?r.document.querySelector(e):e}(t.container,t.environment))}const Ha={id:"docsearch"},Ba=mo({__name:"VPAlgoliaSearchBox",props:{algolia:{}},setup(t){const e=t,r=po(),n=vo(),{site:o,localeIndex:i,lang:a}=Oo();ho(c),yo(i,c);async function c(){var v,d;await go();const l={...e.algolia,...(v=e.algolia.locales)==null?void 0:v[i.value]},m=((d=l.searchParameters)==null?void 0:d.facetFilters)??[],p=[...(Array.isArray(m)?m:[m]).filter(h=>!h.startsWith("lang:")),`lang:${a.value}`];u({...l,searchParameters:{...l.searchParameters,facetFilters:p}})}function u(l){const m=Object.assign({},l,{container:"#docsearch",navigator:{navigate({itemUrl:p}){const{pathname:v}=new URL(window.location.origin+p);n.path===v?window.location.assign(window.location.origin+p):r.go(p)}},transformItems(p){return p.map(v=>Object.assign({},v,{url:s(v.url)}))},hitComponent({hit:p,children:v}){return{__v:null,type:"a",ref:void 0,constructor:void 0,key:void 0,props:{href:p.url,children:v}}}});Ma(m)}function s(l){const{pathname:m,hash:p}=new URL(l,location.origin);return m.replace(/\.html$/,o.value.cleanUrls?"":".html")+p}return(l,m)=>(bo(),_o("div",Ha))}});export{Ba as default}; diff --git a/assets/chunks/framework.BmdFiWrL.js b/assets/chunks/framework.BmdFiWrL.js deleted file mode 100644 index e8320f5e..00000000 --- a/assets/chunks/framework.BmdFiWrL.js +++ /dev/null @@ -1,17 +0,0 @@ -/** -* @vue/shared v3.4.30 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function hr(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const te={},gt=[],Se=()=>{},ho=()=>!1,Vt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),pr=e=>e.startsWith("onUpdate:"),le=Object.assign,gr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},po=Object.prototype.hasOwnProperty,Y=(e,t)=>po.call(e,t),B=Array.isArray,mt=e=>vn(e)==="[object Map]",Fs=e=>vn(e)==="[object Set]",W=e=>typeof e=="function",ie=e=>typeof e=="string",Ze=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",$s=e=>(Z(e)||W(e))&&W(e.then)&&W(e.catch),Hs=Object.prototype.toString,vn=e=>Hs.call(e),go=e=>vn(e).slice(8,-1),js=e=>vn(e)==="[object Object]",mr=e=>ie(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yt=hr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),bn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},mo=/-(\w)/g,Ne=bn(e=>e.replace(mo,(t,n)=>n?n.toUpperCase():"")),yo=/\B([A-Z])/g,ft=bn(e=>e.replace(yo,"-$1").toLowerCase()),wn=bn(e=>e.charAt(0).toUpperCase()+e.slice(1)),sn=bn(e=>e?`on${wn(e)}`:""),Je=(e,t)=>!Object.is(e,t),$n=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},_o=e=>{const t=parseFloat(e);return isNaN(t)?e:t},vo=e=>{const t=ie(e)?Number(e):NaN;return isNaN(t)?e:t};let Dr;const Ds=()=>Dr||(Dr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function yr(e){if(B(e)){const t={};for(let n=0;n{if(n){const r=n.split(wo);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function _r(e){let t="";if(ie(e))t=e;else if(B(e))for(let n=0;nie(e)?e:e==null?"":B(e)||Z(e)&&(e.toString===Hs||!W(e.toString))?JSON.stringify(e,Bs,2):String(e),Bs=(e,t)=>t&&t.__v_isRef?Bs(e,t.value):mt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[Hn(r,i)+" =>"]=s,n),{})}:Fs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Hn(n))}:Ze(t)?Hn(t):Z(t)&&!B(t)&&!js(t)?String(t):t,Hn=(e,t="")=>{var n;return Ze(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.4.30 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let we;class To{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=we,!t&&we&&(this.index=(we.scopes||(we.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=we;try{return we=this,t()}finally{we=n}}}on(){we=this}off(){we=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),Ve()}return this._dirtyLevel>=5}set dirty(t){this._dirtyLevel=t?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=ze,n=ct;try{return ze=!0,ct=this,this._runnings++,Ur(this),this.fn()}finally{Br(this),this._runnings--,ct=n,ze=t}}stop(){this.active&&(Ur(this),Br(this),this.onStop&&this.onStop(),this.active=!1)}}function Oo(e){return e.value}function Ur(e){e._trackId++,e._depsLength=0}function Br(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t0&&(s??(s=e.get(r)===r._trackId))){r._dirtyLevel=2;continue}r._dirtyLevel{const n=new Map;return n.cleanup=e,n.computed=t,n},un=new WeakMap,at=Symbol(""),sr=Symbol("");function ve(e,t,n){if(ze&&ct){let r=un.get(e);r||un.set(e,r=new Map);let s=r.get(n);s||r.set(n,s=zs(()=>r.delete(n))),qs(ct,s)}}function je(e,t,n,r,s,i){const o=un.get(e);if(!o)return;let l=[];if(t==="clear")l=[...o.values()];else if(n==="length"&&B(e)){const c=Number(r);o.forEach((u,d)=>{(d==="length"||!Ze(d)&&d>=c)&&l.push(u)})}else switch(n!==void 0&&l.push(o.get(n)),t){case"add":B(e)?mr(n)&&l.push(o.get("length")):(l.push(o.get(at)),mt(e)&&l.push(o.get(sr)));break;case"delete":B(e)||(l.push(o.get(at)),mt(e)&&l.push(o.get(sr)));break;case"set":mt(e)&&l.push(o.get(at));break}br();for(const c of l)c&&Gs(c,5);wr()}function Lo(e,t){const n=un.get(e);return n&&n.get(t)}const Io=hr("__proto__,__v_isRef,__isVue"),Xs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ze)),Kr=Po();function Po(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=J(this);for(let i=0,o=this.length;i{e[t]=function(...n){et(),br();const r=J(this)[t].apply(this,n);return wr(),Ve(),r}}),e}function Mo(e){Ze(e)||(e=String(e));const t=J(this);return ve(t,"has",e),t.hasOwnProperty(e)}class Ys{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?qo:ei:i?Zs:Qs).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=B(t);if(!s){if(o&&Y(Kr,n))return Reflect.get(Kr,n,r);if(n==="hasOwnProperty")return Mo}const l=Reflect.get(t,n,r);return(Ze(n)?Xs.has(n):Io(n))||(s||ve(t,"get",n),i)?l:pe(l)?o&&mr(n)?l:l.value:Z(l)?s?Sn(l):Cn(l):l}}class Js extends Ys{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];if(!this._isShallow){const c=Mt(i);if(!fn(r)&&!Mt(r)&&(i=J(i),r=J(r)),!B(t)&&pe(i)&&!pe(r))return c?!1:(i.value=r,!0)}const o=B(t)&&mr(n)?Number(n)e,En=e=>Reflect.getPrototypeOf(e);function qt(e,t,n=!1,r=!1){e=e.__v_raw;const s=J(e),i=J(t);n||(Je(t,i)&&ve(s,"get",t),ve(s,"get",i));const{has:o}=En(s),l=r?Er:n?xr:Nt;if(o.call(s,t))return l(e.get(t));if(o.call(s,i))return l(e.get(i));e!==s&&e.get(t)}function Gt(e,t=!1){const n=this.__v_raw,r=J(n),s=J(e);return t||(Je(e,s)&&ve(r,"has",e),ve(r,"has",s)),e===s?n.has(e):n.has(e)||n.has(s)}function zt(e,t=!1){return e=e.__v_raw,!t&&ve(J(e),"iterate",at),Reflect.get(e,"size",e)}function kr(e){e=J(e);const t=J(this);return En(t).has.call(t,e)||(t.add(e),je(t,"add",e,e)),this}function Wr(e,t){t=J(t);const n=J(this),{has:r,get:s}=En(n);let i=r.call(n,e);i||(e=J(e),i=r.call(n,e));const o=s.call(n,e);return n.set(e,t),i?Je(t,o)&&je(n,"set",e,t):je(n,"add",e,t),this}function qr(e){const t=J(this),{has:n,get:r}=En(t);let s=n.call(t,e);s||(e=J(e),s=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return s&&je(t,"delete",e,void 0),i}function Gr(){const e=J(this),t=e.size!==0,n=e.clear();return t&&je(e,"clear",void 0,void 0),n}function Xt(e,t){return function(r,s){const i=this,o=i.__v_raw,l=J(o),c=t?Er:e?xr:Nt;return!e&&ve(l,"iterate",at),o.forEach((u,d)=>r.call(s,c(u),c(d),i))}}function Yt(e,t,n){return function(...r){const s=this.__v_raw,i=J(s),o=mt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,u=s[e](...r),d=n?Er:t?xr:Nt;return!t&&ve(i,"iterate",c?sr:at),{next(){const{value:h,done:y}=u.next();return y?{value:h,done:y}:{value:l?[d(h[0]),d(h[1])]:d(h),done:y}},[Symbol.iterator](){return this}}}}function Be(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function jo(){const e={get(i){return qt(this,i)},get size(){return zt(this)},has:Gt,add:kr,set:Wr,delete:qr,clear:Gr,forEach:Xt(!1,!1)},t={get(i){return qt(this,i,!1,!0)},get size(){return zt(this)},has:Gt,add:kr,set:Wr,delete:qr,clear:Gr,forEach:Xt(!1,!0)},n={get(i){return qt(this,i,!0)},get size(){return zt(this,!0)},has(i){return Gt.call(this,i,!0)},add:Be("add"),set:Be("set"),delete:Be("delete"),clear:Be("clear"),forEach:Xt(!0,!1)},r={get(i){return qt(this,i,!0,!0)},get size(){return zt(this,!0)},has(i){return Gt.call(this,i,!0)},add:Be("add"),set:Be("set"),delete:Be("delete"),clear:Be("clear"),forEach:Xt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Yt(i,!1,!1),n[i]=Yt(i,!0,!1),t[i]=Yt(i,!1,!0),r[i]=Yt(i,!0,!0)}),[e,n,t,r]}const[Vo,Do,Uo,Bo]=jo();function Cr(e,t){const n=t?e?Bo:Uo:e?Do:Vo;return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Y(n,s)&&s in r?n:r,s,i)}const Ko={get:Cr(!1,!1)},ko={get:Cr(!1,!0)},Wo={get:Cr(!0,!1)};const Qs=new WeakMap,Zs=new WeakMap,ei=new WeakMap,qo=new WeakMap;function Go(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zo(e){return e.__v_skip||!Object.isExtensible(e)?0:Go(go(e))}function Cn(e){return Mt(e)?e:Sr(e,!1,Fo,Ko,Qs)}function Xo(e){return Sr(e,!1,Ho,ko,Zs)}function Sn(e){return Sr(e,!0,$o,Wo,ei)}function Sr(e,t,n,r,s){if(!Z(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=s.get(e);if(i)return i;const o=zo(e);if(o===0)return e;const l=new Proxy(e,o===2?r:n);return s.set(e,l),l}function At(e){return Mt(e)?At(e.__v_raw):!!(e&&e.__v_isReactive)}function Mt(e){return!!(e&&e.__v_isReadonly)}function fn(e){return!!(e&&e.__v_isShallow)}function ti(e){return e?!!e.__v_raw:!1}function J(e){const t=e&&e.__v_raw;return t?J(t):e}function on(e){return Object.isExtensible(e)&&Vs(e,"__v_skip",!0),e}const Nt=e=>Z(e)?Cn(e):e,xr=e=>Z(e)?Sn(e):e;class ni{constructor(t,n,r,s){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new vr(()=>t(this._value),()=>Rt(this,this.effect._dirtyLevel===3?3:4)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=r}get value(){const t=J(this),n=t.effect._dirtyLevel;return(!t._cacheable||t.effect.dirty)&&Je(t._value,t._value=t.effect.run())&&n!==3&&Rt(t,5),Tr(t),t.effect._dirtyLevel>=2&&Rt(t,3),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Yo(e,t,n=!1){let r,s;const i=W(e);return i?(r=e,s=Se):(r=e.get,s=e.set),new ni(r,s,i||!s,n)}function Tr(e){var t;ze&&ct&&(e=J(e),qs(ct,(t=e.dep)!=null?t:e.dep=zs(()=>e.dep=void 0,e instanceof ni?e:void 0)))}function Rt(e,t=5,n,r){e=J(e);const s=e.dep;s&&Gs(s,t)}function pe(e){return!!(e&&e.__v_isRef===!0)}function oe(e){return si(e,!1)}function ri(e){return si(e,!0)}function si(e,t){return pe(e)?e:new Jo(e,t)}class Jo{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:J(t),this._value=n?t:Nt(t)}get value(){return Tr(this),this._value}set value(t){const n=this.__v_isShallow||fn(t)||Mt(t);t=n?t:J(t),Je(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:Nt(t),Rt(this,5))}}function ii(e){return pe(e)?e.value:e}const Qo={get:(e,t,n)=>ii(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return pe(s)&&!pe(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function oi(e){return At(e)?e:new Proxy(e,Qo)}class Zo{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Tr(this),()=>Rt(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function el(e){return new Zo(e)}class tl{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Lo(J(this._object),this._key)}}class nl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function rl(e,t,n){return pe(e)?e:W(e)?new nl(e):Z(e)&&arguments.length>1?sl(e,t,n):oe(e)}function sl(e,t,n){const r=e[t];return pe(r)?r:new tl(e,t,n)}/** -* @vue/runtime-core v3.4.30 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Xe(e,t,n,r){try{return r?e(...r):e()}catch(s){Dt(s,t,n)}}function xe(e,t,n,r){if(W(e)){const s=Xe(e,t,n,r);return s&&$s(s)&&s.catch(i=>{Dt(i,t,n)}),s}if(B(e)){const s=[];for(let i=0;i>>1,s=de[r],i=$t(s);iPe&&de.splice(t,1)}function cl(e){B(e)?_t.push(...e):(!We||!We.includes(e,e.allowRecurse?it+1:it))&&_t.push(e),ci()}function zr(e,t,n=Ft?Pe+1:0){for(;n$t(n)-$t(r));if(_t.length=0,We){We.push(...t);return}for(We=t,it=0;ite.id==null?1/0:e.id,al=(e,t)=>{const n=$t(e)-$t(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ai(e){ir=!1,Ft=!0,de.sort(al);try{for(Pe=0;Peie(E)?E.trim():E)),h&&(s=n.map(_o))}let l,c=r[l=sn(t)]||r[l=sn(Ne(t))];!c&&i&&(c=r[l=sn(ft(t))]),c&&xe(c,e,6,s);const u=r[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,xe(u,e,6,s)}}function ui(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},l=!1;if(!W(e)){const c=u=>{const d=ui(u,t,!0);d&&(l=!0,le(o,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(Z(e)&&r.set(e,null),null):(B(i)?i.forEach(c=>o[c]=null):le(o,i),Z(e)&&r.set(e,o),o)}function An(e,t){return!e||!Vt(t)?!1:(t=t.slice(2).replace(/Once$/,""),Y(e,t[0].toLowerCase()+t.slice(1))||Y(e,ft(t))||Y(e,t))}let he=null,Rn=null;function hn(e){const t=he;return he=e,Rn=e&&e.type.__scopeId||null,t}function Ba(e){Rn=e}function Ka(){Rn=null}function fl(e,t=he,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&cs(-1);const i=hn(t);let o;try{o=e(...s)}finally{hn(i),r._d&&cs(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function jn(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:l,emit:c,render:u,renderCache:d,props:h,data:y,setupState:E,ctx:A,inheritAttrs:P}=e,$=hn(e);let q,D;try{if(n.shapeFlag&4){const m=s||r,M=m;q=Ae(u.call(M,m,d,h,E,y,A)),D=l}else{const m=t;q=Ae(m.length>1?m(h,{attrs:l,slots:o,emit:c}):m(h,null)),D=t.props?l:dl(l)}}catch(m){Pt.length=0,Dt(m,e,1),q=se(me)}let g=q;if(D&&P!==!1){const m=Object.keys(D),{shapeFlag:M}=g;m.length&&M&7&&(i&&m.some(pr)&&(D=hl(D,i)),g=Qe(g,D,!1,!0))}return n.dirs&&(g=Qe(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&(g.transition=n.transition),q=g,hn($),q}const dl=e=>{let t;for(const n in e)(n==="class"||n==="style"||Vt(n))&&((t||(t={}))[n]=e[n]);return t},hl=(e,t)=>{const n={};for(const r in e)(!pr(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function pl(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:l,patchFlag:c}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Xr(r,o,u):!!o;if(c&8){const d=t.dynamicProps;for(let h=0;he.__isSuspense;function pi(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):cl(e)}function On(e,t,n=ue,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{et();const l=Bt(n),c=xe(t,n,e,o);return l(),Ve(),c});return r?s.unshift(i):s.push(i),i}}const Ue=e=>(t,n=ue)=>{(!Kt||e==="sp")&&On(e,(...r)=>t(...r),n)},yl=Ue("bm"),Ct=Ue("m"),_l=Ue("bu"),vl=Ue("u"),gi=Ue("bum"),Ln=Ue("um"),bl=Ue("sp"),wl=Ue("rtg"),El=Ue("rtc");function Cl(e,t=ue){On("ec",e,t)}function Ie(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;ot(o,l,void 0,i));else{const o=Object.keys(e);s=new Array(o.length);for(let l=0,c=o.length;l!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Ga(e){W(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,timeout:i,suspensible:o=!0,onError:l}=e;let c=null,u,d=0;const h=()=>(d++,c=null,y()),y=()=>{let E;return c||(E=c=t().catch(A=>{if(A=A instanceof Error?A:new Error(String(A)),l)return new Promise((P,$)=>{l(A,()=>P(h()),()=>$(A),d+1)});throw A}).then(A=>E!==c&&c?c:(A&&(A.__esModule||A[Symbol.toStringTag]==="Module")&&(A=A.default),u=A,A)))};return Rr({name:"AsyncComponentWrapper",__asyncLoader:y,get __asyncResolved(){return u},setup(){const E=ue;if(u)return()=>Vn(u,E);const A=D=>{c=null,Dt(D,E,13,!r)};if(o&&E.suspense||Kt)return y().then(D=>()=>Vn(D,E)).catch(D=>(A(D),()=>r?se(r,{error:D}):null));const P=oe(!1),$=oe(),q=oe(!!s);return s&&setTimeout(()=>{q.value=!1},s),i!=null&&setTimeout(()=>{if(!P.value&&!$.value){const D=new Error(`Async component timed out after ${i}ms.`);A(D),$.value=D}},i),y().then(()=>{P.value=!0,E.parent&&Ut(E.parent.vnode)&&(E.parent.effect.dirty=!0,Tn(E.parent.update))}).catch(D=>{A(D),$.value=D}),()=>{if(P.value&&u)return Vn(u,E);if($.value&&r)return se(r,{error:$.value});if(n&&!q.value)return se(n)}}})}function Vn(e,t){const{ref:n,props:r,children:s,ce:i}=t.vnode,o=se(e,r,s);return o.ref=n,o.ce=i,delete t.vnode.ce,o}function za(e,t,n={},r,s){if(he.isCE||he.parent&&vt(he.parent)&&he.parent.isCE)return t!=="default"&&(n.name=t),se("slot",n,r&&r());let i=e[t];i&&i._c&&(i._d=!1),Hi();const o=i&&mi(i(n)),l=Vi(_e,{key:n.key||o&&o.key||`_${t}`},o||(r?r():[]),o&&e._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function mi(e){return e.some(t=>yn(t)?!(t.type===me||t.type===_e&&!mi(t.children)):!0)?e:null}function Xa(e,t){const n={};for(const r in e)n[/[A-Z]/.test(r)?`on:${r}`:sn(r)]=e[r];return n}const or=e=>e?Ki(e)?Pr(e):or(e.parent):null,Ot=le(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>or(e.parent),$root:e=>or(e.root),$emit:e=>e.emit,$options:e=>Or(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Tn(e.update)}),$nextTick:e=>e.n||(e.n=xn.bind(e.proxy)),$watch:e=>Gl.bind(e)}),Dn=(e,t)=>e!==te&&!e.__isScriptSetup&&Y(e,t),Sl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:l,appContext:c}=e;let u;if(t[0]!=="$"){const E=o[t];if(E!==void 0)switch(E){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Dn(r,t))return o[t]=1,r[t];if(s!==te&&Y(s,t))return o[t]=2,s[t];if((u=e.propsOptions[0])&&Y(u,t))return o[t]=3,i[t];if(n!==te&&Y(n,t))return o[t]=4,n[t];lr&&(o[t]=0)}}const d=Ot[t];let h,y;if(d)return t==="$attrs"&&ve(e.attrs,"get",""),d(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==te&&Y(n,t))return o[t]=4,n[t];if(y=c.config.globalProperties,Y(y,t))return y[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return Dn(s,t)?(s[t]=n,!0):r!==te&&Y(r,t)?(r[t]=n,!0):Y(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i}},o){let l;return!!n[o]||e!==te&&Y(e,o)||Dn(t,o)||(l=i[0])&&Y(l,o)||Y(r,o)||Y(Ot,o)||Y(s.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Y(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ya(){return xl().slots}function xl(){const e=Pn();return e.setupContext||(e.setupContext=Wi(e))}function Jr(e){return B(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let lr=!0;function Tl(e){const t=Or(e),n=e.proxy,r=e.ctx;lr=!1,t.beforeCreate&&Qr(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:l,provide:c,inject:u,created:d,beforeMount:h,mounted:y,beforeUpdate:E,updated:A,activated:P,deactivated:$,beforeDestroy:q,beforeUnmount:D,destroyed:g,unmounted:m,render:M,renderTracked:O,renderTriggered:K,errorCaptured:U,serverPrefetch:I,expose:w,inheritAttrs:N,components:x,directives:G,filters:ne}=t;if(u&&Al(u,r,null),o)for(const X in o){const H=o[X];W(H)&&(r[X]=H.bind(n))}if(s){const X=s.call(n,n);Z(X)&&(e.data=Cn(X))}if(lr=!0,i)for(const X in i){const H=i[X],Fe=W(H)?H.bind(n,n):W(H.get)?H.get.bind(n,n):Se,kt=!W(H)&&W(H.set)?H.set.bind(n):Se,tt=re({get:Fe,set:kt});Object.defineProperty(r,X,{enumerable:!0,configurable:!0,get:()=>tt.value,set:Oe=>tt.value=Oe})}if(l)for(const X in l)yi(l[X],r,n,X);if(c){const X=W(c)?c.call(n):c;Reflect.ownKeys(X).forEach(H=>{Ml(H,X[H])})}d&&Qr(d,e,"c");function j(X,H){B(H)?H.forEach(Fe=>X(Fe.bind(n))):H&&X(H.bind(n))}if(j(yl,h),j(Ct,y),j(_l,E),j(vl,A),j(zl,P),j(Xl,$),j(Cl,U),j(El,O),j(wl,K),j(gi,D),j(Ln,m),j(bl,I),B(w))if(w.length){const X=e.exposed||(e.exposed={});w.forEach(H=>{Object.defineProperty(X,H,{get:()=>n[H],set:Fe=>n[H]=Fe})})}else e.exposed||(e.exposed={});M&&e.render===Se&&(e.render=M),N!=null&&(e.inheritAttrs=N),x&&(e.components=x),G&&(e.directives=G)}function Al(e,t,n=Se){B(e)&&(e=cr(e));for(const r in e){const s=e[r];let i;Z(s)?"default"in s?i=bt(s.from||r,s.default,!0):i=bt(s.from||r):i=bt(s),pe(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function Qr(e,t,n){xe(B(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function yi(e,t,n,r){const s=r.includes(".")?Ii(n,r):()=>n[r];if(ie(e)){const i=t[e];W(i)&&Me(s,i)}else if(W(e))Me(s,e.bind(n));else if(Z(e))if(B(e))e.forEach(i=>yi(i,t,n,r));else{const i=W(e.handler)?e.handler.bind(n):t[e.handler];W(i)&&Me(s,i,e)}}function Or(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!s.length&&!n&&!r?c=t:(c={},s.length&&s.forEach(u=>pn(c,u,o,!0)),pn(c,t,o)),Z(t)&&i.set(t,c),c}function pn(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&pn(e,i,n,!0),s&&s.forEach(o=>pn(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const l=Rl[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Rl={data:Zr,props:es,emits:es,methods:Tt,computed:Tt,beforeCreate:ge,created:ge,beforeMount:ge,mounted:ge,beforeUpdate:ge,updated:ge,beforeDestroy:ge,beforeUnmount:ge,destroyed:ge,unmounted:ge,activated:ge,deactivated:ge,errorCaptured:ge,serverPrefetch:ge,components:Tt,directives:Tt,watch:Ll,provide:Zr,inject:Ol};function Zr(e,t){return t?e?function(){return le(W(e)?e.call(this,this):e,W(t)?t.call(this,this):t)}:t:e}function Ol(e,t){return Tt(cr(e),cr(t))}function cr(e){if(B(e)){const t={};for(let n=0;n1)return n&&W(t)?t.call(r&&r.proxy):t}}const vi={},bi=()=>Object.create(vi),wi=e=>Object.getPrototypeOf(e)===vi;function Nl(e,t,n,r=!1){const s={},i=bi();e.propsDefaults=Object.create(null),Ei(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Xo(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Fl(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,l=J(s),[c]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[y,E]=Ci(h,t,!0);le(o,y),E&&l.push(...E)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!c)return Z(e)&&r.set(e,gt),gt;if(B(i))for(let d=0;d-1,E[1]=P<0||A-1||Y(E,"default"))&&l.push(h)}}}const u=[o,l];return Z(e)&&r.set(e,u),u}function ts(e){return e[0]!=="$"&&!yt(e)}function ns(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function rs(e,t){return ns(e)===ns(t)}function ss(e,t){return B(t)?t.findIndex(n=>rs(n,e)):W(t)&&rs(t,e)?0:-1}const Si=e=>e[0]==="_"||e==="$stable",Lr=e=>B(e)?e.map(Ae):[Ae(e)],$l=(e,t,n)=>{if(t._n)return t;const r=fl((...s)=>Lr(t(...s)),n);return r._c=!1,r},xi=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Si(s))continue;const i=e[s];if(W(i))t[s]=$l(s,i,r);else if(i!=null){const o=Lr(i);t[s]=()=>o}}},Ti=(e,t)=>{const n=Lr(t);e.slots.default=()=>n},Hl=(e,t)=>{const n=e.slots=bi();if(e.vnode.shapeFlag&32){const r=t._;r?(le(n,t),Vs(n,"_",r,!0)):xi(t,n)}else t&&Ti(e,t)},jl=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=te;if(r.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:(le(s,t),!n&&l===1&&delete s._):(i=!t.$stable,xi(t,s)),o=t}else t&&(Ti(e,t),o={default:1});if(i)for(const l in s)!Si(l)&&o[l]==null&&delete s[l]};function gn(e,t,n,r,s=!1){if(B(e)){e.forEach((y,E)=>gn(y,t&&(B(t)?t[E]:t),n,r,s));return}if(vt(r)&&!s)return;const i=r.shapeFlag&4?Pr(r.component):r.el,o=s?null:i,{i:l,r:c}=e,u=t&&t.r,d=l.refs===te?l.refs={}:l.refs,h=l.setupState;if(u!=null&&u!==c&&(ie(u)?(d[u]=null,Y(h,u)&&(h[u]=null)):pe(u)&&(u.value=null)),W(c))Xe(c,l,12,[o,d]);else{const y=ie(c),E=pe(c);if(y||E){const A=()=>{if(e.f){const P=y?Y(h,c)?h[c]:d[c]:c.value;s?B(P)&&gr(P,i):B(P)?P.includes(i)||P.push(i):y?(d[c]=[i],Y(h,c)&&(h[c]=d[c])):(c.value=[i],e.k&&(d[e.k]=c.value))}else y?(d[c]=o,Y(h,c)&&(h[c]=o)):E&&(c.value=o,e.k&&(d[e.k]=o))};o?(A.id=-1,ye(A,n)):A()}}}let is=!1;const pt=()=>{is||(console.error("Hydration completed but contains mismatches."),is=!0)},Vl=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Dl=e=>e.namespaceURI.includes("MathML"),Jt=e=>{if(Vl(e))return"svg";if(Dl(e))return"mathml"},Qt=e=>e.nodeType===8;function Ul(e){const{mt:t,p:n,o:{patchProp:r,createText:s,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:u}}=e,d=(g,m)=>{if(!m.hasChildNodes()){n(null,g,m),dn(),m._vnode=g;return}h(m.firstChild,g,null,null,null),dn(),m._vnode=g},h=(g,m,M,O,K,U=!1)=>{U=U||!!m.dynamicChildren;const I=Qt(g)&&g.data==="[",w=()=>P(g,m,M,O,K,I),{type:N,ref:x,shapeFlag:G,patchFlag:ne}=m;let ce=g.nodeType;m.el=g,ne===-2&&(U=!1,m.dynamicChildren=null);let j=null;switch(N){case wt:ce!==3?m.children===""?(c(m.el=s(""),o(g),g),j=g):j=w():(g.data!==m.children&&(pt(),g.data=m.children),j=i(g));break;case me:D(g)?(j=i(g),q(m.el=g.content.firstChild,g,M)):ce!==8||I?j=w():j=i(g);break;case It:if(I&&(g=i(g),ce=g.nodeType),ce===1||ce===3){j=g;const X=!m.children.length;for(let H=0;H{U=U||!!m.dynamicChildren;const{type:I,props:w,patchFlag:N,shapeFlag:x,dirs:G,transition:ne}=m,ce=I==="input"||I==="option";if(ce||N!==-1){G&&Ie(m,null,M,"created");let j=!1;if(D(g)){j=Ai(O,ne)&&M&&M.vnode.props&&M.vnode.props.appear;const H=g.content.firstChild;j&&ne.beforeEnter(H),q(H,g,M),m.el=g=H}if(x&16&&!(w&&(w.innerHTML||w.textContent))){let H=E(g.firstChild,m,g,M,O,K,U);for(;H;){pt();const Fe=H;H=H.nextSibling,l(Fe)}}else x&8&&g.textContent!==m.children&&(pt(),g.textContent=m.children);if(w)if(ce||!U||N&48)for(const H in w)(ce&&(H.endsWith("value")||H==="indeterminate")||Vt(H)&&!yt(H)||H[0]===".")&&r(g,H,null,w[H],void 0,void 0,M);else w.onClick&&r(g,"onClick",null,w.onClick,void 0,void 0,M);let X;(X=w&&w.onVnodeBeforeMount)&&Ce(X,M,m),G&&Ie(m,null,M,"beforeMount"),((X=w&&w.onVnodeMounted)||G||j)&&pi(()=>{X&&Ce(X,M,m),j&&ne.enter(g),G&&Ie(m,null,M,"mounted")},O)}return g.nextSibling},E=(g,m,M,O,K,U,I)=>{I=I||!!m.dynamicChildren;const w=m.children,N=w.length;for(let x=0;x{const{slotScopeIds:I}=m;I&&(K=K?K.concat(I):I);const w=o(g),N=E(i(g),m,w,M,O,K,U);return N&&Qt(N)&&N.data==="]"?i(m.anchor=N):(pt(),c(m.anchor=u("]"),w,N),N)},P=(g,m,M,O,K,U)=>{if(pt(),m.el=null,U){const N=$(g);for(;;){const x=i(g);if(x&&x!==N)l(x);else break}}const I=i(g),w=o(g);return l(g),n(null,m,w,I,M,O,Jt(w),K),I},$=(g,m="[",M="]")=>{let O=0;for(;g;)if(g=i(g),g&&Qt(g)&&(g.data===m&&O++,g.data===M)){if(O===0)return i(g);O--}return g},q=(g,m,M)=>{const O=m.parentNode;O&&O.replaceChild(g,m);let K=M;for(;K;)K.vnode.el===m&&(K.vnode.el=K.subTree.el=g),K=K.parent},D=g=>g.nodeType===1&&g.tagName.toLowerCase()==="template";return[d,h]}const ye=pi;function Bl(e){return Kl(e,Ul)}function Kl(e,t){const n=Ds();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:l,createComment:c,setText:u,setElementText:d,parentNode:h,nextSibling:y,setScopeId:E=Se,insertStaticContent:A}=e,P=(a,f,p,_=null,v=null,S=null,R=void 0,C=null,T=!!f.dynamicChildren)=>{if(a===f)return;a&&!lt(a,f)&&(_=Wt(a),Oe(a,v,S,!0),a=null),f.patchFlag===-2&&(T=!1,f.dynamicChildren=null);const{type:b,ref:L,shapeFlag:V}=f;switch(b){case wt:$(a,f,p,_);break;case me:q(a,f,p,_);break;case It:a==null&&D(f,p,_,R);break;case _e:x(a,f,p,_,v,S,R,C,T);break;default:V&1?M(a,f,p,_,v,S,R,C,T):V&6?G(a,f,p,_,v,S,R,C,T):(V&64||V&128)&&b.process(a,f,p,_,v,S,R,C,T,dt)}L!=null&&v&&gn(L,a&&a.ref,S,f||a,!f)},$=(a,f,p,_)=>{if(a==null)r(f.el=l(f.children),p,_);else{const v=f.el=a.el;f.children!==a.children&&u(v,f.children)}},q=(a,f,p,_)=>{a==null?r(f.el=c(f.children||""),p,_):f.el=a.el},D=(a,f,p,_)=>{[a.el,a.anchor]=A(a.children,f,p,_,a.el,a.anchor)},g=({el:a,anchor:f},p,_)=>{let v;for(;a&&a!==f;)v=y(a),r(a,p,_),a=v;r(f,p,_)},m=({el:a,anchor:f})=>{let p;for(;a&&a!==f;)p=y(a),s(a),a=p;s(f)},M=(a,f,p,_,v,S,R,C,T)=>{f.type==="svg"?R="svg":f.type==="math"&&(R="mathml"),a==null?O(f,p,_,v,S,R,C,T):I(a,f,v,S,R,C,T)},O=(a,f,p,_,v,S,R,C)=>{let T,b;const{props:L,shapeFlag:V,transition:F,dirs:k}=a;if(T=a.el=o(a.type,S,L&&L.is,L),V&8?d(T,a.children):V&16&&U(a.children,T,null,_,v,Un(a,S),R,C),k&&Ie(a,null,_,"created"),K(T,a,a.scopeId,R,_),L){for(const ee in L)ee!=="value"&&!yt(ee)&&i(T,ee,null,L[ee],S,a.children,_,v,$e);"value"in L&&i(T,"value",null,L.value,S),(b=L.onVnodeBeforeMount)&&Ce(b,_,a)}k&&Ie(a,null,_,"beforeMount");const z=Ai(v,F);z&&F.beforeEnter(T),r(T,f,p),((b=L&&L.onVnodeMounted)||z||k)&&ye(()=>{b&&Ce(b,_,a),z&&F.enter(T),k&&Ie(a,null,_,"mounted")},v)},K=(a,f,p,_,v)=>{if(p&&E(a,p),_)for(let S=0;S<_.length;S++)E(a,_[S]);if(v){let S=v.subTree;if(f===S){const R=v.vnode;K(a,R,R.scopeId,R.slotScopeIds,v.parent)}}},U=(a,f,p,_,v,S,R,C,T=0)=>{for(let b=T;b{const C=f.el=a.el;let{patchFlag:T,dynamicChildren:b,dirs:L}=f;T|=a.patchFlag&16;const V=a.props||te,F=f.props||te;let k;if(p&&nt(p,!1),(k=F.onVnodeBeforeUpdate)&&Ce(k,p,f,a),L&&Ie(f,a,p,"beforeUpdate"),p&&nt(p,!0),b?w(a.dynamicChildren,b,C,p,_,Un(f,v),S):R||H(a,f,C,null,p,_,Un(f,v),S,!1),T>0){if(T&16)N(C,f,V,F,p,_,v);else if(T&2&&V.class!==F.class&&i(C,"class",null,F.class,v),T&4&&i(C,"style",V.style,F.style,v),T&8){const z=f.dynamicProps;for(let ee=0;ee{k&&Ce(k,p,f,a),L&&Ie(f,a,p,"updated")},_)},w=(a,f,p,_,v,S,R)=>{for(let C=0;C{if(p!==_){if(p!==te)for(const C in p)!yt(C)&&!(C in _)&&i(a,C,p[C],null,R,f.children,v,S,$e);for(const C in _){if(yt(C))continue;const T=_[C],b=p[C];T!==b&&C!=="value"&&i(a,C,b,T,R,f.children,v,S,$e)}"value"in _&&i(a,"value",p.value,_.value,R)}},x=(a,f,p,_,v,S,R,C,T)=>{const b=f.el=a?a.el:l(""),L=f.anchor=a?a.anchor:l("");let{patchFlag:V,dynamicChildren:F,slotScopeIds:k}=f;k&&(C=C?C.concat(k):k),a==null?(r(b,p,_),r(L,p,_),U(f.children||[],p,L,v,S,R,C,T)):V>0&&V&64&&F&&a.dynamicChildren?(w(a.dynamicChildren,F,p,v,S,R,C),(f.key!=null||v&&f===v.subTree)&&Ri(a,f,!0)):H(a,f,p,L,v,S,R,C,T)},G=(a,f,p,_,v,S,R,C,T)=>{f.slotScopeIds=C,a==null?f.shapeFlag&512?v.ctx.activate(f,p,_,R,T):ne(f,p,_,v,S,R,T):ce(a,f,T)},ne=(a,f,p,_,v,S,R)=>{const C=a.component=lc(a,_,v);if(Ut(a)&&(C.ctx.renderer=dt),cc(C),C.asyncDep){if(v&&v.registerDep(C,j,R),!a.el){const T=C.subTree=se(me);q(null,T,f,p)}}else j(C,a,f,p,v,S,R)},ce=(a,f,p)=>{const _=f.component=a.component;if(pl(a,f,p))if(_.asyncDep&&!_.asyncResolved){X(_,f,p);return}else _.next=f,ll(_.update),_.effect.dirty=!0,_.update();else f.el=a.el,_.vnode=f},j=(a,f,p,_,v,S,R)=>{const C=()=>{if(a.isMounted){let{next:L,bu:V,u:F,parent:k,vnode:z}=a;{const ht=Oi(a);if(ht){L&&(L.el=z.el,X(a,L,R)),ht.asyncDep.then(()=>{a.isUnmounted||C()});return}}let ee=L,Q;nt(a,!1),L?(L.el=z.el,X(a,L,R)):L=z,V&&$n(V),(Q=L.props&&L.props.onVnodeBeforeUpdate)&&Ce(Q,k,L,z),nt(a,!0);const ae=jn(a),Te=a.subTree;a.subTree=ae,P(Te,ae,h(Te.el),Wt(Te),a,v,S),L.el=ae.el,ee===null&&gl(a,ae.el),F&&ye(F,v),(Q=L.props&&L.props.onVnodeUpdated)&&ye(()=>Ce(Q,k,L,z),v)}else{let L;const{el:V,props:F}=f,{bm:k,m:z,parent:ee}=a,Q=vt(f);if(nt(a,!1),k&&$n(k),!Q&&(L=F&&F.onVnodeBeforeMount)&&Ce(L,ee,f),nt(a,!0),V&&Fn){const ae=()=>{a.subTree=jn(a),Fn(V,a.subTree,a,v,null)};Q?f.type.__asyncLoader().then(()=>!a.isUnmounted&&ae()):ae()}else{const ae=a.subTree=jn(a);P(null,ae,p,_,a,v,S),f.el=ae.el}if(z&&ye(z,v),!Q&&(L=F&&F.onVnodeMounted)){const ae=f;ye(()=>Ce(L,ee,ae),v)}(f.shapeFlag&256||ee&&vt(ee.vnode)&&ee.vnode.shapeFlag&256)&&a.a&&ye(a.a,v),a.isMounted=!0,f=p=_=null}},T=a.effect=new vr(C,Se,()=>Tn(b),a.scope),b=a.update=()=>{T.dirty&&T.run()};b.id=a.uid,nt(a,!0),b()},X=(a,f,p)=>{f.component=a;const _=a.vnode.props;a.vnode=f,a.next=null,Fl(a,f.props,_,p),jl(a,f.children,p),et(),zr(a),Ve()},H=(a,f,p,_,v,S,R,C,T=!1)=>{const b=a&&a.children,L=a?a.shapeFlag:0,V=f.children,{patchFlag:F,shapeFlag:k}=f;if(F>0){if(F&128){kt(b,V,p,_,v,S,R,C,T);return}else if(F&256){Fe(b,V,p,_,v,S,R,C,T);return}}k&8?(L&16&&$e(b,v,S),V!==b&&d(p,V)):L&16?k&16?kt(b,V,p,_,v,S,R,C,T):$e(b,v,S,!0):(L&8&&d(p,""),k&16&&U(V,p,_,v,S,R,C,T))},Fe=(a,f,p,_,v,S,R,C,T)=>{a=a||gt,f=f||gt;const b=a.length,L=f.length,V=Math.min(b,L);let F;for(F=0;FL?$e(a,v,S,!0,!1,V):U(f,p,_,v,S,R,C,T,V)},kt=(a,f,p,_,v,S,R,C,T)=>{let b=0;const L=f.length;let V=a.length-1,F=L-1;for(;b<=V&&b<=F;){const k=a[b],z=f[b]=T?Ge(f[b]):Ae(f[b]);if(lt(k,z))P(k,z,p,null,v,S,R,C,T);else break;b++}for(;b<=V&&b<=F;){const k=a[V],z=f[F]=T?Ge(f[F]):Ae(f[F]);if(lt(k,z))P(k,z,p,null,v,S,R,C,T);else break;V--,F--}if(b>V){if(b<=F){const k=F+1,z=kF)for(;b<=V;)Oe(a[b],v,S,!0),b++;else{const k=b,z=b,ee=new Map;for(b=z;b<=F;b++){const be=f[b]=T?Ge(f[b]):Ae(f[b]);be.key!=null&&ee.set(be.key,b)}let Q,ae=0;const Te=F-z+1;let ht=!1,Hr=0;const St=new Array(Te);for(b=0;b=Te){Oe(be,v,S,!0);continue}let Le;if(be.key!=null)Le=ee.get(be.key);else for(Q=z;Q<=F;Q++)if(St[Q-z]===0&<(be,f[Q])){Le=Q;break}Le===void 0?Oe(be,v,S,!0):(St[Le-z]=b+1,Le>=Hr?Hr=Le:ht=!0,P(be,f[Le],p,null,v,S,R,C,T),ae++)}const jr=ht?kl(St):gt;for(Q=jr.length-1,b=Te-1;b>=0;b--){const be=z+b,Le=f[be],Vr=be+1{const{el:S,type:R,transition:C,children:T,shapeFlag:b}=a;if(b&6){tt(a.component.subTree,f,p,_);return}if(b&128){a.suspense.move(f,p,_);return}if(b&64){R.move(a,f,p,dt);return}if(R===_e){r(S,f,p);for(let V=0;VC.enter(S),v);else{const{leave:V,delayLeave:F,afterLeave:k}=C,z=()=>r(S,f,p),ee=()=>{V(S,()=>{z(),k&&k()})};F?F(S,z,ee):ee()}else r(S,f,p)},Oe=(a,f,p,_=!1,v=!1)=>{const{type:S,props:R,ref:C,children:T,dynamicChildren:b,shapeFlag:L,patchFlag:V,dirs:F,memoIndex:k}=a;if(V===-2&&(v=!1),C!=null&&gn(C,null,p,a,!0),k!=null&&(f.renderCache[k]=void 0),L&256){f.ctx.deactivate(a);return}const z=L&1&&F,ee=!vt(a);let Q;if(ee&&(Q=R&&R.onVnodeBeforeUnmount)&&Ce(Q,f,a),L&6)fo(a.component,p,_);else{if(L&128){a.suspense.unmount(p,_);return}z&&Ie(a,null,f,"beforeUnmount"),L&64?a.type.remove(a,f,p,dt,_):b&&(S!==_e||V>0&&V&64)?$e(b,f,p,!1,!0):(S===_e&&V&384||!v&&L&16)&&$e(T,f,p),_&&Fr(a)}(ee&&(Q=R&&R.onVnodeUnmounted)||z)&&ye(()=>{Q&&Ce(Q,f,a),z&&Ie(a,null,f,"unmounted")},p)},Fr=a=>{const{type:f,el:p,anchor:_,transition:v}=a;if(f===_e){uo(p,_);return}if(f===It){m(a);return}const S=()=>{s(p),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(a.shapeFlag&1&&v&&!v.persisted){const{leave:R,delayLeave:C}=v,T=()=>R(p,S);C?C(a.el,S,T):T()}else S()},uo=(a,f)=>{let p;for(;a!==f;)p=y(a),s(a),a=p;s(f)},fo=(a,f,p)=>{const{bum:_,scope:v,update:S,subTree:R,um:C,m:T,a:b}=a;os(T),os(b),_&&$n(_),v.stop(),S&&(S.active=!1,Oe(R,a,f,p)),C&&ye(C,f),ye(()=>{a.isUnmounted=!0},f),f&&f.pendingBranch&&!f.isUnmounted&&a.asyncDep&&!a.asyncResolved&&a.suspenseId===f.pendingId&&(f.deps--,f.deps===0&&f.resolve())},$e=(a,f,p,_=!1,v=!1,S=0)=>{for(let R=S;Ra.shapeFlag&6?Wt(a.component.subTree):a.shapeFlag&128?a.suspense.next():y(a.anchor||a.el);let Mn=!1;const $r=(a,f,p)=>{a==null?f._vnode&&Oe(f._vnode,null,null,!0):P(f._vnode||null,a,f,null,null,null,p),Mn||(Mn=!0,zr(),dn(),Mn=!1),f._vnode=a},dt={p:P,um:Oe,m:tt,r:Fr,mt:ne,mc:U,pc:H,pbc:w,n:Wt,o:e};let Nn,Fn;return t&&([Nn,Fn]=t(dt)),{render:$r,hydrate:Nn,createApp:Pl($r,Nn)}}function Un({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function nt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ai(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ri(e,t,n=!1){const r=e.children,s=t.children;if(B(r)&&B(s))for(let i=0;i>1,e[n[l]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Oi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Oi(t)}function os(e){if(e)for(let t=0;tbt(Wl);function Li(e,t){return In(e,null,t)}function Ja(e,t){return In(e,null,{flush:"post"})}const Zt={};function Me(e,t,n){return In(e,t,n)}function In(e,t,{immediate:n,deep:r,flush:s,once:i,onTrack:o,onTrigger:l}=te){if(t&&i){const O=t;t=(...K)=>{O(...K),M()}}const c=ue,u=O=>r===!0?O:ot(O,r===!1?1:void 0);let d,h=!1,y=!1;if(pe(e)?(d=()=>e.value,h=fn(e)):At(e)?(d=()=>u(e),h=!0):B(e)?(y=!0,h=e.some(O=>At(O)||fn(O)),d=()=>e.map(O=>{if(pe(O))return O.value;if(At(O))return u(O);if(W(O))return Xe(O,c,2)})):W(e)?t?d=()=>Xe(e,c,2):d=()=>(E&&E(),xe(e,c,3,[A])):d=Se,t&&r){const O=d;d=()=>ot(O())}let E,A=O=>{E=g.onStop=()=>{Xe(O,c,4),E=g.onStop=void 0}},P;if(Kt)if(A=Se,t?n&&xe(t,c,3,[d(),y?[]:void 0,A]):d(),s==="sync"){const O=ql();P=O.__watcherHandles||(O.__watcherHandles=[])}else return Se;let $=y?new Array(e.length).fill(Zt):Zt;const q=()=>{if(!(!g.active||!g.dirty))if(t){const O=g.run();(r||h||(y?O.some((K,U)=>Je(K,$[U])):Je(O,$)))&&(E&&E(),xe(t,c,3,[O,$===Zt?void 0:y&&$[0]===Zt?[]:$,A]),$=O)}else g.run()};q.allowRecurse=!!t;let D;s==="sync"?D=q:s==="post"?D=()=>ye(q,c&&c.suspense):(q.pre=!0,c&&(q.id=c.uid),D=()=>Tn(q));const g=new vr(d,Se,D),m=Ks(),M=()=>{g.stop(),m&&gr(m.effects,g)};return t?n?q():$=g.run():s==="post"?ye(g.run.bind(g),c&&c.suspense):g.run(),P&&P.push(M),M}function Gl(e,t,n){const r=this.proxy,s=ie(e)?e.includes(".")?Ii(r,e):()=>r[e]:e.bind(r,r);let i;W(t)?i=t:(i=t.handler,n=t);const o=Bt(this),l=In(s,i.bind(r),n);return o(),l}function Ii(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s{ot(r,t,n)});else if(js(e)){for(const r in e)ot(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&ot(e[r],t,n)}return e}const Ut=e=>e.type.__isKeepAlive;function zl(e,t){Pi(e,"a",t)}function Xl(e,t){Pi(e,"da",t)}function Pi(e,t,n=ue){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(On(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Ut(s.parent.vnode)&&Yl(r,t,n,s),s=s.parent}}function Yl(e,t,n,r){const s=On(t,e,r,!0);Ln(()=>{gr(r[t],s)},n)}const qe=Symbol("_leaveCb"),en=Symbol("_enterCb");function Jl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ct(()=>{e.isMounted=!0}),gi(()=>{e.isUnmounting=!0}),e}const Ee=[Function,Array],Mi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ee,onEnter:Ee,onAfterEnter:Ee,onEnterCancelled:Ee,onBeforeLeave:Ee,onLeave:Ee,onAfterLeave:Ee,onLeaveCancelled:Ee,onBeforeAppear:Ee,onAppear:Ee,onAfterAppear:Ee,onAppearCancelled:Ee},Ni=e=>{const t=e.subTree;return t.component?Ni(t.component):t},Ql={name:"BaseTransition",props:Mi,setup(e,{slots:t}){const n=Pn(),r=Jl();return()=>{const s=t.default&&$i(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){for(const y of s)if(y.type!==me){i=y;break}}const o=J(e),{mode:l}=o;if(r.isLeaving)return Bn(i);const c=ls(i);if(!c)return Bn(i);let u=ur(c,o,r,n,y=>u=y);mn(c,u);const d=n.subTree,h=d&&ls(d);if(h&&h.type!==me&&!lt(c,h)&&Ni(n).type!==me){const y=ur(h,o,r,n);if(mn(h,y),l==="out-in"&&c.type!==me)return r.isLeaving=!0,y.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Bn(i);l==="in-out"&&c.type!==me&&(y.delayLeave=(E,A,P)=>{const $=Fi(r,h);$[String(h.key)]=h,E[qe]=()=>{A(),E[qe]=void 0,delete u.delayedLeave},u.delayedLeave=P})}return i}}},Zl=Ql;function Fi(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ur(e,t,n,r,s){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:d,onEnterCancelled:h,onBeforeLeave:y,onLeave:E,onAfterLeave:A,onLeaveCancelled:P,onBeforeAppear:$,onAppear:q,onAfterAppear:D,onAppearCancelled:g}=t,m=String(e.key),M=Fi(n,e),O=(I,w)=>{I&&xe(I,r,9,w)},K=(I,w)=>{const N=w[1];O(I,w),B(I)?I.every(x=>x.length<=1)&&N():I.length<=1&&N()},U={mode:o,persisted:l,beforeEnter(I){let w=c;if(!n.isMounted)if(i)w=$||c;else return;I[qe]&&I[qe](!0);const N=M[m];N&<(e,N)&&N.el[qe]&&N.el[qe](),O(w,[I])},enter(I){let w=u,N=d,x=h;if(!n.isMounted)if(i)w=q||u,N=D||d,x=g||h;else return;let G=!1;const ne=I[en]=ce=>{G||(G=!0,ce?O(x,[I]):O(N,[I]),U.delayedLeave&&U.delayedLeave(),I[en]=void 0)};w?K(w,[I,ne]):ne()},leave(I,w){const N=String(e.key);if(I[en]&&I[en](!0),n.isUnmounting)return w();O(y,[I]);let x=!1;const G=I[qe]=ne=>{x||(x=!0,w(),ne?O(P,[I]):O(A,[I]),I[qe]=void 0,M[N]===e&&delete M[N])};M[N]=e,E?K(E,[I,G]):G()},clone(I){const w=ur(I,t,n,r,s);return s&&s(w),w}};return U}function Bn(e){if(Ut(e))return e=Qe(e),e.children=null,e}function ls(e){if(!Ut(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&W(n.default))return n.default()}}function mn(e,t){e.shapeFlag&6&&e.component?mn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function $i(e,t=!1,n){let r=[],s=0;for(let i=0;i1)for(let i=0;ie.__isTeleport,_e=Symbol.for("v-fgt"),wt=Symbol.for("v-txt"),me=Symbol.for("v-cmt"),It=Symbol.for("v-stc"),Pt=[];let Re=null;function Hi(e=!1){Pt.push(Re=e?null:[])}function tc(){Pt.pop(),Re=Pt[Pt.length-1]||null}let Ht=1;function cs(e){Ht+=e}function ji(e){return e.dynamicChildren=Ht>0?Re||gt:null,tc(),Ht>0&&Re&&Re.push(e),e}function Qa(e,t,n,r,s,i){return ji(Ui(e,t,n,r,s,i,!0))}function Vi(e,t,n,r,s){return ji(se(e,t,n,r,s,!0))}function yn(e){return e?e.__v_isVNode===!0:!1}function lt(e,t){return e.type===t.type&&e.key===t.key}const Di=({key:e})=>e??null,ln=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ie(e)||pe(e)||W(e)?{i:he,r:e,k:t,f:!!n}:e:null);function Ui(e,t=null,n=null,r=0,s=null,i=e===_e?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Di(t),ref:t&&ln(t),scopeId:Rn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:he};return l?(Ir(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=ie(n)?8:16),Ht>0&&!o&&Re&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Re.push(c),c}const se=nc;function nc(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===di)&&(e=me),yn(e)){const l=Qe(e,t,!0);return n&&Ir(l,n),Ht>0&&!i&&Re&&(l.shapeFlag&6?Re[Re.indexOf(e)]=l:Re.push(l)),l.patchFlag=-2,l}if(dc(e)&&(e=e.__vccOpts),t){t=rc(t);let{class:l,style:c}=t;l&&!ie(l)&&(t.class=_r(l)),Z(c)&&(ti(c)&&!B(c)&&(c=le({},c)),t.style=yr(c))}const o=ie(e)?1:ml(e)?128:ec(e)?64:Z(e)?4:W(e)?2:0;return Ui(e,t,n,r,s,o,i,!0)}function rc(e){return e?ti(e)||wi(e)?le({},e):e:null}function Qe(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:l,transition:c}=e,u=t?sc(s||{},t):s,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Di(u),ref:t&&t.ref?n&&i?B(i)?i.concat(ln(t)):[i,ln(t)]:ln(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Qe(e.ssContent),ssFallback:e.ssFallback&&Qe(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&mn(d,c.clone(d)),d}function Bi(e=" ",t=0){return se(wt,null,e,t)}function Za(e,t){const n=se(It,null,e);return n.staticCount=t,n}function eu(e="",t=!1){return t?(Hi(),Vi(me,null,e)):se(me,null,e)}function Ae(e){return e==null||typeof e=="boolean"?se(me):B(e)?se(_e,null,e.slice()):typeof e=="object"?Ge(e):se(wt,null,String(e))}function Ge(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Qe(e)}function Ir(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(B(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),Ir(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!wi(t)?t._ctx=he:s===3&&he&&(he.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else W(t)?(t={default:t,_ctx:he},n=32):(t=String(t),r&64?(n=16,t=[Bi(t)]):n=8);e.children=t,e.shapeFlag|=n}function sc(...e){const t={};for(let n=0;nue||he;let _n,fr;{const e=Ds(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};_n=t("__VUE_INSTANCE_SETTERS__",n=>ue=n),fr=t("__VUE_SSR_SETTERS__",n=>Kt=n)}const Bt=e=>{const t=ue;return _n(e),e.scope.on(),()=>{e.scope.off(),_n(t)}},as=()=>{ue&&ue.scope.off(),_n(null)};function Ki(e){return e.vnode.shapeFlag&4}let Kt=!1;function cc(e,t=!1){t&&fr(t);const{props:n,children:r}=e.vnode,s=Ki(e);Nl(e,n,s,t),Hl(e,r);const i=s?ac(e,t):void 0;return t&&fr(!1),i}function ac(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Sl);const{setup:r}=n;if(r){const s=e.setupContext=r.length>1?Wi(e):null,i=Bt(e);et();const o=Xe(r,e,0,[e.props,s]);if(Ve(),i(),$s(o)){if(o.then(as,as),t)return o.then(l=>{us(e,l,t)}).catch(l=>{Dt(l,e,0)});e.asyncDep=o}else us(e,o,t)}else ki(e,t)}function us(e,t,n){W(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Z(t)&&(e.setupState=oi(t)),ki(e,n)}let fs;function ki(e,t,n){const r=e.type;if(!e.render){if(!t&&fs&&!r.render){const s=r.template||Or(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=r,u=le(le({isCustomElement:i,delimiters:l},o),c);r.render=fs(s,u)}}e.render=r.render||Se}{const s=Bt(e);et();try{Tl(e)}finally{Ve(),s()}}}const uc={get(e,t){return ve(e,"get",""),e[t]}};function Wi(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,uc),slots:e.slots,emit:e.emit,expose:t}}function Pr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(oi(on(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ot)return Ot[n](e)},has(t,n){return n in t||n in Ot}})):e.proxy}function fc(e,t=!0){return W(e)?e.displayName||e.name:e.name||t&&e.__name}function dc(e){return W(e)&&"__vccOpts"in e}const re=(e,t)=>Yo(e,t,Kt);function dr(e,t,n){const r=arguments.length;return r===2?Z(t)&&!B(t)?yn(t)?se(e,null,[t]):se(e,t):se(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&yn(n)&&(n=[n]),se(e,t,n))}const hc="3.4.30";/** -* @vue/runtime-dom v3.4.30 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const pc="http://www.w3.org/2000/svg",gc="http://www.w3.org/1998/Math/MathML",He=typeof document<"u"?document:null,ds=He&&He.createElement("template"),mc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?He.createElementNS(pc,e):t==="mathml"?He.createElementNS(gc,e):n?He.createElement(e,{is:n}):He.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>He.createTextNode(e),createComment:e=>He.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>He.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{ds.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const l=ds.content;if(r==="svg"||r==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ke="transition",xt="animation",jt=Symbol("_vtc"),qi=(e,{slots:t})=>dr(Zl,yc(e),t);qi.displayName="Transition";const Gi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};qi.props=le({},Mi,Gi);const rt=(e,t=[])=>{B(e)?e.forEach(n=>n(...t)):e&&e(...t)},hs=e=>e?B(e)?e.some(t=>t.length>1):e.length>1:!1;function yc(e){const t={};for(const x in e)x in Gi||(t[x]=e[x]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:u=o,appearToClass:d=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:y=`${n}-leave-active`,leaveToClass:E=`${n}-leave-to`}=e,A=_c(s),P=A&&A[0],$=A&&A[1],{onBeforeEnter:q,onEnter:D,onEnterCancelled:g,onLeave:m,onLeaveCancelled:M,onBeforeAppear:O=q,onAppear:K=D,onAppearCancelled:U=g}=t,I=(x,G,ne)=>{st(x,G?d:l),st(x,G?u:o),ne&&ne()},w=(x,G)=>{x._isLeaving=!1,st(x,h),st(x,E),st(x,y),G&&G()},N=x=>(G,ne)=>{const ce=x?K:D,j=()=>I(G,x,ne);rt(ce,[G,j]),ps(()=>{st(G,x?c:i),ke(G,x?d:l),hs(ce)||gs(G,r,P,j)})};return le(t,{onBeforeEnter(x){rt(q,[x]),ke(x,i),ke(x,o)},onBeforeAppear(x){rt(O,[x]),ke(x,c),ke(x,u)},onEnter:N(!1),onAppear:N(!0),onLeave(x,G){x._isLeaving=!0;const ne=()=>w(x,G);ke(x,h),ke(x,y),wc(),ps(()=>{x._isLeaving&&(st(x,h),ke(x,E),hs(m)||gs(x,r,$,ne))}),rt(m,[x,ne])},onEnterCancelled(x){I(x,!1),rt(g,[x])},onAppearCancelled(x){I(x,!0),rt(U,[x])},onLeaveCancelled(x){w(x),rt(M,[x])}})}function _c(e){if(e==null)return null;if(Z(e))return[Kn(e.enter),Kn(e.leave)];{const t=Kn(e);return[t,t]}}function Kn(e){return vo(e)}function ke(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[jt]||(e[jt]=new Set)).add(t)}function st(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[jt];n&&(n.delete(t),n.size||(e[jt]=void 0))}function ps(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let vc=0;function gs(e,t,n,r){const s=e._endId=++vc,i=()=>{s===e._endId&&r()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=bc(e,t);if(!o)return r();const u=o+"end";let d=0;const h=()=>{e.removeEventListener(u,y),i()},y=E=>{E.target===e&&++d>=c&&h()};setTimeout(()=>{d(n[A]||"").split(", "),s=r(`${Ke}Delay`),i=r(`${Ke}Duration`),o=ms(s,i),l=r(`${xt}Delay`),c=r(`${xt}Duration`),u=ms(l,c);let d=null,h=0,y=0;t===Ke?o>0&&(d=Ke,h=o,y=i.length):t===xt?u>0&&(d=xt,h=u,y=c.length):(h=Math.max(o,u),d=h>0?o>u?Ke:xt:null,y=d?d===Ke?i.length:c.length:0);const E=d===Ke&&/\b(transform|all)(,|$)/.test(r(`${Ke}Property`).toString());return{type:d,timeout:h,propCount:y,hasTransform:E}}function ms(e,t){for(;e.lengthys(n)+ys(e[r])))}function ys(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function wc(){return document.body.offsetHeight}function Ec(e,t,n){const r=e[jt];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const _s=Symbol("_vod"),Cc=Symbol("_vsh"),Sc=Symbol(""),xc=/(^|;)\s*display\s*:/;function Tc(e,t,n){const r=e.style,s=ie(n);let i=!1;if(n&&!s){if(t)if(ie(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&cn(r,l,"")}else for(const o in t)n[o]==null&&cn(r,o,"");for(const o in n)o==="display"&&(i=!0),cn(r,o,n[o])}else if(s){if(t!==n){const o=r[Sc];o&&(n+=";"+o),r.cssText=n,i=xc.test(n)}}else t&&e.removeAttribute("style");_s in e&&(e[_s]=i?r.display:"",e[Cc]&&(r.display="none"))}const vs=/\s*!important$/;function cn(e,t,n){if(B(n))n.forEach(r=>cn(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Ac(e,t);vs.test(n)?e.setProperty(ft(r),n.replace(vs,""),"important"):e[r]=n}}const bs=["Webkit","Moz","ms"],kn={};function Ac(e,t){const n=kn[t];if(n)return n;let r=Ne(t);if(r!=="filter"&&r in e)return kn[t]=r;r=wn(r);for(let s=0;sWn||(Mc.then(()=>Wn=0),Wn=Date.now());function Fc(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;xe($c(r,n.value),t,5,[r])};return n.value=e,n.attached=Nc(),n}function $c(e,t){if(B(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Hc=(e,t,n,r,s,i,o,l,c)=>{const u=s==="svg";t==="class"?Ec(e,r,u):t==="style"?Tc(e,n,r):Vt(t)?pr(t)||Ic(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):jc(e,t,r,u))?(Rc(e,t,r,i,o,l,c),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Es(e,t,r,u,o,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Es(e,t,r,u))};function jc(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&xs(t)&&W(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return xs(t)&&ie(n)?!1:t in e}const Vc=["ctrl","shift","alt","meta"],Dc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Vc.some(n=>e[`${n}Key`]&&!t.includes(n))},tu=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=ft(s.key);if(t.some(o=>o===i||Uc[o]===i))return e(s)})},Bc=le({patchProp:Hc},mc);let qn,Ts=!1;function Kc(){return qn=Ts?qn:Bl(Bc),Ts=!0,qn}const ru=(...e)=>{const t=Kc().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Wc(r);if(s)return n(s,!0,kc(s))},t};function kc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wc(e){return ie(e)?document.querySelector(e):e}const su=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},qc="modulepreload",Gc=function(e){return"/"+e},As={},iu=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),o=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.all(n.map(l=>{if(l=Gc(l),l in As)return;As[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":qc,c||(d.as="script",d.crossOrigin=""),d.href=l,o&&d.setAttribute("nonce",o),document.head.appendChild(d),c)return new Promise((h,y)=>{d.addEventListener("load",h),d.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${l}`)))})}))}return s.then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},zc=window.__VP_SITE_DATA__;function Mr(e){return Ks()?(Ro(e),!0):!1}function Ye(e){return typeof e=="function"?e():ii(e)}const zi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Xc=Object.prototype.toString,Yc=e=>Xc.call(e)==="[object Object]",Xi=()=>{},Rs=Jc();function Jc(){var e,t;return zi&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Qc(e,t){function n(...r){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(s).catch(i)})}return n}const Yi=e=>e();function Zc(e=Yi){const t=oe(!0);function n(){t.value=!1}function r(){t.value=!0}const s=(...i)=>{t.value&&e(...i)};return{isActive:Sn(t),pause:n,resume:r,eventFilter:s}}function ea(e){return Pn()}function Ji(...e){if(e.length!==1)return rl(...e);const t=e[0];return typeof t=="function"?Sn(el(()=>({get:t,set:Xi}))):oe(t)}function ta(e,t,n={}){const{eventFilter:r=Yi,...s}=n;return Me(e,Qc(r,t),s)}function na(e,t,n={}){const{eventFilter:r,...s}=n,{eventFilter:i,pause:o,resume:l,isActive:c}=Zc(r);return{stop:ta(e,t,{...s,eventFilter:i}),pause:o,resume:l,isActive:c}}function Nr(e,t=!0,n){ea()?Ct(e,n):t?e():xn(e)}function Qi(e){var t;const n=Ye(e);return(t=n==null?void 0:n.$el)!=null?t:n}const De=zi?window:void 0;function Et(...e){let t,n,r,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,s]=e,t=De):[t,n,r,s]=e,!t)return Xi;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],o=()=>{i.forEach(d=>d()),i.length=0},l=(d,h,y,E)=>(d.addEventListener(h,y,E),()=>d.removeEventListener(h,y,E)),c=Me(()=>[Qi(t),Ye(s)],([d,h])=>{if(o(),!d)return;const y=Yc(h)?{...h}:h;i.push(...n.flatMap(E=>r.map(A=>l(d,E,A,y))))},{immediate:!0,flush:"post"}),u=()=>{c(),o()};return Mr(u),u}function ra(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ou(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=De,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=r,c=ra(t);return Et(s,i,d=>{d.repeat&&Ye(l)||c(d)&&n(d)},o)}function sa(){const e=oe(!1),t=Pn();return t&&Ct(()=>{e.value=!0},t),e}function ia(e){const t=sa();return re(()=>(t.value,!!e()))}function Zi(e,t={}){const{window:n=De}=t,r=ia(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const i=oe(!1),o=u=>{i.value=u.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",o):s.removeListener(o))},c=Li(()=>{r.value&&(l(),s=n.matchMedia(Ye(e)),"addEventListener"in s?s.addEventListener("change",o):s.addListener(o),i.value=s.matches)});return Mr(()=>{c(),l(),s=void 0}),i}const tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},nn="__vueuse_ssr_handlers__",oa=la();function la(){return nn in tn||(tn[nn]=tn[nn]||{}),tn[nn]}function eo(e,t){return oa[e]||t}function ca(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const aa={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Os="vueuse-storage";function ua(e,t,n,r={}){var s;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:h=De,eventFilter:y,onError:E=w=>{console.error(w)},initOnMounted:A}=r,P=(d?ri:oe)(typeof t=="function"?t():t);if(!n)try{n=eo("getDefaultStorage",()=>{var w;return(w=De)==null?void 0:w.localStorage})()}catch(w){E(w)}if(!n)return P;const $=Ye(t),q=ca($),D=(s=r.serializer)!=null?s:aa[q],{pause:g,resume:m}=na(P,()=>O(P.value),{flush:i,deep:o,eventFilter:y});h&&l&&Nr(()=>{Et(h,"storage",U),Et(h,Os,I),A&&U()}),A||U();function M(w,N){h&&h.dispatchEvent(new CustomEvent(Os,{detail:{key:e,oldValue:w,newValue:N,storageArea:n}}))}function O(w){try{const N=n.getItem(e);if(w==null)M(N,null),n.removeItem(e);else{const x=D.write(w);N!==x&&(n.setItem(e,x),M(N,x))}}catch(N){E(N)}}function K(w){const N=w?w.newValue:n.getItem(e);if(N==null)return c&&$!=null&&n.setItem(e,D.write($)),$;if(!w&&u){const x=D.read(N);return typeof u=="function"?u(x,$):q==="object"&&!Array.isArray(x)?{...$,...x}:x}else return typeof N!="string"?N:D.read(N)}function U(w){if(!(w&&w.storageArea!==n)){if(w&&w.key==null){P.value=$;return}if(!(w&&w.key!==e)){g();try{(w==null?void 0:w.newValue)!==D.write(P.value)&&(P.value=K(w))}catch(N){E(N)}finally{w?xn(m):m()}}}}function I(w){U(w.detail)}return P}function to(e){return Zi("(prefers-color-scheme: dark)",e)}function fa(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:s=De,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:u,disableTransition:d=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},y=to({window:s}),E=re(()=>y.value?"dark":"light"),A=c||(o==null?Ji(r):ua(o,r,i,{window:s,listenToStorageChanges:l})),P=re(()=>A.value==="auto"?E.value:A.value),$=eo("updateHTMLAttrs",(m,M,O)=>{const K=typeof m=="string"?s==null?void 0:s.document.querySelector(m):Qi(m);if(!K)return;let U;if(d&&(U=s.document.createElement("style"),U.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),s.document.head.appendChild(U)),M==="class"){const I=O.split(/\s/g);Object.values(h).flatMap(w=>(w||"").split(/\s/g)).filter(Boolean).forEach(w=>{I.includes(w)?K.classList.add(w):K.classList.remove(w)})}else K.setAttribute(M,O);d&&(s.getComputedStyle(U).opacity,document.head.removeChild(U))});function q(m){var M;$(t,n,(M=h[m])!=null?M:m)}function D(m){e.onChanged?e.onChanged(m,q):q(m)}Me(P,D,{flush:"post",immediate:!0}),Nr(()=>D(P.value));const g=re({get(){return u?A.value:P.value},set(m){A.value=m}});try{return Object.assign(g,{store:A,system:E,state:P})}catch{return g}}function da(e={}){const{valueDark:t="dark",valueLight:n="",window:r=De}=e,s=fa({...e,onChanged:(l,c)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),i=re(()=>s.system?s.system.value:to({window:r}).value?"dark":"light");return re({get(){return s.value==="dark"},set(l){const c=l?"dark":"light";i.value===c?s.value="auto":s.value=c}})}function Gn(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function no(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const zn=new WeakMap;function lu(e,t=!1){const n=oe(t);let r=null,s="";Me(Ji(e),l=>{const c=Gn(Ye(l));if(c){const u=c;if(zn.get(u)||zn.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(s=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=Gn(Ye(e));!l||n.value||(Rs&&(r=Et(l,"touchmove",c=>{ha(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=Gn(Ye(e));!l||!n.value||(Rs&&(r==null||r()),l.style.overflow=s,zn.delete(l),n.value=!1)};return Mr(o),re({get(){return n.value},set(l){l?i():o()}})}function cu(e={}){const{window:t=De,behavior:n="auto"}=e;if(!t)return{x:oe(0),y:oe(0)};const r=oe(t.scrollX),s=oe(t.scrollY),i=re({get(){return r.value},set(l){scrollTo({left:l,behavior:n})}}),o=re({get(){return s.value},set(l){scrollTo({top:l,behavior:n})}});return Et(t,"scroll",()=>{r.value=t.scrollX,s.value=t.scrollY},{capture:!1,passive:!0}),{x:i,y:o}}function au(e={}){const{window:t=De,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:i=!0}=e,o=oe(n),l=oe(r),c=()=>{t&&(i?(o.value=t.innerWidth,l.value=t.innerHeight):(o.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight))};if(c(),Nr(c),Et("resize",c,{passive:!0}),s){const u=Zi("(orientation: portrait)");Me(u,()=>c())}return{width:o,height:l}}var Xn={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1},Yn={};const ro=/^(?:[a-z]+:|\/\/)/i,pa="vitepress-theme-appearance",ga=/#.*$/,ma=/[?#].*$/,ya=/(?:(^|\/)index)?\.(?:md|html)$/,fe=typeof document<"u",so={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function _a(e,t,n=!1){if(t===void 0)return!1;if(e=Ls(`/${e}`),n)return new RegExp(t).test(e);if(Ls(t)!==e)return!1;const r=t.match(ga);return r?(fe?location.hash:"")===r[0]:!0}function Ls(e){return decodeURI(e).replace(ma,"").replace(ya,"$1")}function va(e){return ro.test(e)}function ba(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!va(n)&&_a(t,`/${n}/`,!0))||"root"}function wa(e,t){var r,s,i,o,l,c,u;const n=ba(e,t);return Object.assign({},e,{localeIndex:n,lang:((r=e.locales[n])==null?void 0:r.lang)??e.lang,dir:((s=e.locales[n])==null?void 0:s.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:oo(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(u=e.locales[n])==null?void 0:u.themeConfig}})}function io(e,t){const n=t.title||e.title,r=t.titleTemplate??e.titleTemplate;if(typeof r=="string"&&r.includes(":title"))return r.replace(/:title/g,n);const s=Ea(e.title,r);return n===s.slice(3)?n:`${n}${s}`}function Ea(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Ca(e,t){const[n,r]=t;if(n!=="meta")return!1;const s=Object.entries(r)[0];return s==null?!1:e.some(([i,o])=>i===n&&o[s[0]]===s[1])}function oo(e,t){return[...e.filter(n=>!Ca(t,n)),...t]}const Sa=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,xa=/^[a-z]:/i;function Is(e){const t=xa.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Sa,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const Jn=new Set;function Ta(e){if(Jn.size===0){const n=typeof process=="object"&&(Yn==null?void 0:Yn.VITE_EXTRA_EXTENSIONS)||(Xn==null?void 0:Xn.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(r=>Jn.add(r))}const t=e.split(".").pop();return t==null||!Jn.has(t.toLowerCase())}const Aa=Symbol(),ut=ri(zc);function uu(e){const t=re(()=>wa(ut.value,e.data.relativePath)),n=t.value.appearance,r=n==="force-dark"?oe(!0):n?da({storageKey:pa,initialValue:()=>typeof n=="string"?n:"auto",...typeof n=="object"?n:{}}):oe(!1),s=oe(fe?location.hash:"");return fe&&window.addEventListener("hashchange",()=>{s.value=location.hash}),Me(()=>e.data,()=>{s.value=fe?location.hash:""}),{site:t,theme:re(()=>t.value.themeConfig),page:re(()=>e.data),frontmatter:re(()=>e.data.frontmatter),params:re(()=>e.data.params),lang:re(()=>t.value.lang),dir:re(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:re(()=>t.value.localeIndex||"root"),title:re(()=>io(t.value,e.data)),description:re(()=>e.data.description||t.value.description),isDark:r,hash:re(()=>s.value)}}function Ra(){const e=bt(Aa);if(!e)throw new Error("vitepress data not properly injected in app");return e}function Oa(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Ps(e){return ro.test(e)||!e.startsWith("/")?e:Oa(ut.value.base,e)}function La(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),fe){const n="/";t=Is(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let r=__VP_HASH_MAP__[t.toLowerCase()];if(r||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",r=__VP_HASH_MAP__[t.toLowerCase()]),!r)return null;t=`${n}assets/${t}.${r}.js`}else t=`./${Is(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let an=[];function fu(e){an.push(e),Ln(()=>{an=an.filter(t=>t!==e)})}function Ia(){let e=ut.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=Ms(e,n);else if(Array.isArray(e))for(const r of e){const s=Ms(r,n);if(s){t=s;break}}return t}function Ms(e,t){const n=document.querySelector(e);if(!n)return 0;const r=n.getBoundingClientRect().bottom;return r<0?0:r+t}const Pa=Symbol(),lo="http://a.com",Ma=()=>({path:"/",component:null,data:so});function du(e,t){const n=Cn(Ma()),r={route:n,go:s};async function s(l=fe?location.href:"/"){var c,u;l=Qn(l),await((c=r.onBeforeRouteChange)==null?void 0:c.call(r,l))!==!1&&(fe&&l!==Qn(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((u=r.onAfterRouteChanged)==null?void 0:u.call(r,l)))}let i=null;async function o(l,c=0,u=!1){var y;if(await((y=r.onBeforePageLoad)==null?void 0:y.call(r,l))===!1)return;const d=new URL(l,lo),h=i=d.pathname;try{let E=await e(h);if(!E)throw new Error(`Page not found: ${h}`);if(i===h){i=null;const{default:A,__pageData:P}=E;if(!A)throw new Error(`Invalid route component: ${A}`);n.path=fe?h:Ps(h),n.component=on(A),n.data=on(P),fe&&xn(()=>{let $=ut.value.base+P.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!ut.value.cleanUrls&&!$.endsWith("/")&&($+=".html"),$!==d.pathname&&(d.pathname=$,l=$+d.search+d.hash,history.replaceState({},"",l)),d.hash&&!c){let q=null;try{q=document.getElementById(decodeURIComponent(d.hash).slice(1))}catch(D){console.warn(D)}if(q){Ns(q,d.hash);return}}window.scrollTo(0,c)})}}catch(E){if(!/fetch|Page not found/.test(E.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(E),!u)try{const A=await fetch(ut.value.base+"hashmap.json");window.__VP_HASH_MAP__=await A.json(),await o(l,c,!0);return}catch{}if(i===h){i=null,n.path=fe?h:Ps(h),n.component=t?on(t):null;const A=fe?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...so,relativePath:A}}}}return fe&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.target.closest("button"))return;const u=l.target.closest("a");if(u&&!u.closest(".vp-raw")&&(u instanceof SVGElement||!u.download)){const{target:d}=u,{href:h,origin:y,pathname:E,hash:A,search:P}=new URL(u.href instanceof SVGAnimatedString?u.href.animVal:u.href,u.baseURI),$=new URL(location.href);!l.ctrlKey&&!l.shiftKey&&!l.altKey&&!l.metaKey&&!d&&y===$.origin&&Ta(E)&&(l.preventDefault(),E===$.pathname&&P===$.search?(A!==$.hash&&(history.pushState({},"",h),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:$.href,newURL:h}))),A?Ns(u,A,u.classList.contains("header-anchor")):window.scrollTo(0,0)):s(h))}},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await o(Qn(location.href),l.state&&l.state.scrollPosition||0),(c=r.onAfterRouteChanged)==null||c.call(r,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),r}function Na(){const e=bt(Pa);if(!e)throw new Error("useRouter() is called without provider.");return e}function co(){return Na().route}function Ns(e,t,n=!1){let r=null;try{r=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(s){console.warn(s)}if(r){let s=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(r).paddingTop,10),o=window.scrollY+r.getBoundingClientRect().top-Ia()+i;requestAnimationFrame(s)}}function Qn(e){const t=new URL(e,lo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),ut.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const Zn=()=>an.forEach(e=>e()),hu=Rr({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=co(),{site:n}=Ra();return()=>dr(e.as,n.value.contentProps??{style:{position:"relative"}},[t.component?dr(t.component,{onVnodeMounted:Zn,onVnodeUpdated:Zn,onVnodeUnmounted:Zn}):"404 Page Not Found"])}}),pu=Rr({setup(e,{slots:t}){const n=oe(!1);return Ct(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function gu(){fe&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const r=(n=t.parentElement)==null?void 0:n.parentElement;if(!r)return;const s=Array.from(r.querySelectorAll("input")).indexOf(t);if(s<0)return;const i=r.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(u=>u.classList.contains("active"));if(!o)return;const l=i.children[s];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=r==null?void 0:r.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function mu(){if(fe){const e=new WeakMap;window.addEventListener("click",t=>{var r;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const s=n.parentElement,i=(r=n.nextElementSibling)==null?void 0:r.nextElementSibling;if(!s||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(s.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(d=>d.remove());let u=c.textContent||"";o&&(u=u.replace(/^ *(\$|>) /gm,"").trim()),Fa(u).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const d=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,d)})}})}}async function Fa(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const r=document.getSelection(),s=r?r.rangeCount>0&&r.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),s&&(r.removeAllRanges(),r.addRange(s)),n&&n.focus()}}function yu(e,t){let n=!0,r=[];const s=i=>{if(n){n=!1,i.forEach(l=>{const c=er(l);for(const u of document.head.children)if(u.isEqualNode(c)){r.push(u);return}});return}const o=i.map(er);r.forEach((l,c)=>{const u=o.findIndex(d=>d==null?void 0:d.isEqualNode(l??null));u!==-1?delete o[u]:(l==null||l.remove(),delete r[c])}),o.forEach(l=>l&&document.head.appendChild(l)),r=[...r,...o].filter(Boolean)};Li(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],u=io(o,i);u!==document.title&&(document.title=u);const d=l||o.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==d&&h.setAttribute("content",d):er(["meta",{name:"description",content:d}]),s(oo(o.head,Ha(c)))})}function er([e,t,n]){const r=document.createElement(e);for(const s in t)r.setAttribute(s,t[s]);return n&&(r.innerHTML=n),e==="script"&&!t.async&&(r.async=!1),r}function $a(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function Ha(e){return e.filter(t=>!$a(t))}const tr=new Set,ao=()=>document.createElement("link"),ja=e=>{const t=ao();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Va=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let rn;const Da=fe&&(rn=ao())&&rn.relList&&rn.relList.supports&&rn.relList.supports("prefetch")?ja:Va;function _u(){if(!fe||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const r=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!tr.has(c)){tr.add(c);const u=La(c);u&&Da(u)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):tr.add(l))})})};Ct(r);const s=co();Me(()=>s.path,r),Ln(()=>{n&&n.disconnect()})}export{nu as $,Ja as A,vl as B,Ia as C,ka as D,qa as E,_e as F,ri as G,fu as H,se as I,Wa as J,ro as K,co as L,sc as M,bt as N,au as O,yr as P,ou as Q,xn as R,cu as S,qi as T,fe as U,Sn as V,Ga as W,iu as X,lu as Y,Ml as Z,su as _,Bi as a,Xa as a0,tu as a1,Ya as a2,dr as a3,Za as a4,yu as a5,Pa as a6,uu as a7,Aa as a8,hu as a9,pu as aa,ut as ab,ru as ac,du as ad,La as ae,_u as af,mu as ag,gu as ah,Na as ai,Vi as b,Qa as c,Rr as d,eu as e,Ta as f,Ps as g,re as h,va as i,Ui as j,ii as k,Ka as l,_a as m,_r as n,Hi as o,Ba as p,Zi as q,za as r,oe as s,Ua as t,Ra as u,Me as v,fl as w,Li as x,Ct as y,Ln as z}; diff --git a/assets/chunks/qrcode.CZOxHFH-.js b/assets/chunks/qrcode.CZOxHFH-.js deleted file mode 100644 index ffafd68a..00000000 --- a/assets/chunks/qrcode.CZOxHFH-.js +++ /dev/null @@ -1 +0,0 @@ -const s="/assets/qrcode.b_bFVwtg.png";export{s as _}; diff --git a/assets/chunks/theme.D1TJKLdg.js b/assets/chunks/theme.D1TJKLdg.js deleted file mode 100644 index ac590af9..00000000 --- a/assets/chunks/theme.D1TJKLdg.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__fileDeps=["assets/chunks/VPAlgoliaSearchBox.CntkNbWN.js","assets/chunks/framework.BmdFiWrL.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); -import{d as _,o as a,c as l,r as c,n as M,a as F,t as I,b as k,w as v,e as f,T as pe,_ as b,u as Pe,i as je,f as Ge,g as he,h as g,j as d,k as i,p as B,l as H,m as G,q as ce,s as N,v as j,x,y as R,z as ee,A as Ve,B as Re,C as qe,D as q,F as C,E,G as Le,H as te,I as m,J as W,K as Se,L as ne,M as X,N as oe,O as Ke,P as we,Q as We,R as Je,S as Ie,U as se,V as Ye,W as Xe,X as Qe,Y as Te,Z as Ne,$ as Ze,a0 as xe,a1 as et,a2 as tt,a3 as Y}from"./framework.BmdFiWrL.js";const nt=_({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(n){return(e,t)=>(a(),l("span",{class:M(["VPBadge",e.type])},[c(e.$slots,"default",{},()=>[F(I(e.text),1)])],2))}}),ot={key:0,class:"VPBackdrop"},st=_({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(n){return(e,t)=>(a(),k(pe,{name:"fade"},{default:v(()=>[e.show?(a(),l("div",ot)):f("",!0)]),_:1}))}}),at=b(st,[["__scopeId","data-v-c79a1216"]]),S=Pe;function rt(n,e){let t,s=!1;return()=>{t&&clearTimeout(t),s?t=setTimeout(n,e):(n(),(s=!0)&&setTimeout(()=>s=!1,e))}}function ue(n){return/^\//.test(n)?n:`/${n}`}function fe(n){const{pathname:e,search:t,hash:s,protocol:o}=new URL(n,"http://a.com");if(je(n)||n.startsWith("#")||!o.startsWith("http")||!Ge(e))return n;const{site:r}=S(),u=e.endsWith("/")||e.endsWith(".html")?n:n.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,r.value.cleanUrls?"":".html")}${t}${s}`);return he(u)}function J({correspondingLink:n=!1}={}){const{site:e,localeIndex:t,page:s,theme:o,hash:r}=S(),u=g(()=>{var p,$;return{label:(p=e.value.locales[t.value])==null?void 0:p.label,link:(($=e.value.locales[t.value])==null?void 0:$.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:g(()=>Object.entries(e.value.locales).flatMap(([p,$])=>u.value.label===$.label?[]:{text:$.label,link:it($.link||(p==="root"?"/":`/${p}/`),o.value.i18nRouting!==!1&&n,s.value.relativePath.slice(u.value.link.length-1),!e.value.cleanUrls)+r.value})),currentLang:u}}function it(n,e,t,s){return e?n.replace(/\/$/,"")+ue(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):n}const lt=n=>(B("data-v-d6be1790"),n=n(),H(),n),ct={class:"NotFound"},ut={class:"code"},dt={class:"title"},vt=lt(()=>d("div",{class:"divider"},null,-1)),pt={class:"quote"},ht={class:"action"},ft=["href","aria-label"],_t=_({__name:"NotFound",setup(n){const{theme:e}=S(),{currentLang:t}=J();return(s,o)=>{var r,u,h,p,$;return a(),l("div",ct,[d("p",ut,I(((r=i(e).notFound)==null?void 0:r.code)??"404"),1),d("h1",dt,I(((u=i(e).notFound)==null?void 0:u.title)??"PAGE NOT FOUND"),1),vt,d("blockquote",pt,I(((h=i(e).notFound)==null?void 0:h.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",ht,[d("a",{class:"link",href:i(he)(i(t).link),"aria-label":((p=i(e).notFound)==null?void 0:p.linkLabel)??"go to home"},I((($=i(e).notFound)==null?void 0:$.linkText)??"Take me home"),9,ft)])])}}}),mt=b(_t,[["__scopeId","data-v-d6be1790"]]);function Me(n,e){if(Array.isArray(n))return Q(n);if(n==null)return[];e=ue(e);const t=Object.keys(n).sort((o,r)=>r.split("/").length-o.split("/").length).find(o=>e.startsWith(ue(o))),s=t?n[t]:[];return Array.isArray(s)?Q(s):Q(s.items,s.base)}function bt(n){const e=[];let t=0;for(const s in n){const o=n[s];if(o.items){t=e.push(o);continue}e[t]||e.push({items:[]}),e[t].items.push(o)}return e}function kt(n){const e=[];function t(s){for(const o of s)o.text&&o.link&&e.push({text:o.text,link:o.link,docFooterText:o.docFooterText}),o.items&&t(o.items)}return t(n),e}function de(n,e){return Array.isArray(e)?e.some(t=>de(n,t)):G(n,e.link)?!0:e.items?de(n,e.items):!1}function Q(n,e){return[...n].map(t=>{const s={...t},o=s.base||e;return o&&s.link&&(s.link=o+s.link),s.items&&(s.items=Q(s.items,o)),s})}function O(){const{frontmatter:n,page:e,theme:t}=S(),s=ce("(min-width: 960px)"),o=N(!1),r=g(()=>{const A=t.value.sidebar,T=e.value.relativePath;return A?Me(A,T):[]}),u=N(r.value);j(r,(A,T)=>{JSON.stringify(A)!==JSON.stringify(T)&&(u.value=r.value)});const h=g(()=>n.value.sidebar!==!1&&u.value.length>0&&n.value.layout!=="home"),p=g(()=>$?n.value.aside==null?t.value.aside==="left":n.value.aside==="left":!1),$=g(()=>n.value.layout==="home"?!1:n.value.aside!=null?!!n.value.aside:t.value.aside!==!1),L=g(()=>h.value&&s.value),y=g(()=>h.value?bt(u.value):[]);function P(){o.value=!0}function w(){o.value=!1}function V(){o.value?w():P()}return{isOpen:o,sidebar:u,sidebarGroups:y,hasSidebar:h,hasAside:$,leftAside:p,isSidebarEnabled:L,open:P,close:w,toggle:V}}function gt(n,e){let t;x(()=>{t=n.value?document.activeElement:void 0}),R(()=>{window.addEventListener("keyup",s)}),ee(()=>{window.removeEventListener("keyup",s)});function s(o){o.key==="Escape"&&n.value&&(e(),t==null||t.focus())}}function $t(n){const{page:e,hash:t}=S(),s=N(!1),o=g(()=>n.value.collapsed!=null),r=g(()=>!!n.value.link),u=N(!1),h=()=>{u.value=G(e.value.relativePath,n.value.link)};j([e,n,t],h),R(h);const p=g(()=>u.value?!0:n.value.items?de(e.value.relativePath,n.value.items):!1),$=g(()=>!!(n.value.items&&n.value.items.length));x(()=>{s.value=!!(o.value&&n.value.collapsed)}),Ve(()=>{(u.value||p.value)&&(s.value=!1)});function L(){o.value&&(s.value=!s.value)}return{collapsed:s,collapsible:o,isLink:r,isActiveLink:u,hasActiveLink:p,hasChildren:$,toggle:L}}function yt(){const{hasSidebar:n}=O(),e=ce("(min-width: 960px)"),t=ce("(min-width: 1280px)");return{isAsideEnabled:g(()=>!t.value&&!e.value?!1:n.value?t.value:e.value)}}const ve=[];function Ae(n){return typeof n.outline=="object"&&!Array.isArray(n.outline)&&n.outline.label||n.outlineTitle||"On this page"}function _e(n){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const s=Number(t.tagName[1]);return{element:t,title:Pt(t),link:"#"+t.id,level:s}});return Vt(e,n)}function Pt(n){let e="";for(const t of n.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor")||t.classList.contains("ignore-header"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function Vt(n,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[s,o]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;n=n.filter(u=>u.level>=s&&u.level<=o),ve.length=0;for(const{element:u,link:h}of n)ve.push({element:u,link:h});const r=[];e:for(let u=0;u=0;p--){const $=n[p];if($.level{requestAnimationFrame(r),window.addEventListener("scroll",s)}),Re(()=>{u(location.hash)}),ee(()=>{window.removeEventListener("scroll",s)});function r(){if(!t.value)return;const h=window.scrollY,p=window.innerHeight,$=document.body.offsetHeight,L=Math.abs(h+p-$)<1,y=ve.map(({element:w,link:V})=>({link:V,top:St(w)})).filter(({top:w})=>!Number.isNaN(w)).sort((w,V)=>w.top-V.top);if(!y.length){u(null);return}if(h<1){u(null);return}if(L){u(y[y.length-1].link);return}let P=null;for(const{link:w,top:V}of y){if(V>h+qe()+4)break;P=w}u(P)}function u(h){o&&o.classList.remove("active"),h==null?o=null:o=n.value.querySelector(`a[href="${decodeURIComponent(h)}"]`);const p=o;p?(p.classList.add("active"),e.value.style.top=p.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function St(n){let e=0;for(;n!==document.body;){if(n===null)return NaN;e+=n.offsetTop,n=n.offsetParent}return e}const wt=["href","title"],It=_({__name:"VPDocOutlineItem",props:{headers:{},root:{type:Boolean}},setup(n){function e({target:t}){const s=t.href.split("#")[1],o=document.getElementById(decodeURIComponent(s));o==null||o.focus({preventScroll:!0})}return(t,s)=>{const o=q("VPDocOutlineItem",!0);return a(),l("ul",{class:M(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),l(C,null,E(t.headers,({children:r,link:u,title:h})=>(a(),l("li",null,[d("a",{class:"outline-link",href:u,onClick:e,title:h},I(h),9,wt),r!=null&&r.length?(a(),k(o,{key:0,headers:r},null,8,["headers"])):f("",!0)]))),256))],2)}}}),Ce=b(It,[["__scopeId","data-v-b933a997"]]),Tt={class:"content"},Nt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Mt=_({__name:"VPDocAsideOutline",setup(n){const{frontmatter:e,theme:t}=S(),s=Le([]);te(()=>{s.value=_e(e.value.outline??t.value.outline)});const o=N(),r=N();return Lt(o,r),(u,h)=>(a(),l("nav",{"aria-labelledby":"doc-outline-aria-label",class:M(["VPDocAsideOutline",{"has-outline":s.value.length>0}]),ref_key:"container",ref:o},[d("div",Tt,[d("div",{class:"outline-marker",ref_key:"marker",ref:r},null,512),d("div",Nt,I(i(Ae)(i(t))),1),m(Ce,{headers:s.value,root:!0},null,8,["headers"])])],2))}}),At=b(Mt,[["__scopeId","data-v-a5bbad30"]]),Ct={class:"VPDocAsideCarbonAds"},Bt=_({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(n){const e=()=>null;return(t,s)=>(a(),l("div",Ct,[m(i(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),Ht=n=>(B("data-v-3f215769"),n=n(),H(),n),Et={class:"VPDocAside"},Dt=Ht(()=>d("div",{class:"spacer"},null,-1)),Ft=_({__name:"VPDocAside",setup(n){const{theme:e}=S();return(t,s)=>(a(),l("div",Et,[c(t.$slots,"aside-top",{},void 0,!0),c(t.$slots,"aside-outline-before",{},void 0,!0),m(At),c(t.$slots,"aside-outline-after",{},void 0,!0),Dt,c(t.$slots,"aside-ads-before",{},void 0,!0),i(e).carbonAds?(a(),k(Bt,{key:0,"carbon-ads":i(e).carbonAds},null,8,["carbon-ads"])):f("",!0),c(t.$slots,"aside-ads-after",{},void 0,!0),c(t.$slots,"aside-bottom",{},void 0,!0)]))}}),Ot=b(Ft,[["__scopeId","data-v-3f215769"]]);function Ut(){const{theme:n,page:e}=S();return g(()=>{const{text:t="Edit this page",pattern:s=""}=n.value.editLink||{};let o;return typeof s=="function"?o=s(e.value):o=s.replace(/:path/g,e.value.filePath),{url:o,text:t}})}function zt(){const{page:n,theme:e,frontmatter:t}=S();return g(()=>{var $,L,y,P,w,V,A,T;const s=Me(e.value.sidebar,n.value.relativePath),o=kt(s),r=jt(o,U=>U.link.replace(/[?#].*$/,"")),u=r.findIndex(U=>G(n.value.relativePath,U.link)),h=(($=e.value.docFooter)==null?void 0:$.prev)===!1&&!t.value.prev||t.value.prev===!1,p=((L=e.value.docFooter)==null?void 0:L.next)===!1&&!t.value.next||t.value.next===!1;return{prev:h?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((y=r[u-1])==null?void 0:y.docFooterText)??((P=r[u-1])==null?void 0:P.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((w=r[u-1])==null?void 0:w.link)},next:p?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((V=r[u+1])==null?void 0:V.docFooterText)??((A=r[u+1])==null?void 0:A.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((T=r[u+1])==null?void 0:T.link)}}})}function jt(n,e){const t=new Set;return n.filter(s=>{const o=e(s);return t.has(o)?!1:t.add(o)})}const D=_({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(n){const e=n,t=g(()=>e.tag??(e.href?"a":"span")),s=g(()=>e.href&&Se.test(e.href)||e.target==="_blank");return(o,r)=>(a(),k(W(t.value),{class:M(["VPLink",{link:o.href,"vp-external-link-icon":s.value,"no-icon":o.noIcon}]),href:o.href?i(fe)(o.href):void 0,target:o.target??(s.value?"_blank":void 0),rel:o.rel??(s.value?"noreferrer":void 0)},{default:v(()=>[c(o.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),Gt={class:"VPLastUpdated"},Rt=["datetime"],qt=_({__name:"VPDocFooterLastUpdated",setup(n){const{theme:e,page:t,frontmatter:s,lang:o}=S(),r=g(()=>new Date(s.value.lastUpdated??t.value.lastUpdated)),u=g(()=>r.value.toISOString()),h=N("");return R(()=>{x(()=>{var p,$,L;h.value=new Intl.DateTimeFormat(($=(p=e.value.lastUpdated)==null?void 0:p.formatOptions)!=null&&$.forceLocale?o.value:void 0,((L=e.value.lastUpdated)==null?void 0:L.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(r.value)})}),(p,$)=>{var L;return a(),l("p",Gt,[F(I(((L=i(e).lastUpdated)==null?void 0:L.text)||i(e).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:u.value},I(h.value),9,Rt)])}}}),Kt=b(qt,[["__scopeId","data-v-7e05ebdb"]]),Be=n=>(B("data-v-d4a0bba5"),n=n(),H(),n),Wt={key:0,class:"VPDocFooter"},Jt={key:0,class:"edit-info"},Yt={key:0,class:"edit-link"},Xt=Be(()=>d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),Qt={key:1,class:"last-updated"},Zt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},xt=Be(()=>d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),en={class:"pager"},tn=["innerHTML"],nn=["innerHTML"],on={class:"pager"},sn=["innerHTML"],an=["innerHTML"],rn=_({__name:"VPDocFooter",setup(n){const{theme:e,page:t,frontmatter:s}=S(),o=Ut(),r=zt(),u=g(()=>e.value.editLink&&s.value.editLink!==!1),h=g(()=>t.value.lastUpdated&&s.value.lastUpdated!==!1),p=g(()=>u.value||h.value||r.value.prev||r.value.next);return($,L)=>{var y,P,w,V;return p.value?(a(),l("footer",Wt,[c($.$slots,"doc-footer-before",{},void 0,!0),u.value||h.value?(a(),l("div",Jt,[u.value?(a(),l("div",Yt,[m(D,{class:"edit-link-button",href:i(o).url,"no-icon":!0},{default:v(()=>[Xt,F(" "+I(i(o).text),1)]),_:1},8,["href"])])):f("",!0),h.value?(a(),l("div",Qt,[m(Kt)])):f("",!0)])):f("",!0),(y=i(r).prev)!=null&&y.link||(P=i(r).next)!=null&&P.link?(a(),l("nav",Zt,[xt,d("div",en,[(w=i(r).prev)!=null&&w.link?(a(),k(D,{key:0,class:"pager-link prev",href:i(r).prev.link},{default:v(()=>{var A;return[d("span",{class:"desc",innerHTML:((A=i(e).docFooter)==null?void 0:A.prev)||"Previous page"},null,8,tn),d("span",{class:"title",innerHTML:i(r).prev.text},null,8,nn)]}),_:1},8,["href"])):f("",!0)]),d("div",on,[(V=i(r).next)!=null&&V.link?(a(),k(D,{key:0,class:"pager-link next",href:i(r).next.link},{default:v(()=>{var A;return[d("span",{class:"desc",innerHTML:((A=i(e).docFooter)==null?void 0:A.next)||"Next page"},null,8,sn),d("span",{class:"title",innerHTML:i(r).next.text},null,8,an)]}),_:1},8,["href"])):f("",!0)])])):f("",!0)])):f("",!0)}}}),ln=b(rn,[["__scopeId","data-v-d4a0bba5"]]),cn=n=>(B("data-v-39a288b8"),n=n(),H(),n),un={class:"container"},dn=cn(()=>d("div",{class:"aside-curtain"},null,-1)),vn={class:"aside-container"},pn={class:"aside-content"},hn={class:"content"},fn={class:"content-container"},_n={class:"main"},mn=_({__name:"VPDoc",setup(n){const{theme:e}=S(),t=ne(),{hasSidebar:s,hasAside:o,leftAside:r}=O(),u=g(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(h,p)=>{const $=q("Content");return a(),l("div",{class:M(["VPDoc",{"has-sidebar":i(s),"has-aside":i(o)}])},[c(h.$slots,"doc-top",{},void 0,!0),d("div",un,[i(o)?(a(),l("div",{key:0,class:M(["aside",{"left-aside":i(r)}])},[dn,d("div",vn,[d("div",pn,[m(Ot,null,{"aside-top":v(()=>[c(h.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[c(h.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[c(h.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[c(h.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[c(h.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[c(h.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):f("",!0),d("div",hn,[d("div",fn,[c(h.$slots,"doc-before",{},void 0,!0),d("main",_n,[m($,{class:M(["vp-doc",[u.value,i(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),m(ln,null,{"doc-footer-before":v(()=>[c(h.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),c(h.$slots,"doc-after",{},void 0,!0)])])]),c(h.$slots,"doc-bottom",{},void 0,!0)],2)}}}),bn=b(mn,[["__scopeId","data-v-39a288b8"]]),kn=_({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(n){const e=n,t=g(()=>e.href&&Se.test(e.href)),s=g(()=>e.tag||e.href?"a":"button");return(o,r)=>(a(),k(W(s.value),{class:M(["VPButton",[o.size,o.theme]]),href:o.href?i(fe)(o.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:v(()=>[F(I(o.text),1)]),_:1},8,["class","href","target","rel"]))}}),gn=b(kn,[["__scopeId","data-v-cad61b99"]]),$n=["src","alt"],yn=_({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(n){return(e,t)=>{const s=q("VPImage",!0);return e.image?(a(),l(C,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),l("img",X({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:i(he)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,$n)):(a(),l(C,{key:1},[m(s,X({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),m(s,X({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):f("",!0)}}}),Z=b(yn,[["__scopeId","data-v-8426fc1a"]]),Pn=n=>(B("data-v-303bb580"),n=n(),H(),n),Vn={class:"container"},Ln={class:"main"},Sn={key:0,class:"name"},wn=["innerHTML"],In=["innerHTML"],Tn=["innerHTML"],Nn={key:0,class:"actions"},Mn={key:0,class:"image"},An={class:"image-container"},Cn=Pn(()=>d("div",{class:"image-bg"},null,-1)),Bn=_({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(n){const e=oe("hero-image-slot-exists");return(t,s)=>(a(),l("div",{class:M(["VPHero",{"has-image":t.image||i(e)}])},[d("div",Vn,[d("div",Ln,[c(t.$slots,"home-hero-info-before",{},void 0,!0),c(t.$slots,"home-hero-info",{},()=>[t.name?(a(),l("h1",Sn,[d("span",{innerHTML:t.name,class:"clip"},null,8,wn)])):f("",!0),t.text?(a(),l("p",{key:1,innerHTML:t.text,class:"text"},null,8,In)):f("",!0),t.tagline?(a(),l("p",{key:2,innerHTML:t.tagline,class:"tagline"},null,8,Tn)):f("",!0)],!0),c(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),l("div",Nn,[(a(!0),l(C,null,E(t.actions,o=>(a(),l("div",{key:o.link,class:"action"},[m(gn,{tag:"a",size:"medium",theme:o.theme,text:o.text,href:o.link,target:o.target,rel:o.rel},null,8,["theme","text","href","target","rel"])]))),128))])):f("",!0),c(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||i(e)?(a(),l("div",Mn,[d("div",An,[Cn,c(t.$slots,"home-hero-image",{},()=>[t.image?(a(),k(Z,{key:0,class:"image-src",image:t.image},null,8,["image"])):f("",!0)],!0)])])):f("",!0)])],2))}}),Hn=b(Bn,[["__scopeId","data-v-303bb580"]]),En=_({__name:"VPHomeHero",setup(n){const{frontmatter:e}=S();return(t,s)=>i(e).hero?(a(),k(Hn,{key:0,class:"VPHomeHero",name:i(e).hero.name,text:i(e).hero.text,tagline:i(e).hero.tagline,image:i(e).hero.image,actions:i(e).hero.actions},{"home-hero-info-before":v(()=>[c(t.$slots,"home-hero-info-before")]),"home-hero-info":v(()=>[c(t.$slots,"home-hero-info")]),"home-hero-info-after":v(()=>[c(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":v(()=>[c(t.$slots,"home-hero-actions-after")]),"home-hero-image":v(()=>[c(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):f("",!0)}}),Dn=n=>(B("data-v-a3976bdc"),n=n(),H(),n),Fn={class:"box"},On={key:0,class:"icon"},Un=["innerHTML"],zn=["innerHTML"],jn=["innerHTML"],Gn={key:4,class:"link-text"},Rn={class:"link-text-value"},qn=Dn(()=>d("span",{class:"vpi-arrow-right link-text-icon"},null,-1)),Kn=_({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(n){return(e,t)=>(a(),k(D,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:v(()=>[d("article",Fn,[typeof e.icon=="object"&&e.icon.wrap?(a(),l("div",On,[m(Z,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),k(Z,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),l("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Un)):f("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,zn),e.details?(a(),l("p",{key:3,class:"details",innerHTML:e.details},null,8,jn)):f("",!0),e.linkText?(a(),l("div",Gn,[d("p",Rn,[F(I(e.linkText)+" ",1),qn])])):f("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),Wn=b(Kn,[["__scopeId","data-v-a3976bdc"]]),Jn={key:0,class:"VPFeatures"},Yn={class:"container"},Xn={class:"items"},Qn=_({__name:"VPFeatures",props:{features:{}},setup(n){const e=n,t=g(()=>{const s=e.features.length;if(s){if(s===2)return"grid-2";if(s===3)return"grid-3";if(s%3===0)return"grid-6";if(s>3)return"grid-4"}else return});return(s,o)=>s.features?(a(),l("div",Jn,[d("div",Yn,[d("div",Xn,[(a(!0),l(C,null,E(s.features,r=>(a(),l("div",{key:r.title,class:M(["item",[t.value]])},[m(Wn,{icon:r.icon,title:r.title,details:r.details,link:r.link,"link-text":r.linkText,rel:r.rel,target:r.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):f("",!0)}}),Zn=b(Qn,[["__scopeId","data-v-a6181336"]]),xn=_({__name:"VPHomeFeatures",setup(n){const{frontmatter:e}=S();return(t,s)=>i(e).features?(a(),k(Zn,{key:0,class:"VPHomeFeatures",features:i(e).features},null,8,["features"])):f("",!0)}}),eo=_({__name:"VPHomeContent",setup(n){const{width:e}=Ke({initialWidth:0,includeScrollbar:!1});return(t,s)=>(a(),l("div",{class:"vp-doc container",style:we(i(e)?{"--vp-offset":`calc(50% - ${i(e)/2}px)`}:{})},[c(t.$slots,"default",{},void 0,!0)],4))}}),to=b(eo,[["__scopeId","data-v-8e2d4988"]]),no={class:"VPHome"},oo=_({__name:"VPHome",setup(n){const{frontmatter:e}=S();return(t,s)=>{const o=q("Content");return a(),l("div",no,[c(t.$slots,"home-hero-before",{},void 0,!0),m(En,null,{"home-hero-info-before":v(()=>[c(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[c(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[c(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[c(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[c(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),c(t.$slots,"home-hero-after",{},void 0,!0),c(t.$slots,"home-features-before",{},void 0,!0),m(xn),c(t.$slots,"home-features-after",{},void 0,!0),i(e).markdownStyles!==!1?(a(),k(to,{key:0},{default:v(()=>[m(o)]),_:1})):(a(),k(o,{key:1}))])}}}),so=b(oo,[["__scopeId","data-v-686f80a6"]]),ao={},ro={class:"VPPage"};function io(n,e){const t=q("Content");return a(),l("div",ro,[c(n.$slots,"page-top"),m(t),c(n.$slots,"page-bottom")])}const lo=b(ao,[["render",io]]),co=_({__name:"VPContent",setup(n){const{page:e,frontmatter:t}=S(),{hasSidebar:s}=O();return(o,r)=>(a(),l("div",{class:M(["VPContent",{"has-sidebar":i(s),"is-home":i(t).layout==="home"}]),id:"VPContent"},[i(e).isNotFound?c(o.$slots,"not-found",{key:0},()=>[m(mt)],!0):i(t).layout==="page"?(a(),k(lo,{key:1},{"page-top":v(()=>[c(o.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[c(o.$slots,"page-bottom",{},void 0,!0)]),_:3})):i(t).layout==="home"?(a(),k(so,{key:2},{"home-hero-before":v(()=>[c(o.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[c(o.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[c(o.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[c(o.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[c(o.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[c(o.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[c(o.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[c(o.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[c(o.$slots,"home-features-after",{},void 0,!0)]),_:3})):i(t).layout&&i(t).layout!=="doc"?(a(),k(W(i(t).layout),{key:3})):(a(),k(bn,{key:4},{"doc-top":v(()=>[c(o.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[c(o.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":v(()=>[c(o.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[c(o.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[c(o.$slots,"doc-after",{},void 0,!0)]),"aside-top":v(()=>[c(o.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":v(()=>[c(o.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[c(o.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[c(o.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[c(o.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":v(()=>[c(o.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),uo=b(co,[["__scopeId","data-v-1428d186"]]),vo={class:"container"},po=["innerHTML"],ho=["innerHTML"],fo=_({__name:"VPFooter",setup(n){const{theme:e,frontmatter:t}=S(),{hasSidebar:s}=O();return(o,r)=>i(e).footer&&i(t).footer!==!1?(a(),l("footer",{key:0,class:M(["VPFooter",{"has-sidebar":i(s)}])},[d("div",vo,[i(e).footer.message?(a(),l("p",{key:0,class:"message",innerHTML:i(e).footer.message},null,8,po)):f("",!0),i(e).footer.copyright?(a(),l("p",{key:1,class:"copyright",innerHTML:i(e).footer.copyright},null,8,ho)):f("",!0)])],2)):f("",!0)}}),_o=b(fo,[["__scopeId","data-v-e315a0ad"]]);function mo(){const{theme:n,frontmatter:e}=S(),t=Le([]),s=g(()=>t.value.length>0);return te(()=>{t.value=_e(e.value.outline??n.value.outline)}),{headers:t,hasLocalNav:s}}const bo=n=>(B("data-v-17a5e62e"),n=n(),H(),n),ko={class:"menu-text"},go=bo(()=>d("span",{class:"vpi-chevron-right icon"},null,-1)),$o={class:"header"},yo={class:"outline"},Po=_({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(n){const e=n,{theme:t}=S(),s=N(!1),o=N(0),r=N(),u=N();function h(y){var P;(P=r.value)!=null&&P.contains(y.target)||(s.value=!1)}j(s,y=>{if(y){document.addEventListener("click",h);return}document.removeEventListener("click",h)}),We("Escape",()=>{s.value=!1}),te(()=>{s.value=!1});function p(){s.value=!s.value,o.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function $(y){y.target.classList.contains("outline-link")&&(u.value&&(u.value.style.transition="none"),Je(()=>{s.value=!1}))}function L(){s.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(y,P)=>(a(),l("div",{class:"VPLocalNavOutlineDropdown",style:we({"--vp-vh":o.value+"px"}),ref_key:"main",ref:r},[y.headers.length>0?(a(),l("button",{key:0,onClick:p,class:M({open:s.value})},[d("span",ko,I(i(Ae)(i(t))),1),go],2)):(a(),l("button",{key:1,onClick:L},I(i(t).returnToTopLabel||"Return to top"),1)),m(pe,{name:"flyout"},{default:v(()=>[s.value?(a(),l("div",{key:0,ref_key:"items",ref:u,class:"items",onClick:$},[d("div",$o,[d("a",{class:"top-link",href:"#",onClick:L},I(i(t).returnToTopLabel||"Return to top"),1)]),d("div",yo,[m(Ce,{headers:y.headers},null,8,["headers"])])],512)):f("",!0)]),_:1})],4))}}),Vo=b(Po,[["__scopeId","data-v-17a5e62e"]]),Lo=n=>(B("data-v-a6f0e41e"),n=n(),H(),n),So={class:"container"},wo=["aria-expanded"],Io=Lo(()=>d("span",{class:"vpi-align-left menu-icon"},null,-1)),To={class:"menu-text"},No=_({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(n){const{theme:e,frontmatter:t}=S(),{hasSidebar:s}=O(),{headers:o}=mo(),{y:r}=Ie(),u=N(0);R(()=>{u.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),te(()=>{o.value=_e(t.value.outline??e.value.outline)});const h=g(()=>o.value.length===0),p=g(()=>h.value&&!s.value),$=g(()=>({VPLocalNav:!0,"has-sidebar":s.value,empty:h.value,fixed:p.value}));return(L,y)=>i(t).layout!=="home"&&(!p.value||i(r)>=u.value)?(a(),l("div",{key:0,class:M($.value)},[d("div",So,[i(s)?(a(),l("button",{key:0,class:"menu","aria-expanded":L.open,"aria-controls":"VPSidebarNav",onClick:y[0]||(y[0]=P=>L.$emit("open-menu"))},[Io,d("span",To,I(i(e).sidebarMenuLabel||"Menu"),1)],8,wo)):f("",!0),m(Vo,{headers:i(o),navHeight:u.value},null,8,["headers","navHeight"])])],2)):f("",!0)}}),Mo=b(No,[["__scopeId","data-v-a6f0e41e"]]);function Ao(){const n=N(!1);function e(){n.value=!0,window.addEventListener("resize",o)}function t(){n.value=!1,window.removeEventListener("resize",o)}function s(){n.value?t():e()}function o(){window.outerWidth>=768&&t()}const r=ne();return j(()=>r.path,t),{isScreenOpen:n,openScreen:e,closeScreen:t,toggleScreen:s}}const Co={},Bo={class:"VPSwitch",type:"button",role:"switch"},Ho={class:"check"},Eo={key:0,class:"icon"};function Do(n,e){return a(),l("button",Bo,[d("span",Ho,[n.$slots.default?(a(),l("span",Eo,[c(n.$slots,"default",{},void 0,!0)])):f("",!0)])])}const Fo=b(Co,[["render",Do],["__scopeId","data-v-1d5665e3"]]),He=n=>(B("data-v-d1f28634"),n=n(),H(),n),Oo=He(()=>d("span",{class:"vpi-sun sun"},null,-1)),Uo=He(()=>d("span",{class:"vpi-moon moon"},null,-1)),zo=_({__name:"VPSwitchAppearance",setup(n){const{isDark:e,theme:t}=S(),s=oe("toggle-appearance",()=>{e.value=!e.value}),o=g(()=>e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme");return(r,u)=>(a(),k(Fo,{title:o.value,class:"VPSwitchAppearance","aria-checked":i(e),onClick:i(s)},{default:v(()=>[Oo,Uo]),_:1},8,["title","aria-checked","onClick"]))}}),me=b(zo,[["__scopeId","data-v-d1f28634"]]),jo={key:0,class:"VPNavBarAppearance"},Go=_({__name:"VPNavBarAppearance",setup(n){const{site:e}=S();return(t,s)=>i(e).appearance&&i(e).appearance!=="force-dark"?(a(),l("div",jo,[m(me)])):f("",!0)}}),Ro=b(Go,[["__scopeId","data-v-e6aabb21"]]),be=N();let Ee=!1,le=0;function qo(n){const e=N(!1);if(se){!Ee&&Ko(),le++;const t=j(be,s=>{var o,r,u;s===n.el.value||(o=n.el.value)!=null&&o.contains(s)?(e.value=!0,(r=n.onFocus)==null||r.call(n)):(e.value=!1,(u=n.onBlur)==null||u.call(n))});ee(()=>{t(),le--,le||Wo()})}return Ye(e)}function Ko(){document.addEventListener("focusin",De),Ee=!0,be.value=document.activeElement}function Wo(){document.removeEventListener("focusin",De)}function De(){be.value=document.activeElement}const Jo={class:"VPMenuLink"},Yo=_({__name:"VPMenuLink",props:{item:{}},setup(n){const{page:e}=S();return(t,s)=>(a(),l("div",Jo,[m(D,{class:M({active:i(G)(i(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel},{default:v(()=>[F(I(t.item.text),1)]),_:1},8,["class","href","target","rel"])]))}}),ae=b(Yo,[["__scopeId","data-v-43f1e123"]]),Xo={class:"VPMenuGroup"},Qo={key:0,class:"title"},Zo=_({__name:"VPMenuGroup",props:{text:{},items:{}},setup(n){return(e,t)=>(a(),l("div",Xo,[e.text?(a(),l("p",Qo,I(e.text),1)):f("",!0),(a(!0),l(C,null,E(e.items,s=>(a(),l(C,null,["link"in s?(a(),k(ae,{key:0,item:s},null,8,["item"])):f("",!0)],64))),256))]))}}),xo=b(Zo,[["__scopeId","data-v-69e747b5"]]),es={class:"VPMenu"},ts={key:0,class:"items"},ns=_({__name:"VPMenu",props:{items:{}},setup(n){return(e,t)=>(a(),l("div",es,[e.items?(a(),l("div",ts,[(a(!0),l(C,null,E(e.items,s=>(a(),l(C,{key:s.text},["link"in s?(a(),k(ae,{key:0,item:s},null,8,["item"])):(a(),k(xo,{key:1,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):f("",!0),c(e.$slots,"default",{},void 0,!0)]))}}),os=b(ns,[["__scopeId","data-v-e7ea1737"]]),ss=n=>(B("data-v-b6c34ac9"),n=n(),H(),n),as=["aria-expanded","aria-label"],rs={key:0,class:"text"},is=["innerHTML"],ls=ss(()=>d("span",{class:"vpi-chevron-down text-icon"},null,-1)),cs={key:1,class:"vpi-more-horizontal icon"},us={class:"menu"},ds=_({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(n){const e=N(!1),t=N();qo({el:t,onBlur:s});function s(){e.value=!1}return(o,r)=>(a(),l("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:r[1]||(r[1]=u=>e.value=!0),onMouseleave:r[2]||(r[2]=u=>e.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":o.label,onClick:r[0]||(r[0]=u=>e.value=!e.value)},[o.button||o.icon?(a(),l("span",rs,[o.icon?(a(),l("span",{key:0,class:M([o.icon,"option-icon"])},null,2)):f("",!0),o.button?(a(),l("span",{key:1,innerHTML:o.button},null,8,is)):f("",!0),ls])):(a(),l("span",cs))],8,as),d("div",us,[m(os,{items:o.items},{default:v(()=>[c(o.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),ke=b(ds,[["__scopeId","data-v-b6c34ac9"]]),vs=["href","aria-label","innerHTML"],ps=_({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(n){const e=n,t=g(()=>typeof e.icon=="object"?e.icon.svg:``);return(s,o)=>(a(),l("a",{class:"VPSocialLink no-icon",href:s.link,"aria-label":s.ariaLabel??(typeof s.icon=="string"?s.icon:""),target:"_blank",rel:"noopener",innerHTML:t.value},null,8,vs))}}),hs=b(ps,[["__scopeId","data-v-eee4e7cb"]]),fs={class:"VPSocialLinks"},_s=_({__name:"VPSocialLinks",props:{links:{}},setup(n){return(e,t)=>(a(),l("div",fs,[(a(!0),l(C,null,E(e.links,({link:s,icon:o,ariaLabel:r})=>(a(),k(hs,{key:s,icon:o,link:s,ariaLabel:r},null,8,["icon","link","ariaLabel"]))),128))]))}}),ge=b(_s,[["__scopeId","data-v-7bc22406"]]),ms={key:0,class:"group translations"},bs={class:"trans-title"},ks={key:1,class:"group"},gs={class:"item appearance"},$s={class:"label"},ys={class:"appearance-action"},Ps={key:2,class:"group"},Vs={class:"item social-links"},Ls=_({__name:"VPNavBarExtra",setup(n){const{site:e,theme:t}=S(),{localeLinks:s,currentLang:o}=J({correspondingLink:!0}),r=g(()=>s.value.length&&o.value.label||e.value.appearance||t.value.socialLinks);return(u,h)=>r.value?(a(),k(ke,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:v(()=>[i(s).length&&i(o).label?(a(),l("div",ms,[d("p",bs,I(i(o).label),1),(a(!0),l(C,null,E(i(s),p=>(a(),k(ae,{key:p.link,item:p},null,8,["item"]))),128))])):f("",!0),i(e).appearance&&i(e).appearance!=="force-dark"?(a(),l("div",ks,[d("div",gs,[d("p",$s,I(i(t).darkModeSwitchLabel||"Appearance"),1),d("div",ys,[m(me)])])])):f("",!0),i(t).socialLinks?(a(),l("div",Ps,[d("div",Vs,[m(ge,{class:"social-links-list",links:i(t).socialLinks},null,8,["links"])])])):f("",!0)]),_:1})):f("",!0)}}),Ss=b(Ls,[["__scopeId","data-v-d0bd9dde"]]),ws=n=>(B("data-v-e5dd9c1c"),n=n(),H(),n),Is=["aria-expanded"],Ts=ws(()=>d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)),Ns=[Ts],Ms=_({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(n){return(e,t)=>(a(),l("button",{type:"button",class:M(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=s=>e.$emit("click"))},Ns,10,Is))}}),As=b(Ms,[["__scopeId","data-v-e5dd9c1c"]]),Cs=["innerHTML"],Bs=_({__name:"VPNavBarMenuLink",props:{item:{}},setup(n){const{page:e}=S();return(t,s)=>(a(),k(D,{class:M({VPNavBarMenuLink:!0,active:i(G)(i(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,noIcon:t.item.noIcon,target:t.item.target,rel:t.item.rel,tabindex:"0"},{default:v(()=>[d("span",{innerHTML:t.item.text},null,8,Cs)]),_:1},8,["class","href","noIcon","target","rel"]))}}),Hs=b(Bs,[["__scopeId","data-v-9c663999"]]),Es=_({__name:"VPNavBarMenuGroup",props:{item:{}},setup(n){const e=n,{page:t}=S(),s=r=>"link"in r?G(t.value.relativePath,r.link,!!e.item.activeMatch):r.items.some(s),o=g(()=>s(e.item));return(r,u)=>(a(),k(ke,{class:M({VPNavBarMenuGroup:!0,active:i(G)(i(t).relativePath,r.item.activeMatch,!!r.item.activeMatch)||o.value}),button:r.item.text,items:r.item.items},null,8,["class","button","items"]))}}),Ds=n=>(B("data-v-7f418b0f"),n=n(),H(),n),Fs={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Os=Ds(()=>d("span",{id:"main-nav-aria-label",class:"visually-hidden"},"Main Navigation",-1)),Us=_({__name:"VPNavBarMenu",setup(n){const{theme:e}=S();return(t,s)=>i(e).nav?(a(),l("nav",Fs,[Os,(a(!0),l(C,null,E(i(e).nav,o=>(a(),l(C,{key:o.text},["link"in o?(a(),k(Hs,{key:0,item:o},null,8,["item"])):(a(),k(Es,{key:1,item:o},null,8,["item"]))],64))),128))])):f("",!0)}}),zs=b(Us,[["__scopeId","data-v-7f418b0f"]]);function js(n){const{localeIndex:e,theme:t}=S();function s(o){var V,A,T;const r=o.split("."),u=(V=t.value.search)==null?void 0:V.options,h=u&&typeof u=="object",p=h&&((T=(A=u.locales)==null?void 0:A[e.value])==null?void 0:T.translations)||null,$=h&&u.translations||null;let L=p,y=$,P=n;const w=r.pop();for(const U of r){let z=null;const K=P==null?void 0:P[U];K&&(z=P=K);const re=y==null?void 0:y[U];re&&(z=y=re);const ie=L==null?void 0:L[U];ie&&(z=L=ie),K||(P=z),re||(y=z),ie||(L=z)}return(L==null?void 0:L[w])??(y==null?void 0:y[w])??(P==null?void 0:P[w])??""}return s}const Gs=["aria-label"],Rs={class:"DocSearch-Button-Container"},qs=d("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1),Ks={class:"DocSearch-Button-Placeholder"},Ws=d("span",{class:"DocSearch-Button-Keys"},[d("kbd",{class:"DocSearch-Button-Key"}),d("kbd",{class:"DocSearch-Button-Key"},"K")],-1),$e=_({__name:"VPNavBarSearchButton",setup(n){const t=js({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(s,o)=>(a(),l("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":i(t)("button.buttonAriaLabel")},[d("span",Rs,[qs,d("span",Ks,I(i(t)("button.buttonText")),1)]),Ws],8,Gs))}}),Js={class:"VPNavBarSearch"},Ys={id:"local-search"},Xs={key:1,id:"docsearch"},Qs=_({__name:"VPNavBarSearch",setup(n){const e=()=>null,t=Xe(()=>Qe(()=>import("./VPAlgoliaSearchBox.CntkNbWN.js"),__vite__mapDeps([0,1]))),{theme:s}=S(),o=N(!1),r=N(!1),u=()=>{const P="VPAlgoliaPreconnect";(window.requestIdleCallback||setTimeout)(()=>{var A;const V=document.createElement("link");V.id=P,V.rel="preconnect",V.href=`https://${(((A=s.value.search)==null?void 0:A.options)??s.value.algolia).appId}-dsn.algolia.net`,V.crossOrigin="",document.head.appendChild(V)})};R(()=>{u();const P=V=>{(V.key.toLowerCase()==="k"&&(V.metaKey||V.ctrlKey)||!$(V)&&V.key==="/")&&(V.preventDefault(),h(),w())},w=()=>{window.removeEventListener("keydown",P)};window.addEventListener("keydown",P),ee(w)});function h(){o.value||(o.value=!0,setTimeout(p,16))}function p(){const P=new Event("keydown");P.key="k",P.metaKey=!0,window.dispatchEvent(P),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||p()},16)}function $(P){const w=P.target,V=w.tagName;return w.isContentEditable||V==="INPUT"||V==="SELECT"||V==="TEXTAREA"}const L=N(!1),y="algolia";return(P,w)=>{var V;return a(),l("div",Js,[i(y)==="local"?(a(),l(C,{key:0},[L.value?(a(),k(i(e),{key:0,onClose:w[0]||(w[0]=A=>L.value=!1)})):f("",!0),d("div",Ys,[m($e,{onClick:w[1]||(w[1]=A=>L.value=!0)})])],64)):i(y)==="algolia"?(a(),l(C,{key:1},[o.value?(a(),k(i(t),{key:0,algolia:((V=i(s).search)==null?void 0:V.options)??i(s).algolia,onVnodeBeforeMount:w[2]||(w[2]=A=>r.value=!0)},null,8,["algolia"])):f("",!0),r.value?f("",!0):(a(),l("div",Xs,[m($e,{onClick:h})]))],64)):f("",!0)])}}}),Zs=_({__name:"VPNavBarSocialLinks",setup(n){const{theme:e}=S();return(t,s)=>i(e).socialLinks?(a(),k(ge,{key:0,class:"VPNavBarSocialLinks",links:i(e).socialLinks},null,8,["links"])):f("",!0)}}),xs=b(Zs,[["__scopeId","data-v-0394ad82"]]),ea=["href","rel","target"],ta={key:1},na={key:2},oa=_({__name:"VPNavBarTitle",setup(n){const{site:e,theme:t}=S(),{hasSidebar:s}=O(),{currentLang:o}=J(),r=g(()=>{var p;return typeof t.value.logoLink=="string"?t.value.logoLink:(p=t.value.logoLink)==null?void 0:p.link}),u=g(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.rel}),h=g(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.target});return(p,$)=>(a(),l("div",{class:M(["VPNavBarTitle",{"has-sidebar":i(s)}])},[d("a",{class:"title",href:r.value??i(fe)(i(o).link),rel:u.value,target:h.value},[c(p.$slots,"nav-bar-title-before",{},void 0,!0),i(t).logo?(a(),k(Z,{key:0,class:"logo",image:i(t).logo},null,8,["image"])):f("",!0),i(t).siteTitle?(a(),l("span",ta,I(i(t).siteTitle),1)):i(t).siteTitle===void 0?(a(),l("span",na,I(i(e).title),1)):f("",!0),c(p.$slots,"nav-bar-title-after",{},void 0,!0)],8,ea)],2))}}),sa=b(oa,[["__scopeId","data-v-ab179fa1"]]),aa={class:"items"},ra={class:"title"},ia=_({__name:"VPNavBarTranslations",setup(n){const{theme:e}=S(),{localeLinks:t,currentLang:s}=J({correspondingLink:!0});return(o,r)=>i(t).length&&i(s).label?(a(),k(ke,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:i(e).langMenuLabel||"Change language"},{default:v(()=>[d("div",aa,[d("p",ra,I(i(s).label),1),(a(!0),l(C,null,E(i(t),u=>(a(),k(ae,{key:u.link,item:u},null,8,["item"]))),128))])]),_:1},8,["label"])):f("",!0)}}),la=b(ia,[["__scopeId","data-v-88af2de4"]]),ca=n=>(B("data-v-ccf7ddec"),n=n(),H(),n),ua={class:"wrapper"},da={class:"container"},va={class:"title"},pa={class:"content"},ha={class:"content-body"},fa=ca(()=>d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1)),_a=_({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(n){const{y:e}=Ie(),{hasSidebar:t}=O(),{frontmatter:s}=S(),o=N({});return Ve(()=>{o.value={"has-sidebar":t.value,home:s.value.layout==="home",top:e.value===0}}),(r,u)=>(a(),l("div",{class:M(["VPNavBar",o.value])},[d("div",ua,[d("div",da,[d("div",va,[m(sa,null,{"nav-bar-title-before":v(()=>[c(r.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[c(r.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",pa,[d("div",ha,[c(r.$slots,"nav-bar-content-before",{},void 0,!0),m(Qs,{class:"search"}),m(zs,{class:"menu"}),m(la,{class:"translations"}),m(Ro,{class:"appearance"}),m(xs,{class:"social-links"}),m(Ss,{class:"extra"}),c(r.$slots,"nav-bar-content-after",{},void 0,!0),m(As,{class:"hamburger",active:r.isScreenOpen,onClick:u[0]||(u[0]=h=>r.$emit("toggle-screen"))},null,8,["active"])])])])]),fa],2))}}),ma=b(_a,[["__scopeId","data-v-ccf7ddec"]]),ba={key:0,class:"VPNavScreenAppearance"},ka={class:"text"},ga=_({__name:"VPNavScreenAppearance",setup(n){const{site:e,theme:t}=S();return(s,o)=>i(e).appearance&&i(e).appearance!=="force-dark"?(a(),l("div",ba,[d("p",ka,I(i(t).darkModeSwitchLabel||"Appearance"),1),m(me)])):f("",!0)}}),$a=b(ga,[["__scopeId","data-v-2d7af913"]]),ya=_({__name:"VPNavScreenMenuLink",props:{item:{}},setup(n){const e=oe("close-screen");return(t,s)=>(a(),k(D,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:i(e),innerHTML:t.item.text},null,8,["href","target","rel","onClick","innerHTML"]))}}),Pa=b(ya,[["__scopeId","data-v-7f31e1f6"]]),Va=_({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(n){const e=oe("close-screen");return(t,s)=>(a(),k(D,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:i(e)},{default:v(()=>[F(I(t.item.text),1)]),_:1},8,["href","target","rel","onClick"]))}}),Fe=b(Va,[["__scopeId","data-v-19976ae1"]]),La={class:"VPNavScreenMenuGroupSection"},Sa={key:0,class:"title"},wa=_({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(n){return(e,t)=>(a(),l("div",La,[e.text?(a(),l("p",Sa,I(e.text),1)):f("",!0),(a(!0),l(C,null,E(e.items,s=>(a(),k(Fe,{key:s.text,item:s},null,8,["item"]))),128))]))}}),Ia=b(wa,[["__scopeId","data-v-8133b170"]]),Ta=n=>(B("data-v-ff6087d4"),n=n(),H(),n),Na=["aria-controls","aria-expanded"],Ma=["innerHTML"],Aa=Ta(()=>d("span",{class:"vpi-plus button-icon"},null,-1)),Ca=["id"],Ba={key:1,class:"group"},Ha=_({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(n){const e=n,t=N(!1),s=g(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function o(){t.value=!t.value}return(r,u)=>(a(),l("div",{class:M(["VPNavScreenMenuGroup",{open:t.value}])},[d("button",{class:"button","aria-controls":s.value,"aria-expanded":t.value,onClick:o},[d("span",{class:"button-text",innerHTML:r.text},null,8,Ma),Aa],8,Na),d("div",{id:s.value,class:"items"},[(a(!0),l(C,null,E(r.items,h=>(a(),l(C,{key:h.text},["link"in h?(a(),l("div",{key:h.text,class:"item"},[m(Fe,{item:h},null,8,["item"])])):(a(),l("div",Ba,[m(Ia,{text:h.text,items:h.items},null,8,["text","items"])]))],64))),128))],8,Ca)],2))}}),Ea=b(Ha,[["__scopeId","data-v-ff6087d4"]]),Da={key:0,class:"VPNavScreenMenu"},Fa=_({__name:"VPNavScreenMenu",setup(n){const{theme:e}=S();return(t,s)=>i(e).nav?(a(),l("nav",Da,[(a(!0),l(C,null,E(i(e).nav,o=>(a(),l(C,{key:o.text},["link"in o?(a(),k(Pa,{key:0,item:o},null,8,["item"])):(a(),k(Ea,{key:1,text:o.text||"",items:o.items},null,8,["text","items"]))],64))),128))])):f("",!0)}}),Oa=_({__name:"VPNavScreenSocialLinks",setup(n){const{theme:e}=S();return(t,s)=>i(e).socialLinks?(a(),k(ge,{key:0,class:"VPNavScreenSocialLinks",links:i(e).socialLinks},null,8,["links"])):f("",!0)}}),Oe=n=>(B("data-v-858fe1a4"),n=n(),H(),n),Ua=Oe(()=>d("span",{class:"vpi-languages icon lang"},null,-1)),za=Oe(()=>d("span",{class:"vpi-chevron-down icon chevron"},null,-1)),ja={class:"list"},Ga=_({__name:"VPNavScreenTranslations",setup(n){const{localeLinks:e,currentLang:t}=J({correspondingLink:!0}),s=N(!1);function o(){s.value=!s.value}return(r,u)=>i(e).length&&i(t).label?(a(),l("div",{key:0,class:M(["VPNavScreenTranslations",{open:s.value}])},[d("button",{class:"title",onClick:o},[Ua,F(" "+I(i(t).label)+" ",1),za]),d("ul",ja,[(a(!0),l(C,null,E(i(e),h=>(a(),l("li",{key:h.link,class:"item"},[m(D,{class:"link",href:h.link},{default:v(()=>[F(I(h.text),1)]),_:2},1032,["href"])]))),128))])],2)):f("",!0)}}),Ra=b(Ga,[["__scopeId","data-v-858fe1a4"]]),qa={class:"container"},Ka=_({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(n){const e=N(null),t=Te(se?document.body:null);return(s,o)=>(a(),k(pe,{name:"fade",onEnter:o[0]||(o[0]=r=>t.value=!0),onAfterLeave:o[1]||(o[1]=r=>t.value=!1)},{default:v(()=>[s.open?(a(),l("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[d("div",qa,[c(s.$slots,"nav-screen-content-before",{},void 0,!0),m(Fa,{class:"menu"}),m(Ra,{class:"translations"}),m($a,{class:"appearance"}),m(Oa,{class:"social-links"}),c(s.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):f("",!0)]),_:3}))}}),Wa=b(Ka,[["__scopeId","data-v-cc5739dd"]]),Ja={key:0,class:"VPNav"},Ya=_({__name:"VPNav",setup(n){const{isScreenOpen:e,closeScreen:t,toggleScreen:s}=Ao(),{frontmatter:o}=S(),r=g(()=>o.value.navbar!==!1);return Ne("close-screen",t),x(()=>{se&&document.documentElement.classList.toggle("hide-nav",!r.value)}),(u,h)=>r.value?(a(),l("header",Ja,[m(ma,{"is-screen-open":i(e),onToggleScreen:i(s)},{"nav-bar-title-before":v(()=>[c(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[c(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[c(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[c(u.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),m(Wa,{open:i(e)},{"nav-screen-content-before":v(()=>[c(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[c(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):f("",!0)}}),Xa=b(Ya,[["__scopeId","data-v-ae24b3ad"]]),Ue=n=>(B("data-v-b8d55f3b"),n=n(),H(),n),Qa=["role","tabindex"],Za=Ue(()=>d("div",{class:"indicator"},null,-1)),xa=Ue(()=>d("span",{class:"vpi-chevron-right caret-icon"},null,-1)),er=[xa],tr={key:1,class:"items"},nr=_({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(n){const e=n,{collapsed:t,collapsible:s,isLink:o,isActiveLink:r,hasActiveLink:u,hasChildren:h,toggle:p}=$t(g(()=>e.item)),$=g(()=>h.value?"section":"div"),L=g(()=>o.value?"a":"div"),y=g(()=>h.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),P=g(()=>o.value?void 0:"button"),w=g(()=>[[`level-${e.depth}`],{collapsible:s.value},{collapsed:t.value},{"is-link":o.value},{"is-active":r.value},{"has-active":u.value}]);function V(T){"key"in T&&T.key!=="Enter"||!e.item.link&&p()}function A(){e.item.link&&p()}return(T,U)=>{const z=q("VPSidebarItem",!0);return a(),k(W($.value),{class:M(["VPSidebarItem",w.value])},{default:v(()=>[T.item.text?(a(),l("div",X({key:0,class:"item",role:P.value},xe(T.item.items?{click:V,keydown:V}:{},!0),{tabindex:T.item.items&&0}),[Za,T.item.link?(a(),k(D,{key:0,tag:L.value,class:"link",href:T.item.link,rel:T.item.rel,target:T.item.target},{default:v(()=>[(a(),k(W(y.value),{class:"text",innerHTML:T.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),k(W(y.value),{key:1,class:"text",innerHTML:T.item.text},null,8,["innerHTML"])),T.item.collapsed!=null&&T.item.items&&T.item.items.length?(a(),l("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:A,onKeydown:Ze(A,["enter"]),tabindex:"0"},er,32)):f("",!0)],16,Qa)):f("",!0),T.item.items&&T.item.items.length?(a(),l("div",tr,[T.depth<5?(a(!0),l(C,{key:0},E(T.item.items,K=>(a(),k(z,{key:K.text,item:K,depth:T.depth+1},null,8,["item","depth"]))),128)):f("",!0)])):f("",!0)]),_:1},8,["class"])}}}),or=b(nr,[["__scopeId","data-v-b8d55f3b"]]),ze=n=>(B("data-v-575e6a36"),n=n(),H(),n),sr=ze(()=>d("div",{class:"curtain"},null,-1)),ar={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},rr=ze(()=>d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),ir=_({__name:"VPSidebar",props:{open:{type:Boolean}},setup(n){const{sidebarGroups:e,hasSidebar:t}=O(),s=n,o=N(null),r=Te(se?document.body:null);return j([s,o],()=>{var u;s.open?(r.value=!0,(u=o.value)==null||u.focus()):r.value=!1},{immediate:!0,flush:"post"}),(u,h)=>i(t)?(a(),l("aside",{key:0,class:M(["VPSidebar",{open:u.open}]),ref_key:"navEl",ref:o,onClick:h[0]||(h[0]=et(()=>{},["stop"]))},[sr,d("nav",ar,[rr,c(u.$slots,"sidebar-nav-before",{},void 0,!0),(a(!0),l(C,null,E(i(e),p=>(a(),l("div",{key:p.text,class:"group"},[m(or,{item:p,depth:0},null,8,["item"])]))),128)),c(u.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):f("",!0)}}),lr=b(ir,[["__scopeId","data-v-575e6a36"]]),cr=_({__name:"VPSkipLink",setup(n){const e=ne(),t=N();j(()=>e.path,()=>t.value.focus());function s({target:o}){const r=document.getElementById(decodeURIComponent(o.hash).slice(1));if(r){const u=()=>{r.removeAttribute("tabindex"),r.removeEventListener("blur",u)};r.setAttribute("tabindex","-1"),r.addEventListener("blur",u),r.focus(),window.scrollTo(0,0)}}return(o,r)=>(a(),l(C,null,[d("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:s}," Skip to content ")],64))}}),ur=b(cr,[["__scopeId","data-v-0f60ec36"]]),dr=_({__name:"Layout",setup(n){const{isOpen:e,open:t,close:s}=O(),o=ne();j(()=>o.path,s),gt(e,s);const{frontmatter:r}=S(),u=tt(),h=g(()=>!!u["home-hero-image"]);return Ne("hero-image-slot-exists",h),(p,$)=>{const L=q("Content");return i(r).layout!==!1?(a(),l("div",{key:0,class:M(["Layout",i(r).pageClass])},[c(p.$slots,"layout-top",{},void 0,!0),m(ur),m(at,{class:"backdrop",show:i(e),onClick:i(s)},null,8,["show","onClick"]),m(Xa,null,{"nav-bar-title-before":v(()=>[c(p.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[c(p.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[c(p.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[c(p.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":v(()=>[c(p.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[c(p.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),m(Mo,{open:i(e),onOpenMenu:i(t)},null,8,["open","onOpenMenu"]),m(lr,{open:i(e)},{"sidebar-nav-before":v(()=>[c(p.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":v(()=>[c(p.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),m(uo,null,{"page-top":v(()=>[c(p.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[c(p.$slots,"page-bottom",{},void 0,!0)]),"not-found":v(()=>[c(p.$slots,"not-found",{},void 0,!0)]),"home-hero-before":v(()=>[c(p.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[c(p.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[c(p.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[c(p.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[c(p.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[c(p.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[c(p.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[c(p.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[c(p.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":v(()=>[c(p.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[c(p.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[c(p.$slots,"doc-after",{},void 0,!0)]),"doc-top":v(()=>[c(p.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[c(p.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":v(()=>[c(p.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[c(p.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[c(p.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[c(p.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[c(p.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[c(p.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),m(_o),c(p.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),k(L,{key:1}))}}}),vr=b(dr,[["__scopeId","data-v-5d98c3a5"]]),ye={Layout:vr,enhanceApp:({app:n})=>{n.component("Badge",nt)}},pr={data(){return{show:!1}},mounted(){this.show=navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i)&&navigator.language.indexOf("zh")>-1}},hr={key:0,class:"wwads-cn wwads-horizontal","data-id":"296"};function fr(n,e,t,s,o,r){return o.show?(a(),l("div",hr)):f("",!0)}const _r=b(pr,[["render",fr]]),mr={data(){return{show:!1}},mounted(){this.show=navigator.language.indexOf("zh")>-1}},br={key:0,class:"wwads-cn wwads-vertical","data-id":"296",style:{"margin-bottom":"20px"}};function kr(n,e,t,s,o,r){return o.show?(a(),l("div",br)):f("",!0)}const gr=b(mr,[["render",kr]]),$r=_({name:"BannerComponent",setup(){const{site:n}=Pe(),e=N({link:"https://t.me/nezhanews",icon:"https://nezha.wiki/logo.png",dashboardVersionApi:"https://api.github.com/repos/naiba/nezha/releases/latest",agentVersionApi:"https://api.github.com/repos/nezhahq/agent/releases/latest",dashboardVersion:"",agentVersion:""});R(async()=>{await t()});const t=async()=>{try{const r=await(await fetch(e.value.dashboardVersionApi)).json();e.value.dashboardVersion=r.tag_name}catch(o){console.error("Error fetching dashboard latest version:",o),e.value.dashboardVersion="Error fetching"}try{const r=await(await fetch(e.value.agentVersionApi)).json();e.value.agentVersion=r.tag_name}catch(o){console.error("Error fetching agent latest version:",o),e.value.agentVersion="Error fetching"}};return{banner:e,translations:{name:{"en-US":"Announcement","zh-CN":"公告栏"},version:{"en-US":"Latest Version","zh-CN":"最新版本"},change:{"en-US":"View changelog","zh-CN":"查看变更日志"}},site:n,fetchLatestVersions:t}}}),yr=["href"],Pr=["src"],Vr={class:"info"},Lr={key:0,class:"version"},Sr={key:1,class:"version"},wr={class:"change"};function Ir(n,e,t,s,o,r){return a(),l("div",null,[d("a",{href:n.banner.link,class:"banner",target:"_blank"},[n.banner.icon?(a(),l("img",{key:0,src:n.banner.icon,width:"22",height:"22"},null,8,Pr)):f("",!0),d("div",Vr,[n.banner.dashboardVersion!==""?(a(),l("p",Lr,"Dashboard "+I(n.banner.dashboardVersion),1)):f("",!0),n.banner.agentVersion!==""?(a(),l("p",Sr,"Agent "+I(n.banner.agentVersion),1)):f("",!0),d("p",wr,I(n.translations.change[n.site.lang]),1)])],8,yr)])}const Tr=b($r,[["render",Ir],["__scopeId","data-v-9a4b6acc"]]),Mr={...ye,Layout(){return Y(ye.Layout,null,{"doc-top":()=>Y(_r),"aside-top":()=>Y(gr),"aside-ads-before":()=>Y(Tr)})}};export{Mr as R,S as u}; diff --git a/assets/chunks/webssh.Cvv4PsOJ.js b/assets/chunks/webssh.Cvv4PsOJ.js deleted file mode 100644 index 0c7f307b..00000000 --- a/assets/chunks/webssh.Cvv4PsOJ.js +++ /dev/null @@ -1 +0,0 @@ -const s="/assets/dashboard.BtVFv_j9.jpg",t="/assets/webssh.DHR7F3te.jpg";export{s as _,t as a}; diff --git a/assets/dashboard.BtVFv_j9.jpg b/assets/dashboard.BtVFv_j9.jpg deleted file mode 100644 index e9065eef..00000000 Binary files a/assets/dashboard.BtVFv_j9.jpg and /dev/null differ diff --git a/assets/developer_index.md.ye3PfB3-.js b/assets/developer_index.md.ye3PfB3-.js deleted file mode 100644 index e344f0c0..00000000 --- a/assets/developer_index.md.ye3PfB3-.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return a(),t("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default}; diff --git a/assets/developer_index.md.ye3PfB3-.lean.js b/assets/developer_index.md.ye3PfB3-.lean.js deleted file mode 100644 index e344f0c0..00000000 --- a/assets/developer_index.md.ye3PfB3-.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return a(),t("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default}; diff --git a/assets/developer_l10n.md.XzEs6w0F.js b/assets/developer_l10n.md.XzEs6w0F.js deleted file mode 100644 index d86aa62b..00000000 --- a/assets/developer_l10n.md.XzEs6w0F.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o,a4 as l}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"l10n 本地化开发指南","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1732521523000}'),t={name:"developer/l10n.md"},r=l('

l10n 本地化开发指南

哪吒监控的 Dashboard 已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化

介绍

  1. 你可以直接使用 /resource/l10n/zh-CN.toml 中已有的文本配置来替换新功能中的文本
  2. 如果新功能中有新增文本,请参考 zh-CN.toml 的配置文本,将新文本拉取到 zh-CN.toml 等其他语言的配置文件中,并添加翻译

新本地化文本的添加

  1. /resource/l10n/ 中添加新的语言文本配置
  2. 在新的语言文本配置中拉取其他语言已有的文本配置
  3. 为新的语言文本配置添加翻译
',6),n=[r];function d(c,i,s,_,h,p){return o(),a("div",null,n)}const f=e(t,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/developer_l10n.md.XzEs6w0F.lean.js b/assets/developer_l10n.md.XzEs6w0F.lean.js deleted file mode 100644 index 7cb7c9eb..00000000 --- a/assets/developer_l10n.md.XzEs6w0F.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o,a4 as l}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"l10n 本地化开发指南","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1732521523000}'),t={name:"developer/l10n.md"},r=l("",6),n=[r];function d(c,i,s,_,h,p){return o(),a("div",null,n)}const f=e(t,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/developer_theme.md.yi2XIKJt.js b/assets/developer_theme.md.yi2XIKJt.js deleted file mode 100644 index 0c2c4fba..00000000 --- a/assets/developer_theme.md.yi2XIKJt.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"哪吒主题开发环境","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1732521523000}'),c={name:"developer/theme.md"},d=t('

哪吒主题开发环境

哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题

WARNING

请注意: 此开发环境仅支持 dashboard v0.19.20 及更新版本。

使用说明

  1. 克隆此仓库到本地
  2. 修改 data/config.yaml 中的 Oauth2 配置(回调连接可以填 http://localhost
  3. 运行 docker-compose up
  4. 开始开发
  5. 主题制作完成之后可以将 theme-custom(前台主题)、static-custom(前台主题静态文件) 和 dashboard-custom(后台主题) 放置到服务器上的 /opt/nezha/dashboard/ 中(如使用 Docker 安装)

FAQ

  • 如果不能使用 80 端口,在 docker-compose.yaml 中修改配置。
',7),l=[d];function r(s,i,h,n,m,_){return a(),o("div",null,l)}const f=e(c,[["render",r]]);export{u as __pageData,f as default}; diff --git a/assets/developer_theme.md.yi2XIKJt.lean.js b/assets/developer_theme.md.yi2XIKJt.lean.js deleted file mode 100644 index 307da4ee..00000000 --- a/assets/developer_theme.md.yi2XIKJt.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"哪吒主题开发环境","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1732521523000}'),c={name:"developer/theme.md"},d=t("",7),l=[d];function r(s,i,h,n,m,_){return a(),o("div",null,l)}const f=e(c,[["render",r]]);export{u as __pageData,f as default}; diff --git a/assets/en_US_case_case1.md.Ba8gewZ6.js b/assets/en_US_case_case1.md.Ba8gewZ6.js deleted file mode 100644 index c09a7a52..00000000 --- a/assets/en_US_case_case1.md.Ba8gewZ6.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as r,a4 as o}from"./chunks/framework.BmdFiWrL.js";const m=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":1732521523000}'),a={name:"en_US/case/case1.md"},n=o('

Build your own Telegram bot to query server information

Contributors:

Project: 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.

',5),i=[n];function s(l,h,u,_,c,p){return r(),t("div",null,i)}const b=e(a,[["render",s]]);export{m as __pageData,b as default}; diff --git a/assets/en_US_case_case1.md.Ba8gewZ6.lean.js b/assets/en_US_case_case1.md.Ba8gewZ6.lean.js deleted file mode 100644 index fc92ed48..00000000 --- a/assets/en_US_case_case1.md.Ba8gewZ6.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as r,a4 as o}from"./chunks/framework.BmdFiWrL.js";const m=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":1732521523000}'),a={name:"en_US/case/case1.md"},n=o("",5),i=[n];function s(l,h,u,_,c,p){return r(),t("div",null,i)}const b=e(a,[["render",s]]);export{m as __pageData,b as default}; diff --git a/assets/en_US_case_case2.md.TWhjXotc.js b/assets/en_US_case_case2.md.TWhjXotc.js deleted file mode 100644 index 5bcf18fd..00000000 --- a/assets/en_US_case_case2.md.TWhjXotc.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e}from"./chunks/qrcode.CZOxHFH-.js";import{_ as t,c as r,o,a4 as s}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),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:

Get shortcut command

Scan the following QR code with your iPhone or iPad to get the shortcut

coode


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 o(),r("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.TWhjXotc.lean.js b/assets/en_US_case_case2.md.TWhjXotc.lean.js deleted file mode 100644 index d7c72ae7..00000000 --- a/assets/en_US_case_case2.md.TWhjXotc.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e}from"./chunks/qrcode.CZOxHFH-.js";import{_ as t,c as r,o,a4 as s}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),a={name:"en_US/case/case2.md"},c=s("",8),i=[c];function h(n,u,l,d,m,_){return o(),r("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.CAI94Mh5.js b/assets/en_US_case_case3.md.CAI94Mh5.js deleted file mode 100644 index df01749f..00000000 --- a/assets/en_US_case_case3.md.CAI94Mh5.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as r,a4 as a}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"Build your own server status query Telegram bot","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1732521523000}'),d={name:"en_US/case/case3.md"},o=a('

Build your own server status query Telegram bot

Contributor:

GitHub project: 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

CommandDescriptionPrivate chat only
startGetting started with the keyboard main menu✔️
helphelp message
addAdd Nezha monitoring url link and token✔️
urlAdd Nezha monitoring url link✔️
tokenAdd Nezha monitoring token✔️
infoGet saved Nezha monitoring url link and token✔️
deleteDelete saved Nezha monitoring url link and token✔️
idAdd an integer id after the command to query the information of a single server (refresh button only available in private chat)
allQuery statistics for all servers
searchSearch for keywords in server names (multiple keywords supported, split by spaces)
',8),i=[o];function s(n,l,u,h,c,m){return r(),e("div",null,i)}const b=t(d,[["render",s]]);export{_ as __pageData,b as default}; diff --git a/assets/en_US_case_case3.md.CAI94Mh5.lean.js b/assets/en_US_case_case3.md.CAI94Mh5.lean.js deleted file mode 100644 index ef329393..00000000 --- a/assets/en_US_case_case3.md.CAI94Mh5.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as r,a4 as a}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"Build your own server status query Telegram bot","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1732521523000}'),d={name:"en_US/case/case3.md"},o=a("",8),i=[o];function s(n,l,u,h,c,m){return r(),e("div",null,i)}const b=t(d,[["render",s]]);export{_ as __pageData,b as default}; diff --git a/assets/en_US_case_case4.md.DB-wfY8y.js b/assets/en_US_case_case4.md.DB-wfY8y.js deleted file mode 100644 index 3e563364..00000000 --- a/assets/en_US_case_case4.md.DB-wfY8y.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as n,o,j as e,a}from"./chunks/framework.BmdFiWrL.js";const x=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1732521523000}'),r={name:"en_US/case/case4.md"},s=e("h1",{id:"fake-agent-monitoring-data-cheater",tabindex:"-1"},[a("Fake-agent, monitoring data cheater "),e("a",{class:"header-anchor",href:"#fake-agent-monitoring-data-cheater","aria-label":'Permalink to "Fake-agent, monitoring data cheater"'},"​")],-1),c=e("p",null,"Contributor:",-1),i=e("ul",null,[e("li",null,[e("a",{href:"https://github.com/dysf888",target:"_blank",rel:"noreferrer"},"dysf888")])],-1),d=e("p",null,[a("GitHub project: "),e("a",{href:"https://github.com/dysf888/fake-nezha-agent",target:"_blank",rel:"noreferrer"},"fake-nezha-agent"),a("(Chinese)")],-1),h=e("p",null,[a("You can modify the monitoring data uploaded to Dashboard by the Agent"),e("br"),a(" Use it for cheating 😈")],-1),l=[s,c,i,d,h];function _(f,g,m,p,u,k){return o(),n("div",null,l)}const y=t(r,[["render",_]]);export{x as __pageData,y as default}; diff --git a/assets/en_US_case_case4.md.DB-wfY8y.lean.js b/assets/en_US_case_case4.md.DB-wfY8y.lean.js deleted file mode 100644 index 3e563364..00000000 --- a/assets/en_US_case_case4.md.DB-wfY8y.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as n,o,j as e,a}from"./chunks/framework.BmdFiWrL.js";const x=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1732521523000}'),r={name:"en_US/case/case4.md"},s=e("h1",{id:"fake-agent-monitoring-data-cheater",tabindex:"-1"},[a("Fake-agent, monitoring data cheater "),e("a",{class:"header-anchor",href:"#fake-agent-monitoring-data-cheater","aria-label":'Permalink to "Fake-agent, monitoring data cheater"'},"​")],-1),c=e("p",null,"Contributor:",-1),i=e("ul",null,[e("li",null,[e("a",{href:"https://github.com/dysf888",target:"_blank",rel:"noreferrer"},"dysf888")])],-1),d=e("p",null,[a("GitHub project: "),e("a",{href:"https://github.com/dysf888/fake-nezha-agent",target:"_blank",rel:"noreferrer"},"fake-nezha-agent"),a("(Chinese)")],-1),h=e("p",null,[a("You can modify the monitoring data uploaded to Dashboard by the Agent"),e("br"),a(" Use it for cheating 😈")],-1),l=[s,c,i,d,h];function _(f,g,m,p,u,k){return o(),n("div",null,l)}const y=t(r,[["render",_]]);export{x as __pageData,y as default}; diff --git a/assets/en_US_case_case5.md.CSkituIs.js b/assets/en_US_case_case5.md.CSkituIs.js deleted file mode 100644 index a4f65921..00000000 --- a/assets/en_US_case_case5.md.CSkituIs.js +++ /dev/null @@ -1,47 +0,0 @@ -import{_ as e,c as a,o as t,a4 as n}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),s={name:"en_US/case/case5.md"},o=n(`

Nezha server over Argo tunnel

Contributors:

GitHub project: Argo-Nezha-Service-Container


Catalog


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.
image

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.
image

Add https:// to the beginning of the panel's domain name and /oauth2/callback to the end of the callback address.

imageimageimageimageimage

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

image

(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 >.
imageimageimageimageimageimageimage

PaaS Deployment Example

Image fscarmen/argo-nezha:latest, supports amd64 and arm64 architectures.

Variables used

Variable NameRequiredRemarks
GH_USERYesgithub username for panel admin authorization
GH_CLIENTIDyesapply on github
GH_CLIENTSECRETyesapply on github
GH_BACKUP_USERNoThe 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_REPONoThe github repository for backing up Nezha's server-side database files on github
GH_EMAILNogithub's mailbox for git push backups to remote repositories
GH_PATNogithub's PAT
ARGO_AUTHYesArgo Json from https://fscarmen.cloudflare.now.cc
Argo token from Cloudflare official website
ARGO_DOMAINYesArgo domain

Koyeb

Deploy to Koyeb

imageimageimageimageimage

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 \\
-           -e GH_USER=<fill in github username> \\
-           -e GH_EMAIL=<fill in github email> \\
-           -e GH_PAT=<fill in the obtained> \\
-           -e GH_REPO=<fill in customized> \\
-           -e GH_CLIENTID=<fill in acquired> \\
-           -e GH_CLIENTSECRET=<fill in acquired> \\
-           -e ARGO_AUTH='<Fill in the fetched Argo json or token>' \\
-           -e ARGO_DOMAIN=<fill in customized> \\
-           -e GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank> \\
-           fscarmen/argo-nezha

docker-compose deployment

version: '3.8'
-services.
-    argo-nezha.
-        image: fscarmen/argo-nezha
-        --pull always
-        container_name: nezha_dashboard
-        restart: always
-        environment:
-            - GH_USER=<fill in github username>
-            - GH_EMAIL=<fill in your github email>
-            - GH_PAT=<<fill in obtained>
-            - GH_REPO=<fill in customized>
-            - GH_CLIENTID=<fill in obtained>
-            - GH_CLIENTSECRET=<fill in fetched>
-            - ARGO_AUTH='<Fill in the fetched Argo json or token>'
-            - ARGO_DOMAIN=<fill in customized>
-            - GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank>

VPS Deployment Method 2 --- hosts

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

Client Access

Transfer via gRPC, no additional configuration required. Use the installation method given in the panel, for example

curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent data.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH access

<filepath>/cloudflared access ssh --hostname ssh.seals.nom.za/<GH_CLIENTID>
imageimageimage

Manually backing up your data

Method 1: Change the contents of the README.md file in the Github backup repository to backup

image

Method 2: After ssh, run /dashboard/backup.sh for container version; /opt/nezha/dashboard/backup.sh for VPS host version.

Automatically restore backups

  • Change the name of the file to be restored to README.md in the github backup repository, the timer service will check for updates every minute and record the last synchronized filename in the local /dbfile to compare with the online file content.

The following is an example of restoring a file with the name dashboard-2023-04-23-13:08:37.tar.gz.

! image

Manually restore the backup

  • ssh into the container and run, tar.gz filename from the github backup repository, format: dashboard-2023-04-22-21:42:10.tar.gz
bash /dashboard/restore.sh <filename>
image

Migrating data

  • Backup the /dashboard folder of the original Nezha and zip it up to dashboard.tar.gz file.
tar czvf dashboard.tar.gz /dashboard
  • Download the file and put it into a private repository, the name of the repository should be exactly the same as <GH_REPO>, and edit the contents of README.md of the repository to dashboard.tar.gz.
  • Deploy the new Nezha in this project, and fill in the variables completely. After the deployment is done, the auto-restore script will check every minute, and will restore automatically if it finds any new content, the whole process will take about 3 minutes.

Main catalog files and descriptions

/dashboard/
-|-- app                  # Nezha panel main program
-|-- argo.json            # Argo tunnel json file, which records information about using the tunnel.
-|-- argo.yml             # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains.
-|-- backup.sh            # Backup data scripts
-|-- restore.sh           # Restore backup scripts
-|-- dbfile               # Record the name of the latest restore or backup file
-|-- resource             # Folders of information on panel themes, languages, flags, etc.
-|-- data
-|   |-- config.yaml      # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not.
-|   \`-- sqlite.db        # SQLite database file that records all severs and cron settings for the panel.
-|-- entrypoint.sh        # The main script, which is executed after the container is run.
-|-- nezha.csr            # SSL/TLS certificate signing request
-|-- nezha.key            # Private key information for SSL/TLS certificate.
-|-- 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

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.
`,88),r=[o];function i(l,c,h,d,p,u){return t(),a("div",null,r)}const f=e(s,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_case_case5.md.CSkituIs.lean.js b/assets/en_US_case_case5.md.CSkituIs.lean.js deleted file mode 100644 index ba42f0d1..00000000 --- a/assets/en_US_case_case5.md.CSkituIs.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as t,a4 as n}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),s={name:"en_US/case/case5.md"},o=n("",88),r=[o];function i(l,c,h,d,p,u){return t(),a("div",null,r)}const f=e(s,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_case_case6.md.De9bTpTA.js b/assets/en_US_case_case6.md.De9bTpTA.js deleted file mode 100644 index 08bb8650..00000000 --- a/assets/en_US_case_case6.md.De9bTpTA.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,a4 as a}from"./chunks/framework.BmdFiWrL.js";const r="/assets/Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917.CVyK0T4N.svg",i="/assets/1_en_US.CE_aSW8N.png",n="/assets/2_en_US.Dm8rLo_N.png",s="/assets/3_en_US.SUOW4yEM.png",k=JSON.parse('{"title":"Nezha Mobile - An iOS Client For Nezha Dashboard","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case6.md","filePath":"en_US/case/case6.md","lastUpdated":1732521523000}'),l={name:"en_US/case/case6.md"},h=a('

Nezha Mobile - An iOS Client For Nezha Dashboard

Contributor:

Contribute to the project

Project Link

INFO

We appreciate any contribution to the project, and we will actively merge your commits into next Release. However, we may modify your work in order to comply with App Review Guidelines.

Download on the App Store

Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917

WARNING

Due to ICP Filing Policy, Nezha Mobile is not available in China mainland.

TestFlight Testing Program

Join TestFlight Testing

Instructions

  • Enter your Dashboard link like server.hidandelion.com and API token on your first use. Do not add a protocol prefix or a trailing slash to the link. API Token can be retrieved from Admin Center of Dashboard. step1

Configure Widget(Optional)

  • Add a widget on your Springboard. Long-tap the widget and then tap Edit Widget. step2

  • Choose a server you want to monitor on the next view. You can choose different servers for each widget. step3

',15),c=[h];function d(p,_,g,u,m,b){return o(),t("div",null,c)}const w=e(l,[["render",d]]);export{k as __pageData,w as default}; diff --git a/assets/en_US_case_case6.md.De9bTpTA.lean.js b/assets/en_US_case_case6.md.De9bTpTA.lean.js deleted file mode 100644 index 4b91bace..00000000 --- a/assets/en_US_case_case6.md.De9bTpTA.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,a4 as a}from"./chunks/framework.BmdFiWrL.js";const r="/assets/Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917.CVyK0T4N.svg",i="/assets/1_en_US.CE_aSW8N.png",n="/assets/2_en_US.Dm8rLo_N.png",s="/assets/3_en_US.SUOW4yEM.png",k=JSON.parse('{"title":"Nezha Mobile - An iOS Client For Nezha Dashboard","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case6.md","filePath":"en_US/case/case6.md","lastUpdated":1732521523000}'),l={name:"en_US/case/case6.md"},h=a("",15),c=[h];function d(p,_,g,u,m,b){return o(),t("div",null,c)}const w=e(l,[["render",d]]);export{k as __pageData,w as default}; diff --git a/assets/en_US_case_case7.md.Cop8wLoV.js b/assets/en_US_case_case7.md.Cop8wLoV.js deleted file mode 100644 index b29f9d6d..00000000 --- a/assets/en_US_case_case7.md.Cop8wLoV.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,a as r}from"./chunks/webssh.Cvv4PsOJ.js";import{_ as a,c as t,o,a4 as n}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"Broker for Nezha - Advancing on more platforms","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case7.md","filePath":"en_US/case/case7.md","lastUpdated":1732521523000}'),i={name:"en_US/case/case7.md"},l=n('

Broker for Nezha - Advancing on more platforms

Contributor:

Broker for Nezha is a modified version of the Nezha Agent that separates data collection from gRPC reporting, enabling small devices to connect to the Nezha Dashboard.

Project link: https://codeberg.org/uubulb/broker

Online Documentation: Broker for Nezha

Difference from Nezha Agent

  • Utilizes external data sources to report to Nezha Dashboard.
  • Supports configuring multiple sources and connecting to multiple Dashboards.
  • Only has limited task support. For details, view the project README.

Broker for Nezha needs to be used with specific data collection software. Currently, it provides two data collection methods:

  1. HTTP (HTTP/1.1) - Active polling
  2. TCP - Passive collection (recommended to avoid creating redundant connections)

For existing data collection software, refer to the project README. Due to security concerns, it's recommended to use this only in a trusted network.

Writing a Data Collector

If you need to write your own data collector, you'll need to implement a basic HTTP server or TCP client and use a specific data format that Broker can recognize. For details, see: Data types

Examples

Dashboard
Dashboard

WebSSH
WebSSH
',17),s=[l];function c(d,f,h,p,u,m){return o(),t("div",null,s)}const k=a(i,[["render",c]]);export{_ as __pageData,k as default}; diff --git a/assets/en_US_case_case7.md.Cop8wLoV.lean.js b/assets/en_US_case_case7.md.Cop8wLoV.lean.js deleted file mode 100644 index 10266e4b..00000000 --- a/assets/en_US_case_case7.md.Cop8wLoV.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,a as r}from"./chunks/webssh.Cvv4PsOJ.js";import{_ as a,c as t,o,a4 as n}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"Broker for Nezha - Advancing on more platforms","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case7.md","filePath":"en_US/case/case7.md","lastUpdated":1732521523000}'),i={name:"en_US/case/case7.md"},l=n("",17),s=[l];function c(d,f,h,p,u,m){return o(),t("div",null,s)}const k=a(i,[["render",c]]);export{_ as __pageData,k as default}; diff --git a/assets/en_US_case_index.md.DGTbX1EV.js b/assets/en_US_case_index.md.DGTbX1EV.js deleted file mode 100644 index e3fd8aad..00000000 --- a/assets/en_US_case_index.md.DGTbX1EV.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"Nezha Monitoring - Server monitoring tool","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring - Server monitoring tool","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":1732521523000}'),a={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return o(),t("div")}const h=e(a,[["render",i]]);export{u as __pageData,h as default}; diff --git a/assets/en_US_case_index.md.DGTbX1EV.lean.js b/assets/en_US_case_index.md.DGTbX1EV.lean.js deleted file mode 100644 index e3fd8aad..00000000 --- a/assets/en_US_case_index.md.DGTbX1EV.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"Nezha Monitoring - Server monitoring tool","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring - Server monitoring tool","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":1732521523000}'),a={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return o(),t("div")}const h=e(a,[["render",i]]);export{u as __pageData,h as default}; diff --git a/assets/en_US_developer_index.md.C7NWMcEo.js b/assets/en_US_developer_index.md.C7NWMcEo.js deleted file mode 100644 index d2b5878b..00000000 --- a/assets/en_US_developer_index.md.C7NWMcEo.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as n}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"Nezha Monitoring - Server monitoring tool","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring - Server monitoring tool","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":1732521523000}'),a={name:"en_US/developer/index.md"};function o(r,i,l,m,s,p){return n(),t("div")}const _=e(a,[["render",o]]);export{c as __pageData,_ as default}; diff --git a/assets/en_US_developer_index.md.C7NWMcEo.lean.js b/assets/en_US_developer_index.md.C7NWMcEo.lean.js deleted file mode 100644 index d2b5878b..00000000 --- a/assets/en_US_developer_index.md.C7NWMcEo.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as n}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"Nezha Monitoring - Server monitoring tool","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring - Server monitoring tool","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":1732521523000}'),a={name:"en_US/developer/index.md"};function o(r,i,l,m,s,p){return n(),t("div")}const _=e(a,[["render",o]]);export{c as __pageData,_ as default}; diff --git a/assets/en_US_developer_l10n.md.XBQ_3Abu.js b/assets/en_US_developer_l10n.md.XBQ_3Abu.js deleted file mode 100644 index d93471f8..00000000 --- a/assets/en_US_developer_l10n.md.XBQ_3Abu.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Localization","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1732521523000}'),n={name:"en_US/developer/l10n.md"},i=o('

Localization

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

  1. You can directly use the text configuration already available in /resource/l10n/en-US.toml to replace the text in the new feature.
  2. 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

  1. Add a new language text configuration in /resource/l10n/.
  2. Pull existing text configurations from other languages in the new language text configuration.
  3. Add translations for the new language text configuration.
',6),l=[i];function r(d,c,s,u,h,f){return a(),t("div",null,l)}const p=e(n,[["render",r]]);export{g as __pageData,p as default}; diff --git a/assets/en_US_developer_l10n.md.XBQ_3Abu.lean.js b/assets/en_US_developer_l10n.md.XBQ_3Abu.lean.js deleted file mode 100644 index 7fe7adc5..00000000 --- a/assets/en_US_developer_l10n.md.XBQ_3Abu.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Localization","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1732521523000}'),n={name:"en_US/developer/l10n.md"},i=o("",6),l=[i];function r(d,c,s,u,h,f){return a(),t("div",null,l)}const p=e(n,[["render",r]]);export{g as __pageData,p as default}; diff --git a/assets/en_US_developer_theme.md.Cm-AKaYr.js b/assets/en_US_developer_theme.md.Cm-AKaYr.js deleted file mode 100644 index cd920fcb..00000000 --- a/assets/en_US_developer_theme.md.Cm-AKaYr.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"Nezha Theme Development Environment","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1732521523000}'),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.19.20 and newer versions.

How to use

  1. Clone this repository to local
  2. Modify the Oauth2 configuration in data/config.yaml(The callback connection can be filled with http://localhost
  3. Run docker-compose up
  4. Start development
  5. After completing the theme creation, you can place theme-custom (frontend theme), static-custom (frontend theme static files), and dashboard-custom (backend theme) into the /opt/nezha/dashboard/ directory on the server (if installed using Docker).

FAQ

  • If you can't use port 80, change the configuration in docker-compose.yaml.
',7),i=[c];function r(l,d,h,s,m,p){return t(),o("div",null,i)}const f=e(n,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/en_US_developer_theme.md.Cm-AKaYr.lean.js b/assets/en_US_developer_theme.md.Cm-AKaYr.lean.js deleted file mode 100644 index dbf111cb..00000000 --- a/assets/en_US_developer_theme.md.Cm-AKaYr.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"Nezha Theme Development Environment","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1732521523000}'),n={name:"en_US/developer/theme.md"},c=a("",7),i=[c];function r(l,d,h,s,m,p){return t(),o("div",null,i)}const f=e(n,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/en_US_guide_agent.md.BOJ8LATb.js b/assets/en_US_guide_agent.md.BOJ8LATb.js deleted file mode 100644 index a53276f0..00000000 --- a/assets/en_US_guide_agent.md.BOJ8LATb.js +++ /dev/null @@ -1,66 +0,0 @@ -import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"Install Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/agent.md"},t=e(`

Install Agent

This document will introduce how to install the Agent on the monitored server and connect it to the Dashboard.

TIP

The repository for Agent binaries can be found at: https://github.com/nezhahq/agent/releases

One-Click Installation of the Agent

Nezha Monitoring supports one-click installation of the Agent on both Windows and Linux. By following the steps in this document, you can easily deploy it on your server.

Preparation

You need to set up a communication domain in the admin panel in advance, and this domain should not be connected to a CDN. This document uses the example communication domain “data.example.com”.
Go to the settings page in the admin panel, fill in the communication domain in the “Non-CDN Dashboard Server Domain/IP” field, and click "Save".

One-Click Installation on Linux

  1. First, add a server in the admin panel.
  2. Click the green Linux icon button next to the newly added server and copy the one-click installation command.
  3. Run the copied installation command on the monitored server, and wait for the installation to complete. Then, check if the server is online in the Dashboard home page.

One-Click Installation on macOS

  1. First, add a server in the admin panel.
  2. Click the green Apple icon button next to the newly added server and copy the one-click installation command.
  3. Run the copied installation command on the monitored server, and wait for the installation to complete. Then, check if the server is online in the Dashboard home page.

One-Click Installation on Windows

  1. First, add a server in the admin panel.
  2. Click the green Windows icon button next to the newly added server and copy the one-click installation command.
  3. Go to the Windows server, run PowerShell, and execute the copied installation command in PowerShell.
  4. If you encounter a prompt to "change execution policy," choose Y.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

WARNING

If you encounter errors when running the one-click installation command in PowerShell, try the Manual Installation of the Agent on Windows below.

Other Ways to Install the Agent

Installing the Agent on Linux (Support most distros)

Click to expand/collapse
  1. First, add a server in the admin panel.
  2. Run the script on the monitored server:
bash
curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
  1. Select “Install monitoring Agent.”
  2. Enter the communication domain, such as "data.example.com".
  3. Enter the dashboard communication port (gRPC port), default is 5555.
  4. Enter the Agent secret, which is generated when you add a server in the admin panel and can be found on the “Servers” page in the admin panel.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

Installing the Agent using the built-in service command (Support most systems)

Click to expand/collapse

First, get a copy of Nezha Agent: https://github.com/nezhahq/agent/releases

After extracting the archive, run the following command to install the service (may require root permission):

bash
./nezha-agent service install -s server_name:port -p password

You can also add other arguments except the server address and password. For more details, refer to the documentation: Customizing Agent Monitoring Items.

Uninstall the service:

bash
./nezha-agent service uninstall

Start the service:

bash
./nezha-agent service start

Stop the service:

bash
./nezha-agent service stop

Restart the service:

bash
./nezha-agent service restart

Installing the Agent with runit

Click to expand/collapse

The built-in service command of Agent supports most init systems, including FreeBSD rc.d and openrc, but still missing some of them.

Here we take Void Linux's runit as an example:

  1. Create directory /etc/sv/nezha-agent:
bash
mkdir /etc/sv/nezha-agent
  1. Create service file /etc/sv/nezha-agent/run, with following content:
bash
#!/bin/sh
-exec 2>&1
-exec /opt/nezha/agent/nezha-agent -s server_name:port -p password 2>&1

You can add other arguments here as well.

  1. Create logging service file /etc/sv/nezha-agent/log/run:
bash
#!/bin/sh
-exec vlogger -t nezha-agent -p daemon
  1. Enable the service:
bash
sudo ln -s /etc/sv/nezha-agent/ /var/service

Use the sv command to manage the service.

How to view logs:

  1. Install socklog and enable it:
bash
sudo xbps-install -S socklog-void
-sudo ln -s /etc/sv/socklog-unix /var/service
  1. Run svlogtail:
bash
sudo svlogtail | grep nezha-agent

Manual Installation of the Agent on Windows

Installing the Agent on Synology DSM

Click to expand/collapse
sh
# Agent path
-EXEC="/PATH/TO/nezha-agent"
-# Log path
-LOG="\${EXEC}.log"
-# Additional execution parameters, can be empty
-ARGS=""
-# Nezha server gRPC address
-SERVER="HOST_OR_IP:gRPC_PORT"
-# The secret key obtained in the previous step
-SECRET="APP_SECRET"
-# User running the service, *strongly recommended to use non-root user*
-RUN_USER="nezha"
-
-# Write to systemd service file
-cat << EOF > /usr/lib/systemd/system/nezha.service
-[Unit]
-Description=Nezha Agent Service
-After=network.target
-
-[Service]
-Type=simple
-ExecStart=/bin/nohup \${EXEC} \${ARGS} -s \${SERVER} -p \${SECRET} &>> \${LOG} &
-ExecStop=ps -fe |grep nezha-agent|awk '{print \\$2}'|xargs kill
-User=\${RUN_USER}
-
-Restart=on-abort
-
-[Install]
-WantedBy=multi-user.target
-EOF
-
-# Reload service
-systemctl daemon-reload
-# Start service
-systemctl start nezha
-# Enable service startup
-systemctl enable nezha

‼️ Modify the corresponding information before running the above commands with the root account to complete the installation.

Installing the Agent on macOS Using Homebrew

Click to expand/collapse

This section is adapted from 🐿️松鼠收集🌰 with the author's permission

WARNING

Please be sure to add environment variables before installing nezha-agent through Homebrew! Homebrew creates the service-required plist file during software installation, and if you add the environment variables after installation, it will fail to start due to missing parameters.

  1. Add environment variables:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="Communication key, obtained from the service page"' >> ~/.zshrc
-echo 'export HOMEBREW_NEZHA_AGENT_SERVER="Your server and port, format your.domain:5555 "' >> ~/.zshrc
-source ~/.zshrc
  1. Install Nezha Agent:

DANGER

Note that this Homebrew repository is maintained by a third party and is unrelated to Nezha Monitoring. The Nezha project team does not endorse this repository's usability, security, etc. Please evaluate the risks yourself before using!

Since it has not yet been submitted to the Homebrew Core official library, it is temporarily placed in the third-party Homebrew repository maintained by the author of the blog:

shell
brew install brewforge/chinese/nezha-agent
  1. Start Nezha Agent service through Homebrew:
shell
brew services start nezha-agent
  1. Check the service status:
shell
brew services info nezha-agent
  1. Stop the service:
shell
brew services stop nezha-agent
  1. Uninstall Nezha Agent:
shell
brew rm nezha-agent
  1. If there is an error, first check the environment variables:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
-echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. If the environment variables are configured correctly, try reinstalling:
shell
brew services stop nezha-agent
-brew reinstall nezha-agent
-brew services start nezha-agent
  1. If the issue persists, submit a issue to the third-party Homebrew repository.

Installing the Agent on OpenWRT

Click to expand/collapse

How to solve installation difficulties and issues in one step?

How to enable autostart on older OpenWRT/LEDE?

How to enable autostart on newer OpenWRT? Contributor: @艾斯德斯

  • First, download the corresponding binary from the release, unzip the zip package, and place it in /root.
  • Run chmod +x /root/nezha-agent to grant execution permission, then create /etc/init.d/nezha-service:
shell
#!/bin/sh /etc/rc.common
-
-START=99
-USE_PROCD=1
-
-start_service() {
- procd_open_instance
- procd_set_param command /root/nezha-agent -s Dashboard communication domain:port -p Key -d
- procd_set_param respawn
- procd_close_instance
-}
-
-stop_service() {
-  killall nezha-agent
-}
-
-restart() {
- stop
- sleep 2
- start
-}
  • Run chmod +x /etc/init.d/nezha-service to grant execution permission.
  • Start the service: /etc/init.d/nezha-service enable && /etc/init.d/nezha-service start

Does the Agent Have a Docker Image?

The Agent does not currently have a Docker image.
The design philosophy of the Agent is opposite to that of the Dashboard. While the Dashboard should minimally impact the server, the Agent needs to execute monitoring services and run commands within the server.
Running the Agent inside a container can still perform monitoring tasks, but features like WebShell will not function properly, so no Docker image is provided.

`,31),l=[t];function h(p,o,r,k,d,c){return a(),i("div",null,l)}const u=s(n,[["render",h]]);export{F as __pageData,u as default}; diff --git a/assets/en_US_guide_agent.md.BOJ8LATb.lean.js b/assets/en_US_guide_agent.md.BOJ8LATb.lean.js deleted file mode 100644 index 34733d30..00000000 --- a/assets/en_US_guide_agent.md.BOJ8LATb.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"Install Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/agent.md"},t=e("",31),l=[t];function h(p,o,r,k,d,c){return a(),i("div",null,l)}const u=s(n,[["render",h]]);export{F as __pageData,u as default}; diff --git a/assets/en_US_guide_agentq.md.syI2hhx-.js b/assets/en_US_guide_agentq.md.syI2hhx-.js deleted file mode 100644 index 45fac8a0..00000000 --- a/assets/en_US_guide_agentq.md.syI2hhx-.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Frequently Asked Questions about the Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/agentq.md"},s=n('

Frequently Asked Questions about the Agent

The IP Displayed in the Admin Panel is Different from the Actual Agent IP?

Please refer to Dashboard Related - Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?. This will not be repeated here.

Errors During One-Click Script Installation

curl: Failed to connect to raw.githubusercontent.com......

This mostly occurs on servers in mainland China. Currently, the one-click script fetches the installation script directly from Github. You may try several times, or manually install the Agent. Additionally, you can find third-party Github acceleration services or mirrors and set them in the one-click installation script.

sudo: command not found

Please manually install sudo first, for example, in Ubuntu:

shell
apt install sudo
',9),o=[s];function r(l,d,h,c,u,p){return a(),t("div",null,o)}const g=e(i,[["render",r]]);export{f as __pageData,g as default}; diff --git a/assets/en_US_guide_agentq.md.syI2hhx-.lean.js b/assets/en_US_guide_agentq.md.syI2hhx-.lean.js deleted file mode 100644 index 99a3a41f..00000000 --- a/assets/en_US_guide_agentq.md.syI2hhx-.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Frequently Asked Questions about the Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/agentq.md"},s=n("",9),o=[s];function r(l,d,h,c,u,p){return a(),t("div",null,o)}const g=e(i,[["render",r]]);export{f as __pageData,g as default}; diff --git a/assets/en_US_guide_api.md.B7SlCX6N.js b/assets/en_US_guide_api.md.B7SlCX6N.js deleted file mode 100644 index d83feee1..00000000 --- a/assets/en_US_guide_api.md.B7SlCX6N.js +++ /dev/null @@ -1,240 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"API Interface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1732521523000}'),t={name:"en_US/guide/api.md"},h=n(`

API Interface

Nezha Monitoring supports querying the status information of Agents using the API interface

Creating a Token

Nezha Monitoring's API interface allows for Token authentication and Cookies authentication. To create a new Token, go to the admin panel, click on the avatar in the top right corner, select "API Token," and enter the Token management page. Click "Add Token", add a custom note, and click "Add".

To delete a Token, select the corresponding Token and click the delete icon on the right.

WARNING

Tokens are the authentication credentials for the API interface. They are critical to the security of your Dashboard's information, so do not share your Token with others.

Authentication Method

Ensure the request header contains Authorization: Token for authentication.

Token authentication method:

Request Headers:
-Authorization: Token

Usage Instructions

WARNING

Negative timestamps in the following examples represent 0000-00-00. This currently indicates that the Agent has never reported since the Dashboard went online, but it is not recommended to use the positive or negative value to determine the status.

TIP

The request method is GET, and the response format is JSON.

Get Server List

Request:

GET /api/v1/server/list?tag=

Parameters:

  • tag (optional): ServerTag is the server group. Provide this parameter to query only servers in that group.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653014667,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1"
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": ""
-        }
-    ]
-}

Get Server Details

Request:

GET /api/v1/server/details?id=&tag=

Parameters:

  • id (optional): ServerID, multiple IDs separated by commas. Provide this parameter to query the server corresponding to that ID and ignore the tag parameter.
  • tag (optional): ServerTag, provide this parameter to query only servers in that group.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653015042,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1",
-            "host": {
-                "Platform": "darwin",
-                "PlatformVersion": "12.3.1",
-                "CPU": [
-                    "Apple M1 Pro 1 Physical Core"
-                ],
-                "MemTotal": 17179869184,
-                "DiskTotal": 2473496842240,
-                "SwapTotal": 0,
-                "Arch": "arm64",
-                "Virtualization": "",
-                "BootTime": 1652683962,
-                "CountryCode": "hk",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 17.33,
-                "MemUsed": 14013841408,
-                "SwapUsed": 0,
-                "DiskUsed": 2335048912896,
-                "NetInTransfer": 2710273234,
-                "NetOutTransfer": 695454765,
-                "NetInSpeed": 10806,
-                "NetOutSpeed": 5303,
-                "Uptime": 331080,
-                "Load1": 5.23,
-                "Load5": 4.87,
-                "Load15": 3.99,
-                "TcpConnCount": 195,
-                "UdpConnCount": 70,
-                "ProcessCount": 437
-            }
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": "",
-            "host": {
-                "Platform": "",
-                "PlatformVersion": "",
-                "CPU": null,
-                "MemTotal": 0,
-                "DiskTotal": 0,
-                "SwapTotal": 0,
-                "Arch": "",
-                "Virtualization": "",
-                "BootTime": 0,
-                "CountryCode": "",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 0,
-                "MemUsed": 0,
-                "SwapUsed": 0,
-                "DiskUsed": 0,
-                "NetInTransfer": 0,
-                "NetOutTransfer": 0,
-                "NetInSpeed": 0,
-                "NetOutSpeed": 0,
-                "Uptime": 0,
-                "Load1": 0,
-                "Load5": 0,
-                "Load15": 0,
-                "TcpConnCount": 0,
-                "UdpConnCount": 0,
-                "ProcessCount": 0
-            }
-        }
-    ]
-}

Get ICMP Ping / TCPing monitor value

This API does not require authentication, except for servers with HideForGuest option enabled.

Request:

GET /api/v1/monitor/{id}

Parameters:

  • id (required): ServerID, must be an positive integer.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "monitor_id": 1,
-            "server_id": 1,
-            "monitor_name": "Monitor1",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                68.2275,
-                70.1129
-            ]
-        },
-        {
-            "monitor_id": 2,
-            "server_id": 1,
-            "monitor_name": "Monitor2",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                66.656,
-                68.2153
-            ]
-        },
-        {
-            "monitor_id": 3,
-            "server_id": 1,
-            "monitor_name": "Monitor3",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                61.4525,
-                62.342
-            ]
-        }
-    ]
-}

Note: created_at corresponds with avg_delay.

Automatic Node Registration

Description: Script for automating node registration. Example code is provided below. Reference: https://github.com/naiba/nezha/pull/472

http
POST /api/v1/server/register?simple=1

Parameters:

  • simple: (optional): Specifies the format of the response data.
    • When set to simple=1 or simple=true, the response will only include a Token string (e.g., 8GYwaxYuLfU7zl7ndC).
    • Otherwise the response will return a complete JSON object::{"code": 200, "message": "Server created successfully","secret": "8GYwaxYuLfU7zl7ndC"}

Request Payload:

The payload can be completely empty ({}), and the system will apply the following default values:

  • Name: Defaults to the node’s IP address ($IP).
  • Tag: Defaults to "AutoRegister".
  • Note: Defaults to an empty string ("").
  • HideForGuest: Defaults to "on".

You can also customize your data:

json
  "Name": "abcd",        // Node name
-  "Tag": "",             // Tag (optional)
-  "Note": "",            // Note or description (optional)
-  "HideForGuest": "on"   // Whether to hide from guests

Usage Examples

Get All Server Information

python
import requests
-
-url = "http://your-dashboard/api/v1/server/list"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-for server in data['result']:
-    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

Get Specific Server Details

python
import requests
-
-server_id = 1  # Replace with your server ID
-url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-server = data['result'][0]
-print(f"Server Name: {server['name']}")
-print(f"CPU Usage: {server['status']['CPU']}%")
-print(f"Memory Used: {server['status']['MemUsed']} bytes")
-print(f"Disk Used: {server['status']['DiskUsed']} bytes")
-print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
-print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

With the above example code, you can easily obtain and process server status information, enabling automated monitoring and management.

Automatic Node Registration

  1. Create a file named nezha_register.sh, and copy the following content into it:
bash
#!/bin/bash
-
-# Exit if NEZHA_TOKEN is not set
-if [ -z "\${NEZHA_TOKEN}" ]; then
-    echo "NEZHA_TOKEN is not set. Exiting."
-    exit 0
-fi
-
-# Set default values if variables are not set
-NEZHA_PROBE_ADDRESS="\${NEZHA_PROBE_ADDRESS:-probe.example.com}"
-NEZHA_PROBE_PORT="\${NEZHA_PROBE_PORT:-5555}"
-NEZHA_DASHBOARD_URL="\${NEZHA_DASHBOARD_URL:-https://nezha.example.com}"
-
-NODE_NAME=\${NODE_NAME:-$(hostname)}
-
-# Send POST request and capture response and HTTP status code
-response=$(curl -s -o response_body.json -w "%{http_code}" -X POST "\${NEZHA_DASHBOARD_URL}/api/v1/server/register?simple=true" \\
-  -H "Content-Type: application/json" \\
-  -H "Authorization: \${NEZHA_TOKEN}" \\
-  -d "{\\"Name\\": \\"\${NODE_NAME}\\"}")
-
-# Extract HTTP status code and Nezha secret
-HTTP_CODE="$response"
-NEZHA_SECRET=$(cat response_body.json)
-rm -f response_body.json
-
-if [ "$HTTP_CODE" != "200" ]; then
-    echo "Failed to get Nezha Secret. HTTP status code: $HTTP_CODE"
-    exit 1
-fi
-
-# Additional check for NEZHA_SECRET to ensure it's not JSON-formatted (indicating failure)
-if [[ "\${NEZHA_SECRET:0:1}" == "{" ]]; then
-    echo "Failed to get Nezha Secret. Received response: \${NEZHA_SECRET}"
-    exit 1
-fi
-
-# Download and execute the install script with cleanup
-curl -fsSL https://raw.githubusercontent.com/nezhahq/scripts/main/install_en.sh -o nezha.sh && \\
-chmod +x nezha.sh || { echo "Failed to download or make the script executable"; exit 1; }
-
-# Clean up nezha.sh on exit
-trap 'rm -f nezha.sh' EXIT
-
-# Run the Nezha agent installation script
-CMD="./nezha.sh install_agent "\${NEZHA_PROBE_ADDRESS}" "\${NEZHA_PROBE_PORT}" "\${NEZHA_SECRET}" --tls"
-
-echo "Run commnad : \${CMD}"
-
-eval $CMD
  1. Grant execution permission to the script: chmod +x nezha_register.sh
  2. Get Token from Nezha dashboard, e.g. POXbxorKJBM8wPMKX8r2PdMblyXvpggB
  3. Set Environment Variables
bash
export NEZHA_TOKEN="POXbxorKJBM8wPMKX8r2PdMblyXvpggB" # Obtain this token from the dashboard
-export NEZHA_PROBE_ADDRESS="your_probe_address"        # Set your probe address
-export NEZHA_DASHBOARD_URL="https://nezha.example.com" # Replace with your dashboard URL
-export NEZHA_PROBE_PORT="5555"                         # Modify this port if needed
  1. Run the script to complete node registration and probe installation:
bash
./nezha_register.sh
  1. If the script runs successfully, you will see output like the following:
bash
Run command: ./nezha.sh install_agent probe.example.com 5555 YOUR_SECRET --tls
`,61),k=[h];function l(p,e,E,r,d,o){return a(),i("div",null,k)}const y=s(t,[["render",l]]);export{F as __pageData,y as default}; diff --git a/assets/en_US_guide_api.md.B7SlCX6N.lean.js b/assets/en_US_guide_api.md.B7SlCX6N.lean.js deleted file mode 100644 index 36af7451..00000000 --- a/assets/en_US_guide_api.md.B7SlCX6N.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"API Interface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1732521523000}'),t={name:"en_US/guide/api.md"},h=n("",61),k=[h];function l(p,e,E,r,d,o){return a(),i("div",null,k)}const y=s(t,[["render",l]]);export{F as __pageData,y as default}; diff --git a/assets/en_US_guide_dashboard.md.D5-Qa-Bd.js b/assets/en_US_guide_dashboard.md.D5-Qa-Bd.js deleted file mode 100644 index d879409b..00000000 --- a/assets/en_US_guide_dashboard.md.D5-Qa-Bd.js +++ /dev/null @@ -1,25 +0,0 @@ -import{_ as a,c as e,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const k=JSON.parse('{"title":"Install Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/dashboard.md"},n=t(`

Install Dashboard

Preparation

To set up Nezha Monitoring, you need:

  1. A server with public internet access, with firewall and security policies allowing traffic on ports 8008 and 5555. These ports are necessary for accessing and receiving data. A server with a single core and 512MB of RAM is sufficient for most use cases.
  2. A domain with an A record set to point to your Dashboard server IP.

TIP

If you want to use a CDN, prepare two domains: one configured with CDN for public access (CDN must support WebSocket protocol), and another domain not using CDN for communication between the Agent and Dashboard.

This document uses "dashboard.example.com" and "data.example.com" as example domains.

  1. A Github account (or Gitlab, Gitee).

This document uses the aaPanel for reverse proxying the Dashboard as an example. As future versions change, some features may change their entry points. This document is for reference only.

WARNING

This project does not depend on the aaPanel; you can choose any server panel you prefer or manually install Nginx or Caddy to configure SSL and reverse proxy.
If you do not need to use ports 80 and 443 to access the Dashboard, you can directly use the installation script to install and run Nezha Monitoring without installing Nginx.

Obtaining Github Client ID and Secret

Nezha Monitoring uses Github, Gitlab, or Gitee as admin accounts.

  1. First, create an OAuth application. For Github, log in to Github, open Github OAuth Apps, and select "OAuth Apps" -> "New OAuth App".
    Application name - Fill in as you like.
    Homepage URL - Fill in with the domain for accessing the dashboard, such as "http://dashboard.example.com" (your domain).
    Authorization callback URL - Fill in with the callback address, such as "http://dashboard.example.com/oauth2/callback" (don't forget /oauth2/callback).
  2. Click “Register application”.
  3. Save the Client ID on the page, then click “Generate a new client secret” to create a new Client Secret, which will be displayed only once, please keep it safe.

Using Cloudflare Access as an OAuth2 Provider

If you encounter issues using GitHub, GitLab, or Gitee for admin account logins, consider switching to Cloudflare Access as your OAuth2 provider for authentication.

Setting Up a New SaaS-OIDC Application

WARNING

The following steps are for users who have already started using Zero Trust. If you have not previously used Cloudflare Zero Trust, we strongly recommend that you first read the Guide on Using Cloudflare Access as an OAuth2 Provider to understand the configuration examples and setup process.

  1. Go to Zero Trust Dashboard and log in with your Cloudflare account.
  2. My Team -> Users -> <specific user> -> Get User ID and save it.
  3. Access -> Application -> Add an Application.
  4. Choose SaaS, enter a custom application name in Application (e.g., nezha), select OIDC, and click Add application.
  5. Select Scopes: openid, email, profile, groups.
  6. Fill in your callback address in Redirect URLs, such as https://dashboard.example.com/oauth2/callback.
  7. Save the Client ID, Client Secret, and Issuer address (protocol and domain part), e.g., https://xxxxx.cloudflareaccess.com.

If using this method, after installing the Dashboard, modify the configuration file /opt/nezha/dashboard/data/config.yaml, and change the Endpoint configuration to the Issuer address saved earlier, e.g., https://xxxxx.cloudflareaccess.com, and restart the Dashboard.

OIDC Authentication Configuration (Optional)

Nazha supports custom OIDC authentication login. For configuration details, please refer to the documentation: Enable OIDC authorization.

Installing the Dashboard on the Server

Run the installation script on the dashboard server:

bash
curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

After Docker installation completes, enter the following values:

  • OAuth provider - choose one from github, cloudflare, gitlab, gitee.
  • Client ID - the previously saved Client ID.
  • Client Secret - the previously saved Client Secret.
  • Username - the username/User ID from the OAuth provider.
  • Site title - custom site title.
  • Access port - public access port, customizable, default is 8008.
  • Agent communication port - port for Agent and Dashboard communication, default is 5555.

After inputting the values, wait for the image to be pulled.
When the installation completes, you can access the dashboard by visiting your domain and port number, such as “http://dashboard.example.com:8008”.

In the future, if you need to run the script again, run:

bash
./nezha.sh

to open the management script.

Configuring Reverse Proxy

Create a new site in the aaPanel, with the domain filled in as the public access domain, such as “http://dashboard.example.com”. Then click “Settings” to enter the site settings options, select “Reverse Proxy” - “New Reverse Proxy”.

Customize a proxy name and fill in http://127.0.0.1 in the "Target URL" below, then click “Save”.

Open the “Configuration File” on the right side of the newly created reverse proxy and replace the configuration file with the following content:

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/.+|file/.+)$ {
-    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/

Click “Save”.
Now you should be able to access the dashboard directly using the domain, such as “http://dashboard.example.com”.

Additional Content:

CaddyServer v1 (v2 does not require special configuration):

caddy
proxy /ws http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /terminal/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /file/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}

Configuring SSL in the aaPanel

First, temporarily disable the reverse proxy.
Like configuring SSL certificates for other websites, enter the “SSL” in the site settings, and you can choose to automatically apply for a Let’s Encrypt certificate or manually configure an existing certificate.
After completing the SSL settings, go back to Github OAuth Apps and edit the previously created OAuth application. Change all the domain parts in "Homepage URL" and "Authorization callback URL" from http to https, such as "https://dashboard.example.com" and "https://dashboard.example.com/oauth2/callback". Failing to change this may result in being unable to log in to the admin panel.

Updating the Dashboard

Run the script ./nezha.sh, and select to restart and update the dashboard.

`,41),o=[n];function r(l,h,p,d,c,u){return s(),e("div",null,o)}const b=a(i,[["render",r]]);export{k as __pageData,b as default}; diff --git a/assets/en_US_guide_dashboard.md.D5-Qa-Bd.lean.js b/assets/en_US_guide_dashboard.md.D5-Qa-Bd.lean.js deleted file mode 100644 index 723a23f0..00000000 --- a/assets/en_US_guide_dashboard.md.D5-Qa-Bd.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as e,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const k=JSON.parse('{"title":"Install Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/dashboard.md"},n=t("",41),o=[n];function r(l,h,p,d,c,u){return s(),e("div",null,o)}const b=a(i,[["render",r]]);export{k as __pageData,b as default}; diff --git a/assets/en_US_guide_dashboardq.md.DKl5bwtM.js b/assets/en_US_guide_dashboardq.md.DKl5bwtM.js deleted file mode 100644 index 5f68be54..00000000 --- a/assets/en_US_guide_dashboardq.md.DKl5bwtM.js +++ /dev/null @@ -1,10 +0,0 @@ -import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"Frequently Asked Questions about the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1732521523000}'),s={name:"en_US/guide/dashboardq.md"},n=i(`

Frequently Asked Questions about the Dashboard

Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?

First, let's explain how the IP displayed in the Admin panel is obtained: The Agent periodically requests IP-API to get IP information and reports it to the Dashboard. The currently used IP-API can be viewed here: myip.go.
If you find that the IP displayed in the Admin panel is different from the IP provided by your service provider, it is most likely that the service provider has given you an entry IP, but the Agent is testing your exit IP. This issue can also occur with multi-line servers and IPLC private lines.

TIP

For example, a common scenario is that the service provider gives you a high-defense server. To meet both high defense and low network interruption rate goals, the IP provided may be a mapped high-defense IP rather than your server's real exit IP.

You can also test the exit IP on the Agent server by running the following commands:

shell
curl https://ipapi.co/ip/
-curl ip.sb
-curl ip-api.com

Forgot or Deleted Viewing Password

Please view or edit the /opt/nezha/dashboard/data/config.yaml file.
The password is located under the site-viewpassword item.

Dashboard Installation/Restart/Update Failure: iptables ......

First, try restarting Docker before proceeding:

shell
systemctl status docker
-systemctl restart docker
-systemctl status docker

After restarting, try reinstalling the Dashboard.
If iptables errors persist, consider disabling or removing iptables.
This issue might also be related to the kernel, so switching to the official kernel can be another solution.

Dashboard Restart Failure: Invalid hostPort: nz_site_port

If this issue occurs, you can modify the configuration via the installation script or directly edit the /opt/nezha/dashboard/docker-compose.yaml file.

Dashboard Layout Error, CSS Resources Not Loading

If the Dashboard page layout is incorrect, it's usually due to missing or inaccessible CSS files.
To resolve this, try restarting and updating the Dashboard first.
If the problem persists after updating, the issue may be due to inappropriate configurations in your vhost file. You can edit the Nginx vhost file or use the aaPanel to:

  1. Find the site configured during Dashboard installation in Websites and click Settings on the right.

  2. Select Configuration File and remove the following lines:

    nginx
    location ~ .*\\.(js|css)?$
    -    {
    -        expires      12h;
    -        error_log /dev/null;
    -        access_log /dev/null;
    -    }
  3. Save the configuration, clear the browser, Nginx, and CDN caches, and refresh the page to see if it returns to normal.

Dashboard Cannot Start: panic: Unable to find the configured DDNS provider...

The value entered for the DDNS provider is incorrect. Currently, only webhook, cloudflare, tencentcloud, and dummy are supported.

Dashboard DDNS Update Crash: panic: interface conversion: interface {} is nil, not []interface {}

The entered DDNS AccessID or AccessSecret is incorrect.

Dashboard warning: NEZHA>> 错误的服务监控上报...

  1. The installed versions of the Dashboard and Agent are not compatible and have a TaskType that is unsupported by its counterpart. Updating both to the latest version could solve this problem.

  2. This could be a specific issue in Dashboard v0.17.10 - v0.18.0. Updating to the latest version could solve this.

Unable to start the Agent service: Unix syslog delivery error

Appears in Agent v0.16.9+. Mostly caused by a malfunctioning /dev/log socket (or it does not exist at all). You can refer to https://unix.stackexchange.com/questions/317064/how-do-i-restore-dev-log-in-systemdrsyslog-host to solve this problem. Try avoiding using init systems like systemd in a Docker installation.

Network Monitoring Page Shows: server monitor history not found

This error indicates that no TCP-Ping or ICMP-Ping type monitoring has been set in the services page or monitoring data has not yet been generated.
If it has been set up, wait for some time and then check again.

What to do if /terminal or /ws can't connect properly after enabling HTTPS?

This is often due to an incomplete certificate. Add the -d parameter to the agent run command. If the log contains x509:certificate signed by unknown authority, replacing with a complete certificate will solve the problem.

What if I'm not satisfied with the data modification/addition functionality provided by the dashboard and want to modify/add data myself?

Common in scenarios like batch adding Agents, you can directly modify the database.
Note that not everything in the database can be modified; incorrect modifications can lead to data corruption and inability to start the Dashboard. Do not modify the database casually!

DANGER

Again, do not modify the database casually!

If you need to modify data in the database, stop the dashboard container first.
The database type is sqlite3, located at /opt/nezha/dashboard/data/sqlite.db. Backup before modifying.

Will the Dashboard automatically update?

Agents typically update automatically, but the Dashboard does not and requires manual updates.

Agent Command Issuance Failed When Connecting to Web Terminal

When the Agent is offline, or the connection between the Agent and the Dashboard is unstable, it may cause issues with connecting to the Web Terminal. Please check if the Agent is running normally and maintaining a stable connection with the Dashboard.

`,37),o=[n];function r(d,l,h,c,p,u){return t(),a("div",null,o)}const f=e(s,[["render",r]]);export{b as __pageData,f as default}; diff --git a/assets/en_US_guide_dashboardq.md.DKl5bwtM.lean.js b/assets/en_US_guide_dashboardq.md.DKl5bwtM.lean.js deleted file mode 100644 index b8a6ce3b..00000000 --- a/assets/en_US_guide_dashboardq.md.DKl5bwtM.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as t,a4 as i}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"Frequently Asked Questions about the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1732521523000}'),s={name:"en_US/guide/dashboardq.md"},n=i("",37),o=[n];function r(d,l,h,c,p,u){return t(),a("div",null,o)}const f=e(s,[["render",r]]);export{b as __pageData,f as default}; diff --git a/assets/en_US_guide_ddns.md.B3Hwjtpc.js b/assets/en_US_guide_ddns.md.B3Hwjtpc.js deleted file mode 100644 index 60fab06a..00000000 --- a/assets/en_US_guide_ddns.md.B3Hwjtpc.js +++ /dev/null @@ -1,2 +0,0 @@ -import{_ as e,c as i,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const k=JSON.parse('{"title":"DDNS","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/ddns.md","filePath":"en_US/guide/ddns.md","lastUpdated":1732521523000}'),s={name:"en_US/guide/ddns.md"},a=o(`

DDNS

The DDNS functionality is designed for servers with dynamic IP addresses. When the Agent server reports a new IP (every 10 minutes), Dashboard will automatically update the DNS record based on the configuration.

Why should I use Nezha's DDNS functionality?

  • Convenient centralized management of DDNS settings, instead of deploying a DDNS service on every server.
  • Your confidential information is only stored on the Dashboard server, preventing leaks.

Configuration

You can directly add DDNS configurations in the Dashboard management page.

  1. Click on the "Dynamic DNS" option in the menu bar to enter the configuration page.
  2. Click the "New Profile" button and fill in the required information in the pop-up window. Option details:
    • Name: The name of the configuration.
    • DDNS Provider: The type of provider, determining the method used to update DNS records.
    • Domains (separate with comma): The domain(s), if you enter multiple domains, they should be separated by commas. IDNs (Internationalized Domain Names) are supported.
    • Maximum retry attempts: The number of attempts for updating DDNS, default is 3, and the range is between 1 and 10.
    • DDNS Credential 1 and DDNS Credential 2 are optional. Typically, at least one needs to be provided. The table below lists the options for all providers.
  3. If using the webhook provider, the corresponding options need to be filled out as required. For detailed instructions, see Webhook Configuration.
  4. You need to check at least one of IPv4 Enabled and IPv6 Enabled; otherwise, no update operations will be performed.
  5. After adding a new configuration, you also need to modify the server settings to activate DDNS. Server-related options include:
    • Enable DDNS: Enable DDNS functionality for this server.
    • DDNS Profiles: The list of DDNS configuration IDs to use, searchable by configuration name.

Webhook Configuration

Webhook requires manually constructing HTTP requests, suitable for using other provider services when operations are simple.

Webhook option descriptions:

  • Webhook URL: The URL for the HTTP request, where parameters can use placeholders.
  • Webhook Request Method: The HTTP request method. Supported methods include GET, POST, PATCH, DELETE, and PUT.
  • Webhook Request Type: The format of the HTTP request body, either JSON or Form.
  • Webhook Request Headers: HTTP request headers, filled in JSON format, but nesting is not supported.
  • Webhook Request Body: The HTTP request body. It won't be used for GET and DELETE. If you need to use a nested format, you must choose JSON as the request type.

Supported Webhook placeholders:

  • #ip#: Host IP.
  • #domain#: DDNS domain. Each request is made separately for each domain, so this value will be a single domain string.
  • #type#: IP type, either "ipv4" or "ipv6".
  • #record#: Record type, either "A" or "AAAA".
  • #access_id#: DDNS Credential 1.
  • #access_secret#: DDNS Credential 2.

Oray Webhook Example

Click to expand/collapse
  • URL:http://ddns.oray.com/ph/update?hostname=#domain#&myip=#ip#
  • Request Method: GET
  • Request Header:{"Authorization": "Basic pass"}, replace pass with the Base64-encoded userpass (e.g., user:pass becomes dXNlcjpwYXNzCg==).
  • Oray only supports A records, so only enable IPv4. Other Webhook options are not required.

Provider List

ProviderCredential 1 (ID)Credential 2 (Secret)
dummy❌️❌️
webhookOptionalOptional
cloudflare❌️
tencentcloud

Viewing Logs

In the Dashboard logs, you can see the relevant logs for the DDNS functionality. When configured correctly, there will be corresponding log entries when updating DNS records.

shell
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成功
`,20),n=[a];function d(r,l,h,c,p,u){return t(),i("div",null,n)}const m=e(s,[["render",d]]);export{k as __pageData,m as default}; diff --git a/assets/en_US_guide_ddns.md.B3Hwjtpc.lean.js b/assets/en_US_guide_ddns.md.B3Hwjtpc.lean.js deleted file mode 100644 index 39d0bd76..00000000 --- a/assets/en_US_guide_ddns.md.B3Hwjtpc.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as i,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const k=JSON.parse('{"title":"DDNS","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/ddns.md","filePath":"en_US/guide/ddns.md","lastUpdated":1732521523000}'),s={name:"en_US/guide/ddns.md"},a=o("",20),n=[a];function d(r,l,h,c,p,u){return t(),i("div",null,n)}const m=e(s,[["render",d]]);export{k as __pageData,m as default}; diff --git a/assets/en_US_guide_loginq.md.DK7A_9g2.js b/assets/en_US_guide_loginq.md.DK7A_9g2.js deleted file mode 100644 index 7e92fdca..00000000 --- a/assets/en_US_guide_loginq.md.DK7A_9g2.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o,a4 as t}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"FAQ about logging into the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/loginq.md"},r=t('

FAQ about logging into the Dashboard

Stuck Page/Connection Refused/Long Response Time After Login Callback

These issues can manifest in various ways, but ultimately the browser cannot display correctly after login.

  1. Your server cannot connect to Github/Gitee, which is most common when configuring Github on servers in mainland China. You may try several times or switch to Cloudflare Access.
  2. You have configured the callback address incorrectly. Ensure that your callback address is correct and that both the port and protocol are accurate!
  3. An unknown error occurred on the Dashboard. You can use a script to check the logs.

TIP

What is a protocol? In the browser, the string that ends your domain with :// is the protocol, usually http or https. Since there may be multiple protocol+domain+port combinations available for accessing the Dashboard in a normal deployment, make sure to choose the most appropriate one as the callback.

How to Check if My Callback Address is Wrong?

Ensure that the protocol+domain+port displayed in the browser before login and after the callback are consistent.
Ensure that your path is /oauth2/callback, all in lowercase.

Errors After Logging into the Admin Panel

  1. Clear cookies and log in again, or try a different browser.
  2. Check the callback address to ensure it is correct and that both the port and protocol are accurate! The address initiating the request must be in the same domain as the callback address, with the port, protocol, and domain (or IP) all matching.

lookup xxx

The container DNS resolution failed, usually due to modified iptables configurations.
It is recommended to restart Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If the lookup error persists, check if there are other tools controlling iptables, such as firewall.
This issue might also be related to the kernel, so try switching to the official kernel.

Invalid authorization method, or the login callback address is invalid, expired, or has been revoked

This issue appears only when using Gitee login, and the reason is unclear. Switching to GitHub is recommended.

oauth2: server response missing access_token

This could be caused by various factors, most likely a network issue. Check your network and try again.
If unresolved, switching to Github or another method is recommended.

The user is not an admin of this site and cannot log in

You logged in with the wrong account or configured the wrong username. Note that the username is not an email, and you can use a script to modify it.
For Cloudflare Access users, note that your username is not an email but a User ID.

dial tcp xxx:443 i/o timeout

This is a network issue. Try restarting Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If you are configuring Github login on a server in mainland China, switching to Cloudflare Access is recommended to avoid network interference.

net/http: TLS handshake timeout

Same as above.

Unable to receive email verification codes using Cloudflare Access as an OAuth2 Provider

  • Ensure that the email verification policy has been correctly configured in Policies.
  • Verify that the email address you provided is correct. Note that email addresses not on the policy whitelist will not receive verification codes.
',24),n=[r];function s(l,c,h,d,u,g){return o(),a("div",null,n)}const b=e(i,[["render",s]]);export{p as __pageData,b as default}; diff --git a/assets/en_US_guide_loginq.md.DK7A_9g2.lean.js b/assets/en_US_guide_loginq.md.DK7A_9g2.lean.js deleted file mode 100644 index 39fb3990..00000000 --- a/assets/en_US_guide_loginq.md.DK7A_9g2.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o,a4 as t}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"FAQ about logging into the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/loginq.md"},r=t("",24),n=[r];function s(l,c,h,d,u,g){return o(),a("div",null,n)}const b=e(i,[["render",s]]);export{p as __pageData,b as default}; diff --git a/assets/en_US_guide_nat.md.Bm1a6Dwz.js b/assets/en_US_guide_nat.md.Bm1a6Dwz.js deleted file mode 100644 index a872df12..00000000 --- a/assets/en_US_guide_nat.md.Bm1a6Dwz.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"NAT Traversal Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/nat.md","filePath":"en_US/guide/nat.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/nat.md"},n=o('

NAT Traversal Configuration

Nezha Server Monitoring includes built-in NAT traversal capabilities, allowing users to expose internal services running on an Agent (such as home OpenWrt routers or NAS devices) to the public internet. This functionality facilitates remote access and is currently limited to supporting plain HTTP traversal.

Preparation

Prior to configuring NAT traversal, please ensure the following preparatory steps are completed:

  • Verify that the Nezha Monitoring Agent is installed and actively running on your device and maintains a stable connection with the Dashboard.
  • Acquire a public domain name, ideally using a subdomain configuration, such as service-1.example.com. Point this domain name to the public IP address of your Dashboard server.
  • It is important to note that each domain name can only map to the service of one Agent. For mapping services from multiple Agents, distinct domain names should be used, such as service-2.example.com.

WARNING

If your Dashboard server uses tools like the aaPanel or similar management platforms, ensure that your domain (e.g., service-1.example.com) is correctly linked to the Dashboard site within these tools to avoid access issues.

NAT Traversal Configuration Steps

  1. Log into the Dashboard Admin Panel and navigate to the "NAT Traversal" section in the menu.
  2. Click the "Add" button and provide the following required details:
    • Name: Assign a custom name to this traversal setup, for example, OpenWrt Login Page.
    • Agent ID: Input the ID of the Agent for which traversal is needed.
    • Local service: Specify the internal service address that requires traversal, in the IP:port format, such as 127.0.0.1:80.
    • Bind hostname: Enter the previously configured public domain name, such as service-1.example.com. If a non-standard port is used by Dashboard (e.g. default 8008), be sure to include it as well.
  3. After filling in the details, click the "Add" button and wait for the traversal setup to activate.
  4. Test the configuration by accessing http://service-1.example.com to ensure the internal service on the Agent is successfully accessible.

Usage Notes

  • Continuous connectivity between the Agent and the Dashboard is crucial for the NAT traversal functionality to operate correctly. If the connection to the Agent is lost, the traversal setup will temporarily cease to function.
  • Given that the NAT traversal does not encrypt traffic by itself, it is recommended to secure data transmissions by employing TLS/SSL between the Agent and the Dashboard, as well as between the Dashboard and the client browser, to ensure data security during transmission.
',10),r=[n];function s(l,c,d,u,h,p){return a(),t("div",null,r)}const f=e(i,[["render",s]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_nat.md.Bm1a6Dwz.lean.js b/assets/en_US_guide_nat.md.Bm1a6Dwz.lean.js deleted file mode 100644 index 0ec1d552..00000000 --- a/assets/en_US_guide_nat.md.Bm1a6Dwz.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"NAT Traversal Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/nat.md","filePath":"en_US/guide/nat.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/nat.md"},n=o("",10),r=[n];function s(l,c,d,u,h,p){return a(),t("div",null,r)}const f=e(i,[["render",s]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_notifications.md.CazaFiKA.js b/assets/en_US_guide_notifications.md.CazaFiKA.js deleted file mode 100644 index 1e720325..00000000 --- a/assets/en_US_guide_notifications.md.CazaFiKA.js +++ /dev/null @@ -1,47 +0,0 @@ -import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const E=JSON.parse('{"title":"Notification Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1732521523000}'),e={name:"en_US/guide/notifications.md"},n=a(`

Notification Configuration

Nezha Monitoring supports monitoring server load, CPU, memory, disk, traffic, monthly traffic, process count, and connection count, and sending notifications when user-defined thresholds are reached.

Flexible Notification Methods

  • In Dashboard messages, the placeholder #DATETIME# represents the timestamp of the event. When the notification is triggered, the Dashboard automatically replaces #DATETIME# with the actual event time.
  • #NEZHA# is a placeholder for Dashboard messages, and the Dashboard automatically replaces the placeholder with the actual message when the notification is triggered.
  • The body content is in JSON format: When the request type is FORM, the value is in key:value form, and placeholders can be placed inside value. The placeholders will be automatically replaced during notification. When the request type is JSON, only simple string replacement is performed before being submitted to the URL.
  • Placeholders can also be placed inside the URL, and simple string replacement will be performed during the request.

Refer to the following notification method examples, and you can also flexibly set the push method according to your needs.

Bark Example

Click to expand/collapse
  • Name: Bark

  • URL structure: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • Request Method: GET

  • Request Type: Default

  • Body: Empty

  • Name: Bark

  • URL structure: /push

  • Request Method: POST

  • Request Type: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Prepare your Slack Workspace in advance and create an App for this Workspace. If you have not created one, you can create an App at Slack API.

After creating the App, you need to add an Incoming Webhook to the App. In the App's settings page, find Incoming Webhooks, enable Activate Incoming Webhooks, and at the bottom of the page, find and click Add New Webhook to Workspace, choose a Channel, and click Allow. After creating, you will get a Webhook URL, which you will use to replace the example URL below.

Telegram Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in Telegram and get the bot's token and your Telegram user ID.

The token and user ID are alphanumeric strings. You can get your user ID by chatting with @userinfobot on Telegram. Create a bot by chatting with @BotFather, and you will get the bot's token.

Replace botXXXXXX with your bot token and YYYYYY with your user ID in the URL below. Note that you need to chat with the bot first, otherwise the bot cannot send messages to you.

Email Notification Example - Outlook Contributor: @白歌

Click to expand/collapse

Note: SendCloud has a daily free email sending limit. This is just an example. You can choose a paid service or other similar free services. The usage method is similar.

URL Parameter Acquisition Instructions

This example uses SendCloud as the email service. You need to register an account on SendCloud, create a sender email, and then obtain the APIUSER and APIKEY here.

Replace <replaceAPIUSER> and <replaceAPIKEY> in the example URL below with your APIUSER and APIKEY, and replace <customSenderEmail> and <customRecipientEmail> with any sender and recipient email addresses.

  • 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": {
    -      "contentType": "Text",
    -      "content": "#NEZHA#"
    -      },
    -      "toRecipients": [
    -        {
    -          "emailAddress": {
    -              "address": "ADDRESS FOR RECEVING EMAILS"
    -              }
    -        }
    -      ]
    -  }
    -}

DingTalk Group Bot Configuration Example

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in DingTalk in advance and get the bot's token.

The bot URL is obtained after creating a bot in the DingTalk group - Manage Bot - Create Bot. Choose custom keywords for the security method, and the Body content value must contain these keywords.

WeChat Work Group Bot Example Contributor: @ChowRex

Click to expand/collapse

Supported placeholders list

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",  # invalid
-    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # invalid
-}

This document is NOT available in English.

Group Bot Configuration Instructions - Document - WeChat Work Developer Center

  • Name: WeChat Work Group Bot
  • URL: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • Request Method: POST
  • Request Type: JSON
  • Body:
    json
    {
    -    "msgtype": "markdown",
    -    "markdown": {
    -        "content": "# Nezha Notification\\n\\n\\"#NEZHA#\\"\\n\\n> Name: \\"#SERVER.NAME#\\"\\n> IP: \\"#SERVER.IP#\\"\\n> IPv4: \\"#SERVER.IPV4#\\"\\nIPv6: \\"#SERVER.IPV6#\\"\\n> CPU: \\"#SERVER.CPU#\\"\\n> Memory: \\"#SERVER.MEM#\\"\\n> Swap: \\"#SERVER.SWAP#\\"\\n> Disk: \\"#SERVER.DISK#\\"\\n> Upload Speed: \\"#SERVER.NETINSPEED#\\"\\n> Download Speed: \\"#SERVER.NETOUTSPEED#\\"\\n> Total Upload: \\"#SERVER.TRANSFERIN#\\"\\n> Total Download: \\"#SERVER.TRANSFEROUT#\\"\\n> Load1: \\"#SERVER.LOAD1#\\"\\n> Load5: \\"#SERVER.LOAD5#\\"\\n> Load15: \\"#SERVER.LOAD15#\\"\\n> TCP Connection Count: \\"#SERVER.TCPCONNCOUNT\\"\\n> UDP Connection Count: \\"#SERVER.UDPCONNCOUNT\\"\\n\\n"
    -    }
    -}

You can remove or add relevant information as needed.

Matrix Notification Example

Click to expand/collapse

Parameter Explanation

  • All variables starting with $ need to be replaced with your actual values.
    • YOUR_HOME_SERVER: The address of your Matrix server.
    • YOUR_NEZHA_URL: The URL of your Nezha dashboard.
    • YOUR_MATRIX_USERNAME and YOUR_MATRIX_PASSWD: Your Matrix username and password.
    • YOUR_MATRIX_TOKEN retrieval method:
      sh
      curl -XPOST -d '{"type": "m.login.password", "identifier": {"user": "$YOUR_MATRIX_USERNAME", "type": "m.id.user"}, "password": "$YOUR_MATRIX_PASSWD"}' "https://$YOUR_HOME_SERVER/_matrix/client/r0/login"

Request Configuration

  • Name: Matrix
  • URL: https://$YOUR_HOME_SERVER/_matrix/client/r0/rooms/$ROOM_ID/send/m.room.message
  • Request Method: POST
  • Request Type: JSON
  • Header:
    json
    {
    -  "Authorization": "Bearer $YOUR_MATRIX_TOKEN"
    -}
  • Body:
    json
    {
    -  "msgtype": "m.text",
    -  "format": "org.matrix.custom.html",
    -  "formatted_body": "<html><head><title>Nezha Dashboard</title></head><body><h1><a href=\\"$YOUR_NEZHA_URL\\" target=\\"_blank\\">Nezha Dashboard</a></h1><ul><li>datetime: #DATETIME#</li><li>Message: #NEZHA#</li></ul></body></html>",
    -  "body": "#NEZHA#"
    -}

Usage Steps

  1. Replace Variables: Replace $YOUR_HOME_SERVER, $YOUR_NEZHA_URL, $YOUR_MATRIX_USERNAME, $YOUR_MATRIX_PASSWD, and $YOUR_MATRIX_TOKEN with your own values.
  2. Retrieve Token: Use the curl command provided above to get YOUR_MATRIX_TOKEN, making sure to replace all relevant variables.
  3. Configure Request: Set up your request using the configuration provided above, ensuring the correct URL, headers, and body are used.
  4. Send Notification: Send the Matrix message using the configured request to integrate Nezha monitoring notifications into your Matrix room.

Once configured, you will receive formatted Nezha dashboard information in your Matrix room whenever a notification is triggered.

Notification Rule Explanation

Basic Rules

  • type: You can choose one or more types. If multiple types are selected in one rule, all selected types must be satisfied to trigger a notification (refer to the examples below)
    • cpu, gpu, memory, swap, disk
    • net_in_speed inbound network speed, net_out_speed outbound network speed, net_all_speed total network speed, transfer_in inbound traffic, transfer_out outbound traffic, transfer_all total traffic
    • offline offline monitoring
    • load1, load5, load15 load
    • process_count process count (currently resource-intensive due to thread count, not supported temporarily)
    • tcp_conn_count, udp_conn_count connection count
    • temperature_max maximum temperature
  • duration: Duration in seconds. An notification is triggered if 30% or more of the samples exceed the threshold within this duration (to prevent data spikes).
  • min or max:
    • For traffic and network speed, the unit is bytes (1KB = 1024B, 1MB = 1024 * 1024B)
    • For memory, disk, and CPU, the unit is percentage
    • No need to set this for offline monitoring
  • cover:
    • 0 monitors all servers, use ignore to exclude specific servers
    • 1 ignores all servers, use ignore to monitor specific servers
      Example: [{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore: Select specific servers to exclude, used with cover, content is server ID and boolean value, e.g., {"1": true, "2": false}

Complete Examples:

Add an offline notification:

  • Name: Offline Notification
  • Rule: [{"Type":"offline","Duration":10}]
  • Enabled: √

Add an notification for CPU usage exceeding 50% for 10 seconds and memory usage below 20% for 20 seconds:

  • Name: CPU+Memory
  • Rule: [{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • Enabled: √

Send notifications for specific servers to specific notification groups:

Scenario example:
There are 4 servers (1, 2, 3, 4) and two notification groups (A, B).
Notify group A if servers 1 and 2 are offline for 10 minutes.
Notify group B if servers 3 and 4 are offline for 10 minutes.

First, set up notification groups A and B, then add two notification rules:

Rule 1:

  • Name: 1, 2 Offline, Send to Notification Group A
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • Notification Group: A
  • Enabled: √

Rule 2:

  • Name: 3, 4 Offline, Send to Notification Group B
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • Notification Group: B
  • Enabled: √

Flexibly using parameters can make your notification function fully utilized

Special: Any Cycle Traffic notification

Can be used for monthly traffic monitoring

  • type:
    • transfer_in_cycle inbound traffic during the cycle
    • transfer_out_cycle outbound traffic during the cycle
    • transfer_all_cycle total traffic during the cycle
  • cycle_start: The start date of the statistical cycle (can be the start date of your server billing cycle). The time format is RFC3339, e.g., Beijing time is 2022-01-11T08:00:00.00+08:00
  • cycle_interval: The number of statistical cycle units (e.g., if the cycle unit is days, and this value is 7, it means statistics are collected every 7 days)
  • cycle_unit: Statistical cycle unit, default is hour, optional (hour, day, week, month, year)
  • min/max, cover, ignore refer to basic rule configuration

Example:

For servers with IDs 3 and 4 (defined in ignore), if the monthly outbound traffic exceeds 1TB starting from the 1st of each month, send an notification:

json
[{"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}}]

TIP

If you still have trouble editing rules, you can try the rule generators below to simplify the process. Note that Nezha Monitoring does not guarantee the functionality of these generated rules.

Notification Trigger Modes

  • Always Trigger: A notification is triggered every time the Agent reports a status that matches the notification rule.
  • Single Trigger: A notification is triggered only once when the status changes, such as from normal to abnormal or from abnormal to normal.

Set Tasks to Execute on notifications

If you need to execute a task while sending an notification message, you can set this item.

  • Task on Notification: The task to be executed when the notification status changes from "normal" to "event". The task should be set in the tasks page in advance.
  • Task on Recovery: The task to be executed when the notification status changes from "event" to "normal". The task should be set in the tasks page in advance.
`,47),o=[n];function l(h,r,p,k,d,u){return t(),s("div",null,o)}const g=i(e,[["render",l]]);export{E as __pageData,g as default}; diff --git a/assets/en_US_guide_notifications.md.CazaFiKA.lean.js b/assets/en_US_guide_notifications.md.CazaFiKA.lean.js deleted file mode 100644 index 1dd038af..00000000 --- a/assets/en_US_guide_notifications.md.CazaFiKA.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const E=JSON.parse('{"title":"Notification Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1732521523000}'),e={name:"en_US/guide/notifications.md"},n=a("",47),o=[n];function l(h,r,p,k,d,u){return t(),s("div",null,o)}const g=i(e,[["render",l]]);export{E as __pageData,g as default}; diff --git a/assets/en_US_guide_q10.md.osfoQDQi.js b/assets/en_US_guide_q10.md.osfoQDQi.js deleted file mode 100644 index 49e52c79..00000000 --- a/assets/en_US_guide_q10.md.osfoQDQi.js +++ /dev/null @@ -1,15 +0,0 @@ -import{_ as i,c as s,o as a,a4 as e}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"Configuring OIDC Authentication","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q10.md","filePath":"en_US/guide/q10.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/q10.md"},t=e(`

Configuring OIDC Authentication

Modify the contents of config.yaml to configure OIDC (OpenID Connect) authentication. OIDC is an authentication layer on top of the OAuth 2.0 protocol, which allows applications to verify the identity of users based on the authentication performed by an Authorization Server. This method is widely used to implement single sign-on for modern applications.

Configuration Details

Here is a step-by-step guide to configuring the OIDC settings in your config.yaml:

yaml
oauth2:
-  type: oidc  # (Required) Specifies the authentication type as OIDC
-  oidcDisplayName: OIDC  # (Optional, default: OIDC) The name displayed on the login page
-  admin: ""  # (Fill at least one of admin or adminGroups; default: empty) Admin usernames, separated by commas. Users listed here are considered administrators
-  adminGroups: ""  # (Fill at least one of admin or adminGroups; default: empty) Admin groups, separated by commas. Users in these groups are considered administrators. Omit if group management is not used
-  clientid: # (Required) OIDC client ID
-  clientsecret: # (Required) OIDC client secret
-  oidcIssuer: https://auth.example.com/realms/master  # (Required) The issuer URL of the OIDC provider, obtainable from your OIDC provider
-  # oidcLogoutUrl: https://auth.example.com/realms/master/protocol/openid-connect/logout  # (Currently unusable due to a bug)
-  # oidcRegisterUrl: # (Optional) Registration link provided by the OIDC provider
-  oidcScopes: openid,profile,email  # (Optional, default: openid,profile,email) OIDC scopes requested, separated by commas
-  oidcLoginClaim: sub  # (Optional, default: sub) The username field returned by OIDC, can be preferred_username, sub, or email
-  oidcGroupsClaim: groups  # (Required if using adminGroups, default: groups) The user group information field returned by OIDC, can be groups or roles
-  oidcAutoCreate: false  # (Optional, default: false) Whether to automatically create a user if they do not exist
-  oidcAutoLogin: false  # (Optional, default: false) Whether to automatically redirect to the OIDC login page when the path is /login
`,5),l=[t];function h(p,o,r,d,k,c){return a(),s("div",null,l)}const y=i(n,[["render",h]]);export{u as __pageData,y as default}; diff --git a/assets/en_US_guide_q10.md.osfoQDQi.lean.js b/assets/en_US_guide_q10.md.osfoQDQi.lean.js deleted file mode 100644 index b92f6a60..00000000 --- a/assets/en_US_guide_q10.md.osfoQDQi.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as s,o as a,a4 as e}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"Configuring OIDC Authentication","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q10.md","filePath":"en_US/guide/q10.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/q10.md"},t=e("",5),l=[t];function h(p,o,r,d,k,c){return a(),s("div",null,l)}const y=i(n,[["render",h]]);export{u as __pageData,y as default}; diff --git a/assets/en_US_guide_q11.md.Cx085Fxo.js b/assets/en_US_guide_q11.md.Cx085Fxo.js deleted file mode 100644 index c5566dca..00000000 --- a/assets/en_US_guide_q11.md.Cx085Fxo.js +++ /dev/null @@ -1,28 +0,0 @@ -import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"Customize GeoIP database","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q11.md","filePath":"en_US/guide/q11.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/q11.md"},e=t(`

Customize GeoIP database

Dashboard v0.18.3+ uses an embedded GeoIP database to query IP locations. An IPinfo format mmdb database is required to be placed at pkg/geoip/geoip.db to compile the Dashboard with working GeoIP queries.

An IPinfo format mmdb is constructed by those fields:

  • An IP subnet as an entry
  • continent:Continent code
  • continent_name:Continent name
  • country:Country code
  • country_name:Country name

Dashboard only requires the country field, and other fields can be left empty.

Editing database

It is recommended to use mmdbwriter and maxminddb-golang libraries for editing mmdb databases as of now.

If your goal is to correct geographic information, it is recommended to modify directly based on the original IPinfo database. For similar operations, you can refer to the sing-geoip project.

Using the correction of IPinfo data as an example, you need to use the ReplaceWith inserter (which is the default value) and write the mmdbtype.Map information:

go
subnet := &net.IPNet{
-    IP:   net.ParseIP("114.5.1.4")
-    Mask: net.CIDRMask(32, 32)
-}
-countryMap := make(map[mmdbtype.String]mmdbtype.String)
-
-countryMap[mmdbtype.String("country")] = mmdbtype.String("JP")
-
-if err := writer.Insert(subnet, mmdbtype.Map(countryMap)); err != nil {
-	return err
-}

A writer is an instance of *mmdbwriter.Tree and needs to be created using the mmdbwriter.New method. The specific operations and the process of inserting other fields are not mentioned here.

After writing the database information to a file, you can use the mmdbinspect CLI tool to test the database information. For example:

shell
$ mmdbinspect -db ./country.mmdb 114.5.1.4
-[
-    {
-        "Database": "./country.mmdb",
-        "Records": [
-            {
-                "Network": "114.5.1.4/32",
-                "Record": {
-                    "continent": "AS",
-                    "continent_name": "Asia",
-                    "country": "JP",
-                    "country_name": "Japan"
-                }
-            }
-        ],
-        "Lookup": "114.5.1.4"
-    }
-]

Once the format and information are confirmed to be correct, the database can be used for compiling the Dashboard. Afterwards, you can test if the query API is working correctly using grpcurl or similar tools:

shell
grpcurl -proto ./nezha/proto/nezha.proto -plaintext -H 'client_secret: test' -d '{"ip": "114.5.1.4"}' 127.0.0.1:5555 proto.NezhaService/LookupGeoIP
`,15),h=[e];function p(l,k,d,r,o,E){return a(),i("div",null,h)}const y=s(n,[["render",p]]);export{c as __pageData,y as default}; diff --git a/assets/en_US_guide_q11.md.Cx085Fxo.lean.js b/assets/en_US_guide_q11.md.Cx085Fxo.lean.js deleted file mode 100644 index 322373ec..00000000 --- a/assets/en_US_guide_q11.md.Cx085Fxo.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"Customize GeoIP database","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q11.md","filePath":"en_US/guide/q11.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/q11.md"},e=t("",15),h=[e];function p(l,k,d,r,o,E){return a(),i("div",null,h)}const y=s(n,[["render",p]]);export{c as __pageData,y as default}; diff --git a/assets/en_US_guide_q2.md.BdYRs_s9.js b/assets/en_US_guide_q2.md.BdYRs_s9.js deleted file mode 100644 index b429d1ff..00000000 --- a/assets/en_US_guide_q2.md.BdYRs_s9.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Agent Startup/Online Troubleshooting Process","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1732521523000}'),r={name:"en_US/guide/q2.md"},a=n('

Agent Startup/Online Troubleshooting Process

  1. Directly execute /opt/nezha/agent/nezha-agent -s DashboardIP or non-CDN domain:RPCPort -p AgentKey -d to check if the logs indicate timeouts due to DNS or poor network conditions.
  2. Use nc -v Domain/IP RPCPort or telnet Domain/IP RPCPort to check for network issues, inspect the inbound and outbound firewalls of the local machine and the panel server. If you cannot determine the issue, you can use the port checking tool provided by https://port.ping.pe/.
  3. If the above steps indicate no issues but the Agent still does not go online correctly, try disabling SELinux. How to disable SELinux?
',2),s=[a];function i(c,l,d,h,p,u){return o(),t("div",null,s)}const f=e(r,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_q2.md.BdYRs_s9.lean.js b/assets/en_US_guide_q2.md.BdYRs_s9.lean.js deleted file mode 100644 index 7bce3d61..00000000 --- a/assets/en_US_guide_q2.md.BdYRs_s9.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Agent Startup/Online Troubleshooting Process","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1732521523000}'),r={name:"en_US/guide/q2.md"},a=n("",2),s=[a];function i(c,l,d,h,p,u){return o(),t("div",null,s)}const f=e(r,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_q3.md.CdXGDmJL.js b/assets/en_US_guide_q3.md.CdXGDmJL.js deleted file mode 100644 index e2545047..00000000 --- a/assets/en_US_guide_q3.md.CdXGDmJL.js +++ /dev/null @@ -1,74 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const E=JSON.parse('{"title":"Reverse Proxy gRPC Port (Supports Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1732521523000}'),t={name:"en_US/guide/q3.md"},l=n(`

Reverse Proxy gRPC Port (Supports Cloudflare CDN)

Using Nginx or Caddy to reverse proxy gRPC

  • Nginx Configuration
nginx
server {
-    listen 443 ssl http2;
-    listen [::]:443 ssl http2;
-    server_name data.example.com; # Your domain that the Agent uses to connect to the Dashboard
-
-    ssl_certificate          /data/letsencrypt/fullchain.pem; # Path to your domain certificate
-    ssl_certificate_key      /data/letsencrypt/key.pem;       # Path to your domain private key
-    ssl_stapling on;
-    ssl_session_timeout 1d;
-    ssl_session_cache shared:SSL:10m; # This might conflict with other configuration files; comment it out if there are conflicts
-    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
-
-    underscores_in_headers on;
-
-    keepalive_time 24h;
-    keepalive_requests 100000;
-    keepalive_timeout 120s;
-
-    location / {
-        grpc_read_timeout 300s;
-        grpc_send_timeout 300s;
-        grpc_socket_keepalive on;
-        grpc_pass grpc://grpcservers;
-    }
-}
-
-upstream grpcservers {
-    server localhost:5555;
-    keepalive 512;
-}
  • Caddy Configuration
data.example.com:443 { # Your domain that the Agent uses to connect to the Dashboard
-    reverse_proxy {
-        to localhost:5555
-        transport http {
-            versions h2c 2
-        }
-    }
-}

Dashboard Configuration

  • First, log in to the Dashboard and go to the settings page. In the Non-CDN Dashboard server domain/IP field, enter the domain configured in Nginx or Caddy in the previous step, for example, data.example.com, and save it.
  • Then, on the Dashboard server, open the /opt/nezha/dashboard/data/config.yaml file. Modify proxygrpcport to the port that Nginx or Caddy is listening to, for example, 443. Since we enabled SSL/TLS in Nginx or Caddy, set tls to true. After making these changes, restart the Dashboard.

Agent Configuration

  • Log in to the Dashboard management backend, copy the one-click installation command, and execute it on the corresponding server to reinstall the agent.

Enabling Cloudflare CDN (Optional)

According to Cloudflare gRPC requirements: gRPC services must listen on port 443 and must support TLS and HTTP/2. So, to enable CDN, you must use port 443 when configuring Nginx or Caddy to reverse proxy gRPC and configure the certificate (Caddy will automatically apply and configure the certificate).

  • Log in to Cloudflare, select the domain you are using. Go to the Network tab and turn on the gRPC switch. Then, go to the DNS tab, find the DNS record for the domain configured in Nginx or Caddy to reverse proxy gRPC, and enable the CDN by clicking the orange cloud.

After enabling gRPC, it might not be available immediately, and you may need to wait for a while. You can use curl and nezha-agent -d to verify:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
-* processing: https://xxx.xxx.ovh
-*   Trying [2606:4700:3035::ac43:8bed]:443...
-* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
-# ... SSL info
-* using HTTP/2
-* h2 [:method: GET]
-* h2 [:scheme: https]
-* h2 [:authority: xxx.xxx.ovh]
-* h2 [:path: /]
-* h2 [user-agent: curl/8.2.1]
-* h2 [accept: */*]
-* Using Stream ID: 1
-> GET / HTTP/2
-> Host: xxx.xxx.ovh
-> User-Agent: curl/8.4.0
-> Accept: */*
-> content-type: application/grpc+proto
-> authorization: Bearer test
-> 
-< HTTP/2 405 
-< date: Wed, 20 Dec 2023 08:56:27 GMT
-< content-type: application/grpc+proto
-< cf-ray: 8386ac12dabd5ddc-HKG
-< cf-cache-status: DYNAMIC
-< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
-< grpc-status: 13
-< report-to: {"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
-< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
-< vary: Accept-Encoding
-< server: cloudflare
-< alt-svc: h3=":443"; ma=86400
-< 
-* Connection #0 to host xxx.xxx.ovh left intact
-localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
-NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
-NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # You need to modify the GRPCHost and TLS options in the Dashboard /opt/nezha/dashboard/data/config.yaml
-NEZHA@2023-12-20 05:14:01>> Error to close connection ...
`,15),p=[l];function e(h,k,r,d,o,g){return a(),i("div",null,p)}const y=s(t,[["render",e]]);export{E as __pageData,y as default}; diff --git a/assets/en_US_guide_q3.md.CdXGDmJL.lean.js b/assets/en_US_guide_q3.md.CdXGDmJL.lean.js deleted file mode 100644 index b8a562e5..00000000 --- a/assets/en_US_guide_q3.md.CdXGDmJL.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const E=JSON.parse('{"title":"Reverse Proxy gRPC Port (Supports Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1732521523000}'),t={name:"en_US/guide/q3.md"},l=n("",15),p=[l];function e(h,k,r,d,o,g){return a(),i("div",null,p)}const y=s(t,[["render",e]]);export{E as __pageData,y as default}; diff --git a/assets/en_US_guide_q4.md.BJkNqCql.js b/assets/en_US_guide_q4.md.BJkNqCql.js deleted file mode 100644 index 717e3ddf..00000000 --- a/assets/en_US_guide_q4.md.BJkNqCql.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o,j as e,a as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Real-Time Channel Disconnection","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1732521523000}'),r={name:"en_US/guide/q4.md"},i=e("h1",{id:"real-time-channel-disconnection",tabindex:"-1"},[n("Real-Time Channel Disconnection "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection","aria-label":'Permalink to "Real-Time Channel Disconnection"'},"​")],-1),s=e("ul",null,[e("li",null,"If you are using a CDN, ensure that the CDN provider offers WebSocket services and that WebSocket is enabled."),e("li",null,[n("Confirm that your reverse proxy rules have special configurations 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 view the reverse proxy configuration.")])],-1),c=[i,s];function l(d,h,u,_,f,m){return o(),t("div",null,c)}const v=a(r,[["render",l]]);export{g as __pageData,v as default}; diff --git a/assets/en_US_guide_q4.md.BJkNqCql.lean.js b/assets/en_US_guide_q4.md.BJkNqCql.lean.js deleted file mode 100644 index 717e3ddf..00000000 --- a/assets/en_US_guide_q4.md.BJkNqCql.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o,j as e,a as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Real-Time Channel Disconnection","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1732521523000}'),r={name:"en_US/guide/q4.md"},i=e("h1",{id:"real-time-channel-disconnection",tabindex:"-1"},[n("Real-Time Channel Disconnection "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection","aria-label":'Permalink to "Real-Time Channel Disconnection"'},"​")],-1),s=e("ul",null,[e("li",null,"If you are using a CDN, ensure that the CDN provider offers WebSocket services and that WebSocket is enabled."),e("li",null,[n("Confirm that your reverse proxy rules have special configurations 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 view the reverse proxy configuration.")])],-1),c=[i,s];function l(d,h,u,_,f,m){return o(),t("div",null,c)}const v=a(r,[["render",l]]);export{g as __pageData,v as default}; diff --git a/assets/en_US_guide_q5.md.dmeXbXkT.js b/assets/en_US_guide_q5.md.dmeXbXkT.js deleted file mode 100644 index 2293e045..00000000 --- a/assets/en_US_guide_q5.md.dmeXbXkT.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"How to Perform Data Migration and Backup Recovery?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1732521523000}'),r={name:"en_US/guide/q5.md"},n=t('

How to Perform Data Migration and Backup Recovery?

  1. Run the one-click script and choose Stop Dashboard.
  2. On the old server, package the /opt/nezha folder, copy it to the same location in the new environment, and extract it.
  3. In the new server, run the one-click script and choose Start Dashboard.
',2),c=[n];function i(d,s,_,l,h,p){return a(),o("div",null,c)}const f=e(r,[["render",i]]);export{u as __pageData,f as default}; diff --git a/assets/en_US_guide_q5.md.dmeXbXkT.lean.js b/assets/en_US_guide_q5.md.dmeXbXkT.lean.js deleted file mode 100644 index 21c625dc..00000000 --- a/assets/en_US_guide_q5.md.dmeXbXkT.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"How to Perform Data Migration and Backup Recovery?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1732521523000}'),r={name:"en_US/guide/q5.md"},n=t("",2),c=[n];function i(d,s,_,l,h,p){return a(),o("div",null,c)}const f=e(r,[["render",i]]);export{u as __pageData,f as default}; diff --git a/assets/en_US_guide_q6.md.B38wvOHW.js b/assets/en_US_guide_q6.md.B38wvOHW.js deleted file mode 100644 index 48d5183f..00000000 --- a/assets/en_US_guide_q6.md.B38wvOHW.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"How to Reset Traffic Statistics Monthly?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1732521523000}'),a={name:"en_US/guide/q6.md"},s=i('

How to Reset Traffic Statistics Monthly?

The traffic statistics on the homepage reset every time the server restarts. To achieve a monthly reset of the traffic counter, you can do the following:

  1. Go to the Notification page in the management panel.
  2. Refer to this document to create a monthly traffic notification.
  3. Return to the homepage and go to the Services page, where you can see the monthly traffic statistics. The statistics here will not reset when the server restarts.

TIP

This method allows you to set any period, including but not limited to hourly, daily, weekly, monthly, or yearly traffic statistics reset, offering great flexibility!

',4),c=[s];function r(n,l,h,f,d,_){return o(),e("div",null,c)}const u=t(a,[["render",r]]);export{p as __pageData,u as default}; diff --git a/assets/en_US_guide_q6.md.B38wvOHW.lean.js b/assets/en_US_guide_q6.md.B38wvOHW.lean.js deleted file mode 100644 index 174e071b..00000000 --- a/assets/en_US_guide_q6.md.B38wvOHW.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"How to Reset Traffic Statistics Monthly?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1732521523000}'),a={name:"en_US/guide/q6.md"},s=i("",4),c=[s];function r(n,l,h,f,d,_){return o(),e("div",null,c)}const u=t(a,[["render",r]]);export{p as __pageData,u as default}; diff --git a/assets/en_US_guide_q7.md.BiLpPPiv.js b/assets/en_US_guide_q7.md.BiLpPPiv.js deleted file mode 100644 index bb41cb90..00000000 --- a/assets/en_US_guide_q7.md.BiLpPPiv.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as i,a4 as a}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Customizing Agent Monitoring Items","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1732521523000}'),o={name:"en_US/guide/q7.md"},n=a('

Customizing Agent Monitoring Items

Customize Monitoring for Network Interfaces and Disk Partitions

Execute the following command to select network interfaces and partitions, then restart the Agent for changes to take effect:

bash
/opt/nezha/agent/nezha-agent edit

Additional Runtime Parameters

Viewing Supported Parameters

To view the supported runtime parameters, please execute the following command:

bash
./nezha-agent --help

Configuring Parameters

If you installed the Agent using a one-click script, you can add or modify parameters by editing the system service configuration. Edit the file /etc/systemd/system/nezha-agent.service and append your desired parameters at the end of the ExecStart= line:

  • --report-delay: Sets the interval for reporting system information. The default is 1 second. To reduce system resource usage, you can set this to 3 (valid range: 1-4 seconds).
  • --skip-conn: Disables monitoring of network connections. Recommended for servers with high numbers of connections or high CPU usage.
  • --skip-procs: Disables monitoring of process counts, helping to reduce resource usage of the Agent.
  • --disable-auto-update: Disables the automatic update feature of the Agent, enhancing security.
  • --disable-force-update: Disables the forced update feature of the Agent, enhancing security.
  • --disable-command-execute: Prevents execution of any scheduled tasks or use of the WebSSH on the Agent, enhancing security.
  • --tls: Enables SSL/TLS encryption. This should be enabled when you are using nginx to reverse proxy the Agent's gRPC connections and nginx is configured with SSL/TLS.
  • --use-ipv6-countrycode: Forces the use of IPv6 addresses to query country codes. By default, the Agent uses IPv4 addresses to query country codes. If server supports IPv6 and the country code of the IPv4 address is different, can use this parameter.
  • --gpu: Enables GPU monitoring. Note: Monitoring GPU usage may require installation of additional dependencies. For more details, refer to the documentation: Enable GPU Monitoring.
  • --temperature: Enables hardware temperature monitoring. Only effective on supported hardware, some VPS may not be able to retrieve temperature information.
  • -d --debug: Enables debug mode.
  • -u --ip-report-period: Set IP update interval. Is only effective when the set value is higher than --report-delay. The default is 1800 seconds.
  • -k --insecure: Disable TLS certificate integrity check. Useful in situations involving a self-signed certificate.
',11),s=[n];function r(d,c,l,u,h,p){return i(),t("div",null,s)}const f=e(o,[["render",r]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_q7.md.BiLpPPiv.lean.js b/assets/en_US_guide_q7.md.BiLpPPiv.lean.js deleted file mode 100644 index 7a2dc288..00000000 --- a/assets/en_US_guide_q7.md.BiLpPPiv.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as i,a4 as a}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Customizing Agent Monitoring Items","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1732521523000}'),o={name:"en_US/guide/q7.md"},n=a("",11),s=[n];function r(d,c,l,u,h,p){return i(),t("div",null,s)}const f=e(o,[["render",r]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_q8.md.BbSzgA8n.js b/assets/en_US_guide_q8.md.BbSzgA8n.js deleted file mode 100644 index 1204d1fe..00000000 --- a/assets/en_US_guide_q8.md.BbSzgA8n.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as e,c as i,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Cloudflare Access OAuth2 Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1732521523000}'),a={name:"en_US/guide/q8.md"},c=o(`

Cloudflare Access OAuth2 Configuration

If you encounter issues logging in as an administrator using Github, Gitlab, or Gitee, you may consider switching to Cloudflare Access as the OAuth2 provider.

Example Configuration:

yaml
Oauth2:
-  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
-  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
-  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
-  Endpoint: "https://xxxxx.cloudflareaccess.com"
-  Type: cloudflare

Configuration Description:

ParameterRetrieval Method
AdminMy Team -> Users -> <specific user> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> Only keep the protocol and domain, no path

Setting Up a New SaaS-OIDC Application

Navigate to the Zero Trust Dashboard: https://one.dash.cloudflare.com/. Choose or create a new account, then follow these steps:

  1. Go to My Team -> Users -> Click <specific user> -> Obtain and save the User ID. (If this is your first time using Zero Trust, the Users list will be empty, and you can skip this step; users will appear after completing a verification.)
  2. Navigate to Access -> Applications -> Add an Application.
  3. Select SaaS. In the Application field, enter a custom application name (e.g., nezha), select OIDC, and then click Add application.
  4. For Scopes, select openid, email, profile, groups.
  5. In Redirect URLs, enter your Dashboard Callback URL, such as https://dashboard.example.com/oauth2/callback.
  6. Record the Client ID, Client Secret, and the protocol and domain part of the Issuer address, for example, https://xxxxx.cloudflareaccess.com.
  7. Edit the Dashboard configuration file (usually located at /opt/nezha/dashboard/data/config.yaml), adjust the OAuth2 settings according to the example configuration, and restart the Dashboard service.

Identity Verification Strategy Configuration

After setting up the Dashboard, you need to configure identity verification policies in the Zero Trust Dashboard. Navigate to: Access -> Applications -> <application name> -> Policies. You can choose from various SSO authentication methods, including email OTP and hardware key verification. For detailed configurations, refer to the Cloudflare Zero Trust Documentation.

Policy Configuration Example (One-time PIN)

Using email OTP as the default verification method:

  1. Navigate to Access -> Applications -> <application name> -> Policies -> Add a policy.
  2. Set a Policy Name, for example, OTP, and set Action to Allow.
  3. Under Configure rules, add a new Include rule. Select Emails as the Selector and enter your email address in the textbox.
  4. Click Save policy to save the configuration.

Testing the Policy

  1. If the configuration is correct, when you visit the Dashboard login interface, it will display as "Log in with Cloudflare Account." Clicking on login will redirect you to the Cloudflare Access login page.
  2. Enter the email address configured previously, click Send me a code, and then enter the code received to log in to the Dashboard.
  3. If User ID was not specified in Admin during previous steps, an error message will be displayed after login: "This user is not an administrator of this site and cannot log in." At this point, you need to go to My Team -> Users, find the corresponding user, click on the username to get the User ID, and enter it into the Admin section of the Dashboard configuration file. After restarting the Dashboard service, try logging in again.
`,16),n=[c];function d(s,l,r,h,p,u){return t(),i("div",null,n)}const m=e(a,[["render",d]]);export{f as __pageData,m as default}; diff --git a/assets/en_US_guide_q8.md.BbSzgA8n.lean.js b/assets/en_US_guide_q8.md.BbSzgA8n.lean.js deleted file mode 100644 index 2174e66e..00000000 --- a/assets/en_US_guide_q8.md.BbSzgA8n.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as i,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Cloudflare Access OAuth2 Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1732521523000}'),a={name:"en_US/guide/q8.md"},c=o("",16),n=[c];function d(s,l,r,h,p,u){return t(),i("div",null,n)}const m=e(a,[["render",d]]);export{f as __pageData,m as default}; diff --git a/assets/en_US_guide_q9.md.nn_5dMdf.js b/assets/en_US_guide_q9.md.nn_5dMdf.js deleted file mode 100644 index f4fc2805..00000000 --- a/assets/en_US_guide_q9.md.nn_5dMdf.js +++ /dev/null @@ -1,14 +0,0 @@ -import{_ as i,c as a,o as s,a4 as e}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"Enable GPU monitoring","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q9.md","filePath":"en_US/guide/q9.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/q9.md"},t=e(`

Enable GPU monitoring

GPU monitoring is a new feature implemented in Nezha Monitoring v0.17.x. Before using the feature, please ensure your Dashboard version is higher than v0.17.2 and Agent version is higher than v0.17.0.

Enable

From Command-Line Flag

Append the --gpu flag to the Agent argument. For example:

bash
/opt/nezha/agent/nezha-agent -s example.com:5555 -p example --gpu

From configuration file

Execute the following command to modify Agent configuration to enable GPU monitoring.

bash
/opt/nezha/agent/nezha-agent edit

In the interactive menu returned, choose to enable GPU monitoring.

Enable GPU utilization monitoring

GPU model and GPU utilization are two different monitor items, which uses different approaches to obtain their value.

Windows and macOS supports getting GPU utilization without extra dependencies, and support multiple graphics card brands.

Linux distros support only NVIDIA and AMD cards and need to install extra dependencies.

Below are the instructions on how to enable GPU utilization monitoring on Linux for NVIDIA / AMD graphics cards.

NVIDIA

NVIDIA cards need the nvidia-smi utility to get GPU utilization. This utility is included in the official driver by default.

If you use unofficial drivers like nouveau, then it's not possible to get GPU utilization.

AMD

AMD cards need to install the open source amdgpu driver and the rocm-smi utility.

Mainstream distros have already packaged rocm-smi, below are commands to install the utility on these distros:

bash
# Arch Linux
-pacman -Sy rocm-smi-lib
-
-# Debian / Ubuntu
-apt install rocm-smi
-
-# Fedora / RHEL 8+
-dnf install rocm-smi

If your distro doesn't have the package, then you will need to compile rocm_smi_lib manually.

Required dependencies:git cmake gcc

First, clone the git repository of rocm_smi_lib:

bash
git clone https://github.com/ROCm/rocm_smi_lib

Then compile the libraries and install them on your system.

bash
cd rocm_smi_lib
-mkdir -p build
-cd build
-cmake ..
-make -j $(nproc)
-# Install library file and header; default location is /opt/rocm
-make install
`,28),l=[t];function o(h,p,d,r,c,k){return s(),a("div",null,l)}const m=i(n,[["render",o]]);export{u as __pageData,m as default}; diff --git a/assets/en_US_guide_q9.md.nn_5dMdf.lean.js b/assets/en_US_guide_q9.md.nn_5dMdf.lean.js deleted file mode 100644 index 23f5b953..00000000 --- a/assets/en_US_guide_q9.md.nn_5dMdf.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as a,o as s,a4 as e}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"Enable GPU monitoring","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/q9.md","filePath":"en_US/guide/q9.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/q9.md"},t=e("",28),l=[t];function o(h,p,d,r,c,k){return s(),a("div",null,l)}const m=i(n,[["render",o]]);export{u as __pageData,m as default}; diff --git a/assets/en_US_guide_servers.md.B3oa4ymX.js b/assets/en_US_guide_servers.md.B3oa4ymX.js deleted file mode 100644 index 64cf1e0f..00000000 --- a/assets/en_US_guide_servers.md.B3oa4ymX.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Server Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/servers.md"},r=n('

Server Management

Introduction

The server section is responsible for managing Agents, forming the most fundamental part of Nezha monitoring and serving as the basis for other functionalities.

Adding a Server

The first step is to add a server, where you can customize the name, group, sorting, and notes.
Servers in the same group will be displayed together in supported themes. Notes will only be visible in the Admin Panel, so there's no need to worry about leaking information.

Installing the Agent

Please refer to the previous section on installing the Agent.
It is recommended to use the one-click installation. After configuring the parameters, click the corresponding system icon in the one-click installation column of the server to copy the installation command and execute it on the respective server.

Forced Update

Agent update-related parameters include --disable-auto-update and --disable-force-update as described in Custom Agent Monitoring Projects.
By default, the Agent will update automatically without intervention. However, if the user disables automatic updates, you can select specific servers for a forced update.
The forced update will not work if disable-force-update is enabled.

Data Columns

  • Version: Records the current version of the Agent.
  • Hide from Guests: When true, guests cannot see this server in the Dashboard.
  • Enable DDNS: When true, if the server IP changes, the Dashboard will automatically update the DNS records.
  • DDNS Domain: The DDNS domain configured for this server.
  • Secret: The secret/key used for configuring the Agent, which is used to verify communication between the Agent and the Dashboard.
  • Note: Server notes, visible only after verification.
  • Public Note: Server public notes, visible on the frontend. You can customize frontend theme based on this field; see Public Note Example for details.
  • Installation commands: Click the corresponding system button to copy the command and execute it on the server for an instant installation.
  • Management: Connects to WebShell, modifies server configuration, or deletes the server.

WebSSH Terminal

This is WebShell; the feature will not work if disable-command-execute is enabled.
It is available for both Linux and Windows and supports Ctrl+Shift+V for pasting.
If the connection fails, refer to Real-Time Channel Disconnection/Online Terminal Connection Failure.

FM

Added in Dashboard v0.19.1 / Agent v0.19.0. A pseudo file manager embedded in WebShell, supports file download/upload, directory navigation and copying current path. Access it by clicking the blue button in the bottom-right corner of the WebShell.

Public Note Example

ServerStatus Theme Agent Billing Information Display

Click to expand/collapse

See https://github.com/naiba/nezha/pull/425.

',18),o=[r];function l(s,d,h,c,u,m){return a(),t("div",null,o)}const b=e(i,[["render",l]]);export{f as __pageData,b as default}; diff --git a/assets/en_US_guide_servers.md.B3oa4ymX.lean.js b/assets/en_US_guide_servers.md.B3oa4ymX.lean.js deleted file mode 100644 index fd75e445..00000000 --- a/assets/en_US_guide_servers.md.B3oa4ymX.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Server Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1732521523000}'),i={name:"en_US/guide/servers.md"},r=n("",18),o=[r];function l(s,d,h,c,u,m){return a(),t("div",null,o)}const b=e(i,[["render",l]]);export{f as __pageData,b as default}; diff --git a/assets/en_US_guide_services.md.42ZV920I.js b/assets/en_US_guide_services.md.42ZV920I.js deleted file mode 100644 index 6c7be19c..00000000 --- a/assets/en_US_guide_services.md.42ZV920I.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Service Monitoring","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/services.md"},a=i('

Service Monitoring

The Services section is where you set up monitoring for external websites or servers using Agents.
Configured service monitors can be viewed on the "Services" page of the homepage, displaying the availability monitoring results for the past 30 days.

How to Use

To add a new monitor, go to the "Services" page in the Admin dashboard and click "Add Monitor."

When adding a new service monitor, you need to set the following parameters:

  • Name: Customize a name.

  • Type: Select a monitor type. Nezha Monitoring currently supports three types: "HTTP-GET," "ICMP-Ping," and "TCP-Ping."

  • Target: Depending on the type you choose, the method for setting the target differs:

    • HTTP-GET: For this type, you should enter a URL as the target, including http:// or https://. If your target URL is https://, the SSL certificate of that URL will also be monitored. Notifications will be triggered when the SSL certificate expires or changes. Example: https://example.com.
    • ICMP-Ping: For this type, you should enter a domain name or IP without a port number. Example: 1.1.1.1 or example.com.
    • TCP-Ping: For this type, you should enter a domain name or IP with a port number. Example: 1.1.1.1:80 or example.com:22.
  • Request Interval: Set the interval in seconds at which the Agent requests the target.

  • Coverage: Select a rule to determine which Agents will request the target.

  • Specific Servers: Used in conjunction with the coverage scope, select Agents within the rule to exclude.

  • Notification Group: Choose the notification methods you have already set up on the "Notification" page. Click here for more details.

  • Enable Fault Notification: Choose whether to receive fault notifications for the target as needed. The default is unchecked.

After setting it up, click "Add." Wait a moment and go to the "Services" page on the homepage to view the monitoring results.

Latency Change Notification

Nezha Monitoring can monitor and record the latency between the Agent and the target server, sending notifications when there are significant changes. This feature helps you monitor if the server's network route has changed.

  • Enable Latency Notifications: When enabled, Notification will be sent if the latency from the Agent to the target server is greater than the Maximum Latency or less than the Minimum Latency.

Trigger Tasks on Notification

If you need to execute tasks when service monitoring Notification are triggered, you can check "Enable Trigger Tasks" and select the pre-configured trigger tasks in "Task on Notification" and "Task on Recovery."

Network Latency Chart

The TCP-Ping and ICMP-Ping monitoring types set in the Services page will automatically enable the monitoring chart feature. On the "Network" page of the homepage, you can view historical network latency charts. The data in the charts is based on the latency from the Agent to the target server. You can click the Agent's name to toggle the chart display. In the chart, you can uncheck the target server's name to hide or show the corresponding data.

Managing Monitors

To manage existing service monitors, go to the "Services" page in the Admin Panel. Select a monitor configuration and click the icons on the right to edit or delete it.

',16),r=[a];function s(c,h,l,g,d,u){return o(),t("div",null,r)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_services.md.42ZV920I.lean.js b/assets/en_US_guide_services.md.42ZV920I.lean.js deleted file mode 100644 index 22e903f6..00000000 --- a/assets/en_US_guide_services.md.42ZV920I.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Service Monitoring","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/services.md"},a=i("",16),r=[a];function s(c,h,l,g,d,u){return o(),t("div",null,r)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_settings.md.CfFsBnHL.js b/assets/en_US_guide_settings.md.CfFsBnHL.js deleted file mode 100644 index 9d7c5f0a..00000000 --- a/assets/en_US_guide_settings.md.CfFsBnHL.js +++ /dev/null @@ -1,311 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"Settings","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1732521523000}'),h={name:"en_US/guide/settings.md"},k=n(`

Settings

Site Title

You can customize the site title in this section.

Administrator List

  • If you have changed your Github, Gitlab, or Gitee username, you need to update it here to avoid login issues. Separate multiple usernames with commas: user1,user2.
  • To change the administrator account, go to /opt/nezha/dashboard/data/config.yaml and reset the new administrator Client ID and Client Secret.

Theme

Select the theme for the frontend and dashboard here. If a theme that already exists is not in the options, update the Dashboard.

To use a custom frontend theme, you need to create a theme description file. For more information on custom themes, please refer to Nezha Theme Development Environment.

Before enabling the dashboard Custom theme, ensure you have installed the custom theme; otherwise, the Dashboard will not display correctly after enabling this option.

Language

Nezha Monitoring currently supports the following languages:

  • Simplified Chinese (简体中文)
  • Traditional Chinese (繁體中文)
  • English
  • Spanish (Español)

We welcome corrections to translations or contributions of more languages.

Custom Code (style, script)

You can modify the LOGO, adjust colors, add beautification code, and add statistical code here.

WARNING

Custom code only affects the visitor homepage, not the admin panel. Due to differences in code between themes, if you need to modify the content in the admin panel, please modify the theme files in Docker.

Example of Changing Progress Bar Color, Background Image, Navigation Bar, etc., in the Default Theme

Click to expand/collapse
html
<style>
-/* Screen adaptation */
-@media only screen and (min-width: 1200px) {
-    .ui.container {
-    width: 80% !important;
-}
-}
-
-@media only screen and (max-width: 767px) {
-    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
-        margin-top: 0.4em !important;
-    }
-}
-
-/* Overall icons */
-i.icon {
-    color: #000;
-    width: 1.2em !important;
-}
-
-/* Background image */
-body {
-    content: " " !important;
-    background: fixed !important;
-    z-index: -1 !important;
-    top: 0 !important;
-    right: 0 !important;
-    bottom: 0 !important;
-    left: 0 !important;
-    background-position: top !important;
-    background-repeat: no-repeat !important;
-    background-size: cover !important;
-    background-image: url(https://backgroud.img) !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
-
-/* Navigation bar */
-.ui.large.menu {
-    border: 0 !important;
-    border-radius: 0px !important;
-    background-color: rgba(255, 255, 255, 55%) !important;
-}
-
-/* Homepage buttons */
-.ui.menu .active.item {
-    background-color: transparent !important;
-}
-
-/* Navigation bar dropdown */
-.ui.dropdown .menu {
-    border: 0 !important;
-    border-radius: 0 !important;
-    background-color: rgba(255, 255, 255, 80%) !important;
-}
-
-/* Login button */
-.nezha-primary-btn {
-    background-color: transparent !important;
-    color: #000 !important;
-}
-
-/* Large card */
-#app .ui.fluid.accordion {
-    background-color: #fbfbfb26 !important;
-    border-radius: 0.4rem !important;
-}
-
-/* Small card */
-.ui.four.cards>.card {
-    border-radius: 0.6rem !important;
-    background-color: #fafafaa3 !important;
-}
-
-.status.cards .wide.column {
-    padding-top: 0 !important;
-    padding-bottom: 0 !important;
-    height: 3.3rem !important;
-}
-
-.status.cards .three.wide.column {
-    padding-right: 0rem !important;
-}
-
-.status.cards .wide.column:nth-child(1) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .wide.column:nth-child(2) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .description {
-    padding-bottom: 0 !important;
-}
-
-/* Server name */
-.status.cards .flag {
-    margin-right: 0.5rem !important;
-}
-
-/* Popup card icon */
-.status.cards .header > .info.icon {
-    margin-right: 0 !important;
-}
-
-.nezha-secondary-font {
-    color: #2175ba !important;
-}
-
-/* Upload/download */
-.status.cards .outline.icon {
-    margin-right: 1px !important;
-}
-
-i.arrow.alternate.circle.down.outline.icon {
-    color: #2175ba !important;
-}
-
-i.arrow.alternate.circle.up.outline.icon {
-    color: red !important;
-}
-
-/* Popup card small arrow */
-.ui.right.center.popup {
-    margin: -3px 0 0 0.914286em !important;
-    -webkit-transform-origin: left 50% !important;
-    transform-origin: left 50% !important;
-}
-
-.ui.bottom.left.popup {
-    margin-left: 1px !important;
-    margin-top: 3px !important;
-}
-
-.ui.top.left.popup {
-    margin-left: 0 !important;
-    margin-bottom: 10px !important;
-}
-
-.ui.top.right.popup {
-    margin-right: 0 !important;
-    margin-bottom: 8px !important;
-}
-
-.ui.left.center.popup {
-    margin: -3px .91428571em 0 0 !important;
-    -webkit-transform-origin: right 50% !important;
-    transform-origin: right 50% !important;
-}
-
-.ui.right.center.popup:before,
-.ui.left.center.popup:before {
-    border: 0px solid #fafafaeb !important;
-    background: #fafafaeb !important;
-}
-
-.ui.top.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.bottom.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.bottom.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-.ui.top.left.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-.ui.top.right.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-.ui.left.center.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-/* Popup card */
-.status.cards .ui.content.popup {
-    min-width: 20rem !重要;
-    line-height: 2rem !重要;
-    border-radius: 5px !重要;
-    border: 1px solid transparent !重要;
-    background-color: #fafafaeb !重要;
-    font-family: Arial,Helvetica,sans-serif !重要;
-}
-
-.ui.content {
-    margin: 0 !重要;
-    padding: 1em !重要;
-}
-
-/* Service page */
-.ui
-
-.table {
-    background: RGB(225,225,225,0.6) !重要;
-}
-
-.ui.table thead th {
-    background: transparent !重要;
-}
-
-/* Service page progress bar */
-.service-status .good {
-    background-color: #2175ba !重要;
-}
-
-.service-status .danger {
-    background-color: red !重要;
-}
-
-.service-status .warning {
-    background-color: orange !重要;
-}
-
-/* Copyright */
-.ui.inverted.segment, .ui.primary.inverted.segment {
-    color: #000 !重要;
-    font-weight: bold !重要;
-    background-color: #fafafaa3 !重要;
-}
-</style>
-
-<!--Logo and Copyright-->
-<script>
-window.onload = function(){
-var avatar=document.querySelector(".item img")
-var footer=document.querySelector("div.is-size-7")
-footer.innerHTML="Copyright info"
-footer.style.visibility="visible"
-avatar.src="https:/img.src"
-avatar.style.visibility="visible"
-}
-</script>
Click to expand/collapse
html
<style>
-.ui.fine.progress> .progress-bar {
-  background-color: #00a7d0 !important;
-}
-</style>
-
-<script>
-window.onload = function(){
-  var avatar = document.querySelector("img");
-  var footer = document.querySelector("div.footer-container");
-  footer.innerHTML = "©2021 Your Name & Powered by Your Name";
-  footer.style.visibility = "visible";
-  avatar.src = "Your Image URL";
-  avatar.style.visibility = "visible";
-}
-</script>
Click to expand/collapse
html
<style>
-.right.menu>a {
-  visibility: hidden;
-}
-.footer .is-size-7 {
-  visibility: hidden;
-}
-.item img {
-  visibility: hidden;
-}
-</style>
-<script>
-window.onload = function() {
-  var avatar = document.querySelector(".item img");
-  var footer = document.querySelector("div.is-size-7");
-  footer.innerHTML = "Powered by Your Name";
-  footer.style.visibility = "visible";
-  avatar.src = "Your Square Logo URL";
-  avatar.style.visibility = "visible";
-}
-</script>

Example of Changing Background Image in Hotaru Theme

Click to expand/collapse
html
<style>
-.hotaru-cover {
-   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
-}
-</style>

View Password

If you don't want to display your Dashboard directly to visitors, you can set a view password here. After setting the password, visitors need to enter the password to access the homepage.

Non-CDN Dashboard Server Domain/IP

This setting is a prerequisite for using the one-click script to install the Agent. For details, please see here.

IP Change Notifications

If you want to receive notifications when a server's IP changes, you can set it up here.

Coverage

Select a rule to determine which servers to monitor. Choose according to your needs.

Specific Servers

Set exclusions for the selected rule in conjunction with the coverage scope.

Send Notifications to a Specific Notification Group

Choose a notification method, which should be set up in advance on the "Notification" page.

WARNING

Notifications take effect after enabling this setting.

Show Full IP Address in Notifications

IP change notifications hide the full IP by default. If you don't want to hide it, check "Show Full IP Address in Notification."

Disable Homepage Theme Switching

By default, the Dashboard allows visitors to change the theme. This feature only affects individual visitors and does not affect the theme set by the administrator in the admin panel. If you don't want visitors to switch themes, check this option.

`,41),l=[k];function t(p,e,r,E,d,g){return a(),i("div",null,l)}const o=s(h,[["render",t]]);export{F as __pageData,o as default}; diff --git a/assets/en_US_guide_settings.md.CfFsBnHL.lean.js b/assets/en_US_guide_settings.md.CfFsBnHL.lean.js deleted file mode 100644 index bebb56b6..00000000 --- a/assets/en_US_guide_settings.md.CfFsBnHL.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"Settings","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1732521523000}'),h={name:"en_US/guide/settings.md"},k=n("",41),l=[k];function t(p,e,r,E,d,g){return a(),i("div",null,l)}const o=s(h,[["render",t]]);export{F as __pageData,o as default}; diff --git a/assets/en_US_guide_tasks.md.BBiXJhsc.js b/assets/en_US_guide_tasks.md.BBiXJhsc.js deleted file mode 100644 index fa2f440e..00000000 --- a/assets/en_US_guide_tasks.md.BBiXJhsc.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,a4 as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"Task Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/tasks.md"},s=a('

Task Management

In the Tasks section, you can set up scheduled tasks, trigger tasks, and batch execute tasks on multiple servers.

Nezha Monitoring supports pushing commands to Agents for execution. This feature is highly flexible and can be used for regular backups using tools like restic or rclone, periodically restarting a service to reset network connections, or executing a task when an notification is triggered, such as running a script when CPU usage is high for an extended period.

How to Use

Go to the "Tasks" page in the admin panel and click "Add Scheduled Task." When adding a scheduled task, you need to fill in the following parameters:

  • Name: Customize a task name.

  • Task Type: Choose the type of task.

    • Scheduled Task: Executes periodically according to the schedule set below.
    • Trigger Task: Only executed when triggered by an API call or notification rule, runs once per trigger.
  • Schedule: Set the schedule time (not enable when using trigger task type). The time format is * * * * * *, corresponding to second minute hour day month weekday. For more details, see Cron Expression Format.
    For example: 0 0 3 * * * means "3 AM every day."

  • Command: Set the command to execute, similar to writing Shell/Bat scripts, but it's recommended not to use new lines; connect multiple commands with && or &.
    For example, to schedule a reboot, you can enter reboot here.

  • Coverage and Specific Servers: Select rules to determine which Agents execute the scheduled task, similar to the settings on the "Services" page. When using the trigger task type, you can choose "executed by the triggered server."

  • Notification Group: Choose the notification methods you have set up on the "Notifications" page. Click here for more details.

  • Send Success Notification: Check this option to trigger a notification upon successful task execution.

Managing Tasks

To manage existing scheduled tasks, go to the "Tasks" page in the admin panel. For each task configuration, the three icons on the right are:

  • Execute Immediately: Click to ignore the scheduled time and execute the task immediately.
  • Edit: Click to modify the task configuration.
  • Delete: Delete the scheduled task.

Frequently Asked Questions

  1. Command not found error
    If a command fails to run with a "command not found" error, it may be a PATH environment variable issue. On Linux servers, you can add source ~/.bashrc at the beginning of the command or use the absolute path to execute the command.
',11),i=[s];function r(c,l,d,u,h,g){return o(),t("div",null,i)}const k=e(n,[["render",r]]);export{p as __pageData,k as default}; diff --git a/assets/en_US_guide_tasks.md.BBiXJhsc.lean.js b/assets/en_US_guide_tasks.md.BBiXJhsc.lean.js deleted file mode 100644 index d13517bb..00000000 --- a/assets/en_US_guide_tasks.md.BBiXJhsc.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,a4 as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"Task Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1732521523000}'),n={name:"en_US/guide/tasks.md"},s=a("",11),i=[s];function r(c,l,d,u,h,g){return o(),t("div",null,i)}const k=e(n,[["render",r]]);export{p as __pageData,k as default}; diff --git a/assets/en_US_index.md.D1U7Cexx.js b/assets/en_US_index.md.D1U7Cexx.js deleted file mode 100644 index a25de73b..00000000 --- a/assets/en_US_index.md.D1U7Cexx.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"Nezha Monitoring - Server monitoring tool","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring - Server monitoring tool","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"Open-source, lightweight, and easy-to-use server monitoring and operation 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":"Get Started →","link":"en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Supports one-click installation of the Dashboard and Agent services, making it easy to operate. Compatible with mainstream systems, including Linux, Windows, macOS, OpenWRT, and Synology."},{"title":"Real-Time Monitoring","details":"Supports monitoring the status of multiple servers simultaneously, providing historical network status and latency charts, monitoring webpage and port availability, and SSL certificate status. Supports alerts for status such as faults and traffic, with notifications via Telegram, email, Slack, and more."},{"title":"Easy Operations","details":"Provides an API to get server status, supports WebSSH, DDNS, and traffic monitoring. Allows setting up scheduled and triggered tasks and executing server tasks in batches."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1732521523000}'),i={name:"en_US/index.md"};function n(s,o,r,l,d,c){return a(),e("div")}const u=t(i,[["render",n]]);export{p as __pageData,u as default}; diff --git a/assets/en_US_index.md.D1U7Cexx.lean.js b/assets/en_US_index.md.D1U7Cexx.lean.js deleted file mode 100644 index a25de73b..00000000 --- a/assets/en_US_index.md.D1U7Cexx.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"Nezha Monitoring - Server monitoring tool","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring - Server monitoring tool","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"Open-source, lightweight, and easy-to-use server monitoring and operation 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":"Get Started →","link":"en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Supports one-click installation of the Dashboard and Agent services, making it easy to operate. Compatible with mainstream systems, including Linux, Windows, macOS, OpenWRT, and Synology."},{"title":"Real-Time Monitoring","details":"Supports monitoring the status of multiple servers simultaneously, providing historical network status and latency charts, monitoring webpage and port availability, and SSL certificate status. Supports alerts for status such as faults and traffic, with notifications via Telegram, email, Slack, and more."},{"title":"Easy Operations","details":"Provides an API to get server status, supports WebSSH, DDNS, and traffic monitoring. Allows setting up scheduled and triggered tasks and executing server tasks in batches."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1732521523000}'),i={name:"en_US/index.md"};function n(s,o,r,l,d,c){return a(),e("div")}const u=t(i,[["render",n]]);export{p as __pageData,u as default}; diff --git a/assets/guide_agent.md.D5fn7vFK.js b/assets/guide_agent.md.D5fn7vFK.js deleted file mode 100644 index bc6714f0..00000000 --- a/assets/guide_agent.md.D5fn7vFK.js +++ /dev/null @@ -1,67 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"安装 Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1732521523000}'),e={name:"guide/agent.md"},t=n(`

安装 Agent

哪吒监控的被控端服务被称为 Agent,本文档将介绍如何在被控端服务器上安装 Agent,并与 Dashboard 连接。

TIP

Agent 二进制文件仓库地址为:https://github.com/nezhahq/agent/releases

一键安装 Agent

哪吒监控支持在 Windows 和 Linux 上一键安装 Agent。遵循本文档的步骤,你可以很轻松地在服务器上部署它。

准备工作

你需要提前在管理面板中设置好通信域名,此域名不可以接入 CDN。本文档以示例通信域名 “data.example.com” 为例。
进入后台管理面板,转到“设置”页,在“未接入 CDN 的面板服务器域名/IP”项中填入通信域名,然后点击"保存"。

在 Linux 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Linux 图标按钮,复制一键安装命令。
  3. 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线。

在 macOS 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Apple 图标按钮,复制一键安装命令。
  3. 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线。

在 Windows 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Windows 图标按钮,复制一键安装命令。
  3. 进入 Windows 服务器,运行 PowerShell,在 PowerShell 中运行复制的安装命令。
  4. 如遇到确认「执行策略变更」请选择 Y。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

WARNING

如果在 PowerShell 中运行一键安装命令时遇到错误,请尝试下方的在 Windows 中手动安装 Agent

其他方式安装 Agent

在 Linux 中安装 Agent(支持大部分发行版)

点击展开/收起
  1. 首先在管理面板中添加一台服务器。
  2. 在被控服务器中,运行脚本(位于中国大陆的服务器请使用镜像):
bash
curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的被控服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/scripts/raw/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
  1. 选择“安装监控 Agent”。
  2. 输入通信域名,如:”data.example.com“。
  3. 输入面板通信端口(gRPC 端口),默认为 5555。
  4. 输入 Agent 密钥,Agent 密钥在管理面板中添加服务器时生成,可以在管理面板中的“服务器”页中找到。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

使用 Agent 内置服务命令安装(支持主流系统)

点击展开/收起

首先获取 Agent 的二进制文件:https://github.com/nezhahq/agent/releases

解压后输入以下命令安装服务(可能需要 root 权限):

bash
./nezha-agent service install -s server_name:port -p password

除了服务器地址和密码,还可以添加其它支持的参数。具体参考自定义 Agent 监控项目

卸载服务:

bash
./nezha-agent service uninstall

启动服务:

bash
./nezha-agent service start

停止服务:

bash
./nezha-agent service stop

重启服务:

bash
./nezha-agent service restart

runit 安装 Agent

点击展开/收起

目前 Agent 内置的服务功能已经支持了绝大部分 init 系统,包括 FreeBSD rc.d 和 openrc。尽管如此还是有一些漏网之鱼。

这里使用 Void Linux 的 runit 作为示例:

  1. 创建 /etc/sv/nezha-agent 目录:
bash
mkdir /etc/sv/nezha-agent
  1. 创建 /etc/sv/nezha-agent/run 服务文件,写入以下内容:
bash
#!/bin/sh
-exec 2>&1
-exec /opt/nezha/agent/nezha-agent -s server_name:port -p password 2>&1

这里同样可以添加其它参数。

  1. 创建 /etc/sv/nezha-agent/log/run
bash
#!/bin/sh
-exec vlogger -t nezha-agent -p daemon
  1. 启用服务:
bash
sudo ln -s /etc/sv/nezha-agent/ /var/service

之后可以通过 sv 命令来操作服务。

如何查看日志:

  1. 安装 socklog,并启用:
bash
sudo xbps-install -S socklog-void
-sudo ln -s /etc/sv/socklog-unix /var/service
  1. 运行 svlogtail 查看日志:
bash
sudo svlogtail | grep nezha-agent

在 Windows 中手动安装 Agent

在群晖 DSM 中安装 Agent

点击展开/收起
sh
# Agent 路径
-EXEC="/PATH/TO/nezha-agent"
-# 日志路径地址
-LOG="\${EXEC}.log"
-# 额外执行参数, 可留空
-ARGS=""
-# 哪吒服务端 gRPC 地址
-SERVER="HOST_OR_IP:gRPC_PORT"
-# 上一步获取的主机密钥
-SECRET="APP_SECRET"
-# 运行服务的用户名, *强烈建议使用非root用户执行*
-RUN_USER="nezha"
-
-# 写入到 systemd 服务文件
-cat << EOF > /usr/lib/systemd/system/nezha.service
-[Unit]
-Description=Nezha Agent Service
-After=network.target
-
-[Service]
-Type=simple
-ExecStart=/bin/nohup \${EXEC} \${ARGS} -s \${SERVER} -p \${SECRET} &>> \${LOG} &
-ExecStop=ps -fe |grep nezha-agent|awk '{print \\$2}'|xargs kill
-User=\${RUN_USER
-
-}
-Restart=on-abort
-
-[Install]
-WantedBy=multi-user.target
-EOF
-
-# 重载服务
-systemctl daemon-reload
-# 启动服务
-systemctl start nezha
-# 服务自启动
-systemctl enable nezha

‼️修改对应信息后‼️
使用 root 账号执行上述命令即可安装完成。

在 macOS 中使用 Homebrew 安装 Agent

点击展开/收起

本节内容改编自 🐿️松鼠收集🌰,改编已获得原作者授权

WARNING

请务必先添加环境变量,再通过 Homebrew 安装 nezha-agent! 因 Homebrew 在软件安装时创建服务所需 plist 文件,若先安装再添加环境变量,会因缺少参数而启动失败。

  1. 添加环境变量:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="通信密钥,在服务页面获取"' >> ~/.zshrc
-echo 'export HOMEBREW_NEZHA_AGENT_SERVER="你的服务器和端口,格式 your.domain:5555 "' >> ~/.zshrc
-source ~/.zshrc
  1. 安装 Nezha Agent:

DANGER

请注意,此 Homebrew 仓库由第三方维护,与哪吒监控无关。 Nezha 项目组不对该仓库的可用性和安全性等方面作出背书。在使用前,请自行评估风险!

由于暂未提交到 Homebrew Core 官方库,暂时放在上述博客作者参与维护的 第三方 Homebrew 仓库 中:

shell
brew install brewforge/chinese/nezha-agent
  1. 通过 Homebrew 启动 Nezha Agent 服务:
shell
brew services start nezha-agent
  1. 检查服务状态:
shell
brew services info nezha-agent
  1. 停止服务:
shell
brew services stop nezha-agent
  1. 卸载 Nezha Agent:
shell
brew rm nezha-agent
  1. 报错时先检查环境变量:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
-echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. 若环境变量配置正确,再尝试重装:
shell
brew services stop nezha-agent
-brew reinstall nezha-agent
-brew services start nezha-agent
  1. 若仍未解决,请前往上述 第三方 Homebrew 仓库 提交 issue。

在 OpenWRT 中安装 Agent

点击展开/收起

如何一步到位,解决安装过程中的疑难杂症?

如何使旧版 OpenWRT/LEDE 自启动?

如何使新版 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
-
-start_service() {
- procd_open_instance
- procd_set_param command /root/nezha-agent -s 面板通信地址:端口 -p 秘钥 -d
- procd_set_param respawn
- procd_close_instance
-}
-
-stop_service() {
-  killall nezha-agent
-}
-
-restart() {
- stop
- sleep 2
- start
-}
  • 运行 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 镜像。

`,31),l=[t];function h(p,k,r,d,g,o){return a(),i("div",null,l)}const y=s(e,[["render",h]]);export{F as __pageData,y as default}; diff --git a/assets/guide_agent.md.D5fn7vFK.lean.js b/assets/guide_agent.md.D5fn7vFK.lean.js deleted file mode 100644 index 80c8e28e..00000000 --- a/assets/guide_agent.md.D5fn7vFK.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"安装 Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1732521523000}'),e={name:"guide/agent.md"},t=n("",31),l=[t];function h(p,k,r,d,g,o){return a(),i("div",null,l)}const y=s(e,[["render",h]]);export{F as __pageData,y as default}; diff --git a/assets/guide_agentq.md.D--T1yuE.js b/assets/guide_agentq.md.D--T1yuE.js deleted file mode 100644 index a8a8d9e0..00000000 --- a/assets/guide_agentq.md.D--T1yuE.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as e,a4 as n}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Agent 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1732521523000}'),o={name:"guide/agentq.md"},i=n('

Agent 常见问题

后台显示的 IP 和 Agent 实际 IP 不一致?

请查看 Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?。在此不再赘述。

一键脚本安装时出错

curl: Failed to connect to raw.githubusercontent.com......

多出现在中国大陆的服务器中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者手动安装 Agent。另外,也可以自行寻找第三方 Github 加速服务或者镜像,并在一键安装脚本中设置。

sudo: command not found

请先手动安装 sudo,例如在 Ubuntu 中:

shell
apt install sudo
',9),s=[i];function d(r,l,c,h,u,p){return e(),t("div",null,s)}const _=a(o,[["render",d]]);export{m as __pageData,_ as default}; diff --git a/assets/guide_agentq.md.D--T1yuE.lean.js b/assets/guide_agentq.md.D--T1yuE.lean.js deleted file mode 100644 index 92ddf999..00000000 --- a/assets/guide_agentq.md.D--T1yuE.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as e,a4 as n}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Agent 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1732521523000}'),o={name:"guide/agentq.md"},i=n("",9),s=[i];function d(r,l,c,h,u,p){return e(),t("div",null,s)}const _=a(o,[["render",d]]);export{m as __pageData,_ as default}; diff --git a/assets/guide_api.md.nRk5Ly_w.js b/assets/guide_api.md.nRk5Ly_w.js deleted file mode 100644 index eb4ac434..00000000 --- a/assets/guide_api.md.nRk5Ly_w.js +++ /dev/null @@ -1,242 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const y=JSON.parse('{"title":"API 接口","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1732521523000}'),h={name:"guide/api.md"},t=n(`

API 接口

哪吒监控支持使用 API 接口查询面板中 Agent 的状态信息

创建 Token

哪吒面板的 API 接口允许使用 Token 认证与 Cookies 认证。要新建一个 Token,在进入管理面板后,点击右上角的头像,选择 “API Token”,进入 Token 管理页面。点击 “API Token”,自定义备注后,点击 “添加”。

如需删除一个 Token,请选择相应的 Token,点击右侧的删除图标。

WARNING

Token 是 API 接口的鉴权凭据,它对你的面板的信息安全非常重要,请不要泄漏你的 Token 给他人。

认证方式

确保在请求头中包含 Authorization: Token 进行身份认证。

Token 认证方式:

Request Headers:
-Authorization: Token

使用说明

WARNING

下面示例中的负数时间戳为(0000-00-00),目前表示 Dashboard 上线后该 Agent 从未汇报过,但不建议用正负性判断状态。

TIP

请求方式为 GET,返回格式为 JSON

获取服务器列表

请求:

GET /api/v1/server/list?tag=

参数:

  • tag(可选):ServerTag 是服务器的分组,提供此参数则仅查询该分组中的服务器。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653014667,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1"
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": ""
-        }
-    ]
-}

获取服务器详情

请求:

GET /api/v1/server/details?id=&tag=

参数:

  • id(可选):ServerID,多个 ID 以逗号分隔,提供此参数则查询该 ID 对应的服务器,同时无视 tag 参数。
  • tag(可选):ServerTag,提供此参数则仅查询该分组下的服务器。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653015042,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1",
-            "host": {
-                "Platform": "darwin",
-                "PlatformVersion": "12.3.1",
-                "CPU": [
-                    "Apple M1 Pro 1 Physical Core"
-                ],
-                "MemTotal": 17179869184,
-                "DiskTotal": 2473496842240,
-                "SwapTotal": 0,
-                "Arch": "arm64",
-                "Virtualization": "",
-                "BootTime": 1652683962,
-                "CountryCode": "hk",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 17.33,
-                "MemUsed": 14013841408,
-                "SwapUsed": 0,
-                "DiskUsed": 2335048912896,
-                "NetInTransfer": 2710273234,
-                "NetOutTransfer": 695454765,
-                "NetInSpeed": 10806,
-                "NetOutSpeed": 5303,
-                "Uptime": 331080,
-                "Load1": 5.23,
-                "Load5": 4.87,
-                "Load15": 3.99,
-                "TcpConnCount": 195,
-                "UdpConnCount": 70,
-                "ProcessCount": 437
-            }
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": "",
-            "host": {
-                "Platform": "",
-                "PlatformVersion": "",
-                "CPU": null,
-                "MemTotal": 0,
-                "DiskTotal": 0,
-                "SwapTotal": 0,
-                "Arch": "",
-                "Virtualization": "",
-                "BootTime": 0,
-                "CountryCode": "",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 0,
-                "MemUsed": 0,
-                "SwapUsed": 0,
-                "DiskUsed": 0,
-                "NetInTransfer": 0,
-                "NetOutTransfer": 0,
-                "NetInSpeed": 0,
-                "NetOutSpeed": 0,
-                "Uptime": 0,
-                "Load1": 0,
-                "Load5": 0,
-                "Load15": 0,
-                "TcpConnCount": 0,
-                "UdpConnCount": 0,
-                "ProcessCount": 0
-            }
-        }
-    ]
-}

获取 ICMP Ping / TCPing 数据

此 API 无需认证。(除限制游客访问的服务器)

请求:

GET /api/v1/monitor/{id}

参数:

  • id(必填):ServerID,只能是一个正整数。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "monitor_id": 1,
-            "server_id": 1,
-            "monitor_name": "Monitor1",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                68.2275,
-                70.1129
-            ]
-        },
-        {
-            "monitor_id": 2,
-            "server_id": 1,
-            "monitor_name": "Monitor2",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                66.656,
-                68.2153
-            ]
-        },
-        {
-            "monitor_id": 3,
-            "server_id": 1,
-            "monitor_name": "Monitor3",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                61.4525,
-                62.342
-            ]
-        }
-    ]
-}

注: created_atavg_delay 为对应关系。

自动注册节点

说明: 用于自动化注册节点的脚本,示例代码详见下文。

参考: https://github.com/naiba/nezha/pull/472

http
POST /api/v1/server/register?simple=1

参数:

  • simple:(可选) 指定返回数据的格式。
    • 当设置为 simple=1或者simple=true 时,返回的数据仅包含 Token 字符串(如 8GYwaxYuLfU7zl7ndC)。
    • 其他则返回完整的 JSON 对象:{"code": 200, "message": "Server created successfully","secret": "8GYwaxYuLfU7zl7ndC"}

请求体 (Payload):

你可以设置为空内容({}), 然后nezha面板会使用默认值进行填充

  • Name: 默认是节点的IP
  • Tag: 默认是 "AutoRegister".
  • Note:默认是 "".
  • HideForGuest: 默认是 "on".

你也可以设置自己的请求参数:

json
{
-  "Name": "abcd",        // 节点名称
-  "Tag": "",             // 标签,可选
-  "Note": "",            // 备注信息,可选
-  "HideForGuest": "on"   // 是否对访客隐藏
-}

使用案例

获取所有服务器信息

python
import requests
-
-url = "http://your-dashboard/api/v1/server/list"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-for server in data['result']:
-    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

获取特定服务器详情

python
import requests
-
-server_id = 1  # 替换为你的服务器ID
-url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-server = data['result'][0]
-print(f"Server Name: {server['name']}")
-print(f"CPU Usage: {server['status']['CPU']}%")
-print(f"Memory Used: {server['status']['MemUsed']} bytes")
-print(f"Disk Used: {server['status']['DiskUsed']} bytes")
-print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
-print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

通过以上示例代码,可以轻松获取和处理服务器的状态信息,从而实现自动化监控和管理。

自动注册节点

  1. 创建文件 nezha_register.sh,将以下内容复制到文件中:
bash
#!/bin/bash
-
-# Exit if NEZHA_TOKEN is not set
-if [ -z "\${NEZHA_TOKEN}" ]; then
-    echo "NEZHA_TOKEN is not set. Exiting."
-    exit 0
-fi
-
-# Set default values if variables are not set
-NEZHA_PROBE_ADDRESS="\${NEZHA_PROBE_ADDRESS:-probe.example.com}"
-NEZHA_PROBE_PORT="\${NEZHA_PROBE_PORT:-5555}"
-NEZHA_DASHBOARD_URL="\${NEZHA_DASHBOARD_URL:-https://nezha.example.com}"
-
-NODE_NAME=\${NODE_NAME:-$(hostname)}
-
-# Send POST request and capture response and HTTP status code
-response=$(curl -s -o response_body.json -w "%{http_code}" -X POST "\${NEZHA_DASHBOARD_URL}/api/v1/server/register?simple=true" \\
-  -H "Content-Type: application/json" \\
-  -H "Authorization: \${NEZHA_TOKEN}" \\
-  -d "{\\"Name\\": \\"\${NODE_NAME}\\"}")
-
-# Extract HTTP status code and Nezha secret
-HTTP_CODE="$response"
-NEZHA_SECRET=$(cat response_body.json)
-rm -f response_body.json
-
-if [ "$HTTP_CODE" != "200" ]; then
-    echo "Failed to get Nezha Secret. HTTP status code: $HTTP_CODE"
-    exit 1
-fi
-
-# Additional check for NEZHA_SECRET to ensure it's not JSON-formatted (indicating failure)
-if [[ "\${NEZHA_SECRET:0:1}" == "{" ]]; then
-    echo "Failed to get Nezha Secret. Received response: \${NEZHA_SECRET}"
-    exit 1
-fi
-
-# Download and execute the install script with cleanup
-curl -fsSL https://raw.githubusercontent.com/nezhahq/scripts/main/install.sh -o nezha.sh && \\
-chmod +x nezha.sh || { echo "Failed to download or make the script executable"; exit 1; }
-
-# Clean up nezha.sh on exit
-trap 'rm -f nezha.sh' EXIT
-
-# Run the Nezha agent installation script
-CMD="./nezha.sh install_agent "\${NEZHA_PROBE_ADDRESS}" "\${NEZHA_PROBE_PORT}" "\${NEZHA_SECRET}" --tls"
-
-echo "Run commnad : \${CMD}"
-
-eval $CMD
  1. 为脚本赋予可执行权限: chmod +x nezha_register.sh
  2. 从dashboard获取token, 比如为 POXbxorKJBM8wPMKX8r2PdMblyXvpggB
  3. 配置环境变量
bash
export NEZHA_TOKEN="POXbxorKJBM8wPMKX8r2PdMblyXvpggB" # 从面板获取
-export NEZHA_PROBE_ADDRESS="your_probe_address"        # 填写探针地址
-export NEZHA_DASHBOARD_URL="https://nezha.example.com" # 修改为你的面板地址
-export NEZHA_PROBE_PORT="5555"                         # 修改为你的探针端口(如有不同)
  1. 运行注册脚本
bash
./nezha_register.sh
  1. 如果脚本成功运行,你会看到类似以下的日志:
bash
Run command: ./nezha.sh install_agent probe.example.com 5555 YOUR_SECRET --tls
`,62),k=[t];function l(p,e,E,r,d,F){return a(),i("div",null,k)}const o=s(h,[["render",l]]);export{y as __pageData,o as default}; diff --git a/assets/guide_api.md.nRk5Ly_w.lean.js b/assets/guide_api.md.nRk5Ly_w.lean.js deleted file mode 100644 index f99f6e63..00000000 --- a/assets/guide_api.md.nRk5Ly_w.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const y=JSON.parse('{"title":"API 接口","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1732521523000}'),h={name:"guide/api.md"},t=n("",62),k=[t];function l(p,e,E,r,d,F){return a(),i("div",null,k)}const o=s(h,[["render",l]]);export{y as __pageData,o as default}; diff --git a/assets/guide_dashboard.md.Cto0sa35.js b/assets/guide_dashboard.md.Cto0sa35.js deleted file mode 100644 index 33cbcdee..00000000 --- a/assets/guide_dashboard.md.Cto0sa35.js +++ /dev/null @@ -1,25 +0,0 @@ -import{_ as a,c as s,o as e,a4 as i}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"安装 Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1732521523000}'),t={name:"guide/dashboard.md"},l=i(`

安装 Dashboard

准备工作

搭建一个哪吒监控,你需要:

  1. 一台可以连接公网的服务器,防火墙和安全策略需要放行 8008 和 5555 端口,否则会无法访问和无法接收数据。单核 512MB 内存的服务器配置就足以满足大多数使用场景。
  2. 一个已经设置好 A 记录,指向 Dashboard 服务器 IP 的域名。

TIP

如果你想使用 CDN,请准备两个域名,一个配置好 CDN 用作公开访问,CDN 需要支持 WebSocket 协议;另一个域名不要使用 CDN,用作 Agent 端与 Dashboard 的通信。

本文档分别以 "dashboard.example.com" 和 "data.example.com" 两个域名来演示。

  1. 一个 Github 账号(或:Gitlab、Gitee)。

本文档将以宝塔面板反代 Dashboard 的过程作为示范,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考。

WARNING

本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,或手动安装 Nginx 或 Caddy 来配置 SSL 和反代。
如果你认为没有必要使用 80、443 端口来访问 Dashboard,你甚至不需要安装 Nginx 就可以直接使用安装脚本安装并运行哪吒监控。

获取 Github 的 Client ID 和密钥

哪吒监控接入 Github、Gitlab、Gitee 作为后台管理员账号。

  1. 首先我们需要新建一个验证应用,以 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)。
  2. 点击 “Register application”。
  3. 保存页面中的 Client ID,然后点击 “Generate a new client secret“,创建一个新的 Client Secret,新建的密钥仅会显示一次,请妥善保存

使用 Cloudflare Access 作为 OAuth2 提供方

对于位于中国大陆的用户,直接连接到 GitHub 可能会遇到困难。如果您在使用 GitHub、GitLab 或 Gitee 作为管理员账户登录时遇到问题,建议切换到使用 Cloudflare Access 作为 OAuth2 提供方 进行登录。

新建 SaaS-OIDC 应用流程

WARNING

以下步骤适用于已经开始使用 Zero Trust 的用户。如果您尚未使用过 Cloudflare Zero Trust,强烈建议您首先阅读 Cloudflare Access 作为 OAuth2 提供方的使用指南,以了解 Cloudflare Access 的配置示例和流程。

  1. 前往 Zero Trust Dashboard,使用 Cloudflare 账号登录。
  2. My Team -> Users -> <具体用户> -> 获取 User ID 并保存。
  3. Access -> Application -> Add an Application
  4. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC 后点击 Add application
  5. Scopes 选择 openid, email, profile, groups
  6. Redirect URLs 填写你的 callback 地址,例如 https://dashboard.example.com/oauth2/callback
  7. 保存 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com

如使用此方式,安装 Dashboard 完成后,需要修改配置文件 /opt/nezha/dashboard/data/config.yaml,将 Endpoint 配置修改为之前保存的 Issuer 地址,例如 https://xxxxx.cloudflareaccess.com,保存后需重启 Dashboard。

OIDC 验证配置(可选)

哪吒支持自定义 OIDC 验证登录。有关配置详情,请参考文档:启用 OIDC 认证

在服务器中安装 Dashboard

在面板服务器中,运行安装脚本:

bash
curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的面板服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/scripts/raw/main/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/.+|file/.+)$ {
-    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 无需特别配置):

caddy
proxy /ws http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /terminal/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /file/* 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" ,不更改此项可能会导致你无法登录面板后台

更新 Dashboard

运行脚本 ./nezha.sh ,选择重启面板并更新。

`,43),n=[l];function h(p,o,d,r,c,k){return e(),s("div",null,n)}const u=a(t,[["render",h]]);export{b as __pageData,u as default}; diff --git a/assets/guide_dashboard.md.Cto0sa35.lean.js b/assets/guide_dashboard.md.Cto0sa35.lean.js deleted file mode 100644 index bedfd5c4..00000000 --- a/assets/guide_dashboard.md.Cto0sa35.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as s,o as e,a4 as i}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"安装 Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1732521523000}'),t={name:"guide/dashboard.md"},l=i("",43),n=[l];function h(p,o,d,r,c,k){return e(),s("div",null,n)}const u=a(t,[["render",h]]);export{b as __pageData,u as default}; diff --git a/assets/guide_dashboardq.md.C9lCMePt.js b/assets/guide_dashboardq.md.C9lCMePt.js deleted file mode 100644 index 0a9d0335..00000000 --- a/assets/guide_dashboardq.md.C9lCMePt.js +++ /dev/null @@ -1,10 +0,0 @@ -import{_ as a,c as s,o as e,a4 as i}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"Dashboard 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1732521523000}'),t={name:"guide/dashboardq.md"},n=i(`

Dashboard 常见问题

为什么管理面板中显示的 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:

shell
curl https://ipapi.co/ip/
-curl ip.sb
-curl ip-api.com

忘记查看密码\\删除查看密码

请查看或编辑 /opt/nezha/dashboard/data/config.yaml 文件。
密码位于 site-viewpassword 项中。

面板安装/重启/更新失败: iptables ......

首先尝试重启 Docker 再操作:

shell
systemctl 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 文件或在宝塔面板内:

  1. 网站 中找到安装 Dashboard 时配置的站点,点击右侧 设置

  2. 选择 配置文件,删除配置文件中的:

    nginx
    location ~ .*\\.(js|css)?$
    -    {
    -        expires      12h;
    -        error_log /dev/null;
    -        access_log /dev/null;
    -    }
  3. 保存配置,并清空浏览器、Nginx、CDN 中的缓存,此时刷新页面应恢复正常。

面板无法启动:panic:无法找到配置的 DDNS 提供者...

填入的 DDNS provider 的值有误,目前仅支持 webhookcloudflaretencentclouddummy

面板更新 DDNS 崩溃:panic:interface conversion: interface {} is nil, not []interface {}

填入的 DDNS AccessIDAccessSecret 有误。

面板警告:NEZHA>> 错误的服务监控上报...

  1. Dashboard 与 Agent 版本不兼容导致含有对端不支持的 TaskType 导致,全部更新至最新版本即可解决。

  2. Dashboard v0.17.10 - v0.18.0 也存在此问题,更新至最新版本可以解决。

无法启动 Agent 服务:Unix syslog delivery error

此报错见于 Agent v0.16.9+。原因为系统的 /dev/log 套接字工作不正常或不存在。可参考 https://unix.stackexchange.com/questions/317064/how-do-i-restore-dev-log-in-systemdrsyslog-host 解决。如果使用的是 Docker,请避免使用 systemd 等 init 系统。

打开网络监控页显示:server monitor history not found

出现此错误说明没有在服务页中设置 TCP-Ping 和 ICMP-Ping 类型的监控或者监控数据还未生成。
如已经设置完毕,可以等待一段时间后再查看。

启用 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 并不会,需要手动更新。

连接在线终端时提示:Agent 信令下发失败

当 Agent 离线,或与 Dashboard 之间的连接不稳定时,可能会导致在线终端无法正常连接。 请检查 Agent 是否正常运行,是否与 Dashboard 保持稳定的连接。

`,37),o=[n];function r(l,h,d,p,c,k){return e(),s("div",null,o)}const u=a(t,[["render",r]]);export{b as __pageData,u as default}; diff --git a/assets/guide_dashboardq.md.C9lCMePt.lean.js b/assets/guide_dashboardq.md.C9lCMePt.lean.js deleted file mode 100644 index e3eae747..00000000 --- a/assets/guide_dashboardq.md.C9lCMePt.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as s,o as e,a4 as i}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"Dashboard 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1732521523000}'),t={name:"guide/dashboardq.md"},n=i("",37),o=[n];function r(l,h,d,p,c,k){return e(),s("div",null,o)}const u=a(t,[["render",r]]);export{b as __pageData,u as default}; diff --git a/assets/guide_ddns.md.XXcpPxx0.js b/assets/guide_ddns.md.XXcpPxx0.js deleted file mode 100644 index c382216a..00000000 --- a/assets/guide_ddns.md.XXcpPxx0.js +++ /dev/null @@ -1,2 +0,0 @@ -import{_ as i,c as s,o as e,a4 as t}from"./chunks/framework.BmdFiWrL.js";const D=JSON.parse('{"title":"DDNS","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/ddns.md","filePath":"guide/ddns.md","lastUpdated":1732521523000}'),a={name:"guide/ddns.md"},o=t(`

DDNS

DDNS 功能适用于使用动态 IP 的服务器,当 Agent 上报了一个新的 IP(10分钟一次),Dashboard 会根据配置自动更新 DNS 记录。

为什么我要使用哪吒监控的 DDNS 功能?

  • 方便集中管理 DDNS 设置,而不是在每台服务器上都部署一个 DDNS 服务。
  • 仅在面板服务器上保存您的机密信息,防止外泄。

配置说明

可以直接在 Dashboard 管理页面中添加 DDNS 配置。

  1. 点击菜单栏中的“动态 DNS”选项,进入配置页面。
  2. 点击“新配置”按钮,在弹出窗口中按需填写信息。选项说明:
    • 名称:配置名称。
    • DDNS供应商:供应商类型,决定了使用何种方法更新 DNS 记录。
    • 域名(逗号分隔):域名,如填写多个域名需要用 , 分隔。支持 IDN(国际化域名)。
    • 最大重试次数:DDNS 更新尝试次数,默认为 3,范围为 1 到 10 的整数。
    • DDNS 凭据 1 以及 DDNS 凭据 2 为选填,通常需要至少填 1 个。下面的表格列出了所有供应商的对应选项。
  3. 如果使用 webhook 供应商,那么需要按需填写 Webhook 的对应选项。具体的说明请见 Webhook 配置说明
  4. 需要至少勾选 启用DDNS IPv4启用DDNS IPv6 中的一个,否则不会进行任何更新操作。
  5. 在添加了新的配置后,还需要修改服务器配置才能使 DDNS 生效。服务器相关选项说明:
    • 启用 DDNS:为此服务器启用 DDNS 功能。
    • DDNS 配置:要使用的 DDNS 配置 ID 列表,可以根据配置名称进行搜索。

Webhook 配置说明

Webhook 需要自行构建 HTTP 请求,适用于需要使用其它供应商的服务且操作较为简单的情况。

Webhook 相关选项说明:

  • Webhook 地址:HTTP 请求 URL。其中只有参数可以使用占位符。
  • Webhook 请求方式:HTTP 请求方式。支持 GETPOSTPATCHDELETE 以及 PUT
  • Webhook 请求类型:HTTP 请求体格式,为 JSON 或者 Form
  • Webhook 请求头:HTTP 请求头,用 JSON 填写,注意不支持嵌套。
  • Webhook 请求体:HTTP 请求体,GETDELETE 不会使用。如需使用嵌套格式,必须选择 JSON 作为请求类型。

Webhook 支持的占位符:

  • #ip#:主机 IP。
  • #domain#:DDNS 域名。每个域名的请求是分别进行的,所以此项的值只会是单个域名字符串。
  • #type#:IP 类型,值为 "ipv4""ipv6"
  • #record#:记录类型,值为 "A""AAAA"
  • #access_id#:DDNS 凭据 1。
  • #access_secret#:DDNS 凭据 2。

花生壳 Webhook 示例

点击展开/收起
  • URL:http://ddns.oray.com/ph/update?hostname=#domain#&myip=#ip#
  • 请求方式: GET
  • 请求头:{"Authorization": "Basic pass"},把 pass 替换成你的用户名:密码的 Base64 编码(例如,user:passdXNlcjpwYXNzCg==)。
  • 花生壳只支持 A 记录,所以只勾选启用 IPv4。其它 Webhook 选项不需要填。

供应商列表

供应商凭据1(ID)凭据2(Secret)
dummy❌️❌️
webhook可选可选
cloudflare❌️
tencentcloud

查看日志

在 Dashboard 的日志中,可以看到 DDNS 功能的相关日志,配置正确时,更新 DNS 记录时会有相应的日志记录。

shell
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成功
`,20),d=[o];function l(h,n,r,c,k,p){return e(),s("div",null,d)}const u=i(a,[["render",l]]);export{D as __pageData,u as default}; diff --git a/assets/guide_ddns.md.XXcpPxx0.lean.js b/assets/guide_ddns.md.XXcpPxx0.lean.js deleted file mode 100644 index 8e52b979..00000000 --- a/assets/guide_ddns.md.XXcpPxx0.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as s,o as e,a4 as t}from"./chunks/framework.BmdFiWrL.js";const D=JSON.parse('{"title":"DDNS","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/ddns.md","filePath":"guide/ddns.md","lastUpdated":1732521523000}'),a={name:"guide/ddns.md"},o=t("",20),d=[o];function l(h,n,r,c,k,p){return e(),s("div",null,d)}const u=i(a,[["render",l]]);export{D as __pageData,u as default}; diff --git a/assets/guide_loginq.md.CnJ6gnLD.js b/assets/guide_loginq.md.CnJ6gnLD.js deleted file mode 100644 index 557d98d7..00000000 --- a/assets/guide_loginq.md.CnJ6gnLD.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"登录常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1732521523000}'),i={name:"guide/loginq.md"},r=o('

登录常见问题

登录回调后页面卡住\\拒绝连接\\响应时间过长

还有其他一些表现形式,总之登录后浏览器无法正常显示。

  1. 您的服务器无法连接到 Github/Gitee,最常见于国内服务器配置 Github 情况下,可以考虑多尝试几次或者切换到 Cloudflare Access。
  2. 您配置错了回调地址,确保您的回调地址正确且端口与协议均正确!
  3. Dashboard 发生未知错误,您可以使用脚本查看日志。

TIP

什么是协议? 在浏览器中,您的域名以 :// 结尾的字符串即为协议,通常为 httphttps 两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。

如何检查我的回调地址是否错误?

请确保登录前浏览器显示的协议+域名+端口和登录后跳转到的协议+域名+端口一致。
请确保您的路径为 /oauth2/callback全部小写

登录后面板报错

  1. 清理 cookies 后重新登录,或换个浏览器。
  2. 检查回调地址,确保您的回调地址正确且端口与协议均正确!发起请求的地址需要和回调地址处于同域,端口、协议和域名(或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

同上。

使用 Cloudflare Access 作为 OAuth2 提供方时无法收到邮件验证码

  • 确认在 Policies 中已正确配置了邮件验证策略。
  • 检查您提供的邮箱地址是否正确无误。注意,不在策略白名单中的邮箱地址将不会接收到验证码。
',24),s=[r];function l(c,n,h,d,u,p){return t(),a("div",null,s)}const k=e(i,[["render",l]]);export{m as __pageData,k as default}; diff --git a/assets/guide_loginq.md.CnJ6gnLD.lean.js b/assets/guide_loginq.md.CnJ6gnLD.lean.js deleted file mode 100644 index 3375a51f..00000000 --- a/assets/guide_loginq.md.CnJ6gnLD.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"登录常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1732521523000}'),i={name:"guide/loginq.md"},r=o("",24),s=[r];function l(c,n,h,d,u,p){return t(),a("div",null,s)}const k=e(i,[["render",l]]);export{m as __pageData,k as default}; diff --git a/assets/guide_nat.md.DpUGasQ9.js b/assets/guide_nat.md.DpUGasQ9.js deleted file mode 100644 index 05fc95a9..00000000 --- a/assets/guide_nat.md.DpUGasQ9.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"内网穿透功能配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/nat.md","filePath":"guide/nat.md","lastUpdated":1732521523000}'),l={name:"guide/nat.md"},i=t('

内网穿透功能配置

哪吒服务器监控提供内置的内网穿透功能,允许用户通过设定 Dashboard 作为服务端,将运行在 Agent 上的内网服务(如家庭 OpenWrt 路由器、NAS 设备等)映射到公网上,便于外部访问。目前仅支持明文 HTTP 的穿透。

准备工作

在配置内网穿透前,请确保完成以下准备工作:

  • 确认已在您的设备上安装并运行哪吒监控的 Agent,并保持其与 Dashboard 的连接状态。
  • 准备一个公网域名,推荐使用子域名进行操作,如service-1.example.com。将此域名解析指向 Dashboard 服务器的公网 IP 地址。
  • 请注意,一个域名只能映射到一个 Agent 的内网服务。若需映射多个服务,请分别使用不同的域名,例如 service-2.example.com

WARNING

如果您的 Dashboard 服务器使用宝塔面板或其他管理工具,请确保所用域名,如 service-1.example.com 已在该面板中正确绑定至 Dashboard 站点,否则可能导致无法访问。

内网穿透配置步骤

  1. 登录至 Dashboard 管理页面,选择菜单栏中的“内网穿透”选项。
  2. 点击“添加”按钮,并填写以下所需信息:
    • 穿透名称:为此穿透配置自定义一个名称,如OpenWrt 登录页
    • Agent ID:填写需要进行穿透的 Agent 的 ID。
    • 内网服务地址:填写需穿透的内网服务地址,格式为 IP:端口,例如 127.0.0.1:80
    • 绑定域名:填写已准备的公网域名,如 service-1.example.com。如果面板使用了非标准端口访问(比如默认的 8008),需要手动添加才可以生效。
  3. 完成填写后,点击“新增”按钮,等待穿透生效。
  4. 尝试访问 http://service-1.example.com,以验证是否成功映射至 Agent 上的内网服务。

使用须知

  • 保持 Agent 与 Dashboard 之间的连接是内网穿透功能正常运作的前提。若 Agent 连接中断,已配置的穿透将暂时失效。
  • 考虑到内网穿透隧道本身不加密数据,建议在 Agent 与 Dashboard 之间以及 Dashboard 与客户端浏览器之间均使用 TLS/SSL,以确保数据传输过程的安全性。
',10),r=[i];function c(d,s,n,h,p,_){return o(),a("div",null,r)}const g=e(l,[["render",c]]);export{u as __pageData,g as default}; diff --git a/assets/guide_nat.md.DpUGasQ9.lean.js b/assets/guide_nat.md.DpUGasQ9.lean.js deleted file mode 100644 index a150ee25..00000000 --- a/assets/guide_nat.md.DpUGasQ9.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"内网穿透功能配置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/nat.md","filePath":"guide/nat.md","lastUpdated":1732521523000}'),l={name:"guide/nat.md"},i=t("",10),r=[i];function c(d,s,n,h,p,_){return o(),a("div",null,r)}const g=e(l,[["render",c]]);export{u as __pageData,g as default}; diff --git a/assets/guide_notifications.md.Z1WGTu70.js b/assets/guide_notifications.md.Z1WGTu70.js deleted file mode 100644 index 5bfe739d..00000000 --- a/assets/guide_notifications.md.Z1WGTu70.js +++ /dev/null @@ -1,35 +0,0 @@ -import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"通知设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1732521523000}'),l={name:"guide/notifications.md"},e=t(`

通知设置

哪吒监控支持对服务器的负载、CPU、内存、硬盘、流量、月流量、进程数、连接数进行监控,并在达到用户设定的阈值时发送告警通知。

灵活的通知方式

  • 在面板消息中,占位符 #DATETIME# 代表事件发生的时间戳。当通知被触发时,面板会自动将 #DATETIME# 替换为事件的实际时间。
  • #NEZHA# 是面板消息占位符,面板触发通知时会自动用实际消息替换占位符。
  • Body 内容是 JSON 格式的:当请求类型为 FORM 时,值为 key:value 的形式,value 里面可放置占位符,通知时会自动替换。当请求类型为 JSON 时 只会简单进行字符串替换后直接提交到 URL
  • URL 里面也可放置占位符,请求时会进行简单的字符串替换。

请参考以下的通知方式示例,也可以根据自己的需求灵活设置推送方式。

Bark 示例

点击展开/收起
  • 名称:Bark

  • URL 组成: /: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"}

Slack 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前准备好 Slack 的 Workspace 并为这个 Workspace 创建一个 App。如果你还没有创建,可以在 Slack API 创建一个 App。

创建完成 App 后,需要为这个 App 添加一个 Incoming Webhook。在 App 的设置页面中找到 Incoming Webhooks,将 Activate Incoming Webhooks 勾选为 ON,在页面下方找到并点击 Add New Webhook to Workspace,选择一个 Channel,然后点击允许。完成创建后,你会得到一个 Webhook URL,使用这个 URL 替换下方的示例 URL。

Server 酱示例

点击展开/收起

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![logo](https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg)"
    -}

    展示

Telegram 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前在 Telegram 中创建一个机器人,获取到机器人的 token 和你的 Telegram 用户 ID。

机器人的 token 和用户 ID 都是数字和字母的组合,可以在 Telegram 中与 @userinfobot 对话获取自己的用户 ID。与 @BotFather 对话,输入命令 /newbot 创建一个机器人,创建完成后可以获得机器人的 token。

得到的 token 和用户 ID 都是字符串,可以直接拼接到 URL 中,如下所示,将 botXXXXXX 中的 XXXXXX 替换为你的机器人 token,要保留其中的 bot,将 YYYYYY 替换为你的用户 ID。注意,你需要先与机器人对话,否则机器人无法发送消息给你。#NEZHA# 是占位符,不要修改和删除

wxpusher 示例

需要提前关注你的应用

点击展开/收起

邮件通知示例 - SendCloud 贡献者:@白歌

点击展开/收起

注意:SendCloud 有每日免费发送邮件限额限制,这里仅作示例,你可以选择付费服务或其他类似的免费服务,使用方法类似。

URL 参数获取说明

该示例使用 SendCloud 作为发信服务,需提前在 SendCloud 注册账号,创建发件邮箱,然后在这里获取 APIUSER 和 APIKEY。

替换示例 URL 中的 <替换APIUSER><替换APIKEY> 为自己的 APIUSER 和 APIKEY,替换 URL 中的 <自定义发件邮箱><自定义收件邮箱> 为任意的的发件邮箱和收件邮箱。

  • 名称:邮件告警
  • 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 参数获取说明

请提前在钉钉中创建一个机器人,获取到机器人的 token。

机器人 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

点击展开/收起

URL 参数获取说明

机器人 URL 通过飞书群 - 群机器人 - 添加机器人 - 自定义机器人(webhook)创建后获取。

Matrix 通知示例

点击展开/收起

参数说明

  • $ 开头的大写变量都需要替换为你的实际值。
    • YOUR_HOME_SERVER: Matrix 服务器的地址。
    • YOUR_NEZHA_URL: 你的哪吒面板的 URL。
    • YOUR_MATRIX_USERNAMEYOUR_MATRIX_PASSWD: Matrix 用户名和密码。
    • YOUR_MATRIX_TOKEN 获取方式:
      sh
      curl -XPOST -d '{"type": "m.login.password", "identifier": {"user": "$YOUR_MATRIX_USERNAME", "type": "m.id.user"}, "password": "$YOUR_MATRIX_PASSWD"}' "https://$YOUR_HOME_SERVER/_matrix/client/r0/login"

请求配置

  • 名称: Matrix
  • URL: https://$YOUR_HOME_SERVER/_matrix/client/r0/rooms/$ROOM_ID/send/m.room.message
  • 请求方式: POST
  • 请求类型: JSON
  • Header:
    json
    {
    -  "Authorization": "Bearer $YOUR_MATRIX_TOKEN"
    -}
  • Body:
    json
    {
    -  "msgtype": "m.text",
    -  "format": "org.matrix.custom.html",
    -  "formatted_body": "<html><head><title>Nezha Dashboard</title></head><body><h1><a href=\\"$YOUR_NEZHA_URL\\" target=\\"_blank\\">Nezha Dashboard</a></h1><ul><li>datetime: #DATETIME#</li><li>Message: #NEZHA#</li></ul></body></html>",
    -  "body": "#NEZHA#"
    -}

使用步骤

  1. 替换变量: 将 $YOUR_HOME_SERVER, $YOUR_NEZHA_URL, $YOUR_MATRIX_USERNAME, $YOUR_MATRIX_PASSWD, 以及 $YOUR_MATRIX_TOKEN 替换为你自己的值。
  2. 获取 Token: 使用上面提供的 curl 命令来获取 YOUR_MATRIX_TOKEN,确保替换所有相关的变量。
  3. 配置请求: 使用上述配置来设置你的请求,确保使用正确的 URL、请求头和请求体。
  4. 发送通知: 通过配置后的请求发送 Matrix 消息,完成哪吒监控的通知集成。

这样设置好后,每次触发通知时,你的 Matrix 房间中就会收到格式化的哪吒面板信息。

告警规则说明

基本规则

  • type:可选取一个或多个类型,如在一个规则中选择了多个类型,需要同时满足所有选择的类型才会触发通知(可参考后面的示例)
    • cpugpumemoryswapdisk
    • net_in_speed 入站网速、net_out_speed 出站网速、net_all_speed 双向网速、transfer_in 入站流量、transfer_out 出站流量、transfer_all 双向流量
    • offline 离线监控
    • load1load5load15 负载
    • process_count 进程数(目前取线程数占用资源太多,暂时不支持)
    • tcp_conn_countudp_conn_count 连接数
    • temperature_max 最高温度值
  • duration:持续数秒,数秒内采样记录 30% 以上触发阈值才会告警(防数据插针)
  • minmax
    • 流量、网速类单位为字节(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 持续 10 秒超过 50% 内存持续 20 秒占用低于 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/maxcoverignore 参考基本规则配置

示例:

ID 为 3 和 4 的服务器(ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时告警:

json
[{"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}}]

TIP

如果对告警配置仍感到有困难,可以试试以下第三方配置生成器简化操作。哪吒监控不对生成配置的功能性作任何保证。

通知触发模式

  • 始终触发:每当 Agent 上报的状态符合告警的规则时,都会触发一次通知。
  • 单次触发:仅状态改变时触发一次通知,如从正常状态改变为异常状态,或异常状态恢复为正常状态。

设置告警时执行任务

如果需要在发出告警消息的同时执行某项任务,可以设置此项目。

  • 告警时触发任务:当告警状态符合从“正常”变更为“事件”时,所要执行的任务,任务应提前在任务页设置。
  • 恢复时触发任务:当告警状态符合从“事件”恢复为“正常”时,所要执行的任务,任务应提前在任务页设置。
`,54),n=[e];function h(o,k,p,r,d,u){return a(),s("div",null,n)}const g=i(l,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/guide_notifications.md.Z1WGTu70.lean.js b/assets/guide_notifications.md.Z1WGTu70.lean.js deleted file mode 100644 index 185d0630..00000000 --- a/assets/guide_notifications.md.Z1WGTu70.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"通知设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1732521523000}'),l={name:"guide/notifications.md"},e=t("",54),n=[e];function h(o,k,p,r,d,u){return a(),s("div",null,n)}const g=i(l,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/guide_q1.md.Cwu7c2wW.js b/assets/guide_q1.md.Cwu7c2wW.js deleted file mode 100644 index 49bae31f..00000000 --- a/assets/guide_q1.md.Cwu7c2wW.js +++ /dev/null @@ -1,46 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"反向代理 Telegram Bot API","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1732521523000}'),l={name:"guide/q1.md"},p=n(`

反向代理 Telegram Bot API

如果你的 Dashboard 服务器无法访问 Telegram Bot API,但你依然想使用 Telegram 来推送通知,你可以尝试使用反向代理的方式解决这个问题。

准备工作

这里介绍使用你自己的服务器进行反代的方法。你也可以选择使用 Cloudflare 的 Workers 进行反代,但可能对于中国大陆的用户来说网络连通性依然不佳。

要搭建一个 Telegram Bot API 反代,你需要准备以下内容:

  1. 一个可以连接 Telegram Bot API 服务器(并安装好 Nginx)。
  2. 一个域名(提前申请 SSL 证书)。

NGINX 配置

编辑 Nginx 配置文件,在 http{} 中添加如下配置:

nginx
# HTTP 强制跳转到 HTTPS
-server {
-    listen 80;
-    listen [::]:80;
-    server_name <yourDomainName>;
-
-    # 强制 HTTPS
-    return 301 https://$server_name$request_uri;
-}
-
-# HTTPS 配置
-server {
-    listen 443 ssl;
-    listen [::]:443 ssl;
-    server_name <yourDomainName>;
-
-    # SSL 证书路径
-    ssl_certificate </path/to/your/server.pem>;
-    ssl_certificate_key </path/to/your/server.key>;
-
-    # Root 非必要
-    root /var/www/tgbot/;
-
-    # 必须配置 DNS,否则会报 502 错误
-    resolver 8.8.8.8;
-
-    # 以 /bot 开头的请求会被正则匹配
-    location ~* ^/bot {
-        proxy_buffering off;
-        proxy_pass  https://api.telegram.org$request_uri;
-        proxy_http_version 1.1;
-    }
-
-    # Root 非必要,主要用于确认服务器状态。也可以改为 return 403
-    location / {
-        try_files $uri $uri /index.html;
-    }
-
-    # 错误日志
-    error_log /var/log/tg.log error;
-}
  • yourDomainName:你准备的域名
  • ssl_certificate:SSL 证书路径
  • ssl_certificate_key:SSL 证书路径

使用方式

执行 systemctl restart nginx 重启 Nginx。然后在 Nezha 中将原来的 https://api.telegram.org/ 替换为 https://<yourDomainName>/,即可正常推送消息。

防止盗用

配置防火墙以防止他人盗用你的反代服务:

  • serverIp:Agent 的 IP 地址。根据你的系统选择适用的命令,ufwiptables 均可。
bash
# Ubuntu
-ufw allow proto tcp from <serverIp> to any port 443
-
-# CentOS
-iptables -I INPUT -p tcp --dport 443 -j DROP
-iptables -I INPUT -s <serverIp> -p tcp --dport 443 -j ACCEPT

通过以上配置,可以有效防止未经授权的访问。

`,17),t=[p];function h(e,k,r,d,g,o){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/guide_q1.md.Cwu7c2wW.lean.js b/assets/guide_q1.md.Cwu7c2wW.lean.js deleted file mode 100644 index 3f61a9dd..00000000 --- a/assets/guide_q1.md.Cwu7c2wW.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"反向代理 Telegram Bot API","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1732521523000}'),l={name:"guide/q1.md"},p=n("",17),t=[p];function h(e,k,r,d,g,o){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/guide_q10.md.DiIvXAYi.js b/assets/guide_q10.md.DiIvXAYi.js deleted file mode 100644 index 865eb934..00000000 --- a/assets/guide_q10.md.DiIvXAYi.js +++ /dev/null @@ -1,15 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"配置OIDC认证","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q10.md","filePath":"guide/q10.md","lastUpdated":1732521523000}'),l={name:"guide/q10.md"},t=n(`

配置OIDC认证

修改 config.yaml 文件的内容来配置 OIDC(OpenID Connect)认证。OIDC 是建立在 OAuth 2.0 协议之上的认证层,允许应用程序通过授权服务器执行的认证来验证用户的身份。这种方法广泛用于实现现代应用程序的单点登录。

配置详细信息

以下是在 config.yaml 中配置 OIDC 设置的逐步指南:

yaml
oauth2:
-  type: oidc  # (必填)指定认证类型为 OIDC
-  oidcDisplayName: OIDC  # (可选,默认值为 OIDC)登录页面显示的名称
-  admin: ""  # (至少填写 admin 或 adminGroups 中的一个;默认为空)管理员用户名,用逗号分隔。列在此处的用户被视为管理员
-  adminGroups: ""  # (至少填写 admin 或 adminGroups 中的一个;默认为空)管理员组,用逗号分隔。属于这些组的用户被视为管理员。如果不使用组管理,可以省略此项
-  clientid: # (必填)OIDC 客户端 ID
-  clientsecret: # (必填)OIDC 客户端密钥
-  oidcIssuer: https://auth.example.com/realms/master  # (必填)OIDC 提供商的 issuer URL,可以从您的OIDC 提供商处获取
-  # oidcLogoutUrl: https://auth.example.com/realms/master/protocol/openid-connect/logout  # (因 bug 目前不能使用)
-  # oidcRegisterUrl: # (可选)OIDC 提供商的注册链接
-  oidcScopes: openid,profile,email  # (可选,默认值为 openid,profile,email )OIDC 请求的 scope,用逗号分隔
-  oidcLoginClaim: sub  # (可选,默认值为 sub)OIDC 返回的用户名字段,可以是 preferred_username、sub 或email
-  oidcGroupsClaim: groups  # (如果使用 adminGroups,则必填,默认值为 groups )OIDC 返回的用户组信息字段,可以是 groups 或 roles
-  oidcAutoCreate: false  # (可选,默认值为 false)如果用户不存在,是否自动创建用户
-  oidcAutoLogin: false  # (可选,默认值为 false)当地址是 /login 时,是否自动跳转到OIDC登录页面
`,5),p=[t];function h(e,k,d,r,o,c){return a(),i("div",null,p)}const D=s(l,[["render",h]]);export{g as __pageData,D as default}; diff --git a/assets/guide_q10.md.DiIvXAYi.lean.js b/assets/guide_q10.md.DiIvXAYi.lean.js deleted file mode 100644 index 0f508375..00000000 --- a/assets/guide_q10.md.DiIvXAYi.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"配置OIDC认证","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q10.md","filePath":"guide/q10.md","lastUpdated":1732521523000}'),l={name:"guide/q10.md"},t=n("",5),p=[t];function h(e,k,d,r,o,c){return a(),i("div",null,p)}const D=s(l,[["render",h]]);export{g as __pageData,D as default}; diff --git a/assets/guide_q11.md.DClUsael.js b/assets/guide_q11.md.DClUsael.js deleted file mode 100644 index 3ea82cdc..00000000 --- a/assets/guide_q11.md.DClUsael.js +++ /dev/null @@ -1,28 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const y=JSON.parse('{"title":"自定义 IP 地理位置数据库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q11.md","filePath":"guide/q11.md","lastUpdated":1732521523000}'),t={name:"guide/q11.md"},h=n(`

自定义 IP 地理位置数据库

Dashboard v0.18.3+ 采用离线数据库获取 GeoIP 信息,如需编译正确显示地理位置信息的 Dashboard,必须在 pkg/geoip/geoip.db 路径下放置符合 IPinfo 格式的 mmdb 数据库。

IPinfo 格式包含以下字段:

  • 作为条目的 IP 子网
  • continent:大洲代码
  • continent_name:大洲名称
  • country:国家/地区代码
  • country_name:国家/地区名称

其中 Dashboard 只需要用到 country 信息,其它字段可留空。

编辑数据库

目前推荐使用 MaxMind 官方使用的 mmdbwritermaxminddb-golang 这两个库进行 mmdb 的编辑操作。

如果你的主要目的是为了校正地理信息,建议直接在 IPinfo 原版数据库的基础上修改。类似的操作可以参考 sing-geoip 项目。

这里以校正 IPinfo 数据为例,你需要使用 ReplaceWith inserter(此为默认值)并写入 mmdbtype.Map 信息:

go
subnet := &net.IPNet{
-    IP:   net.ParseIP("114.5.1.4")
-    Mask: net.CIDRMask(32, 32)
-}
-countryMap := make(map[mmdbtype.String]mmdbtype.String)
-
-countryMap[mmdbtype.String("country")] = mmdbtype.String("JP")
-
-if err := writer.Insert(subnet, mmdbtype.Map(countryMap)); err != nil {
-	return err
-}

其中 writer 为一个 *mmdbwriter.Tree 的实例,需要通过 mmdbwriter.New 方法创建。具体操作和插入其它字段的过程不再赘述。

编辑完成并将数据库信息写入到文件后,可以使用 mmdbinspect 命令行工具测试数据库信息。例如:

shell
$ mmdbinspect -db ./country.mmdb 114.5.1.4
-[
-    {
-        "Database": "./country.mmdb",
-        "Records": [
-            {
-                "Network": "114.5.1.4/32",
-                "Record": {
-                    "continent": "AS",
-                    "continent_name": "Asia",
-                    "country": "JP",
-                    "country_name": "Japan"
-                }
-            }
-        ],
-        "Lookup": "114.5.1.4"
-    }
-]

确定格式、信息无误后便可用于 Dashboard 编译。之后可通过 grpcurl 或类似工具测试查询 API 是否工作正常:

shell
grpcurl -proto ./nezha/proto/nezha.proto -plaintext -H 'client_secret: test' -d '{"ip": "114.5.1.4"}' 127.0.0.1:5555 proto.NezhaService/LookupGeoIP
`,15),p=[h];function k(l,e,E,d,r,o){return a(),i("div",null,p)}const F=s(t,[["render",k]]);export{y as __pageData,F as default}; diff --git a/assets/guide_q11.md.DClUsael.lean.js b/assets/guide_q11.md.DClUsael.lean.js deleted file mode 100644 index 2451e21e..00000000 --- a/assets/guide_q11.md.DClUsael.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const y=JSON.parse('{"title":"自定义 IP 地理位置数据库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q11.md","filePath":"guide/q11.md","lastUpdated":1732521523000}'),t={name:"guide/q11.md"},h=n("",15),p=[h];function k(l,e,E,d,r,o){return a(),i("div",null,p)}const F=s(t,[["render",k]]);export{y as __pageData,F as default}; diff --git a/assets/guide_q2.md.DtMO0dtm.js b/assets/guide_q2.md.DtMO0dtm.js deleted file mode 100644 index 4cac4e9b..00000000 --- a/assets/guide_q2.md.DtMO0dtm.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Agent 启动/上线 问题自检流程","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1732521523000}'),n={name:"guide/q2.md"},r=o('

Agent 启动/上线 问题自检流程

  1. 直接执行 /opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d 查看日志是否是因为 DNS、网络不佳导致超时(timeout)
  2. nc -v 域名/IP 面板RPC端口 或者 telnet 域名/IP 面板RPC端口 来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 https://port.ping.pe/ 提供的端口检查工具进行检测。
  3. 如果上面步骤检测正常,Agent 依然没有正常上线,请尝试关闭 SELinux,如何关闭 SELinux?
',2),i=[r];function c(s,_,d,l,p,g){return a(),t("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default}; diff --git a/assets/guide_q2.md.DtMO0dtm.lean.js b/assets/guide_q2.md.DtMO0dtm.lean.js deleted file mode 100644 index 73e1aff3..00000000 --- a/assets/guide_q2.md.DtMO0dtm.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Agent 启动/上线 问题自检流程","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1732521523000}'),n={name:"guide/q2.md"},r=o("",2),i=[r];function c(s,_,d,l,p,g){return a(),t("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default}; diff --git a/assets/guide_q3.md.0iIre3Mh.js b/assets/guide_q3.md.0iIre3Mh.js deleted file mode 100644 index 530a0908..00000000 --- a/assets/guide_q3.md.0iIre3Mh.js +++ /dev/null @@ -1,74 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const o=JSON.parse('{"title":"反向代理 gRPC 端口(支持 Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1732521523000}'),l={name:"guide/q3.md"},p=n(`

反向代理 gRPC 端口(支持 Cloudflare CDN)

使用 Nginx 或者 Caddy 反向代理 gRPC

  • Nginx 配置
nginx
server {
-    listen 443 ssl http2;
-    listen [::]:443 ssl http2;
-    server_name data.example.com; # 你的 Agent 连接 Dashboard 的域名
-
-    ssl_certificate          /data/letsencrypt/fullchain.pem; # 你的域名证书路径
-    ssl_certificate_key      /data/letsencrypt/key.pem;       # 你的域名私钥路径
-    ssl_stapling on;
-    ssl_session_timeout 1d;
-    ssl_session_cache shared:SSL:10m; # 此项可能会和其他配置文件冲突,如冲突请注释此项
-    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
-
-    underscores_in_headers on;
-
-    keepalive_time 24h;
-    keepalive_requests 100000;
-    keepalive_timeout 120s;
-
-    location / {
-        grpc_read_timeout 300s;
-        grpc_send_timeout 300s;
-        grpc_socket_keepalive on;
-        grpc_pass grpc://grpcservers;
-    }
-}
-
-upstream grpcservers {
-    server localhost:5555;
-    keepalive 512;
-}
  • Caddy 配置
data.example.com:443 { # 你的 Agent 连接 Dashboard 的域名
-    reverse_proxy {
-        to localhost:5555
-        transport http {
-            versions h2c 2
-        }
-    }
-}

Dashboard 面板端配置

  • 首先登录面板进入管理后台 打开设置页面,在 未接入CDN的面板服务器域名/IP 中填入上一步在 Nginx 或 Caddy 中配置的域名 比如 data.example.com ,并保存。
  • 然后在面板服务器中,打开 /opt/nezha/dashboard/data/config.yaml 文件,将 proxygrpcport 修改为 Nginx 或 Caddy 监听的端口,比如上一步设置的 443 ;因为我们在 Nginx 或 Caddy 中开启了 SSL/TLS,所以需要将 tls 设置为 true ;修改完成后重启面板。

Agent 端配置

  • 登录面板管理后台,复制一键安装命令,在对应的服务器上面执行一键安装命令重新安装 agent 端即可。

开启 Cloudflare CDN(可选)

根据 Cloudflare gRPC 的要求:gRPC 服务必须侦听 443 端口 且必须支持 TLS 和 HTTP/2。 所以如果需要开启 CDN,必须在配置 Nginx 或者 Caddy 反向代理 gRPC 时使用 443 端口,并配置证书(Caddy 会自动申请并配置证书)。

  • 登录 Cloudflare,选择使用的域名。打开 网络 选项将 gRPC 开关打开,打开 DNS 选项,找到 Nginx 或 Caddy 反代 gRPC 配置的域名的解析记录,打开橙色云启用 CDN。

开启gRPC后,可能不能立即可用,需要等待一段时间。具体可通过curl和使用nezha-agent -d来验证:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
-* processing: https://xxx.xxx.ovh
-*   Trying [2606:4700:3035::ac43:8bed]:443...
-* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
-# ... SSL info
-* using HTTP/2
-* h2 [:method: GET]
-* h2 [:scheme: https]
-* h2 [:authority: xxx.xxx.ovh]
-* h2 [:path: /]
-* h2 [user-agent: curl/8.2.1]
-* h2 [accept: */*]
-* Using Stream ID: 1
-> GET / HTTP/2
-> Host: xxx.xxx.ovh
-> User-Agent: curl/8.4.0
-> Accept: */*
-> content-type: application/grpc+proto
-> authorization: Bearer test
-> 
-< HTTP/2 405 
-< date: Wed, 20 Dec 2023 08:56:27 GMT
-< content-type: application/grpc+proto
-< cf-ray: 8386ac12dabd5ddc-HKG
-< cf-cache-status: DYNAMIC
-< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
-< grpc-status: 13
-< report-to: {"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
-< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
-< vary: Accept-Encoding
-< server: cloudflare
-< alt-svc: h3=":443"; ma=86400
-< 
-* Connection #0 to host xxx.xxx.ovh left intact
-localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
-NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
-NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # 需要修改主控端 /opt/nezha/dashboard/data/config.yaml的 GRPCHost 和 TLS 选项
-NEZHA@2023-12-20 05:14:01>> Error to close connection ...
`,15),t=[p];function h(k,e,d,r,g,E){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{o as __pageData,y as default}; diff --git a/assets/guide_q3.md.0iIre3Mh.lean.js b/assets/guide_q3.md.0iIre3Mh.lean.js deleted file mode 100644 index aa8f521f..00000000 --- a/assets/guide_q3.md.0iIre3Mh.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const o=JSON.parse('{"title":"反向代理 gRPC 端口(支持 Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1732521523000}'),l={name:"guide/q3.md"},p=n("",15),t=[p];function h(k,e,d,r,g,E){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{o as __pageData,y as default}; diff --git a/assets/guide_q4.md.Dn-_zD5O.js b/assets/guide_q4.md.Dn-_zD5O.js deleted file mode 100644 index c5c154b0..00000000 --- a/assets/guide_q4.md.Dn-_zD5O.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as o,o as s,j as e,a as t}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"实时通道断开","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1732521523000}'),l={name:"guide/q4.md"},d=e("h1",{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("确认你的反代规则中针对 "),e("code",null,"/ws"),t(", "),e("code",null,"/terminal"),t(" 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置。")])],-1),r=[d,n];function c(i,_,u,h,m,p){return s(),o("div",null,r)}const k=a(l,[["render",c]]);export{b as __pageData,k as default}; diff --git a/assets/guide_q4.md.Dn-_zD5O.lean.js b/assets/guide_q4.md.Dn-_zD5O.lean.js deleted file mode 100644 index c5c154b0..00000000 --- a/assets/guide_q4.md.Dn-_zD5O.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as o,o as s,j as e,a as t}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"实时通道断开","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1732521523000}'),l={name:"guide/q4.md"},d=e("h1",{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("确认你的反代规则中针对 "),e("code",null,"/ws"),t(", "),e("code",null,"/terminal"),t(" 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置。")])],-1),r=[d,n];function c(i,_,u,h,m,p){return s(),o("div",null,r)}const k=a(l,[["render",c]]);export{b as __pageData,k as default}; diff --git a/assets/guide_q5.md.gjm3BXS-.js b/assets/guide_q5.md.gjm3BXS-.js deleted file mode 100644 index 3440bff9..00000000 --- a/assets/guide_q5.md.gjm3BXS-.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as l,o,j as e,a as t}from"./chunks/framework.BmdFiWrL.js";const x=JSON.parse('{"title":"如何进行数据迁移、备份恢复?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1732521523000}'),n={name:"guide/q5.md"},s=e("h1",{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 o(),l("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default}; diff --git a/assets/guide_q5.md.gjm3BXS-.lean.js b/assets/guide_q5.md.gjm3BXS-.lean.js deleted file mode 100644 index 3440bff9..00000000 --- a/assets/guide_q5.md.gjm3BXS-.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as l,o,j as e,a as t}from"./chunks/framework.BmdFiWrL.js";const x=JSON.parse('{"title":"如何进行数据迁移、备份恢复?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1732521523000}'),n={name:"guide/q5.md"},s=e("h1",{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 o(),l("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default}; diff --git a/assets/guide_q6.md.Cc68Y45X.js b/assets/guide_q6.md.Cc68Y45X.js deleted file mode 100644 index c015425a..00000000 --- a/assets/guide_q6.md.Cc68Y45X.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"如何每月重置流量统计?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1732521523000}'),i={name:"guide/q6.md"},c=o('

如何每月重置流量统计?

主页中的流量统计每次服务器重启时都会重置,如果要实现每月重置一次流量计数,可以这样实现:

  1. 进入管理面板的 告警
  2. 参考这篇文档,创建一个月流量告警
  3. 返回主页,在 服务 页中就可以看到月流量统计了,这里的统计数据不会因为服务器重启而重置

TIP

此方式可以设置任何周期,包括且不限于每小时/每天/每周/每月/每年重置流量统计,非常灵活!

',4),s=[c];function d(l,_,r,n,p,h){return a(),t("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/guide_q6.md.Cc68Y45X.lean.js b/assets/guide_q6.md.Cc68Y45X.lean.js deleted file mode 100644 index e8aca2ea..00000000 --- a/assets/guide_q6.md.Cc68Y45X.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"如何每月重置流量统计?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1732521523000}'),i={name:"guide/q6.md"},c=o("",4),s=[c];function d(l,_,r,n,p,h){return a(),t("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/guide_q7.md.BrDNRaw0.js b/assets/guide_q7.md.BrDNRaw0.js deleted file mode 100644 index 4f8dbe32..00000000 --- a/assets/guide_q7.md.BrDNRaw0.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as s,a4 as i}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"自定义 Agent 监控项目","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1732521523000}'),t={name:"guide/q7.md"},d=i('

自定义 Agent 监控项目

自定义监控的网卡和硬盘分区

执行以下命令来选择网卡和分区,然后重启 Agent 即可生效:

bash
/opt/nezha/agent/nezha-agent edit

其他运行参数

查看支持的参数

要查看支持的运行参数,请执行以下命令:

bash
./nezha-agent --help

配置参数

如果您通过一键脚本安装了 Agent,可以通过编辑系统服务配置来添加或修改参数。编辑文件 /etc/systemd/system/nezha-agent.service,并在 ExecStart= 行的末尾添加您需要的参数:

TIP

如果您需要批量添加参数,可以利用 Dashboard 的计划任务功能。以禁用 Agent 自动更新功能为例,您可以设置一个计划任务。添加以下命令以修改系统服务配置,并触发该任务执行:

bash
sed -i '/^ExecStart=/ s/$/ --disable-auto-update/' /etc/systemd/system/nezha-agent.service && systemctl daemon-reload
  • --report-delay:设置系统信息上报的间隔时间。默认为 1 秒。为了降低系统资源占用,可以设置为 3(有效范围:1-4 秒)。
  • --skip-conn:不监控网络连接数。建议在连接数较多或 CPU 资源占用较高的服务器上使用此参数。
  • --skip-procs:不监控进程数,有助于降低 Agent 的资源占用。
  • --disable-auto-update:禁用 Agent 的自动更新功能,增强安全性。
  • --disable-force-update:禁用 Agent 的强制更新功能,增强安全性。
  • --disable-command-execute:禁止在 Agent 上执行任何定时任务或使用在线终端,增强安全性。
  • --tls:启用 SSL/TLS 加密。当您使用 nginx 反向代理 Agent 的 gRPC 连接且 nginx 配置了 SSL/TLS 时,应启用此配置。
  • --use-ipv6-countrycode:强制使用 IPv6 地址查询国家代码。默认情况下,Agent 使用 IPv4 地址查询国家代码,如果服务器支持 IPv6 且与 IPv4 地址的国家代码不同,可以使用此参数。
  • --gpu:启用 GPU 监控。注意:GPU 使用率监控可能需要安装额外的依赖包,详细信息可以参考文档:启用 GPU 监控
  • --temperature:启用硬件温度监控。仅支持的硬件有效,部分 VPS 可能无法获取温度信息。
  • -d --debug:启用调试模式。
  • -u --ip-report-period:本地IP更新间隔, 如果这个值小于 --report-delay 设置的值,那么以 --report-delay 的值为准。默认为1800秒(30分钟)。
  • -k --insecure:禁用证书检查,适用于使用自签证书的场景。
',12),o=[d];function l(n,c,h,p,r,g){return s(),a("div",null,o)}const b=e(t,[["render",l]]);export{u as __pageData,b as default}; diff --git a/assets/guide_q7.md.BrDNRaw0.lean.js b/assets/guide_q7.md.BrDNRaw0.lean.js deleted file mode 100644 index 5ea93f39..00000000 --- a/assets/guide_q7.md.BrDNRaw0.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as s,a4 as i}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"自定义 Agent 监控项目","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1732521523000}'),t={name:"guide/q7.md"},d=i("",12),o=[d];function l(n,c,h,p,r,g){return s(),a("div",null,o)}const b=e(t,[["render",l]]);export{u as __pageData,b as default}; diff --git a/assets/guide_q8.md.BsCGKX4S.js b/assets/guide_q8.md.BsCGKX4S.js deleted file mode 100644 index 1a129491..00000000 --- a/assets/guide_q8.md.BsCGKX4S.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as e,c as a,o as d,a4 as o}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"使用 Cloudflare Access 作为 OAuth2 提供方","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1732521523000}'),c={name:"guide/q8.md"},s=o(`

使用 Cloudflare Access 作为 OAuth2 提供方

相较于 Github,Cloudflare Access 对于中国大陆用户更加友好。如您当前使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,您可以考虑切换 Cloudflare Access 作为 OAuth2 提供方

示例配置:

yaml
Oauth2:
-  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
-  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
-  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
-  Endpoint: "https://xxxxx.cloudflareaccess.com"
-  Type: cloudflare

配置说明:

参数获取方式
AdminMy Team -> Users -> <具体用户> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> 只保留协议+域名的部分,路径不需要

新建 SaaS-OIDC 应用流程

前往 Zero Trust Dashboard:https://one.dash.cloudflare.com/,选择或新建一个账户(Account),然后按照以下步骤操作:

  1. My Team -> Users -> 点击<具体用户> -> 获取 User ID 并保存 (如果是第一次使用 Zero Trust,Users 列表会为空,可暂时跳过这一步;你需要完成一次验证后,用户才会出现在 Users 列表中)
  2. Access -> Applications -> Add an Application;
  3. 选择 SaaS,在 Application 字段中输入自定义的应用名称(例如 nezha),选择 OIDC 后点击 Add application;
  4. Scopes 选择 openid, email, profile, groups;
  5. Redirect URLs 中填写你的 Dashboard Callback 地址,例如 https://dashboard.example.com/oauth2/callback;
  6. 分别记录 Client IDClient SecretIssuer 地址中的协议与域名部分,例如 https://xxxxx.cloudflareaccess.com;
  7. 编辑 Dashboard 配置文件(通常位于 /opt/nezha/dashboard/data/config.yaml),参照示例配置修改 OAuth2 设置,并重启 Dashboard 服务。

身份验证策略配置

在完成 Dashboard 设置后,您还需要在 Zero Trust Dashboard 中配置身份验证策略,路径为:Access -> Applications -> <应用名> -> Policies。您可以选择多种 SSO 验证方式,包括邮件 OTP 验证、硬件密钥验证等,详细配置请参考 Cloudflare Zero Trust 文档

策略配置示例(One-time PIN)

默认使用邮件 OTP 验证方式:

  1. Access -> Applications -> <应用名> -> Policies -> Add a policy;
  2. 设置一个 Policy Name,例如 OTPAction 设置为 Allow;
  3. Configure rules 下新增一条 Include 规则,Selector 选择 Emails,在文本框中输入你的邮箱地址;
  4. 点击 Save policy 保存策略。

测试策略

  1. 在配置正确的情况下,访问 Dashboard 登录界面,会显示为 使用 Cloudflare 账号登录,点击登录会跳转到 Cloudflare Access 登录页面;
  2. 输入前面配置的 Email 地址,点击 Send me a code,输入收到的验证码,即可登录 Dashboard;
  3. 如果在之前的步骤中,未在 Admin 中未填写 User ID,登录后会提示错误信息:“该用户不是本站点管理员,无法登录”。此时需要在 My Team -> Users 中找到对应的用户,点击用户名获取 User ID 并填写到 Dashboard 配置文件里的 Admin 部分,重启 Dashboard 服务后再次尝试登录。
`,16),t=[s];function i(l,r,n,h,p,u){return d(),a("div",null,t)}const b=e(c,[["render",i]]);export{g as __pageData,b as default}; diff --git a/assets/guide_q8.md.BsCGKX4S.lean.js b/assets/guide_q8.md.BsCGKX4S.lean.js deleted file mode 100644 index a0bfbdde..00000000 --- a/assets/guide_q8.md.BsCGKX4S.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as d,a4 as o}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"使用 Cloudflare Access 作为 OAuth2 提供方","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1732521523000}'),c={name:"guide/q8.md"},s=o("",16),t=[s];function i(l,r,n,h,p,u){return d(),a("div",null,t)}const b=e(c,[["render",i]]);export{g as __pageData,b as default}; diff --git a/assets/guide_q9.md.EqT3EdyS.js b/assets/guide_q9.md.EqT3EdyS.js deleted file mode 100644 index a780e245..00000000 --- a/assets/guide_q9.md.EqT3EdyS.js +++ /dev/null @@ -1,14 +0,0 @@ -import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"启用 GPU 监控","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q9.md","filePath":"guide/q9.md","lastUpdated":1732521523000}'),n={name:"guide/q9.md"},t=e(`

启用 GPU 监控

GPU 监控是哪吒监控 v0.17.x 引入的新功能,使用前请检查您的 Dashboard 版本是否为 v0.17.2+ / Agent 版本是否为 v0.17.0+。

启用

通过启动参数

在 Agent 运行参数后添加 --gpu 即可。例如:

bash
/opt/nezha/agent/nezha-agent -s example.com:5555 -p example --gpu

通过配置文件

执行以下命令修改 Agent 配置文件以启用 GPU 监控:

bash
/opt/nezha/agent/nezha-agent edit

在返回的互动菜单中选择启用 GPU 功能即可。

打开 GPU 占用率监控支持

GPU 型号与 GPU 使用率为两个不同的监控项目,使用了不同实现获取。

其中 Windows 和 macOS 支持无依赖获取 GPU 使用率,并支持多个品牌显卡;

Linux 平台则仅支持 NVIDIA / AMD 显卡,且需要安装额外依赖。

以下将介绍如何在 Linux 上为 NVIDIA / AMD 显卡启用 GPU 使用率监控。

NVIDIA

NVIDIA 显卡获取 GPU 使用率需要用到 nvidia-smi 工具,一般为官方驱动自带。

如果您使用的是非官方驱动,例如 nouveau,那么将无法获取 GPU 使用率。

AMD

AMD 显卡获取 GPU 使用率需要安装 amdgpu 开源驱动和 rocm-smi 工具。

主流系统均已打包 rocm-smi ,以下是部分系统的安装命令:

bash
# Arch Linux
-pacman -Sy rocm-smi-lib
-
-# Debian / Ubuntu
-apt install rocm-smi
-
-# Fedora / RHEL 8+
-dnf install rocm-smi

如果您的系统并没有相应包,那么则需要手动编译安装 rocm_smi_lib

您的系统需要安装这些依赖:git cmake gcc

首先 Clone rocm_smi_lib 的 git 仓库:

bash
git clone https://github.com/ROCm/rocm_smi_lib

然后进行编译并安装即可。

bash
cd rocm_smi_lib
-mkdir -p build
-cd build
-cmake ..
-make -j $(nproc)
-# Install library file and header; default location is /opt/rocm
-make install
`,28),p=[t];function l(h,d,k,c,o,r){return i(),a("div",null,p)}const u=s(n,[["render",l]]);export{F as __pageData,u as default}; diff --git a/assets/guide_q9.md.EqT3EdyS.lean.js b/assets/guide_q9.md.EqT3EdyS.lean.js deleted file mode 100644 index c4b7d411..00000000 --- a/assets/guide_q9.md.EqT3EdyS.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as i,a4 as e}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"启用 GPU 监控","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/q9.md","filePath":"guide/q9.md","lastUpdated":1732521523000}'),n={name:"guide/q9.md"},t=e("",28),p=[t];function l(h,d,k,c,o,r){return i(),a("div",null,p)}const u=s(n,[["render",l]]);export{F as __pageData,u as default}; diff --git a/assets/guide_servers.md.BFOMkC1j.js b/assets/guide_servers.md.BFOMkC1j.js deleted file mode 100644 index f1f122ca..00000000 --- a/assets/guide_servers.md.BFOMkC1j.js +++ /dev/null @@ -1,33 +0,0 @@ -import{_ as s,c as a,o as n,a4 as i}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1732521523000}'),t={name:"guide/servers.md"},e=i(`

服务器

介绍

服务器区域负责管理 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 粘贴。
连接失败请参考实时通道断开/在线终端连接失败

FM

Dashboard v0.19.1 / Agent v0.19.0 加入的新功能,是嵌入 WebShell 的一个伪文件管理器,提供文件下载和上传功能,也可以进行目录跳转或者复制路径。点击 WebShell 右下角的蓝色按钮就可以打开。

公开备注示例

ServerStatus主题agent账单信息展示

点击展开/收起

配置位置:后台-> 服务器 -> 编辑服务器 -> 公开备注

完整配置,包含过期时间和价格展示

json
{
-   "billingDataMod": {
-       "startDate": "2024-10-01T00:00:00+08:00",
-       "endDate": "2024-11-01T00:00:00+08:00",
-       "autoRenewal": "1",
-       "cycle": "月",
-       "amount": "$3.99"
-   }
-}

单独配置过期时间

json
{
-   "billingDataMod": {
-       "startDate": "2024-10-01T00:00:00+08:00",
-       "endDate": "2024-11-01T00:00:00+08:00",
-       "autoRenewal": "1",
-       "cycle": "月"
-   }
-}

配置详细说明:

startDate 账单开始时间

格式如 2022-04-01T23:59:59+08:00

endDate 账单到期时间

格式如 2022-05-01T23:59:59+08:00
-当以0000-00-00开头时,表示账单无期限,适用于永久免费的vps,如0000-00-00T23:59:59+08:00

Date格式说明

分3部分
-1. 日期:2022-04-01
-2. 时间:T23:59:59
-3. 时区:+08:00
-例如:
-2024-10-01T23:59:59+05:00
-2024-09-21T12:00:00-05:00
-2024-03-15T23:59:59+00:00

autoRenewal 自动续期

支持值
-1:自动续期
-0:不自动续期
-当设置 "autoRenewal": 1 时,程序会根据当前时间自动判断,vps账单到期后无需手动更改startDate和endDate

amount 价格

格式如 $9.99 、€19.92 、¥199、19.99HKD、9.99USD、49.99CNY
-如果vps是免费的,请设置为"0" , 如 "amount": "0", 前台展示为 FREE
-如果vps是按量收费,请设置为"-1" , 如 "amount": "-1", 前台展示为PAYG

cycle 付费周期

支持格式(英文大小写字母都支持,大小写字母混用也支持)
-1. 月、month、monthly、m、mo
-2. 季、quarterly、q
-3. 半年、半、half、semi-annually、h
-4. 年、year、annually、y、yr
`,18),l=[e];function p(h,o,r,d,k,c){return n(),a("div",null,l)}const E=s(t,[["render",p]]);export{g as __pageData,E as default}; diff --git a/assets/guide_servers.md.BFOMkC1j.lean.js b/assets/guide_servers.md.BFOMkC1j.lean.js deleted file mode 100644 index 82570b04..00000000 --- a/assets/guide_servers.md.BFOMkC1j.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as a,o as n,a4 as i}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1732521523000}'),t={name:"guide/servers.md"},e=i("",18),l=[e];function p(h,o,r,d,k,c){return n(),a("div",null,l)}const E=s(t,[["render",p]]);export{g as __pageData,E as default}; diff --git a/assets/guide_services.md.C_O0Sby9.js b/assets/guide_services.md.C_O0Sby9.js deleted file mode 100644 index e010e823..00000000 --- a/assets/guide_services.md.C_O0Sby9.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"服务监控","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1732521523000}'),r={name:"guide/services.md"},i=o('

服务监控

服务区域是设置 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 的名称来切换图表。在图表中,可以取消勾选目标服务器的名称来隐藏或显示对应的数据。

管理监控

如需对已有的服务监控进行管理,可以前往管理面板中的“服务”页。选择一条监控配置,点击右侧的图标进行编辑或删除。

',16),n=[i];function l(s,c,d,p,g,h){return a(),t("div",null,n)}const P=e(r,[["render",l]]);export{_ as __pageData,P as default}; diff --git a/assets/guide_services.md.C_O0Sby9.lean.js b/assets/guide_services.md.C_O0Sby9.lean.js deleted file mode 100644 index 5200afea..00000000 --- a/assets/guide_services.md.C_O0Sby9.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"服务监控","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1732521523000}'),r={name:"guide/services.md"},i=o("",16),n=[i];function l(s,c,d,p,g,h){return a(),t("div",null,n)}const P=e(r,[["render",l]]);export{_ as __pageData,P as default}; diff --git a/assets/guide_settings.md.BQBL08BB.js b/assets/guide_settings.md.BQBL08BB.js deleted file mode 100644 index 52c2bb9d..00000000 --- a/assets/guide_settings.md.BQBL08BB.js +++ /dev/null @@ -1,309 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1732521523000}'),h={name:"guide/settings.md"},k=n(`

设置

站点标题

你可以在此项中自定义站点标题。

管理员列表

  • 如果你修改了自己的 Github、Gitlab 或 Gitee 的用户名,需要在此项中同步修改,否则无法登录。多个用户请用逗号隔开:user1,user2
  • 如需更改管理员账户,请前往 /opt/nezha/dashboard/data/config.yaml,重新设置新的管理员 Client IDClient Secret

界面主题

在这里选择主页和管理界面主题,如果选项中没有某个已存在的主题,请更新面板。

使用自定义主页主题需要创建主题描述文件,关于自定义主题更多信息请参考哪吒主题开发环境

启用管理界面 Custom 主题前,你需要提前安装自定义主题,否则启用该项后,面板将无法正常显示。

Language

哪吒监控目前支持以下语言:

  • 简体中文
  • 繁體中文
  • English
  • Español

我们欢迎您对翻译进行勘误或贡献更多语言。

自定义代码 (style, script)

可以在此修改 LOGO、修改色调、添加美化代码和统计代码等。

WARNING

自定义代码仅在游客首页生效,管理面板不生效。由于不同主题的代码不同,如确需修改管理面板中的内容,请修改 Docker 中的主题文件。

默认主题更改进度条颜色、背景图片、导航栏等效果示例

点击展开/收起
html
<style>
-/* 屏幕适配 */
-@media only screen and (min-width: 1200px) {
-    .ui.container {
-    width: 80% !important;
-}
-}
-
-@media only screen and (max-width: 767px) {
-    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
-        margin-top: 0.4em !important;
-    }
-}
-
-/* 整体图标 */
-i.icon {
-    color: #000;
-    width: 1.2em !important;
-}
-
-/* 背景图片 */
-body {
-    content: " " !important;
-    background: fixed !important;
-    z-index: -1 !important;
-    top: 0 !important;
-    right: 0 !important;
-    bottom: 0 !important;
-    left: 0 !important;
-    background-position: top !important;
-    background-repeat: no-repeat !important;
-    background-size: cover !important;
-    background-image: url(https://backgroud.img) !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
-
-/* 导航栏 */
-.ui.large.menu {
-    border: 0 !important;
-    border-radius: 0px !important;
-    background-color: rgba(255, 255, 255, 55%) !important;
-}
-
-/* 首页按钮 */
-.ui.menu .active.item {
-    background-color: transparent !important;
-}
-
-/* 导航栏下拉框 */
-.ui.dropdown .menu {
-    border: 0 !important;
-    border-radius: 0 !important;
-    background-color: rgba(255, 255, 255, 80%) !important;
-}
-
-/* 登录按钮 */
-.nezha-primary-btn {
-    background-color: transparent !important;
-    color: #000 !important;
-}
-
-/* 大卡片 */
-#app .ui.fluid.accordion {
-    background-color: #fbfbfb26 !important;
-    border-radius: 0.4rem !important;
-}
-
-/* 小卡片 */
-.ui.four.cards>.card {
-    border-radius: 0.6rem !important;
-    background-color: #fafafaa3 !important;
-}
-
-.status.cards .wide.column {
-    padding-top: 0 !important;
-    padding-bottom: 0 !important;
-    height: 3.3rem !important;
-}
-
-.status.cards .three.wide.column {
-    padding-right: 0rem !important;
-}
-
-.status.cards .wide.column:nth-child(1) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .wide.column:nth-child(2) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .description {
-    padding-bottom: 0 !important;
-}
-
-/* 服务器名 */
-.status.cards .flag {
-    margin-right: 0.5rem !important;
-}
-
-/* 弹出卡片图标 */
-.status.cards .header > .info.icon {
-    margin-right: 0 !important;
-}
-
-.nezha-secondary-font {
-    color: #2175ba !important;
-}
-
-/* 上传下载 */
-.status.cards .outline.icon {
-    margin-right: 1px !important;
-}
-
-i.arrow.alternate.circle.down.outline.icon {
-    color: #2175ba !important;
-}
-
-i.arrow.alternate.circle.up.outline.icon {
-    color: red !important;
-}
-
-/* 弹出卡片小箭头 */
-.ui.right.center.popup {
-    margin: -3px 0 0 0.914286em !important;
-    -webkit-transform-origin: left 50% !important;
-    transform-origin: left 50% !important;
-}
-
-.ui.bottom.left.popup {
-    margin-left: 1px !important;
-    margin-top: 3px !important;
-}
-
-.ui.top.left.popup {
-    margin-left: 0 !important;
-    margin-bottom: 10px !important;
-}
-
-.ui.top.right.popup {
-    margin-right: 0 !important;
-    margin-bottom: 8px !important;
-}
-
-.ui.left.center.popup {
-    margin: -3px .91428571em 0 0 !important;
-    -webkit-transform-origin: right 50% !important;
-    transform-origin: right 50% !important;
-}
-
-.ui.right.center.popup:before,
-.ui.left.center.popup:before {
-    border: 0px solid #fafafaeb !important;
-    background: #fafafaeb !important;
-}
-
-.ui.top.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.bottom.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.bottom.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.top.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.top.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.left.center.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-/* 弹出卡片 */
-.status.cards .ui.content.popup {
-    min-width: 20rem !important;
-    line-height: 2rem !important;
-    border-radius: 5px !important;
-    border: 1px solid transparent !important;
-    background-color: #fafafaeb !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
-
-.ui.content {
-    margin: 0 !important;
-    padding: 1em !important;
-}
-
-/* 服务页 */
-.ui.table {
-    background: RGB(225,225,225,0.6) !important;
-}
-
-.ui.table thead th {
-    background: transparent !important;
-}
-
-/* 服务页进度条 */
-.service-status .good {
-    background-color: #2175ba !important;
-}
-
-.service-status .danger {
-    background-color: red !important;
-}
-
-.service-status .warning {
-    background-color: orange !important;
-}
-
-/* 版权 */
-.ui.inverted.segment, .ui.primary.inverted.segment {
-    color: #000 !important;
-    font-weight: bold !important;
-    background-color: #fafafaa3 !important;
-}
-</style>
-
-<!--Logo和版权-->
-<script>
-window.onload = function(){
-var avatar=document.querySelector(".item img")
-var footer=document.querySelector("div.is-size-7")
-footer.innerHTML="Copyright info"
-footer.style.visibility="visible"
-avatar.src="https:/img.src"
-avatar.style.visibility="visible"
-}
-</script>

DayNight 主题更改进度条颜色、修改页脚示例(来自 @hyt-allen-xu @tech-fever

点击展开/收起
html
<style>
-.ui.fine.progress> .progress-bar {
-  background-color: #00a7d0 !important;
-}
-</style>
-
-<script>
-window.onload = function(){
-  var avatar = document.querySelector("img");
-  var footer = document.querySelector("div.footer-container");
-  footer.innerHTML = "©2021 你的名字 & Powered by 你的名字";
-  footer.style.visibility = "visible";
-  avatar.src = "你的图片连接";
-  avatar.style.visibility = "visible";
-}
-</script>

默认主题修改 LOGO、修改页脚示例(来自 @iLay1678

点击展开/收起
html
<style>
-.right.menu>a {
-  visibility: hidden;
-}
-.footer .is-size-7 {
-  visibility: hidden;
-}
-.item img {
-  visibility: hidden;
-}
-</style>
-<script>
-window.onload = function() {
-  var avatar = document.querySelector(".item img");
-  var footer = document.querySelector("div.is-size-7");
-  footer.innerHTML = "Powered by 你的名字";
-  footer.style.visibility = "visible";
-  avatar.src = "你的方形 logo 地址";
-  avatar.style.visibility = "visible";
-}
-</script>

hotaru 主题更改背景图片示例

点击展开/收起
html
<style>
-.hotaru-cover {
-   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
-}
-</style>

前台查看密码

如果你不想向游客直接展示你的 Dashboard,可以在这里设置一个查看密码。设置密码后,需要输入密码才可以访问主页。

未接入 CDN 的面板服务器域名/IP

此项设置是使用一键脚本安装 Agent 的前提,详情请查看这里

IP 变更提醒

如果你希望当某个服务器的 IP 发生变更时收到通知,可以在这里进行设置。

覆盖范围

在这里选择一条规则,来确定需要监控哪些服务器,可以根据自己的需求进行选择。

特定服务器

配合覆盖范围的设置,在这里设置选定规则的排除项。

提醒发送至指定的通知分组

选择通知方式,通知方式请提前在“告警”页内设置。

WARNING

设置完成后,勾选启用时,通知生效

通知中显示完整 IP 地址

IP 变更通知默认隐藏完整 IP,如果你不希望隐藏,可以勾选“通知信息中显示完整 IP 地址”。

禁止主页切换主题

Dashboard 默认启用允许访客修改显示主题的功能,此功能只会影响单一访客,不会影响管理员在后台设置的启用主题。如果你不希望访客切换主题,可以勾选此项。

`,41),p=[k];function l(t,e,E,r,d,g){return a(),i("div",null,p)}const C=s(h,[["render",l]]);export{F as __pageData,C as default}; diff --git a/assets/guide_settings.md.BQBL08BB.lean.js b/assets/guide_settings.md.BQBL08BB.lean.js deleted file mode 100644 index 978f2e9d..00000000 --- a/assets/guide_settings.md.BQBL08BB.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1732521523000}'),h={name:"guide/settings.md"},k=n("",41),p=[k];function l(t,e,E,r,d,g){return a(),i("div",null,p)}const C=s(h,[["render",l]]);export{F as __pageData,C as default}; diff --git a/assets/guide_tasks.md.BzPghW25.js b/assets/guide_tasks.md.BzPghW25.js deleted file mode 100644 index 59c9cea0..00000000 --- a/assets/guide_tasks.md.BzPghW25.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as o,o as e,a4 as r}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"任务管理","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1732521523000}'),a={name:"guide/tasks.md"},s=r('

任务管理

在任务区域中,可以设置计划任务,触发任务,多服务器批量执行任务

哪吒监控支持推送命令到 Agent 执行,此功能非常灵活。使用此功能可以定期结合 restic、rclone 给服务器备份,定期重启某项服务来重置网络连接。也可以配合告警通知,在触发告警时执行某项任务,例如在 CPU 长时间高占用的情况下运行某个脚本。

使用方法

进入管理面板的“任务”页,点击“添加计划任务”。添加计划任务时,你需要填入以下参数:

  • 名称:自定义一个任务名称。

  • 任务类型:选择任务的类型。

    • 计划任务:按下方设置的计划时间,周期性执行任务。
    • 触发任务:仅被 API 或告警规则触发的任务,每次触发执行一次。
  • 计划:设置计划时间(使用触发任务类型时不生效),时间格式为:* * * * * *,分别对应秒 分 时 天 月 星期,详情见计划表达式格式
    例如:0 0 3 * * * 对应为“每天 3 点”。

  • 命令:设置需要执行的命令,就像写 Shell/Bat 脚本一样,但不推荐换行,多个命令使用 &&/& 连接。
    例如执行定期重启命令,可以在这里输入 reboot

  • 覆盖范围特定服务器:选择规则来确定哪些 Agent 执行计划任务,类似于“服务”页中的设置。使用触发任务类型时,可选择“由触发的服务器执行”。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 推送成功的消息:勾选此项,任务执行成功后会触发消息通知。

管理任务

如需对已有的计划任务进行管理,可以前往管理面板中的“任务”页。选择一条任务配置,右侧的三个图标分别是:

  • 立即执行:点击后将忽略计划时间,立刻执行任务。
  • 编辑:点击可以修改任务配置。
  • 删除:删除这条计划任务。

常见问题

  1. xxx 命令找不到
    如果运行失败,提示 xxx 命令找不到,可能是 PATH 环境变量的问题。在 Linux 服务器上,可以在命令开头加入 source ~/.bashrc,或者使用绝对路径执行命令。
',11),n=[s];function i(l,c,d,g,p,h){return e(),o("div",null,n)}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/guide_tasks.md.BzPghW25.lean.js b/assets/guide_tasks.md.BzPghW25.lean.js deleted file mode 100644 index dca8a5ed..00000000 --- a/assets/guide_tasks.md.BzPghW25.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as o,o as e,a4 as r}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"任务管理","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1732521523000}'),a={name:"guide/tasks.md"},s=r("",11),n=[s];function i(l,c,d,g,p,h){return e(),o("div",null,n)}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/index.md.YzXpf9jM.js b/assets/index.md.YzXpf9jM.js deleted file mode 100644 index 03daab15..00000000 --- a/assets/index.md.YzXpf9jM.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return a(),t("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default}; diff --git a/assets/index.md.YzXpf9jM.lean.js b/assets/index.md.YzXpf9jM.lean.js deleted file mode 100644 index 03daab15..00000000 --- a/assets/index.md.YzXpf9jM.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.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":1732521523000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return a(),t("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default}; diff --git a/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 deleted file mode 100644 index b6b603d5..00000000 Binary files a/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 and /dev/null differ diff --git a/assets/inter-italic-cyrillic.By2_1cv3.woff2 b/assets/inter-italic-cyrillic.By2_1cv3.woff2 deleted file mode 100644 index def40a4f..00000000 Binary files a/assets/inter-italic-cyrillic.By2_1cv3.woff2 and /dev/null differ diff --git a/assets/inter-italic-greek-ext.1u6EdAuj.woff2 b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 deleted file mode 100644 index e070c3d3..00000000 Binary files a/assets/inter-italic-greek-ext.1u6EdAuj.woff2 and /dev/null differ diff --git a/assets/inter-italic-greek.DJ8dCoTZ.woff2 b/assets/inter-italic-greek.DJ8dCoTZ.woff2 deleted file mode 100644 index a3c16ca4..00000000 Binary files a/assets/inter-italic-greek.DJ8dCoTZ.woff2 and /dev/null differ diff --git a/assets/inter-italic-latin-ext.CN1xVJS-.woff2 b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 deleted file mode 100644 index 2210a899..00000000 Binary files a/assets/inter-italic-latin-ext.CN1xVJS-.woff2 and /dev/null differ diff --git a/assets/inter-italic-latin.C2AdPX0b.woff2 b/assets/inter-italic-latin.C2AdPX0b.woff2 deleted file mode 100644 index 790d62dc..00000000 Binary files a/assets/inter-italic-latin.C2AdPX0b.woff2 and /dev/null differ diff --git a/assets/inter-italic-vietnamese.BSbpV94h.woff2 b/assets/inter-italic-vietnamese.BSbpV94h.woff2 deleted file mode 100644 index 1eec0775..00000000 Binary files a/assets/inter-italic-vietnamese.BSbpV94h.woff2 and /dev/null differ diff --git a/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 deleted file mode 100644 index 2cfe6153..00000000 Binary files a/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 and /dev/null differ diff --git a/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 deleted file mode 100644 index e3886dd1..00000000 Binary files a/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 and /dev/null differ diff --git a/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 deleted file mode 100644 index 36d67487..00000000 Binary files a/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 and /dev/null differ diff --git a/assets/inter-roman-greek.BBVDIX6e.woff2 b/assets/inter-roman-greek.BBVDIX6e.woff2 deleted file mode 100644 index 2bed1e85..00000000 Binary files a/assets/inter-roman-greek.BBVDIX6e.woff2 and /dev/null differ diff --git a/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 deleted file mode 100644 index 9a8d1e2b..00000000 Binary files a/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 and /dev/null differ diff --git a/assets/inter-roman-latin.Di8DUHzh.woff2 b/assets/inter-roman-latin.Di8DUHzh.woff2 deleted file mode 100644 index 07d3c53a..00000000 Binary files a/assets/inter-roman-latin.Di8DUHzh.woff2 and /dev/null differ diff --git a/assets/inter-roman-vietnamese.BjW4sHH5.woff2 b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 deleted file mode 100644 index 57bdc22a..00000000 Binary files a/assets/inter-roman-vietnamese.BjW4sHH5.woff2 and /dev/null differ diff --git a/assets/qrcode.b_bFVwtg.png b/assets/qrcode.b_bFVwtg.png deleted file mode 100644 index bf852b9c..00000000 Binary files a/assets/qrcode.b_bFVwtg.png and /dev/null differ diff --git a/assets/style.CuK3IKp4.css b/assets/style.CuK3IKp4.css deleted file mode 100644 index 266509b2..00000000 --- a/assets/style.CuK3IKp4.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: rgba(60, 60, 67);--vp-c-text-2: rgba(60, 60, 67, .78);--vp-c-text-3: rgba(60, 60, 67, .56)}.dark{--vp-c-text-1: rgba(255, 255, 245, .86);--vp-c-text-2: rgba(235, 235, 245, .6);--vp-c-text-3: rgba(235, 235, 245, .38)}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Heiti SC", "Microsoft YaHei", "DengXian", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.vpi-social-discord{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z'/%3E%3C/svg%3E")}.vpi-social-facebook{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z'/%3E%3C/svg%3E")}.vpi-social-github{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}.vpi-social-instagram{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.03.084c-1.277.06-2.149.264-2.91.563a5.874 5.874 0 0 0-2.124 1.388 5.878 5.878 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076.008 8.354-.005 8.764.001 12.023c.007 3.259.021 3.667.083 4.947.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.872 5.872 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063 3.257-.007 3.668-.021 4.947-.082 1.28-.06 2.147-.265 2.91-.563a5.881 5.881 0 0 0 2.123-1.388 5.881 5.881 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.892 5.892 0 0 0-1.387-2.123 5.857 5.857 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0 8.718.008 8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.736 3.736 0 0 1-1.382-.895 3.695 3.695 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.705 3.705 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895.421.42.681.817.9 1.378.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.705 3.705 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079-3.204.007-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008'/%3E%3C/svg%3E")}.vpi-social-linkedin{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E")}.vpi-social-mastodon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E")}.vpi-social-npm{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z'/%3E%3C/svg%3E")}.vpi-social-slack{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E")}.vpi-social-twitter,.vpi-social-x{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E")}.vpi-social-youtube{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s}.vp-doc blockquote>p{margin:0;font-size:16px;color:var(--vp-c-text-2);transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(.no-icon):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-c79a1216]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-c79a1216],.VPBackdrop.fade-leave-to[data-v-c79a1216]{opacity:0}.VPBackdrop.fade-leave-active[data-v-c79a1216]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-c79a1216]{display:none}}.NotFound[data-v-d6be1790]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-d6be1790]{padding:96px 32px 168px}}.code[data-v-d6be1790]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-d6be1790]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-d6be1790]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-d6be1790]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-d6be1790]{padding-top:20px}.link[data-v-d6be1790]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-d6be1790]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-b933a997]{position:relative;z-index:1}.nested[data-v-b933a997]{padding-right:16px;padding-left:16px}.outline-link[data-v-b933a997]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-b933a997]:hover,.outline-link.active[data-v-b933a997]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-b933a997]{padding-left:13px}.VPDocAsideOutline[data-v-a5bbad30]{display:none}.VPDocAsideOutline.has-outline[data-v-a5bbad30]{display:block}.content[data-v-a5bbad30]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-a5bbad30]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-a5bbad30]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-3f215769]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-3f215769]{flex-grow:1}.VPDocAside[data-v-3f215769] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-3f215769] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-3f215769] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-7e05ebdb]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-7e05ebdb]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-d4a0bba5]{margin-top:64px}.edit-info[data-v-d4a0bba5]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-d4a0bba5]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-d4a0bba5]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-d4a0bba5]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-d4a0bba5]{margin-right:8px}.prev-next[data-v-d4a0bba5]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-d4a0bba5]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-d4a0bba5]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-d4a0bba5]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-d4a0bba5]{margin-left:auto;text-align:right}.desc[data-v-d4a0bba5]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-d4a0bba5]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-39a288b8]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-39a288b8]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-39a288b8]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-39a288b8]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-39a288b8]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-39a288b8]{display:flex;justify-content:center}.VPDoc .aside[data-v-39a288b8]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-39a288b8]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-39a288b8]{max-width:1104px}}.container[data-v-39a288b8]{margin:0 auto;width:100%}.aside[data-v-39a288b8]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-39a288b8]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-39a288b8]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-39a288b8]::-webkit-scrollbar{display:none}.aside-curtain[data-v-39a288b8]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-39a288b8]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-39a288b8]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-39a288b8]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-39a288b8]{order:1;margin:0;min-width:640px}}.content-container[data-v-39a288b8]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-39a288b8]{max-width:688px}.VPButton[data-v-cad61b99]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-cad61b99]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-cad61b99]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-cad61b99]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-cad61b99]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-cad61b99]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-cad61b99]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-cad61b99]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-cad61b99]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-cad61b99]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-cad61b99]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-cad61b99]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-cad61b99]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-8426fc1a]{display:none}.dark .VPImage.light[data-v-8426fc1a]{display:none}.VPHero[data-v-303bb580]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-303bb580]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-303bb580]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-303bb580]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-303bb580]{flex-direction:row}}.main[data-v-303bb580]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-303bb580]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-303bb580]{text-align:left}}@media (min-width: 960px){.main[data-v-303bb580]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-303bb580]{max-width:592px}}.name[data-v-303bb580],.text[data-v-303bb580]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-303bb580],.VPHero.has-image .text[data-v-303bb580]{margin:0 auto}.name[data-v-303bb580]{color:var(--vp-home-hero-name-color)}.clip[data-v-303bb580]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-303bb580],.text[data-v-303bb580]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-303bb580],.text[data-v-303bb580]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-303bb580],.VPHero.has-image .text[data-v-303bb580]{margin:0}}.tagline[data-v-303bb580]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-303bb580]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-303bb580]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-303bb580]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-303bb580]{margin:0}}.actions[data-v-303bb580]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-303bb580]{justify-content:center}@media (min-width: 640px){.actions[data-v-303bb580]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-303bb580]{justify-content:flex-start}}.action[data-v-303bb580]{flex-shrink:0;padding:6px}.image[data-v-303bb580]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-303bb580]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-303bb580]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-303bb580]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-303bb580]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-303bb580]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-303bb580]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-303bb580]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-303bb580]{width:320px;height:320px}}[data-v-303bb580] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-303bb580] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-303bb580] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-a3976bdc]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-a3976bdc]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-a3976bdc]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-a3976bdc]>.VPImage{margin-bottom:20px}.icon[data-v-a3976bdc]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-a3976bdc]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-a3976bdc]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-a3976bdc]{padding-top:8px}.link-text-value[data-v-a3976bdc]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-a3976bdc]{margin-left:6px}.VPFeatures[data-v-a6181336]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-a6181336]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-a6181336]{padding:0 64px}}.container[data-v-a6181336]{margin:0 auto;max-width:1152px}.items[data-v-a6181336]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-a6181336]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-a6181336],.item.grid-4[data-v-a6181336],.item.grid-6[data-v-a6181336]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-a6181336],.item.grid-4[data-v-a6181336]{width:50%}.item.grid-3[data-v-a6181336],.item.grid-6[data-v-a6181336]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-a6181336]{width:25%}}.container[data-v-8e2d4988]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-8e2d4988]{padding:0 48px}}@media (min-width: 960px){.container[data-v-8e2d4988]{width:100%;padding:0 64px}}.vp-doc[data-v-8e2d4988] .VPHomeSponsors,.vp-doc[data-v-8e2d4988] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-8e2d4988] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-8e2d4988] .VPHomeSponsors a,.vp-doc[data-v-8e2d4988] .VPTeamPage a{text-decoration:none}.VPHome[data-v-686f80a6]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-686f80a6]{margin-bottom:128px}}.VPContent[data-v-1428d186]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-1428d186]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-1428d186]{margin:0}@media (min-width: 960px){.VPContent[data-v-1428d186]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-1428d186]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-1428d186]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-e315a0ad]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-e315a0ad]{display:none}.VPFooter[data-v-e315a0ad] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-e315a0ad] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-e315a0ad]{padding:32px}}.container[data-v-e315a0ad]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-e315a0ad],.copyright[data-v-e315a0ad]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-17a5e62e]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-17a5e62e]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-17a5e62e]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-17a5e62e]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-17a5e62e]{color:var(--vp-c-text-1)}.icon[data-v-17a5e62e]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-17a5e62e]{font-size:14px}.icon[data-v-17a5e62e]{font-size:16px}}.open>.icon[data-v-17a5e62e]{transform:rotate(90deg)}.items[data-v-17a5e62e]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-17a5e62e]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-17a5e62e]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-17a5e62e]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-17a5e62e]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-17a5e62e]{transition:all .2s ease-out}.flyout-leave-active[data-v-17a5e62e]{transition:all .15s ease-in}.flyout-enter-from[data-v-17a5e62e],.flyout-leave-to[data-v-17a5e62e]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-a6f0e41e]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-a6f0e41e]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-a6f0e41e]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-a6f0e41e]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-a6f0e41e]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-a6f0e41e]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-a6f0e41e]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-a6f0e41e]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-a6f0e41e]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-a6f0e41e]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-a6f0e41e]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-a6f0e41e]{display:none}}.menu-icon[data-v-a6f0e41e]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-a6f0e41e]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-a6f0e41e]{padding:12px 32px 11px}}.VPSwitch[data-v-1d5665e3]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-1d5665e3]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-1d5665e3]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-1d5665e3]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-1d5665e3] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-1d5665e3] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-d1f28634]{opacity:1}.moon[data-v-d1f28634],.dark .sun[data-v-d1f28634]{opacity:0}.dark .moon[data-v-d1f28634]{opacity:1}.dark .VPSwitchAppearance[data-v-d1f28634] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-e6aabb21]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-e6aabb21]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-43f1e123]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-43f1e123]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-43f1e123]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-43f1e123]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-69e747b5]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-69e747b5]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-69e747b5]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-69e747b5]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-e7ea1737]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-e7ea1737] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-e7ea1737] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-e7ea1737] .group:last-child{padding-bottom:0}.VPMenu[data-v-e7ea1737] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-e7ea1737] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-e7ea1737] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-e7ea1737] .action{padding-left:24px}.VPFlyout[data-v-b6c34ac9]{position:relative}.VPFlyout[data-v-b6c34ac9]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-b6c34ac9]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-b6c34ac9]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-b6c34ac9]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-b6c34ac9]{color:var(--vp-c-brand-2)}.VPFlyout:hover .menu[data-v-b6c34ac9],.button[aria-expanded=true]+.menu[data-v-b6c34ac9]{opacity:1;visibility:visible;transform:translateY(0)}.button[aria-expanded=false]+.menu[data-v-b6c34ac9]{opacity:0;visibility:hidden;transform:translateY(0)}.button[data-v-b6c34ac9]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-b6c34ac9]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-b6c34ac9]{margin-right:0;font-size:16px}.text-icon[data-v-b6c34ac9]{margin-left:4px;font-size:14px}.icon[data-v-b6c34ac9]{font-size:20px;transition:fill .25s}.menu[data-v-b6c34ac9]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-eee4e7cb]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-eee4e7cb]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-eee4e7cb]>svg,.VPSocialLink[data-v-eee4e7cb]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-7bc22406]{display:flex;justify-content:center}.VPNavBarExtra[data-v-d0bd9dde]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-d0bd9dde]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-d0bd9dde]{display:none}}.trans-title[data-v-d0bd9dde]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-d0bd9dde],.item.social-links[data-v-d0bd9dde]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-d0bd9dde]{min-width:176px}.appearance-action[data-v-d0bd9dde]{margin-right:-2px}.social-links-list[data-v-d0bd9dde]{margin:-4px -8px}.VPNavBarHamburger[data-v-e5dd9c1c]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-e5dd9c1c]{display:none}}.container[data-v-e5dd9c1c]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-e5dd9c1c]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-e5dd9c1c]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-e5dd9c1c]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-e5dd9c1c]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-e5dd9c1c]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-e5dd9c1c]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-e5dd9c1c],.VPNavBarHamburger.active:hover .middle[data-v-e5dd9c1c],.VPNavBarHamburger.active:hover .bottom[data-v-e5dd9c1c]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-e5dd9c1c],.middle[data-v-e5dd9c1c],.bottom[data-v-e5dd9c1c]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-e5dd9c1c]{top:0;left:0;transform:translate(0)}.middle[data-v-e5dd9c1c]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-e5dd9c1c]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-9c663999]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-9c663999],.VPNavBarMenuLink[data-v-9c663999]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-7f418b0f]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-7f418b0f]{display:flex}}/*! @docsearch/css 3.6.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.30196078431372547);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}.DocSearch-Button-Key--pressed{transform:translate3d(0,1px,0);box-shadow:var(--docsearch-key-pressed-shadow)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPNavBarSocialLinks[data-v-0394ad82]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-0394ad82]{display:flex;align-items:center}}.title[data-v-ab179fa1]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-ab179fa1]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-ab179fa1]{border-bottom-color:var(--vp-c-divider)}}[data-v-ab179fa1] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-88af2de4]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-88af2de4]{display:flex;align-items:center}}.title[data-v-88af2de4]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-ccf7ddec]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .5s}.VPNavBar[data-v-ccf7ddec]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-ccf7ddec]:not(.home){background-color:transparent}.VPNavBar[data-v-ccf7ddec]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-ccf7ddec]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-ccf7ddec]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-ccf7ddec]{padding:0}}.container[data-v-ccf7ddec]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-ccf7ddec],.container>.content[data-v-ccf7ddec]{pointer-events:none}.container[data-v-ccf7ddec] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-ccf7ddec]{max-width:100%}}.title[data-v-ccf7ddec]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-ccf7ddec]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-ccf7ddec]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-ccf7ddec]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-ccf7ddec]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-ccf7ddec]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-ccf7ddec]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-ccf7ddec]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-ccf7ddec]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-ccf7ddec]{column-gap:.5rem}}.menu+.translations[data-v-ccf7ddec]:before,.menu+.appearance[data-v-ccf7ddec]:before,.menu+.social-links[data-v-ccf7ddec]:before,.translations+.appearance[data-v-ccf7ddec]:before,.appearance+.social-links[data-v-ccf7ddec]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-ccf7ddec]:before,.translations+.appearance[data-v-ccf7ddec]:before{margin-right:16px}.appearance+.social-links[data-v-ccf7ddec]:before{margin-left:16px}.social-links[data-v-ccf7ddec]{margin-right:-8px}.divider[data-v-ccf7ddec]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-ccf7ddec]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-ccf7ddec]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-ccf7ddec]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-ccf7ddec]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-ccf7ddec]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-ccf7ddec]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-2d7af913]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-2d7af913]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-7f31e1f6]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-7f31e1f6]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-19976ae1]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-19976ae1]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-8133b170]{display:block}.title[data-v-8133b170]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-ff6087d4]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-ff6087d4]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-ff6087d4]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-ff6087d4]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-ff6087d4]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-ff6087d4]{transform:rotate(45deg)}.button[data-v-ff6087d4]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-ff6087d4]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-ff6087d4]{transition:transform .25s}.group[data-v-ff6087d4]:first-child{padding-top:0}.group+.group[data-v-ff6087d4],.group+.item[data-v-ff6087d4]{padding-top:4px}.VPNavScreenTranslations[data-v-858fe1a4]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-858fe1a4]{height:auto}.title[data-v-858fe1a4]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-858fe1a4]{font-size:16px}.icon.lang[data-v-858fe1a4]{margin-right:8px}.icon.chevron[data-v-858fe1a4]{margin-left:4px}.list[data-v-858fe1a4]{padding:4px 0 0 24px}.link[data-v-858fe1a4]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-cc5739dd]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 1px);right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .5s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-cc5739dd],.VPNavScreen.fade-leave-active[data-v-cc5739dd]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-cc5739dd],.VPNavScreen.fade-leave-active .container[data-v-cc5739dd]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-cc5739dd],.VPNavScreen.fade-leave-to[data-v-cc5739dd]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-cc5739dd],.VPNavScreen.fade-leave-to .container[data-v-cc5739dd]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-cc5739dd]{display:none}}.container[data-v-cc5739dd]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-cc5739dd],.menu+.appearance[data-v-cc5739dd],.translations+.appearance[data-v-cc5739dd]{margin-top:24px}.menu+.social-links[data-v-cc5739dd]{margin-top:16px}.appearance+.social-links[data-v-cc5739dd]{margin-top:16px}.VPNav[data-v-ae24b3ad]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-ae24b3ad]{position:fixed}}.VPSidebarItem.level-0[data-v-b8d55f3b]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-b8d55f3b]{padding-bottom:10px}.item[data-v-b8d55f3b]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-b8d55f3b]{cursor:pointer}.indicator[data-v-b8d55f3b]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-b8d55f3b],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-b8d55f3b],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-b8d55f3b],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-b8d55f3b]{background-color:var(--vp-c-brand-1)}.link[data-v-b8d55f3b]{display:flex;align-items:center;flex-grow:1}.text[data-v-b8d55f3b]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-b8d55f3b]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-b8d55f3b],.VPSidebarItem.level-2 .text[data-v-b8d55f3b],.VPSidebarItem.level-3 .text[data-v-b8d55f3b],.VPSidebarItem.level-4 .text[data-v-b8d55f3b],.VPSidebarItem.level-5 .text[data-v-b8d55f3b]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-b8d55f3b]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-1.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-2.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-3.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-4.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-5.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-b8d55f3b]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-b8d55f3b]{color:var(--vp-c-brand-1)}.caret[data-v-b8d55f3b]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-b8d55f3b]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-b8d55f3b]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-b8d55f3b]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-b8d55f3b]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-b8d55f3b],.VPSidebarItem.level-2 .items[data-v-b8d55f3b],.VPSidebarItem.level-3 .items[data-v-b8d55f3b],.VPSidebarItem.level-4 .items[data-v-b8d55f3b],.VPSidebarItem.level-5 .items[data-v-b8d55f3b]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-b8d55f3b]{display:none}.VPSidebar[data-v-575e6a36]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-575e6a36]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-575e6a36]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-575e6a36]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-575e6a36]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-575e6a36]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-575e6a36]{outline:0}.group+.group[data-v-575e6a36]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-575e6a36]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSkipLink[data-v-0f60ec36]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-0f60ec36]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-0f60ec36]{top:14px;left:16px}}.Layout[data-v-5d98c3a5]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-3d121b4a]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-3d121b4a]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-3d121b4a]{margin:128px 0}}.VPHomeSponsors[data-v-3d121b4a]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-3d121b4a]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-3d121b4a]{padding:0 64px}}.container[data-v-3d121b4a]{margin:0 auto;max-width:1152px}.love[data-v-3d121b4a]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-3d121b4a]{display:inline-block}.message[data-v-3d121b4a]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-3d121b4a]{padding-top:32px}.action[data-v-3d121b4a]{padding-top:40px;text-align:center}.VPTeamPage[data-v-7c57f839]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-7c57f839]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-7c57f839-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-7c57f839-s],.VPTeamMembers+.VPTeamPageSection[data-v-7c57f839-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-7c57f839-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-7c57f839-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-7c57f839-s],.VPTeamMembers+.VPTeamPageSection[data-v-7c57f839-s]{margin-top:96px}}.VPTeamMembers[data-v-7c57f839-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-7c57f839-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-7c57f839-s]{padding:0 64px}}.VPTeamPageTitle[data-v-bf2cbdac]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-bf2cbdac]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-bf2cbdac]{padding:80px 64px 48px}}.title[data-v-bf2cbdac]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-bf2cbdac]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-bf2cbdac]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-bf2cbdac]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-b1a88750]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-b1a88750]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-b1a88750]{padding:0 64px}}.title[data-v-b1a88750]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-b1a88750]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-b1a88750]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-b1a88750]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-b1a88750]{padding-top:40px}.VPTeamMembersItem[data-v-f3fa364a]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-f3fa364a]{padding:32px}.VPTeamMembersItem.small .data[data-v-f3fa364a]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-f3fa364a]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-f3fa364a]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-f3fa364a]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-f3fa364a]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-f3fa364a]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-f3fa364a]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-f3fa364a]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-f3fa364a]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-f3fa364a]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-f3fa364a]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-f3fa364a]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-f3fa364a]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-f3fa364a]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-f3fa364a]{text-align:center}.avatar[data-v-f3fa364a]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-f3fa364a]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-f3fa364a]{margin:0;font-weight:600}.affiliation[data-v-f3fa364a]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-f3fa364a]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-f3fa364a]:hover{color:var(--vp-c-brand-1)}.desc[data-v-f3fa364a]{margin:0 auto}.desc[data-v-f3fa364a] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-f3fa364a]{display:flex;justify-content:center;height:56px}.sp-link[data-v-f3fa364a]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-f3fa364a]:hover,.sp .sp-link.link[data-v-f3fa364a]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-f3fa364a]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-6cb0dbc4]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-6cb0dbc4]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-6cb0dbc4]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-6cb0dbc4]{max-width:876px}.VPTeamMembers.medium .container[data-v-6cb0dbc4]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-6cb0dbc4]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-6cb0dbc4]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-6cb0dbc4]{max-width:760px}.container[data-v-6cb0dbc4]{display:grid;gap:24px;margin:0 auto;max-width:1152px}.VPDocAsideSponsors[data-v-9a4b6acc]{margin-top:8px!important}.banner[data-v-9a4b6acc]{margin:.25rem 0;padding:.4rem 0;border-radius:.8rem;position:relative;display:flex;align-items:center;justify-content:center;width:100%;gap:1rem;background-color:var(--vp-c-bg-soft);border:2px solid var(--vp-c-bg-soft);transition:border-color .5s}.banner[data-v-9a4b6acc]:last-of-type{margin-bottom:1rem}.banner[data-v-9a4b6acc]:hover{border:2px solid var(--vp-c-brand-1)}.banner img[data-v-9a4b6acc]{transition:transform .5s;transform:scale(1.25)}.banner:hover img[data-v-9a4b6acc]{transform:scale(1.75)}.banner .name[data-v-9a4b6acc]{background-image:linear-gradient(120deg,var(--vp-c-brand-3) 32%,var(--vp-c-brand-2),var(--vp-c-brand-1));background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:.9rem;font-weight:600;margin-left:1rem;writing-mode:vertical-rl;text-orientation:upright}.banner .info[data-v-9a4b6acc]{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:.5;height:100%;position:relative}.banner .version[data-v-9a4b6acc]{color:var(--vp-c-text-2);font-size:.8rem;font-weight:700;white-space:nowrap;margin-top:auto;margin-bottom:auto}.banner .change[data-v-9a4b6acc]{color:var(--vp-c-text-1);font-size:.8rem;font-weight:700;margin-top:auto;text-align:center} diff --git a/assets/webssh.DHR7F3te.jpg b/assets/webssh.DHR7F3te.jpg deleted file mode 100644 index 4acdd67f..00000000 Binary files a/assets/webssh.DHR7F3te.jpg and /dev/null differ diff --git a/case/case1.html b/case/case1.html deleted file mode 100644 index 66068c83..00000000 --- a/case/case1.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 自建一个TG机器人来查询服务器信息 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/case/case2.html b/case/case2.html deleted file mode 100644 index 1f6b0921..00000000 --- a/case/case2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - 在iOS/MacOS中使用Siri运行快捷指令查询服务器状态 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - - -
Skip to content

在iOS/MacOS中使用Siri运行快捷指令查询服务器状态

当前版本:V1.0
贡献者:

获取快捷指令

使用iPhone或iPad扫描以下二维码,获取快捷指令

coode

MacOS用户请访问这里,获取快捷指令

使用说明

  • 获取快捷指令后,打开并编辑快捷指令
  • 分别在三个文本框中填入 面板URLAPI Token服务器ID
  • 保存编辑并测试运行,能获取结果则表示设置正确
  • 修改快捷指令的名称,如修改为:“一号服务器状态”,保存后便可使用Siri指令:“嘿Siri,一号服务器状态”来获取服务器状态

WARNING

每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等

- - - - \ No newline at end of file diff --git a/case/case3.html b/case/case3.html deleted file mode 100644 index 8f5013f1..00000000 --- a/case/case3.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人

贡献者:

项目地址:nezha_telegram_bot

项目特色

开源Telegram机器人项目,可以基于API实时查询哪吒面板的服务器信息。

  • [x] 支持中/英多语言切换
  • [x] 支持分组统计(CPU、磁盘、内存、上下行速度、流量统计等)
  • [x] 支持实时刷新单个服务器数据
  • [x] 支持键盘互动查询
  • [x] 支持命令直接查询
  • [x] 增加群聊判断,限制群聊可发送命令
  • [x] 增加群聊内5秒自动删除信息
  • [x] 支持docker部署

命令列表

命令功能仅私聊
start开始使用键盘主菜单✔️
help帮助列表
add添加面板链接和token✔️
url添加面板链接✔️
token添加面板token✔️
info获取保存的面板链接和token✔️
delete删除保存的面板链接和token✔️
id命令后面添加整数id,来进行单个服务器信息查询(私聊带刷新按钮,群聊不带)
all查询所有服务器的统计信息
search在服务器名字中搜索关键字(支持多个,用空格分开)

效果展示

imageimage

- - - - \ No newline at end of file diff --git a/case/case4.html b/case/case4.html deleted file mode 100644 index 12870031..00000000 --- a/case/case4.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑



2

还在因为自己的小鸡配置太差被朋友嘲笑吗?
还在想参加以针会友活动却因为小鸡不够排面而觉得羞耻吗?
还在因为在哪吒TG群里机器人排名太低而觉得自己低人一等吗?


今天开始!找回自信!

来自南京的名老中医 dysf888 独家秘方!让你找回男人本色,激情畅享!
安装 Fake Agent,可随意修改服务器监测数据的倍数上传到 Dashboard,让你的小鸡 脱!胎!换!骨! 让你在 MJJ 面前起来!


哪吒监控创始人奶爸也在用:
5


男人用了都说好:
6
4



1

- - - - \ No newline at end of file diff --git a/case/case5.html b/case/case5.html deleted file mode 100644 index 6d309eeb..00000000 --- a/case/case5.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - 使用 Argo 隧道的哪吒服务端 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

使用 Argo 隧道的哪吒服务端

贡献者:

项目地址:Argo-Nezha-Service-Container


目录


项目特点:

  • 适用范围更广 --- 只要能连通网络,就能安装哪吒服务端,如 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攻击等网络威胁
image

准备需要用的变量

  • 到 Cloudflare 官网,选择使用的域名,打开 网络 选项将 gRPC 开关打开
image

面板域名加上 https:// 开头,回调地址再加上 /oauth2/callback 结尾

imageimageimageimageimage

Argo 认证的获取方式: json 或 token

Argo 隧道认证方式有 json 和 token,使用两个方式其中之一。推荐前者,理由脚本会处理好所有的 Argo 隧道参数和路径,后者需要到 Cloudflare 官网手动设置,容易出错。

(方式 1 - Json):

通过 Cloudflare Json 生成网轻松获取 Argo 隧道 json 信息: https://fscarmen.cloudflare.now.cc

image

(方式 2 - Token): 通过 Cloudflare 官网,手动生成 Argo 隧道 token 信息

到 cf 官网:https://dash.cloudflare.com/

  • 进入 zero trust 里生成 token 隧道和信息。
  • 其中数据路径 443/https 为 proto.NezhaService
  • ssh 路径 22/ssh 为 < client id >
imageimageimageimageimageimageimage

PaaS 部署实例

镜像 fscarmen/argo-nezha:latest , 支持 amd64 和 arm64 架构

用到的变量

变量名是否必须备注
GH_USERgithub 的用户名,用于面板管理授权
GH_CLIENTID在 github 上申请
GH_CLIENTSECRET在 github 上申请
GH_BACKUP_USER在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致
GH_REPO在 github 上备份哪吒服务端数据库文件的 github 库
GH_EMAILgithub 的邮箱,用于备份的 git 推送到远程库
GH_PATgithub 的 PAT
ARGO_AUTHJson: 从 https://fscarmen.cloudflare.now.cc 获取的 Argo Json
Token: 从 Cloudflare 官网获取
ARGO_DOMAINArgo 域名

Koyeb

Deploy to Koyeb

imageimageimageimageimage

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 \
-           -e GH_USER=<填 github 用户名> \
-           -e GH_EMAIL=<填 github 邮箱> \
-           -e GH_PAT=<填获取的> \
-           -e GH_REPO=<填自定义的> \
-           -e GH_CLIENTID=<填获取的>  \
-           -e GH_CLIENTSECRET=<填获取的> \
-           -e ARGO_AUTH='<填获取的 Argo json 或者 token>' \
-           -e ARGO_DOMAIN=<填自定义的> \
-           -e GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量> \
-           fscarmen/argo-nezha

docker-compose 部署

version: '3.8'
-services:
-    argo-nezha:
-        image: fscarmen/argo-nezha
-        pull: always
-        container_name: nezha_dashboard
-        restart: always
-        environment:
-            - GH_USER=<填 github 用户名>
-            - GH_EMAIL=<<填 github 邮箱>
-            - GH_PAT=<填获取的>
-            - GH_REPO=<填自定义的>
-            - GH_CLIENTID=<填获取的>
-            - GH_CLIENTSECRET=<填获取的>
-            - ARGO_AUTH='<填获取的 Argo json 或者 token>'
-            - ARGO_DOMAIN=<填自定义的>
-            - GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量>

VPS 部署方式 2 --- 宿主机

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

客户端接入

通过gRPC传输,无需额外配置。使用面板给到的安装方式,举例

curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent nezha.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH 接入

<file path>/cloudflared access ssh --hostname nezha.seales.nom.za/<GH_CLIENTID>
imageimageimage

手动备份数据

方法一: 把 Github 备份库里的 README.md 文件内容改为 backup

image

方法二: ssh 进去后,容器版本运行 /dashboard/backup.sh; 非容器版本运行 /opt/nezha/dashboard/backup.sh

自动还原备份

  • 把需要还原的文件名改到 github 备份库里的 README.md,定时服务会每分钟检测更新,并把上次同步的文件名记录在本地 /dbfile 处以与在线的文件内容作比对

下图为以还原文件名为 dashboard-2023-04-23-13:08:37.tar.gz 作示例

image

手动还原备份

  • ssh 进入容器后运行,github 备份库里的 tar.gz 文件名,格式: dashboard-2023-04-22-21:42:10.tar.gz
bash /dashboard/restore.sh <文件名>
image

完美搬家

  • 备份原哪吒的 /dashboard 文件夹,压缩备份为 dashboard.tar.gz 文件
tar czvf dashboard.tar.gz /dashboard
  • 下载文件并放入私库,这个私库名要与新哪吒 <GH_REPO> 完全一致,并把该库的 README.md 的内容编辑为 dashboard.tar.gz
  • 部署本项目新哪吒,完整填入变量即可。部署完成后,自动还原脚本会每分钟作检测,发现有新的内容即会自动还原,全程约 3 分钟

主体目录文件及说明

/dashboard/
-|-- app                  # 哪吒面板主程序
-|-- argo.json            # Argo 隧道 json 文件,记录着使用隧道的信息
-|-- argo.yml             # Argo 隧道 yml 文件,用于在一同隧道下,根据不同域名来分流 web, gRPC 和 ssh 协议的作用
-|-- backup.sh            # 备份数据脚本
-|-- restore.sh           # 还原备份脚本
-|-- dbfile               # 记录最新的还原或备份文件名
-|-- resource             # 面板主题、语言和旗帜等资料的文件夹
-|-- data
-|   |-- config.yaml      # 哪吒面板的配置,如 Github OAuth2 / gRPC 域名 / 端口 / 是否启用 TLS 等信息
-|   `-- sqlite.db        # SQLite 数据库文件,记录着面板设置的所有 severs 和 cron 等信息
-|-- entrypoint.sh        # 主脚本,容器运行后执行
-|-- nezha.csr            # SSL/TLS 证书签名请求
-|-- nezha.key            # SSL/TLS 证书的私钥信息
-|-- nezha.pem            # SSL/TLS 证书文件
-|-- cloudflared          # Cloudflare Argo 隧道主程序
-|-- grpcwebproxy         # gRPC 反代主程序
-`-- nezha-agent          # 哪吒客户端,用于监控本地 localhost

鸣谢下列作者的文章和项目:

免责声明:

  • 本程序仅供学习了解, 非盈利目的,请于下载后 24 小时内删除, 不得用作任何商业用途, 文字、数据及图片均有所属版权, 如转载须注明来源。
  • 使用本程序必循遵守部署免责声明。使用本程序必循遵守部署服务器所在地、所在国家和用户所在国家的法律法规, 程序作者不对使用者任何不当行为负责。
- - - - \ No newline at end of file diff --git a/case/case6.html b/case/case6.html deleted file mode 100644 index e14bd48f..00000000 --- a/case/case6.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Nezha Mobile - Nezha Dashboard 的 iOS 客户端 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

Nezha Mobile - Nezha Dashboard 的 iOS 客户端

贡献者:

为项目作出贡献

项目地址

INFO

我们欢迎对项目的任何贡献,并将积极合并你的修改至下一次的Release,但我们可能会对不符合App Review Guidelines的内容(或潜在内容)进行一些修改。

从 App Store 下载

Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917

WARNING

App Store版本的Nezha Mobile由于ICP备案原因不在中国大陆提供服务。

TestFlight 测试计划

加入 TestFlight 测试

使用说明

  • 首次使用时你需要输入Dashboard链接API TokenDashboard链接形如server.hidandelion.com,不要添加协议头和末尾斜杠。API Token可通过Dashboard管理后台获取。 step1

配置小组件(可选)

  • 在Springboard添加小组件,长按后点击编辑小组件step2

  • 在随后的页面中选择一台你需要监控的服务器。你可以为多个小组件配置不同的服务器。 step3

- - - - \ No newline at end of file diff --git a/case/case7.html b/case/case7.html deleted file mode 100644 index bc7319a9..00000000 --- a/case/case7.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Broker for Nezha - 拓展 Nezha 接入平台 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - - -
Skip to content

Broker for Nezha - 拓展 Nezha 接入平台

贡献者:

Broker for Nezha 是一个 Nezha Agent 的修改版本,其通过分离 Agent 的数据收集和 gRPC 上报功能,可使小型设备接入 Nezha Dashboard。

项目地址:https://codeberg.org/uubulb/broker

文档:Broker for Nezha

与原项目的不同

  • 使用外置数据源,而不是从本地获取。
  • 多数据源与多面板支持
  • 仅支持部分任务类型,可参考项目 README 获取详细信息。

Broker for Nezha 需要与特定的数据收集软件一同使用。目前提供两种数据获取方式:

  1. HTTP 主动获取(HTTP/1.1)
  2. TCP 被动获取(推荐)

如需获取现有的数据收集软件,可以参考项目 README。

因数据获取方式缺乏安全性,建议仅在信任的网络环境使用。

编写数据收集端

如需自行编写数据收集端,除实现基本 HTTP 服务器或 TCP 客户端外,还需要使用特定的数据格式才可被 Broker 正常接收。具体请参考:数据类型

效果参考

Dashboard
Dashboard

WebSSH
WebSSH
- - - - \ No newline at end of file diff --git a/case/index.html b/case/index.html deleted file mode 100644 index 99d023e5..00000000 --- a/case/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 哪吒监控 - 服务器监控与运维工具 | 社区项目 - - - - - - - - - - - - - - - - - - -
Skip to content

哪吒监控社区项目

社区贡献的相关项目

为哪吒监控提供了更多扩展

- - - - \ No newline at end of file diff --git a/developer/index.html b/developer/index.html deleted file mode 100644 index 0f2c4afc..00000000 --- a/developer/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 哪吒监控 - 服务器监控与运维工具 | 开发手册 - - - - - - - - - - - - - - - - - - -
Skip to content

开发手册

哪吒监控开发手册

我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!

- - - - \ No newline at end of file diff --git a/developer/l10n.html b/developer/l10n.html deleted file mode 100644 index f1b9d0c2..00000000 --- a/developer/l10n.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - l10n 本地化开发指南 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

l10n 本地化开发指南

哪吒监控的 Dashboard 已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化

介绍

  1. 你可以直接使用 /resource/l10n/zh-CN.toml 中已有的文本配置来替换新功能中的文本
  2. 如果新功能中有新增文本,请参考 zh-CN.toml 的配置文本,将新文本拉取到 zh-CN.toml 等其他语言的配置文件中,并添加翻译

新本地化文本的添加

  1. /resource/l10n/ 中添加新的语言文本配置
  2. 在新的语言文本配置中拉取其他语言已有的文本配置
  3. 为新的语言文本配置添加翻译
- - - - \ No newline at end of file diff --git a/developer/theme.html b/developer/theme.html deleted file mode 100644 index 8224b921..00000000 --- a/developer/theme.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 哪吒主题开发环境 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

哪吒主题开发环境

哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题

WARNING

请注意: 此开发环境仅支持 dashboard v0.19.20 及更新版本。

使用说明

  1. 克隆此仓库到本地
  2. 修改 data/config.yaml 中的 Oauth2 配置(回调连接可以填 http://localhost
  3. 运行 docker-compose up
  4. 开始开发
  5. 主题制作完成之后可以将 theme-custom(前台主题)、static-custom(前台主题静态文件) 和 dashboard-custom(后台主题) 放置到服务器上的 /opt/nezha/dashboard/ 中(如使用 Docker 安装)

FAQ

  • 如果不能使用 80 端口,在 docker-compose.yaml 中修改配置。
- - - - \ No newline at end of file diff --git a/en_US/case/case1.html b/en_US/case/case1.html deleted file mode 100644 index 1a5ccc83..00000000 --- a/en_US/case/case1.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Build your own Telegram bot to query server information | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Build your own Telegram bot to query server information

Contributors:

Project: 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.

- - - - \ No newline at end of file diff --git a/en_US/case/case2.html b/en_US/case/case2.html deleted file mode 100644 index c8dfea24..00000000 --- a/en_US/case/case2.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Use Siri to run shortcut to check server status in iOS/MacOS | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - - -
Skip to content

Use Siri to run shortcut to check server status in iOS/MacOS

Current Version:V1.0 (Chinese)
Contributor:

Get shortcut command

Scan the following QR code with your iPhone or iPad to get the shortcut

coode


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.

- - - - \ No newline at end of file diff --git a/en_US/case/case3.html b/en_US/case/case3.html deleted file mode 100644 index fe709cb1..00000000 --- a/en_US/case/case3.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Build your own server status query Telegram bot | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Build your own server status query Telegram bot

Contributor:

GitHub project: 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

CommandDescriptionPrivate chat only
startGetting started with the keyboard main menu✔️
helphelp message
addAdd Nezha monitoring url link and token✔️
urlAdd Nezha monitoring url link✔️
tokenAdd Nezha monitoring token✔️
infoGet saved Nezha monitoring url link and token✔️
deleteDelete saved Nezha monitoring url link and token✔️
idAdd an integer id after the command to query the information of a single server (refresh button only available in private chat)
allQuery statistics for all servers
searchSearch for keywords in server names (multiple keywords supported, split by spaces)
- - - - \ No newline at end of file diff --git a/en_US/case/case4.html b/en_US/case/case4.html deleted file mode 100644 index 585cf493..00000000 --- a/en_US/case/case4.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Fake-agent, monitoring data cheater | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/en_US/case/case5.html b/en_US/case/case5.html deleted file mode 100644 index 438324a9..00000000 --- a/en_US/case/case5.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - Nezha server over Argo tunnel | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Nezha server over Argo tunnel

Contributors:

GitHub project: Argo-Nezha-Service-Container


Catalog


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.
image

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.
image

Add https:// to the beginning of the panel's domain name and /oauth2/callback to the end of the callback address.

imageimageimageimageimage

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

image

(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 >.
imageimageimageimageimageimageimage

PaaS Deployment Example

Image fscarmen/argo-nezha:latest, supports amd64 and arm64 architectures.

Variables used

Variable NameRequiredRemarks
GH_USERYesgithub username for panel admin authorization
GH_CLIENTIDyesapply on github
GH_CLIENTSECRETyesapply on github
GH_BACKUP_USERNoThe 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_REPONoThe github repository for backing up Nezha's server-side database files on github
GH_EMAILNogithub's mailbox for git push backups to remote repositories
GH_PATNogithub's PAT
ARGO_AUTHYesArgo Json from https://fscarmen.cloudflare.now.cc
Argo token from Cloudflare official website
ARGO_DOMAINYesArgo domain

Koyeb

Deploy to Koyeb

imageimageimageimageimage

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 \
-           -e GH_USER=<fill in github username> \
-           -e GH_EMAIL=<fill in github email> \
-           -e GH_PAT=<fill in the obtained> \
-           -e GH_REPO=<fill in customized> \
-           -e GH_CLIENTID=<fill in acquired> \
-           -e GH_CLIENTSECRET=<fill in acquired> \
-           -e ARGO_AUTH='<Fill in the fetched Argo json or token>' \
-           -e ARGO_DOMAIN=<fill in customized> \
-           -e GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank> \
-           fscarmen/argo-nezha

docker-compose deployment

version: '3.8'
-services.
-    argo-nezha.
-        image: fscarmen/argo-nezha
-        --pull always
-        container_name: nezha_dashboard
-        restart: always
-        environment:
-            - GH_USER=<fill in github username>
-            - GH_EMAIL=<fill in your github email>
-            - GH_PAT=<<fill in obtained>
-            - GH_REPO=<fill in customized>
-            - GH_CLIENTID=<fill in obtained>
-            - GH_CLIENTSECRET=<fill in fetched>
-            - ARGO_AUTH='<Fill in the fetched Argo json or token>'
-            - ARGO_DOMAIN=<fill in customized>
-            - GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank>

VPS Deployment Method 2 --- hosts

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

Client Access

Transfer via gRPC, no additional configuration required. Use the installation method given in the panel, for example

curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent data.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH access

<filepath>/cloudflared access ssh --hostname ssh.seals.nom.za/<GH_CLIENTID>
imageimageimage

Manually backing up your data

Method 1: Change the contents of the README.md file in the Github backup repository to backup

image

Method 2: After ssh, run /dashboard/backup.sh for container version; /opt/nezha/dashboard/backup.sh for VPS host version.

Automatically restore backups

  • Change the name of the file to be restored to README.md in the github backup repository, the timer service will check for updates every minute and record the last synchronized filename in the local /dbfile to compare with the online file content.

The following is an example of restoring a file with the name dashboard-2023-04-23-13:08:37.tar.gz.

! image

Manually restore the backup

  • ssh into the container and run, tar.gz filename from the github backup repository, format: dashboard-2023-04-22-21:42:10.tar.gz
bash /dashboard/restore.sh <filename>
image

Migrating data

  • Backup the /dashboard folder of the original Nezha and zip it up to dashboard.tar.gz file.
tar czvf dashboard.tar.gz /dashboard
  • Download the file and put it into a private repository, the name of the repository should be exactly the same as <GH_REPO>, and edit the contents of README.md of the repository to dashboard.tar.gz.
  • Deploy the new Nezha in this project, and fill in the variables completely. After the deployment is done, the auto-restore script will check every minute, and will restore automatically if it finds any new content, the whole process will take about 3 minutes.

Main catalog files and descriptions

/dashboard/
-|-- app                  # Nezha panel main program
-|-- argo.json            # Argo tunnel json file, which records information about using the tunnel.
-|-- argo.yml             # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains.
-|-- backup.sh            # Backup data scripts
-|-- restore.sh           # Restore backup scripts
-|-- dbfile               # Record the name of the latest restore or backup file
-|-- resource             # Folders of information on panel themes, languages, flags, etc.
-|-- data
-|   |-- config.yaml      # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not.
-|   `-- sqlite.db        # SQLite database file that records all severs and cron settings for the panel.
-|-- entrypoint.sh        # The main script, which is executed after the container is run.
-|-- nezha.csr            # SSL/TLS certificate signing request
-|-- nezha.key            # Private key information for SSL/TLS certificate.
-|-- 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

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.
- - - - \ No newline at end of file diff --git a/en_US/case/case6.html b/en_US/case/case6.html deleted file mode 100644 index 5a95dbc6..00000000 --- a/en_US/case/case6.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Nezha Mobile - An iOS Client For Nezha Dashboard | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Nezha Mobile - An iOS Client For Nezha Dashboard

Contributor:

Contribute to the project

Project Link

INFO

We appreciate any contribution to the project, and we will actively merge your commits into next Release. However, we may modify your work in order to comply with App Review Guidelines.

Download on the App Store

Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917

WARNING

Due to ICP Filing Policy, Nezha Mobile is not available in China mainland.

TestFlight Testing Program

Join TestFlight Testing

Instructions

  • Enter your Dashboard link like server.hidandelion.com and API token on your first use. Do not add a protocol prefix or a trailing slash to the link. API Token can be retrieved from Admin Center of Dashboard. step1

Configure Widget(Optional)

  • Add a widget on your Springboard. Long-tap the widget and then tap Edit Widget. step2

  • Choose a server you want to monitor on the next view. You can choose different servers for each widget. step3

- - - - \ No newline at end of file diff --git a/en_US/case/case7.html b/en_US/case/case7.html deleted file mode 100644 index 7e9734cb..00000000 --- a/en_US/case/case7.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Broker for Nezha - Advancing on more platforms | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - - -
Skip to content

Broker for Nezha - Advancing on more platforms

Contributor:

Broker for Nezha is a modified version of the Nezha Agent that separates data collection from gRPC reporting, enabling small devices to connect to the Nezha Dashboard.

Project link: https://codeberg.org/uubulb/broker

Online Documentation: Broker for Nezha

Difference from Nezha Agent

  • Utilizes external data sources to report to Nezha Dashboard.
  • Supports configuring multiple sources and connecting to multiple Dashboards.
  • Only has limited task support. For details, view the project README.

Broker for Nezha needs to be used with specific data collection software. Currently, it provides two data collection methods:

  1. HTTP (HTTP/1.1) - Active polling
  2. TCP - Passive collection (recommended to avoid creating redundant connections)

For existing data collection software, refer to the project README. Due to security concerns, it's recommended to use this only in a trusted network.

Writing a Data Collector

If you need to write your own data collector, you'll need to implement a basic HTTP server or TCP client and use a specific data format that Broker can recognize. For details, see: Data types

Examples

Dashboard
Dashboard

WebSSH
WebSSH
- - - - \ No newline at end of file diff --git a/en_US/case/index.html b/en_US/case/index.html deleted file mode 100644 index 9317c31a..00000000 --- a/en_US/case/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Nezha Monitoring - Server monitoring tool | Community Project - - - - - - - - - - - - - - - - - - -
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.

- - - - \ No newline at end of file diff --git a/en_US/developer/index.html b/en_US/developer/index.html deleted file mode 100644 index 35fbee36..00000000 --- a/en_US/developer/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Nezha Monitoring - Server monitoring tool | Development Manual - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/en_US/developer/l10n.html b/en_US/developer/l10n.html deleted file mode 100644 index 6dc56564..00000000 --- a/en_US/developer/l10n.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Localization | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Localization

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

  1. You can directly use the text configuration already available in /resource/l10n/en-US.toml to replace the text in the new feature.
  2. 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

  1. Add a new language text configuration in /resource/l10n/.
  2. Pull existing text configurations from other languages in the new language text configuration.
  3. Add translations for the new language text configuration.
- - - - \ No newline at end of file diff --git a/en_US/developer/theme.html b/en_US/developer/theme.html deleted file mode 100644 index ee30e10a..00000000 --- a/en_US/developer/theme.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Nezha Theme Development Environment | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

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.19.20 and newer versions.

How to use

  1. Clone this repository to local
  2. Modify the Oauth2 configuration in data/config.yaml(The callback connection can be filled with http://localhost
  3. Run docker-compose up
  4. Start development
  5. After completing the theme creation, you can place theme-custom (frontend theme), static-custom (frontend theme static files), and dashboard-custom (backend theme) into the /opt/nezha/dashboard/ directory on the server (if installed using Docker).

FAQ

  • If you can't use port 80, change the configuration in docker-compose.yaml.
- - - - \ No newline at end of file diff --git a/en_US/guide/agent.html b/en_US/guide/agent.html deleted file mode 100644 index e5ad9e04..00000000 --- a/en_US/guide/agent.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - Install Agent | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Install Agent

This document will introduce how to install the Agent on the monitored server and connect it to the Dashboard.

TIP

The repository for Agent binaries can be found at: https://github.com/nezhahq/agent/releases

One-Click Installation of the Agent

Nezha Monitoring supports one-click installation of the Agent on both Windows and Linux. By following the steps in this document, you can easily deploy it on your server.

Preparation

You need to set up a communication domain in the admin panel in advance, and this domain should not be connected to a CDN. This document uses the example communication domain “data.example.com”.
Go to the settings page in the admin panel, fill in the communication domain in the “Non-CDN Dashboard Server Domain/IP” field, and click "Save".

One-Click Installation on Linux

  1. First, add a server in the admin panel.
  2. Click the green Linux icon button next to the newly added server and copy the one-click installation command.
  3. Run the copied installation command on the monitored server, and wait for the installation to complete. Then, check if the server is online in the Dashboard home page.

One-Click Installation on macOS

  1. First, add a server in the admin panel.
  2. Click the green Apple icon button next to the newly added server and copy the one-click installation command.
  3. Run the copied installation command on the monitored server, and wait for the installation to complete. Then, check if the server is online in the Dashboard home page.

One-Click Installation on Windows

  1. First, add a server in the admin panel.
  2. Click the green Windows icon button next to the newly added server and copy the one-click installation command.
  3. Go to the Windows server, run PowerShell, and execute the copied installation command in PowerShell.
  4. If you encounter a prompt to "change execution policy," choose Y.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

WARNING

If you encounter errors when running the one-click installation command in PowerShell, try the Manual Installation of the Agent on Windows below.

Other Ways to Install the Agent

Installing the Agent on Linux (Support most distros)

Click to expand/collapse
  1. First, add a server in the admin panel.
  2. Run the script on the monitored server:
bash
curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
  1. Select “Install monitoring Agent.”
  2. Enter the communication domain, such as "data.example.com".
  3. Enter the dashboard communication port (gRPC port), default is 5555.
  4. Enter the Agent secret, which is generated when you add a server in the admin panel and can be found on the “Servers” page in the admin panel.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

Installing the Agent using the built-in service command (Support most systems)

Click to expand/collapse

First, get a copy of Nezha Agent: https://github.com/nezhahq/agent/releases

After extracting the archive, run the following command to install the service (may require root permission):

bash
./nezha-agent service install -s server_name:port -p password

You can also add other arguments except the server address and password. For more details, refer to the documentation: Customizing Agent Monitoring Items.

Uninstall the service:

bash
./nezha-agent service uninstall

Start the service:

bash
./nezha-agent service start

Stop the service:

bash
./nezha-agent service stop

Restart the service:

bash
./nezha-agent service restart

Installing the Agent with runit

Click to expand/collapse

The built-in service command of Agent supports most init systems, including FreeBSD rc.d and openrc, but still missing some of them.

Here we take Void Linux's runit as an example:

  1. Create directory /etc/sv/nezha-agent:
bash
mkdir /etc/sv/nezha-agent
  1. Create service file /etc/sv/nezha-agent/run, with following content:
bash
#!/bin/sh
-exec 2>&1
-exec /opt/nezha/agent/nezha-agent -s server_name:port -p password 2>&1

You can add other arguments here as well.

  1. Create logging service file /etc/sv/nezha-agent/log/run:
bash
#!/bin/sh
-exec vlogger -t nezha-agent -p daemon
  1. Enable the service:
bash
sudo ln -s /etc/sv/nezha-agent/ /var/service

Use the sv command to manage the service.

How to view logs:

  1. Install socklog and enable it:
bash
sudo xbps-install -S socklog-void
-sudo ln -s /etc/sv/socklog-unix /var/service
  1. Run svlogtail:
bash
sudo svlogtail | grep nezha-agent

Manual Installation of the Agent on Windows

Installing the Agent on Synology DSM

Click to expand/collapse
sh
# Agent path
-EXEC="/PATH/TO/nezha-agent"
-# Log path
-LOG="${EXEC}.log"
-# Additional execution parameters, can be empty
-ARGS=""
-# Nezha server gRPC address
-SERVER="HOST_OR_IP:gRPC_PORT"
-# The secret key obtained in the previous step
-SECRET="APP_SECRET"
-# User running the service, *strongly recommended to use non-root user*
-RUN_USER="nezha"
-
-# Write to systemd service file
-cat << EOF > /usr/lib/systemd/system/nezha.service
-[Unit]
-Description=Nezha Agent Service
-After=network.target
-
-[Service]
-Type=simple
-ExecStart=/bin/nohup ${EXEC} ${ARGS} -s ${SERVER} -p ${SECRET} &>> ${LOG} &
-ExecStop=ps -fe |grep nezha-agent|awk '{print \$2}'|xargs kill
-User=${RUN_USER}
-
-Restart=on-abort
-
-[Install]
-WantedBy=multi-user.target
-EOF
-
-# Reload service
-systemctl daemon-reload
-# Start service
-systemctl start nezha
-# Enable service startup
-systemctl enable nezha

‼️ Modify the corresponding information before running the above commands with the root account to complete the installation.

Installing the Agent on macOS Using Homebrew

Click to expand/collapse

This section is adapted from 🐿️松鼠收集🌰 with the author's permission

WARNING

Please be sure to add environment variables before installing nezha-agent through Homebrew! Homebrew creates the service-required plist file during software installation, and if you add the environment variables after installation, it will fail to start due to missing parameters.

  1. Add environment variables:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="Communication key, obtained from the service page"' >> ~/.zshrc
-echo 'export HOMEBREW_NEZHA_AGENT_SERVER="Your server and port, format your.domain:5555 "' >> ~/.zshrc
-source ~/.zshrc
  1. Install Nezha Agent:

DANGER

Note that this Homebrew repository is maintained by a third party and is unrelated to Nezha Monitoring. The Nezha project team does not endorse this repository's usability, security, etc. Please evaluate the risks yourself before using!

Since it has not yet been submitted to the Homebrew Core official library, it is temporarily placed in the third-party Homebrew repository maintained by the author of the blog:

shell
brew install brewforge/chinese/nezha-agent
  1. Start Nezha Agent service through Homebrew:
shell
brew services start nezha-agent
  1. Check the service status:
shell
brew services info nezha-agent
  1. Stop the service:
shell
brew services stop nezha-agent
  1. Uninstall Nezha Agent:
shell
brew rm nezha-agent
  1. If there is an error, first check the environment variables:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
-echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. If the environment variables are configured correctly, try reinstalling:
shell
brew services stop nezha-agent
-brew reinstall nezha-agent
-brew services start nezha-agent
  1. If the issue persists, submit a issue to the third-party Homebrew repository.

Installing the Agent on OpenWRT

Click to expand/collapse

How to solve installation difficulties and issues in one step?

How to enable autostart on older OpenWRT/LEDE?

How to enable autostart on newer OpenWRT? Contributor: @艾斯德斯

  • First, download the corresponding binary from the release, unzip the zip package, and place it in /root.
  • Run chmod +x /root/nezha-agent to grant execution permission, then create /etc/init.d/nezha-service:
shell
#!/bin/sh /etc/rc.common
-
-START=99
-USE_PROCD=1
-
-start_service() {
- procd_open_instance
- procd_set_param command /root/nezha-agent -s Dashboard communication domain:port -p Key -d
- procd_set_param respawn
- procd_close_instance
-}
-
-stop_service() {
-  killall nezha-agent
-}
-
-restart() {
- stop
- sleep 2
- start
-}
  • Run chmod +x /etc/init.d/nezha-service to grant execution permission.
  • Start the service: /etc/init.d/nezha-service enable && /etc/init.d/nezha-service start

Does the Agent Have a Docker Image?

The Agent does not currently have a Docker image.
The design philosophy of the Agent is opposite to that of the Dashboard. While the Dashboard should minimally impact the server, the Agent needs to execute monitoring services and run commands within the server.
Running the Agent inside a container can still perform monitoring tasks, but features like WebShell will not function properly, so no Docker image is provided.

- - - - \ No newline at end of file diff --git a/en_US/guide/agentq.html b/en_US/guide/agentq.html deleted file mode 100644 index 3e69ee4a..00000000 --- a/en_US/guide/agentq.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Frequently Asked Questions about the Agent | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Frequently Asked Questions about the Agent

The IP Displayed in the Admin Panel is Different from the Actual Agent IP?

Please refer to Dashboard Related - Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?. This will not be repeated here.

Errors During One-Click Script Installation

curl: Failed to connect to raw.githubusercontent.com......

This mostly occurs on servers in mainland China. Currently, the one-click script fetches the installation script directly from Github. You may try several times, or manually install the Agent. Additionally, you can find third-party Github acceleration services or mirrors and set them in the one-click installation script.

sudo: command not found

Please manually install sudo first, for example, in Ubuntu:

shell
apt install sudo
- - - - \ No newline at end of file diff --git a/en_US/guide/api.html b/en_US/guide/api.html deleted file mode 100644 index 521076bd..00000000 --- a/en_US/guide/api.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - API Interface | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

API Interface

Nezha Monitoring supports querying the status information of Agents using the API interface

Creating a Token

Nezha Monitoring's API interface allows for Token authentication and Cookies authentication. To create a new Token, go to the admin panel, click on the avatar in the top right corner, select "API Token," and enter the Token management page. Click "Add Token", add a custom note, and click "Add".

To delete a Token, select the corresponding Token and click the delete icon on the right.

WARNING

Tokens are the authentication credentials for the API interface. They are critical to the security of your Dashboard's information, so do not share your Token with others.

Authentication Method

Ensure the request header contains Authorization: Token for authentication.

Token authentication method:

Request Headers:
-Authorization: Token

Usage Instructions

WARNING

Negative timestamps in the following examples represent 0000-00-00. This currently indicates that the Agent has never reported since the Dashboard went online, but it is not recommended to use the positive or negative value to determine the status.

TIP

The request method is GET, and the response format is JSON.

Get Server List

Request:

GET /api/v1/server/list?tag=

Parameters:

  • tag (optional): ServerTag is the server group. Provide this parameter to query only servers in that group.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653014667,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1"
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": ""
-        }
-    ]
-}

Get Server Details

Request:

GET /api/v1/server/details?id=&tag=

Parameters:

  • id (optional): ServerID, multiple IDs separated by commas. Provide this parameter to query the server corresponding to that ID and ignore the tag parameter.
  • tag (optional): ServerTag, provide this parameter to query only servers in that group.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653015042,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1",
-            "host": {
-                "Platform": "darwin",
-                "PlatformVersion": "12.3.1",
-                "CPU": [
-                    "Apple M1 Pro 1 Physical Core"
-                ],
-                "MemTotal": 17179869184,
-                "DiskTotal": 2473496842240,
-                "SwapTotal": 0,
-                "Arch": "arm64",
-                "Virtualization": "",
-                "BootTime": 1652683962,
-                "CountryCode": "hk",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 17.33,
-                "MemUsed": 14013841408,
-                "SwapUsed": 0,
-                "DiskUsed": 2335048912896,
-                "NetInTransfer": 2710273234,
-                "NetOutTransfer": 695454765,
-                "NetInSpeed": 10806,
-                "NetOutSpeed": 5303,
-                "Uptime": 331080,
-                "Load1": 5.23,
-                "Load5": 4.87,
-                "Load15": 3.99,
-                "TcpConnCount": 195,
-                "UdpConnCount": 70,
-                "ProcessCount": 437
-            }
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": "",
-            "host": {
-                "Platform": "",
-                "PlatformVersion": "",
-                "CPU": null,
-                "MemTotal": 0,
-                "DiskTotal": 0,
-                "SwapTotal": 0,
-                "Arch": "",
-                "Virtualization": "",
-                "BootTime": 0,
-                "CountryCode": "",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 0,
-                "MemUsed": 0,
-                "SwapUsed": 0,
-                "DiskUsed": 0,
-                "NetInTransfer": 0,
-                "NetOutTransfer": 0,
-                "NetInSpeed": 0,
-                "NetOutSpeed": 0,
-                "Uptime": 0,
-                "Load1": 0,
-                "Load5": 0,
-                "Load15": 0,
-                "TcpConnCount": 0,
-                "UdpConnCount": 0,
-                "ProcessCount": 0
-            }
-        }
-    ]
-}

Get ICMP Ping / TCPing monitor value

This API does not require authentication, except for servers with HideForGuest option enabled.

Request:

GET /api/v1/monitor/{id}

Parameters:

  • id (required): ServerID, must be an positive integer.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "monitor_id": 1,
-            "server_id": 1,
-            "monitor_name": "Monitor1",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                68.2275,
-                70.1129
-            ]
-        },
-        {
-            "monitor_id": 2,
-            "server_id": 1,
-            "monitor_name": "Monitor2",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                66.656,
-                68.2153
-            ]
-        },
-        {
-            "monitor_id": 3,
-            "server_id": 1,
-            "monitor_name": "Monitor3",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                61.4525,
-                62.342
-            ]
-        }
-    ]
-}

Note: created_at corresponds with avg_delay.

Automatic Node Registration

Description: Script for automating node registration. Example code is provided below. Reference: https://github.com/naiba/nezha/pull/472

http
POST /api/v1/server/register?simple=1

Parameters:

  • simple: (optional): Specifies the format of the response data.
    • When set to simple=1 or simple=true, the response will only include a Token string (e.g., 8GYwaxYuLfU7zl7ndC).
    • Otherwise the response will return a complete JSON object::{"code": 200, "message": "Server created successfully","secret": "8GYwaxYuLfU7zl7ndC"}

Request Payload:

The payload can be completely empty ({}), and the system will apply the following default values:

  • Name: Defaults to the node’s IP address ($IP).
  • Tag: Defaults to "AutoRegister".
  • Note: Defaults to an empty string ("").
  • HideForGuest: Defaults to "on".

You can also customize your data:

json
  "Name": "abcd",        // Node name
-  "Tag": "",             // Tag (optional)
-  "Note": "",            // Note or description (optional)
-  "HideForGuest": "on"   // Whether to hide from guests

Usage Examples

Get All Server Information

python
import requests
-
-url = "http://your-dashboard/api/v1/server/list"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-for server in data['result']:
-    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

Get Specific Server Details

python
import requests
-
-server_id = 1  # Replace with your server ID
-url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-server = data['result'][0]
-print(f"Server Name: {server['name']}")
-print(f"CPU Usage: {server['status']['CPU']}%")
-print(f"Memory Used: {server['status']['MemUsed']} bytes")
-print(f"Disk Used: {server['status']['DiskUsed']} bytes")
-print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
-print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

With the above example code, you can easily obtain and process server status information, enabling automated monitoring and management.

Automatic Node Registration

  1. Create a file named nezha_register.sh, and copy the following content into it:
bash
#!/bin/bash
-
-# Exit if NEZHA_TOKEN is not set
-if [ -z "${NEZHA_TOKEN}" ]; then
-    echo "NEZHA_TOKEN is not set. Exiting."
-    exit 0
-fi
-
-# Set default values if variables are not set
-NEZHA_PROBE_ADDRESS="${NEZHA_PROBE_ADDRESS:-probe.example.com}"
-NEZHA_PROBE_PORT="${NEZHA_PROBE_PORT:-5555}"
-NEZHA_DASHBOARD_URL="${NEZHA_DASHBOARD_URL:-https://nezha.example.com}"
-
-NODE_NAME=${NODE_NAME:-$(hostname)}
-
-# Send POST request and capture response and HTTP status code
-response=$(curl -s -o response_body.json -w "%{http_code}" -X POST "${NEZHA_DASHBOARD_URL}/api/v1/server/register?simple=true" \
-  -H "Content-Type: application/json" \
-  -H "Authorization: ${NEZHA_TOKEN}" \
-  -d "{\"Name\": \"${NODE_NAME}\"}")
-
-# Extract HTTP status code and Nezha secret
-HTTP_CODE="$response"
-NEZHA_SECRET=$(cat response_body.json)
-rm -f response_body.json
-
-if [ "$HTTP_CODE" != "200" ]; then
-    echo "Failed to get Nezha Secret. HTTP status code: $HTTP_CODE"
-    exit 1
-fi
-
-# Additional check for NEZHA_SECRET to ensure it's not JSON-formatted (indicating failure)
-if [[ "${NEZHA_SECRET:0:1}" == "{" ]]; then
-    echo "Failed to get Nezha Secret. Received response: ${NEZHA_SECRET}"
-    exit 1
-fi
-
-# Download and execute the install script with cleanup
-curl -fsSL https://raw.githubusercontent.com/nezhahq/scripts/main/install_en.sh -o nezha.sh && \
-chmod +x nezha.sh || { echo "Failed to download or make the script executable"; exit 1; }
-
-# Clean up nezha.sh on exit
-trap 'rm -f nezha.sh' EXIT
-
-# Run the Nezha agent installation script
-CMD="./nezha.sh install_agent "${NEZHA_PROBE_ADDRESS}" "${NEZHA_PROBE_PORT}" "${NEZHA_SECRET}" --tls"
-
-echo "Run commnad : ${CMD}"
-
-eval $CMD
  1. Grant execution permission to the script: chmod +x nezha_register.sh
  2. Get Token from Nezha dashboard, e.g. POXbxorKJBM8wPMKX8r2PdMblyXvpggB
  3. Set Environment Variables
bash
export NEZHA_TOKEN="POXbxorKJBM8wPMKX8r2PdMblyXvpggB" # Obtain this token from the dashboard
-export NEZHA_PROBE_ADDRESS="your_probe_address"        # Set your probe address
-export NEZHA_DASHBOARD_URL="https://nezha.example.com" # Replace with your dashboard URL
-export NEZHA_PROBE_PORT="5555"                         # Modify this port if needed
  1. Run the script to complete node registration and probe installation:
bash
./nezha_register.sh
  1. If the script runs successfully, you will see output like the following:
bash
Run command: ./nezha.sh install_agent probe.example.com 5555 YOUR_SECRET --tls
- - - - \ No newline at end of file diff --git a/en_US/guide/dashboard.html b/en_US/guide/dashboard.html deleted file mode 100644 index 1b07564e..00000000 --- a/en_US/guide/dashboard.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - Install Dashboard | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Install Dashboard

Preparation

To set up Nezha Monitoring, you need:

  1. A server with public internet access, with firewall and security policies allowing traffic on ports 8008 and 5555. These ports are necessary for accessing and receiving data. A server with a single core and 512MB of RAM is sufficient for most use cases.
  2. A domain with an A record set to point to your Dashboard server IP.

TIP

If you want to use a CDN, prepare two domains: one configured with CDN for public access (CDN must support WebSocket protocol), and another domain not using CDN for communication between the Agent and Dashboard.

This document uses "dashboard.example.com" and "data.example.com" as example domains.

  1. A Github account (or Gitlab, Gitee).

This document uses the aaPanel for reverse proxying the Dashboard as an example. As future versions change, some features may change their entry points. This document is for reference only.

WARNING

This project does not depend on the aaPanel; you can choose any server panel you prefer or manually install Nginx or Caddy to configure SSL and reverse proxy.
If you do not need to use ports 80 and 443 to access the Dashboard, you can directly use the installation script to install and run Nezha Monitoring without installing Nginx.

Obtaining Github Client ID and Secret

Nezha Monitoring uses Github, Gitlab, or Gitee as admin accounts.

  1. First, create an OAuth application. For Github, log in to Github, open Github OAuth Apps, and select "OAuth Apps" -> "New OAuth App".
    Application name - Fill in as you like.
    Homepage URL - Fill in with the domain for accessing the dashboard, such as "http://dashboard.example.com" (your domain).
    Authorization callback URL - Fill in with the callback address, such as "http://dashboard.example.com/oauth2/callback" (don't forget /oauth2/callback).
  2. Click “Register application”.
  3. Save the Client ID on the page, then click “Generate a new client secret” to create a new Client Secret, which will be displayed only once, please keep it safe.

Using Cloudflare Access as an OAuth2 Provider

If you encounter issues using GitHub, GitLab, or Gitee for admin account logins, consider switching to Cloudflare Access as your OAuth2 provider for authentication.

Setting Up a New SaaS-OIDC Application

WARNING

The following steps are for users who have already started using Zero Trust. If you have not previously used Cloudflare Zero Trust, we strongly recommend that you first read the Guide on Using Cloudflare Access as an OAuth2 Provider to understand the configuration examples and setup process.

  1. Go to Zero Trust Dashboard and log in with your Cloudflare account.
  2. My Team -> Users -> <specific user> -> Get User ID and save it.
  3. Access -> Application -> Add an Application.
  4. Choose SaaS, enter a custom application name in Application (e.g., nezha), select OIDC, and click Add application.
  5. Select Scopes: openid, email, profile, groups.
  6. Fill in your callback address in Redirect URLs, such as https://dashboard.example.com/oauth2/callback.
  7. Save the Client ID, Client Secret, and Issuer address (protocol and domain part), e.g., https://xxxxx.cloudflareaccess.com.

If using this method, after installing the Dashboard, modify the configuration file /opt/nezha/dashboard/data/config.yaml, and change the Endpoint configuration to the Issuer address saved earlier, e.g., https://xxxxx.cloudflareaccess.com, and restart the Dashboard.

OIDC Authentication Configuration (Optional)

Nazha supports custom OIDC authentication login. For configuration details, please refer to the documentation: Enable OIDC authorization.

Installing the Dashboard on the Server

Run the installation script on the dashboard server:

bash
curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

After Docker installation completes, enter the following values:

  • OAuth provider - choose one from github, cloudflare, gitlab, gitee.
  • Client ID - the previously saved Client ID.
  • Client Secret - the previously saved Client Secret.
  • Username - the username/User ID from the OAuth provider.
  • Site title - custom site title.
  • Access port - public access port, customizable, default is 8008.
  • Agent communication port - port for Agent and Dashboard communication, default is 5555.

After inputting the values, wait for the image to be pulled.
When the installation completes, you can access the dashboard by visiting your domain and port number, such as “http://dashboard.example.com:8008”.

In the future, if you need to run the script again, run:

bash
./nezha.sh

to open the management script.

Configuring Reverse Proxy

Create a new site in the aaPanel, with the domain filled in as the public access domain, such as “http://dashboard.example.com”. Then click “Settings” to enter the site settings options, select “Reverse Proxy” - “New Reverse Proxy”.

Customize a proxy name and fill in http://127.0.0.1 in the "Target URL" below, then click “Save”.

Open the “Configuration File” on the right side of the newly created reverse proxy and replace the configuration file with the following content:

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/.+|file/.+)$ {
-    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/

Click “Save”.
Now you should be able to access the dashboard directly using the domain, such as “http://dashboard.example.com”.

Additional Content:

CaddyServer v1 (v2 does not require special configuration):

caddy
proxy /ws http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /terminal/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /file/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}

Configuring SSL in the aaPanel

First, temporarily disable the reverse proxy.
Like configuring SSL certificates for other websites, enter the “SSL” in the site settings, and you can choose to automatically apply for a Let’s Encrypt certificate or manually configure an existing certificate.
After completing the SSL settings, go back to Github OAuth Apps and edit the previously created OAuth application. Change all the domain parts in "Homepage URL" and "Authorization callback URL" from http to https, such as "https://dashboard.example.com" and "https://dashboard.example.com/oauth2/callback". Failing to change this may result in being unable to log in to the admin panel.

Updating the Dashboard

Run the script ./nezha.sh, and select to restart and update the dashboard.

- - - - \ No newline at end of file diff --git a/en_US/guide/dashboardq.html b/en_US/guide/dashboardq.html deleted file mode 100644 index 1786a899..00000000 --- a/en_US/guide/dashboardq.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Frequently Asked Questions about the Dashboard | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Frequently Asked Questions about the Dashboard

Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?

First, let's explain how the IP displayed in the Admin panel is obtained: The Agent periodically requests IP-API to get IP information and reports it to the Dashboard. The currently used IP-API can be viewed here: myip.go.
If you find that the IP displayed in the Admin panel is different from the IP provided by your service provider, it is most likely that the service provider has given you an entry IP, but the Agent is testing your exit IP. This issue can also occur with multi-line servers and IPLC private lines.

TIP

For example, a common scenario is that the service provider gives you a high-defense server. To meet both high defense and low network interruption rate goals, the IP provided may be a mapped high-defense IP rather than your server's real exit IP.

You can also test the exit IP on the Agent server by running the following commands:

shell
curl https://ipapi.co/ip/
-curl ip.sb
-curl ip-api.com

Forgot or Deleted Viewing Password

Please view or edit the /opt/nezha/dashboard/data/config.yaml file.
The password is located under the site-viewpassword item.

Dashboard Installation/Restart/Update Failure: iptables ......

First, try restarting Docker before proceeding:

shell
systemctl status docker
-systemctl restart docker
-systemctl status docker

After restarting, try reinstalling the Dashboard.
If iptables errors persist, consider disabling or removing iptables.
This issue might also be related to the kernel, so switching to the official kernel can be another solution.

Dashboard Restart Failure: Invalid hostPort: nz_site_port

If this issue occurs, you can modify the configuration via the installation script or directly edit the /opt/nezha/dashboard/docker-compose.yaml file.

Dashboard Layout Error, CSS Resources Not Loading

If the Dashboard page layout is incorrect, it's usually due to missing or inaccessible CSS files.
To resolve this, try restarting and updating the Dashboard first.
If the problem persists after updating, the issue may be due to inappropriate configurations in your vhost file. You can edit the Nginx vhost file or use the aaPanel to:

  1. Find the site configured during Dashboard installation in Websites and click Settings on the right.

  2. Select Configuration File and remove the following lines:

    nginx
    location ~ .*\.(js|css)?$
    -    {
    -        expires      12h;
    -        error_log /dev/null;
    -        access_log /dev/null;
    -    }
  3. Save the configuration, clear the browser, Nginx, and CDN caches, and refresh the page to see if it returns to normal.

Dashboard Cannot Start: panic: Unable to find the configured DDNS provider...

The value entered for the DDNS provider is incorrect. Currently, only webhook, cloudflare, tencentcloud, and dummy are supported.

Dashboard DDNS Update Crash: panic: interface conversion: interface {} is nil, not []interface {}

The entered DDNS AccessID or AccessSecret is incorrect.

Dashboard warning: NEZHA>> 错误的服务监控上报...

  1. The installed versions of the Dashboard and Agent are not compatible and have a TaskType that is unsupported by its counterpart. Updating both to the latest version could solve this problem.

  2. This could be a specific issue in Dashboard v0.17.10 - v0.18.0. Updating to the latest version could solve this.

Unable to start the Agent service: Unix syslog delivery error

Appears in Agent v0.16.9+. Mostly caused by a malfunctioning /dev/log socket (or it does not exist at all). You can refer to https://unix.stackexchange.com/questions/317064/how-do-i-restore-dev-log-in-systemdrsyslog-host to solve this problem. Try avoiding using init systems like systemd in a Docker installation.

Network Monitoring Page Shows: server monitor history not found

This error indicates that no TCP-Ping or ICMP-Ping type monitoring has been set in the services page or monitoring data has not yet been generated.
If it has been set up, wait for some time and then check again.

What to do if /terminal or /ws can't connect properly after enabling HTTPS?

This is often due to an incomplete certificate. Add the -d parameter to the agent run command. If the log contains x509:certificate signed by unknown authority, replacing with a complete certificate will solve the problem.

What if I'm not satisfied with the data modification/addition functionality provided by the dashboard and want to modify/add data myself?

Common in scenarios like batch adding Agents, you can directly modify the database.
Note that not everything in the database can be modified; incorrect modifications can lead to data corruption and inability to start the Dashboard. Do not modify the database casually!

DANGER

Again, do not modify the database casually!

If you need to modify data in the database, stop the dashboard container first.
The database type is sqlite3, located at /opt/nezha/dashboard/data/sqlite.db. Backup before modifying.

Will the Dashboard automatically update?

Agents typically update automatically, but the Dashboard does not and requires manual updates.

Agent Command Issuance Failed When Connecting to Web Terminal

When the Agent is offline, or the connection between the Agent and the Dashboard is unstable, it may cause issues with connecting to the Web Terminal. Please check if the Agent is running normally and maintaining a stable connection with the Dashboard.

- - - - \ No newline at end of file diff --git a/en_US/guide/ddns.html b/en_US/guide/ddns.html deleted file mode 100644 index 4ffe764a..00000000 --- a/en_US/guide/ddns.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - DDNS | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

DDNS

The DDNS functionality is designed for servers with dynamic IP addresses. When the Agent server reports a new IP (every 10 minutes), Dashboard will automatically update the DNS record based on the configuration.

Why should I use Nezha's DDNS functionality?

  • Convenient centralized management of DDNS settings, instead of deploying a DDNS service on every server.
  • Your confidential information is only stored on the Dashboard server, preventing leaks.

Configuration

You can directly add DDNS configurations in the Dashboard management page.

  1. Click on the "Dynamic DNS" option in the menu bar to enter the configuration page.
  2. Click the "New Profile" button and fill in the required information in the pop-up window. Option details:
    • Name: The name of the configuration.
    • DDNS Provider: The type of provider, determining the method used to update DNS records.
    • Domains (separate with comma): The domain(s), if you enter multiple domains, they should be separated by commas. IDNs (Internationalized Domain Names) are supported.
    • Maximum retry attempts: The number of attempts for updating DDNS, default is 3, and the range is between 1 and 10.
    • DDNS Credential 1 and DDNS Credential 2 are optional. Typically, at least one needs to be provided. The table below lists the options for all providers.
  3. If using the webhook provider, the corresponding options need to be filled out as required. For detailed instructions, see Webhook Configuration.
  4. You need to check at least one of IPv4 Enabled and IPv6 Enabled; otherwise, no update operations will be performed.
  5. After adding a new configuration, you also need to modify the server settings to activate DDNS. Server-related options include:
    • Enable DDNS: Enable DDNS functionality for this server.
    • DDNS Profiles: The list of DDNS configuration IDs to use, searchable by configuration name.

Webhook Configuration

Webhook requires manually constructing HTTP requests, suitable for using other provider services when operations are simple.

Webhook option descriptions:

  • Webhook URL: The URL for the HTTP request, where parameters can use placeholders.
  • Webhook Request Method: The HTTP request method. Supported methods include GET, POST, PATCH, DELETE, and PUT.
  • Webhook Request Type: The format of the HTTP request body, either JSON or Form.
  • Webhook Request Headers: HTTP request headers, filled in JSON format, but nesting is not supported.
  • Webhook Request Body: The HTTP request body. It won't be used for GET and DELETE. If you need to use a nested format, you must choose JSON as the request type.

Supported Webhook placeholders:

  • #ip#: Host IP.
  • #domain#: DDNS domain. Each request is made separately for each domain, so this value will be a single domain string.
  • #type#: IP type, either "ipv4" or "ipv6".
  • #record#: Record type, either "A" or "AAAA".
  • #access_id#: DDNS Credential 1.
  • #access_secret#: DDNS Credential 2.

Oray Webhook Example

Click to expand/collapse
  • URL:http://ddns.oray.com/ph/update?hostname=#domain#&myip=#ip#
  • Request Method: GET
  • Request Header:{"Authorization": "Basic pass"}, replace pass with the Base64-encoded userpass (e.g., user:pass becomes dXNlcjpwYXNzCg==).
  • Oray only supports A records, so only enable IPv4. Other Webhook options are not required.

Provider List

ProviderCredential 1 (ID)Credential 2 (Secret)
dummy❌️❌️
webhookOptionalOptional
cloudflare❌️
tencentcloud

Viewing Logs

In the Dashboard logs, you can see the relevant logs for the DDNS functionality. When configured correctly, there will be corresponding log entries when updating DNS records.

shell
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成功
- - - - \ No newline at end of file diff --git a/en_US/guide/loginq.html b/en_US/guide/loginq.html deleted file mode 100644 index c748d145..00000000 --- a/en_US/guide/loginq.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - FAQ about logging into the Dashboard | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

FAQ about logging into the Dashboard

Stuck Page/Connection Refused/Long Response Time After Login Callback

These issues can manifest in various ways, but ultimately the browser cannot display correctly after login.

  1. Your server cannot connect to Github/Gitee, which is most common when configuring Github on servers in mainland China. You may try several times or switch to Cloudflare Access.
  2. You have configured the callback address incorrectly. Ensure that your callback address is correct and that both the port and protocol are accurate!
  3. An unknown error occurred on the Dashboard. You can use a script to check the logs.

TIP

What is a protocol? In the browser, the string that ends your domain with :// is the protocol, usually http or https. Since there may be multiple protocol+domain+port combinations available for accessing the Dashboard in a normal deployment, make sure to choose the most appropriate one as the callback.

How to Check if My Callback Address is Wrong?

Ensure that the protocol+domain+port displayed in the browser before login and after the callback are consistent.
Ensure that your path is /oauth2/callback, all in lowercase.

Errors After Logging into the Admin Panel

  1. Clear cookies and log in again, or try a different browser.
  2. Check the callback address to ensure it is correct and that both the port and protocol are accurate! The address initiating the request must be in the same domain as the callback address, with the port, protocol, and domain (or IP) all matching.

lookup xxx

The container DNS resolution failed, usually due to modified iptables configurations.
It is recommended to restart Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If the lookup error persists, check if there are other tools controlling iptables, such as firewall.
This issue might also be related to the kernel, so try switching to the official kernel.

Invalid authorization method, or the login callback address is invalid, expired, or has been revoked

This issue appears only when using Gitee login, and the reason is unclear. Switching to GitHub is recommended.

oauth2: server response missing access_token

This could be caused by various factors, most likely a network issue. Check your network and try again.
If unresolved, switching to Github or another method is recommended.

The user is not an admin of this site and cannot log in

You logged in with the wrong account or configured the wrong username. Note that the username is not an email, and you can use a script to modify it.
For Cloudflare Access users, note that your username is not an email but a User ID.

dial tcp xxx:443 i/o timeout

This is a network issue. Try restarting Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If you are configuring Github login on a server in mainland China, switching to Cloudflare Access is recommended to avoid network interference.

net/http: TLS handshake timeout

Same as above.

Unable to receive email verification codes using Cloudflare Access as an OAuth2 Provider

  • Ensure that the email verification policy has been correctly configured in Policies.
  • Verify that the email address you provided is correct. Note that email addresses not on the policy whitelist will not receive verification codes.
- - - - \ No newline at end of file diff --git a/en_US/guide/nat.html b/en_US/guide/nat.html deleted file mode 100644 index a869afec..00000000 --- a/en_US/guide/nat.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - NAT Traversal Configuration | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

NAT Traversal Configuration

Nezha Server Monitoring includes built-in NAT traversal capabilities, allowing users to expose internal services running on an Agent (such as home OpenWrt routers or NAS devices) to the public internet. This functionality facilitates remote access and is currently limited to supporting plain HTTP traversal.

Preparation

Prior to configuring NAT traversal, please ensure the following preparatory steps are completed:

  • Verify that the Nezha Monitoring Agent is installed and actively running on your device and maintains a stable connection with the Dashboard.
  • Acquire a public domain name, ideally using a subdomain configuration, such as service-1.example.com. Point this domain name to the public IP address of your Dashboard server.
  • It is important to note that each domain name can only map to the service of one Agent. For mapping services from multiple Agents, distinct domain names should be used, such as service-2.example.com.

WARNING

If your Dashboard server uses tools like the aaPanel or similar management platforms, ensure that your domain (e.g., service-1.example.com) is correctly linked to the Dashboard site within these tools to avoid access issues.

NAT Traversal Configuration Steps

  1. Log into the Dashboard Admin Panel and navigate to the "NAT Traversal" section in the menu.
  2. Click the "Add" button and provide the following required details:
    • Name: Assign a custom name to this traversal setup, for example, OpenWrt Login Page.
    • Agent ID: Input the ID of the Agent for which traversal is needed.
    • Local service: Specify the internal service address that requires traversal, in the IP:port format, such as 127.0.0.1:80.
    • Bind hostname: Enter the previously configured public domain name, such as service-1.example.com. If a non-standard port is used by Dashboard (e.g. default 8008), be sure to include it as well.
  3. After filling in the details, click the "Add" button and wait for the traversal setup to activate.
  4. Test the configuration by accessing http://service-1.example.com to ensure the internal service on the Agent is successfully accessible.

Usage Notes

  • Continuous connectivity between the Agent and the Dashboard is crucial for the NAT traversal functionality to operate correctly. If the connection to the Agent is lost, the traversal setup will temporarily cease to function.
  • Given that the NAT traversal does not encrypt traffic by itself, it is recommended to secure data transmissions by employing TLS/SSL between the Agent and the Dashboard, as well as between the Dashboard and the client browser, to ensure data security during transmission.
- - - - \ No newline at end of file diff --git a/en_US/guide/notifications.html b/en_US/guide/notifications.html deleted file mode 100644 index c8e350f3..00000000 --- a/en_US/guide/notifications.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - Notification Configuration | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Notification Configuration

Nezha Monitoring supports monitoring server load, CPU, memory, disk, traffic, monthly traffic, process count, and connection count, and sending notifications when user-defined thresholds are reached.

Flexible Notification Methods

  • In Dashboard messages, the placeholder #DATETIME# represents the timestamp of the event. When the notification is triggered, the Dashboard automatically replaces #DATETIME# with the actual event time.
  • #NEZHA# is a placeholder for Dashboard messages, and the Dashboard automatically replaces the placeholder with the actual message when the notification is triggered.
  • The body content is in JSON format: When the request type is FORM, the value is in key:value form, and placeholders can be placed inside value. The placeholders will be automatically replaced during notification. When the request type is JSON, only simple string replacement is performed before being submitted to the URL.
  • Placeholders can also be placed inside the URL, and simple string replacement will be performed during the request.

Refer to the following notification method examples, and you can also flexibly set the push method according to your needs.

Bark Example

Click to expand/collapse
  • Name: Bark

  • URL structure: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • Request Method: GET

  • Request Type: Default

  • Body: Empty

  • Name: Bark

  • URL structure: /push

  • Request Method: POST

  • Request Type: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Prepare your Slack Workspace in advance and create an App for this Workspace. If you have not created one, you can create an App at Slack API.

After creating the App, you need to add an Incoming Webhook to the App. In the App's settings page, find Incoming Webhooks, enable Activate Incoming Webhooks, and at the bottom of the page, find and click Add New Webhook to Workspace, choose a Channel, and click Allow. After creating, you will get a Webhook URL, which you will use to replace the example URL below.

Telegram Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in Telegram and get the bot's token and your Telegram user ID.

The token and user ID are alphanumeric strings. You can get your user ID by chatting with @userinfobot on Telegram. Create a bot by chatting with @BotFather, and you will get the bot's token.

Replace botXXXXXX with your bot token and YYYYYY with your user ID in the URL below. Note that you need to chat with the bot first, otherwise the bot cannot send messages to you.

Email Notification Example - Outlook Contributor: @白歌

Click to expand/collapse

Note: SendCloud has a daily free email sending limit. This is just an example. You can choose a paid service or other similar free services. The usage method is similar.

URL Parameter Acquisition Instructions

This example uses SendCloud as the email service. You need to register an account on SendCloud, create a sender email, and then obtain the APIUSER and APIKEY here.

Replace <replaceAPIUSER> and <replaceAPIKEY> in the example URL below with your APIUSER and APIKEY, and replace <customSenderEmail> and <customRecipientEmail> with any sender and recipient email addresses.

  • 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": {
    -      "contentType": "Text",
    -      "content": "#NEZHA#"
    -      },
    -      "toRecipients": [
    -        {
    -          "emailAddress": {
    -              "address": "ADDRESS FOR RECEVING EMAILS"
    -              }
    -        }
    -      ]
    -  }
    -}

DingTalk Group Bot Configuration Example

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in DingTalk in advance and get the bot's token.

The bot URL is obtained after creating a bot in the DingTalk group - Manage Bot - Create Bot. Choose custom keywords for the security method, and the Body content value must contain these keywords.

WeChat Work Group Bot Example Contributor: @ChowRex

Click to expand/collapse

Supported placeholders list

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",  # invalid
-    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # invalid
-}

This document is NOT available in English.

Group Bot Configuration Instructions - Document - WeChat Work Developer Center

  • Name: WeChat Work Group Bot
  • URL: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • Request Method: POST
  • Request Type: JSON
  • Body:
    json
    {
    -    "msgtype": "markdown",
    -    "markdown": {
    -        "content": "# Nezha Notification\n\n\"#NEZHA#\"\n\n> Name: \"#SERVER.NAME#\"\n> IP: \"#SERVER.IP#\"\n> IPv4: \"#SERVER.IPV4#\"\nIPv6: \"#SERVER.IPV6#\"\n> CPU: \"#SERVER.CPU#\"\n> Memory: \"#SERVER.MEM#\"\n> Swap: \"#SERVER.SWAP#\"\n> Disk: \"#SERVER.DISK#\"\n> Upload Speed: \"#SERVER.NETINSPEED#\"\n> Download Speed: \"#SERVER.NETOUTSPEED#\"\n> Total Upload: \"#SERVER.TRANSFERIN#\"\n> Total Download: \"#SERVER.TRANSFEROUT#\"\n> Load1: \"#SERVER.LOAD1#\"\n> Load5: \"#SERVER.LOAD5#\"\n> Load15: \"#SERVER.LOAD15#\"\n> TCP Connection Count: \"#SERVER.TCPCONNCOUNT\"\n> UDP Connection Count: \"#SERVER.UDPCONNCOUNT\"\n\n"
    -    }
    -}

You can remove or add relevant information as needed.

Matrix Notification Example

Click to expand/collapse

Parameter Explanation

  • All variables starting with $ need to be replaced with your actual values.
    • YOUR_HOME_SERVER: The address of your Matrix server.
    • YOUR_NEZHA_URL: The URL of your Nezha dashboard.
    • YOUR_MATRIX_USERNAME and YOUR_MATRIX_PASSWD: Your Matrix username and password.
    • YOUR_MATRIX_TOKEN retrieval method:
      sh
      curl -XPOST -d '{"type": "m.login.password", "identifier": {"user": "$YOUR_MATRIX_USERNAME", "type": "m.id.user"}, "password": "$YOUR_MATRIX_PASSWD"}' "https://$YOUR_HOME_SERVER/_matrix/client/r0/login"

Request Configuration

  • Name: Matrix
  • URL: https://$YOUR_HOME_SERVER/_matrix/client/r0/rooms/$ROOM_ID/send/m.room.message
  • Request Method: POST
  • Request Type: JSON
  • Header:
    json
    {
    -  "Authorization": "Bearer $YOUR_MATRIX_TOKEN"
    -}
  • Body:
    json
    {
    -  "msgtype": "m.text",
    -  "format": "org.matrix.custom.html",
    -  "formatted_body": "<html><head><title>Nezha Dashboard</title></head><body><h1><a href=\"$YOUR_NEZHA_URL\" target=\"_blank\">Nezha Dashboard</a></h1><ul><li>datetime: #DATETIME#</li><li>Message: #NEZHA#</li></ul></body></html>",
    -  "body": "#NEZHA#"
    -}

Usage Steps

  1. Replace Variables: Replace $YOUR_HOME_SERVER, $YOUR_NEZHA_URL, $YOUR_MATRIX_USERNAME, $YOUR_MATRIX_PASSWD, and $YOUR_MATRIX_TOKEN with your own values.
  2. Retrieve Token: Use the curl command provided above to get YOUR_MATRIX_TOKEN, making sure to replace all relevant variables.
  3. Configure Request: Set up your request using the configuration provided above, ensuring the correct URL, headers, and body are used.
  4. Send Notification: Send the Matrix message using the configured request to integrate Nezha monitoring notifications into your Matrix room.

Once configured, you will receive formatted Nezha dashboard information in your Matrix room whenever a notification is triggered.

Notification Rule Explanation

Basic Rules

  • type: You can choose one or more types. If multiple types are selected in one rule, all selected types must be satisfied to trigger a notification (refer to the examples below)
    • cpu, gpu, memory, swap, disk
    • net_in_speed inbound network speed, net_out_speed outbound network speed, net_all_speed total network speed, transfer_in inbound traffic, transfer_out outbound traffic, transfer_all total traffic
    • offline offline monitoring
    • load1, load5, load15 load
    • process_count process count (currently resource-intensive due to thread count, not supported temporarily)
    • tcp_conn_count, udp_conn_count connection count
    • temperature_max maximum temperature
  • duration: Duration in seconds. An notification is triggered if 30% or more of the samples exceed the threshold within this duration (to prevent data spikes).
  • min or max:
    • For traffic and network speed, the unit is bytes (1KB = 1024B, 1MB = 1024 * 1024B)
    • For memory, disk, and CPU, the unit is percentage
    • No need to set this for offline monitoring
  • cover:
    • 0 monitors all servers, use ignore to exclude specific servers
    • 1 ignores all servers, use ignore to monitor specific servers
      Example: [{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore: Select specific servers to exclude, used with cover, content is server ID and boolean value, e.g., {"1": true, "2": false}

Complete Examples:

Add an offline notification:

  • Name: Offline Notification
  • Rule: [{"Type":"offline","Duration":10}]
  • Enabled: √

Add an notification for CPU usage exceeding 50% for 10 seconds and memory usage below 20% for 20 seconds:

  • Name: CPU+Memory
  • Rule: [{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • Enabled: √

Send notifications for specific servers to specific notification groups:

Scenario example:
There are 4 servers (1, 2, 3, 4) and two notification groups (A, B).
Notify group A if servers 1 and 2 are offline for 10 minutes.
Notify group B if servers 3 and 4 are offline for 10 minutes.

First, set up notification groups A and B, then add two notification rules:

Rule 1:

  • Name: 1, 2 Offline, Send to Notification Group A
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • Notification Group: A
  • Enabled: √

Rule 2:

  • Name: 3, 4 Offline, Send to Notification Group B
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • Notification Group: B
  • Enabled: √

Flexibly using parameters can make your notification function fully utilized

Special: Any Cycle Traffic notification

Can be used for monthly traffic monitoring

  • type:
    • transfer_in_cycle inbound traffic during the cycle
    • transfer_out_cycle outbound traffic during the cycle
    • transfer_all_cycle total traffic during the cycle
  • cycle_start: The start date of the statistical cycle (can be the start date of your server billing cycle). The time format is RFC3339, e.g., Beijing time is 2022-01-11T08:00:00.00+08:00
  • cycle_interval: The number of statistical cycle units (e.g., if the cycle unit is days, and this value is 7, it means statistics are collected every 7 days)
  • cycle_unit: Statistical cycle unit, default is hour, optional (hour, day, week, month, year)
  • min/max, cover, ignore refer to basic rule configuration

Example:

For servers with IDs 3 and 4 (defined in ignore), if the monthly outbound traffic exceeds 1TB starting from the 1st of each month, send an notification:

json
[{"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}}]

TIP

If you still have trouble editing rules, you can try the rule generators below to simplify the process. Note that Nezha Monitoring does not guarantee the functionality of these generated rules.

Notification Trigger Modes

  • Always Trigger: A notification is triggered every time the Agent reports a status that matches the notification rule.
  • Single Trigger: A notification is triggered only once when the status changes, such as from normal to abnormal or from abnormal to normal.

Set Tasks to Execute on notifications

If you need to execute a task while sending an notification message, you can set this item.

  • Task on Notification: The task to be executed when the notification status changes from "normal" to "event". The task should be set in the tasks page in advance.
  • Task on Recovery: The task to be executed when the notification status changes from "event" to "normal". The task should be set in the tasks page in advance.
- - - - \ No newline at end of file diff --git a/en_US/guide/q10.html b/en_US/guide/q10.html deleted file mode 100644 index 6e032b5a..00000000 --- a/en_US/guide/q10.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - Configuring OIDC Authentication | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Configuring OIDC Authentication

Modify the contents of config.yaml to configure OIDC (OpenID Connect) authentication. OIDC is an authentication layer on top of the OAuth 2.0 protocol, which allows applications to verify the identity of users based on the authentication performed by an Authorization Server. This method is widely used to implement single sign-on for modern applications.

Configuration Details

Here is a step-by-step guide to configuring the OIDC settings in your config.yaml:

yaml
oauth2:
-  type: oidc  # (Required) Specifies the authentication type as OIDC
-  oidcDisplayName: OIDC  # (Optional, default: OIDC) The name displayed on the login page
-  admin: ""  # (Fill at least one of admin or adminGroups; default: empty) Admin usernames, separated by commas. Users listed here are considered administrators
-  adminGroups: ""  # (Fill at least one of admin or adminGroups; default: empty) Admin groups, separated by commas. Users in these groups are considered administrators. Omit if group management is not used
-  clientid: # (Required) OIDC client ID
-  clientsecret: # (Required) OIDC client secret
-  oidcIssuer: https://auth.example.com/realms/master  # (Required) The issuer URL of the OIDC provider, obtainable from your OIDC provider
-  # oidcLogoutUrl: https://auth.example.com/realms/master/protocol/openid-connect/logout  # (Currently unusable due to a bug)
-  # oidcRegisterUrl: # (Optional) Registration link provided by the OIDC provider
-  oidcScopes: openid,profile,email  # (Optional, default: openid,profile,email) OIDC scopes requested, separated by commas
-  oidcLoginClaim: sub  # (Optional, default: sub) The username field returned by OIDC, can be preferred_username, sub, or email
-  oidcGroupsClaim: groups  # (Required if using adminGroups, default: groups) The user group information field returned by OIDC, can be groups or roles
-  oidcAutoCreate: false  # (Optional, default: false) Whether to automatically create a user if they do not exist
-  oidcAutoLogin: false  # (Optional, default: false) Whether to automatically redirect to the OIDC login page when the path is /login
- - - - \ No newline at end of file diff --git a/en_US/guide/q11.html b/en_US/guide/q11.html deleted file mode 100644 index a8e7dd55..00000000 --- a/en_US/guide/q11.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - Customize GeoIP database | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Customize GeoIP database

Dashboard v0.18.3+ uses an embedded GeoIP database to query IP locations. An IPinfo format mmdb database is required to be placed at pkg/geoip/geoip.db to compile the Dashboard with working GeoIP queries.

An IPinfo format mmdb is constructed by those fields:

  • An IP subnet as an entry
  • continent:Continent code
  • continent_name:Continent name
  • country:Country code
  • country_name:Country name

Dashboard only requires the country field, and other fields can be left empty.

Editing database

It is recommended to use mmdbwriter and maxminddb-golang libraries for editing mmdb databases as of now.

If your goal is to correct geographic information, it is recommended to modify directly based on the original IPinfo database. For similar operations, you can refer to the sing-geoip project.

Using the correction of IPinfo data as an example, you need to use the ReplaceWith inserter (which is the default value) and write the mmdbtype.Map information:

go
subnet := &net.IPNet{
-    IP:   net.ParseIP("114.5.1.4")
-    Mask: net.CIDRMask(32, 32)
-}
-countryMap := make(map[mmdbtype.String]mmdbtype.String)
-
-countryMap[mmdbtype.String("country")] = mmdbtype.String("JP")
-
-if err := writer.Insert(subnet, mmdbtype.Map(countryMap)); err != nil {
-	return err
-}

A writer is an instance of *mmdbwriter.Tree and needs to be created using the mmdbwriter.New method. The specific operations and the process of inserting other fields are not mentioned here.

After writing the database information to a file, you can use the mmdbinspect CLI tool to test the database information. For example:

shell
$ mmdbinspect -db ./country.mmdb 114.5.1.4
-[
-    {
-        "Database": "./country.mmdb",
-        "Records": [
-            {
-                "Network": "114.5.1.4/32",
-                "Record": {
-                    "continent": "AS",
-                    "continent_name": "Asia",
-                    "country": "JP",
-                    "country_name": "Japan"
-                }
-            }
-        ],
-        "Lookup": "114.5.1.4"
-    }
-]

Once the format and information are confirmed to be correct, the database can be used for compiling the Dashboard. Afterwards, you can test if the query API is working correctly using grpcurl or similar tools:

shell
grpcurl -proto ./nezha/proto/nezha.proto -plaintext -H 'client_secret: test' -d '{"ip": "114.5.1.4"}' 127.0.0.1:5555 proto.NezhaService/LookupGeoIP
- - - - \ No newline at end of file diff --git a/en_US/guide/q2.html b/en_US/guide/q2.html deleted file mode 100644 index b81ba216..00000000 --- a/en_US/guide/q2.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Agent Startup/Online Troubleshooting Process | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Agent Startup/Online Troubleshooting Process

  1. Directly execute /opt/nezha/agent/nezha-agent -s DashboardIP or non-CDN domain:RPCPort -p AgentKey -d to check if the logs indicate timeouts due to DNS or poor network conditions.
  2. Use nc -v Domain/IP RPCPort or telnet Domain/IP RPCPort to check for network issues, inspect the inbound and outbound firewalls of the local machine and the panel server. If you cannot determine the issue, you can use the port checking tool provided by https://port.ping.pe/.
  3. If the above steps indicate no issues but the Agent still does not go online correctly, try disabling SELinux. How to disable SELinux?
- - - - \ No newline at end of file diff --git a/en_US/guide/q3.html b/en_US/guide/q3.html deleted file mode 100644 index 1ba5e589..00000000 --- a/en_US/guide/q3.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - Reverse Proxy gRPC Port (Supports Cloudflare CDN) | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Reverse Proxy gRPC Port (Supports Cloudflare CDN)

Using Nginx or Caddy to reverse proxy gRPC

  • Nginx Configuration
nginx
server {
-    listen 443 ssl http2;
-    listen [::]:443 ssl http2;
-    server_name data.example.com; # Your domain that the Agent uses to connect to the Dashboard
-
-    ssl_certificate          /data/letsencrypt/fullchain.pem; # Path to your domain certificate
-    ssl_certificate_key      /data/letsencrypt/key.pem;       # Path to your domain private key
-    ssl_stapling on;
-    ssl_session_timeout 1d;
-    ssl_session_cache shared:SSL:10m; # This might conflict with other configuration files; comment it out if there are conflicts
-    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
-
-    underscores_in_headers on;
-
-    keepalive_time 24h;
-    keepalive_requests 100000;
-    keepalive_timeout 120s;
-
-    location / {
-        grpc_read_timeout 300s;
-        grpc_send_timeout 300s;
-        grpc_socket_keepalive on;
-        grpc_pass grpc://grpcservers;
-    }
-}
-
-upstream grpcservers {
-    server localhost:5555;
-    keepalive 512;
-}
  • Caddy Configuration
data.example.com:443 { # Your domain that the Agent uses to connect to the Dashboard
-    reverse_proxy {
-        to localhost:5555
-        transport http {
-            versions h2c 2
-        }
-    }
-}

Dashboard Configuration

  • First, log in to the Dashboard and go to the settings page. In the Non-CDN Dashboard server domain/IP field, enter the domain configured in Nginx or Caddy in the previous step, for example, data.example.com, and save it.
  • Then, on the Dashboard server, open the /opt/nezha/dashboard/data/config.yaml file. Modify proxygrpcport to the port that Nginx or Caddy is listening to, for example, 443. Since we enabled SSL/TLS in Nginx or Caddy, set tls to true. After making these changes, restart the Dashboard.

Agent Configuration

  • Log in to the Dashboard management backend, copy the one-click installation command, and execute it on the corresponding server to reinstall the agent.

Enabling Cloudflare CDN (Optional)

According to Cloudflare gRPC requirements: gRPC services must listen on port 443 and must support TLS and HTTP/2. So, to enable CDN, you must use port 443 when configuring Nginx or Caddy to reverse proxy gRPC and configure the certificate (Caddy will automatically apply and configure the certificate).

  • Log in to Cloudflare, select the domain you are using. Go to the Network tab and turn on the gRPC switch. Then, go to the DNS tab, find the DNS record for the domain configured in Nginx or Caddy to reverse proxy gRPC, and enable the CDN by clicking the orange cloud.

After enabling gRPC, it might not be available immediately, and you may need to wait for a while. You can use curl and nezha-agent -d to verify:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
-* processing: https://xxx.xxx.ovh
-*   Trying [2606:4700:3035::ac43:8bed]:443...
-* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
-# ... SSL info
-* using HTTP/2
-* h2 [:method: GET]
-* h2 [:scheme: https]
-* h2 [:authority: xxx.xxx.ovh]
-* h2 [:path: /]
-* h2 [user-agent: curl/8.2.1]
-* h2 [accept: */*]
-* Using Stream ID: 1
-> GET / HTTP/2
-> Host: xxx.xxx.ovh
-> User-Agent: curl/8.4.0
-> Accept: */*
-> content-type: application/grpc+proto
-> authorization: Bearer test
-> 
-< HTTP/2 405 
-< date: Wed, 20 Dec 2023 08:56:27 GMT
-< content-type: application/grpc+proto
-< cf-ray: 8386ac12dabd5ddc-HKG
-< cf-cache-status: DYNAMIC
-< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
-< grpc-status: 13
-< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
-< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
-< vary: Accept-Encoding
-< server: cloudflare
-< alt-svc: h3=":443"; ma=86400
-< 
-* Connection #0 to host xxx.xxx.ovh left intact
-localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
-NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
-NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # You need to modify the GRPCHost and TLS options in the Dashboard /opt/nezha/dashboard/data/config.yaml
-NEZHA@2023-12-20 05:14:01>> Error to close connection ...
- - - - \ No newline at end of file diff --git a/en_US/guide/q4.html b/en_US/guide/q4.html deleted file mode 100644 index d3ec1ec4..00000000 --- a/en_US/guide/q4.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Real-Time Channel Disconnection | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/en_US/guide/q5.html b/en_US/guide/q5.html deleted file mode 100644 index 5261fcfd..00000000 --- a/en_US/guide/q5.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - How to Perform Data Migration and Backup Recovery? | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/en_US/guide/q6.html b/en_US/guide/q6.html deleted file mode 100644 index 24a0a39c..00000000 --- a/en_US/guide/q6.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - How to Reset Traffic Statistics Monthly? | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

How to Reset Traffic Statistics Monthly?

The traffic statistics on the homepage reset every time the server restarts. To achieve a monthly reset of the traffic counter, you can do the following:

  1. Go to the Notification page in the management panel.
  2. Refer to this document to create a monthly traffic notification.
  3. Return to the homepage and go to the Services page, where you can see the monthly traffic statistics. The statistics here will not reset when the server restarts.

TIP

This method allows you to set any period, including but not limited to hourly, daily, weekly, monthly, or yearly traffic statistics reset, offering great flexibility!

- - - - \ No newline at end of file diff --git a/en_US/guide/q7.html b/en_US/guide/q7.html deleted file mode 100644 index 09bafac1..00000000 --- a/en_US/guide/q7.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Customizing Agent Monitoring Items | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Customizing Agent Monitoring Items

Customize Monitoring for Network Interfaces and Disk Partitions

Execute the following command to select network interfaces and partitions, then restart the Agent for changes to take effect:

bash
/opt/nezha/agent/nezha-agent edit

Additional Runtime Parameters

Viewing Supported Parameters

To view the supported runtime parameters, please execute the following command:

bash
./nezha-agent --help

Configuring Parameters

If you installed the Agent using a one-click script, you can add or modify parameters by editing the system service configuration. Edit the file /etc/systemd/system/nezha-agent.service and append your desired parameters at the end of the ExecStart= line:

  • --report-delay: Sets the interval for reporting system information. The default is 1 second. To reduce system resource usage, you can set this to 3 (valid range: 1-4 seconds).
  • --skip-conn: Disables monitoring of network connections. Recommended for servers with high numbers of connections or high CPU usage.
  • --skip-procs: Disables monitoring of process counts, helping to reduce resource usage of the Agent.
  • --disable-auto-update: Disables the automatic update feature of the Agent, enhancing security.
  • --disable-force-update: Disables the forced update feature of the Agent, enhancing security.
  • --disable-command-execute: Prevents execution of any scheduled tasks or use of the WebSSH on the Agent, enhancing security.
  • --tls: Enables SSL/TLS encryption. This should be enabled when you are using nginx to reverse proxy the Agent's gRPC connections and nginx is configured with SSL/TLS.
  • --use-ipv6-countrycode: Forces the use of IPv6 addresses to query country codes. By default, the Agent uses IPv4 addresses to query country codes. If server supports IPv6 and the country code of the IPv4 address is different, can use this parameter.
  • --gpu: Enables GPU monitoring. Note: Monitoring GPU usage may require installation of additional dependencies. For more details, refer to the documentation: Enable GPU Monitoring.
  • --temperature: Enables hardware temperature monitoring. Only effective on supported hardware, some VPS may not be able to retrieve temperature information.
  • -d --debug: Enables debug mode.
  • -u --ip-report-period: Set IP update interval. Is only effective when the set value is higher than --report-delay. The default is 1800 seconds.
  • -k --insecure: Disable TLS certificate integrity check. Useful in situations involving a self-signed certificate.
- - - - \ No newline at end of file diff --git a/en_US/guide/q8.html b/en_US/guide/q8.html deleted file mode 100644 index 979942f2..00000000 --- a/en_US/guide/q8.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Cloudflare Access OAuth2 Configuration | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Cloudflare Access OAuth2 Configuration

If you encounter issues logging in as an administrator using Github, Gitlab, or Gitee, you may consider switching to Cloudflare Access as the OAuth2 provider.

Example Configuration:

yaml
Oauth2:
-  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
-  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
-  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
-  Endpoint: "https://xxxxx.cloudflareaccess.com"
-  Type: cloudflare

Configuration Description:

ParameterRetrieval Method
AdminMy Team -> Users -> <specific user> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> Only keep the protocol and domain, no path

Setting Up a New SaaS-OIDC Application

Navigate to the Zero Trust Dashboard: https://one.dash.cloudflare.com/. Choose or create a new account, then follow these steps:

  1. Go to My Team -> Users -> Click <specific user> -> Obtain and save the User ID. (If this is your first time using Zero Trust, the Users list will be empty, and you can skip this step; users will appear after completing a verification.)
  2. Navigate to Access -> Applications -> Add an Application.
  3. Select SaaS. In the Application field, enter a custom application name (e.g., nezha), select OIDC, and then click Add application.
  4. For Scopes, select openid, email, profile, groups.
  5. In Redirect URLs, enter your Dashboard Callback URL, such as https://dashboard.example.com/oauth2/callback.
  6. Record the Client ID, Client Secret, and the protocol and domain part of the Issuer address, for example, https://xxxxx.cloudflareaccess.com.
  7. Edit the Dashboard configuration file (usually located at /opt/nezha/dashboard/data/config.yaml), adjust the OAuth2 settings according to the example configuration, and restart the Dashboard service.

Identity Verification Strategy Configuration

After setting up the Dashboard, you need to configure identity verification policies in the Zero Trust Dashboard. Navigate to: Access -> Applications -> <application name> -> Policies. You can choose from various SSO authentication methods, including email OTP and hardware key verification. For detailed configurations, refer to the Cloudflare Zero Trust Documentation.

Policy Configuration Example (One-time PIN)

Using email OTP as the default verification method:

  1. Navigate to Access -> Applications -> <application name> -> Policies -> Add a policy.
  2. Set a Policy Name, for example, OTP, and set Action to Allow.
  3. Under Configure rules, add a new Include rule. Select Emails as the Selector and enter your email address in the textbox.
  4. Click Save policy to save the configuration.

Testing the Policy

  1. If the configuration is correct, when you visit the Dashboard login interface, it will display as "Log in with Cloudflare Account." Clicking on login will redirect you to the Cloudflare Access login page.
  2. Enter the email address configured previously, click Send me a code, and then enter the code received to log in to the Dashboard.
  3. If User ID was not specified in Admin during previous steps, an error message will be displayed after login: "This user is not an administrator of this site and cannot log in." At this point, you need to go to My Team -> Users, find the corresponding user, click on the username to get the User ID, and enter it into the Admin section of the Dashboard configuration file. After restarting the Dashboard service, try logging in again.
- - - - \ No newline at end of file diff --git a/en_US/guide/q9.html b/en_US/guide/q9.html deleted file mode 100644 index 4b1acc21..00000000 --- a/en_US/guide/q9.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - Enable GPU monitoring | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Enable GPU monitoring

GPU monitoring is a new feature implemented in Nezha Monitoring v0.17.x. Before using the feature, please ensure your Dashboard version is higher than v0.17.2 and Agent version is higher than v0.17.0.

Enable

From Command-Line Flag

Append the --gpu flag to the Agent argument. For example:

bash
/opt/nezha/agent/nezha-agent -s example.com:5555 -p example --gpu

From configuration file

Execute the following command to modify Agent configuration to enable GPU monitoring.

bash
/opt/nezha/agent/nezha-agent edit

In the interactive menu returned, choose to enable GPU monitoring.

Enable GPU utilization monitoring

GPU model and GPU utilization are two different monitor items, which uses different approaches to obtain their value.

Windows and macOS supports getting GPU utilization without extra dependencies, and support multiple graphics card brands.

Linux distros support only NVIDIA and AMD cards and need to install extra dependencies.

Below are the instructions on how to enable GPU utilization monitoring on Linux for NVIDIA / AMD graphics cards.

NVIDIA

NVIDIA cards need the nvidia-smi utility to get GPU utilization. This utility is included in the official driver by default.

If you use unofficial drivers like nouveau, then it's not possible to get GPU utilization.

AMD

AMD cards need to install the open source amdgpu driver and the rocm-smi utility.

Mainstream distros have already packaged rocm-smi, below are commands to install the utility on these distros:

bash
# Arch Linux
-pacman -Sy rocm-smi-lib
-
-# Debian / Ubuntu
-apt install rocm-smi
-
-# Fedora / RHEL 8+
-dnf install rocm-smi

If your distro doesn't have the package, then you will need to compile rocm_smi_lib manually.

Required dependencies:git cmake gcc

First, clone the git repository of rocm_smi_lib:

bash
git clone https://github.com/ROCm/rocm_smi_lib

Then compile the libraries and install them on your system.

bash
cd rocm_smi_lib
-mkdir -p build
-cd build
-cmake ..
-make -j $(nproc)
-# Install library file and header; default location is /opt/rocm
-make install
- - - - \ No newline at end of file diff --git a/en_US/guide/servers.html b/en_US/guide/servers.html deleted file mode 100644 index 9a472462..00000000 --- a/en_US/guide/servers.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Server Management | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Server Management

Introduction

The server section is responsible for managing Agents, forming the most fundamental part of Nezha monitoring and serving as the basis for other functionalities.

Adding a Server

The first step is to add a server, where you can customize the name, group, sorting, and notes.
Servers in the same group will be displayed together in supported themes. Notes will only be visible in the Admin Panel, so there's no need to worry about leaking information.

Installing the Agent

Please refer to the previous section on installing the Agent.
It is recommended to use the one-click installation. After configuring the parameters, click the corresponding system icon in the one-click installation column of the server to copy the installation command and execute it on the respective server.

Forced Update

Agent update-related parameters include --disable-auto-update and --disable-force-update as described in Custom Agent Monitoring Projects.
By default, the Agent will update automatically without intervention. However, if the user disables automatic updates, you can select specific servers for a forced update.
The forced update will not work if disable-force-update is enabled.

Data Columns

  • Version: Records the current version of the Agent.
  • Hide from Guests: When true, guests cannot see this server in the Dashboard.
  • Enable DDNS: When true, if the server IP changes, the Dashboard will automatically update the DNS records.
  • DDNS Domain: The DDNS domain configured for this server.
  • Secret: The secret/key used for configuring the Agent, which is used to verify communication between the Agent and the Dashboard.
  • Note: Server notes, visible only after verification.
  • Public Note: Server public notes, visible on the frontend. You can customize frontend theme based on this field; see Public Note Example for details.
  • Installation commands: Click the corresponding system button to copy the command and execute it on the server for an instant installation.
  • Management: Connects to WebShell, modifies server configuration, or deletes the server.

WebSSH Terminal

This is WebShell; the feature will not work if disable-command-execute is enabled.
It is available for both Linux and Windows and supports Ctrl+Shift+V for pasting.
If the connection fails, refer to Real-Time Channel Disconnection/Online Terminal Connection Failure.

FM

Added in Dashboard v0.19.1 / Agent v0.19.0. A pseudo file manager embedded in WebShell, supports file download/upload, directory navigation and copying current path. Access it by clicking the blue button in the bottom-right corner of the WebShell.

Public Note Example

ServerStatus Theme Agent Billing Information Display

Click to expand/collapse

See https://github.com/naiba/nezha/pull/425.

- - - - \ No newline at end of file diff --git a/en_US/guide/services.html b/en_US/guide/services.html deleted file mode 100644 index d6d0fadb..00000000 --- a/en_US/guide/services.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Service Monitoring | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Service Monitoring

The Services section is where you set up monitoring for external websites or servers using Agents.
Configured service monitors can be viewed on the "Services" page of the homepage, displaying the availability monitoring results for the past 30 days.

How to Use

To add a new monitor, go to the "Services" page in the Admin dashboard and click "Add Monitor."

When adding a new service monitor, you need to set the following parameters:

  • Name: Customize a name.

  • Type: Select a monitor type. Nezha Monitoring currently supports three types: "HTTP-GET," "ICMP-Ping," and "TCP-Ping."

  • Target: Depending on the type you choose, the method for setting the target differs:

    • HTTP-GET: For this type, you should enter a URL as the target, including http:// or https://. If your target URL is https://, the SSL certificate of that URL will also be monitored. Notifications will be triggered when the SSL certificate expires or changes. Example: https://example.com.
    • ICMP-Ping: For this type, you should enter a domain name or IP without a port number. Example: 1.1.1.1 or example.com.
    • TCP-Ping: For this type, you should enter a domain name or IP with a port number. Example: 1.1.1.1:80 or example.com:22.
  • Request Interval: Set the interval in seconds at which the Agent requests the target.

  • Coverage: Select a rule to determine which Agents will request the target.

  • Specific Servers: Used in conjunction with the coverage scope, select Agents within the rule to exclude.

  • Notification Group: Choose the notification methods you have already set up on the "Notification" page. Click here for more details.

  • Enable Fault Notification: Choose whether to receive fault notifications for the target as needed. The default is unchecked.

After setting it up, click "Add." Wait a moment and go to the "Services" page on the homepage to view the monitoring results.

Latency Change Notification

Nezha Monitoring can monitor and record the latency between the Agent and the target server, sending notifications when there are significant changes. This feature helps you monitor if the server's network route has changed.

  • Enable Latency Notifications: When enabled, Notification will be sent if the latency from the Agent to the target server is greater than the Maximum Latency or less than the Minimum Latency.

Trigger Tasks on Notification

If you need to execute tasks when service monitoring Notification are triggered, you can check "Enable Trigger Tasks" and select the pre-configured trigger tasks in "Task on Notification" and "Task on Recovery."

Network Latency Chart

The TCP-Ping and ICMP-Ping monitoring types set in the Services page will automatically enable the monitoring chart feature. On the "Network" page of the homepage, you can view historical network latency charts. The data in the charts is based on the latency from the Agent to the target server. You can click the Agent's name to toggle the chart display. In the chart, you can uncheck the target server's name to hide or show the corresponding data.

Managing Monitors

To manage existing service monitors, go to the "Services" page in the Admin Panel. Select a monitor configuration and click the icons on the right to edit or delete it.

- - - - \ No newline at end of file diff --git a/en_US/guide/settings.html b/en_US/guide/settings.html deleted file mode 100644 index daccf752..00000000 --- a/en_US/guide/settings.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - Settings | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Settings

Site Title

You can customize the site title in this section.

Administrator List

  • If you have changed your Github, Gitlab, or Gitee username, you need to update it here to avoid login issues. Separate multiple usernames with commas: user1,user2.
  • To change the administrator account, go to /opt/nezha/dashboard/data/config.yaml and reset the new administrator Client ID and Client Secret.

Theme

Select the theme for the frontend and dashboard here. If a theme that already exists is not in the options, update the Dashboard.

To use a custom frontend theme, you need to create a theme description file. For more information on custom themes, please refer to Nezha Theme Development Environment.

Before enabling the dashboard Custom theme, ensure you have installed the custom theme; otherwise, the Dashboard will not display correctly after enabling this option.

Language

Nezha Monitoring currently supports the following languages:

  • Simplified Chinese (简体中文)
  • Traditional Chinese (繁體中文)
  • English
  • Spanish (Español)

We welcome corrections to translations or contributions of more languages.

Custom Code (style, script)

You can modify the LOGO, adjust colors, add beautification code, and add statistical code here.

WARNING

Custom code only affects the visitor homepage, not the admin panel. Due to differences in code between themes, if you need to modify the content in the admin panel, please modify the theme files in Docker.

Example of Changing Progress Bar Color, Background Image, Navigation Bar, etc., in the Default Theme

Click to expand/collapse
html
<style>
-/* Screen adaptation */
-@media only screen and (min-width: 1200px) {
-    .ui.container {
-    width: 80% !important;
-}
-}
-
-@media only screen and (max-width: 767px) {
-    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
-        margin-top: 0.4em !important;
-    }
-}
-
-/* Overall icons */
-i.icon {
-    color: #000;
-    width: 1.2em !important;
-}
-
-/* Background image */
-body {
-    content: " " !important;
-    background: fixed !important;
-    z-index: -1 !important;
-    top: 0 !important;
-    right: 0 !important;
-    bottom: 0 !important;
-    left: 0 !important;
-    background-position: top !important;
-    background-repeat: no-repeat !important;
-    background-size: cover !important;
-    background-image: url(https://backgroud.img) !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
-
-/* Navigation bar */
-.ui.large.menu {
-    border: 0 !important;
-    border-radius: 0px !important;
-    background-color: rgba(255, 255, 255, 55%) !important;
-}
-
-/* Homepage buttons */
-.ui.menu .active.item {
-    background-color: transparent !important;
-}
-
-/* Navigation bar dropdown */
-.ui.dropdown .menu {
-    border: 0 !important;
-    border-radius: 0 !important;
-    background-color: rgba(255, 255, 255, 80%) !important;
-}
-
-/* Login button */
-.nezha-primary-btn {
-    background-color: transparent !important;
-    color: #000 !important;
-}
-
-/* Large card */
-#app .ui.fluid.accordion {
-    background-color: #fbfbfb26 !important;
-    border-radius: 0.4rem !important;
-}
-
-/* Small card */
-.ui.four.cards>.card {
-    border-radius: 0.6rem !important;
-    background-color: #fafafaa3 !important;
-}
-
-.status.cards .wide.column {
-    padding-top: 0 !important;
-    padding-bottom: 0 !important;
-    height: 3.3rem !important;
-}
-
-.status.cards .three.wide.column {
-    padding-right: 0rem !important;
-}
-
-.status.cards .wide.column:nth-child(1) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .wide.column:nth-child(2) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .description {
-    padding-bottom: 0 !important;
-}
-
-/* Server name */
-.status.cards .flag {
-    margin-right: 0.5rem !important;
-}
-
-/* Popup card icon */
-.status.cards .header > .info.icon {
-    margin-right: 0 !important;
-}
-
-.nezha-secondary-font {
-    color: #2175ba !important;
-}
-
-/* Upload/download */
-.status.cards .outline.icon {
-    margin-right: 1px !important;
-}
-
-i.arrow.alternate.circle.down.outline.icon {
-    color: #2175ba !important;
-}
-
-i.arrow.alternate.circle.up.outline.icon {
-    color: red !important;
-}
-
-/* Popup card small arrow */
-.ui.right.center.popup {
-    margin: -3px 0 0 0.914286em !important;
-    -webkit-transform-origin: left 50% !important;
-    transform-origin: left 50% !important;
-}
-
-.ui.bottom.left.popup {
-    margin-left: 1px !important;
-    margin-top: 3px !important;
-}
-
-.ui.top.left.popup {
-    margin-left: 0 !important;
-    margin-bottom: 10px !important;
-}
-
-.ui.top.right.popup {
-    margin-right: 0 !important;
-    margin-bottom: 8px !important;
-}
-
-.ui.left.center.popup {
-    margin: -3px .91428571em 0 0 !important;
-    -webkit-transform-origin: right 50% !important;
-    transform-origin: right 50% !important;
-}
-
-.ui.right.center.popup:before,
-.ui.left.center.popup:before {
-    border: 0px solid #fafafaeb !important;
-    background: #fafafaeb !important;
-}
-
-.ui.top.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.bottom.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.bottom.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-.ui.top.left.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-.ui.top.right.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-.ui.left.center.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-/* Popup card */
-.status.cards .ui.content.popup {
-    min-width: 20rem !重要;
-    line-height: 2rem !重要;
-    border-radius: 5px !重要;
-    border: 1px solid transparent !重要;
-    background-color: #fafafaeb !重要;
-    font-family: Arial,Helvetica,sans-serif !重要;
-}
-
-.ui.content {
-    margin: 0 !重要;
-    padding: 1em !重要;
-}
-
-/* Service page */
-.ui
-
-.table {
-    background: RGB(225,225,225,0.6) !重要;
-}
-
-.ui.table thead th {
-    background: transparent !重要;
-}
-
-/* Service page progress bar */
-.service-status .good {
-    background-color: #2175ba !重要;
-}
-
-.service-status .danger {
-    background-color: red !重要;
-}
-
-.service-status .warning {
-    background-color: orange !重要;
-}
-
-/* Copyright */
-.ui.inverted.segment, .ui.primary.inverted.segment {
-    color: #000 !重要;
-    font-weight: bold !重要;
-    background-color: #fafafaa3 !重要;
-}
-</style>
-
-<!--Logo and Copyright-->
-<script>
-window.onload = function(){
-var avatar=document.querySelector(".item img")
-var footer=document.querySelector("div.is-size-7")
-footer.innerHTML="Copyright info"
-footer.style.visibility="visible"
-avatar.src="https:/img.src"
-avatar.style.visibility="visible"
-}
-</script>
Click to expand/collapse
html
<style>
-.ui.fine.progress> .progress-bar {
-  background-color: #00a7d0 !important;
-}
-</style>
-
-<script>
-window.onload = function(){
-  var avatar = document.querySelector("img");
-  var footer = document.querySelector("div.footer-container");
-  footer.innerHTML = "©2021 Your Name & Powered by Your Name";
-  footer.style.visibility = "visible";
-  avatar.src = "Your Image URL";
-  avatar.style.visibility = "visible";
-}
-</script>
Click to expand/collapse
html
<style>
-.right.menu>a {
-  visibility: hidden;
-}
-.footer .is-size-7 {
-  visibility: hidden;
-}
-.item img {
-  visibility: hidden;
-}
-</style>
-<script>
-window.onload = function() {
-  var avatar = document.querySelector(".item img");
-  var footer = document.querySelector("div.is-size-7");
-  footer.innerHTML = "Powered by Your Name";
-  footer.style.visibility = "visible";
-  avatar.src = "Your Square Logo URL";
-  avatar.style.visibility = "visible";
-}
-</script>

Example of Changing Background Image in Hotaru Theme

Click to expand/collapse
html
<style>
-.hotaru-cover {
-   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
-}
-</style>

View Password

If you don't want to display your Dashboard directly to visitors, you can set a view password here. After setting the password, visitors need to enter the password to access the homepage.

Non-CDN Dashboard Server Domain/IP

This setting is a prerequisite for using the one-click script to install the Agent. For details, please see here.

IP Change Notifications

If you want to receive notifications when a server's IP changes, you can set it up here.

Coverage

Select a rule to determine which servers to monitor. Choose according to your needs.

Specific Servers

Set exclusions for the selected rule in conjunction with the coverage scope.

Send Notifications to a Specific Notification Group

Choose a notification method, which should be set up in advance on the "Notification" page.

WARNING

Notifications take effect after enabling this setting.

Show Full IP Address in Notifications

IP change notifications hide the full IP by default. If you don't want to hide it, check "Show Full IP Address in Notification."

Disable Homepage Theme Switching

By default, the Dashboard allows visitors to change the theme. This feature only affects individual visitors and does not affect the theme set by the administrator in the admin panel. If you don't want visitors to switch themes, check this option.

- - - - \ No newline at end of file diff --git a/en_US/guide/tasks.html b/en_US/guide/tasks.html deleted file mode 100644 index 05a038b6..00000000 --- a/en_US/guide/tasks.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Task Management | Nezha Server Monitoring - - - - - - - - - - - - - - - - - - -
Skip to content

Task Management

In the Tasks section, you can set up scheduled tasks, trigger tasks, and batch execute tasks on multiple servers.

Nezha Monitoring supports pushing commands to Agents for execution. This feature is highly flexible and can be used for regular backups using tools like restic or rclone, periodically restarting a service to reset network connections, or executing a task when an notification is triggered, such as running a script when CPU usage is high for an extended period.

How to Use

Go to the "Tasks" page in the admin panel and click "Add Scheduled Task." When adding a scheduled task, you need to fill in the following parameters:

  • Name: Customize a task name.

  • Task Type: Choose the type of task.

    • Scheduled Task: Executes periodically according to the schedule set below.
    • Trigger Task: Only executed when triggered by an API call or notification rule, runs once per trigger.
  • Schedule: Set the schedule time (not enable when using trigger task type). The time format is * * * * * *, corresponding to second minute hour day month weekday. For more details, see Cron Expression Format.
    For example: 0 0 3 * * * means "3 AM every day."

  • Command: Set the command to execute, similar to writing Shell/Bat scripts, but it's recommended not to use new lines; connect multiple commands with && or &.
    For example, to schedule a reboot, you can enter reboot here.

  • Coverage and Specific Servers: Select rules to determine which Agents execute the scheduled task, similar to the settings on the "Services" page. When using the trigger task type, you can choose "executed by the triggered server."

  • Notification Group: Choose the notification methods you have set up on the "Notifications" page. Click here for more details.

  • Send Success Notification: Check this option to trigger a notification upon successful task execution.

Managing Tasks

To manage existing scheduled tasks, go to the "Tasks" page in the admin panel. For each task configuration, the three icons on the right are:

  • Execute Immediately: Click to ignore the scheduled time and execute the task immediately.
  • Edit: Click to modify the task configuration.
  • Delete: Delete the scheduled task.

Frequently Asked Questions

  1. Command not found error
    If a command fails to run with a "command not found" error, it may be a PATH environment variable issue. On Linux servers, you can add source ~/.bashrc at the beginning of the command or use the absolute path to execute the command.
- - - - \ No newline at end of file diff --git a/en_US/index.html b/en_US/index.html deleted file mode 100644 index c2bf3f05..00000000 --- a/en_US/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Nezha Monitoring - Server monitoring tool | User Manual - - - - - - - - - - - - - - - - - - -
Skip to content

Nezha Monitoring

Open-source, lightweight, and easy-to-use server monitoring and operation tool

- - - - \ No newline at end of file diff --git a/guide/agent.html b/guide/agent.html deleted file mode 100644 index fb6548d8..00000000 --- a/guide/agent.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - 安装 Agent | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

安装 Agent

哪吒监控的被控端服务被称为 Agent,本文档将介绍如何在被控端服务器上安装 Agent,并与 Dashboard 连接。

TIP

Agent 二进制文件仓库地址为:https://github.com/nezhahq/agent/releases

一键安装 Agent

哪吒监控支持在 Windows 和 Linux 上一键安装 Agent。遵循本文档的步骤,你可以很轻松地在服务器上部署它。

准备工作

你需要提前在管理面板中设置好通信域名,此域名不可以接入 CDN。本文档以示例通信域名 “data.example.com” 为例。
进入后台管理面板,转到“设置”页,在“未接入 CDN 的面板服务器域名/IP”项中填入通信域名,然后点击"保存"。

在 Linux 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Linux 图标按钮,复制一键安装命令。
  3. 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线。

在 macOS 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Apple 图标按钮,复制一键安装命令。
  3. 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线。

在 Windows 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Windows 图标按钮,复制一键安装命令。
  3. 进入 Windows 服务器,运行 PowerShell,在 PowerShell 中运行复制的安装命令。
  4. 如遇到确认「执行策略变更」请选择 Y。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

WARNING

如果在 PowerShell 中运行一键安装命令时遇到错误,请尝试下方的在 Windows 中手动安装 Agent

其他方式安装 Agent

在 Linux 中安装 Agent(支持大部分发行版)

点击展开/收起
  1. 首先在管理面板中添加一台服务器。
  2. 在被控服务器中,运行脚本(位于中国大陆的服务器请使用镜像):
bash
curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的被控服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/scripts/raw/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
  1. 选择“安装监控 Agent”。
  2. 输入通信域名,如:”data.example.com“。
  3. 输入面板通信端口(gRPC 端口),默认为 5555。
  4. 输入 Agent 密钥,Agent 密钥在管理面板中添加服务器时生成,可以在管理面板中的“服务器”页中找到。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

使用 Agent 内置服务命令安装(支持主流系统)

点击展开/收起

首先获取 Agent 的二进制文件:https://github.com/nezhahq/agent/releases

解压后输入以下命令安装服务(可能需要 root 权限):

bash
./nezha-agent service install -s server_name:port -p password

除了服务器地址和密码,还可以添加其它支持的参数。具体参考自定义 Agent 监控项目

卸载服务:

bash
./nezha-agent service uninstall

启动服务:

bash
./nezha-agent service start

停止服务:

bash
./nezha-agent service stop

重启服务:

bash
./nezha-agent service restart

runit 安装 Agent

点击展开/收起

目前 Agent 内置的服务功能已经支持了绝大部分 init 系统,包括 FreeBSD rc.d 和 openrc。尽管如此还是有一些漏网之鱼。

这里使用 Void Linux 的 runit 作为示例:

  1. 创建 /etc/sv/nezha-agent 目录:
bash
mkdir /etc/sv/nezha-agent
  1. 创建 /etc/sv/nezha-agent/run 服务文件,写入以下内容:
bash
#!/bin/sh
-exec 2>&1
-exec /opt/nezha/agent/nezha-agent -s server_name:port -p password 2>&1

这里同样可以添加其它参数。

  1. 创建 /etc/sv/nezha-agent/log/run
bash
#!/bin/sh
-exec vlogger -t nezha-agent -p daemon
  1. 启用服务:
bash
sudo ln -s /etc/sv/nezha-agent/ /var/service

之后可以通过 sv 命令来操作服务。

如何查看日志:

  1. 安装 socklog,并启用:
bash
sudo xbps-install -S socklog-void
-sudo ln -s /etc/sv/socklog-unix /var/service
  1. 运行 svlogtail 查看日志:
bash
sudo svlogtail | grep nezha-agent

在 Windows 中手动安装 Agent

在群晖 DSM 中安装 Agent

点击展开/收起
sh
# Agent 路径
-EXEC="/PATH/TO/nezha-agent"
-# 日志路径地址
-LOG="${EXEC}.log"
-# 额外执行参数, 可留空
-ARGS=""
-# 哪吒服务端 gRPC 地址
-SERVER="HOST_OR_IP:gRPC_PORT"
-# 上一步获取的主机密钥
-SECRET="APP_SECRET"
-# 运行服务的用户名, *强烈建议使用非root用户执行*
-RUN_USER="nezha"
-
-# 写入到 systemd 服务文件
-cat << EOF > /usr/lib/systemd/system/nezha.service
-[Unit]
-Description=Nezha Agent Service
-After=network.target
-
-[Service]
-Type=simple
-ExecStart=/bin/nohup ${EXEC} ${ARGS} -s ${SERVER} -p ${SECRET} &>> ${LOG} &
-ExecStop=ps -fe |grep nezha-agent|awk '{print \$2}'|xargs kill
-User=${RUN_USER
-
-}
-Restart=on-abort
-
-[Install]
-WantedBy=multi-user.target
-EOF
-
-# 重载服务
-systemctl daemon-reload
-# 启动服务
-systemctl start nezha
-# 服务自启动
-systemctl enable nezha

‼️修改对应信息后‼️
使用 root 账号执行上述命令即可安装完成。

在 macOS 中使用 Homebrew 安装 Agent

点击展开/收起

本节内容改编自 🐿️松鼠收集🌰,改编已获得原作者授权

WARNING

请务必先添加环境变量,再通过 Homebrew 安装 nezha-agent! 因 Homebrew 在软件安装时创建服务所需 plist 文件,若先安装再添加环境变量,会因缺少参数而启动失败。

  1. 添加环境变量:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="通信密钥,在服务页面获取"' >> ~/.zshrc
-echo 'export HOMEBREW_NEZHA_AGENT_SERVER="你的服务器和端口,格式 your.domain:5555 "' >> ~/.zshrc
-source ~/.zshrc
  1. 安装 Nezha Agent:

DANGER

请注意,此 Homebrew 仓库由第三方维护,与哪吒监控无关。 Nezha 项目组不对该仓库的可用性和安全性等方面作出背书。在使用前,请自行评估风险!

由于暂未提交到 Homebrew Core 官方库,暂时放在上述博客作者参与维护的 第三方 Homebrew 仓库 中:

shell
brew install brewforge/chinese/nezha-agent
  1. 通过 Homebrew 启动 Nezha Agent 服务:
shell
brew services start nezha-agent
  1. 检查服务状态:
shell
brew services info nezha-agent
  1. 停止服务:
shell
brew services stop nezha-agent
  1. 卸载 Nezha Agent:
shell
brew rm nezha-agent
  1. 报错时先检查环境变量:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
-echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. 若环境变量配置正确,再尝试重装:
shell
brew services stop nezha-agent
-brew reinstall nezha-agent
-brew services start nezha-agent
  1. 若仍未解决,请前往上述 第三方 Homebrew 仓库 提交 issue。

在 OpenWRT 中安装 Agent

点击展开/收起

如何一步到位,解决安装过程中的疑难杂症?

如何使旧版 OpenWRT/LEDE 自启动?

如何使新版 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
-
-start_service() {
- procd_open_instance
- procd_set_param command /root/nezha-agent -s 面板通信地址:端口 -p 秘钥 -d
- procd_set_param respawn
- procd_close_instance
-}
-
-stop_service() {
-  killall nezha-agent
-}
-
-restart() {
- stop
- sleep 2
- start
-}
  • 运行 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 镜像。

- - - - \ No newline at end of file diff --git a/guide/agentq.html b/guide/agentq.html deleted file mode 100644 index ff42a6cd..00000000 --- a/guide/agentq.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Agent 常见问题 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

Agent 常见问题

后台显示的 IP 和 Agent 实际 IP 不一致?

请查看 Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?。在此不再赘述。

一键脚本安装时出错

curl: Failed to connect to raw.githubusercontent.com......

多出现在中国大陆的服务器中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者手动安装 Agent。另外,也可以自行寻找第三方 Github 加速服务或者镜像,并在一键安装脚本中设置。

sudo: command not found

请先手动安装 sudo,例如在 Ubuntu 中:

shell
apt install sudo
- - - - \ No newline at end of file diff --git a/guide/api.html b/guide/api.html deleted file mode 100644 index 2f9e227b..00000000 --- a/guide/api.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - API 接口 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

API 接口

哪吒监控支持使用 API 接口查询面板中 Agent 的状态信息

创建 Token

哪吒面板的 API 接口允许使用 Token 认证与 Cookies 认证。要新建一个 Token,在进入管理面板后,点击右上角的头像,选择 “API Token”,进入 Token 管理页面。点击 “API Token”,自定义备注后,点击 “添加”。

如需删除一个 Token,请选择相应的 Token,点击右侧的删除图标。

WARNING

Token 是 API 接口的鉴权凭据,它对你的面板的信息安全非常重要,请不要泄漏你的 Token 给他人。

认证方式

确保在请求头中包含 Authorization: Token 进行身份认证。

Token 认证方式:

Request Headers:
-Authorization: Token

使用说明

WARNING

下面示例中的负数时间戳为(0000-00-00),目前表示 Dashboard 上线后该 Agent 从未汇报过,但不建议用正负性判断状态。

TIP

请求方式为 GET,返回格式为 JSON

获取服务器列表

请求:

GET /api/v1/server/list?tag=

参数:

  • tag(可选):ServerTag 是服务器的分组,提供此参数则仅查询该分组中的服务器。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653014667,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1"
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": ""
-        }
-    ]
-}

获取服务器详情

请求:

GET /api/v1/server/details?id=&tag=

参数:

  • id(可选):ServerID,多个 ID 以逗号分隔,提供此参数则查询该 ID 对应的服务器,同时无视 tag 参数。
  • tag(可选):ServerTag,提供此参数则仅查询该分组下的服务器。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653015042,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1",
-            "host": {
-                "Platform": "darwin",
-                "PlatformVersion": "12.3.1",
-                "CPU": [
-                    "Apple M1 Pro 1 Physical Core"
-                ],
-                "MemTotal": 17179869184,
-                "DiskTotal": 2473496842240,
-                "SwapTotal": 0,
-                "Arch": "arm64",
-                "Virtualization": "",
-                "BootTime": 1652683962,
-                "CountryCode": "hk",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 17.33,
-                "MemUsed": 14013841408,
-                "SwapUsed": 0,
-                "DiskUsed": 2335048912896,
-                "NetInTransfer": 2710273234,
-                "NetOutTransfer": 695454765,
-                "NetInSpeed": 10806,
-                "NetOutSpeed": 5303,
-                "Uptime": 331080,
-                "Load1": 5.23,
-                "Load5": 4.87,
-                "Load15": 3.99,
-                "TcpConnCount": 195,
-                "UdpConnCount": 70,
-                "ProcessCount": 437
-            }
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": "",
-            "host": {
-                "Platform": "",
-                "PlatformVersion": "",
-                "CPU": null,
-                "MemTotal": 0,
-                "DiskTotal": 0,
-                "SwapTotal": 0,
-                "Arch": "",
-                "Virtualization": "",
-                "BootTime": 0,
-                "CountryCode": "",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 0,
-                "MemUsed": 0,
-                "SwapUsed": 0,
-                "DiskUsed": 0,
-                "NetInTransfer": 0,
-                "NetOutTransfer": 0,
-                "NetInSpeed": 0,
-                "NetOutSpeed": 0,
-                "Uptime": 0,
-                "Load1": 0,
-                "Load5": 0,
-                "Load15": 0,
-                "TcpConnCount": 0,
-                "UdpConnCount": 0,
-                "ProcessCount": 0
-            }
-        }
-    ]
-}

获取 ICMP Ping / TCPing 数据

此 API 无需认证。(除限制游客访问的服务器)

请求:

GET /api/v1/monitor/{id}

参数:

  • id(必填):ServerID,只能是一个正整数。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "monitor_id": 1,
-            "server_id": 1,
-            "monitor_name": "Monitor1",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                68.2275,
-                70.1129
-            ]
-        },
-        {
-            "monitor_id": 2,
-            "server_id": 1,
-            "monitor_name": "Monitor2",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                66.656,
-                68.2153
-            ]
-        },
-        {
-            "monitor_id": 3,
-            "server_id": 1,
-            "monitor_name": "Monitor3",
-            "server_name": "Server1",
-            "created_at": [
-                1722142860000,
-                1722142920000
-            ],
-            "avg_delay": [
-                61.4525,
-                62.342
-            ]
-        }
-    ]
-}

注: created_atavg_delay 为对应关系。

自动注册节点

说明: 用于自动化注册节点的脚本,示例代码详见下文。

参考: https://github.com/naiba/nezha/pull/472

http
POST /api/v1/server/register?simple=1

参数:

  • simple:(可选) 指定返回数据的格式。
    • 当设置为 simple=1或者simple=true 时,返回的数据仅包含 Token 字符串(如 8GYwaxYuLfU7zl7ndC)。
    • 其他则返回完整的 JSON 对象:{"code": 200, "message": "Server created successfully","secret": "8GYwaxYuLfU7zl7ndC"}

请求体 (Payload):

你可以设置为空内容({}), 然后nezha面板会使用默认值进行填充

  • Name: 默认是节点的IP
  • Tag: 默认是 "AutoRegister".
  • Note:默认是 "".
  • HideForGuest: 默认是 "on".

你也可以设置自己的请求参数:

json
{
-  "Name": "abcd",        // 节点名称
-  "Tag": "",             // 标签,可选
-  "Note": "",            // 备注信息,可选
-  "HideForGuest": "on"   // 是否对访客隐藏
-}

使用案例

获取所有服务器信息

python
import requests
-
-url = "http://your-dashboard/api/v1/server/list"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-for server in data['result']:
-    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

获取特定服务器详情

python
import requests
-
-server_id = 1  # 替换为你的服务器ID
-url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-server = data['result'][0]
-print(f"Server Name: {server['name']}")
-print(f"CPU Usage: {server['status']['CPU']}%")
-print(f"Memory Used: {server['status']['MemUsed']} bytes")
-print(f"Disk Used: {server['status']['DiskUsed']} bytes")
-print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
-print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

通过以上示例代码,可以轻松获取和处理服务器的状态信息,从而实现自动化监控和管理。

自动注册节点

  1. 创建文件 nezha_register.sh,将以下内容复制到文件中:
bash
#!/bin/bash
-
-# Exit if NEZHA_TOKEN is not set
-if [ -z "${NEZHA_TOKEN}" ]; then
-    echo "NEZHA_TOKEN is not set. Exiting."
-    exit 0
-fi
-
-# Set default values if variables are not set
-NEZHA_PROBE_ADDRESS="${NEZHA_PROBE_ADDRESS:-probe.example.com}"
-NEZHA_PROBE_PORT="${NEZHA_PROBE_PORT:-5555}"
-NEZHA_DASHBOARD_URL="${NEZHA_DASHBOARD_URL:-https://nezha.example.com}"
-
-NODE_NAME=${NODE_NAME:-$(hostname)}
-
-# Send POST request and capture response and HTTP status code
-response=$(curl -s -o response_body.json -w "%{http_code}" -X POST "${NEZHA_DASHBOARD_URL}/api/v1/server/register?simple=true" \
-  -H "Content-Type: application/json" \
-  -H "Authorization: ${NEZHA_TOKEN}" \
-  -d "{\"Name\": \"${NODE_NAME}\"}")
-
-# Extract HTTP status code and Nezha secret
-HTTP_CODE="$response"
-NEZHA_SECRET=$(cat response_body.json)
-rm -f response_body.json
-
-if [ "$HTTP_CODE" != "200" ]; then
-    echo "Failed to get Nezha Secret. HTTP status code: $HTTP_CODE"
-    exit 1
-fi
-
-# Additional check for NEZHA_SECRET to ensure it's not JSON-formatted (indicating failure)
-if [[ "${NEZHA_SECRET:0:1}" == "{" ]]; then
-    echo "Failed to get Nezha Secret. Received response: ${NEZHA_SECRET}"
-    exit 1
-fi
-
-# Download and execute the install script with cleanup
-curl -fsSL https://raw.githubusercontent.com/nezhahq/scripts/main/install.sh -o nezha.sh && \
-chmod +x nezha.sh || { echo "Failed to download or make the script executable"; exit 1; }
-
-# Clean up nezha.sh on exit
-trap 'rm -f nezha.sh' EXIT
-
-# Run the Nezha agent installation script
-CMD="./nezha.sh install_agent "${NEZHA_PROBE_ADDRESS}" "${NEZHA_PROBE_PORT}" "${NEZHA_SECRET}" --tls"
-
-echo "Run commnad : ${CMD}"
-
-eval $CMD
  1. 为脚本赋予可执行权限: chmod +x nezha_register.sh
  2. 从dashboard获取token, 比如为 POXbxorKJBM8wPMKX8r2PdMblyXvpggB
  3. 配置环境变量
bash
export NEZHA_TOKEN="POXbxorKJBM8wPMKX8r2PdMblyXvpggB" # 从面板获取
-export NEZHA_PROBE_ADDRESS="your_probe_address"        # 填写探针地址
-export NEZHA_DASHBOARD_URL="https://nezha.example.com" # 修改为你的面板地址
-export NEZHA_PROBE_PORT="5555"                         # 修改为你的探针端口(如有不同)
  1. 运行注册脚本
bash
./nezha_register.sh
  1. 如果脚本成功运行,你会看到类似以下的日志:
bash
Run command: ./nezha.sh install_agent probe.example.com 5555 YOUR_SECRET --tls
- - - - \ No newline at end of file diff --git a/guide/dashboard.html b/guide/dashboard.html deleted file mode 100644 index e8a70750..00000000 --- a/guide/dashboard.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - 安装 Dashboard | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

安装 Dashboard

准备工作

搭建一个哪吒监控,你需要:

  1. 一台可以连接公网的服务器,防火墙和安全策略需要放行 8008 和 5555 端口,否则会无法访问和无法接收数据。单核 512MB 内存的服务器配置就足以满足大多数使用场景。
  2. 一个已经设置好 A 记录,指向 Dashboard 服务器 IP 的域名。

TIP

如果你想使用 CDN,请准备两个域名,一个配置好 CDN 用作公开访问,CDN 需要支持 WebSocket 协议;另一个域名不要使用 CDN,用作 Agent 端与 Dashboard 的通信。

本文档分别以 "dashboard.example.com" 和 "data.example.com" 两个域名来演示。

  1. 一个 Github 账号(或:Gitlab、Gitee)。

本文档将以宝塔面板反代 Dashboard 的过程作为示范,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考。

WARNING

本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,或手动安装 Nginx 或 Caddy 来配置 SSL 和反代。
如果你认为没有必要使用 80、443 端口来访问 Dashboard,你甚至不需要安装 Nginx 就可以直接使用安装脚本安装并运行哪吒监控。

获取 Github 的 Client ID 和密钥

哪吒监控接入 Github、Gitlab、Gitee 作为后台管理员账号。

  1. 首先我们需要新建一个验证应用,以 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)。
  2. 点击 “Register application”。
  3. 保存页面中的 Client ID,然后点击 “Generate a new client secret“,创建一个新的 Client Secret,新建的密钥仅会显示一次,请妥善保存

使用 Cloudflare Access 作为 OAuth2 提供方

对于位于中国大陆的用户,直接连接到 GitHub 可能会遇到困难。如果您在使用 GitHub、GitLab 或 Gitee 作为管理员账户登录时遇到问题,建议切换到使用 Cloudflare Access 作为 OAuth2 提供方 进行登录。

新建 SaaS-OIDC 应用流程

WARNING

以下步骤适用于已经开始使用 Zero Trust 的用户。如果您尚未使用过 Cloudflare Zero Trust,强烈建议您首先阅读 Cloudflare Access 作为 OAuth2 提供方的使用指南,以了解 Cloudflare Access 的配置示例和流程。

  1. 前往 Zero Trust Dashboard,使用 Cloudflare 账号登录。
  2. My Team -> Users -> <具体用户> -> 获取 User ID 并保存。
  3. Access -> Application -> Add an Application
  4. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC 后点击 Add application
  5. Scopes 选择 openid, email, profile, groups
  6. Redirect URLs 填写你的 callback 地址,例如 https://dashboard.example.com/oauth2/callback
  7. 保存 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com

如使用此方式,安装 Dashboard 完成后,需要修改配置文件 /opt/nezha/dashboard/data/config.yaml,将 Endpoint 配置修改为之前保存的 Issuer 地址,例如 https://xxxxx.cloudflareaccess.com,保存后需重启 Dashboard。

OIDC 验证配置(可选)

哪吒支持自定义 OIDC 验证登录。有关配置详情,请参考文档:启用 OIDC 认证

在服务器中安装 Dashboard

在面板服务器中,运行安装脚本:

bash
curl -L https://raw.githubusercontent.com/nezhahq/scripts/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的面板服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/scripts/raw/main/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/.+|file/.+)$ {
-    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 无需特别配置):

caddy
proxy /ws http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /terminal/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /file/* 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" ,不更改此项可能会导致你无法登录面板后台

更新 Dashboard

运行脚本 ./nezha.sh ,选择重启面板并更新。

- - - - \ No newline at end of file diff --git a/guide/dashboardq.html b/guide/dashboardq.html deleted file mode 100644 index 4cfdcb09..00000000 --- a/guide/dashboardq.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - Dashboard 常见问题 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

Dashboard 常见问题

为什么管理面板中显示的 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:

shell
curl https://ipapi.co/ip/
-curl ip.sb
-curl ip-api.com

忘记查看密码\删除查看密码

请查看或编辑 /opt/nezha/dashboard/data/config.yaml 文件。
密码位于 site-viewpassword 项中。

面板安装/重启/更新失败: iptables ......

首先尝试重启 Docker 再操作:

shell
systemctl 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 文件或在宝塔面板内:

  1. 网站 中找到安装 Dashboard 时配置的站点,点击右侧 设置

  2. 选择 配置文件,删除配置文件中的:

    nginx
    location ~ .*\.(js|css)?$
    -    {
    -        expires      12h;
    -        error_log /dev/null;
    -        access_log /dev/null;
    -    }
  3. 保存配置,并清空浏览器、Nginx、CDN 中的缓存,此时刷新页面应恢复正常。

面板无法启动:panic:无法找到配置的 DDNS 提供者...

填入的 DDNS provider 的值有误,目前仅支持 webhookcloudflaretencentclouddummy

面板更新 DDNS 崩溃:panic:interface conversion: interface {} is nil, not []interface {}

填入的 DDNS AccessIDAccessSecret 有误。

面板警告:NEZHA>> 错误的服务监控上报...

  1. Dashboard 与 Agent 版本不兼容导致含有对端不支持的 TaskType 导致,全部更新至最新版本即可解决。

  2. Dashboard v0.17.10 - v0.18.0 也存在此问题,更新至最新版本可以解决。

无法启动 Agent 服务:Unix syslog delivery error

此报错见于 Agent v0.16.9+。原因为系统的 /dev/log 套接字工作不正常或不存在。可参考 https://unix.stackexchange.com/questions/317064/how-do-i-restore-dev-log-in-systemdrsyslog-host 解决。如果使用的是 Docker,请避免使用 systemd 等 init 系统。

打开网络监控页显示:server monitor history not found

出现此错误说明没有在服务页中设置 TCP-Ping 和 ICMP-Ping 类型的监控或者监控数据还未生成。
如已经设置完毕,可以等待一段时间后再查看。

启用 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 并不会,需要手动更新。

连接在线终端时提示:Agent 信令下发失败

当 Agent 离线,或与 Dashboard 之间的连接不稳定时,可能会导致在线终端无法正常连接。 请检查 Agent 是否正常运行,是否与 Dashboard 保持稳定的连接。

- - - - \ No newline at end of file diff --git a/guide/ddns.html b/guide/ddns.html deleted file mode 100644 index cf1b9c00..00000000 --- a/guide/ddns.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - DDNS | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

DDNS

DDNS 功能适用于使用动态 IP 的服务器,当 Agent 上报了一个新的 IP(10分钟一次),Dashboard 会根据配置自动更新 DNS 记录。

为什么我要使用哪吒监控的 DDNS 功能?

  • 方便集中管理 DDNS 设置,而不是在每台服务器上都部署一个 DDNS 服务。
  • 仅在面板服务器上保存您的机密信息,防止外泄。

配置说明

可以直接在 Dashboard 管理页面中添加 DDNS 配置。

  1. 点击菜单栏中的“动态 DNS”选项,进入配置页面。
  2. 点击“新配置”按钮,在弹出窗口中按需填写信息。选项说明:
    • 名称:配置名称。
    • DDNS供应商:供应商类型,决定了使用何种方法更新 DNS 记录。
    • 域名(逗号分隔):域名,如填写多个域名需要用 , 分隔。支持 IDN(国际化域名)。
    • 最大重试次数:DDNS 更新尝试次数,默认为 3,范围为 1 到 10 的整数。
    • DDNS 凭据 1 以及 DDNS 凭据 2 为选填,通常需要至少填 1 个。下面的表格列出了所有供应商的对应选项。
  3. 如果使用 webhook 供应商,那么需要按需填写 Webhook 的对应选项。具体的说明请见 Webhook 配置说明
  4. 需要至少勾选 启用DDNS IPv4启用DDNS IPv6 中的一个,否则不会进行任何更新操作。
  5. 在添加了新的配置后,还需要修改服务器配置才能使 DDNS 生效。服务器相关选项说明:
    • 启用 DDNS:为此服务器启用 DDNS 功能。
    • DDNS 配置:要使用的 DDNS 配置 ID 列表,可以根据配置名称进行搜索。

Webhook 配置说明

Webhook 需要自行构建 HTTP 请求,适用于需要使用其它供应商的服务且操作较为简单的情况。

Webhook 相关选项说明:

  • Webhook 地址:HTTP 请求 URL。其中只有参数可以使用占位符。
  • Webhook 请求方式:HTTP 请求方式。支持 GETPOSTPATCHDELETE 以及 PUT
  • Webhook 请求类型:HTTP 请求体格式,为 JSON 或者 Form
  • Webhook 请求头:HTTP 请求头,用 JSON 填写,注意不支持嵌套。
  • Webhook 请求体:HTTP 请求体,GETDELETE 不会使用。如需使用嵌套格式,必须选择 JSON 作为请求类型。

Webhook 支持的占位符:

  • #ip#:主机 IP。
  • #domain#:DDNS 域名。每个域名的请求是分别进行的,所以此项的值只会是单个域名字符串。
  • #type#:IP 类型,值为 "ipv4""ipv6"
  • #record#:记录类型,值为 "A""AAAA"
  • #access_id#:DDNS 凭据 1。
  • #access_secret#:DDNS 凭据 2。

花生壳 Webhook 示例

点击展开/收起
  • URL:http://ddns.oray.com/ph/update?hostname=#domain#&myip=#ip#
  • 请求方式: GET
  • 请求头:{"Authorization": "Basic pass"},把 pass 替换成你的用户名:密码的 Base64 编码(例如,user:passdXNlcjpwYXNzCg==)。
  • 花生壳只支持 A 记录,所以只勾选启用 IPv4。其它 Webhook 选项不需要填。

供应商列表

供应商凭据1(ID)凭据2(Secret)
dummy❌️❌️
webhook可选可选
cloudflare❌️
tencentcloud

查看日志

在 Dashboard 的日志中,可以看到 DDNS 功能的相关日志,配置正确时,更新 DNS 记录时会有相应的日志记录。

shell
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成功
- - - - \ No newline at end of file diff --git a/guide/loginq.html b/guide/loginq.html deleted file mode 100644 index 0d99bf5f..00000000 --- a/guide/loginq.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 登录常见问题 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

登录常见问题

登录回调后页面卡住\拒绝连接\响应时间过长

还有其他一些表现形式,总之登录后浏览器无法正常显示。

  1. 您的服务器无法连接到 Github/Gitee,最常见于国内服务器配置 Github 情况下,可以考虑多尝试几次或者切换到 Cloudflare Access。
  2. 您配置错了回调地址,确保您的回调地址正确且端口与协议均正确!
  3. Dashboard 发生未知错误,您可以使用脚本查看日志。

TIP

什么是协议? 在浏览器中,您的域名以 :// 结尾的字符串即为协议,通常为 httphttps 两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。

如何检查我的回调地址是否错误?

请确保登录前浏览器显示的协议+域名+端口和登录后跳转到的协议+域名+端口一致。
请确保您的路径为 /oauth2/callback全部小写

登录后面板报错

  1. 清理 cookies 后重新登录,或换个浏览器。
  2. 检查回调地址,确保您的回调地址正确且端口与协议均正确!发起请求的地址需要和回调地址处于同域,端口、协议和域名(或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

同上。

使用 Cloudflare Access 作为 OAuth2 提供方时无法收到邮件验证码

  • 确认在 Policies 中已正确配置了邮件验证策略。
  • 检查您提供的邮箱地址是否正确无误。注意,不在策略白名单中的邮箱地址将不会接收到验证码。
- - - - \ No newline at end of file diff --git a/guide/nat.html b/guide/nat.html deleted file mode 100644 index 6aec99ed..00000000 --- a/guide/nat.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 内网穿透功能配置 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

内网穿透功能配置

哪吒服务器监控提供内置的内网穿透功能,允许用户通过设定 Dashboard 作为服务端,将运行在 Agent 上的内网服务(如家庭 OpenWrt 路由器、NAS 设备等)映射到公网上,便于外部访问。目前仅支持明文 HTTP 的穿透。

准备工作

在配置内网穿透前,请确保完成以下准备工作:

  • 确认已在您的设备上安装并运行哪吒监控的 Agent,并保持其与 Dashboard 的连接状态。
  • 准备一个公网域名,推荐使用子域名进行操作,如service-1.example.com。将此域名解析指向 Dashboard 服务器的公网 IP 地址。
  • 请注意,一个域名只能映射到一个 Agent 的内网服务。若需映射多个服务,请分别使用不同的域名,例如 service-2.example.com

WARNING

如果您的 Dashboard 服务器使用宝塔面板或其他管理工具,请确保所用域名,如 service-1.example.com 已在该面板中正确绑定至 Dashboard 站点,否则可能导致无法访问。

内网穿透配置步骤

  1. 登录至 Dashboard 管理页面,选择菜单栏中的“内网穿透”选项。
  2. 点击“添加”按钮,并填写以下所需信息:
    • 穿透名称:为此穿透配置自定义一个名称,如OpenWrt 登录页
    • Agent ID:填写需要进行穿透的 Agent 的 ID。
    • 内网服务地址:填写需穿透的内网服务地址,格式为 IP:端口,例如 127.0.0.1:80
    • 绑定域名:填写已准备的公网域名,如 service-1.example.com。如果面板使用了非标准端口访问(比如默认的 8008),需要手动添加才可以生效。
  3. 完成填写后,点击“新增”按钮,等待穿透生效。
  4. 尝试访问 http://service-1.example.com,以验证是否成功映射至 Agent 上的内网服务。

使用须知

  • 保持 Agent 与 Dashboard 之间的连接是内网穿透功能正常运作的前提。若 Agent 连接中断,已配置的穿透将暂时失效。
  • 考虑到内网穿透隧道本身不加密数据,建议在 Agent 与 Dashboard 之间以及 Dashboard 与客户端浏览器之间均使用 TLS/SSL,以确保数据传输过程的安全性。
- - - - \ No newline at end of file diff --git a/guide/notifications.html b/guide/notifications.html deleted file mode 100644 index 0a735f4d..00000000 --- a/guide/notifications.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - 通知设置 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

通知设置

哪吒监控支持对服务器的负载、CPU、内存、硬盘、流量、月流量、进程数、连接数进行监控,并在达到用户设定的阈值时发送告警通知。

灵活的通知方式

  • 在面板消息中,占位符 #DATETIME# 代表事件发生的时间戳。当通知被触发时,面板会自动将 #DATETIME# 替换为事件的实际时间。
  • #NEZHA# 是面板消息占位符,面板触发通知时会自动用实际消息替换占位符。
  • Body 内容是 JSON 格式的:当请求类型为 FORM 时,值为 key:value 的形式,value 里面可放置占位符,通知时会自动替换。当请求类型为 JSON 时 只会简单进行字符串替换后直接提交到 URL
  • URL 里面也可放置占位符,请求时会进行简单的字符串替换。

请参考以下的通知方式示例,也可以根据自己的需求灵活设置推送方式。

Bark 示例

点击展开/收起
  • 名称:Bark

  • URL 组成: /: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"}

Slack 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前准备好 Slack 的 Workspace 并为这个 Workspace 创建一个 App。如果你还没有创建,可以在 Slack API 创建一个 App。

创建完成 App 后,需要为这个 App 添加一个 Incoming Webhook。在 App 的设置页面中找到 Incoming Webhooks,将 Activate Incoming Webhooks 勾选为 ON,在页面下方找到并点击 Add New Webhook to Workspace,选择一个 Channel,然后点击允许。完成创建后,你会得到一个 Webhook URL,使用这个 URL 替换下方的示例 URL。

Server 酱示例

点击展开/收起

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![logo](https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg)"
    -}

    展示

Telegram 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前在 Telegram 中创建一个机器人,获取到机器人的 token 和你的 Telegram 用户 ID。

机器人的 token 和用户 ID 都是数字和字母的组合,可以在 Telegram 中与 @userinfobot 对话获取自己的用户 ID。与 @BotFather 对话,输入命令 /newbot 创建一个机器人,创建完成后可以获得机器人的 token。

得到的 token 和用户 ID 都是字符串,可以直接拼接到 URL 中,如下所示,将 botXXXXXX 中的 XXXXXX 替换为你的机器人 token,要保留其中的 bot,将 YYYYYY 替换为你的用户 ID。注意,你需要先与机器人对话,否则机器人无法发送消息给你。#NEZHA# 是占位符,不要修改和删除

wxpusher 示例

需要提前关注你的应用

点击展开/收起

邮件通知示例 - SendCloud 贡献者:@白歌

点击展开/收起

注意:SendCloud 有每日免费发送邮件限额限制,这里仅作示例,你可以选择付费服务或其他类似的免费服务,使用方法类似。

URL 参数获取说明

该示例使用 SendCloud 作为发信服务,需提前在 SendCloud 注册账号,创建发件邮箱,然后在这里获取 APIUSER 和 APIKEY。

替换示例 URL 中的 <替换APIUSER><替换APIKEY> 为自己的 APIUSER 和 APIKEY,替换 URL 中的 <自定义发件邮箱><自定义收件邮箱> 为任意的的发件邮箱和收件邮箱。

  • 名称:邮件告警
  • 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 参数获取说明

请提前在钉钉中创建一个机器人,获取到机器人的 token。

机器人 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

点击展开/收起

URL 参数获取说明

机器人 URL 通过飞书群 - 群机器人 - 添加机器人 - 自定义机器人(webhook)创建后获取。

Matrix 通知示例

点击展开/收起

参数说明

  • $ 开头的大写变量都需要替换为你的实际值。
    • YOUR_HOME_SERVER: Matrix 服务器的地址。
    • YOUR_NEZHA_URL: 你的哪吒面板的 URL。
    • YOUR_MATRIX_USERNAMEYOUR_MATRIX_PASSWD: Matrix 用户名和密码。
    • YOUR_MATRIX_TOKEN 获取方式:
      sh
      curl -XPOST -d '{"type": "m.login.password", "identifier": {"user": "$YOUR_MATRIX_USERNAME", "type": "m.id.user"}, "password": "$YOUR_MATRIX_PASSWD"}' "https://$YOUR_HOME_SERVER/_matrix/client/r0/login"

请求配置

  • 名称: Matrix
  • URL: https://$YOUR_HOME_SERVER/_matrix/client/r0/rooms/$ROOM_ID/send/m.room.message
  • 请求方式: POST
  • 请求类型: JSON
  • Header:
    json
    {
    -  "Authorization": "Bearer $YOUR_MATRIX_TOKEN"
    -}
  • Body:
    json
    {
    -  "msgtype": "m.text",
    -  "format": "org.matrix.custom.html",
    -  "formatted_body": "<html><head><title>Nezha Dashboard</title></head><body><h1><a href=\"$YOUR_NEZHA_URL\" target=\"_blank\">Nezha Dashboard</a></h1><ul><li>datetime: #DATETIME#</li><li>Message: #NEZHA#</li></ul></body></html>",
    -  "body": "#NEZHA#"
    -}

使用步骤

  1. 替换变量: 将 $YOUR_HOME_SERVER, $YOUR_NEZHA_URL, $YOUR_MATRIX_USERNAME, $YOUR_MATRIX_PASSWD, 以及 $YOUR_MATRIX_TOKEN 替换为你自己的值。
  2. 获取 Token: 使用上面提供的 curl 命令来获取 YOUR_MATRIX_TOKEN,确保替换所有相关的变量。
  3. 配置请求: 使用上述配置来设置你的请求,确保使用正确的 URL、请求头和请求体。
  4. 发送通知: 通过配置后的请求发送 Matrix 消息,完成哪吒监控的通知集成。

这样设置好后,每次触发通知时,你的 Matrix 房间中就会收到格式化的哪吒面板信息。

告警规则说明

基本规则

  • type:可选取一个或多个类型,如在一个规则中选择了多个类型,需要同时满足所有选择的类型才会触发通知(可参考后面的示例)
    • cpugpumemoryswapdisk
    • net_in_speed 入站网速、net_out_speed 出站网速、net_all_speed 双向网速、transfer_in 入站流量、transfer_out 出站流量、transfer_all 双向流量
    • offline 离线监控
    • load1load5load15 负载
    • process_count 进程数(目前取线程数占用资源太多,暂时不支持)
    • tcp_conn_countudp_conn_count 连接数
    • temperature_max 最高温度值
  • duration:持续数秒,数秒内采样记录 30% 以上触发阈值才会告警(防数据插针)
  • minmax
    • 流量、网速类单位为字节(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 持续 10 秒超过 50% 内存持续 20 秒占用低于 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/maxcoverignore 参考基本规则配置

示例:

ID 为 3 和 4 的服务器(ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时告警:

json
[{"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}}]

TIP

如果对告警配置仍感到有困难,可以试试以下第三方配置生成器简化操作。哪吒监控不对生成配置的功能性作任何保证。

通知触发模式

  • 始终触发:每当 Agent 上报的状态符合告警的规则时,都会触发一次通知。
  • 单次触发:仅状态改变时触发一次通知,如从正常状态改变为异常状态,或异常状态恢复为正常状态。

设置告警时执行任务

如果需要在发出告警消息的同时执行某项任务,可以设置此项目。

  • 告警时触发任务:当告警状态符合从“正常”变更为“事件”时,所要执行的任务,任务应提前在任务页设置。
  • 恢复时触发任务:当告警状态符合从“事件”恢复为“正常”时,所要执行的任务,任务应提前在任务页设置。
- - - - \ No newline at end of file diff --git a/guide/q1.html b/guide/q1.html deleted file mode 100644 index 7956e7cd..00000000 --- a/guide/q1.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - 反向代理 Telegram Bot API | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

反向代理 Telegram Bot API

如果你的 Dashboard 服务器无法访问 Telegram Bot API,但你依然想使用 Telegram 来推送通知,你可以尝试使用反向代理的方式解决这个问题。

准备工作

这里介绍使用你自己的服务器进行反代的方法。你也可以选择使用 Cloudflare 的 Workers 进行反代,但可能对于中国大陆的用户来说网络连通性依然不佳。

要搭建一个 Telegram Bot API 反代,你需要准备以下内容:

  1. 一个可以连接 Telegram Bot API 服务器(并安装好 Nginx)。
  2. 一个域名(提前申请 SSL 证书)。

NGINX 配置

编辑 Nginx 配置文件,在 http{} 中添加如下配置:

nginx
# HTTP 强制跳转到 HTTPS
-server {
-    listen 80;
-    listen [::]:80;
-    server_name <yourDomainName>;
-
-    # 强制 HTTPS
-    return 301 https://$server_name$request_uri;
-}
-
-# HTTPS 配置
-server {
-    listen 443 ssl;
-    listen [::]:443 ssl;
-    server_name <yourDomainName>;
-
-    # SSL 证书路径
-    ssl_certificate </path/to/your/server.pem>;
-    ssl_certificate_key </path/to/your/server.key>;
-
-    # Root 非必要
-    root /var/www/tgbot/;
-
-    # 必须配置 DNS,否则会报 502 错误
-    resolver 8.8.8.8;
-
-    # 以 /bot 开头的请求会被正则匹配
-    location ~* ^/bot {
-        proxy_buffering off;
-        proxy_pass  https://api.telegram.org$request_uri;
-        proxy_http_version 1.1;
-    }
-
-    # Root 非必要,主要用于确认服务器状态。也可以改为 return 403
-    location / {
-        try_files $uri $uri /index.html;
-    }
-
-    # 错误日志
-    error_log /var/log/tg.log error;
-}
  • yourDomainName:你准备的域名
  • ssl_certificate:SSL 证书路径
  • ssl_certificate_key:SSL 证书路径

使用方式

执行 systemctl restart nginx 重启 Nginx。然后在 Nezha 中将原来的 https://api.telegram.org/ 替换为 https://<yourDomainName>/,即可正常推送消息。

防止盗用

配置防火墙以防止他人盗用你的反代服务:

  • serverIp:Agent 的 IP 地址。根据你的系统选择适用的命令,ufwiptables 均可。
bash
# Ubuntu
-ufw allow proto tcp from <serverIp> to any port 443
-
-# CentOS
-iptables -I INPUT -p tcp --dport 443 -j DROP
-iptables -I INPUT -s <serverIp> -p tcp --dport 443 -j ACCEPT

通过以上配置,可以有效防止未经授权的访问。

- - - - \ No newline at end of file diff --git a/guide/q10.html b/guide/q10.html deleted file mode 100644 index 5b394b09..00000000 --- a/guide/q10.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - 配置OIDC认证 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

配置OIDC认证

修改 config.yaml 文件的内容来配置 OIDC(OpenID Connect)认证。OIDC 是建立在 OAuth 2.0 协议之上的认证层,允许应用程序通过授权服务器执行的认证来验证用户的身份。这种方法广泛用于实现现代应用程序的单点登录。

配置详细信息

以下是在 config.yaml 中配置 OIDC 设置的逐步指南:

yaml
oauth2:
-  type: oidc  # (必填)指定认证类型为 OIDC
-  oidcDisplayName: OIDC  # (可选,默认值为 OIDC)登录页面显示的名称
-  admin: ""  # (至少填写 admin 或 adminGroups 中的一个;默认为空)管理员用户名,用逗号分隔。列在此处的用户被视为管理员
-  adminGroups: ""  # (至少填写 admin 或 adminGroups 中的一个;默认为空)管理员组,用逗号分隔。属于这些组的用户被视为管理员。如果不使用组管理,可以省略此项
-  clientid: # (必填)OIDC 客户端 ID
-  clientsecret: # (必填)OIDC 客户端密钥
-  oidcIssuer: https://auth.example.com/realms/master  # (必填)OIDC 提供商的 issuer URL,可以从您的OIDC 提供商处获取
-  # oidcLogoutUrl: https://auth.example.com/realms/master/protocol/openid-connect/logout  # (因 bug 目前不能使用)
-  # oidcRegisterUrl: # (可选)OIDC 提供商的注册链接
-  oidcScopes: openid,profile,email  # (可选,默认值为 openid,profile,email )OIDC 请求的 scope,用逗号分隔
-  oidcLoginClaim: sub  # (可选,默认值为 sub)OIDC 返回的用户名字段,可以是 preferred_username、sub 或email
-  oidcGroupsClaim: groups  # (如果使用 adminGroups,则必填,默认值为 groups )OIDC 返回的用户组信息字段,可以是 groups 或 roles
-  oidcAutoCreate: false  # (可选,默认值为 false)如果用户不存在,是否自动创建用户
-  oidcAutoLogin: false  # (可选,默认值为 false)当地址是 /login 时,是否自动跳转到OIDC登录页面
- - - - \ No newline at end of file diff --git a/guide/q11.html b/guide/q11.html deleted file mode 100644 index 8a279ca6..00000000 --- a/guide/q11.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - 自定义 IP 地理位置数据库 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

自定义 IP 地理位置数据库

Dashboard v0.18.3+ 采用离线数据库获取 GeoIP 信息,如需编译正确显示地理位置信息的 Dashboard,必须在 pkg/geoip/geoip.db 路径下放置符合 IPinfo 格式的 mmdb 数据库。

IPinfo 格式包含以下字段:

  • 作为条目的 IP 子网
  • continent:大洲代码
  • continent_name:大洲名称
  • country:国家/地区代码
  • country_name:国家/地区名称

其中 Dashboard 只需要用到 country 信息,其它字段可留空。

编辑数据库

目前推荐使用 MaxMind 官方使用的 mmdbwritermaxminddb-golang 这两个库进行 mmdb 的编辑操作。

如果你的主要目的是为了校正地理信息,建议直接在 IPinfo 原版数据库的基础上修改。类似的操作可以参考 sing-geoip 项目。

这里以校正 IPinfo 数据为例,你需要使用 ReplaceWith inserter(此为默认值)并写入 mmdbtype.Map 信息:

go
subnet := &net.IPNet{
-    IP:   net.ParseIP("114.5.1.4")
-    Mask: net.CIDRMask(32, 32)
-}
-countryMap := make(map[mmdbtype.String]mmdbtype.String)
-
-countryMap[mmdbtype.String("country")] = mmdbtype.String("JP")
-
-if err := writer.Insert(subnet, mmdbtype.Map(countryMap)); err != nil {
-	return err
-}

其中 writer 为一个 *mmdbwriter.Tree 的实例,需要通过 mmdbwriter.New 方法创建。具体操作和插入其它字段的过程不再赘述。

编辑完成并将数据库信息写入到文件后,可以使用 mmdbinspect 命令行工具测试数据库信息。例如:

shell
$ mmdbinspect -db ./country.mmdb 114.5.1.4
-[
-    {
-        "Database": "./country.mmdb",
-        "Records": [
-            {
-                "Network": "114.5.1.4/32",
-                "Record": {
-                    "continent": "AS",
-                    "continent_name": "Asia",
-                    "country": "JP",
-                    "country_name": "Japan"
-                }
-            }
-        ],
-        "Lookup": "114.5.1.4"
-    }
-]

确定格式、信息无误后便可用于 Dashboard 编译。之后可通过 grpcurl 或类似工具测试查询 API 是否工作正常:

shell
grpcurl -proto ./nezha/proto/nezha.proto -plaintext -H 'client_secret: test' -d '{"ip": "114.5.1.4"}' 127.0.0.1:5555 proto.NezhaService/LookupGeoIP
- - - - \ No newline at end of file diff --git a/guide/q2.html b/guide/q2.html deleted file mode 100644 index befbacee..00000000 --- a/guide/q2.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - Agent 启动/上线 问题自检流程 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

Agent 启动/上线 问题自检流程

  1. 直接执行 /opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d 查看日志是否是因为 DNS、网络不佳导致超时(timeout)
  2. nc -v 域名/IP 面板RPC端口 或者 telnet 域名/IP 面板RPC端口 来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 https://port.ping.pe/ 提供的端口检查工具进行检测。
  3. 如果上面步骤检测正常,Agent 依然没有正常上线,请尝试关闭 SELinux,如何关闭 SELinux?
- - - - \ No newline at end of file diff --git a/guide/q3.html b/guide/q3.html deleted file mode 100644 index f6682394..00000000 --- a/guide/q3.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - 反向代理 gRPC 端口(支持 Cloudflare CDN) | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

反向代理 gRPC 端口(支持 Cloudflare CDN)

使用 Nginx 或者 Caddy 反向代理 gRPC

  • Nginx 配置
nginx
server {
-    listen 443 ssl http2;
-    listen [::]:443 ssl http2;
-    server_name data.example.com; # 你的 Agent 连接 Dashboard 的域名
-
-    ssl_certificate          /data/letsencrypt/fullchain.pem; # 你的域名证书路径
-    ssl_certificate_key      /data/letsencrypt/key.pem;       # 你的域名私钥路径
-    ssl_stapling on;
-    ssl_session_timeout 1d;
-    ssl_session_cache shared:SSL:10m; # 此项可能会和其他配置文件冲突,如冲突请注释此项
-    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
-
-    underscores_in_headers on;
-
-    keepalive_time 24h;
-    keepalive_requests 100000;
-    keepalive_timeout 120s;
-
-    location / {
-        grpc_read_timeout 300s;
-        grpc_send_timeout 300s;
-        grpc_socket_keepalive on;
-        grpc_pass grpc://grpcservers;
-    }
-}
-
-upstream grpcservers {
-    server localhost:5555;
-    keepalive 512;
-}
  • Caddy 配置
data.example.com:443 { # 你的 Agent 连接 Dashboard 的域名
-    reverse_proxy {
-        to localhost:5555
-        transport http {
-            versions h2c 2
-        }
-    }
-}

Dashboard 面板端配置

  • 首先登录面板进入管理后台 打开设置页面,在 未接入CDN的面板服务器域名/IP 中填入上一步在 Nginx 或 Caddy 中配置的域名 比如 data.example.com ,并保存。
  • 然后在面板服务器中,打开 /opt/nezha/dashboard/data/config.yaml 文件,将 proxygrpcport 修改为 Nginx 或 Caddy 监听的端口,比如上一步设置的 443 ;因为我们在 Nginx 或 Caddy 中开启了 SSL/TLS,所以需要将 tls 设置为 true ;修改完成后重启面板。

Agent 端配置

  • 登录面板管理后台,复制一键安装命令,在对应的服务器上面执行一键安装命令重新安装 agent 端即可。

开启 Cloudflare CDN(可选)

根据 Cloudflare gRPC 的要求:gRPC 服务必须侦听 443 端口 且必须支持 TLS 和 HTTP/2。 所以如果需要开启 CDN,必须在配置 Nginx 或者 Caddy 反向代理 gRPC 时使用 443 端口,并配置证书(Caddy 会自动申请并配置证书)。

  • 登录 Cloudflare,选择使用的域名。打开 网络 选项将 gRPC 开关打开,打开 DNS 选项,找到 Nginx 或 Caddy 反代 gRPC 配置的域名的解析记录,打开橙色云启用 CDN。

开启gRPC后,可能不能立即可用,需要等待一段时间。具体可通过curl和使用nezha-agent -d来验证:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
-* processing: https://xxx.xxx.ovh
-*   Trying [2606:4700:3035::ac43:8bed]:443...
-* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
-# ... SSL info
-* using HTTP/2
-* h2 [:method: GET]
-* h2 [:scheme: https]
-* h2 [:authority: xxx.xxx.ovh]
-* h2 [:path: /]
-* h2 [user-agent: curl/8.2.1]
-* h2 [accept: */*]
-* Using Stream ID: 1
-> GET / HTTP/2
-> Host: xxx.xxx.ovh
-> User-Agent: curl/8.4.0
-> Accept: */*
-> content-type: application/grpc+proto
-> authorization: Bearer test
-> 
-< HTTP/2 405 
-< date: Wed, 20 Dec 2023 08:56:27 GMT
-< content-type: application/grpc+proto
-< cf-ray: 8386ac12dabd5ddc-HKG
-< cf-cache-status: DYNAMIC
-< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
-< grpc-status: 13
-< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
-< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
-< vary: Accept-Encoding
-< server: cloudflare
-< alt-svc: h3=":443"; ma=86400
-< 
-* Connection #0 to host xxx.xxx.ovh left intact
-localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
-NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
-NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # 需要修改主控端 /opt/nezha/dashboard/data/config.yaml的 GRPCHost 和 TLS 选项
-NEZHA@2023-12-20 05:14:01>> Error to close connection ...
- - - - \ No newline at end of file diff --git a/guide/q4.html b/guide/q4.html deleted file mode 100644 index 4f20ef2a..00000000 --- a/guide/q4.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 实时通道断开 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/guide/q5.html b/guide/q5.html deleted file mode 100644 index 430ee301..00000000 --- a/guide/q5.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 如何进行数据迁移、备份恢复? | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/guide/q6.html b/guide/q6.html deleted file mode 100644 index a40b97dd..00000000 --- a/guide/q6.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 如何每月重置流量统计? | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

如何每月重置流量统计?

主页中的流量统计每次服务器重启时都会重置,如果要实现每月重置一次流量计数,可以这样实现:

  1. 进入管理面板的 告警
  2. 参考这篇文档,创建一个月流量告警
  3. 返回主页,在 服务 页中就可以看到月流量统计了,这里的统计数据不会因为服务器重启而重置

TIP

此方式可以设置任何周期,包括且不限于每小时/每天/每周/每月/每年重置流量统计,非常灵活!

- - - - \ No newline at end of file diff --git a/guide/q7.html b/guide/q7.html deleted file mode 100644 index ac3cb91d..00000000 --- a/guide/q7.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 自定义 Agent 监控项目 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

自定义 Agent 监控项目

自定义监控的网卡和硬盘分区

执行以下命令来选择网卡和分区,然后重启 Agent 即可生效:

bash
/opt/nezha/agent/nezha-agent edit

其他运行参数

查看支持的参数

要查看支持的运行参数,请执行以下命令:

bash
./nezha-agent --help

配置参数

如果您通过一键脚本安装了 Agent,可以通过编辑系统服务配置来添加或修改参数。编辑文件 /etc/systemd/system/nezha-agent.service,并在 ExecStart= 行的末尾添加您需要的参数:

TIP

如果您需要批量添加参数,可以利用 Dashboard 的计划任务功能。以禁用 Agent 自动更新功能为例,您可以设置一个计划任务。添加以下命令以修改系统服务配置,并触发该任务执行:

bash
sed -i '/^ExecStart=/ s/$/ --disable-auto-update/' /etc/systemd/system/nezha-agent.service && systemctl daemon-reload
  • --report-delay:设置系统信息上报的间隔时间。默认为 1 秒。为了降低系统资源占用,可以设置为 3(有效范围:1-4 秒)。
  • --skip-conn:不监控网络连接数。建议在连接数较多或 CPU 资源占用较高的服务器上使用此参数。
  • --skip-procs:不监控进程数,有助于降低 Agent 的资源占用。
  • --disable-auto-update:禁用 Agent 的自动更新功能,增强安全性。
  • --disable-force-update:禁用 Agent 的强制更新功能,增强安全性。
  • --disable-command-execute:禁止在 Agent 上执行任何定时任务或使用在线终端,增强安全性。
  • --tls:启用 SSL/TLS 加密。当您使用 nginx 反向代理 Agent 的 gRPC 连接且 nginx 配置了 SSL/TLS 时,应启用此配置。
  • --use-ipv6-countrycode:强制使用 IPv6 地址查询国家代码。默认情况下,Agent 使用 IPv4 地址查询国家代码,如果服务器支持 IPv6 且与 IPv4 地址的国家代码不同,可以使用此参数。
  • --gpu:启用 GPU 监控。注意:GPU 使用率监控可能需要安装额外的依赖包,详细信息可以参考文档:启用 GPU 监控
  • --temperature:启用硬件温度监控。仅支持的硬件有效,部分 VPS 可能无法获取温度信息。
  • -d --debug:启用调试模式。
  • -u --ip-report-period:本地IP更新间隔, 如果这个值小于 --report-delay 设置的值,那么以 --report-delay 的值为准。默认为1800秒(30分钟)。
  • -k --insecure:禁用证书检查,适用于使用自签证书的场景。
- - - - \ No newline at end of file diff --git a/guide/q8.html b/guide/q8.html deleted file mode 100644 index 252e13fb..00000000 --- a/guide/q8.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - 使用 Cloudflare Access 作为 OAuth2 提供方 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

使用 Cloudflare Access 作为 OAuth2 提供方

相较于 Github,Cloudflare Access 对于中国大陆用户更加友好。如您当前使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,您可以考虑切换 Cloudflare Access 作为 OAuth2 提供方

示例配置:

yaml
Oauth2:
-  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
-  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
-  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
-  Endpoint: "https://xxxxx.cloudflareaccess.com"
-  Type: cloudflare

配置说明:

参数获取方式
AdminMy Team -> Users -> <具体用户> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> 只保留协议+域名的部分,路径不需要

新建 SaaS-OIDC 应用流程

前往 Zero Trust Dashboard:https://one.dash.cloudflare.com/,选择或新建一个账户(Account),然后按照以下步骤操作:

  1. My Team -> Users -> 点击<具体用户> -> 获取 User ID 并保存 (如果是第一次使用 Zero Trust,Users 列表会为空,可暂时跳过这一步;你需要完成一次验证后,用户才会出现在 Users 列表中)
  2. Access -> Applications -> Add an Application;
  3. 选择 SaaS,在 Application 字段中输入自定义的应用名称(例如 nezha),选择 OIDC 后点击 Add application;
  4. Scopes 选择 openid, email, profile, groups;
  5. Redirect URLs 中填写你的 Dashboard Callback 地址,例如 https://dashboard.example.com/oauth2/callback;
  6. 分别记录 Client IDClient SecretIssuer 地址中的协议与域名部分,例如 https://xxxxx.cloudflareaccess.com;
  7. 编辑 Dashboard 配置文件(通常位于 /opt/nezha/dashboard/data/config.yaml),参照示例配置修改 OAuth2 设置,并重启 Dashboard 服务。

身份验证策略配置

在完成 Dashboard 设置后,您还需要在 Zero Trust Dashboard 中配置身份验证策略,路径为:Access -> Applications -> <应用名> -> Policies。您可以选择多种 SSO 验证方式,包括邮件 OTP 验证、硬件密钥验证等,详细配置请参考 Cloudflare Zero Trust 文档

策略配置示例(One-time PIN)

默认使用邮件 OTP 验证方式:

  1. Access -> Applications -> <应用名> -> Policies -> Add a policy;
  2. 设置一个 Policy Name,例如 OTPAction 设置为 Allow;
  3. Configure rules 下新增一条 Include 规则,Selector 选择 Emails,在文本框中输入你的邮箱地址;
  4. 点击 Save policy 保存策略。

测试策略

  1. 在配置正确的情况下,访问 Dashboard 登录界面,会显示为 使用 Cloudflare 账号登录,点击登录会跳转到 Cloudflare Access 登录页面;
  2. 输入前面配置的 Email 地址,点击 Send me a code,输入收到的验证码,即可登录 Dashboard;
  3. 如果在之前的步骤中,未在 Admin 中未填写 User ID,登录后会提示错误信息:“该用户不是本站点管理员,无法登录”。此时需要在 My Team -> Users 中找到对应的用户,点击用户名获取 User ID 并填写到 Dashboard 配置文件里的 Admin 部分,重启 Dashboard 服务后再次尝试登录。
- - - - \ No newline at end of file diff --git a/guide/q9.html b/guide/q9.html deleted file mode 100644 index dc610f2b..00000000 --- a/guide/q9.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - 启用 GPU 监控 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

启用 GPU 监控

GPU 监控是哪吒监控 v0.17.x 引入的新功能,使用前请检查您的 Dashboard 版本是否为 v0.17.2+ / Agent 版本是否为 v0.17.0+。

启用

通过启动参数

在 Agent 运行参数后添加 --gpu 即可。例如:

bash
/opt/nezha/agent/nezha-agent -s example.com:5555 -p example --gpu

通过配置文件

执行以下命令修改 Agent 配置文件以启用 GPU 监控:

bash
/opt/nezha/agent/nezha-agent edit

在返回的互动菜单中选择启用 GPU 功能即可。

打开 GPU 占用率监控支持

GPU 型号与 GPU 使用率为两个不同的监控项目,使用了不同实现获取。

其中 Windows 和 macOS 支持无依赖获取 GPU 使用率,并支持多个品牌显卡;

Linux 平台则仅支持 NVIDIA / AMD 显卡,且需要安装额外依赖。

以下将介绍如何在 Linux 上为 NVIDIA / AMD 显卡启用 GPU 使用率监控。

NVIDIA

NVIDIA 显卡获取 GPU 使用率需要用到 nvidia-smi 工具,一般为官方驱动自带。

如果您使用的是非官方驱动,例如 nouveau,那么将无法获取 GPU 使用率。

AMD

AMD 显卡获取 GPU 使用率需要安装 amdgpu 开源驱动和 rocm-smi 工具。

主流系统均已打包 rocm-smi ,以下是部分系统的安装命令:

bash
# Arch Linux
-pacman -Sy rocm-smi-lib
-
-# Debian / Ubuntu
-apt install rocm-smi
-
-# Fedora / RHEL 8+
-dnf install rocm-smi

如果您的系统并没有相应包,那么则需要手动编译安装 rocm_smi_lib

您的系统需要安装这些依赖:git cmake gcc

首先 Clone rocm_smi_lib 的 git 仓库:

bash
git clone https://github.com/ROCm/rocm_smi_lib

然后进行编译并安装即可。

bash
cd rocm_smi_lib
-mkdir -p build
-cd build
-cmake ..
-make -j $(nproc)
-# Install library file and header; default location is /opt/rocm
-make install
- - - - \ No newline at end of file diff --git a/guide/servers.html b/guide/servers.html deleted file mode 100644 index f583c00c..00000000 --- a/guide/servers.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - 服务器 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

服务器

介绍

服务器区域负责管理 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 粘贴。
连接失败请参考实时通道断开/在线终端连接失败

FM

Dashboard v0.19.1 / Agent v0.19.0 加入的新功能,是嵌入 WebShell 的一个伪文件管理器,提供文件下载和上传功能,也可以进行目录跳转或者复制路径。点击 WebShell 右下角的蓝色按钮就可以打开。

公开备注示例

ServerStatus主题agent账单信息展示

点击展开/收起

配置位置:后台-> 服务器 -> 编辑服务器 -> 公开备注

完整配置,包含过期时间和价格展示

json
{
-   "billingDataMod": {
-       "startDate": "2024-10-01T00:00:00+08:00",
-       "endDate": "2024-11-01T00:00:00+08:00",
-       "autoRenewal": "1",
-       "cycle": "月",
-       "amount": "$3.99"
-   }
-}

单独配置过期时间

json
{
-   "billingDataMod": {
-       "startDate": "2024-10-01T00:00:00+08:00",
-       "endDate": "2024-11-01T00:00:00+08:00",
-       "autoRenewal": "1",
-       "cycle": "月"
-   }
-}

配置详细说明:

startDate 账单开始时间

格式如 2022-04-01T23:59:59+08:00

endDate 账单到期时间

格式如 2022-05-01T23:59:59+08:00
-当以0000-00-00开头时,表示账单无期限,适用于永久免费的vps,如0000-00-00T23:59:59+08:00

Date格式说明

分3部分
-1. 日期:2022-04-01
-2. 时间:T23:59:59
-3. 时区:+08:00
-例如:
-2024-10-01T23:59:59+05:00
-2024-09-21T12:00:00-05:00
-2024-03-15T23:59:59+00:00

autoRenewal 自动续期

支持值
-1:自动续期
-0:不自动续期
-当设置 "autoRenewal": 1 时,程序会根据当前时间自动判断,vps账单到期后无需手动更改startDate和endDate

amount 价格

格式如 $9.99 、€19.92 、¥199、19.99HKD、9.99USD、49.99CNY
-如果vps是免费的,请设置为"0" , 如 "amount": "0", 前台展示为 FREE
-如果vps是按量收费,请设置为"-1" , 如 "amount": "-1", 前台展示为PAYG

cycle 付费周期

支持格式(英文大小写字母都支持,大小写字母混用也支持)
-1. 月、month、monthly、m、mo
-2. 季、quarterly、q
-3. 半年、半、half、semi-annually、h
-4. 年、year、annually、y、yr
- - - - \ No newline at end of file diff --git a/guide/services.html b/guide/services.html deleted file mode 100644 index 01c7ae43..00000000 --- a/guide/services.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 服务监控 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

服务监控

服务区域是设置 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 的名称来切换图表。在图表中,可以取消勾选目标服务器的名称来隐藏或显示对应的数据。

管理监控

如需对已有的服务监控进行管理,可以前往管理面板中的“服务”页。选择一条监控配置,点击右侧的图标进行编辑或删除。

- - - - \ No newline at end of file diff --git a/guide/settings.html b/guide/settings.html deleted file mode 100644 index d9a2cd0c..00000000 --- a/guide/settings.html +++ /dev/null @@ -1,337 +0,0 @@ - - - - - - 设置 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

设置

站点标题

你可以在此项中自定义站点标题。

管理员列表

  • 如果你修改了自己的 Github、Gitlab 或 Gitee 的用户名,需要在此项中同步修改,否则无法登录。多个用户请用逗号隔开:user1,user2
  • 如需更改管理员账户,请前往 /opt/nezha/dashboard/data/config.yaml,重新设置新的管理员 Client IDClient Secret

界面主题

在这里选择主页和管理界面主题,如果选项中没有某个已存在的主题,请更新面板。

使用自定义主页主题需要创建主题描述文件,关于自定义主题更多信息请参考哪吒主题开发环境

启用管理界面 Custom 主题前,你需要提前安装自定义主题,否则启用该项后,面板将无法正常显示。

Language

哪吒监控目前支持以下语言:

  • 简体中文
  • 繁體中文
  • English
  • Español

我们欢迎您对翻译进行勘误或贡献更多语言。

自定义代码 (style, script)

可以在此修改 LOGO、修改色调、添加美化代码和统计代码等。

WARNING

自定义代码仅在游客首页生效,管理面板不生效。由于不同主题的代码不同,如确需修改管理面板中的内容,请修改 Docker 中的主题文件。

默认主题更改进度条颜色、背景图片、导航栏等效果示例

点击展开/收起
html
<style>
-/* 屏幕适配 */
-@media only screen and (min-width: 1200px) {
-    .ui.container {
-    width: 80% !important;
-}
-}
-
-@media only screen and (max-width: 767px) {
-    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
-        margin-top: 0.4em !important;
-    }
-}
-
-/* 整体图标 */
-i.icon {
-    color: #000;
-    width: 1.2em !important;
-}
-
-/* 背景图片 */
-body {
-    content: " " !important;
-    background: fixed !important;
-    z-index: -1 !important;
-    top: 0 !important;
-    right: 0 !important;
-    bottom: 0 !important;
-    left: 0 !important;
-    background-position: top !important;
-    background-repeat: no-repeat !important;
-    background-size: cover !important;
-    background-image: url(https://backgroud.img) !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
-
-/* 导航栏 */
-.ui.large.menu {
-    border: 0 !important;
-    border-radius: 0px !important;
-    background-color: rgba(255, 255, 255, 55%) !important;
-}
-
-/* 首页按钮 */
-.ui.menu .active.item {
-    background-color: transparent !important;
-}
-
-/* 导航栏下拉框 */
-.ui.dropdown .menu {
-    border: 0 !important;
-    border-radius: 0 !important;
-    background-color: rgba(255, 255, 255, 80%) !important;
-}
-
-/* 登录按钮 */
-.nezha-primary-btn {
-    background-color: transparent !important;
-    color: #000 !important;
-}
-
-/* 大卡片 */
-#app .ui.fluid.accordion {
-    background-color: #fbfbfb26 !important;
-    border-radius: 0.4rem !important;
-}
-
-/* 小卡片 */
-.ui.four.cards>.card {
-    border-radius: 0.6rem !important;
-    background-color: #fafafaa3 !important;
-}
-
-.status.cards .wide.column {
-    padding-top: 0 !important;
-    padding-bottom: 0 !important;
-    height: 3.3rem !important;
-}
-
-.status.cards .three.wide.column {
-    padding-right: 0rem !important;
-}
-
-.status.cards .wide.column:nth-child(1) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .wide.column:nth-child(2) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .description {
-    padding-bottom: 0 !important;
-}
-
-/* 服务器名 */
-.status.cards .flag {
-    margin-right: 0.5rem !important;
-}
-
-/* 弹出卡片图标 */
-.status.cards .header > .info.icon {
-    margin-right: 0 !important;
-}
-
-.nezha-secondary-font {
-    color: #2175ba !important;
-}
-
-/* 上传下载 */
-.status.cards .outline.icon {
-    margin-right: 1px !important;
-}
-
-i.arrow.alternate.circle.down.outline.icon {
-    color: #2175ba !important;
-}
-
-i.arrow.alternate.circle.up.outline.icon {
-    color: red !important;
-}
-
-/* 弹出卡片小箭头 */
-.ui.right.center.popup {
-    margin: -3px 0 0 0.914286em !important;
-    -webkit-transform-origin: left 50% !important;
-    transform-origin: left 50% !important;
-}
-
-.ui.bottom.left.popup {
-    margin-left: 1px !important;
-    margin-top: 3px !important;
-}
-
-.ui.top.left.popup {
-    margin-left: 0 !important;
-    margin-bottom: 10px !important;
-}
-
-.ui.top.right.popup {
-    margin-right: 0 !important;
-    margin-bottom: 8px !important;
-}
-
-.ui.left.center.popup {
-    margin: -3px .91428571em 0 0 !important;
-    -webkit-transform-origin: right 50% !important;
-    transform-origin: right 50% !important;
-}
-
-.ui.right.center.popup:before,
-.ui.left.center.popup:before {
-    border: 0px solid #fafafaeb !important;
-    background: #fafafaeb !important;
-}
-
-.ui.top.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.bottom.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.bottom.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.top.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.top.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.left.center.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-/* 弹出卡片 */
-.status.cards .ui.content.popup {
-    min-width: 20rem !important;
-    line-height: 2rem !important;
-    border-radius: 5px !important;
-    border: 1px solid transparent !important;
-    background-color: #fafafaeb !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
-
-.ui.content {
-    margin: 0 !important;
-    padding: 1em !important;
-}
-
-/* 服务页 */
-.ui.table {
-    background: RGB(225,225,225,0.6) !important;
-}
-
-.ui.table thead th {
-    background: transparent !important;
-}
-
-/* 服务页进度条 */
-.service-status .good {
-    background-color: #2175ba !important;
-}
-
-.service-status .danger {
-    background-color: red !important;
-}
-
-.service-status .warning {
-    background-color: orange !important;
-}
-
-/* 版权 */
-.ui.inverted.segment, .ui.primary.inverted.segment {
-    color: #000 !important;
-    font-weight: bold !important;
-    background-color: #fafafaa3 !important;
-}
-</style>
-
-<!--Logo和版权-->
-<script>
-window.onload = function(){
-var avatar=document.querySelector(".item img")
-var footer=document.querySelector("div.is-size-7")
-footer.innerHTML="Copyright info"
-footer.style.visibility="visible"
-avatar.src="https:/img.src"
-avatar.style.visibility="visible"
-}
-</script>

DayNight 主题更改进度条颜色、修改页脚示例(来自 @hyt-allen-xu @tech-fever

点击展开/收起
html
<style>
-.ui.fine.progress> .progress-bar {
-  background-color: #00a7d0 !important;
-}
-</style>
-
-<script>
-window.onload = function(){
-  var avatar = document.querySelector("img");
-  var footer = document.querySelector("div.footer-container");
-  footer.innerHTML = "©2021 你的名字 & Powered by 你的名字";
-  footer.style.visibility = "visible";
-  avatar.src = "你的图片连接";
-  avatar.style.visibility = "visible";
-}
-</script>

默认主题修改 LOGO、修改页脚示例(来自 @iLay1678

点击展开/收起
html
<style>
-.right.menu>a {
-  visibility: hidden;
-}
-.footer .is-size-7 {
-  visibility: hidden;
-}
-.item img {
-  visibility: hidden;
-}
-</style>
-<script>
-window.onload = function() {
-  var avatar = document.querySelector(".item img");
-  var footer = document.querySelector("div.is-size-7");
-  footer.innerHTML = "Powered by 你的名字";
-  footer.style.visibility = "visible";
-  avatar.src = "你的方形 logo 地址";
-  avatar.style.visibility = "visible";
-}
-</script>

hotaru 主题更改背景图片示例

点击展开/收起
html
<style>
-.hotaru-cover {
-   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
-}
-</style>

前台查看密码

如果你不想向游客直接展示你的 Dashboard,可以在这里设置一个查看密码。设置密码后,需要输入密码才可以访问主页。

未接入 CDN 的面板服务器域名/IP

此项设置是使用一键脚本安装 Agent 的前提,详情请查看这里

IP 变更提醒

如果你希望当某个服务器的 IP 发生变更时收到通知,可以在这里进行设置。

覆盖范围

在这里选择一条规则,来确定需要监控哪些服务器,可以根据自己的需求进行选择。

特定服务器

配合覆盖范围的设置,在这里设置选定规则的排除项。

提醒发送至指定的通知分组

选择通知方式,通知方式请提前在“告警”页内设置。

WARNING

设置完成后,勾选启用时,通知生效

通知中显示完整 IP 地址

IP 变更通知默认隐藏完整 IP,如果你不希望隐藏,可以勾选“通知信息中显示完整 IP 地址”。

禁止主页切换主题

Dashboard 默认启用允许访客修改显示主题的功能,此功能只会影响单一访客,不会影响管理员在后台设置的启用主题。如果你不希望访客切换主题,可以勾选此项。

- - - - \ No newline at end of file diff --git a/guide/tasks.html b/guide/tasks.html deleted file mode 100644 index eca0c4e2..00000000 --- a/guide/tasks.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 任务管理 | 哪吒服务器监控 - - - - - - - - - - - - - - - - - - -
Skip to content

任务管理

在任务区域中,可以设置计划任务,触发任务,多服务器批量执行任务

哪吒监控支持推送命令到 Agent 执行,此功能非常灵活。使用此功能可以定期结合 restic、rclone 给服务器备份,定期重启某项服务来重置网络连接。也可以配合告警通知,在触发告警时执行某项任务,例如在 CPU 长时间高占用的情况下运行某个脚本。

使用方法

进入管理面板的“任务”页,点击“添加计划任务”。添加计划任务时,你需要填入以下参数:

  • 名称:自定义一个任务名称。

  • 任务类型:选择任务的类型。

    • 计划任务:按下方设置的计划时间,周期性执行任务。
    • 触发任务:仅被 API 或告警规则触发的任务,每次触发执行一次。
  • 计划:设置计划时间(使用触发任务类型时不生效),时间格式为:* * * * * *,分别对应秒 分 时 天 月 星期,详情见计划表达式格式
    例如:0 0 3 * * * 对应为“每天 3 点”。

  • 命令:设置需要执行的命令,就像写 Shell/Bat 脚本一样,但不推荐换行,多个命令使用 &&/& 连接。
    例如执行定期重启命令,可以在这里输入 reboot

  • 覆盖范围特定服务器:选择规则来确定哪些 Agent 执行计划任务,类似于“服务”页中的设置。使用触发任务类型时,可选择“由触发的服务器执行”。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 推送成功的消息:勾选此项,任务执行成功后会触发消息通知。

管理任务

如需对已有的计划任务进行管理,可以前往管理面板中的“任务”页。选择一条任务配置,右侧的三个图标分别是:

  • 立即执行:点击后将忽略计划时间,立刻执行任务。
  • 编辑:点击可以修改任务配置。
  • 删除:删除这条计划任务。

常见问题

  1. xxx 命令找不到
    如果运行失败,提示 xxx 命令找不到,可能是 PATH 环境变量的问题。在 Linux 服务器上,可以在命令开头加入 source ~/.bashrc,或者使用绝对路径执行命令。
- - - - \ No newline at end of file diff --git a/hashmap.json b/hashmap.json deleted file mode 100644 index 869b9db1..00000000 --- a/hashmap.json +++ /dev/null @@ -1 +0,0 @@ -{"developer_index.md":"ye3PfB3-","en_us_case_case1.md":"Ba8gewZ6","en_us_guide_q2.md":"BdYRs_s9","en_us_case_case4.md":"DB-wfY8y","en_us_case_case5.md":"CSkituIs","en_us_guide_q3.md":"CdXGDmJL","en_us_guide_q9.md":"nn_5dMdf","en_us_developer_l10n.md":"XBQ_3Abu","en_us_guide_servers.md":"B3oa4ymX","en_us_guide_api.md":"B7SlCX6N","en_us_guide_q4.md":"BJkNqCql","en_us_index.md":"D1U7Cexx","en_us_guide_services.md":"42ZV920I","developer_theme.md":"yi2XIKJt","guide_q10.md":"DiIvXAYi","guide_q11.md":"DClUsael","guide_q2.md":"DtMO0dtm","en_us_guide_q10.md":"osfoQDQi","en_us_guide_q11.md":"Cx085Fxo","case_case3.md":"Dv6Xc9yU","guide_q3.md":"0iIre3Mh","guide_q4.md":"Dn-_zD5O","case_case5.md":"B16IKmIX","case_case4.md":"CSymfuHV","en_us_case_case6.md":"De9bTpTA","en_us_guide_settings.md":"CfFsBnHL","guide_q5.md":"gjm3BXS-","guide_q6.md":"Cc68Y45X","guide_tasks.md":"BzPghW25","developer_l10n.md":"XzEs6w0F","index.md":"YzXpf9jM","en_us_guide_nat.md":"Bm1a6Dwz","guide_dashboard.md":"Cto0sa35","guide_dashboardq.md":"C9lCMePt","guide_loginq.md":"CnJ6gnLD","en_us_case_index.md":"DGTbX1EV","guide_settings.md":"BQBL08BB","en_us_developer_index.md":"C7NWMcEo","en_us_guide_tasks.md":"BBiXJhsc","en_us_case_case2.md":"TWhjXotc","en_us_guide_q5.md":"dmeXbXkT","en_us_case_case3.md":"CAI94Mh5","guide_nat.md":"DpUGasQ9","guide_agent.md":"D5fn7vFK","guide_q8.md":"BsCGKX4S","guide_notifications.md":"Z1WGTu70","en_us_guide_q8.md":"BbSzgA8n","en_us_guide_dashboard.md":"D5-Qa-Bd","en_us_guide_loginq.md":"DK7A_9g2","en_us_case_case7.md":"Cop8wLoV","guide_servers.md":"BFOMkC1j","en_us_guide_q7.md":"BiLpPPiv","en_us_guide_agentq.md":"syI2hhx-","guide_agentq.md":"D--T1yuE","case_case2.md":"DqTRdA-m","case_case1.md":"Ce-PdIPb","guide_q1.md":"Cwu7c2wW","en_us_guide_notifications.md":"CazaFiKA","guide_q9.md":"EqT3EdyS","case_case6.md":"8CRS1o6R","en_us_guide_q6.md":"B38wvOHW","case_case7.md":"CeE0DjzU","case_index.md":"DDEdRxEt","guide_services.md":"C_O0Sby9","en_us_guide_ddns.md":"B3Hwjtpc","guide_api.md":"nRk5Ly_w","guide_q7.md":"BrDNRaw0","guide_ddns.md":"XXcpPxx0","en_us_guide_dashboardq.md":"DKl5bwtM","en_us_guide_agent.md":"BOJ8LATb","en_us_developer_theme.md":"Cm-AKaYr"} diff --git a/index.html b/index.html index cd8713cb..07d28cce 100644 --- a/index.html +++ b/index.html @@ -1,29 +1,11 @@ - - - - - 哪吒监控 - 服务器监控与运维工具 | 使用文档 - - - - - - - - - - - - - - - - - - -
Skip to content

哪吒监控

开源、轻量、易用的服务器监控与运维工具

- - - + + + + + maintainance + + + v1 is coming soon + \ No newline at end of file diff --git a/logo.png b/logo.png deleted file mode 100644 index af54371e..00000000 Binary files a/logo.png and /dev/null differ