deploy: 9cc65fee98
No files matched your search
@@ -1,26 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" dir="ltr">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>404 | 哪吒服务器监控</title>
|
||||
<meta name="description" content="Not Found">
|
||||
<meta name="generator" content="VitePress v1.2.3">
|
||||
<link rel="preload stylesheet" href="/assets/style.CuK3IKp4.css" as="style">
|
||||
|
||||
<script type="module" src="/assets/app.Bt7GXCP9.js"></script>
|
||||
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<script src="https://cdn.wwads.cn/js/makemoney.js" async></script>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FDME8GJGTW"></script>
|
||||
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date),gtag("config","G-FDME8GJGTW");</script>
|
||||
<script async crossorigin="anonymous" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3632738952115558"></script>
|
||||
<link rel="icon" type="image/png" sizes="193x193" href="/logo.png">
|
||||
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
||||
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"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\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"VitePress\",\"description\":\"A VitePress site\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":{\"src\":\"/logo.png\",\"width\":24,\"height\":24,\"alt\":\"NezhaLogo\"},\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/nezhahq/nezhahq.github.io\"},{\"icon\":{\"svg\":\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 496 512\\\"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d=\\\"M248 8C111 8 0 119 0 256S111 504 248 504 496 393 496 256 385 8 248 8zM363 176.7c-3.7 39.2-19.9 134.4-28.1 178.3-3.5 18.6-10.3 24.8-16.9 25.4-14.4 1.3-25.3-9.5-39.3-18.7-21.8-14.3-34.2-23.2-55.3-37.2-24.5-16.1-8.6-25 5.3-39.5 3.7-3.8 67.1-61.5 68.3-66.7 .2-.7 .3-3.1-1.2-4.4s-3.6-.8-5.1-.5q-3.3 .7-104.6 69.1-14.8 10.2-26.9 9.9c-8.9-.2-25.9-5-38.6-9.1-15.5-5-27.9-7.7-26.8-16.3q.8-6.7 18.5-13.7 108.4-47.2 144.6-62.3c68.9-28.6 83.2-33.6 92.5-33.8 2.1 0 6.6 .5 9.6 2.9a10.5 10.5 0 0 1 3.5 6.7A43.8 43.8 0 0 1 363 176.7z\\\"/></svg>\"},\"link\":\"https://t.me/nezhanews\"}],\"search\":{\"provider\":\"algolia\",\"options\":{\"appId\":\"HP6QF6KMZD\",\"apiKey\":\"fb8bae9ed373d1057e0c07fcf32b3f1a\",\"indexName\":\"nezhahq\",\"locales\":{\"root\":{\"placeholder\":\"搜索文档\",\"translations\":{\"button\":{\"buttonText\":\"搜索文档\",\"buttonAriaLabel\":\"搜索文档\"},\"modal\":{\"searchBox\":{\"resetButtonTitle\":\"清除查询条件\",\"resetButtonAriaLabel\":\"清除查询条件\",\"cancelButtonText\":\"取消\",\"cancelButtonAriaLabel\":\"取消\"},\"startScreen\":{\"recentSearchesTitle\":\"搜索历史\",\"noRecentSearchesText\":\"没有搜索历史\",\"saveRecentSearchButtonTitle\":\"保存至搜索历史\",\"removeRecentSearchButtonTitle\":\"从搜索历史中移除\",\"favoriteSearchesTitle\":\"收藏\",\"removeFavoriteSearchButtonTitle\":\"从收藏中移除\"},\"errorScreen\":{\"titleText\":\"无法获取结果\",\"helpText\":\"你可能需要检查你的网络连接\"},\"footer\":{\"selectText\":\"选择\",\"navigateText\":\"切换\",\"closeText\":\"关闭\",\"searchByText\":\"搜索提供者\"},\"noResultsScreen\":{\"noResultsText\":\"无法找到相关结果\",\"suggestedQueryText\":\"你可以尝试查询\",\"reportMissingResultsText\":\"你认为该查询应该有结果?\",\Line truncated
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,3 +0,0 @@
|
||||
/assets/*
|
||||
cache-control: max-age=31536000
|
||||
cache-control: immutable
|
||||
|
Before Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 338 KiB |
|
Before Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 329 KiB |
@@ -1,29 +0,0 @@
|
||||
<svg id="CNSC" xmlns="http://www.w3.org/2000/svg" width="108.85157" height="40" viewBox="0 0 108.85157 40">
|
||||
<title>Download_on_the_App_Store_Badge_CNSC_RGB_blk_092917</title>
|
||||
<g>
|
||||
<g>
|
||||
<path d="M99.32227,0H9.53468c-.3667,0-.729,0-1.09473.002-.30615.002-.60986.00781-.91895.0127A13.21476,13.21476,0,0,0,5.5171.19141a6.66509,6.66509,0,0,0-1.90088.627A6.43779,6.43779,0,0,0,1.99757,1.99707,6.25844,6.25844,0,0,0,.81935,3.61816a6.60119,6.60119,0,0,0-.625,1.90332,12.993,12.993,0,0,0-.1792,2.002C.00587,7.83008.00489,8.1377,0,8.44434V31.5586c.00489.3105.00587.6113.01515.9219a12.99232,12.99232,0,0,0,.1792,2.0019,6.58756,6.58756,0,0,0,.625,1.9043A6.20778,6.20778,0,0,0,1.99757,38.001a6.27445,6.27445,0,0,0,1.61865,1.1787,6.70082,6.70082,0,0,0,1.90088.6308,13.45514,13.45514,0,0,0,2.0039.1768c.30909.0068.6128.0107.91895.0107C8.80567,40,9.168,40,9.53468,40H99.32227c.3594,0,.7246,0,1.084-.002.3047,0,.6172-.0039.9219-.0107a13.279,13.279,0,0,0,2-.1768,6.80432,6.80432,0,0,0,1.9082-.6308,6.27742,6.27742,0,0,0,1.6172-1.1787,6.39482,6.39482,0,0,0,1.1816-1.6143,6.60413,6.60413,0,0,0,.6191-1.9043,13.50643,13.50643,0,0,0,.1856-2.0019c.0039-.3106.0039-.6114.0039-.9219.0078-.3633.0078-.7246.0078-1.0938V9.53613c0-.36621,0-.72949-.0078-1.09179,0-.30664,0-.61426-.0039-.9209a13.5071,13.5071,0,0,0-.1856-2.002,6.6177,6.6177,0,0,0-.6191-1.90332,6.46619,6.46619,0,0,0-2.7988-2.7998,6.76754,6.76754,0,0,0-1.9082-.627,13.04394,13.04394,0,0,0-2-.17676c-.3047-.00488-.6172-.01074-.9219-.01269C100.04687,0,99.68167,0,99.32227,0Z" style="fill: #a6a6a6"/>
|
||||
<path d="M8.44483,39.125c-.30468,0-.602-.0039-.90429-.0107a12.68714,12.68714,0,0,1-1.86914-.1631,5.88381,5.88381,0,0,1-1.65674-.5479,5.40573,5.40573,0,0,1-1.397-1.0166,5.32082,5.32082,0,0,1-1.02051-1.3965,5.72186,5.72186,0,0,1-.543-1.6572,12.41351,12.41351,0,0,1-.1665-1.875c-.00634-.2109-.01464-.9131-.01464-.9131V8.44434S.88185,7.75293.8877,7.5498a12.37039,12.37039,0,0,1,.16553-1.87207,5.7555,5.7555,0,0,1,.54346-1.6621A5.37349,5.37349,0,0,1,2.61183,2.61768,5.56543,5.56543,0,0,1,4.01417,1.59521a5.82309,5.82309,0,0,1,1.65332-.54394A12.58589,12.58589,0,0,1,7.543.88721L8.44532.875h91.956l.9131.0127a12.38493,12.38493,0,0,1,1.8584.16259,5.93833,5.93833,0,0,1,1.6709.54785,5.59374,5.59374,0,0,1,2.415,2.41993A5.76267,5.76267,0,0,1,107.794,5.667a12.995,12.995,0,0,1,.1738,1.88721c.0029.2832.0029.5874.0029.89014.0079.375.0079.73193.0079,1.09179V30.4648c0,.3633,0,.7178-.0079,1.0752,0,.3252,0,.6231-.0039.9297a12.73126,12.73126,0,0,1-.1709,1.8535,5.739,5.739,0,0,1-.54,1.67,5.48029,5.48029,0,0,1-1.0156,1.3857,5.4129,5.4129,0,0,1-1.3994,1.0225,5.86168,5.86168,0,0,1-1.668.5498,12.54218,12.54218,0,0,1-1.8692.1631c-.2929.0068-.5996.0107-.8974.0107l-1.084.002Z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path d="M41.16742,16.55462H37.11585l-.973,2.873H34.42678L38.26437,8.79837h1.783l3.83759,10.62922H42.13957Zm-3.632-1.32573H40.747l-1.58318-4.66261h-.0443Z" style="fill: #fff"/>
|
||||
<path d="M52.1728,15.55322c0,2.40821-1.28895,3.95545-3.23407,3.95545a2.62719,2.62719,0,0,1-2.4383-1.35582h-.03678v3.83842H44.87294V11.678h1.53972V12.967h.02926a2.749,2.749,0,0,1,2.46756-1.37C50.87633,11.59694,52.1728,13.1517,52.1728,15.55322Zm-1.635,0c0-1.569-.81082-2.60046-2.04794-2.60046-1.21539,0-2.03289,1.05323-2.03289,2.60046,0,1.56145.8175,2.60715,2.03289,2.60715C49.727,18.16037,50.53779,17.1364,50.53779,15.55322Z" style="fill: #fff"/>
|
||||
<path d="M60.70267,15.55322c0,2.40821-1.28937,3.95545-3.23449,3.95545a2.62719,2.62719,0,0,1-2.4383-1.35582H54.9931v3.83842H53.4024V11.678h1.53972V12.967h.02926a2.749,2.749,0,0,1,2.46756-1.37C59.40578,11.59694,60.70267,13.1517,60.70267,15.55322Zm-1.63543,0c0-1.569-.81082-2.60046-2.04794-2.60046-1.21539,0-2.03289,1.05323-2.03289,2.60046,0,1.56145.8175,2.60715,2.03289,2.60715C58.25643,18.16037,59.06725,17.1364,59.06725,15.55322Z" style="fill: #fff"/>
|
||||
<path d="M66.3391,16.466c.11786,1.05406,1.14183,1.74618,2.54112,1.74618,1.34077,0,2.30539-.69212,2.30539-1.64253,0-.825-.58178-1.319-1.95933-1.65758l-1.37755-.33185c-1.95181-.47144-2.85792-1.38424-2.85792-2.86544,0-1.834,1.59823-3.09364,3.86684-3.09364,2.24688,0,3.7866,1.25969,3.83842,3.09364H71.09032c-.09613-1.06075-.973-1.701-2.2544-1.701s-2.15828.64782-2.15828,1.59071c0,.75147.56,1.19366,1.93008,1.53219l1.17109.28755c2.18085.51575,3.08612,1.39176,3.08612,2.94652,0,1.98859-1.58318,3.23407-4.10257,3.23407-2.35722,0-3.94876-1.21623-4.05158-3.13878Z" style="fill: #fff"/>
|
||||
<path d="M76.29961,9.84407v1.834h1.47368v1.25969H76.29961V17.21c0,.6637.29507.973.94289.973a4.971,4.971,0,0,0,.52327-.03678v1.25217a4.36838,4.36838,0,0,1-.88354.07356c-1.569,0-2.18085-.5893-2.18085-2.09224V12.93771H73.5746V11.678h1.12678v-1.834Z" style="fill: #fff"/>
|
||||
<path d="M78.6259,15.55322c0-2.4383,1.43607-3.97049,3.67542-3.97049,2.24688,0,3.67626,1.53219,3.67626,3.97049,0,2.445-1.42185,3.97049-3.67626,3.97049C80.04776,19.52372,78.6259,17.99821,78.6259,15.55322Zm5.73089,0c0-1.67262-.76651-2.65981-2.05546-2.65981s-2.05546.99471-2.05546,2.65981c0,1.67931.76651,2.659,2.05546,2.659S84.35679,17.23253,84.35679,15.55322Z" style="fill: #fff"/>
|
||||
<path d="M87.2891,11.678h1.51715v1.319H88.843a1.84835,1.84835,0,0,1,1.864-1.40012,2.4533,2.4533,0,0,1,.545.05935v1.48789a2.22372,2.22372,0,0,0-.71469-.09613,1.6029,1.6029,0,0,0-1.65758,1.783v4.59658H87.2891Z" style="fill: #fff"/>
|
||||
<path d="M98.5862,17.15145a3.11011,3.11011,0,0,1-3.33689,2.37227c-2.2544,0-3.65369-1.51046-3.65369-3.93372,0-2.43078,1.40681-4.00727,3.58682-4.00727,2.14407,0,3.49236,1.47284,3.49236,3.82254v.545H93.20138v.09613a2.01837,2.01837,0,0,0,2.08472,2.19506,1.75329,1.75329,0,0,0,1.78965-1.09Zm-5.3773-2.31292h3.87437a1.86367,1.86367,0,0,0-1.90082-1.96686A1.96188,1.96188,0,0,0,93.2089,14.83853Z" style="fill: #fff"/>
|
||||
</g>
|
||||
<g>
|
||||
<path d="M34.42873,24.04h7.46143v.78027H38.34328v1.10352q.76245.353,1.53467.77832.772.4248,1.562.91211l-.45947.7168q-.813-.51855-1.46094-.91406-.64819-.39551-1.17627-.65723v4.6084h-.79053V24.82031h-3.124Z" style="fill: #fff"/>
|
||||
<path d="M43.95607,24.27441h1.562v-.62988h.772v.62988h1.44727v.7168H46.29006v.61035h1.82422q-.01831-.44971-.03662-.93945-.019-.48926-.01855-1.02637h.76709q0,.54639.01611,1.03125t.03467.93457h2.03076v.72656H48.91359q.03662.50537.09424.92285c.03809.2793.07275.52832.10352.749a1.65659,1.65659,0,0,1,.05518.22363c.01221.07129.02441.14453.03662.21777A8.07449,8.07449,0,0,0,49.543,27.582q.15161-.4541.27588-.97363l.70313.32129a9.7383,9.7383,0,0,1-1.00635,2.57813c.02441.06055.05127.123.08057.18555q.04321.09375.08936.18164.28931.57422.45947.57422.115,0,.2666-1.208l.67529.3584q-.28931,1.67725-.85449,1.67676-.42773,0-.96973-.75391a2.1332,2.1332,0,0,1-.188-.3584,5.12,5.12,0,0,1-1.40186,1.2041l-.436-.62891a4.19187,4.19187,0,0,0,1.48828-1.40234q-.08276-.271-.16748-.55762-.085-.28711-.145-.59961a12.605,12.605,0,0,1-.26172-1.85156H43.51955v-.72656h1.99854v-.61035h-1.562Zm3.78125,5.28809V30.252q-.30322.03662-.61328.06836c-.20654.02148-.416.04492-.627.06934v.95117h-.772v-.85449q-.43652.03662-.88721.06836c-.2998.02148-.605.0498-.91406.083l-.10107-.74414q.50977-.019.97852-.05273.46875-.03516.92383-.0625V29.1582H44.19045l-.16113-.62988a5.21327,5.21327,0,0,0,.55615-.88672h-.80859v-.70312h1.11621a1.73325,1.73325,0,0,0,.09668-.26855q.03662-.13477.0918-.28711l.75342.13379c-.03027.085-.05469.16113-.07324.22754a.99246.99246,0,0,1-.07812.19434h2.09033v.70313H45.40334q-.12378.249-.25049.46t-.23682.40918h.80908V27.9541h.772v.55664h1.19434v.64746H46.49709v.53711c.21094-.01758.42041-.03906.627-.06152Q47.43386,29.59863,47.73732,29.5625Zm1.34619-5.459.5835-.39453a12.55594,12.55594,0,0,1,.979,1.23633l-.59277.42188q-.17944-.28418-.42041-.60352Q49.39113,24.44434,49.08352,24.10352Z" style="fill: #fff"/>
|
||||
</g>
|
||||
<g id="_Group_" data-name="<Group>">
|
||||
<g id="_Group_2" data-name="<Group>">
|
||||
<path id="_Path_" data-name="<Path>" d="M24.76888,20.30068a4.94881,4.94881,0,0,1,2.35656-4.15206,5.06566,5.06566,0,0,0-3.99116-2.15768c-1.67924-.17626-3.30719,1.00483-4.1629,1.00483-.87227,0-2.18977-.98733-3.6085-.95814a5.31529,5.31529,0,0,0-4.47292,2.72787c-1.934,3.34842-.49141,8.26947,1.3612,10.97608.9269,1.32535,2.01018,2.8058,3.42763,2.7533,1.38706-.05753,1.9051-.88448,3.5794-.88448,1.65876,0,2.14479.88448,3.591.8511,1.48838-.02416,2.42613-1.33124,3.32051-2.66914a10.962,10.962,0,0,0,1.51842-3.09251A4.78205,4.78205,0,0,1,24.76888,20.30068Z" style="fill: #fff"/>
|
||||
<path id="_Path_2" data-name="<Path>" d="M22.03725,12.21089a4.87248,4.87248,0,0,0,1.11452-3.49062,4.95746,4.95746,0,0,0-3.20758,1.65961,4.63634,4.63634,0,0,0-1.14371,3.36139A4.09905,4.09905,0,0,0,22.03725,12.21089Z" style="fill: #fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 8.4 KiB |
@@ -1,46 +0,0 @@
|
||||
<svg id="livetype" xmlns="http://www.w3.org/2000/svg" width="119.66407" height="40" viewBox="0 0 119.66407 40">
|
||||
<title>Download_on_the_App_Store_Badge_US-UK_RGB_blk_4SVG_092917</title>
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<path d="M110.13477,0H9.53468c-.3667,0-.729,0-1.09473.002-.30615.002-.60986.00781-.91895.0127A13.21476,13.21476,0,0,0,5.5171.19141a6.66509,6.66509,0,0,0-1.90088.627A6.43779,6.43779,0,0,0,1.99757,1.99707,6.25844,6.25844,0,0,0,.81935,3.61816a6.60119,6.60119,0,0,0-.625,1.90332,12.993,12.993,0,0,0-.1792,2.002C.00587,7.83008.00489,8.1377,0,8.44434V31.5586c.00489.3105.00587.6113.01515.9219a12.99232,12.99232,0,0,0,.1792,2.0019,6.58756,6.58756,0,0,0,.625,1.9043A6.20778,6.20778,0,0,0,1.99757,38.001a6.27445,6.27445,0,0,0,1.61865,1.1787,6.70082,6.70082,0,0,0,1.90088.6308,13.45514,13.45514,0,0,0,2.0039.1768c.30909.0068.6128.0107.91895.0107C8.80567,40,9.168,40,9.53468,40H110.13477c.3594,0,.7246,0,1.084-.002.3047,0,.6172-.0039.9219-.0107a13.279,13.279,0,0,0,2-.1768,6.80432,6.80432,0,0,0,1.9082-.6308,6.27742,6.27742,0,0,0,1.6172-1.1787,6.39482,6.39482,0,0,0,1.1816-1.6143,6.60413,6.60413,0,0,0,.6191-1.9043,13.50643,13.50643,0,0,0,.1856-2.0019c.0039-.3106.0039-.6114.0039-.9219.0078-.3633.0078-.7246.0078-1.0938V9.53613c0-.36621,0-.72949-.0078-1.09179,0-.30664,0-.61426-.0039-.9209a13.5071,13.5071,0,0,0-.1856-2.002,6.6177,6.6177,0,0,0-.6191-1.90332,6.46619,6.46619,0,0,0-2.7988-2.7998,6.76754,6.76754,0,0,0-1.9082-.627,13.04394,13.04394,0,0,0-2-.17676c-.3047-.00488-.6172-.01074-.9219-.01269-.3594-.002-.7246-.002-1.084-.002Z" style="fill: #a6a6a6"/>
|
||||
<path d="M8.44483,39.125c-.30468,0-.602-.0039-.90429-.0107a12.68714,12.68714,0,0,1-1.86914-.1631,5.88381,5.88381,0,0,1-1.65674-.5479,5.40573,5.40573,0,0,1-1.397-1.0166,5.32082,5.32082,0,0,1-1.02051-1.3965,5.72186,5.72186,0,0,1-.543-1.6572,12.41351,12.41351,0,0,1-.1665-1.875c-.00634-.2109-.01464-.9131-.01464-.9131V8.44434S.88185,7.75293.8877,7.5498a12.37039,12.37039,0,0,1,.16553-1.87207,5.7555,5.7555,0,0,1,.54346-1.6621A5.37349,5.37349,0,0,1,2.61183,2.61768,5.56543,5.56543,0,0,1,4.01417,1.59521a5.82309,5.82309,0,0,1,1.65332-.54394A12.58589,12.58589,0,0,1,7.543.88721L8.44532.875H111.21387l.9131.0127a12.38493,12.38493,0,0,1,1.8584.16259,5.93833,5.93833,0,0,1,1.6709.54785,5.59374,5.59374,0,0,1,2.415,2.41993,5.76267,5.76267,0,0,1,.5352,1.64892,12.995,12.995,0,0,1,.1738,1.88721c.0029.2832.0029.5874.0029.89014.0079.375.0079.73193.0079,1.09179V30.4648c0,.3633,0,.7178-.0079,1.0752,0,.3252,0,.6231-.0039.9297a12.73126,12.73126,0,0,1-.1709,1.8535,5.739,5.739,0,0,1-.54,1.67,5.48029,5.48029,0,0,1-1.0156,1.3857,5.4129,5.4129,0,0,1-1.3994,1.0225,5.86168,5.86168,0,0,1-1.668.5498,12.54218,12.54218,0,0,1-1.8692.1631c-.2929.0068-.5996.0107-.8974.0107l-1.084.002Z"/>
|
||||
</g>
|
||||
<g id="_Group_" data-name="<Group>">
|
||||
<g id="_Group_2" data-name="<Group>">
|
||||
<g id="_Group_3" data-name="<Group>">
|
||||
<path id="_Path_" data-name="<Path>" d="M24.76888,20.30068a4.94881,4.94881,0,0,1,2.35656-4.15206,5.06566,5.06566,0,0,0-3.99116-2.15768c-1.67924-.17626-3.30719,1.00483-4.1629,1.00483-.87227,0-2.18977-.98733-3.6085-.95814a5.31529,5.31529,0,0,0-4.47292,2.72787c-1.934,3.34842-.49141,8.26947,1.3612,10.97608.9269,1.32535,2.01018,2.8058,3.42763,2.7533,1.38706-.05753,1.9051-.88448,3.5794-.88448,1.65876,0,2.14479.88448,3.591.8511,1.48838-.02416,2.42613-1.33124,3.32051-2.66914a10.962,10.962,0,0,0,1.51842-3.09251A4.78205,4.78205,0,0,1,24.76888,20.30068Z" style="fill: #fff"/>
|
||||
<path id="_Path_2" data-name="<Path>" d="M22.03725,12.21089a4.87248,4.87248,0,0,0,1.11452-3.49062,4.95746,4.95746,0,0,0-3.20758,1.65961,4.63634,4.63634,0,0,0-1.14371,3.36139A4.09905,4.09905,0,0,0,22.03725,12.21089Z" style="fill: #fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<path d="M42.30227,27.13965h-4.7334l-1.13672,3.35645H34.42727l4.4834-12.418h2.083l4.4834,12.418H43.438ZM38.0591,25.59082h3.752l-1.84961-5.44727h-.05176Z" style="fill: #fff"/>
|
||||
<path d="M55.15969,25.96973c0,2.81348-1.50586,4.62109-3.77832,4.62109a3.0693,3.0693,0,0,1-2.84863-1.584h-.043v4.48438h-1.8584V21.44238H48.4302v1.50586h.03418a3.21162,3.21162,0,0,1,2.88281-1.60059C53.645,21.34766,55.15969,23.16406,55.15969,25.96973Zm-1.91016,0c0-1.833-.94727-3.03809-2.39258-3.03809-1.41992,0-2.375,1.23047-2.375,3.03809,0,1.82422.95508,3.0459,2.375,3.0459C52.30227,29.01563,53.24953,27.81934,53.24953,25.96973Z" style="fill: #fff"/>
|
||||
<path d="M65.12453,25.96973c0,2.81348-1.50586,4.62109-3.77832,4.62109a3.0693,3.0693,0,0,1-2.84863-1.584h-.043v4.48438h-1.8584V21.44238H58.395v1.50586h.03418A3.21162,3.21162,0,0,1,61.312,21.34766C63.60988,21.34766,65.12453,23.16406,65.12453,25.96973Zm-1.91016,0c0-1.833-.94727-3.03809-2.39258-3.03809-1.41992,0-2.375,1.23047-2.375,3.03809,0,1.82422.95508,3.0459,2.375,3.0459C62.26711,29.01563,63.21438,27.81934,63.21438,25.96973Z" style="fill: #fff"/>
|
||||
<path d="M71.71047,27.03613c.1377,1.23145,1.334,2.04,2.96875,2.04,1.56641,0,2.69336-.80859,2.69336-1.91895,0-.96387-.67969-1.541-2.28906-1.93652l-1.60937-.3877c-2.28027-.55078-3.33887-1.61719-3.33887-3.34766,0-2.14258,1.86719-3.61426,4.51855-3.61426,2.624,0,4.42285,1.47168,4.4834,3.61426h-1.876c-.1123-1.23926-1.13672-1.9873-2.63379-1.9873s-2.52148.75684-2.52148,1.8584c0,.87793.6543,1.39453,2.25488,1.79l1.36816.33594c2.54785.60254,3.60645,1.626,3.60645,3.44238,0,2.32324-1.85059,3.77832-4.79395,3.77832-2.75391,0-4.61328-1.4209-4.7334-3.667Z" style="fill: #fff"/>
|
||||
<path d="M83.34621,19.2998v2.14258h1.72168v1.47168H83.34621v4.99121c0,.77539.34473,1.13672,1.10156,1.13672a5.80752,5.80752,0,0,0,.61133-.043v1.46289a5.10351,5.10351,0,0,1-1.03223.08594c-1.833,0-2.54785-.68848-2.54785-2.44434V22.91406H80.16262V21.44238H81.479V19.2998Z" style="fill: #fff"/>
|
||||
<path d="M86.065,25.96973c0-2.84863,1.67773-4.63867,4.29395-4.63867,2.625,0,4.29492,1.79,4.29492,4.63867,0,2.85645-1.66113,4.63867-4.29492,4.63867C87.72609,30.6084,86.065,28.82617,86.065,25.96973Zm6.69531,0c0-1.9541-.89551-3.10742-2.40137-3.10742s-2.40039,1.16211-2.40039,3.10742c0,1.96191.89453,3.10645,2.40039,3.10645S92.76027,27.93164,92.76027,25.96973Z" style="fill: #fff"/>
|
||||
<path d="M96.18606,21.44238h1.77246v1.541h.043a2.1594,2.1594,0,0,1,2.17773-1.63574,2.86616,2.86616,0,0,1,.63672.06934v1.73828a2.59794,2.59794,0,0,0-.835-.1123,1.87264,1.87264,0,0,0-1.93652,2.083v5.37012h-1.8584Z" style="fill: #fff"/>
|
||||
<path d="M109.3843,27.83691c-.25,1.64355-1.85059,2.77148-3.89844,2.77148-2.63379,0-4.26855-1.76465-4.26855-4.5957,0-2.83984,1.64355-4.68164,4.19043-4.68164,2.50488,0,4.08008,1.7207,4.08008,4.46582v.63672h-6.39453v.1123a2.358,2.358,0,0,0,2.43555,2.56445,2.04834,2.04834,0,0,0,2.09082-1.27344Zm-6.28223-2.70215h4.52637a2.1773,2.1773,0,0,0-2.2207-2.29785A2.292,2.292,0,0,0,103.10207,25.13477Z" style="fill: #fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="_Group_4" data-name="<Group>">
|
||||
<g>
|
||||
<path d="M37.82619,8.731a2.63964,2.63964,0,0,1,2.80762,2.96484c0,1.90625-1.03027,3.002-2.80762,3.002H35.67092V8.731Zm-1.22852,5.123h1.125a1.87588,1.87588,0,0,0,1.96777-2.146,1.881,1.881,0,0,0-1.96777-2.13379h-1.125Z" style="fill: #fff"/>
|
||||
<path d="M41.68068,12.44434a2.13323,2.13323,0,1,1,4.24707,0,2.13358,2.13358,0,1,1-4.24707,0Zm3.333,0c0-.97607-.43848-1.54687-1.208-1.54687-.77246,0-1.207.5708-1.207,1.54688,0,.98389.43457,1.55029,1.207,1.55029C44.57522,13.99463,45.01369,13.42432,45.01369,12.44434Z" style="fill: #fff"/>
|
||||
<path d="M51.57326,14.69775h-.92187l-.93066-3.31641h-.07031l-.92676,3.31641h-.91309l-1.24121-4.50293h.90137l.80664,3.436h.06641l.92578-3.436h.85254l.92578,3.436h.07031l.80273-3.436h.88867Z" style="fill: #fff"/>
|
||||
<path d="M53.85354,10.19482H54.709v.71533h.06641a1.348,1.348,0,0,1,1.34375-.80225,1.46456,1.46456,0,0,1,1.55859,1.6748v2.915h-.88867V12.00586c0-.72363-.31445-1.0835-.97168-1.0835a1.03294,1.03294,0,0,0-1.0752,1.14111v2.63428h-.88867Z" style="fill: #fff"/>
|
||||
<path d="M59.09377,8.437h.88867v6.26074h-.88867Z" style="fill: #fff"/>
|
||||
<path d="M61.21779,12.44434a2.13346,2.13346,0,1,1,4.24756,0,2.1338,2.1338,0,1,1-4.24756,0Zm3.333,0c0-.97607-.43848-1.54687-1.208-1.54687-.77246,0-1.207.5708-1.207,1.54688,0,.98389.43457,1.55029,1.207,1.55029C64.11232,13.99463,64.5508,13.42432,64.5508,12.44434Z" style="fill: #fff"/>
|
||||
<path d="M66.4009,13.42432c0-.81055.60352-1.27783,1.6748-1.34424l1.21973-.07031v-.38867c0-.47559-.31445-.74414-.92187-.74414-.49609,0-.83984.18213-.93848.50049h-.86035c.09082-.77344.81836-1.26953,1.83984-1.26953,1.12891,0,1.76563.562,1.76563,1.51318v3.07666h-.85547v-.63281h-.07031a1.515,1.515,0,0,1-1.35254.707A1.36026,1.36026,0,0,1,66.4009,13.42432Zm2.89453-.38477v-.37646l-1.09961.07031c-.62012.0415-.90137.25244-.90137.64941,0,.40527.35156.64111.835.64111A1.0615,1.0615,0,0,0,69.29543,13.03955Z" style="fill: #fff"/>
|
||||
<path d="M71.34816,12.44434c0-1.42285.73145-2.32422,1.86914-2.32422a1.484,1.484,0,0,1,1.38086.79h.06641V8.437h.88867v6.26074h-.85156v-.71143h-.07031a1.56284,1.56284,0,0,1-1.41406.78564C72.0718,14.772,71.34816,13.87061,71.34816,12.44434Zm.918,0c0,.95508.4502,1.52979,1.20313,1.52979.749,0,1.21191-.583,1.21191-1.52588,0-.93848-.46777-1.52979-1.21191-1.52979C72.72121,10.91846,72.26613,11.49707,72.26613,12.44434Z" style="fill: #fff"/>
|
||||
<path d="M79.23,12.44434a2.13323,2.13323,0,1,1,4.24707,0,2.13358,2.13358,0,1,1-4.24707,0Zm3.333,0c0-.97607-.43848-1.54687-1.208-1.54687-.77246,0-1.207.5708-1.207,1.54688,0,.98389.43457,1.55029,1.207,1.55029C82.12453,13.99463,82.563,13.42432,82.563,12.44434Z" style="fill: #fff"/>
|
||||
<path d="M84.66945,10.19482h.85547v.71533h.06641a1.348,1.348,0,0,1,1.34375-.80225,1.46456,1.46456,0,0,1,1.55859,1.6748v2.915H87.605V12.00586c0-.72363-.31445-1.0835-.97168-1.0835a1.03294,1.03294,0,0,0-1.0752,1.14111v2.63428h-.88867Z" style="fill: #fff"/>
|
||||
<path d="M93.51516,9.07373v1.1416h.97559v.74854h-.97559V13.2793c0,.47168.19434.67822.63672.67822a2.96657,2.96657,0,0,0,.33887-.02051v.74023a2.9155,2.9155,0,0,1-.4834.04541c-.98828,0-1.38184-.34766-1.38184-1.21582v-2.543h-.71484v-.74854h.71484V9.07373Z" style="fill: #fff"/>
|
||||
<path d="M95.70461,8.437h.88086v2.48145h.07031a1.3856,1.3856,0,0,1,1.373-.80664,1.48339,1.48339,0,0,1,1.55078,1.67871v2.90723H98.69v-2.688c0-.71924-.335-1.0835-.96289-1.0835a1.05194,1.05194,0,0,0-1.13379,1.1416v2.62988h-.88867Z" style="fill: #fff"/>
|
||||
<path d="M104.76125,13.48193a1.828,1.828,0,0,1-1.95117,1.30273A2.04531,2.04531,0,0,1,100.73,12.46045a2.07685,2.07685,0,0,1,2.07617-2.35254c1.25293,0,2.00879.856,2.00879,2.27V12.688h-3.17969v.0498a1.1902,1.1902,0,0,0,1.19922,1.29,1.07934,1.07934,0,0,0,1.07129-.5459Zm-3.126-1.45117h2.27441a1.08647,1.08647,0,0,0-1.1084-1.1665A1.15162,1.15162,0,0,0,101.63527,12.03076Z" style="fill: #fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 11 KiB |
@@ -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};
|
||||
@@ -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('<h1 id="自建一个tg机器人来查询服务器信息" tabindex="-1">自建一个TG机器人来查询服务器信息 <a class="header-anchor" href="#自建一个tg机器人来查询服务器信息" aria-label="Permalink to "自建一个TG机器人来查询服务器信息""></a></h1><p>贡献者:</p><ul><li><a href="https://github.com/spiritLHLS" target="_blank" rel="noreferrer">spiritLHLS</a></li><li><a href="https://github.com/Erope/" target="_blank" rel="noreferrer">Erope</a></li></ul><p>项目地址:<a href="https://github.com/spiritLHLS/nezha_api_tgbot" target="_blank" rel="noreferrer">nezha_api_tgbot</a></p><p>机器人可以通过API向面板请求服务器状态信息,得到信息后发送给用户<br> 你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板</p>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="在ios-macos中使用siri运行快捷指令查询服务器状态" tabindex="-1">在iOS/MacOS中使用Siri运行快捷指令查询服务器状态 <a class="header-anchor" href="#在ios-macos中使用siri运行快捷指令查询服务器状态" aria-label="Permalink to "在iOS/MacOS中使用Siri运行快捷指令查询服务器状态""></a></h1><p>当前版本:V1.0<br> 贡献者:</p><ul><li>白歌 <a href="https://github.com/hhhkkk520" target="_blank" rel="noreferrer">hhhkkk520</a></li></ul><h2 id="获取快捷指令" tabindex="-1">获取快捷指令 <a class="header-anchor" href="#获取快捷指令" aria-label="Permalink to "获取快捷指令""></a></h2><p>使用iPhone或iPad扫描以下二维码,获取快捷指令<br><br><img src="'+a+'" alt="coode"><br><br> MacOS用户请访问<a href="https://www.icloud.com/shortcuts/312005bf5ffd4387ac92a84056db9f09" target="_blank" rel="noreferrer">这里</a>,获取快捷指令</p><h2 id="使用说明" tabindex="-1">使用说明 <a class="header-anchor" href="#使用说明" aria-label="Permalink to "使用说明""></a></h2><ul><li>获取快捷指令后,打开并编辑快捷指令</li><li>分别在三个文本框中填入 <code>面板URL</code>、<code>API Token</code>、<code>服务器ID</code></li><li>保存编辑并测试运行,能获取结果则表示设置正确</li><li>修改快捷指令的名称,如修改为:“一号服务器状态”,保存后便可使用Siri指令:“嘿Siri,一号服务器状态”来获取服务器状态</li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等</p></div>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="自建使用-api-来进行查询-且支持多语言的-telegram-查询机器人" tabindex="-1">自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人 <a class="header-anchor" href="#自建使用-api-来进行查询-且支持多语言的-telegram-查询机器人" aria-label="Permalink to "自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人""></a></h1><p>贡献者:</p><ul><li><a href="https://github.com/tech-fever" target="_blank" rel="noreferrer">tech-fever</a></li></ul><p>项目地址:<a href="https://github.com/tech-fever/nezha_telegram_bot" target="_blank" rel="noreferrer">nezha_telegram_bot</a></p><h2 id="项目特色" tabindex="-1">项目特色 <a class="header-anchor" href="#项目特色" aria-label="Permalink to "项目特色""></a></h2><p>开源Telegram机器人项目,可以基于API实时查询哪吒面板的服务器信息。</p><ul><li>[x] 支持中/英多语言切换</li><li>[x] 支持分组统计(CPU、磁盘、内存、上下行速度、流量统计等)</li><li>[x] 支持实时刷新单个服务器数据</li><li>[x] 支持键盘互动查询</li><li>[x] 支持命令直接查询</li><li>[x] 增加群聊判断,限制群聊可发送命令</li><li>[x] 增加群聊内5秒自动删除信息</li><li>[x] 支持docker部署</li></ul><h2 id="命令列表" tabindex="-1">命令列表 <a class="header-anchor" href="#命令列表" aria-label="Permalink to "命令列表""></a></h2><table tabindex="0"><thead><tr><th>命令</th><th>功能</th><th>仅私聊</th></tr></thead><tbody><tr><td>start</td><td>开始使用键盘主菜单</td><td>✔️</td></tr><tr><td>help</td><td>帮助列表</td><td>❌</td></tr><tr><td>add</td><td>添加面板链接和token</td><td>✔️</td></tr><tr><td>url</td><td>添加面板链接</td><td>✔️</td></tr><tr><td>token</td><td>添加面板token</td><td>✔️</td></tr><tr><td>info</td><td>获取保存的面板链接和token</td><td>✔️</td></tr><tr><td>delete</td><td>删除保存的面板链接和token</td><td>✔️</td></tr><tr><td>id</td><td>命令后面添加整数id,来进行单个服务器信息查询(私聊带刷新按钮,群聊不带)</td><td>❌</td></tr><tr><td>all</td><td>查询所有服务器的统计信息</td><td>❌</td></tr><tr><td>search</td><td>在服务器名字中搜索关键字(支持多个,用空格分开)</td><td>❌</td></tr></tbody></table><h2 id="效果展示" tabindex="-1">效果展示 <a class="header-anchor" href="#效果展示" aria-label="Permalink to "效果展示""></a></h2><p><img src="https://user-images.githubusercontent.com/105153585/175813727-bef77a8e-ff46-4fd4-b41b-43902abf6159.png#pic_left" alt="image"><img src="https://user-images.githubusercontent.com/105153585/175813645-4df4f4c7-2591-4133-9645-21c7db2f62ab.png#pic_right" alt="image"></p>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="重磅推荐-一秒拥有宇宙级算力-让你在人前-不-再-自-卑" tabindex="-1">重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑 <a class="header-anchor" href="#重磅推荐-一秒拥有宇宙级算力-让你在人前-不-再-自-卑" aria-label="Permalink to "重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑""></a></h1><br><hr><p><img src="'+r+'" alt="2"><br><br><span style="font-size:5;">还在因为自己的小鸡配置太差被朋友嘲笑吗? </span><br><span style="font-size:5;">还在想参加以针会友活动却因为小鸡不够排面而觉得羞耻吗? </span><br><span style="font-size:5;">还在因为在哪吒TG群里机器人排名太低而觉得自己低人一等吗? </span><br><br><br><span style="font-size:6;"><strong>今天开始!找回自信!</strong></span><br></p><p>来自南京的名老中医 <a href="https://github.com/dysf888" target="_blank" rel="noreferrer">dysf888</a> 独家秘方!让你<strong>找回男人本色,激情畅享!</strong><br> 安装 <a href="https://github.com/dysf888/fake-nezha-agent" target="_blank" rel="noreferrer">Fake Agent</a>,可随意修改服务器监测数据的倍数上传到 Dashboard,让你的小鸡 <strong>脱!胎!换!骨!</strong> 让你在 MJJ 面前<span style="font-size:5;">硬</span>起来!</p><br><p><span style="font-size:4;"><strong>哪吒监控创始人奶爸也在用:</strong></span><br><img src="'+n+'" alt="5"></p><br><p><span style="font-size:4;"><strong>男人用了都说好:</strong></span><br><img src="'+o+'" alt="6"><br><img src="'+p+'" alt="4"></p><br><hr><p><img src="'+c+'" alt="1"></p>',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};
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="使用-argo-隧道的哪吒服务端" tabindex="-1">使用 Argo 隧道的哪吒服务端 <a class="header-anchor" href="#使用-argo-隧道的哪吒服务端" aria-label="Permalink to "使用 Argo 隧道的哪吒服务端""></a></h1><p>贡献者:</p><ul><li><a href="https://github.com/fscarmen2" target="_blank" rel="noreferrer">fscarmen</a></li></ul><p>项目地址:<a href="https://github.com/fscarmen2/Argo-Nezha-Service-Container" target="_blank" rel="noreferrer">Argo-Nezha-Service-Container</a></p><hr><h2 id="目录" tabindex="-1">目录 <a class="header-anchor" href="#目录" aria-label="Permalink to "目录""></a></h2><ul><li><a href="./case5.html#项目特点">项目特点</a></li><li><a href="./case5.html#准备需要用的变量">准备需要用的变量</a></li><li><a href="./case5.html#argo-认证的获取方式-json-或-token">Argo 认证的获取方式: json 或 token</a></li><li><a href="./case5.html#PaaS-部署实例">PaaS 部署实例</a></li><li><a href="./case5.html#vps-部署方式-1-----docker">VPS 部署方式 1 --- docker</a></li><li><a href="./case5.html#vps-部署方式-2-----宿主机">VPS 部署方式 2 --- 宿主机</a></li><li><a href="./case5.html#客户端接入">客户端接入</a></li><li><a href="./case5.html#ssh-接入">SSH 接入</a></li><li><a href="./case5.html#手动备份数据">手动备份数据</a></li><li><a href="./case5.html#自动还原备份">自动还原备份</a></li><li><a href="./case5.html#手动还原备份">手动还原备份</a></li><li><a href="./case5.html#完美搬家">完美搬家</a></li><li><a href="./case5.html#主体目录文件及说明">主体目录文件及说明</a></li><li><a href="./case5.html#鸣谢下列作者的文章和项目">鸣谢下列作者的文章和项目</a></li><li><a href="./case5.html#免责声明">免责声明</a></li></ul><hr><h2 id="项目特点" tabindex="-1">项目特点: <a class="header-anchor" href="#项目特点" aria-label="Permalink to "项目特点:""></a></h2><ul><li>适用范围更广 --- 只要能连通网络,就能安装哪吒服务端,如 LXC, OpenVZ VPS,Nas 虚拟机 , Container PaaS 等</li><li>Argo 隧道突破需要公网入口的限制 --- 传统的哪吒需要有两个公网端口,一个用于面板的访问,另一个用于客户端上报数据,本项目借用 Cloudflare Argo 隧道,使用内网穿透的办法</li><li>IPv4 / v6 具备更高的灵活性 --- 传统哪吒需要处理服务端和客户端的 IPv4/v6 兼容性问题,还需要通过 warp 等工具来解决不对应的情况。然而,本项目可以完全不需要考虑这些问题,可以任意对接,更加方便和简便</li><li>一条 Argo 隧道分流多个域名和协议 --- 建立一条内网穿透的 Argo 隧道,即可分流三个域名(hostname)和协议(protocal),分别用于面板的访问(http),客户端上报数据(tcp)和 ssh(可选)</li><li>GrpcWebProxy 反向代理的 gRPC 数据端口 --- 配上证书做 tls 终结,然后 Argo 的隧道配置用 https 服务指向这个反向代理,启用http2回源,grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent</li><li>每天自动备份 --- 北京时间每天 4 时 0 分自动备份整个哪吒面板文件夹到指定的 github 私库,包括面板主题,面板设置,探针数据和隧道信息,备份保留近 5 天数据;鉴于内容十分重要,必须要放在私库</li><li>每天自动更新面板 -- 北京时间每天 4 时 0 分自动检测最新的官方面板版本,有升级时自动更新</li><li>手/自一体还原备份 --- 每分钟检测一次在线还原文件的内容,遇到有更新立刻还原</li><li>默认内置本机探针 --- 能很方便的监控自身服务器信息</li><li>数据更安全 --- Argo 隧道使用TLS加密通信,可以将应用程序流量安全地传输到 Cloudflare 网络,提高了应用程序的安全性和可靠性。此外,Argo Tunnel也可以防止IP泄露和DDoS攻击等网络威胁</li></ul><img width="1609" alt="image" src="https://github.com/fscarmen2/Argo-Nezha-Service-Container/assets/92626977/4893c3cd-5055-468f-8138-6c5460bdd1e4"><h2 id="准备需要用的变量" tabindex="-1">准备需要用的变量 <a class="header-anchor" href="#准备需要用的变量" aria-label="Permalink to "准备需要用的变量""></a></h2><ul><li>到 Cloudflare 官网,选择使用的域名,打开 <code>网络</code> 选项将 <code>gRPC</code> 开关打开</li></ul><img width="1590" alt="image" src="https://user-images.githubusercontent.com/92626977/233138703-faab8596-a64a-40bb-afe6-52711489fbcf.png"><ul><li>获取 git
Line truncated
|
||||
<span class="line"><span> --name nezha_dashboard \\</span></span>
|
||||
<span class="line"><span> --pull always \\</span></span>
|
||||
<span class="line"><span> --restart always \\</span></span>
|
||||
<span class="line"><span> -e GH_USER=<填 github 用户名> \\</span></span>
|
||||
<span class="line"><span> -e GH_EMAIL=<填 github 邮箱> \\</span></span>
|
||||
<span class="line"><span> -e GH_PAT=<填获取的> \\</span></span>
|
||||
<span class="line"><span> -e GH_REPO=<填自定义的> \\</span></span>
|
||||
<span class="line"><span> -e GH_CLIENTID=<填获取的> \\</span></span>
|
||||
<span class="line"><span> -e GH_CLIENTSECRET=<填获取的> \\</span></span>
|
||||
<span class="line"><span> -e ARGO_AUTH='<填获取的 Argo json 或者 token>' \\</span></span>
|
||||
<span class="line"><span> -e ARGO_DOMAIN=<填自定义的> \\</span></span>
|
||||
<span class="line"><span> -e GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量> \\</span></span>
|
||||
<span class="line"><span> fscarmen/argo-nezha</span></span></code></pre></div><h3 id="docker-compose-部署" tabindex="-1">docker-compose 部署 <a class="header-anchor" href="#docker-compose-部署" aria-label="Permalink to "docker-compose 部署""></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>version: '3.8'</span></span>
|
||||
<span class="line"><span>services:</span></span>
|
||||
<span class="line"><span> argo-nezha:</span></span>
|
||||
<span class="line"><span> image: fscarmen/argo-nezha</span></span>
|
||||
<span class="line"><span> pull: always</span></span>
|
||||
<span class="line"><span> container_name: nezha_dashboard</span></span>
|
||||
<span class="line"><span> restart: always</span></span>
|
||||
<span class="line"><span> environment:</span></span>
|
||||
<span class="line"><span> - GH_USER=<填 github 用户名></span></span>
|
||||
<span class="line"><span> - GH_EMAIL=<<填 github 邮箱></span></span>
|
||||
<span class="line"><span> - GH_PAT=<填获取的></span></span>
|
||||
<span class="line"><span> - GH_REPO=<填自定义的></span></span>
|
||||
<span class="line"><span> - GH_CLIENTID=<填获取的></span></span>
|
||||
<span class="line"><span> - GH_CLIENTSECRET=<填获取的></span></span>
|
||||
<span class="line"><span> - ARGO_AUTH='<填获取的 Argo json 或者 token>'</span></span>
|
||||
<span class="line"><span> - ARGO_DOMAIN=<填自定义的></span></span>
|
||||
<span class="line"><span> - GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量></span></span></code></pre></div><h2 id="vps-部署方式-2-宿主机" tabindex="-1">VPS 部署方式 2 --- 宿主机 <a class="header-anchor" href="#vps-部署方式-2-宿主机" aria-label="Permalink to "VPS 部署方式 2 --- 宿主机""></a></h2><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)</span></span></code></pre></div><h2 id="客户端接入" tabindex="-1">客户端接入 <a class="header-anchor" href="#客户端接入" aria-label="Permalink to "客户端接入""></a></h2><p>通过gRPC传输,无需额外配置。使用面板给到的安装方式,举例</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>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</span></span></code></pre></div><h2 id="ssh-接入" tabindex="-1">SSH 接入 <a class="header-anchor" href="#ssh-接入" aria-label="Permalink to "SSH 接入""></a></h2><ul><li>以 macOS + WindTerm 为例,其他根据使用的 SSH 工具,结合官方官方说明文档: <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/use_cases/ssh/#2-connect-as-a-user" target="_blank" rel="noreferrer">https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/use_cases/ssh/#2-connect-as-a-user</a></li><li>官方 cloudflared 下载: <a href="https://github.com/cloudflare/cloudflared/releases" target="_blank" rel="noreferrer">https://github.com/cloudflare/cloudflared/releases</a></li><li>以下输入命令举例: SSH 用户名: root, 密码:<GH_CLIENTSECRET></li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span><file path>/cloudflared access ssh --hostname nezha.seales.nom.za/<GH_CLIENTID></span></span></code></pre></div><img width="1180" alt="image" src="https://github.com/fscarmen2/Argo-Nezha-Service-Container/assets/92626977/507b037a-25c6-457f-b2b5-d54f4b70a2b6"><img width="828" alt="image" src="https://github.com/fscarmen2/Argo-Nezha-Service-Container/assets/92626977/80284f0b-e2d7-4adb-982a-969aca0cb5f6"><img width="955" alt="image" src="https://user-images.githubusercontent.com/92626977/233350802-754624e0-8456-4353-8577-1f5385fb8723.png"><h2 id="手动备份数据" tabindex="-1">手动备份数据 <a class="header-anchor" href="#手动备份数据" aria-label="Permalink to "手动备份数据""></a></h2><p>方法一: 把 Github 备份库里的 <code>README.md</code> 文件内容改为 <code>backup</code></p><img width="970" alt="image" src="https://github.com/fscarmen2/Argo-Nezha-Service-Container/assets/92626977/c5b6bc4b-e69c-48ce-97d4-3f9be88515f3"><p>方法二: ssh 进去后,容器版本运行 <code>/dashboard/backup.sh</code>; 非容器版本运行 <code>/opt/nezha/dashboard/backup.sh</code></p><h2 id="自动还原备份" tabindex="-1">自动还原备份 <a class="header-anchor" href="#自动还原备份" aria-label="Permalink to "自动还原备份""></a></h2><ul><li>把需要还原的文件名改到 github 备份库里的 <code>README.md</code>,定时服务会每分钟检测更新,并把上次同步的文件名记录在本地 <code>/dbfile</code> 处以与在线的文件内容作比对</li></ul><p>下图为以还原文件名为 <code>dashboard-2023-04-23-13:08:37.tar.gz</code> 作示例</p><p><img src="https://user-images.githubusercontent.com/92626977/233822466-c24e94f6-ba8a-47c9-b77d-aa62a56cc929.png" alt="image"></p><h2 id="手动还原备份" tabindex="-1">手动还原备份 <a class="header-anchor" href="#手动还原备份" aria-label="Permalink to "手动还原备份""></a></h2><ul><li>ssh 进入容器后运行,github 备份库里的 tar.gz 文件名,格式: dashboard-2023-04-22-21:42:10.tar.gz</li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bash /dashboard/restore.sh <文件名></span></span></code></pre></div><img width="1209" alt="image" src="https://user-images.githubusercontent.com/92626977/233792709-Line truncated
|
||||
<span class="line"><span>|-- app # 哪吒面板主程序</span></span>
|
||||
<span class="line"><span>|-- argo.json # Argo 隧道 json 文件,记录着使用隧道的信息</span></span>
|
||||
<span class="line"><span>|-- argo.yml # Argo 隧道 yml 文件,用于在一同隧道下,根据不同域名来分流 web, gRPC 和 ssh 协议的作用</span></span>
|
||||
<span class="line"><span>|-- backup.sh # 备份数据脚本</span></span>
|
||||
<span class="line"><span>|-- restore.sh # 还原备份脚本</span></span>
|
||||
<span class="line"><span>|-- dbfile # 记录最新的还原或备份文件名</span></span>
|
||||
<span class="line"><span>|-- resource # 面板主题、语言和旗帜等资料的文件夹</span></span>
|
||||
<span class="line"><span>|-- data</span></span>
|
||||
<span class="line"><span>| |-- config.yaml # 哪吒面板的配置,如 Github OAuth2 / gRPC 域名 / 端口 / 是否启用 TLS 等信息</span></span>
|
||||
<span class="line"><span>| \`-- sqlite.db # SQLite 数据库文件,记录着面板设置的所有 severs 和 cron 等信息</span></span>
|
||||
<span class="line"><span>|-- entrypoint.sh # 主脚本,容器运行后执行</span></span>
|
||||
<span class="line"><span>|-- nezha.csr # SSL/TLS 证书签名请求</span></span>
|
||||
<span class="line"><span>|-- nezha.key # SSL/TLS 证书的私钥信息</span></span>
|
||||
<span class="line"><span>|-- nezha.pem # SSL/TLS 证书文件</span></span>
|
||||
<span class="line"><span>|-- cloudflared # Cloudflare Argo 隧道主程序</span></span>
|
||||
<span class="line"><span>|-- grpcwebproxy # gRPC 反代主程序</span></span>
|
||||
<span class="line"><span>\`-- nezha-agent # 哪吒客户端,用于监控本地 localhost</span></span></code></pre></div><h2 id="鸣谢下列作者的文章和项目" tabindex="-1">鸣谢下列作者的文章和项目: <a class="header-anchor" href="#鸣谢下列作者的文章和项目" aria-label="Permalink to "鸣谢下列作者的文章和项目:""></a></h2><ul><li>热心的朝阳群众 Robin,讨论哪吒服务端与客户端的关系,从而诞生了此项目</li><li>哪吒官网: <a href="https://nezha.wiki/" target="_blank" rel="noreferrer">https://nezha.wiki/</a> , TG 群: <a href="https://t.me/nezhamonitoring" target="_blank" rel="noreferrer">https://t.me/nezhamonitoring</a></li><li>共穷国际老中医: <a href="http://solitud.es/" target="_blank" rel="noreferrer">http://solitud.es/</a></li><li>Akkia's Blog: <a href="https://blog.akkia.moe/" target="_blank" rel="noreferrer">https://blog.akkia.moe/</a></li><li>胡桃's Blog: <a href="https://blog.xn--pn1aul.org/" target="_blank" rel="noreferrer">https://blog.萝莉.org/</a></li><li>HiFeng's Blog: <a href="https://www.hicairo.com/" target="_blank" rel="noreferrer">https://www.hicairo.com/</a></li><li>用 Cloudflare Tunnel 进行内网穿透: <a href="https://blog.outv.im/2021/cloudflared-tunnel/" target="_blank" rel="noreferrer">https://blog.outv.im/2021/cloudflared-tunnel/</a></li><li>如何给 GitHub Actions 添加自己的 Runner 主机: <a href="https://cloud.tencent.com/developer/article/1756690" target="_blank" rel="noreferrer">https://cloud.tencent.com/developer/article/1756690</a></li><li>github self-hosted runner 添加与启动: <a href="https://blog.csdn.net/sinat_32188225/article/details/125978331" target="_blank" rel="noreferrer">https://blog.csdn.net/sinat_32188225/article/details/125978331</a></li><li>如何从Docker镜像中导出文件: <a href="https://www.pkslow.com/archives/extract-files-from-docker-image" target="_blank" rel="noreferrer">https://www.pkslow.com/archives/extract-files-from-docker-image</a></li><li>grpcwebproxy: <a href="https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy" target="_blank" rel="noreferrer">https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy</a></li><li>Applexad 的哪吒官方改版的面板二进制文件: <a href="https://github.com/applexad/nezha-binary-build" target="_blank" rel="noreferrer">https://github.com/applexad/nezha-binary-build</a></li></ul><h2 id="免责声明" tabindex="-1">免责声明: <a class="header-anchor" href="#免责声明" aria-label="Permalink to "免责声明:""></a></h2><ul><li>本程序仅供学习了解, 非盈利目的,请于下载后 24 小时内删除, 不得用作任何商业用途, 文字、数据及图片均有所属版权, 如转载须注明来源。</li><li>使用本程序必循遵守部署免责声明。使用本程序必循遵守部署服务器所在地、所在国家和用户所在国家的法律法规, 程序作者不对使用者任何不当行为负责。</li></ul>`,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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="nezha-mobile-nezha-dashboard-的-ios-客户端" tabindex="-1">Nezha Mobile - Nezha Dashboard 的 iOS 客户端 <a class="header-anchor" href="#nezha-mobile-nezha-dashboard-的-ios-客户端" aria-label="Permalink to "Nezha Mobile - Nezha Dashboard 的 iOS 客户端""></a></h1><p>贡献者:</p><ul><li><a href="https://github.com/hiDandelion" target="_blank" rel="noreferrer">hiDandelion</a></li></ul><h2 id="为项目作出贡献" tabindex="-1">为项目作出贡献 <a class="header-anchor" href="#为项目作出贡献" aria-label="Permalink to "为项目作出贡献""></a></h2><p><a href="https://github.com/hiDandelion/Nezha-Mobile" target="_blank" rel="noreferrer">项目地址</a></p><div class="info custom-block"><p class="custom-block-title">INFO</p><p>我们欢迎对项目的任何贡献,并将积极合并你的修改至下一次的Release,但我们可能会对不符合App Review Guidelines的内容(或潜在内容)进行一些修改。</p></div><h2 id="从-app-store-下载" tabindex="-1">从 App Store 下载 <a class="header-anchor" href="#从-app-store-下载" aria-label="Permalink to "从 App Store 下载""></a></h2><p><a href="https://apps.apple.com/us/app/nezha-mobile/id6596729064" target="_blank" rel="noreferrer"><img src="'+s+'" alt="Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917"></a></p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>App Store版本的Nezha Mobile由于<strong>ICP备案</strong>原因不在<strong>中国大陆</strong>提供服务。</p></div><h2 id="testflight-测试计划" tabindex="-1">TestFlight 测试计划 <a class="header-anchor" href="#testflight-测试计划" aria-label="Permalink to "TestFlight 测试计划""></a></h2><p><a href="https://testflight.apple.com/join/C6vTc2dN" target="_blank" rel="noreferrer">加入 TestFlight 测试</a></p><h2 id="使用说明" tabindex="-1">使用说明 <a class="header-anchor" href="#使用说明" aria-label="Permalink to "使用说明""></a></h2><ul><li>首次使用时你需要输入<strong>Dashboard链接</strong>和<strong>API Token</strong>。<strong>Dashboard链接</strong>形如<code>server.hidandelion.com</code>,不要添加协议头和末尾斜杠。<strong>API Token</strong>可通过Dashboard管理后台获取。 <img src="'+r+'" alt="step1" width="200"></li></ul><h2 id="配置小组件-可选" tabindex="-1">配置小组件(可选) <a class="header-anchor" href="#配置小组件-可选" aria-label="Permalink to "配置小组件(可选)""></a></h2><ul><li><p>在Springboard添加小组件,长按后点击<strong>编辑小组件</strong>。 <img src="'+i+'" alt="step2" width="200"></p></li><li><p>在随后的页面中选择一台你需要监控的服务器。你可以为多个小组件配置不同的服务器。 <img src="'+l+'" alt="step3" width="200"></p></li></ul>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="broker-for-nezha-拓展-nezha-接入平台" tabindex="-1">Broker for Nezha - 拓展 Nezha 接入平台 <a class="header-anchor" href="#broker-for-nezha-拓展-nezha-接入平台" aria-label="Permalink to "Broker for Nezha - 拓展 Nezha 接入平台""></a></h1><p>贡献者:</p><ul><li><a href="https://codeberg.org/uubulb" target="_blank" rel="noreferrer">uubulb</a></li></ul><p>Broker for Nezha 是一个 Nezha Agent 的修改版本,其通过分离 Agent 的数据收集和 gRPC 上报功能,可使小型设备接入 Nezha Dashboard。</p><p>项目地址:<a href="https://codeberg.org/uubulb/broker" target="_blank" rel="noreferrer">https://codeberg.org/uubulb/broker</a></p><p>文档:<a href="https://broker.kuzu.uk/" target="_blank" rel="noreferrer">Broker for Nezha</a></p><h2 id="与原项目的不同" tabindex="-1">与原项目的不同 <a class="header-anchor" href="#与原项目的不同" aria-label="Permalink to "与原项目的不同""></a></h2><ul><li>使用外置数据源,而不是从本地获取。</li><li>多数据源与多面板支持</li><li>仅支持部分任务类型,可参考项目 README 获取详细信息。</li></ul><p>Broker for Nezha 需要与特定的数据收集软件一同使用。目前提供两种数据获取方式:</p><ol><li>HTTP 主动获取(HTTP/1.1)</li><li>TCP 被动获取(推荐)</li></ol><p>如需获取现有的数据收集软件,可以参考项目 README。</p><p>因数据获取方式缺乏安全性,建议仅在信任的网络环境使用。</p><h2 id="编写数据收集端" tabindex="-1">编写数据收集端 <a class="header-anchor" href="#编写数据收集端" aria-label="Permalink to "编写数据收集端""></a></h2><p>如需自行编写数据收集端,除实现基本 HTTP 服务器或 TCP 客户端外,还需要使用特定的数据格式才可被 Broker 正常接收。具体请参考:<a href="https://broker.kuzu.uk/configuration/type/" target="_blank" rel="noreferrer">数据类型</a></p><h2 id="效果参考" tabindex="-1">效果参考 <a class="header-anchor" href="#效果参考" aria-label="Permalink to "效果参考""></a></h2><figure><img src="'+e+'" alt="Dashboard"><figcaption style="font-size:0.9em;color:gray;text-align:center;"> Dashboard </figcaption></figure><br><figure><img src="'+r+'" alt="WebSSH"><figcaption style="font-size:0.9em;color:gray;text-align:center;"> WebSSH </figcaption></figure>',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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?lr(Object(r),!0).forEach(function(n){So(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Ve(t){return Ve=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},Ve(t)}function So(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lt(){return Lt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lt.apply(this,arguments)}function wo(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<m.length;s++)u=m[s],c.indexOf(u)>=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=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);r<e;r++)n[r]=t[r];return n}var w,Pe,On,sr,Sn,mt={},Zt=[],jo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function J(t,e){for(var r in e)t[r]=e[r];return t}function wn(t){var e=t.parentNode;e&&e.removeChild(t)}function K(t,e,r){var n,o,i,a=arguments,c={};for(i in e)i=="key"?n=e[i]:i=="ref"?o=e[i]:c[i]=e[i];if(arguments.length>3)for(r=[r],i=3;i<arguments.length;i++)r.push(a[i]);if(r!=null&&(c.children=r),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)c[i]===void 0&&(c[i]=t.defaultProps[i]);return Ie(t,c,n,o,null)}function Ie(t,e,r,n,o){var i={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++w.__v};return w.vnode!=null&&w.vnode(i),i}function X(t){return t.children}function W(t,e){this.props=t,this.context=e}function Ke(t,e){if(e==null)return t.__?Ke(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Ke(t):null}function jn(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return jn(t)}}function Mt(t){(!t.__d&&(t.__d=!0)&&Pe.push(t)&&!pt.__r++||sr!==w.debounceRendering)&&((sr=w.debounceRendering)||On)(pt)}function pt(){for(var t;pt.__r=Pe.length;)t=Pe.sort(function(e,r){return e.__v.__b-r.__v.__b}),Pe=[],t.some(function(e){var r,n,o,i,a,c;e.__d&&(a=(i=(r=e).__v).__e,(c=r.__P)&&(n=[],(o=J({},i)).__v=i.__v+1,Yt(c,i,o,r.__n,c.ownerSVGElement!==void 0,i.__h!=null?[a]:null,n,a??Ke(i),i.__h),kn(n,i),i.__e!=a&&jn(i)))})}function En(t,e,r,n,o,i,a,c,u,s){var l,m,p,v,d,h,y,b=n&&n.__k||Zt,_=b.length;for(r.__k=[],l=0;l<e.length;l++)if((v=r.__k[l]=(v=e[l])==null||typeof v=="boolean"?null:typeof v=="string"||typeof v=="number"?Ie(null,v,null,null,v):Array.isArray(v)?Ie(X,{children:v},null,null,null):v.__b>0?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;l<y.length;l++)Dn(y[l],y[++l],y[++l])}function Pn(t,e,r){var n,o;for(n=0;n<t.__k.length;n++)(o=t.__k[n])&&(o.__=t,e=typeof o.type=="function"?Pn(o,e,r):In(r,o,o,t.__k,o.__e,e));return e}function $(t,e){return e=e||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(r){$(r,e)}):e.push(t)),e}function In(t,e,r,n,o,i){var a,c,u;if(e.__d!==void 0)a=e.__d,e.__d=void 0;else if(r==null||o!=i||o.parentNode==null)e:if(i==null||i.parentNode!==t)t.appendChild(o),a=null;else{for(c=i,u=0;(c=c.nextSibling)&&u<n.length;u+=2)if(c==o)break e;t.insertBefore(o,i),a=i}return a!==void 0?a:o.nextSibling}function fr(t,e,r){e[0]==="-"?t.setProperty(e,r):t[e]=r==null?"":typeof r!="number"||jo.test(e)?r:r+"px"}function Ye(t,e,r,n,o){var i;e:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||fr(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||fr(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n||t.addEventListener(e,i?pr:mr,i):t.removeEventListener(e,i?pr:mr,i);else if(e!=="dangerouslySetInnerHTML"){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(e!=="href"&&e!=="list"&&e!=="form"&&e!=="download"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r!=null&&(r!==!1||e[0]==="a"&&e[1]==="r")?t.setAttribute(e,r):t.removeAttribute(e))}}function mr(t){this.l[t.type+!1](w.event?w.event(t):t)}function pr(t){this.l[t.type+!0](w.event?w.event(t):t)}function Yt(t,e,r,n,o,i,a,c,u){var s,l,m,p,v,d,h,y,b,_,S,O=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(u=r.__h,c=e.__e=r.__e,e.__h=null,i=[c]),(s=w.__b)&&s(e);try{e:if(typeof O=="function"){if(y=e.props,b=(s=O.contextType)&&n[s.__c],_=s?b?b.props.value:s.__:n,r.__c?h=(l=e.__c=r.__c).__=l.__E:("prototype"in O&&O.prototype.rend
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ar(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Bo(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<m.length;s++)u=m[s],c.indexOf(u)>=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=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;i<n;i++)o[i]=arguments[i];r&&clearTimeout(r),r=setTimeout(function(){return t.apply(void 0,o)},e)}}function ze(t){return t.reduce(function(e,r){return e.concat(r)},[])}var Ko=0;function Kt(t){return t.collections.length===0?0:t.collections.reduce(function(e,r){return e+r.items.length},0)}function xr(t){return t!==Object(t)}function Vn(t,e){if(t===e)return!0;if(xr(t)||xr(e)||typeof t=="function"||typeof e=="function")return t===e;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];if(!(o in e)||!Vn(t[o],e[o]))return!1}return!0}var vt=function(){},Wo=[{segment:"autocomplete-core",version:"1.9.3"}];function Nr(t){var e=t.item,r=t.items;return{index:e.__autocomplete_indexName,items:[e],positions:[1+r.findIndex(function(n){return n.objectID===e.objectID})],queryID:e.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function zo(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,s=[],l=!0,m=!1;try{if(c=(o=o.call(r)).next,n!==0)for(;!(l=(i=c.call(o)).done)&&(s.push(i.value),s.length!==n);l=!0);}catch(p){m=!0,a=p}finally{try{if(!l&&o.return!=null&&(u=o.return(),Object(u)!==u))return}finally{if(m)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Tr(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 Tr(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 Tr(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Jo=["items"],$o=["items"];function ke(t){return ke=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},ke(t)}function Ge(t){return function(e){if(Array.isArray(e))return It(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 It(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 It(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 It(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Kn(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<m.length;s++)u=m[s],c.indexOf(u)>=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=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;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rr(Object(r),!0).forEach(function(n){Qo(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Qo(t,e,r){return(e=function(n){var o=function(i,a){if(ke(i)!=="object"||i===null)return i;var c=i[Symbol.toPrimitive];if(c!==void 0){var u=c.call(i,a||"default");if(ke(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(i)}(n,"string");return ke(o)==="symbol"?o:String(o)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zo(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n<t.objectIDs.length;n+=e)r.push(ve(ve({},t),{},{objectIDs:t.objectIDs.slice(n,n+e)}));return r}function Xe(t){return t.map(function(e){var r=e.items,n=Kn(e,Jo);return ve(ve({},n),{},{objectIDs:(r==null?void 0:r.map(function(o){return o.objectID}))||n.objectIDs})})}function Yo(t){var e,r,n,o=(e=zo((t.version||"").split(".").map(Number),2),r=e[0],n=e[1],r>=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;u<a;u++)c[u]=arguments[u];c.length>0&&i("clickedObjectIDsAfterSearch",Xe(c),c[0].items)},clickedObjectIDs:function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];c.length>0&&i("clickedObjectIDs",Xe(c),c[0].items)},clickedFilters:function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];c.length>0&&t.apply(void 0,["clickedFilters"].concat(c))},convertedObjectIDsAfterSearch:function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];c.length>0&&i("convertedObjectIDsAfterSearch",Xe(c),c[0].items)},convertedObjectIDs:function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];c.length>0&&i("convertedObjectIDs",Xe(c),c[0].items)},convertedFilters:function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];c.length>0&&t.apply(void 0,["convertedFilters"].concat(c))},viewedObjectIDs:function(){for(var a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];c.length>0&&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;u<a;u++)c[u]=arguments[u];c.length>0&&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(
Line truncated
|
||||
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);r<e;r++)n[r]=t[r];return n}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 G(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lr(Object(r),!0).forEach(function(n){Xo(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Xo(t,e,r){return(e=function(n){var o=function(i,a){if(De(i)!=="object"||i===null)return i;var c=i[Symbol.toPrimitive];if(c!==void 0){var u=c.call(i,a||"default");if(De(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(i)}(n,"string");return De(o)==="symbol"?o:String(o)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ei="https://cdn.jsdelivr.net/npm/search-insights@".concat("2.6.0","/dist/search-insights.min.js"),ti=Bn(function(t){var e=t.onItemsChange,r=t.items,n=t.insights,o=t.state;e({insights:n,insightsEvents:Go({items:r}).map(function(i){return G({eventName:"Items Viewed"},i)}),state:o})},400);function ri(t){var e=function(l){return G({onItemsChange:function(m){var p=m.insights,v=m.insightsEvents;p.viewedObjectIDs.apply(p,ie(v.map(function(d){return G(G({},d),{},{algoliaSource:[].concat(ie(d.algoliaSource||[]),["autocomplete-internal"])})})))},onSelect:function(m){var p=m.insights,v=m.insightsEvents;p.clickedObjectIDsAfterSearch.apply(p,ie(v.map(function(d){return G(G({},d),{},{algoliaSource:[].concat(ie(d.algoliaSource||[]),["autocomplete-internal"])})})))},onActive:vt},l)}(t),r=e.insightsClient,n=e.onItemsChange,o=e.onSelect,i=e.onActive,a=r;r||function(l){typeof window<"u"&&l({window})}(function(l){var m=l.window,p=m.AlgoliaAnalyticsObject||"aa";typeof p=="string"&&(a=m[p]),a||(m.AlgoliaAnalyticsObject=p,m[p]||(m[p]=function(){m[p].queue||(m[p].queue=[]);for(var v=arguments.length,d=new Array(v),h=0;h<v;h++)d[h]=arguments[h];m[p].queue.push(d)}),m[p].version="2.6.0",a=m[p],function(v){var d="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var h=v.document.createElement("script");h.async=!0,h.src=ei,h.onerror=function(){console.error(d)},document.body.appendChild(h)}catch{console.error(d)}}(m))});var c=Yo(a),u={current:[]},s=Bn(function(l){var m=l.state;if(m.isOpen){var p=m.collections.reduce(function(v,d){return[].concat(ie(v),ie(d.items))},[]).filter(kt);Vn(u.current.map(function(v){return v.objectID}),p.map(function(v){return v.objectID}))||(u.current=p,p.length>0&&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;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hr(Object(r),!0).forEach(function(n){ni(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ni(t,e,r){re
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function At(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vr(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 ae(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vr(Object(r),!0).forEach(function(n){li(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function li(t,e,r){return(e=function(n){var o=function(i,a){if(Ne(i)!=="object"||i===null)return i;var c=i[Symbol.toPrimitive];if(c!==void 0){var u=c.call(i,a||"default");if(Ne(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(i)}(n,"string");return Ne(o)==="symbol"?o:String(o)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function si(t,e){var r,n=typeof window<"u"?window:{},o=t.plugins||[];return ae(ae({debug:!1,openOnFocus:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:!1,environment:n,shouldPanelOpen:function(i){return Kt(i.state)>0},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;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kr(Object(r),!0).forEach(function(n){Wn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Wn(t,e,r){return(e=function(n){var o=function(i,a){if(Te(i)!=="object"||i===null)return i;var c=i[Symbol.toPrimitive];if(c!==void 0){var u=c.call(i,a||"default");if(Te(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(i)}(n,"string");return Te(o)==="symbol"?o:String(o)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Re(t){return Re=typeof Symbol=="function"&&typeof
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ct(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nt(t){return!!t.execute}function mi(t,e,r){if(o=t,!!(o!=null&&o.execute)){var n=t.requesterId==="algolia"?Object.assign.apply(Object,[{}].concat(zn(Object.keys(r.context).map(function(i){var a;return(a=r.context[i])===null||a===void 0?void 0:a.__algoliaSearchParameters})))):{};return ue(ue({},t),{},{requests:t.queries.map(function(i){return{query:t.requesterId==="algolia"?ue(ue({},i),{},{params:ue(ue({},n),i.params)}):i,sourceId:e,transformResponse:t.transformResponse}})})}var o;return{items:t,sourceId:e}}function pi(t){var e=t.reduce(function(r,n){if(!nt(n))return r.push(n),r;var o=n.searchClient,i=n.execute,a=n.requesterId,c=n.requests,u=r.find(function(m){return nt(n)&&nt(m)&&m.searchClient===o&&!!a&&m.requesterId===a});if(u){var s;(s=u.items).push.apply(s,zn(c))}else{var l={execute:i,requesterId:a,items:c,searchClient:o};r.push(l)}return r},[]).map(function(r){if(!nt(r))return Promise.resolve(r);var n=r,o=n.execute,i=n.items;return o({searchClient:n.searchClient,requests:i})});return Promise.all(e).then(function(r){return ze(r)})}function vi(t,e,r){return e.map(function(n){var o,i=t.filter(function(s){return s.sourceId===n.sourceId}),a=i.map(function(s){return s.items}),c=i[0].transformResponse,u=c?c({results:o=a,hits:o.map(function(s){return s.hits}).filter(Boolean),facetHits:o.map(function(s){var l;return(l=s.facetHits)===null||l===void 0?void 0:l.map(function(m){return{label:m.value,count:m.count,_highlightResult:{label:{value:m.highlighted}}}})}).filter(Boolean)}):a;return n.onResolve({source:n,results:a,items:u,state:r.getState()}),u.every(Boolean),'The `getItems` function from source "'.concat(n.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),`.
|
||||
|
||||
Did you forget to return items?
|
||||
|
||||
See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:n,items:u}})}function Le(t){return Le=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},Le(t)}var di=["event","nextState","props","query","refresh","store"];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 Se(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zr(Object(r),!0).forEach(function(n){hi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function hi(t,e,r){return(e=function(n){var o=function(i,a){if(Le(i)!=="object"||i===null)return i;var c=i[Symbol.toPrimitive];if(c!==void 0){var u=c.call(i,a||"default");if(Le(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(i)}(n,"string");return Le(o)==="symbol"?o:String(o)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yi(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<m.length;s++)u=m[s],c.indexOf(u)>=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=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<xt?ot:(xt=e,ot=r,r)})});function le(t){var e=t.event,r=t.nextState,n=r===void 0?{}:r,o=t.props,i=t.query,a=t.refresh,c=t.store,u=yi(t,di);we&&o.environment.clearTimeout(we);var s=u.setCollections,l=u.setIsOpen,m=u.setQuery,p=u.setActiveItemId,v=u.setStatus;if(m(i),p(o.defaultActiveItemId),!i&&o.openOnFocus===!1){var d,h=c.getState().collections.map(function(_){return Se(Se({},_),{},{items:[]})});v("idle"),s(h),l((d=n.isOpen)!==null&&d!==void 0?d:o.shouldPanelOpen({state:c.getState()}));var y=qr($r(h).then(function(){return Promise.resolve()}));return c.pendingRequests.add(y)}v("loading"),we=o.environment.setTimeout(function(){v("stalled")},o.stallThreshold);var b=qr($r(o.getSources(Se({query:i,refresh:a,state:c.getState()},u)).then(function(_){return Promise.all(_.map(function(S){return Promise.resolve(S.getItems(Se({query:i,refresh:a,state:c.getState()},u))).then(function(O){return mi(O,S.sourceId,c.getState())})})).then(pi).then(function(S){return vi(S,_,c)}).then(function(S){return function(O){var g=O.collections,P=O.props,C=O.state,q=g.reduce(function(D,N){return rt(rt({},D),{},Wn({},N.source.sourceId,rt(rt({},N.source),{},{getItems:function(){return ze(N.items)}})))},{}),x=P.plugins.reduce(function(D,N){return N.reshape?N.reshape(D):D},{sourcesBySourceId:q,state:C}).sourcesBySourceId;return ze(P.reshape({sourcesBySourceId:x,sources:Object.values(x),state:C})).filter(Boolean).map(function(D){return{source:D,items:D.getItems()}})}({collections:S,props:o,state:c.getState()})})}))).then(function(_){var S;v("idle"),s(_);var O=o.shouldPanelOpen({state:c.getState()});l((S=n.isOpen)!==null&&S!==void 0?S:o.openOnFocus&&!i&&O||O);var g=fe(c.getState());if(c.getState().activeItemId!==null&&g){var P=g.item,C=g.itemInputValue,q=g.itemUrl,x=g.source;x.onActive(Se({event:e,item:P,itemInputValue:C,itemUrl:q,refresh:a,source:x,state:c.getState()},u))}}).finally(function(){v("idle"),we&&o.environment.clearTimeout(we)});return c.pendingRequests.add(b)}function qe(t){return qe=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},qe(t)}var gi=["event","props","refresh","store"];function Qr(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 te(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qr(Object(r),!0).forEach(function(n){bi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function bi(t,e,r){return(e=function(n){var o=function(i,a){if(qe(i)!=="object"||i===null)return i;var c=i[Symbol.toPrimitive];if(c!==void 0){var u=c.call(i,a||"default");if(qe(u)!=="object")return u;throw new TypeError("@@toPrimitive m
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Nt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Yi(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<m.length;s++)u=m[s],c.indexOf(u)>=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=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<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rn(Object(r),!0).forEach(function(n){ea(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rn(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ea(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ta(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<m.length;s++)u=m[s],c.indexOf(u)>=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=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<e;r++)n[r]=t[r];return n}function dt(){return dt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},dt.apply(this,arguments)}function zt(t){return t.collection&&t.collection.items.length!==0?f.createElement("section",{className:"DocSearch-Hits"},f.createElement("div",{className:"DocSearch-Hit-source"},t.title),f.createElement("ul",t.getListProps(),t.collection.items.map(function(e,r){return f.createElement(ra,dt({key:[t.title,e.objectID].join(":"),item:e,index:r},t))}))):null}function ra(t){var e=t.item,r=t.index,n=t.renderIcon,o=t.renderAction,i=t.getItemProps,a=t.onItemClick,c=t.collection,u=t.hitComponent,s=an(f.useState(!1),2),l=s[0],m=s[1],p=an(f.useState(!1),2),v=p[0],d=p[1],h=f.useRef(null),y=u;return f.createElement("li",dt({className:["DocSearch-Hit",e.__docsearch_parent&&"DocSearch-Hit--Child",l&&"DocSearch-Hit--deleting",v&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){h.current&&h.current()}},i({item:e,source:c.source,onClick:function(b){a(e,b)}})),f.createElement(y,{hit:e},f.createElement("div",{className:"DocSearch-Hit-Container"},n({item:e,index:r}),e.hierarchy[e.type]&&e.type==="lvl1"&&f.createElement("div",{className:"DocSearch-Hit-content-wrapper"},f.createElement(ce,{className:"DocSearch-Hit-title",hit:e,attribute:"hierarchy.lvl1"}),e.content&&f.createElement(ce,{className:"DocSearch-Hit-path",hit:e,attribute:"content"})),e.hierarchy[e.type]&&(e.type==="lvl2"||e.type==="lvl3"||e.type==="lvl4"||e.type==="lvl5"||e.type==="lvl6")&&f.createElement("div",{className:"DocSearch-Hit-content-wrapper"},f.createElement(ce,{className:"DocSearch-Hit-title",hit:e,attribute:"hierarchy.".concat(e.type)}),f.createElement(ce,{className:"DocSearch-Hit-path",hit:e,attribute:"hierarchy.lvl1"})),e.type==="content"&&f.createElement("div",{className:"DocSearch-Hit-content-wrapper"},f.createElement(ce,{className:"DocSearch-Hit-title",hit:e,attribute:"content"}),f.createElement(ce,{className:"DocSearch-Hit-path",hit:e,attribute:"hierarchy.lvl1"})),o({item:e,runDeleteTransition:function(b){m(!0),h.current=b},runFavoriteTransition:function(b){d(!0),h.current=b}}))))}function cn(t,e,r){return t.reduce(function(n,o){var i=e(o);return n.hasOwnProperty(i)||(n[i]=[]),n[i].length<(r||5)&&n[i].push(o),n},{})}function ln(t){return t}function at(t){return t.button===1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}function na(){}var $n=/(<mark>|<\/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<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Jt.apply(this,arguments)}function ia(t){return f.createElement("div",{className:"DocSearch-Dropdown-Container"},t.state.collections.map(function(e){if(e.items.length===0)return null;var r=Qn(e.items[0]);return f.createElement(zt,Jt({},t,{key:e.source.sourceId,title:r,collection:e,renderIcon:function(n){var o,i=n.item,a=n.index;return f.createElement(f.Fragment,null,i.__docsearch_parent&&f.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},f.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},i.__docsearch_parent!==((o=e.items[a+1])===null||o===void 0?void 0:o.__docsearch_parent)?f.createElement("path",{d:"M8 6v21M20 27H8.3"}):f.createElement("path",{d:"M8 6v42M20 27H8.3"}))),f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(Vi,{type:i.type})))},renderAction:function(){return f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement(Fi,null))}}))}),t.resultsFooterComponent&&f.createElement("section",{className:"DocSearch-HitsFooter"},f.createElement(t.resultsFooterComponent,{state:t.state})))}var aa=["translations"];function ht(){return ht=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ht.apply(this,arguments)}function ua(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<m.length;s++)u=m[s],c.indexOf(u)>=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.prop
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function yn(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ra(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<m.length;s++)u=m[s],c.indexOf(u)>=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=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:"<mark>",highlightPostTag:"</mark>",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.length<Object.keys(jt).length&&H({searchSuggestions:Object.keys(jt)}),H({nbHits:so});var ar={};return Y&&(ar={__autocomplete_indexName:n,__autocomplete_queryID:V.queryID,__autocomplete_algoliaCredentials:{appId:e,apiKey:r}}),Object.values(jt).map(function(Et,fo){return{sourceId:"hits".concat(fo),onSelect:function(z){var Oe=z.item,Ze=z.event;ge(Oe),at(Ze)||s()},getItemUrl:function(z){return z.item.url},getItems:function(){return Object.values(cn(Et,function(z){return z.hierarchy.lvl1},c)).map(m).map(function(z){return z.map(function(Oe){var Ze=null,ur=z.find(function(cr){return cr.type==="lvl1"&&cr.hierarchy.lvl1===Oe.hierarchy.lvl1});return Oe.type!=="lvl1"&&ur&&(Ze=ur),Rt(Rt({},Oe),{},{__docsearch_parent:Ze},ar)})}).flat()}}})})}})},[n,a,c,or,s,ye,oe,ge,ee,i,y,m,P,F,e,r]),co=be.getEnvironmentProps,lo=be.getRootProps,ir=be.refresh;return function(j){var k=j.getEnvironmentProps,T=j.panelElement,H=j.formElement,Z=j.inputElement;f.useEffect(function(){if(T&&H&&Z){var Y=k({panelElement:T,formElement:H,inputElement:Z}),A=Y.onTouchStart,V=Y.
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function bn(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function qa(t){var e,r,n=f.useRef(null),o=gn(f.useState(!1),2),i=o[0],a=o[1],c=gn(f.useState((t==null?void 0:t.initialQuery)||void 0),2),u=c[0],s=c[1],l=f.useCallback(function(){a(!0)},[a]),m=f.useCallback(function(){a(!1)},[a]);return function(p){var v=p.isOpen,d=p.onOpen,h=p.onClose,y=p.onInput,b=p.searchButtonRef;f.useEffect(function(){function _(S){var O;(S.keyCode===27&&v||((O=S.key)===null||O===void 0?void 0:O.toLowerCase())==="k"&&(S.metaKey||S.ctrlKey)||!function(g){var P=g.target,C=P.tagName;return P.isContentEditable||C==="INPUT"||C==="SELECT"||C==="TEXTAREA"}(S)&&S.key==="/"&&!v)&&(S.preventDefault(),v?h():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||d()),b&&b.current===document.activeElement&&y&&/[a-zA-Z0-9]/.test(String.fromCharCode(S.keyCode))&&y(S)}return window.addEventListener("keydown",_),function(){window.removeEventListener("keydown",_)}},[v,d,h,y,b])}({isOpen:i,onOpen:l,onClose:m,onInput:f.useCallback(function(p){a(!0),s(p.key)},[a,s]),searchButtonRef:n}),f.createElement(f.Fragment,null,f.createElement(Vo,{ref:n,translations:t==null||(e=t.translations)===null||e===void 0?void 0:e.button,onClick:l}),i&&Ln(f.createElement(La,Qt({},t,{initialScrollY:window.scrollY,initialQuery:u,translations:t==null||(r=t.translations)===null||r===void 0?void 0:r.modal,onClose:m})),document.body))}function Ma(t){Mn(f.createElement(qa,Lt({},t,{transformSearchClient:function(e){return e.addAlgoliaAgent("docsearch.js","3.6.0"),t.transformSearchClient?t.transformSearchClient(e):e}})),function(e){var r=arguments.length>1&&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};
|
||||
@@ -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<e.length;n++)e[n](...t)},Vs=(e,t,n,r=!1)=>{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<e.length;n++){const r=e[n],s=ie(r)?Co(r):yr(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(ie(e)||Z(e))return e}const bo=/;(?![^(]*\))/g,wo=/:([^]+)/,Eo=/\/\*[^]*?\*\//g;function Co(e){const t={};return e.replace(Eo,"").split(bo).forEach(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;n<e.length;n++){const r=_r(e[n]);r&&(t+=r+" ")}else if(Z(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const So="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",xo=hr(So);function Us(e){return!!e||e===""}const Ua=e=>ie(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<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0,this._active=!1}}}function Ao(e,t=we){t&&t.active&&t.effects.push(e)}function Ks(){return we}function Ro(e){we&&we.cleanups.push(e)}let ct;class vr{constructor(t,n,r,s){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=5,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,Ao(this,s)}get dirty(){if(this._dirtyLevel===2)return!1;if(this._dirtyLevel===3||this._dirtyLevel===4){this._dirtyLevel=1,et();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed){if(n.computed.effect._dirtyLevel===2)return Ve(),!0;if(Oo(n.computed),this._dirtyLevel>=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;t<e.deps.length;t++)ks(e.deps[t],e);e.deps.length=e._depsLength}}function ks(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}let ze=!0,nr=0;const Ws=[];function et(){Ws.push(ze),ze=!1}function Ve(){const e=Ws.pop();ze=e===void 0?!0:e}function br(){nr++}function wr(){for(nr--;!nr&&rr.length;)rr.shift()()}function qs(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&ks(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const rr=[];function Gs(e,t,n){br();for(const r of e.keys()){let s;if(!e.computed&&r.computed&&r._runnings>0&&(s??(s=e.get(r)===r._trackId))){r._dirtyLevel=2;continue}r._dirtyLevel<t&&(s??(s=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r.computed&&r._dirtyLevel===2&&(r._shouldSchedule=!0),r._dirtyLevel=t),r._shouldSchedule&&(s??(s=e.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==3&&(r._shouldSchedule=!1,r.scheduler&&rr.push(r.scheduler)))}wr()}const zs=(e,t)=>{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<o;i++)ve(r,"get",i+"");const s=r[t](...n);return s===-1||s===!1?r[t](...n.map(J)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{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)),Line truncated
|
||||
* @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<e.length;i++)s.push(xe(e[i],t,n,r));return s}}function Dt(e,t,n,r=!0){const s=t?t.vnode:null;if(t){let i=t.parent;const o=t.proxy,l=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const u=i.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,o,l)===!1)return}i=i.parent}const c=t.appContext.config.errorHandler;if(c){et(),Xe(c,null,10,[e,o,l]),Ve();return}}il(e,n,s,r)}function il(e,t,n,r=!0){console.error(e)}let Ft=!1,ir=!1;const de=[];let Pe=0;const _t=[];let We=null,it=0;const li=Promise.resolve();let Ar=null;function xn(e){const t=Ar||li;return e?t.then(this?e.bind(this):e):t}function ol(e){let t=Pe+1,n=de.length;for(;t<n;){const r=t+n>>>1,s=de[r],i=$t(s);i<e||i===e&&s.pre?t=r+1:n=r}return t}function Tn(e){(!de.length||!de.includes(e,Ft&&e.allowRecurse?Pe+1:Pe))&&(e.id==null?de.push(e):de.splice(ol(e.id),0,e),ci())}function ci(){!Ft&&!ir&&(ir=!0,Ar=li.then(ai))}function ll(e){const t=de.indexOf(e);t>Pe&&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<de.length;n++){const r=de[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;de.splice(n,1),n--,r()}}}function dn(e){if(_t.length){const t=[...new Set(_t)].sort((n,r)=>$t(n)-$t(r));if(_t.length=0,We){We.push(...t);return}for(We=t,it=0;it<We.length;it++){const n=We[it];n.active!==!1&&n()}We=null,it=0}}const $t=e=>e.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;Pe<de.length;Pe++){const t=de[Pe];t&&t.active!==!1&&Xe(t,null,14)}}finally{Pe=0,de.length=0,dn(),Ft=!1,Ar=null,(de.length||_t.length)&&ai()}}function ul(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||te;let s=n;const i=t.startsWith("update:"),o=i&&t.slice(7);if(o&&o in r){const d=`${o==="modelValue"?"model":o}Modifiers`,{number:h,trim:y}=r[d]||te;y&&(s=n.map(E=>ie(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;h<d.length;h++){const y=d[h];if(o[y]!==r[y]&&!An(u,y))return!0}}}else return(s||l)&&(!l||!l.$stable)?!0:r===o?!1:r?o?Xr(r,o,u):!0:!!o;return!1}function Xr(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(t[i]!==e[i]&&!An(n,i))return!0}return!1}function gl({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const fi="components";function ka(e,t){return hi(fi,e,!0,t)||e}const di=Symbol.for("v-ndc");function Wa(e){return ie(e)?hi(fi,e,!1)||e:e||di}function hi(e,t,n=!0,r=!1){const s=he||ue;if(s){const i=s.type;{const l=fc(i,!1);if(l&&(l===t||l===Ne(t)||l===wn(Ne(t))))return i}const o=Yr(s[e]||i[e],t)||Y
Line truncated
|
||||
* @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"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`: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<c&&h()},l+1),e.addEventListener(u,y)}function bc(e,t){const n=window.getComputedStyle(e),r=A=>(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.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>ys(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 i
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
const s="/assets/qrcode.b_bFVwtg.png";export{s as _};
|
||||
@@ -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):!1Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
const s="/assets/dashboard.BtVFv_j9.jpg",t="/assets/webssh.DHR7F3te.jpg";export{s as _,t as a};
|
||||
|
Before Width: | Height: | Size: 123 KiB |
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="l10n-本地化开发指南" tabindex="-1">l10n 本地化开发指南 <a class="header-anchor" href="#l10n-本地化开发指南" aria-label="Permalink to "l10n 本地化开发指南""></a></h1><p><strong>哪吒监控的 Dashboard 已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化</strong></p><h2 id="介绍" tabindex="-1">介绍 <a class="header-anchor" href="#介绍" aria-label="Permalink to "介绍""></a></h2><ol><li>你可以直接使用 <code>/resource/l10n/zh-CN.toml</code> 中已有的文本配置来替换新功能中的文本</li><li>如果新功能中有新增文本,请参考 <code>zh-CN.toml</code> 的配置文本,将新文本拉取到 <code>zh-CN.toml</code> 等其他语言的配置文件中,并添加翻译</li></ol><h2 id="新本地化文本的添加" tabindex="-1">新本地化文本的添加 <a class="header-anchor" href="#新本地化文本的添加" aria-label="Permalink to "新本地化文本的添加""></a></h2><ol><li>在 <code>/resource/l10n/</code> 中添加新的语言文本配置</li><li>在新的语言文本配置中拉取其他语言已有的文本配置</li><li>为新的语言文本配置添加翻译</li></ol>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="哪吒主题开发环境" tabindex="-1">哪吒主题开发环境 <a class="header-anchor" href="#哪吒主题开发环境" aria-label="Permalink to "哪吒主题开发环境""></a></h1><p>哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>请注意: 此开发环境仅支持 <code>dashboard v0.19.20</code> 及更新版本。</p></div><h2 id="使用说明" tabindex="-1">使用说明 <a class="header-anchor" href="#使用说明" aria-label="Permalink to "使用说明""></a></h2><ol><li>克隆<a href="https://github.com/nezhahq/skeleton-custom-theme" target="_blank" rel="noreferrer">此仓库</a>到本地</li><li>修改 <code>data/config.yaml</code> 中的 Oauth2 配置(回调连接可以填 <code>http://localhost</code>)</li><li>运行 <code>docker-compose up</code></li><li>开始开发</li><li>主题制作完成之后可以将 <code>theme-custom</code>(前台主题)、<code>static-custom</code>(前台主题静态文件) 和 <code>dashboard-custom</code>(后台主题) 放置到服务器上的 <code>/opt/nezha/dashboard/</code> 中(如使用 Docker 安装)</li></ol><h2 id="faq" tabindex="-1">FAQ <a class="header-anchor" href="#faq" aria-label="Permalink to "FAQ""></a></h2><ul><li>如果不能使用 <code>80</code> 端口,在 <code>docker-compose.yaml</code> 中修改配置。</li></ul>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="build-your-own-telegram-bot-to-query-server-information" tabindex="-1">Build your own Telegram bot to query server information <a class="header-anchor" href="#build-your-own-telegram-bot-to-query-server-information" aria-label="Permalink to "Build your own Telegram bot to query server information""></a></h1><p>Contributors:</p><ul><li><a href="https://github.com/spiritLHLS" target="_blank" rel="noreferrer">spiritLHLS</a></li><li><a href="https://github.com/Erope/" target="_blank" rel="noreferrer">Erope</a></li></ul><p><strong>Project</strong>: <a href="https://github.com/spiritLHLS/nezha_api_tgbot" target="_blank" rel="noreferrer">nezha_api_tgbot</a> (Chinese)</p><p>The bot can request server status information from the Dashboard through the API, and then send the information to the user.<br> You can build this bot to easily view the current status of a given server without opening the Dashboard.</p>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="use-siri-to-run-shortcut-to-check-server-status-in-ios-macos" tabindex="-1">Use Siri to run shortcut to check server status in iOS/MacOS <a class="header-anchor" href="#use-siri-to-run-shortcut-to-check-server-status-in-ios-macos" aria-label="Permalink to "Use Siri to run shortcut to check server status in iOS/MacOS""></a></h1><p>Current Version:V1.0 (Chinese)<br> Contributor:</p><ul><li>白歌 <a href="https://github.com/hhhkkk520" target="_blank" rel="noreferrer">hhhkkk520</a></li></ul><h2 id="get-shortcut-command" tabindex="-1">Get shortcut command <a class="header-anchor" href="#get-shortcut-command" aria-label="Permalink to "Get shortcut command""></a></h2><p>Scan the following QR code with your iPhone or iPad to get the shortcut<br><br><img src="'+e+'" alt="coode"><br><br><br> MacOS users please visit <a href="https://www.icloud.com/shortcuts/312005bf5ffd4387ac92a84056db9f09" target="_blank" rel="noreferrer">here</a> to get the shortcut</p><h2 id="how-to-use" tabindex="-1">How to use <a class="header-anchor" href="#how-to-use" aria-label="Permalink to "How to use""></a></h2><ul><li>After getting the shortcut, open and edit the shortcut</li><li>Fill in <code>Dashboard URL</code>, <code>API Token</code>, <code>Server ID</code> in the three text boxes</li><li>Save the edit and test run, if you can get the result, the setting is correct.</li><li>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.</li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>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.</p></div>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="build-your-own-server-status-query-telegram-bot" tabindex="-1">Build your own server status query Telegram bot <a class="header-anchor" href="#build-your-own-server-status-query-telegram-bot" aria-label="Permalink to "Build your own server status query Telegram bot""></a></h1><p>Contributor:</p><ul><li><a href="https://github.com/tech-fever" target="_blank" rel="noreferrer">tech-fever</a></li></ul><p>GitHub project: <a href="https://github.com/tech-fever/nezha_telegram_bot" target="_blank" rel="noreferrer">nezha_telegram_bot</a>(English is already supported)</p><h2 id="features" tabindex="-1">Features <a class="header-anchor" href="#features" aria-label="Permalink to "Features""></a></h2><ul><li>[x] Support Chinese/English multi-language switch</li><li>[x] Support tag statistics (CPU, disk, memory, upstream and downstream speed, traffic statistics, etc.)</li><li>[x] Support real-time refresh of single server data</li><li>[x] Support keyboard interactive query</li><li>[x] Support query by command</li><li>[x] Support adding bot to group, privacy protection of bot replies in group chat</li><li>[x] Support bot messages automatic deletion in group chat within 20 seconds</li><li>[x] Support docker deployment</li></ul><h2 id="commands-list" tabindex="-1">Commands list <a class="header-anchor" href="#commands-list" aria-label="Permalink to "Commands list""></a></h2><table tabindex="0"><thead><tr><th>Command</th><th>Description</th><th>Private chat only</th></tr></thead><tbody><tr><td>start</td><td>Getting started with the keyboard main menu</td><td>✔️</td></tr><tr><td>help</td><td>help message</td><td>❌</td></tr><tr><td>add</td><td>Add Nezha monitoring url link and token</td><td>✔️</td></tr><tr><td>url</td><td>Add Nezha monitoring url link</td><td>✔️</td></tr><tr><td>token</td><td>Add Nezha monitoring token</td><td>✔️</td></tr><tr><td>info</td><td>Get saved Nezha monitoring url link and token</td><td>✔️</td></tr><tr><td>delete</td><td>Delete saved Nezha monitoring url link and token</td><td>✔️</td></tr><tr><td>id</td><td>Add an integer id after the command to query the information of a single server (refresh button only available in private chat)</td><td>❌</td></tr><tr><td>all</td><td>Query statistics for all servers</td><td>❌</td></tr><tr><td>search</td><td>Search for keywords in server names (multiple keywords supported, split by spaces)</td><td>❌</td></tr></tbody></table>',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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="nezha-server-over-argo-tunnel" tabindex="-1">Nezha server over Argo tunnel <a class="header-anchor" href="#nezha-server-over-argo-tunnel" aria-label="Permalink to "Nezha server over Argo tunnel""></a></h1><p>Contributors:</p><ul><li><a href="https://github.com/fscarmen2" target="_blank" rel="noreferrer">fscarmen</a></li></ul><p>GitHub project: <a href="https://github.com/fscarmen2/Argo-Nezha-Service-Container" target="_blank" rel="noreferrer">Argo-Nezha-Service-Container</a></p><hr><h2 id="catalog" tabindex="-1">Catalog <a class="header-anchor" href="#catalog" aria-label="Permalink to "Catalog""></a></h2><ul><li><a href="./case5.html#project-features">Project Features</a></li><li><a href="./case5.html#How-to-get-Argo-authentication-json-or-token">How to get Argo authentication: json or token</a></li><li><a href="./case5.html#prepare-variables-to-be-used">Variables to be used</a></li><li><a href="./case5.html#paas-deployment-example">PaaS Deployment Example</a></li><li><a href="./case5.html#vps-deployment-method-1-----docker">VPS Deployment Method 1 --- docker</a></li><li><a href="./case5.html#vps-deployment-method-2-----hosts">VPS Deployment Method 2 --- hosts</a></li><li><a href="./case5.html#client-access">Client Access</a></li><li><a href="./case5.html#ssh-access">SSH Access</a></li><li><a href="./case5.html#manual-backup-data">Manual Backup data</a></li><li><a href="./case5.html#automatically-restore-backups">Auto Restore Backup</a></li><li><a href="./case5.html#manually-restore-the-backup">Manual Restore Backup</a></li><li><a href="./case5.html#migrating-data">Migrating data</a></li><li><a href="./case5.html#main-catalog-files-and-descriptions">Main Directory Files and Descriptions</a></li><li><a href="./case5.html#acknowledgements-for-articles-and-projects-by">Acknowledgment of articles and projects by the following authors</a></li><li><a href="./case5.html#disclaimer">Disclaimer</a></li></ul><hr><h2 id="project-features" tabindex="-1">Project Features. <a class="header-anchor" href="#project-features" aria-label="Permalink to "Project Features.""></a></h2><ul><li>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.</li><li>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.</li><li>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!</li><li>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).</li><li>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</li><li>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.</li><li>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.</li><li>Manual/automatic restore backup --- check the content of online restore file once a minute, and restore immediately when there is any update.</li><li>Default built-in local probes --- can easily monitor their own server information</li><li>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.</li></ul><img width="1609" alt="image" src="https://github.com/fscarmen2/Argo-Nezha-Service-Container/assets/92626977/4893c3cd-5055-468f-8138-6c5460bdd1e4"><h2 id="prepare-variabl
Line truncated
|
||||
<span class="line"><span> --name nezha_dashboard \\</span></span>
|
||||
<span class="line"><span> --pull always \\</span></span>
|
||||
<span class="line"><span> --restart always \\</span></span>
|
||||
<span class="line"><span> -e GH_USER=<fill in github username> \\</span></span>
|
||||
<span class="line"><span> -e GH_EMAIL=<fill in github email> \\</span></span>
|
||||
<span class="line"><span> -e GH_PAT=<fill in the obtained> \\</span></span>
|
||||
<span class="line"><span> -e GH_REPO=<fill in customized> \\</span></span>
|
||||
<span class="line"><span> -e GH_CLIENTID=<fill in acquired> \\</span></span>
|
||||
<span class="line"><span> -e GH_CLIENTSECRET=<fill in acquired> \\</span></span>
|
||||
<span class="line"><span> -e ARGO_AUTH='<Fill in the fetched Argo json or token>' \\</span></span>
|
||||
<span class="line"><span> -e ARGO_DOMAIN=<fill in customized> \\</span></span>
|
||||
<span class="line"><span> -e GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank> \\</span></span>
|
||||
<span class="line"><span> fscarmen/argo-nezha</span></span></code></pre></div><h3 id="docker-compose-deployment" tabindex="-1">docker-compose deployment <a class="header-anchor" href="#docker-compose-deployment" aria-label="Permalink to "docker-compose deployment""></a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>version: '3.8'</span></span>
|
||||
<span class="line"><span>services.</span></span>
|
||||
<span class="line"><span> argo-nezha.</span></span>
|
||||
<span class="line"><span> image: fscarmen/argo-nezha</span></span>
|
||||
<span class="line"><span> --pull always</span></span>
|
||||
<span class="line"><span> container_name: nezha_dashboard</span></span>
|
||||
<span class="line"><span> restart: always</span></span>
|
||||
<span class="line"><span> environment:</span></span>
|
||||
<span class="line"><span> - GH_USER=<fill in github username></span></span>
|
||||
<span class="line"><span> - GH_EMAIL=<fill in your github email></span></span>
|
||||
<span class="line"><span> - GH_PAT=<<fill in obtained></span></span>
|
||||
<span class="line"><span> - GH_REPO=<fill in customized></span></span>
|
||||
<span class="line"><span> - GH_CLIENTID=<fill in obtained></span></span>
|
||||
<span class="line"><span> - GH_CLIENTSECRET=<fill in fetched></span></span>
|
||||
<span class="line"><span> - ARGO_AUTH='<Fill in the fetched Argo json or token>'</span></span>
|
||||
<span class="line"><span> - ARGO_DOMAIN=<fill in customized></span></span>
|
||||
<span class="line"><span> - GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank></span></span></code></pre></div><h2 id="vps-deployment-method-2-hosts" tabindex="-1">VPS Deployment Method 2 --- hosts <a class="header-anchor" href="#vps-deployment-method-2-hosts" aria-label="Permalink to "VPS Deployment Method 2 --- hosts""></a></h2><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)</span></span></code></pre></div><h2 id="client-access" tabindex="-1">Client Access <a class="header-anchor" href="#client-access" aria-label="Permalink to "Client Access""></a></h2><p>Transfer via gRPC, no additional configuration required. Use the installation method given in the panel, for example</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>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</span></span></code></pre></div><h2 id="ssh-access" tabindex="-1">SSH access <a class="header-anchor" href="#ssh-access" aria-label="Permalink to "SSH access""></a></h2><ul><li>Take macOS + WindTerm as an example, and other SSH tools depending on the one used, combined with the official documentation: <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/use_cases/ssh" target="_blank" rel="noreferrer">https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/use_cases/ssh</a> /#2-connect-as-a-user</li><li>Official cloudflared download: <a href="https://github.com/cloudflare/cloudflared/releases" target="_blank" rel="noreferrer">https://github.com/cloudflare/cloudflared/releases</a></li><li>The following are examples of input commands. SSH user: root, SSH password:<GH_CLIENTSECRET></li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span><filepath>/cloudflared access ssh --hostname ssh.seals.nom.za/<GH_CLIENTID></span></span></code></pre></div><img width="1189" alt="image" src="https://github.com/fscarmen2/Argo-Nezha-Service-Container/assets/92626977/0aeb3939-51c7-47ac-a7fd-25a8a01d3df5"><img width="840" alt="image" src="https://github.com/fscarmen2/Argo-Nezha-Service-Container/assets/92626977/16961ade-aafc-4132-92a1-aa218e0fead9"><img width="1201" alt="image" src="https://github.com/fscarmen2/Argo-Nezha-Service-Container/assets/92626977/3146b2e2-f988-487f-ab63-00218eb4d570"><h2 id="manually-backing-up-your-data" tabindex="-1">Manually backing up your data <a class="header-anchor" href="#manually-backing-up-your-data" aria-label="Permalink to "Manually backing up your data""></a></h2><p>Method 1: Change the contents of the <code>README.md</code> file in the Github backup repository to <code>backup</code></p><img width="970" alt="image" src="https://github.com/fscarmen2/Argo-Nezha-Service-Container/assets/92626977/c5b6bc4b-e69c-48ce-97d4- 3f9be88515f3"><p>Method 2: After ssh, run <code>/dashboard/backup.sh</code> for container version; <code>/opt/nezha/dashboard/backup.sh</code> for VPS host version.</p><h2 id="automatically-restore-backups" tabindex="-1">Automatically restore backups <a class="header-anchor" href="#automatically-restore-backups" aria-label="Permalink to "Automatically restore backups""></a></h2><ul><li>Change the name of the file to be restored to <code>README.md</code> in the github backup repository, the timer service will check for updates every minute and record the last synchronized filename in the local <code>/dbfile</code> to compare with the online file content.</li></ul><p>The following is an example of restoring a file with the name <code>dashboard-2023-04-23-13:08:37.tar.gz</code>.</p><p>! <a href="https://user-images.githubusercontent.com/92626977/233822466-c24e94f6-ba8a-47c9-b77d-aa62a56cc929.png" target="_blank" rel="noreferrer">image</a></p><h2 id="manually-restore-the-backup" tabindex="-1">Manually restore the backup <a class="header-anchor" href="#manually-restore-the-backup" aria-label="Permalink to "Manually restore the backup""></a></h2><ul><li>ssh into the container and run, tar.gz filename from the github backup repository, format: dashboard-2023-04-22-21:42:10.tar.gz</li></ul><div class="language- vp-adaptive-theme"><button title="Copy CoLine truncated
|
||||
<span class="line"><span>|-- app # Nezha panel main program</span></span>
|
||||
<span class="line"><span>|-- argo.json # Argo tunnel json file, which records information about using the tunnel.</span></span>
|
||||
<span class="line"><span>|-- argo.yml # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains.</span></span>
|
||||
<span class="line"><span>|-- backup.sh # Backup data scripts</span></span>
|
||||
<span class="line"><span>|-- restore.sh # Restore backup scripts</span></span>
|
||||
<span class="line"><span>|-- dbfile # Record the name of the latest restore or backup file</span></span>
|
||||
<span class="line"><span>|-- resource # Folders of information on panel themes, languages, flags, etc.</span></span>
|
||||
<span class="line"><span>|-- data</span></span>
|
||||
<span class="line"><span>| |-- config.yaml # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not.</span></span>
|
||||
<span class="line"><span>| \`-- sqlite.db # SQLite database file that records all severs and cron settings for the panel.</span></span>
|
||||
<span class="line"><span>|-- entrypoint.sh # The main script, which is executed after the container is run.</span></span>
|
||||
<span class="line"><span>|-- nezha.csr # SSL/TLS certificate signing request</span></span>
|
||||
<span class="line"><span>|-- nezha.key # Private key information for SSL/TLS certificate.</span></span>
|
||||
<span class="line"><span>|-- nezha.pem # SSL/TLS certificate file.</span></span>
|
||||
<span class="line"><span>|-- cloudflared # Cloudflare Argo tunnel main program.</span></span>
|
||||
<span class="line"><span>|-- grpcwebproxy # gRPC reverse proxy main program.</span></span>
|
||||
<span class="line"><span>\`-- nezha-agent # Nezha client, used to monitor the localhost.</span></span></code></pre></div><h2 id="acknowledgements-for-articles-and-projects-by" tabindex="-1">Acknowledgements for articles and projects by <a class="header-anchor" href="#acknowledgements-for-articles-and-projects-by" aria-label="Permalink to "Acknowledgements for articles and projects by""></a></h2><ul><li>Robin, an enthusiastic sunrise crowd, for discussing the relationship between Nezha's server and client, which led to the birth of this project.</li><li>Nezha website: <a href="https://nezha.wiki/" target="_blank" rel="noreferrer">https://nezha.wiki/</a> , TG Group: <a href="https://t.me/nezhamonitoring" target="_blank" rel="noreferrer">https://t.me/nezhamonitoring</a></li><li>Common Poverty International Old Chinese Medicine: <a href="http://solitud.es/" target="_blank" rel="noreferrer">http://solitud.es/</a></li><li>Akkia's Blog: <a href="https://blog.akkia.moe/" target="_blank" rel="noreferrer">https://blog.akkia.moe/</a></li><li>Ayaka's Blog: <a href="https://blog.xn--pn1aul.org/" target="_blank" rel="noreferrer">https://blog.萝莉.org/</a></li><li>HiFeng's Blog: <a href="https://www.hicairo.com/" target="_blank" rel="noreferrer">https://www.hicairo.com/</a></li><li>Intranet Penetration with Cloudflare Tunnel: <a href="https://blog.outv.im/2021/cloudflared-tunnel/" target="_blank" rel="noreferrer">https://blog.outv.im/2021/cloudflared-tunnel/</a></li><li>How to add your own Runner host to GitHub Actions: <a href="https://cloud.tencent.com/developer/article/1756690" target="_blank" rel="noreferrer">https://cloud.tencent.com/developer/article/1756690</a></li><li>github self-hosted runner addition and startup: <a href="https://blog.csdn.net/sinat_32188225/article/details/125978331" target="_blank" rel="noreferrer">https://blog.csdn.net/sinat_32188225/article/details/125978331</a></li><li>How to export a file from a Docker image: <a href="https://www.pkslow.com/archives/extract-files-from-docker-image" target="_blank" rel="noreferrer">https://www.pkslow.com/archives/extract-files-from-docker-image</a></li><li>grpcwebproxy: <a href="https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy" target="_blank" rel="noreferrer">https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy</a></li><li>Applexad's binary of Nezha's officially dashboard: <a href="https://github.com/applexad/nezha-binary-build" target="_blank" rel="noreferrer">https://github.com/applexad/nezha-binary-build</a></li></ul><h2 id="disclaimer" tabindex="-1">Disclaimer <a class="header-anchor" href="#disclaimer" aria-label="Permalink to "Disclaimer""></a></h2><ul><li>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.</li><li>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.</li></ul>`,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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="nezha-mobile-an-ios-client-for-nezha-dashboard" tabindex="-1">Nezha Mobile - An iOS Client For Nezha Dashboard <a class="header-anchor" href="#nezha-mobile-an-ios-client-for-nezha-dashboard" aria-label="Permalink to "Nezha Mobile - An iOS Client For Nezha Dashboard""></a></h1><p>Contributor:</p><ul><li><a href="https://github.com/hiDandelion" target="_blank" rel="noreferrer">hiDandelion</a></li></ul><h2 id="contribute-to-the-project" tabindex="-1">Contribute to the project <a class="header-anchor" href="#contribute-to-the-project" aria-label="Permalink to "Contribute to the project""></a></h2><p><a href="https://github.com/hiDandelion/Nezha-Mobile" target="_blank" rel="noreferrer">Project Link</a></p><div class="info custom-block"><p class="custom-block-title">INFO</p><p>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.</p></div><h2 id="download-on-the-app-store" tabindex="-1">Download on the App Store <a class="header-anchor" href="#download-on-the-app-store" aria-label="Permalink to "Download on the App Store""></a></h2><p><a href="https://apps.apple.com/us/app/nezha-mobile/id6596729064" target="_blank" rel="noreferrer"><img src="'+r+'" alt="Download_on_the_App_Store_Badge_US-UK_RGB_blk_092917"></a></p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Due to <strong>ICP Filing Policy</strong>, Nezha Mobile is not available in <strong>China mainland</strong>.</p></div><h2 id="testflight-testing-program" tabindex="-1">TestFlight Testing Program <a class="header-anchor" href="#testflight-testing-program" aria-label="Permalink to "TestFlight Testing Program""></a></h2><p><a href="https://testflight.apple.com/join/C6vTc2dN" target="_blank" rel="noreferrer">Join TestFlight Testing</a></p><h2 id="instructions" tabindex="-1">Instructions <a class="header-anchor" href="#instructions" aria-label="Permalink to "Instructions""></a></h2><ul><li>Enter your Dashboard link like <code>server.hidandelion.com</code> 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. <img src="'+i+'" alt="step1" width="200"></li></ul><h2 id="configure-widget-optional" tabindex="-1">Configure Widget(Optional) <a class="header-anchor" href="#configure-widget-optional" aria-label="Permalink to "Configure Widget(Optional)""></a></h2><ul><li><p>Add a widget on your Springboard. Long-tap the widget and then tap <strong>Edit Widget</strong>. <img src="'+n+'" alt="step2" width="200"></p></li><li><p>Choose a server you want to monitor on the next view. You can choose different servers for each widget. <img src="'+s+'" alt="step3" width="200"></p></li></ul>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="broker-for-nezha-advancing-on-more-platforms" tabindex="-1">Broker for Nezha - Advancing on more platforms <a class="header-anchor" href="#broker-for-nezha-advancing-on-more-platforms" aria-label="Permalink to "Broker for Nezha - Advancing on more platforms""></a></h1><p>Contributor:</p><ul><li><a href="https://codeberg.org/uubulb" target="_blank" rel="noreferrer">uubulb</a></li></ul><p>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.</p><p>Project link: <a href="https://codeberg.org/uubulb/broker" target="_blank" rel="noreferrer">https://codeberg.org/uubulb/broker</a></p><p>Online Documentation: <a href="https://broker.kuzu.uk/" target="_blank" rel="noreferrer">Broker for Nezha</a></p><h2 id="difference-from-nezha-agent" tabindex="-1">Difference from Nezha Agent <a class="header-anchor" href="#difference-from-nezha-agent" aria-label="Permalink to "Difference from Nezha Agent""></a></h2><ul><li>Utilizes external data sources to report to <strong>Nezha Dashboard</strong>.</li><li>Supports configuring multiple sources and connecting to multiple Dashboards.</li><li>Only has limited task support. For details, view the project README.</li></ul><p>Broker for Nezha needs to be used with specific data collection software. Currently, it provides two data collection methods:</p><ol><li>HTTP (HTTP/1.1) - Active polling</li><li>TCP - Passive collection (recommended to avoid creating redundant connections)</li></ol><p>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.</p><h2 id="writing-a-data-collector" tabindex="-1">Writing a Data Collector <a class="header-anchor" href="#writing-a-data-collector" aria-label="Permalink to "Writing a Data Collector""></a></h2><p>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: <a href="https://broker.kuzu.uk/en/configuration/type/" target="_blank" rel="noreferrer">Data types</a></p><h2 id="examples" tabindex="-1">Examples <a class="header-anchor" href="#examples" aria-label="Permalink to "Examples""></a></h2><figure><img src="'+e+'" alt="Dashboard"><figcaption style="font-size:0.9em;color:gray;text-align:center;"> Dashboard </figcaption></figure><br><figure><img src="'+r+'" alt="WebSSH"><figcaption style="font-size:0.9em;color:gray;text-align:center;"> WebSSH </figcaption></figure>',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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="localization" tabindex="-1">Localization <a class="header-anchor" href="#localization" aria-label="Permalink to "Localization""></a></h1><p><strong>Nezha Monitoring's Dashboard has added localization to support multiple languages, and you can follow these steps to support localization when developing new features</strong></p><h2 id="introduction" tabindex="-1">Introduction <a class="header-anchor" href="#introduction" aria-label="Permalink to "Introduction""></a></h2><ol><li>You can directly use the text configuration already available in <code>/resource/l10n/en-US.toml</code> to replace the text in the new feature.</li><li>If there is new text in the new feature, please refer to the configuration text in <code>en-US.toml</code>, pull the new text into the configuration files of other languages such as <code>en-US.toml</code>, and add translations.</li></ol><h2 id="adding-a-new-localized-text-file" tabindex="-1">Adding a new localized text file <a class="header-anchor" href="#adding-a-new-localized-text-file" aria-label="Permalink to "Adding a new localized text file""></a></h2><ol><li>Add a new language text configuration in <code>/resource/l10n/</code>.</li><li>Pull existing text configurations from other languages in the new language text configuration.</li><li>Add translations for the new language text configuration.</li></ol>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="nezha-theme-development-environment" tabindex="-1">Nezha Theme Development Environment <a class="header-anchor" href="#nezha-theme-development-environment" aria-label="Permalink to "Nezha Theme Development Environment""></a></h1><p>Nezha Monitoring provides a theme development environment that you can use to create new Nezha Monitoring themes</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Please note: This development environment only supports <code>dashboard v0.19.20</code> and newer versions.</p></div><h2 id="how-to-use" tabindex="-1">How to use <a class="header-anchor" href="#how-to-use" aria-label="Permalink to "How to use""></a></h2><ol><li>Clone <a href="https://github.com/nezhahq/skeleton-custom-theme" target="_blank" rel="noreferrer">this repository</a> to local</li><li>Modify the Oauth2 configuration in <code>data/config.yaml</code>(The callback connection can be filled with <code>http://localhost</code>)</li><li>Run <code>docker-compose up</code></li><li>Start development</li><li>After completing the theme creation, you can place <code>theme-custom</code> (frontend theme), <code>static-custom</code> (frontend theme static files), and <code>dashboard-custom</code> (backend theme) into the <code>/opt/nezha/dashboard/</code> directory on the server (if installed using Docker).</li></ol><h2 id="faq" tabindex="-1">FAQ <a class="header-anchor" href="#faq" aria-label="Permalink to "FAQ""></a></h2><ul><li>If you can't use port <code>80</code>, change the configuration in <code>docker-compose.yaml</code>.</li></ul>',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};
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="install-agent" tabindex="-1">Install Agent <a class="header-anchor" href="#install-agent" aria-label="Permalink to "Install Agent""></a></h1><p><strong>This document will introduce how to install the Agent on the monitored server and connect it to the Dashboard.</strong></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>The repository for Agent binaries can be found at: <a href="https://github.com/nezhahq/agent/releases" target="_blank" rel="noreferrer">https://github.com/nezhahq/agent/releases</a></p></div><h2 id="one-click-installation-of-the-agent" tabindex="-1">One-Click Installation of the Agent <a class="header-anchor" href="#one-click-installation-of-the-agent" aria-label="Permalink to "One-Click Installation of the Agent""></a></h2><p>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.</p><h3 id="preparation" tabindex="-1">Preparation <a class="header-anchor" href="#preparation" aria-label="Permalink to "Preparation""></a></h3><p>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”.<br> 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".</p><h3 id="one-click-installation-on-linux" tabindex="-1">One-Click Installation on Linux <a class="header-anchor" href="#one-click-installation-on-linux" aria-label="Permalink to "One-Click Installation on Linux""></a></h3><ol><li>First, add a server in the admin panel.</li><li>Click the green Linux icon button next to the newly added server and copy the one-click installation command.</li><li>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.</li></ol><h3 id="one-click-installation-on-macos" tabindex="-1">One-Click Installation on macOS <a class="header-anchor" href="#one-click-installation-on-macos" aria-label="Permalink to "One-Click Installation on macOS""></a></h3><ol><li>First, add a server in the admin panel.</li><li>Click the green Apple icon button next to the newly added server and copy the one-click installation command.</li><li>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.</li></ol><h3 id="one-click-installation-on-windows" tabindex="-1">One-Click Installation on Windows <a class="header-anchor" href="#one-click-installation-on-windows" aria-label="Permalink to "One-Click Installation on Windows""></a></h3><ol><li>First, add a server in the admin panel.</li><li>Click the green Windows icon button next to the newly added server and copy the one-click installation command.</li><li>Go to the Windows server, run PowerShell, and execute the copied installation command in PowerShell.</li><li>If you encounter a prompt to "change execution policy," choose Y.</li><li>Wait for the installation to complete, then check if the server is online in the Dashboard home page.</li></ol><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>If you encounter errors when running the one-click installation command in PowerShell, try the <strong>Manual Installation of the Agent on Windows</strong> below.</p></div><h2 id="other-ways-to-install-the-agent" tabindex="-1">Other Ways to Install the Agent <a class="header-anchor" href="#other-ways-to-install-the-agent" aria-label="Permalink to "Other Ways to Install the Agent""></a></h2><h3 id="installing-the-agent-on-linux-support-most-distros" tabindex="-1">Installing the Agent on Linux (Support most distros) <a class="header-anchor" href="#installing-the-agent-on-linux-support-most-distros" aria-label="Permalink to "Installing the Agent on Linux (Support most distros)""></a></h3><details><summary>Click to expand/collapse</summary><ol><li>First, add a server in the admin panel.</li><li>Run the script on the monitored server:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#0
Line truncated
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">exec</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> 2>&1</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">exec</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /opt/nezha/agent/nezha-agent</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -s</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> server_name:port</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> password</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> 2>&1</span></span></code></pre></div><p>You can add other arguments here as well.</p><ol start="3"><li>Create logging service file <code>/etc/sv/nezha-agent/log/run</code>:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#!/bin/sh</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">exec</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> vlogger</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -t</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> daemon</span></span></code></pre></div><ol start="4"><li>Enable the service:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ln</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -s</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /etc/sv/nezha-agent/</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /var/service</span></span></code></pre></div><p>Use the <code>sv</code> command to manage the service.</p><p>How to view logs:</p><ol><li>Install <code>socklog</code> and enable it:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xbps-install</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -S</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> socklog-void</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ln</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -s</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /etc/sv/socklog-unix</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /var/service</span></span></code></pre></div><ol start="2"><li>Run <code>svlogtail</code>:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sudo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> svlogtail</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> grep</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span></span></code></pre></div></details><h3 id="manual-installation-of-the-agent-on-windows" tabindex="-1">Manual Installation of the Agent on Windows <a class="header-anchor" href="#manual-installation-of-the-agent-on-windows" aria-label="Permalink to "Manual Installation of the Agent on Windows""></a></h3><ul><li>Refer to the community article:<br><a href="https://nyko.me/2020/12/13/nezha-windows-client.html" target="_blank" rel="noreferrer">Nezha - Windows Client Installation</a> (Chinese)</li></ul><h3 id="installing-the-agent-on-synology-dsm" tabindex="-1">Installing the Agent on Synology DSM <a class="header-anchor" href="#installing-the-agent-on-synology-dsm" aria-label="Permalink to "Installing the Agent on Synology DSM""></a></h3><details><summary>Click to expand/collapse</summary><ul><li><p>Refer to community articles:<br><a href="https://blog.mitsea.com/3929551d08bd4bb0a8baa453e2d92b0c/" target="_blank" rel="noreferrer">Installing Nezha Monitoring Agent on Synology DSM 7.x</a> (Chinese)<br><a href="https://wl.gta5pdx.cn/archives/546/" target="_blank" rel="noreferrer">Nezha - Synology Client (Agent) Installation Tutorial</a> (Chinese)</p></li><li><p>Using Systemd <em>for DSM7 only</em>:</p></li></ul><div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Agent path</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">EXEC</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"/PATH/TO/nezha-agent"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Log path</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">LOG</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">EXEC</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}.log"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Additional execution parameters, can be empty</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ARGS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Nezha server gRPC address</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SERVER</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"HOST_OR_IP:gRPC_PORT"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># The secret key obtained in the previous step</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SECRET</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"APP_SECRET"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># User running the service, *strongly recommended to use non-root user*</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">RUN_USER</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"nezha"</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Write to systemd service file</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <<</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> EOF</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ></span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /usr/lib/systemd/system/nezha.service</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">[Unit]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Description=Nezha Agent Service</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">After=network.target</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">[Service]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Type=simple</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ExecStart=/bin/nohup \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">EXEC</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">} \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ARGS</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">} -s \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SERVER</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">} -p \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SECRET</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">} &>> \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">LOG</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">} &</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">ExecStop=ps -fe |grep nezha-agent|awk '{print </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">2}'|xargs kill</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">User=\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">RUN_USER</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Restart=on-abort</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">[Install]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">WantedBy=multi-user.target</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">EOF</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Reload service</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">systemctl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> daemon-reload</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Start service</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">systemctl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> start</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Enable service startup</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">systemctl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> enable</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha</span></span></code></pre></div><p>‼️ Modify the corresponding information before running the above commands with the <code>root</code> account to complete the installation.</p></details><h3 id="installing-the-agent-on-macos-using-homebrew" tabindex="-1">Installing the Agent on macOS Using Homebrew <a class="header-anchor" href="#installing-the-agent-on-macos-using-homebrew" aria-label="Permalink to "Installing the Agent on macOS Using Homebrew""></a></h3><details><summary>Click to expand/collapse</summary><p><em><strong>This section is adapted from <a href="https://blog.mre.red/archives/install_nezha_monitoring_agent_service_with_homebrew" target="_blank" rel="noreferrer">🐿️松鼠收集🌰</a> with the author's permission</strong></em></p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>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.</p></div><ol><li>Add environment variables:</li></ol><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'export HOMEBREW_NEZHA_AGENT_PASSWORD="Communication key, obtained from the service page"'</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> >></span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ~/.zshrc</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'export HOMEBREW_NEZHA_AGENT_SERVER="Your server and port, format your.domain:5555 "'</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> >></span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ~/.zshrc</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">source</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ~/.zshrc</span></span></code></pre></div><ol start="2"><li>Install Nezha Agent:</li></ol><div class="danger custom-block"><p class="custom-block-title">DANGER</p><p>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!</p></div><p>Since it has not yet been submitted to the Homebrew Core official library, it is temporarily placed in the <a href="https://github.com/Brewforge/homebrew-chinese" target="_blank" rel="noreferrer">third-party Homebrew repository</a> maintained by the author of the blog:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> brewforge/chinese/nezha-agent</span></span></code></pre></div><ol start="3"><li>Start Nezha Agent service through Homebrew:</li></ol><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> services</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> start</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span></span></code></pre></div><ol start="4"><li>Check the service status:</li></ol><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> services</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> info</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span></span></code></pre></div><ol start="5"><li>Stop the service:</li></ol><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> services</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> stop</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span></span></code></pre></div><ol start="6"><li>Uninstall Nezha Agent:</li></ol><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span></span></code></pre></div><ol start="7"><li>If there is an error, first check the environment variables:</li></ol><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $HOMEBREW_NEZHA_AGENT_PASSWORD</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $HOMEBREW_NEZHA_AGENT_SERVER</span></span></code></pre></div><ol start="8"><li>If the environment variables are configured correctly, try reinstalling:</li></ol><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> services</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> stop</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> reinstall</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">brew</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> services</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> start</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span></span></code></pre></div><ol start="9"><li>If the issue persists, submit a issue to the <a href="https://github.com/Brewforge/homebrew-chinese" target="_blank" rel="noreferrer">third-party Homebrew repository</a>.</li></ol></details><h3 id="installing-the-agent-on-openwrt" tabindex="-1">Installing the Agent on OpenWRT <a class="header-anchor" href="#installing-the-agent-on-openwrt" aria-label="Permalink to "Installing the Agent on OpenWRT""></a></h3><details><summary>Click to expand/collapse</summary><p><strong>How to solve installation difficulties and issues in one step?</strong></p><ul><li>Refer to the project:<br><a href="https://github.com/dysf888/NZ-OpenWrt" target="_blank" rel="noreferrer">NZ-OpenWrt</a></li></ul><p><strong>How to enable autostart on older OpenWRT/LEDE?</strong></p><ul><li>Refer to the project:<br><a href="https://github.com/Erope/openwrt_nezha" target="_blank" rel="noreferrer">Nezha Monitoring for OpenWRT</a></li></ul><p><strong>How to enable autostart on newer OpenWRT? Contributor: @艾斯德斯</strong></p><ul><li>First, download the corresponding binary from the release, unzip the zip package, and place it in <code>/root</code>.</li><li>Run <code>chmod +x /root/nezha-agent</code> to grant execution permission, then create <code>/etc/init.d/nezha-service</code>:</li></ul><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#!/bin/sh /etc/rc.common</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">START</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">99</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">USE_PROCD</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">1</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">start_service</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> procd_open_instance</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> procd_set_param</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> command</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /root/nezha-agent</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -s</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Dashboard</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> communication</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> domain:port</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Key</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> procd_set_param</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> respawn</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> procd_close_instance</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">stop_service</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> killall</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha-agent</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">restart</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> stop</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sleep</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> start</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><ul><li>Run <code>chmod +x /etc/init.d/nezha-service</code> to grant execution permission.</li><li>Start the service: <code>/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start</code></li></ul></details><h2 id="does-the-agent-have-a-docker-image" tabindex="-1">Does the Agent Have a Docker Image? <a class="header-anchor" href="#does-the-agent-have-a-docker-image" aria-label="Permalink to "Does the Agent Have a Docker Image?""></a></h2><p><strong>The Agent does not currently have a Docker image.</strong><br> 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.<br> 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.</p>`,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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="frequently-asked-questions-about-the-agent" tabindex="-1">Frequently Asked Questions about the Agent <a class="header-anchor" href="#frequently-asked-questions-about-the-agent" aria-label="Permalink to "Frequently Asked Questions about the Agent""></a></h1><h2 id="the-ip-displayed-in-the-admin-panel-is-different-from-the-actual-agent-ip" tabindex="-1">The IP Displayed in the Admin Panel is Different from the Actual Agent IP? <a class="header-anchor" href="#the-ip-displayed-in-the-admin-panel-is-different-from-the-actual-agent-ip" aria-label="Permalink to "The IP Displayed in the Admin Panel is Different from the Actual Agent IP?""></a></h2><p>Please refer to <a href="/en_US/guide/dashboardq.html#why-is-the-ip-displayed-in-the-admin-panel-different-from-the-actual-agent-ip">Dashboard Related - Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?</a>. This will not be repeated here.</p><h2 id="errors-during-one-click-script-installation" tabindex="-1">Errors During One-Click Script Installation <a class="header-anchor" href="#errors-during-one-click-script-installation" aria-label="Permalink to "Errors During One-Click Script Installation""></a></h2><h3 id="curl-failed-to-connect-to-raw-githubusercontent-com" tabindex="-1">curl: Failed to connect to raw.githubusercontent.com...... <a class="header-anchor" href="#curl-failed-to-connect-to-raw-githubusercontent-com" aria-label="Permalink to "curl: Failed to connect to raw.githubusercontent.com......""></a></h3><p>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 <a href="/en_US/guide/agent.html#other-ways-to-install-agent">manually install the Agent</a>. Additionally, you can find third-party Github acceleration services or mirrors and set them in the one-click installation script.</p><h3 id="sudo-command-not-found" tabindex="-1">sudo: command not found <a class="header-anchor" href="#sudo-command-not-found" aria-label="Permalink to "sudo: command not found""></a></h3><p>Please manually install sudo first, for example, in Ubuntu:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">apt</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> sudo</span></span></code></pre></div>',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};
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="api-interface" tabindex="-1">API Interface <a class="header-anchor" href="#api-interface" aria-label="Permalink to "API Interface""></a></h1><p><strong>Nezha Monitoring supports querying the status information of Agents using the API interface</strong></p><h2 id="creating-a-token" tabindex="-1">Creating a Token <a class="header-anchor" href="#creating-a-token" aria-label="Permalink to "Creating a Token""></a></h2><p>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".</p><p>To delete a Token, select the corresponding Token and click the delete icon on the right.</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>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.</p></div><h2 id="authentication-method" tabindex="-1">Authentication Method <a class="header-anchor" href="#authentication-method" aria-label="Permalink to "Authentication Method""></a></h2><p>Ensure the request header contains <code>Authorization: Token</code> for authentication.</p><p>Token authentication method:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Request Headers:</span></span>
|
||||
<span class="line"><span>Authorization: Token</span></span></code></pre></div><h2 id="usage-instructions" tabindex="-1">Usage Instructions <a class="header-anchor" href="#usage-instructions" aria-label="Permalink to "Usage Instructions""></a></h2><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Negative timestamps in the following examples represent <code>0000-00-00</code>. 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.</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><strong>The request method is <code>GET</code>, and the response format is <code>JSON</code>.</strong></p></div><h3 id="get-server-list" tabindex="-1">Get Server List <a class="header-anchor" href="#get-server-list" aria-label="Permalink to "Get Server List""></a></h3><p>Request:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>GET /api/v1/server/list?tag=</span></span></code></pre></div><p>Parameters:</p><ul><li><code>tag</code> (optional): ServerTag is the server group. Provide this parameter to query only servers in that group.</li></ul><p>Example response:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "code"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "message"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"success"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "result"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "tag"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Tag1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "last_active"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1653014667</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ipv4"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"1.1.1.1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ipv6"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "valid_ip"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"1.1.1.1"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server2"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "tag"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Tag2"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "last_active"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-62135596800</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ipv4"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ipv6"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "valid_ip"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h3 id="get-server-details" tabindex="-1">Get Server Details <a class="header-anchor" href="#get-server-details" aria-label="Permalink to "Get Server Details""></a></h3><p>Request:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>GET /api/v1/server/details?id=&tag=</span></span></code></pre></div><p>Parameters:</p><ul><li><code>id</code> (optional): ServerID, multiple IDs separated by commas. Provide this parameter to query the server corresponding to that ID and ignore the <code>tag</code> parameter.</li><li><code>tag</code> (optional): ServerTag, provide this parameter to query only servers in that group.</li></ul><p>Example response:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "code"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "message"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"success"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "result"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "tag"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Tag1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "last_active"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1653015042</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ipv4"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"1.1.1.1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ipv6"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "valid_ip"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"1.1.1.1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "host"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Platform"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"darwin"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "PlatformVersion"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"12.3.1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "CPU"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Apple M1 Pro 1 Physical Core"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "MemTotal"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">17179869184</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "DiskTotal"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2473496842240</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "SwapTotal"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Arch"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"arm64"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Virtualization"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "BootTime"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1652683962</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "CountryCode"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"hk"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Version"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "status"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "CPU"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">17.33</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "MemUsed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">14013841408</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "SwapUsed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "DiskUsed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2335048912896</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetInTransfer"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2710273234</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetOutTransfer"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">695454765</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetInSpeed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">10806</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetOutSpeed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">5303</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Uptime"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">331080</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Load1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">5.23</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Load5"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">4.87</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Load15"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">3.99</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "TcpConnCount"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">195</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "UdpConnCount"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">70</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ProcessCount"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">437</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server2"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "tag"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Tag2"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "last_active"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">-62135596800</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ipv4"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ipv6"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "valid_ip"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "host"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Platform"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "PlatformVersion"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "CPU"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "MemTotal"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "DiskTotal"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "SwapTotal"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Arch"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Virtualization"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "BootTime"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "CountryCode"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Version"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "status"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "CPU"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "MemUsed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "SwapUsed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "DiskUsed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetInTransfer"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetOutTransfer"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetInSpeed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetOutSpeed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Uptime"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Load1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Load5"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Load15"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "TcpConnCount"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "UdpConnCount"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ProcessCount"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h3 id="get-icmp-ping-tcping-monitor-value" tabindex="-1">Get ICMP Ping / TCPing monitor value <a class="header-anchor" href="#get-icmp-ping-tcping-monitor-value" aria-label="Permalink to "Get ICMP Ping / TCPing monitor value""></a></h3><p>This API does not require authentication, except for servers with <code>HideForGuest</code> option enabled.</p><p>Request:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>GET /api/v1/monitor/{id}</span></span></code></pre></div><p>Parameters:</p><ul><li><code>id</code> (required): ServerID, must be an positive integer.</li></ul><p>Example response:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "code"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "message"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"success"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "result"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "monitor_id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "server_id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "monitor_name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Monitor1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "server_name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "created_at"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1722142860000</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1722142920000</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "avg_delay"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 68.2275</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 70.1129</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "monitor_id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "server_id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "monitor_name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Monitor2"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "server_name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "created_at"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1722142860000</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1722142920000</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "avg_delay"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 66.656</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 68.2153</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "monitor_id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">3</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "server_id"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "monitor_name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Monitor3"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "server_name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "created_at"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1722142860000</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1722142920000</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "avg_delay"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 61.4525</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 62.342</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>Note: <code>created_at</code> corresponds with <code>avg_delay</code>.</p><h3 id="automatic-node-registration" tabindex="-1">Automatic Node Registration <a class="header-anchor" href="#automatic-node-registration" aria-label="Permalink to "Automatic Node Registration""></a></h3><p>Description: Script for automating node registration. Example code is provided below. Reference: <a href="https://github.com/naiba/nezha/pull/472" target="_blank" rel="noreferrer">https://github.com/naiba/nezha/pull/472</a></p><div class="language-http vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">http</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">POST</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /api/v1/server/register?simple=1</span></span></code></pre></div><p>Parameters:</p><ul><li><code>simple</code>: (optional): Specifies the format of the response data. <ul><li>When set to <code>simple=1</code> or <code>simple=true</code>, the response will only include a Token string (e.g., <code>8GYwaxYuLfU7zl7ndC</code>).</li><li>Otherwise the response will return a complete JSON object::<code>{"code": 200, "message": "Server created successfully","secret": "8GYwaxYuLfU7zl7ndC"}</code></li></ul></li></ul><p>Request Payload:</p><p>The payload can be completely empty (<code>{}</code>), and the system will apply the following default values:</p><ul><li><code>Name</code>: Defaults to the node’s IP address ($IP).</li><li><code>Tag</code>: Defaults to "AutoRegister".</li><li><code>Note</code>: Defaults to an empty string ("").</li><li><code>HideForGuest</code>: Defaults to "on".</li></ul><p>You can also customize your data:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"abcd"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Node name</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Tag"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Tag (optional)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Note"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Note or description (optional)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "HideForGuest"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"on"</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Whether to hide from guests</span></span></code></pre></div><h2 id="usage-examples" tabindex="-1">Usage Examples <a class="header-anchor" href="#usage-examples" aria-label="Permalink to "Usage Examples""></a></h2><h3 id="get-all-server-information" tabindex="-1">Get All Server Information <a class="header-anchor" href="#get-all-server-information" aria-label="Permalink to "Get All Server Information""></a></h3><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> requests</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">url </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "http://your-dashboard/api/v1/server/list"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">headers </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Authorization"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"your_token"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">response </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> requests.get(url, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">headers</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">headers)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">data </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> response.json()</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> server </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">in</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> data[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'result'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server Name: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'name'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">, Last Active: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'last_active'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">, IP: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'valid_ip'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><h3 id="get-specific-server-details" tabindex="-1">Get Specific Server Details <a class="header-anchor" href="#get-specific-server-details" aria-label="Permalink to "Get Specific Server Details""></a></h3><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> requests</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server_id </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Replace with your server ID</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">url </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"http://your-dashboard/api/v1/server/details?id=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server_id</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">headers </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Authorization"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"your_token"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">response </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> requests.get(url, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">headers</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">headers)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">data </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> response.json()</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> data[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'result'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">][</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server Name: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'name'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"CPU Usage: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'status'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">][</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'CPU'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">%"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Memory Used: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'status'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">][</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'MemUsed'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bytes"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Disk Used: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'status'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">][</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'DiskUsed'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bytes"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Network In Speed: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'status'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">][</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'NetInSpeed'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bytes/s"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">print</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Network Out Speed: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">server[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'status'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">][</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'NetOutSpeed'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bytes/s"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><p>With the above example code, you can easily obtain and process server status information, enabling automated monitoring and management.</p><h3 id="automatic-node-registration-1" tabindex="-1">Automatic Node Registration <a class="header-anchor" href="#automatic-node-registration-1" aria-label="Permalink to "Automatic Node Registration""></a></h3><ol><li>Create a file named <code>nezha_register.sh</code>, and copy the following content into it:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#!/bin/bash</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Exit if NEZHA_TOKEN is not set</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [ </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-z</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_TOKEN</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "NEZHA_TOKEN is not set. Exiting."</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> exit</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Set default values if variables are not set</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_PROBE_ADDRESS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_PROBE_ADDRESS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">probe</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">example</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">com</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_PROBE_PORT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_PROBE_PORT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">5555</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_DASHBOARD_URL</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_DASHBOARD_URL</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">https</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">://</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">nezha</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">example</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">com</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NODE_NAME</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${NODE_NAME</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:-</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$(hostname)}</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Send POST request and capture response and HTTP status code</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">response</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -s</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> response_body.json</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -w</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "%{http_code}"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -X</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> POST</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_DASHBOARD_URL</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}/api/v1/server/register?simple=true"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Content-Type: application/json"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Authorization: \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_TOKEN</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "{</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Name</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NODE_NAME</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Extract HTTP status code and Nezha secret</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">HTTP_CODE</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$response</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_SECRET</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cat</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> response_body.json</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> response_body.json</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [ </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$HTTP_CODE</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> !=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "200"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Failed to get Nezha Secret. HTTP status code: </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$HTTP_CODE</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> exit</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Additional check for NEZHA_SECRET to ensure it's not JSON-formatted (indicating failure)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [[ </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"\${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_SECRET</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">0</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">1</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ==</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "{"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]]; </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">then</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Failed to get Nezha Secret. Received response: \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">NEZHA_SECRET</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> exit</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">fi</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Download and execute the install script with cleanup</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -fsSL</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://raw.githubusercontent.com/nezhahq/scripts/main/install_en.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> && </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> +x</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nezha.sh</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ||</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Failed to download or make the script executable"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">; </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">exit</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">; }</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Clean up nezha.sh on exit</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">trap</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'rm -f nezha.sh'</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> EXIT</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Run the Nezha agent installation script</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">CMD</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"./nezha.sh install_agent "</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${NEZHA_PROBE_ADDRESS}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">" "</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${NEZHA_PROBE_PORT}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">" "</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${NEZHA_SECRET}</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">" --tls"</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">echo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Run commnad : \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">CMD</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">eval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> $CMD</span></span></code></pre></div><ol start="2"><li>Grant execution permission to the script: <code>chmod +x nezha_register.sh</code></li><li>Get <code>Token</code> from Nezha dashboard, e.g. <code>POXbxorKJBM8wPMKX8r2PdMblyXvpggB</code></li><li>Set Environment Variables</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> NEZHA_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"POXbxorKJBM8wPMKX8r2PdMblyXvpggB"</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Obtain this token from the dashboard</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> NEZHA_PROBE_ADDRESS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"your_probe_address"</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Set your probe address</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> NEZHA_DASHBOARD_URL</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://nezha.example.com"</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Replace with your dashboard URL</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> NEZHA_PROBE_PORT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"5555"</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Modify this port if needed</span></span></code></pre></div><ol start="5"><li>Run the script to complete node registration and probe installation:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./nezha_register.sh</span></span></code></pre></div><ol start="6"><li>If the script runs successfully, you will see output like the following:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> command:</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./nezha.sh</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install_agent</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> probe.example.com</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 5555</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> YOUR_SECRET</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --tls</span></span></code></pre></div>`,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};
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="install-dashboard" tabindex="-1">Install Dashboard <a class="header-anchor" href="#install-dashboard" aria-label="Permalink to "Install Dashboard""></a></h1><h2 id="preparation" tabindex="-1">Preparation <a class="header-anchor" href="#preparation" aria-label="Permalink to "Preparation""></a></h2><p>To set up Nezha Monitoring, you need:</p><ol><li>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.</li><li>A domain with an A record set to point to your Dashboard server IP.</li></ol><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>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.</p><p>This document uses "dashboard.example.com" and "data.example.com" as example domains.</p></div><ol start="3"><li>A Github account (or Gitlab, Gitee).</li></ol><p><strong>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.</strong></p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>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.<br> 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.</p></div><h2 id="obtaining-github-client-id-and-secret" tabindex="-1">Obtaining Github Client ID and Secret <a class="header-anchor" href="#obtaining-github-client-id-and-secret" aria-label="Permalink to "Obtaining Github Client ID and Secret""></a></h2><p>Nezha Monitoring uses Github, Gitlab, or Gitee as admin accounts.</p><ol><li>First, create an OAuth application. For Github, log in to Github, open <a href="https://github.com/settings/developers" target="_blank" rel="noreferrer">Github OAuth Apps</a>, and select "OAuth Apps" -> "New OAuth App".<br><code>Application name</code> - Fill in as you like.<br><code>Homepage URL</code> - Fill in with the domain for accessing the dashboard, such as "<a href="http://dashboard.example.com" target="_blank" rel="noreferrer">http://dashboard.example.com</a>" (your domain).<br><code>Authorization callback URL</code> - Fill in with the callback address, such as "<a href="http://dashboard.example.com/oauth2/callback" target="_blank" rel="noreferrer">http://dashboard.example.com/oauth2/callback</a>" (don't forget <code>/oauth2/callback</code>).</li><li>Click “Register application”.</li><li>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, <strong>please keep it safe</strong>.</li></ol><h2 id="using-cloudflare-access-as-an-oauth2-provider" tabindex="-1">Using Cloudflare Access as an OAuth2 Provider <a class="header-anchor" href="#using-cloudflare-access-as-an-oauth2-provider" aria-label="Permalink to "Using Cloudflare Access as an OAuth2 Provider""></a></h2><p>If you encounter issues using GitHub, GitLab, or Gitee for admin account logins, consider switching to <a href="/en_US/guide/q8.html">Cloudflare Access as your OAuth2 provider</a> for authentication.</p><h3 id="setting-up-a-new-saas-oidc-application" tabindex="-1">Setting Up a New SaaS-OIDC Application <a class="header-anchor" href="#setting-up-a-new-saas-oidc-application" aria-label="Permalink to "Setting Up a New SaaS-OIDC Application""></a></h3><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>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 <a href="/en_US/guide/q8.html">Guide on Using Cloudflare Access as an OAuth2 Provider</a> to understand the configuration examples and setup process.</p></div><ol><li>Go to <a href="https://one.dash.cloudflare.com" target="_blank" rel="noreferrer">Zero Trust Dashboard</a> and log in with your Cloudflare account.</li><li><code>My Team</code> -> <code>Users</code> -> <code><specific user></code> -> Get <code>User I
Line truncated
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">location</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> / </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> proxy_pass </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">http://127.0.0.1:8008;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> proxy_set_header </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Host $http_host;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> proxy_set_header </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Upgrade $http_upgrade;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">location</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ~</span><span style="--shiki-light:#032F62;--shiki-dark:#DBEDFF;"> ^/(ws|terminal/.+|file/.+)$ </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> proxy_pass </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">http://127.0.0.1:8008;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> proxy_http_version </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1.1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> proxy_set_header </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Upgrade $http_upgrade;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> proxy_set_header </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Connection </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Upgrade"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> proxy_set_header </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Host $http_host;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">#PROXY-END/</span></span></code></pre></div><p>Click “Save”.<br> Now you should be able to access the dashboard directly using the domain, such as “<a href="http://dashboard.example.com" target="_blank" rel="noreferrer">http://dashboard.example.com</a>”.</p><h3 id="additional-content" tabindex="-1">Additional Content: <a class="header-anchor" href="#additional-content" aria-label="Permalink to "Additional Content:""></a></h3><p>CaddyServer v1 (v2 does not require special configuration):</p><div class="language-caddy vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">caddy</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>proxy /ws http://ip:8008 {</span></span>
|
||||
<span class="line"><span> websocket</span></span>
|
||||
<span class="line"><span> header_upstream -Origin</span></span>
|
||||
<span class="line"><span>}</span></span>
|
||||
<span class="line"><span>proxy /terminal/* http://ip:8008 {</span></span>
|
||||
<span class="line"><span> websocket</span></span>
|
||||
<span class="line"><span> header_upstream -Origin</span></span>
|
||||
<span class="line"><span>}</span></span>
|
||||
<span class="line"><span>proxy /file/* http://ip:8008 {</span></span>
|
||||
<span class="line"><span> websocket</span></span>
|
||||
<span class="line"><span> header_upstream -Origin</span></span>
|
||||
<span class="line"><span>}</span></span></code></pre></div><h2 id="configuring-ssl-in-the-aapanel" tabindex="-1">Configuring SSL in the aaPanel <a class="header-anchor" href="#configuring-ssl-in-the-aapanel" aria-label="Permalink to "Configuring SSL in the aaPanel""></a></h2><p>First, temporarily disable the reverse proxy.<br> 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.<br> After completing the SSL settings, go back to <a href="https://github.com/settings/developers" target="_blank" rel="noreferrer">Github OAuth Apps</a> and edit the previously created OAuth application. Change all the domain parts in "Homepage URL" and "Authorization callback URL" from <code>http</code> to <code>https</code>, such as "<a href="https://dashboard.example.com" target="_blank" rel="noreferrer">https://dashboard.example.com</a>" and "<a href="https://dashboard.example.com/oauth2/callback" target="_blank" rel="noreferrer">https://dashboard.example.com/oauth2/callback</a>". <strong>Failing to change this may result in being unable to log in to the admin panel.</strong></p><h2 id="updating-the-dashboard" tabindex="-1">Updating the Dashboard <a class="header-anchor" href="#updating-the-dashboard" aria-label="Permalink to "Updating the Dashboard""></a></h2><p>Run the script <code>./nezha.sh</code>, and select to restart and update the dashboard.</p>`,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};
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="frequently-asked-questions-about-the-dashboard" tabindex="-1">Frequently Asked Questions about the Dashboard <a class="header-anchor" href="#frequently-asked-questions-about-the-dashboard" aria-label="Permalink to "Frequently Asked Questions about the Dashboard""></a></h1><h2 id="why-is-the-ip-displayed-in-the-admin-panel-different-from-the-actual-agent-ip" tabindex="-1">Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP? <a class="header-anchor" href="#why-is-the-ip-displayed-in-the-admin-panel-different-from-the-actual-agent-ip" aria-label="Permalink to "Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?""></a></h2><p>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: <a href="https://github.com/nezhahq/agent/blob/main/pkg/monitor/myip.go" target="_blank" rel="noreferrer">myip.go</a>.<br> 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 <strong>entry IP</strong>, but the Agent is testing your <strong>exit IP</strong>. This issue can also occur with multi-line servers and IPLC private lines.</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>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.</p></div><p>You can also test the exit IP on the Agent server by running the following commands:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://ipapi.co/ip/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ip.sb</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ip-api.com</span></span></code></pre></div><h2 id="forgot-or-deleted-viewing-password" tabindex="-1">Forgot or Deleted Viewing Password <a class="header-anchor" href="#forgot-or-deleted-viewing-password" aria-label="Permalink to "Forgot or Deleted Viewing Password""></a></h2><p>Please view or edit the <code>/opt/nezha/dashboard/data/config.yaml</code> file.<br> The password is located under the <code>site-viewpassword</code> item.</p><h2 id="dashboard-installation-restart-update-failure-iptables" tabindex="-1">Dashboard Installation/Restart/Update Failure: iptables ...... <a class="header-anchor" href="#dashboard-installation-restart-update-failure-iptables" aria-label="Permalink to "Dashboard Installation/Restart/Update Failure: iptables ......""></a></h2><p>First, try restarting Docker before proceeding:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">systemctl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> status</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">systemctl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> restart</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">systemctl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> status</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span></span></code></pre></div><p>After restarting, try reinstalling the Dashboard.<br> If iptables errors persist, consider disabling or removing iptables.<br> This issue might also be related to the kernel, so switching to the official kernel can be another solution.</p><h2 id="dashboard-restart-failure-invalid-hostport-nz-site-port" tabindex="-1">Dashboard Restart Failure: Invalid hostPort: nz_site_port <a class="header-anchor" href="#dashboard-restart-failure-invalid-hostport-nz-site-port" aria-label="Permalink to "Dashboard Restart Failure: Invalid hostPort: nz_site_port""></a></h2><p>If this issue occurs, you can modify the configuration via the installation script or directly edit the <code>/opt/nezha/dashboard/docker-compose.yaml</code> file.</p><h2 id="dashboard-layout-error-css-resources-not-loading" tabindex="-1">Dashboard Layout Error, CSS Resources Not Loading <a class="header-anchor" href="#dashboard-layout-error-css-resources-not-loading" aria-label="Permalink to "Dashboard Layout Error, CSS Resources Not Loading""></a></h2><p>If the Dashboard page layout is incorrect, it's usually due to missing or inaccessible CSS files.<br> To resolve this, try <code>restarting and updating the Dashboard</code> first.<br> 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:</p><ol><li><p>Find the site configured during Dashboard installation in <code>Websites</code> and click <code>Settings</code> on the right.</p></li><li><p>Select <code>Configuration File</code> and remove the following lines:</p><div class="language-nginx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">nginx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">location</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ~</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> .*\\.(js|css)?$</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> expires </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 12h</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> error_log </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">/dev/null;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> access_log </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">/dev/null;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span></code></pre></div></li><li><p>Save the configuration, clear the browser, Nginx, and CDN caches, and refresh the page to see if it returns to normal.</p></li></ol><h2 id="dashboard-cannot-start-panic-unable-to-find-the-configured-ddns-provider" tabindex="-1">Dashboard Cannot Start: panic: Unable to find the configured DDNS provider... <a class="header-anchor" href="#dashboard-cannot-start-panic-unable-to-find-the-configured-ddns-provider" aria-label="Permalink to "Dashboard Cannot Start: panic: Unable to find the configured DDNS provider...""></a></h2><p>The value entered for the DDNS provider is incorrect. Currently, only <code>webhook</code>, <code>cloudflare</code>, <code>tencentcloud</code>, and <code>dummy</code> are supported.</p><h2 id="dashboard-ddns-update-crash-panic-interface-conversion-interface-is-nil-not-interface" tabindex="-1">Dashboard DDNS Update Crash: panic: interface conversion: interface {} is nil, not []interface {} <a class="header-anchor" href="#dashboard-ddns-update-crash-panic-interface-conversion-interface-is-nil-not-interface" aria-label="Permalink to "Dashboard DDNS Update Crash: panic: interface conversion: interface {} is nil, not []interface {}""></a></h2><p>The entered DDNS <code>AccessID</code> or <code>AccessSecret</code> is incorrect.</p><h2 id="dashboard-warning-nezha-错误的服务监控上报" tabindex="-1">Dashboard warning: NEZHA>> 错误的服务监控上报... <a class="header-anchor" href="#dashboard-warning-nezha-错误的服务监控上报" aria-label="Permalink to "Dashboard warning: NEZHA>> 错误的服务监控上报...""></a></h2><ol><li><p>The installed versions of the Dashboard and Agent are not compatible and have a <code>TaskType</code> that is unsupported by its counterpart. Updating both to the latest version could solve this problem.</p></li><li><p>This could be a specific issue in Dashboard v0.17.10 - v0.18.0. Updating to the latest version could solve this.</p></li></ol><h2 id="unable-to-start-the-agent-service-unix-syslog-delivery-error" tabindex="-1">Unable to start the Agent service: Unix syslog delivery error <a class="header-anchor" href="#unable-to-start-the-agent-service-unix-syslog-delivery-error" aria-label="Permalink to "Unable to start the Agent service: Unix syslog delivery error""></a></h2><p>Appears in Agent v0.16.9+. Mostly caused by a malfunctioning <code>/dev/log</code> socket (or it does not exist at all). You can refer to <a href="https://unix.stackexchange.com/questions/317064/how-do-i-restore-dev-log-in-systemdrsyslog-host" target="_blank" rel="noreferrer">https://unix.stackexchange.com/questions/317064/how-do-i-restore-dev-log-in-systemdrsyslog-host</a> to solve this problem. Try avoiding using init systems like <code>systemd</code> in a Docker installation.</p><h2 id="network-monitoring-page-shows-server-monitor-history-not-found" tabindex="-1">Network Monitoring Page Shows: server monitor history not found <a class="header-anchor" href="#network-monitoring-page-shows-server-monitor-history-not-found" aria-label="Permalink to "Network Monitoring Page Shows: server monitor history not found""></a></h2><p>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.<br> If it has been set up, wait for some time and then check again.</p><h2 id="what-to-do-if-terminal-or-ws-can-t-connect-properly-after-enabling-https" tabindex="-1">What to do if /terminal or /ws can't connect properly after enabling HTTPS? <a class="header-anchor" href="#what-to-do-if-terminal-or-ws-can-t-connect-properly-after-enabling-https" aria-label="Permalink to "What to do if /terminal or /ws can't connect properly after enabling HTTPS?""></a></h2><p>This is often due to an incomplete certificate. Add the -d parameter to the agent run command. If the log contains <code>x509:certificate signed by unknown authority</code>, replacing with a complete certificate will solve the problem.</p><h2 id="what-if-i-m-not-satisfied-with-the-data-modification-addition-functionality-provided-by-the-dashboard-and-want-to-modify-add-data-myself" tabindex="-1">What if I'm not satisfied with the data modification/addition functionality provided by the dashboard and want to modify/add data myself? <a class="header-anchor" href="#what-if-i-m-not-satisfied-with-the-data-modification-addition-functionality-provided-by-the-dashboard-and-want-to-modify-add-data-myself" aria-label="Permalink to "What if I'm not satisfied with the data modification/addition functionality provided by the dashboard and want to modify/add data myself?""></a></h2><p>Common in scenarios like batch adding Agents, you can directly modify the database.<br> Note that not everything in the database can be modifieLine truncated
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="ddns" tabindex="-1">DDNS <a class="header-anchor" href="#ddns" aria-label="Permalink to "DDNS""></a></h1><p>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.</p><h3 id="why-should-i-use-nezha-s-ddns-functionality" tabindex="-1">Why should I use Nezha's DDNS functionality? <a class="header-anchor" href="#why-should-i-use-nezha-s-ddns-functionality" aria-label="Permalink to "Why should I use Nezha's DDNS functionality?""></a></h3><ul><li>Convenient centralized management of DDNS settings, instead of deploying a DDNS service on every server.</li><li>Your confidential information is only stored on the Dashboard server, preventing leaks.</li></ul><h3 id="configuration" tabindex="-1">Configuration <a class="header-anchor" href="#configuration" aria-label="Permalink to "Configuration""></a></h3><p>You can directly add DDNS configurations in the Dashboard management page.</p><ol><li>Click on the "Dynamic DNS" option in the menu bar to enter the configuration page.</li><li>Click the "New Profile" button and fill in the required information in the pop-up window. Option details: <ul><li><strong>Name</strong>: The name of the configuration.</li><li><strong>DDNS Provider</strong>: The type of provider, determining the method used to update DNS records.</li><li><strong>Domains (separate with comma)</strong>: The domain(s), if you enter multiple domains, they should be separated by commas. IDNs (Internationalized Domain Names) are supported.</li><li><strong>Maximum retry attempts</strong>: The number of attempts for updating DDNS, default is 3, and the range is between 1 and 10.</li><li><strong>DDNS Credential 1</strong> and <strong>DDNS Credential 2</strong> are optional. Typically, at least one needs to be provided. The <a href="#provider-list">table</a> below lists the options for all providers.</li></ul></li><li>If using the <code>webhook</code> provider, the corresponding options need to be filled out as required. For detailed instructions, see <a href="#webhook-configuration">Webhook Configuration</a>.</li><li>You need to check at least one of <strong>IPv4 Enabled</strong> and <strong>IPv6 Enabled</strong>; otherwise, no update operations will be performed.</li><li>After adding a new configuration, you also need to modify the server settings to activate DDNS. Server-related options include: <ul><li><strong>Enable DDNS</strong>: Enable DDNS functionality for this server.</li><li><strong>DDNS Profiles</strong>: The list of DDNS configuration IDs to use, searchable by configuration name.</li></ul></li></ol><h2 id="webhook-configuration" tabindex="-1">Webhook Configuration <a class="header-anchor" href="#webhook-configuration" aria-label="Permalink to "Webhook Configuration""></a></h2><p>Webhook requires manually constructing HTTP requests, suitable for using other provider services when operations are simple.</p><p>Webhook option descriptions:</p><ul><li><strong>Webhook URL</strong>: The URL for the HTTP request, where parameters can use placeholders.</li><li><strong>Webhook Request Method</strong>: The HTTP request method. Supported methods include <code>GET</code>, <code>POST</code>, <code>PATCH</code>, <code>DELETE</code>, and <code>PUT</code>.</li><li><strong>Webhook Request Type</strong>: The format of the HTTP request body, either <code>JSON</code> or <code>Form</code>.</li><li><strong>Webhook Request Headers</strong>: HTTP request headers, filled in JSON format, but nesting is not supported.</li><li><strong>Webhook Request Body</strong>: The HTTP request body. It won't be used for <code>GET</code> and <code>DELETE</code>. If you need to use a nested format, you must choose <code>JSON</code> as the request type.</li></ul><p>Supported Webhook placeholders:</p><ul><li><code>#ip#</code>: Host IP.</li><li><code>#domain#</code>: DDNS domain. Each request is made separately for each domain, so this value will be a single domain string.</li><li><code>#type#</code>: IP type, either <code>"ipv4"</code> or <code>"ipv6"</code>.</li><li><code>#record#</code>: Record type, either <code>"A"</code> or <code>"AAAA"</code>.</li><li><code>#access_id#</code>: DDNS Credential 1.</li><li><code>#access_secret#</code>: DDNS Credential 2.</li></ul><h3 id="oray-webhook-example" tabindex="-1">Oray Webhook Example <a class="header-anchor" href="#oray-webhook-example" aria-label="Permalink to "Oray Webhook Example""></a></h3><details><
Line truncated
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">dashboard_1</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> 2024/03/16</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 23:16:28</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> NEZH</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">A</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">>></span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 尝试更新域名</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ddns.example.com</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">DDNS成功</span></span></code></pre></div>`,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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="faq-about-logging-into-the-dashboard" tabindex="-1">FAQ about logging into the Dashboard <a class="header-anchor" href="#faq-about-logging-into-the-dashboard" aria-label="Permalink to "FAQ about logging into the Dashboard""></a></h1><h2 id="stuck-page-connection-refused-long-response-time-after-login-callback" tabindex="-1">Stuck Page/Connection Refused/Long Response Time After Login Callback <a class="header-anchor" href="#stuck-page-connection-refused-long-response-time-after-login-callback" aria-label="Permalink to "Stuck Page/Connection Refused/Long Response Time After Login Callback""></a></h2><p>These issues can manifest in various ways, but ultimately the browser cannot display correctly after login.</p><ol><li>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.</li><li>You have configured the callback address incorrectly. Ensure that your callback address is correct and that both the <strong>port and protocol</strong> are accurate!</li><li>An unknown error occurred on the Dashboard. You can use a script to check the logs.</li></ol><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>What is a protocol? In the browser, the string that ends your domain with <code>://</code> is the protocol, usually <code>http</code> or <code>https</code>. 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.</p></div><h3 id="how-to-check-if-my-callback-address-is-wrong" tabindex="-1">How to Check if My Callback Address is Wrong? <a class="header-anchor" href="#how-to-check-if-my-callback-address-is-wrong" aria-label="Permalink to "How to Check if My Callback Address is Wrong?""></a></h3><p>Ensure that the protocol+domain+port displayed in the browser before login and after the callback are consistent.<br> Ensure that your path is <code>/oauth2/callback</code>, <strong>all in lowercase</strong>.</p><h2 id="errors-after-logging-into-the-admin-panel" tabindex="-1">Errors After Logging into the Admin Panel <a class="header-anchor" href="#errors-after-logging-into-the-admin-panel" aria-label="Permalink to "Errors After Logging into the Admin Panel""></a></h2><h3 id="http-named-cookie-not-present" tabindex="-1">http: named cookie not present <a class="header-anchor" href="#http-named-cookie-not-present" aria-label="Permalink to "http: named cookie not present""></a></h3><ol><li>Clear cookies and log in again, or try a different browser.</li><li>Check the callback address to ensure it is correct and that both the <strong>port and protocol</strong> 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.</li></ol><h3 id="lookup-xxx" tabindex="-1">lookup xxx <a class="header-anchor" href="#lookup-xxx" aria-label="Permalink to "lookup xxx""></a></h3><p>The container DNS resolution failed, usually due to modified iptables configurations.<br> It is recommended to restart Docker first, <code>sudo systemctl restart docker</code>, then restart the Dashboard using the script.<br> If the lookup error persists, check if there are other tools controlling iptables, such as firewall.<br> This issue might also be related to the kernel, so try switching to the official kernel.</p><h3 id="invalid-authorization-method-or-the-login-callback-address-is-invalid-expired-or-has-been-revoked" tabindex="-1">Invalid authorization method, or the login callback address is invalid, expired, or has been revoked <a class="header-anchor" href="#invalid-authorization-method-or-the-login-callback-address-is-invalid-expired-or-has-been-revoked" aria-label="Permalink to "Invalid authorization method, or the login callback address is invalid, expired, or has been revoked""></a></h3><p>This issue appears only when using Gitee login, and the reason is unclear. Switching to GitHub is recommended.</p><h3 id="oauth2-server-response-missing-access-token" tabindex="-1">oauth2: server response missing access_token <a class="header-anchor" href="#oauth2-server-response-missing-access-token" aria-label="Permalink to "oauth2: server response missing access_token""></a></h3><p>This could be caused by various factors, most likely a network issue. Check your network and try again.<br> If unresolved, switching to Github or another method is recommended.</p><h3 Line truncated
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="nat-traversal-configuration" tabindex="-1">NAT Traversal Configuration <a class="header-anchor" href="#nat-traversal-configuration" aria-label="Permalink to "NAT Traversal Configuration""></a></h1><p>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.</p><h2 id="preparation" tabindex="-1">Preparation <a class="header-anchor" href="#preparation" aria-label="Permalink to "Preparation""></a></h2><p>Prior to configuring NAT traversal, please ensure the following preparatory steps are completed:</p><ul><li>Verify that the Nezha Monitoring Agent is installed and actively running on your device and maintains a stable connection with the Dashboard.</li><li>Acquire a public domain name, ideally using a subdomain configuration, such as <code>service-1.example.com</code>. Point this domain name to the public IP address of your Dashboard server.</li><li>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 <code>service-2.example.com</code>.</li></ul><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>If your Dashboard server uses tools like the aaPanel or similar management platforms, ensure that your domain (e.g., <code>service-1.example.com</code>) is correctly linked to the Dashboard site within these tools to avoid access issues.</p></div><h2 id="nat-traversal-configuration-steps" tabindex="-1">NAT Traversal Configuration Steps <a class="header-anchor" href="#nat-traversal-configuration-steps" aria-label="Permalink to "NAT Traversal Configuration Steps""></a></h2><ol><li>Log into the Dashboard Admin Panel and navigate to the "NAT Traversal" section in the menu.</li><li>Click the "Add" button and provide the following required details: <ul><li><strong>Name</strong>: Assign a custom name to this traversal setup, for example, <code>OpenWrt Login Page</code>.</li><li><strong>Agent ID</strong>: Input the ID of the Agent for which traversal is needed.</li><li><strong>Local service</strong>: Specify the internal service address that requires traversal, in the <code>IP:port</code> format, such as <code>127.0.0.1:80</code>.</li><li><strong>Bind hostname</strong>: Enter the previously configured public domain name, such as <code>service-1.example.com</code>. If a non-standard port is used by Dashboard (e.g. default <code>8008</code>), be sure to include it as well.</li></ul></li><li>After filling in the details, click the "Add" button and wait for the traversal setup to activate.</li><li>Test the configuration by accessing <code>http://service-1.example.com</code> to ensure the internal service on the Agent is successfully accessible.</li></ol><h2 id="usage-notes" tabindex="-1">Usage Notes <a class="header-anchor" href="#usage-notes" aria-label="Permalink to "Usage Notes""></a></h2><ul><li>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.</li><li>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.</li></ul>',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};
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="notification-configuration" tabindex="-1">Notification Configuration <a class="header-anchor" href="#notification-configuration" aria-label="Permalink to "Notification Configuration""></a></h1><p>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.</p><h2 id="flexible-notification-methods" tabindex="-1">Flexible Notification Methods <a class="header-anchor" href="#flexible-notification-methods" aria-label="Permalink to "Flexible Notification Methods""></a></h2><ul><li>In Dashboard messages, the placeholder <code>#DATETIME#</code> represents the timestamp of the event. When the notification is triggered, the Dashboard automatically replaces <code>#DATETIME#</code> with the actual event time.</li><li><code>#NEZHA#</code> is a placeholder for Dashboard messages, and the Dashboard automatically replaces the placeholder with the actual message when the notification is triggered.</li><li>The body content is in <code>JSON</code> format: <strong>When the request type is FORM</strong>, the value is in <code>key:value</code> form, and placeholders can be placed inside <code>value</code>. The placeholders will be automatically replaced during notification. <strong>When the request type is JSON</strong>, only simple string replacement is performed before being submitted to the <code>URL</code>.</li><li>Placeholders can also be placed inside the URL, and simple string replacement will be performed during the request.</li></ul><p><strong>Refer to the following notification method examples, and you can also flexibly set the push method according to your needs.</strong></p><h3 id="bark-example" tabindex="-1">Bark Example <a class="header-anchor" href="#bark-example" aria-label="Permalink to "Bark Example""></a></h3><details><summary>Click to expand/collapse</summary><ul><li><p>Name: Bark</p></li><li><p>URL structure: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body</p></li><li><p>Request Method: GET</p></li><li><p>Request Type: Default</p></li><li><p>Body: Empty</p></li><li><p>Name: Bark</p></li><li><p>URL structure: /push</p></li><li><p>Request Method: POST</p></li><li><p>Request Type: form</p></li><li><p>Body: <code>{"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}</code></p></li></ul></details><h3 id="slack-example-contributor-白歌" tabindex="-1">Slack Example Contributor: <a href="https://github.com/cantoblanco" target="_blank" rel="noreferrer">@白歌</a> <a class="header-anchor" href="#slack-example-contributor-白歌" aria-label="Permalink to "Slack Example Contributor: [@白歌](https://github.com/cantoblanco)""></a></h3><details><summary>Click to expand/collapse</summary><h4 id="url-parameter-acquisition-instructions" tabindex="-1">URL Parameter Acquisition Instructions <a class="header-anchor" href="#url-parameter-acquisition-instructions" aria-label="Permalink to "URL Parameter Acquisition Instructions""></a></h4><p>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 <a href="https://api.slack.com/apps" target="_blank" rel="noreferrer">Slack API</a>.</p><p>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.</p><ul><li>Name: Slack</li><li>URL: <a href="https://hooks.slack.com/services/xxxxxxxxx/xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx" target="_blank" rel="noreferrer">https://hooks.slack.com/services/xxxxxxxxx/xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx</a></li><li>Request Method: POST</li><li>Request Type: JSON</li><li>Body: <code>{"text":"#NEZHA#"}</code></li></ul></details><h3 id="telegram-example-contributor-白歌" tabindex="-1">Telegram Example Contributor: <a href="https://github.com/cantoblanco" target="_blank" rel="noreferrer">@白歌</a> <a class="header-anchor" href="#telegram-example-contributor-白歌" aria-label="Permalink to "Telegram Example Contributor: [@白歌](https://github.com/cantoblanco)""></a></h3><details><summary>Click to expand/collapse</summary><h4 id="url-par
Line truncated
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "message"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "subject"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Server Status Notification"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "body"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "contentType"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Text"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "content"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#NEZHA#"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "toRecipients"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "emailAddress"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "address"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"ADDRESS FOR RECEVING EMAILS"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li></ul></details><h3 id="dingtalk-group-bot-configuration-example" tabindex="-1">DingTalk Group Bot Configuration Example <a class="header-anchor" href="#dingtalk-group-bot-configuration-example" aria-label="Permalink to "DingTalk Group Bot Configuration Example""></a></h3><details><summary>Click to expand/collapse</summary><h4 id="url-parameter-acquisition-instructions-3" tabindex="-1">URL Parameter Acquisition Instructions <a class="header-anchor" href="#url-parameter-acquisition-instructions-3" aria-label="Permalink to "URL Parameter Acquisition Instructions""></a></h4><p>Create a bot in DingTalk in advance and get the bot's token.</p><p>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.</p><ul><li>Name: Nezha Assistant</li><li>URL: <a href="https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxx" target="_blank" rel="noreferrer">https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxx</a></li><li>Request Method: POST</li><li>Request Type: JSON</li><li>Header: <code>{"Content-Type": "application/json"}</code></li><li>Body: <code>{"msgtype": "text","text": {"content":"Nezha Probe:\\n#NEZHA#"}}</code></li></ul></details><h3 id="wechat-work-group-bot-example-contributor-chowrex" tabindex="-1">WeChat Work Group Bot Example Contributor: <a href="https://github.com/ChowRex" target="_blank" rel="noreferrer">@ChowRex</a> <a class="header-anchor" href="#wechat-work-group-bot-example-contributor-chowrex" aria-label="Permalink to "WeChat Work Group Bot Example Contributor: [@ChowRex](https://github.com/ChowRex)""></a></h3><details><summary>Click to expand/collapse</summary><p>Supported placeholders list</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "content"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#NEZHA#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ServerName"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.NAME#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ServerIP"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.IP#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ServerIPV4"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.IPV4#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "ServerIPV6"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.IPV6#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "CPU"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.CPU#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "MEM"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.MEM#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "SWAP"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.SWAP#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "DISK"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.DISK#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetInSpeed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.NETINSPEED#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "NetOutSpeed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.NETOUTSPEED#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "TransferIn"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.TRANSFERIN#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "TranferOut"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.TRANSFEROUT#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Load1"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.LOAD1#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Load5"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.LOAD5#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Load15"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.LOAD15#"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "TCP_CONN_COUNT"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.TCPCONNCOUNT"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#B31D28;--shiki-dark:#FDAEB7;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;">#</span><span style="--shiki-light:#B31D28;--shiki-dark:#FDAEB7;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;"> invalid</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "UDP_CONN_COUNT"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#SERVER.UDPCONNCOUNT"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#B31D28;--shiki-dark:#FDAEB7;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;">#</span><span style="--shiki-light:#B31D28;--shiki-dark:#FDAEB7;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;"> invalid</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><blockquote><p>This document is <strong>NOT</strong> available in English.</p><p><a href="https://developer.work.weixin.qq.com/document/path/91770#markdown%E7%B1%BB%E5%9E%8B" target="_blank" rel="noreferrer">Group Bot Configuration Instructions - Document - WeChat Work Developer Center</a></p></blockquote><ul><li>Name: WeChat Work Group Bot</li><li>URL: <a href="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY" target="_blank" rel="noreferrer">https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY</a></li><li>Request Method: POST</li><li>Request Type: JSON</li><li>Body:<div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "msgtype"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"markdown"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "markdown"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "content"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"# Nezha Notification</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n\\n\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#NEZHA#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Name: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.NAME#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> IP: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.IP#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> IPv4: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.IPV4#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">IPv6: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.IPV6#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> CPU: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.CPU#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Memory: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.MEM#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Swap: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.SWAP#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Disk: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.DISK#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Upload Speed: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.NETINSPEED#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Download Speed: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.NETOUTSPEED#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Total Upload: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.TRANSFERIN#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Total Download: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.TRANSFEROUT#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Load1: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.LOAD1#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Load5: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">#SERVER.LOAD5#</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">> Load15: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ELine truncated
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li></ul><p>You can remove or add relevant information as needed.</p></details><h3 id="matrix-notification-example" tabindex="-1">Matrix Notification Example <a class="header-anchor" href="#matrix-notification-example" aria-label="Permalink to "Matrix Notification Example""></a></h3><details><summary>Click to expand/collapse</summary><h4 id="parameter-explanation" tabindex="-1">Parameter Explanation <a class="header-anchor" href="#parameter-explanation" aria-label="Permalink to "Parameter Explanation""></a></h4><ul><li>All variables starting with <code>$</code> need to be replaced with your actual values. <ul><li><strong><code>YOUR_HOME_SERVER</code></strong>: The address of your Matrix server.</li><li><strong><code>YOUR_NEZHA_URL</code></strong>: The URL of your Nezha dashboard.</li><li><strong><code>YOUR_MATRIX_USERNAME</code></strong> and <strong><code>YOUR_MATRIX_PASSWD</code></strong>: Your Matrix username and password.</li><li><strong><code>YOUR_MATRIX_TOKEN</code></strong> retrieval method:<div class="language-sh vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">sh</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -XPOST</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '{"type": "m.login.password", "identifier": {"user": "$YOUR_MATRIX_USERNAME", "type": "m.id.user"}, "password": "$YOUR_MATRIX_PASSWD"}'</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "https://</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">$YOUR_HOME_SERVER</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/_matrix/client/r0/login"</span></span></code></pre></div></li></ul></li></ul><h4 id="request-configuration" tabindex="-1">Request Configuration <a class="header-anchor" href="#request-configuration" aria-label="Permalink to "Request Configuration""></a></h4><ul><li><strong>Name</strong>: Matrix</li><li><strong>URL</strong>: <code>https://$YOUR_HOME_SERVER/_matrix/client/r0/rooms/$ROOM_ID/send/m.room.message</code></li><li><strong>Request Method</strong>: <code>POST</code></li><li><strong>Request Type</strong>: <code>JSON</code></li><li><strong>Header</strong>:<div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "Authorization"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Bearer $YOUR_MATRIX_TOKEN"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li><li><strong>Body</strong>:<div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "msgtype"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"m.text"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "format"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"org.matrix.custom.html"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "formatted_body"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"<html><head><title>Nezha Dashboard</title></head><body><h1><a href=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">$YOUR_NEZHA_URL</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> target=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">_blank</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">>Nezha Dashboard</a></h1><ul><li>datetime: #DATETIME#</li><li>Message: #NEZHA#</li></ul></body></html>"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> "body"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#NEZHA#"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li></ul><h4 id="usage-steps" tabindex="-1">Usage Steps <a class="header-anchor" href="#usage-steps" aria-label="Permalink to "Usage Steps""></a></h4><ol><li><strong>Replace Variables</strong>: Replace <code>$YOUR_HOME_SERVER</code>, <code>$YOUR_NEZHA_URL</code>, <code>$YOUR_MATRIX_USERNAME</code>, <code>$YOUR_MATRIX_PASSWD</code>, and <code>$YOUR_MATRIX_TOKEN</code> with your own values.</li><li><strong>Retrieve Token</strong>: Use the <code>curl</code> command provided above to get <code>YOUR_MATRIX_TOKEN</code>, making sure to replace all relevant variables.</li><li><strong>Configure Request</strong>: Set up your request using the configuration provided above, ensuring the correct URL, headers, and body are used.</li><li><strong>Send Notification</strong>: Send the Matrix message using the configured request to integrate Nezha monitoring notifications into your Matrix room.</li></ol><p>Once configured, you will receive formatted Nezha dashboard information in your Matrix room whenever a notification is triggered.</p></details><h2 id="notification-rule-explanation" tabindex="-1">Notification Rule Explanation <a class="header-anchor" href="#notification-rule-explanation" aria-label="Permalink to "Notification Rule Explanation""></a></h2><h3 id="basic-rules" tabindex="-1">Basic Rules <a class="header-anchor" href="#basic-rules" aria-label="Permalink to "Basic Rules""></a></h3><ul><li><code>type</code>: You can choose one or more types. If multiple types are selected in one rule, <strong>all selected types must be satisfied</strong> to trigger a notification (refer to the examples below) <ul><li><code>cpu</code>, <code>gpu</code>, <code>memory</code>, <code>swap</code>, <code>disk</code></li><li><code>net_in_speed</code> inbound network speed, <code>net_out_speed</code> outbound network speed, <code>net_all_speed</code> total network speed, <code>transfer_in</code> inbound traffic, <code>transfer_out</code> outbound traffic, <code>transfer_all</code> total traffic</li><li><code>offline</code> offline monitoring</li><li><code>load1</code>, <code>load5</code>, <code>load15</code> load</li><li><code>process_count</code> process count (currently resource-intensive due to thread count, not supported temporarily)</li><li><code>tcp_conn_count</code>, <code>udp_conn_count</code> connection count</li><li><code>temperature_max</code> maximum temperature</li></ul></li><li><code>duration</code>: Duration in seconds. An notification is triggered if 30% or more of the samples exceed the threshold within this duration (to prevent data spikes).</li><li><code>min</code> or <code>max</code>: <ul><li>For traffic and network speed, the unit is bytes (1KB = 1024B, 1MB = 1024 * 1024B)</li><li>For memory, disk, and CPU, the unit is percentage</li><li>No need to set this for offline monitoring</li></ul></li><li><code>cover</code>: <ul><li><code>0</code> monitors all servers, use <code>ignore</code> to exclude specific servers</li><li><code>1</code> ignores all servers, use <code>ignore</code> to monitor specific servers<br> Example: <code>[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]</code></li></ul></li><li><code>ignore</code>: Select specific servers to exclude, used with <code>cover</code>, content is server ID and boolean value, e.g., <code>{"1": true, "2": false}</code></li></ul><p><strong>Complete Examples:</strong></p><p>Add an offline notification:</p><ul><li>Name: Offline Notification</li><li>Rule: <code>[{"Type":"offline","Duration":10}]</code></li><li>Enabled: √</li></ul><p>Add an notification for CPU usage exceeding 50% for 10 seconds <strong>and</strong> memory usage below 20% for 20 seconds:</p><ul><li>Name: CPU+Memory</li><li>Rule: <code>[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]</code></li><li>Enabled: √</li></ul><p>Send notifications for specific servers to specific notification groups:</p><p>Scenario example:<br> There are 4 servers (1, 2, 3, 4) and two notification groups (A, B).<br> Notify group A if servers 1 and 2 are offline for 10 minutes.<br> Notify group B if servers 3 and 4 are offline for 10 minutes.</p><p>First, set up notification groups A and B, then add two notification rules:</p><p><strong>Rule 1:</strong></p><ul><li>Name: 1, 2 Offline, Send to Notification Group A</li><li>Rule: <code>[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]</code></li><li>Notification Group: A</li><li>Enabled: √</li></ul><p><strong>Rule 2:</strong></p><ul><li>Name: 3, 4 Offline, Send to NotificLine truncated
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="configuring-oidc-authentication" tabindex="-1">Configuring OIDC Authentication <a class="header-anchor" href="#configuring-oidc-authentication" aria-label="Permalink to "Configuring OIDC Authentication""></a></h1><p>Modify the contents of <code>config.yaml</code> 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.</p><h2 id="configuration-details" tabindex="-1">Configuration Details <a class="header-anchor" href="#configuration-details" aria-label="Permalink to "Configuration Details""></a></h2><p>Here is a step-by-step guide to configuring the OIDC settings in your <code>config.yaml</code>:</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">oauth2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> type</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">oidc</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (Required) Specifies the authentication type as OIDC</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> oidcDisplayName</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">OIDC</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (Optional, default: OIDC) The name displayed on the login page</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> admin</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (Fill at least one of admin or adminGroups; default: empty) Admin usernames, separated by commas. Users listed here are considered administrators</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> adminGroups</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">""</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (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</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> clientid</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># (Required) OIDC client ID</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> clientsecret</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># (Required) OIDC client secret</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> oidcIssuer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">https://auth.example.com/realms/master</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (Required) The issuer URL of the OIDC provider, obtainable from your OIDC provider</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # oidcLogoutUrl: https://auth.example.com/realms/master/protocol/openid-connect/logout # (Currently unusable due to a bug)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # oidcRegisterUrl: # (Optional) Registration link provided by the OIDC provider</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> oidcScopes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">openid,profile,email</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (Optional, default: openid,profile,email) OIDC scopes requested, separated by commas</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> oidcLoginClaim</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">sub</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (Optional, default: sub) The username field returned by OIDC, can be preferred_username, sub, or email</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> oidcGroupsClaim</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">groups</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (Required if using adminGroups, default: groups) The user group information field returned by OIDC, can be groups or roles</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> oidcAutoCreate</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (Optional, default: false) Whether to automatically create a user if they do not exist</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;"> oidcAutoLogin</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # (Optional, default: false) Whether to automatically redirect to the OIDC login page when the path is /login</span></span></code></pre></div>`,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};
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="customize-geoip-database" tabindex="-1">Customize GeoIP database <a class="header-anchor" href="#customize-geoip-database" aria-label="Permalink to "Customize GeoIP database""></a></h1><p>Dashboard v0.18.3+ uses an embedded GeoIP database to query IP locations. An IPinfo format mmdb database is required to be placed at <code>pkg/geoip/geoip.db</code> to compile the Dashboard with working GeoIP queries.</p><p>An IPinfo format mmdb is constructed by those fields:</p><ul><li>An IP subnet as an entry</li><li><code>continent</code>:Continent code</li><li><code>continent_name</code>:Continent name</li><li><code>country</code>:Country code</li><li><code>country_name</code>:Country name</li></ul><p>Dashboard only requires the <code>country</code> field, and other fields can be left empty.</p><h2 id="editing-database" tabindex="-1">Editing database <a class="header-anchor" href="#editing-database" aria-label="Permalink to "Editing database""></a></h2><p>It is recommended to use <code>mmdbwriter</code> and <code>maxminddb-golang</code> libraries for editing mmdb databases as of now.</p><p>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 <a href="https://github.com/SagerNet/sing-geoip" target="_blank" rel="noreferrer">sing-geoip</a> project.</p><p>Using the correction of IPinfo data as an example, you need to use the <code>ReplaceWith</code> inserter (which is the default value) and write the <code>mmdbtype.Map</code> information:</p><div class="language-go vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">go</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">subnet </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:=</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">net</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">IPNet</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> IP: net.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ParseIP</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"114.5.1.4"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Mask: net.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">CIDRMask</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">32</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">32</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">countryMap </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> make</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">map</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mmdbtype</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">String</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mmdbtype</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">String</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">countryMap[mmdbtype.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">String</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"country"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> mmdbtype.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">String</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"JP"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> err </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> writer.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Insert</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(subnet, mmdbtype.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">Map</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(countryMap)); err </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> nil</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> err</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>A <code>writer</code> is an instance of <code>*mmdbwriter.Tree</code> and needs to be created using the <code>mmdbwriter.New</code> method. The specific operations and the process of inserting other fields are not mentioned here.</p><p>After writing the database information to a file, you can use the <code>mmdbinspect</code> CLI tool to test the database information. For example:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mmdbinspect</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -db</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./country.mmdb</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 114.5.1.4</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Database"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"./country.mmdb"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Records"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Network"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"114.5.1.4/32"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Record"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "continent"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"AS"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "continent_name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Asia"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "country"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"JP"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "country_name"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Japan"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
|
||||
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Lookup"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"114.5.1.4"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span></code></pre></div><p>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 <code>grpcurl</code> or similar tools:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">grpcurl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -proto</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./nezha/proto/nezha.proto</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -plaintext</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'client_secret: test'</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '{"ip": "114.5.1.4"}'</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 127.0.0.1:5555</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> proto.NezhaService/LookupGeoIP</span></span></code></pre></div>`,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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="agent-startup-online-troubleshooting-process" tabindex="-1">Agent Startup/Online Troubleshooting Process <a class="header-anchor" href="#agent-startup-online-troubleshooting-process" aria-label="Permalink to "Agent Startup/Online Troubleshooting Process""></a></h1><ol><li>Directly execute <code>/opt/nezha/agent/nezha-agent -s DashboardIP or non-CDN domain:RPCPort -p AgentKey -d</code> to check if the logs indicate timeouts due to DNS or poor network conditions.</li><li>Use <code>nc -v Domain/IP RPCPort</code> or <code>telnet Domain/IP RPCPort</code> 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 <a href="https://port.ping.pe/" target="_blank" rel="noreferrer">https://port.ping.pe/</a>.</li><li>If the above steps indicate no issues but the Agent still does not go online correctly, try disabling SELinux. <a href="https://www.google.com/search?q=disable+SELINUX" target="_blank" rel="noreferrer">How to disable SELinux?</a></li></ol>',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};
|
||||
@@ -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};
|
||||
@@ -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(`<h1 id="reverse-proxy-grpc-port-supports-cloudflare-cdn" tabindex="-1">Reverse Proxy gRPC Port (Supports Cloudflare CDN) <a class="header-anchor" href="#reverse-proxy-grpc-port-supports-cloudflare-cdn" aria-label="Permalink to "Reverse Proxy gRPC Port (Supports Cloudflare CDN)""></a></h1><p>Using Nginx or Caddy to reverse proxy gRPC</p><ul><li>Nginx Configuration</li></ul><div class="language-nginx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">nginx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> listen </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">443</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ssl http2;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> listen </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[::]:443 ssl http2;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> server_name </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">data.example.com; </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Your domain that the Agent uses to connect to the Dashboard</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ssl_certificate </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /data/letsencrypt/fullchain.pem; </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Path to your domain certificate</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ssl_certificate_key </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /data/letsencrypt/key.pem; </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Path to your domain private key</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ssl_stapling </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">on</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ssl_session_timeout </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1d</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ssl_session_cache </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">shared:SSL:10m; </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># This might conflict with other configuration files; comment it out if there are conflicts</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ssl_protocols </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">TLSv1.1 TLSv1.2 TLSv1.3;</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> underscores_in_headers </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">on</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> keepalive_time </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">24h</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> keepalive_requests </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">100000</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> keepalive_timeout </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">120s</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> location</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> / </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> grpc_read_timeout </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">300s</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> grpc_send_timeout </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">300s</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> grpc_socket_keepalive </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">on</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> grpc_pass </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">grpc://grpcservers;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">upstream</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> grpcservers </span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> server</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> localhost:5555;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> keepalive </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">512</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><ul><li>Caddy Configuration</li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>data.example.com:443 { # Your domain that the Agent uses to connect to the Dashboard</span></span>
|
||||
<span class="line"><span> reverse_proxy {</span></span>
|
||||
<span class="line"><span> to localhost:5555</span></span>
|
||||
<span class="line"><span> transport http {</span></span>
|
||||
<span class="line"><span> versions h2c 2</span></span>
|
||||
<span class="line"><span> }</span></span>
|
||||
<span class="line"><span> }</span></span>
|
||||
<span class="line"><span>}</span></span></code></pre></div><p>Dashboard Configuration</p><ul><li>First, log in to the Dashboard and go to the settings page. In the <code>Non-CDN Dashboard server domain/IP</code> field, enter the domain configured in Nginx or Caddy in the previous step, for example, <code>data.example.com</code>, and save it.</li><li>Then, on the Dashboard server, open the <code>/opt/nezha/dashboard/data/config.yaml</code> file. Modify <code>proxygrpcport</code> to the port that Nginx or Caddy is listening to, for example, <code>443</code>. Since we enabled SSL/TLS in Nginx or Caddy, set <code>tls</code> to <code>true</code>. After making these changes, restart the Dashboard.</li></ul><p>Agent Configuration</p><ul><li>Log in to the Dashboard management backend, copy the one-click installation command, and execute it on the corresponding server to reinstall the agent.</li></ul><p>Enabling Cloudflare CDN (Optional)</p><p>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).</p><ul><li>Log in to Cloudflare, select the domain you are using. Go to the <code>Network</code> tab and turn on the <code>gRPC</code> switch. Then, go to the <code>DNS</code> 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.</li></ul><p>After enabling <code>gRPC</code>, it might not be available immediately, and you may need to wait for a while. You can use <code>curl</code> and <code>nezha-agent -d</code> to verify:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">localhost:~/agent#</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "content-type: application/grpc+proto"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "authorization: Bearer test"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://xxx.xxx.ovh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -v</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> processing: https://xxx.xxx.ovh</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Trying [2606:4700:3035::ac43:8bed]:443...</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Connected to xxx.xxx.ovh (</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">2606:4700:3035::ac43:8bed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) port 443</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># ... SSL info</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> using HTTP/2</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> h2 [:method: GET]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> h2 [:scheme: https]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> h2 [:authority: xxx.xxx.ovh]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> h2 [:path: /]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> h2 [user-agent: curl/8.2.1]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> h2 [accept: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Using Stream ID: 1</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> GET / HTTP/2</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Host: xxx.xxx.ovh</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> User-Agent: curl/8.4.0</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Accept: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">*</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> content-type: application/grpc+proto</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> authorization: Bearer test</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> HTTP/2 405 </span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> date: Wed, 20 Dec 2023 08:56:27 GMT</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> content-type: application/grpc+proto</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cf-ray: 8386ac12dabd5ddc-HKG</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cf-cache-status: DYNAMIC</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> grpc-message: Received a HEADERS frame with :method </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"GET"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> which should be POST</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> grpc-status: 13</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> report-to: {</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">"endpoints"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">:</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">[{</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">"</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">url</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">":"</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">"}],"</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">group</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">":"</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cf-nel</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">","</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">max_age</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">":604800}</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">< nel: {"</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">success_fraction</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">":0,"</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">report_to</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">":"</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cf-nel</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">","</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">max_age</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">":604800}</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">< vary: Accept-Encoding</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">< server: cloudflare</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">< alt-svc: h3="</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">:443</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">"; ma=86400</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">< </span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">* Connection #0 to host xxx.xxx.ovh left intact</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">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</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">NEZHA@2023-12-20 05:14:01>> Error to close connection ...</span></span></code></pre></div>`,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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="how-to-perform-data-migration-and-backup-recovery" tabindex="-1">How to Perform Data Migration and Backup Recovery? <a class="header-anchor" href="#how-to-perform-data-migration-and-backup-recovery" aria-label="Permalink to "How to Perform Data Migration and Backup Recovery?""></a></h1><ol><li>Run the one-click script and choose <code>Stop Dashboard</code>.</li><li>On the old server, package the <code>/opt/nezha</code> folder, copy it to the same location in the new environment, and extract it.</li><li>In the new server, run the one-click script and choose <code>Start Dashboard</code>.</li></ol>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="how-to-reset-traffic-statistics-monthly" tabindex="-1">How to Reset Traffic Statistics Monthly? <a class="header-anchor" href="#how-to-reset-traffic-statistics-monthly" aria-label="Permalink to "How to Reset Traffic Statistics Monthly?""></a></h1><p>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:</p><ol><li>Go to the <code>Notification</code> page in the management panel.</li><li>Refer to <a href="/en_US/guide/notifications.html#special-any-cycle-transfer-notification">this document</a> to create a monthly traffic notification.</li><li>Return to the homepage and go to the <code>Services</code> page, where you can see the monthly traffic statistics. The statistics here will not reset when the server restarts.</li></ol><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>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!</p></div>',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};
|
||||
@@ -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};
|
||||
@@ -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('<h1 id="customizing-agent-monitoring-items" tabindex="-1">Customizing Agent Monitoring Items <a class="header-anchor" href="#customizing-agent-monitoring-items" aria-label="Permalink to "Customizing Agent Monitoring Items""></a></h1><h2 id="customize-monitoring-for-network-interfaces-and-disk-partitions" tabindex="-1">Customize Monitoring for Network Interfaces and Disk Partitions <a class="header-anchor" href="#customize-monitoring-for-network-interfaces-and-disk-partitions" aria-label="Permalink to "Customize Monitoring for Network Interfaces and Disk Partitions""></a></h2><p>Execute the following command to select network interfaces and partitions, then restart the Agent for changes to take effect:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">/opt/nezha/agent/nezha-agent</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> edit</span></span></code></pre></div><h2 id="additional-runtime-parameters" tabindex="-1">Additional Runtime Parameters <a class="header-anchor" href="#additional-runtime-parameters" aria-label="Permalink to "Additional Runtime Parameters""></a></h2><h3 id="viewing-supported-parameters" tabindex="-1">Viewing Supported Parameters <a class="header-anchor" href="#viewing-supported-parameters" aria-label="Permalink to "Viewing Supported Parameters""></a></h3><p>To view the supported runtime parameters, please execute the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./nezha-agent</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --help</span></span></code></pre></div><h3 id="configuring-parameters" tabindex="-1">Configuring Parameters <a class="header-anchor" href="#configuring-parameters" aria-label="Permalink to "Configuring Parameters""></a></h3><p>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 <code>/etc/systemd/system/nezha-agent.service</code> and append your desired parameters at the end of the <code>ExecStart=</code> line:</p><ul><li><code>--report-delay</code>: 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).</li><li><code>--skip-conn</code>: Disables monitoring of network connections. Recommended for servers with high numbers of connections or high CPU usage.</li><li><code>--skip-procs</code>: Disables monitoring of process counts, helping to reduce resource usage of the Agent.</li><li><code>--disable-auto-update</code>: Disables the <strong>automatic update</strong> feature of the Agent, enhancing security.</li><li><code>--disable-force-update</code>: Disables the <strong>forced update</strong> feature of the Agent, enhancing security.</li><li><code>--disable-command-execute</code>: Prevents execution of any scheduled tasks or use of the WebSSH on the Agent, enhancing security.</li><li><code>--tls</code>: 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.</li><li><code>--use-ipv6-countrycode</code>: 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.</li><li><code>--gpu</code>: Enables GPU monitoring. Note: Monitoring GPU usage may require installation of additional dependencies. For more details, refer to the documentation: <a href="/en_US/guide/q9.html">Enable GPU Monitoring</a>.</li><li><code>--temperature</code>: Enables hardware temperature monitoring. Only effective on supported hardware, some VPS may not be able to retrieve temperature information.</li><li><code>-d</code> <code>--debug</code>: Enables debug mode.</li><li><code>-u</code> <code>--ip-report-period</code>: Set IP update interval. Is only effective when the set value is higher than <code>--report-delay</code>. The default is 1800 seconds.</li><li><code>-k</code> <code>--insecure</code>: Disable TLS certificate intLine truncated
|
||||