哪吒监控的Dashboard已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化
WARNING
哪吒监控使用 Crowdin 平台翻译文本,请不要直接修改除 zh-CN.toml
以外的toml文件
介绍
- 你可以直接使用
/resource/l10n/zh-CN.toml
中的配置来替换新功能中的文本 - 如果新功能中有新的文本,请将新文本拉取到
zh-CN.toml
中 - 在Pull Request被合并后,你可以前往 Crowdin 平台贡献新文本的翻译
diff --git a/assets/en_US_guide_agent.md.eb18d6fc.js b/assets/en_US_guide_agent.md.405e94e9.js similarity index 59% rename from assets/en_US_guide_agent.md.eb18d6fc.js rename to assets/en_US_guide_agent.md.405e94e9.js index 1054cf90..9468cdce 100644 --- a/assets/en_US_guide_agent.md.eb18d6fc.js +++ b/assets/en_US_guide_agent.md.405e94e9.js @@ -1,4 +1,4 @@ -import{_ as e,c as n,o as t,d as a}from"./app.c59cf861.js";const m='{"title":"Install Agent using one-click script","description":"","frontmatter":{},"headers":[{"level":2,"title":"Install Agent using one-click script","slug":"install-agent-using-one-click-script"},{"level":3,"title":"Preparation","slug":"preparation"},{"level":3,"title":"One-click installation on Linux","slug":"one-click-installation-on-linux"},{"level":3,"title":"One-click installation on Windows","slug":"one-click-installation-on-windows"},{"level":2,"title":"Other ways to install Agent","slug":"other-ways-to-install-agent"},{"level":3,"title":"Installing Agent on Linux","slug":"installing-agent-on-linux"},{"level":3,"title":"Installing Agent on Windows","slug":"installing-agent-on-windows"},{"level":3,"title":"Installing Agent on OpenWRT","slug":"installing-agent-on-openwrt"},{"level":2,"title":"Customize Agent","slug":"customize-agent"}],"relativePath":"en_US/guide/agent.md"}',i={},o=a(`
The service in the monitored server is called Agent. This document will describe how to install the Agent on the monitored server and connect it with Dashboard
Nezha Monitoring now supports one-click installation of the Agent on Windows and Linux. Follow the steps in this document and you can easily deploy it on your server
First of all, you need to set up the communication domain name in the settings page of the admin panel, this domain name can not connect to the CDN, here is the sample communication domain name "data.example.com" mentioned earlier for demonstration
Enter the administration panel, go to the "Settings" page, in the item "CDN Bypassed Domain/IP ", fill in the communication domain name, and then click "Save"
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
+import{_ as e,c as n,o as t,d as a}from"./app.c59cf861.js";const m='{"title":"Install Agent using one-click script","description":"","frontmatter":{},"headers":[{"level":2,"title":"Install Agent using one-click script","slug":"install-agent-using-one-click-script"},{"level":3,"title":"Preparation","slug":"preparation"},{"level":3,"title":"One-click installation on Linux","slug":"one-click-installation-on-linux"},{"level":3,"title":"One-click installation on Windows","slug":"one-click-installation-on-windows"},{"level":2,"title":"Other ways to install Agent","slug":"other-ways-to-install-agent"},{"level":3,"title":"Installing Agent on Linux","slug":"installing-agent-on-linux"},{"level":3,"title":"Installing Agent on Windows","slug":"installing-agent-on-windows"},{"level":3,"title":"Installing Agent on OpenWRT","slug":"installing-agent-on-openwrt"},{"level":2,"title":"Customize Agent","slug":"customize-agent"},{"level":2,"title":"FAQ","slug":"faq"},{"level":3,"title":"Is there a Docker image for Agent?","slug":"is-there-a-docker-image-for-agent"}],"relativePath":"en_US/guide/agent.md"}',i={},o=a(`The service in the monitored server is called Agent. This document will describe how to install the Agent on the monitored server and connect it with Dashboard
Install Agent using one-click script
Nezha Monitoring now supports one-click installation of the Agent on Windows and Linux. Follow the steps in this document and you can easily deploy it on your server
Preparation
First of all, you need to set up the communication domain name in the settings page of the admin panel, this domain name can not connect to the CDN, here is the sample communication domain name "data.example.com" mentioned earlier for demonstration
Enter the administration panel, go to the "Settings" page, in the item "CDN Bypassed Domain/IP ", fill in the communication domain name, and then click "Save"
One-click installation on Linux
- First add a server in the admin panel
- Click on the green Linux icon button next to the newly added server and copy the one-click installation command
- Run the copied one-click installation command on the monitored server, wait for the installation to complete, and then return to the Dashboard home page to see if the server is online.
One-click installation on Windows
- First add a server in the admin panel
- Click on the green Linux icon button next to the newly added server and copy the one-click installation command
- Login to Windows Server, open PowerShell, and run the copied installation command in PowerShell
- If you encounter the prompt "Implement Policy Change" please select Y
- Wait for the installation to complete and return to the Dashboard home page to see if the server is online
Other ways to install Agent
Installing Agent on Linux
- First add a server in the admin panel
- In the monitored server, run the script:
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
- Select \u201CInstall_agent\u201D
- Input the communication domain name, e.g. "data.example.com"
- Input RPC port, default is 5555
- Input the Agent Secret, which is generated when adding a server in the administration panel and can be found in the " Servers " page of the administration panel
- Wait for the installation to complete and return to the Dashboard home page to see if the server is online
Installing Agent on Windows
- Please refer to the community article: \u54EA\u5412\u63A2\u9488 - Windows \u5BA2\u6237\u7AEF\u5B89\u88C5(Chinese)
Installing Agent on OpenWRT
How to make the old version of OpenWRT/LEDE self-boot?
- Please refer to the project:
\u54EA\u5412\u76D1\u63A7 For OpenWRT (Chinese)
How to make the new version of OpenWRT self-boot? By @\u827E\u65AF\u5FB7\u65AF
- First download the corresponding binary from the release, unzip the zip package and place it in
/root
- Then run
chmod +x /root/nezha-agent
to give it execute access, create file /etc/init.d/nezha-service
\uFF1A
#!/bin/sh /etc/rc.common
START=99
@@ -20,4 +20,4 @@ import{_ as e,c as n,o as t,d as a}from"./app.c59cf861.js";const m='{"title":"In
sleep 2
start
}
-
- Give it permission to execute:
chmod +x /etc/init.d/nezha-service
- Start the service
/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
Customize Agent
Customize the NIC and hard drive partitions to be monitored
- Run
/opt/nezha/agent/nezha-agent --edit-agent-config
to select a custom NIC and partition, and then restart Agent
Other Flags
Run ./nezha-agent --help
to view supported flags\uFF0Cif you are already using the one-click script, you can edit /etc/systemd/system/nezha-agent.service
\uFF0Cat the end of this line ExecStart=
add:
--report-delay
System information reporting interval, default is 1 second, can be set to 3 to reduce the system resource usage on the agent side (configuration range 1-4)--skip-conn
Not monitoring the number of connections, if it is a server with a large number of connections, the CPU usage will be high. It is recommended to set this to reduce CPU usage--skip-procs
Disable monitoring the number of processes can also reduce CPU and memory usage--disable-auto-update
Disable Automatic Update Agent (security feature)--disable-force-update
Disable Forced Update Agent (security feature)--disable-command-execute
Disable execution of scheduled tasks, disallow WebShell (security feature)--tls
Enable SSL/TLS encryption (If you are using nginx to reverse proxy Agent\xB4s grpc connections, and if nginx has SSL/TLS enabled, you need to enable this configuration)
`,30),s=[o];function l(r,c,d,p,h,u){return t(),n("div",null,s)}var f=e(i,[["render",l]]);export{m as __pageData,f as default};
+
chmod +x /etc/init.d/nezha-service
/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
/opt/nezha/agent/nezha-agent --edit-agent-config
to select a custom NIC and partition, and then restart AgentRun ./nezha-agent --help
to view supported flags\uFF0Cif you are already using the one-click script, you can edit /etc/systemd/system/nezha-agent.service
\uFF0Cat the end of this line ExecStart=
add:
--report-delay
System information reporting interval, default is 1 second, can be set to 3 to reduce the system resource usage on the agent side (configuration range 1-4)--skip-conn
Not monitoring the number of connections, if it is a server with a large number of connections, the CPU usage will be high. It is recommended to set this to reduce CPU usage--skip-procs
Disable monitoring the number of processes can also reduce CPU and memory usage--disable-auto-update
Disable Automatic Update Agent (security feature)--disable-force-update
Disable Forced Update Agent (security feature)--disable-command-execute
Disable execution of scheduled tasks, disallow WebShell (security feature)--tls
Enable SSL/TLS encryption (If you are using nginx to reverse proxy Agent\xB4s grpc connections, and if nginx has SSL/TLS enabled, you need to enable this configuration)There is currently no Docker image for Agent.
The Agent is designed to be the opposite of the Dashboard, in that the Dashboard is designed to work without affecting the server as much as possible, while the Agent needs to execute monitoring services and run commands in the server.
Putting the Agent in a container does continue to execute monitoring services, but features such as WebShell do not work, so we do not provide Docker image of the Agent.
To setup a Nezha monitorning Dashboard, you need these things:
TIP
If you want to use CDN, please prepare two domains, one connect to CDN for public access, CDN needs to support WebSocket protocol; the other domain should not connect to CDN, use it as Agent to send data to Dashboard.
This document uses "cdn.example.com" and "data.example.com" domains to demonstrate respectively
This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only
Nezha Monitor uses a Github account as the login account for the admin panel
Application name
- Fill in as you likeHomepage URL
- Fill in the panel's access domain name, such as: "http://cdn.example.com"Authorization callback URL
- Fill in the callback address, e.g., "http://cdn.example.com/oauth2/callback"curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
-
After waiting for the Docker installation to complete, input the following settings:OAuth2 provider
- GithubClient ID
- Previously saved Client IDClient Secret
- Previously saved secretGitHub/Gitee login name
- Github usernameSite title
- Custom site titleSite access port
- Public access port, customizable, default 8008RPC port
- The communication port between Agent and Dashboard, default 5555
After the input is complete, wait to pull the mirror
After the installation, if everything is fine, you can visit the domain + port number, such as "http://cdn.example.com:8008" to view the Dashboard
In the future, if you need to run the script again, you can run:
./nezha.sh
-
to open the management script
Create a new site in the aaPanel, fill in the public access domain name, such as "http://cdn.example.com", then click "Settings" to enter the site settings option, select " Reverse proxy" - "New reverse proxy"
Customize a proxy name, fill in http://127.0.0.1
in the "Target URL" and click "Save"
Open the " configuration" to the right of the new reverse proxy you just created and replace the configuration file with the following:
#PROXY-START/
-location / {
- proxy_pass http://127.0.0.1:8008;
- proxy_set_header Host $host;
- proxy_set_header Upgrade $http_upgrade;
-}
-location ~ ^/(ws|terminal/.+)$ {
- proxy_pass http://127.0.0.1:8008;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "Upgrade";
- proxy_set_header Host $host;
-}
-#PROXY-END/
-
CaddyServer v1\uFF08v2 no special configuration required\uFF09
proxy /ws http://ip:8008 {
- websocket
-}
-proxy /terminal/* http://ip:8008 {
- websocket
-}
-
First, temporarily disable the reverse proxy
As with other websites, you can choose to automatically apply for a Let\xB4s Encrypt certificate or manually configure an existing certificate by going to "SSL" in the site settings
After you finish setting up SSL, you need to go back to https://github.com/settings/developers and edit the authentication application you created before, change all the domain names in the "Homepage URL" and "Authorization callback URL" you filled in before from http
to https
, such as: "https://cdn.example.com" and "https://cdn.example.com/oauth2/callback", If you don't change these links, you may not be able to log into the admin panel
To setup a Nezha monitorning Dashboard, you need these things:
TIP
If you want to use CDN, please prepare two domains, one connect to CDN for public access, CDN needs to support WebSocket protocol; the other domain should not connect to CDN, use it as Agent to send data to Dashboard.
This document uses "cdn.example.com" and "data.example.com" domains to demonstrate respectively
This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only
Nezha Monitor uses a Github account as the login account for the admin panel
Application name
- Fill in as you likeHomepage URL
- Fill in the panel's access domain name, such as: "http://cdn.example.com"Authorization callback URL
- Fill in the callback address, e.g., "http://cdn.example.com/oauth2/callback"curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
+
After waiting for the Docker installation to complete, input the following settings:OAuth2 provider
- GithubClient ID
- Previously saved Client IDClient Secret
- Previously saved secretGitHub/Gitee login name
- Github usernameSite title
- Custom site titleSite access port
- Public access port, customizable, default 8008RPC port
- The communication port between Agent and Dashboard, default 5555
After the input is complete, wait to pull the mirror
After the installation, if everything is fine, you can visit the domain + port number, such as "http://cdn.example.com:8008" to view the Dashboard
In the future, if you need to run the script again, you can run:
./nezha.sh
+
to open the management script
Create a new site in the aaPanel, fill in the public access domain name, such as "http://cdn.example.com", then click "Settings" to enter the site settings option, select " Reverse proxy" - "New reverse proxy"
Customize a proxy name, fill in http://127.0.0.1
in the "Target URL" and click "Save"
Open the " configuration" to the right of the new reverse proxy you just created and replace the configuration file with the following:
#PROXY-START/
+location / {
+ proxy_pass http://127.0.0.1:8008;
+ proxy_set_header Host $host;
+ proxy_set_header Upgrade $http_upgrade;
+}
+location ~ ^/(ws|terminal/.+)$ {
+ proxy_pass http://127.0.0.1:8008;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "Upgrade";
+ proxy_set_header Host $host;
+}
+#PROXY-END/
+
CaddyServer v1\uFF08v2 no special configuration required\uFF09
proxy /ws http://ip:8008 {
+ websocket
+}
+proxy /terminal/* http://ip:8008 {
+ websocket
+}
+
First, temporarily disable the reverse proxy
As with other websites, you can choose to automatically apply for a Let\xB4s Encrypt certificate or manually configure an existing certificate by going to "SSL" in the site settings
After you finish setting up SSL, you need to go back to https://github.com/settings/developers and edit the authentication application you created before, change all the domain names in the "Homepage URL" and "Authorization callback URL" you filled in before from http
to https
, such as: "https://cdn.example.com" and "https://cdn.example.com/oauth2/callback", If you don't change these links, you may not be able to log into the admin panel
Commonly used in requirements such as batch installation of Agents, where you can modify the database directly.
Please note that not everything can be modified in the database, wrong modification will lead to data confusion and failure to start Dashboard, please do not modify the database at will!
WARNING
Again, please do not modify the database at will!
If you need to modify the data in the database, please stop the Dashboard container before modifying it.
The database type is sqlite3, located in /opt/nezha/dashboard/data/sqlite.db
, please backup before modifying the data
The documentation does not provide an explanation of the database. If you have the ability to modify the database, you should be able to read it with a little thinking.
The Agent normally updates automatically, but the Dashboard does not and needs to be updated manually.
Run the script . /nezha.sh
and select restart Dashboard and update
\u54EA\u5412\u76D1\u63A7\u7684\u88AB\u63A7\u7AEF\u670D\u52A1\u88AB\u79F0\u4E3AAgent\uFF0C\u672C\u6587\u6863\u5C06\u4ECB\u7ECD\u5982\u4F55\u5728\u88AB\u63A7\u7AEF\u670D\u52A1\u5668\u4E0A\u5B89\u88C5Agent\uFF0C\u5E76\u4E0EDashboard\u8FDE\u63A5
\u76EE\u524D\u54EA\u5412\u76D1\u63A7\u5DF2\u652F\u6301\u5728Windows\u548CLinux\u4E0A\u4E00\u952E\u5B89\u88C5Agent\uFF0C\u9075\u5FAA\u672C\u6587\u6863\u7684\u6B65\u9AA4\uFF0C\u4F60\u53EF\u4EE5\u5F88\u8F7B\u677E\u7684\u5728\u670D\u52A1\u5668\u4E0A\u90E8\u7F72\u5B83
\u4F60\u9700\u8981\u63D0\u524D\u5728\u7BA1\u7406\u9762\u677F\u4E2D\u8BBE\u7F6E\u597D\u901A\u4FE1\u57DF\u540D\uFF0C\u6B64\u57DF\u540D\u4E0D\u53EF\u4EE5\u63A5\u5165CDN\uFF0C\u8FD9\u91CC\u4EE5\u524D\u9762\u63D0\u5230\u8FC7\u7684\u793A\u4F8B\u901A\u4FE1\u57DF\u540D \u201Cdata.example.com\u201D \u6765\u505A\u6F14\u793A
\u8FDB\u5165\u540E\u53F0\u7BA1\u7406\u9762\u677F\uFF0C\u8F6C\u5230\u201C\u8BBE\u7F6E\u201D\u9875\uFF0C\u5728\u201C\u672A\u63A5\u5165CDN\u7684\u9762\u677F\u670D\u52A1\u5668\u57DF\u540D/IP\u201D\u9879\u4E2D\u586B\u5165\u901A\u4FE1\u57DF\u540D\uFF0C\u7136\u540E\u70B9\u51FB"\u4FDD\u5B58"
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
+import{_ as e,c as n,o as a,d as t}from"./app.c59cf861.js";const b='{"title":"\u4E00\u952E\u5B89\u88C5Agent","description":"","frontmatter":{},"headers":[{"level":2,"title":"\u4E00\u952E\u5B89\u88C5Agent","slug":"\u4E00\u952E\u5B89\u88C5agent"},{"level":3,"title":"\u51C6\u5907\u5DE5\u4F5C","slug":"\u51C6\u5907\u5DE5\u4F5C"},{"level":3,"title":"Linux\u4E00\u952E\u5B89\u88C5","slug":"linux\u4E00\u952E\u5B89\u88C5"},{"level":3,"title":"Windows\u4E00\u952E\u5B89\u88C5","slug":"windows\u4E00\u952E\u5B89\u88C5"},{"level":2,"title":"\u5176\u4ED6\u65B9\u5F0F\u5B89\u88C5Agent","slug":"\u5176\u4ED6\u65B9\u5F0F\u5B89\u88C5agent"},{"level":3,"title":"Linux\u5B89\u88C5Agent","slug":"linux\u5B89\u88C5agent"},{"level":3,"title":"Windows\u5B89\u88C5Agent","slug":"windows\u5B89\u88C5agent"},{"level":3,"title":"OpenWRT\u5B89\u88C5Agent","slug":"openwrt\u5B89\u88C5agent"},{"level":2,"title":"\u81EA\u5B9A\u4E49Agent\u76D1\u63A7\u9879\u76EE","slug":"\u81EA\u5B9A\u4E49agent\u76D1\u63A7\u9879\u76EE"},{"level":2,"title":"FAQ","slug":"faq"},{"level":3,"title":"Agent \u6709 Docker \u955C\u50CF\u5417\uFF1F","slug":"agent-\u6709-docker-\u955C\u50CF\u5417\uFF1F"}],"relativePath":"guide/agent.md"}',s={},o=t(`\u54EA\u5412\u76D1\u63A7\u7684\u88AB\u63A7\u7AEF\u670D\u52A1\u88AB\u79F0\u4E3AAgent\uFF0C\u672C\u6587\u6863\u5C06\u4ECB\u7ECD\u5982\u4F55\u5728\u88AB\u63A7\u7AEF\u670D\u52A1\u5668\u4E0A\u5B89\u88C5Agent\uFF0C\u5E76\u4E0EDashboard\u8FDE\u63A5
\u4E00\u952E\u5B89\u88C5Agent
\u76EE\u524D\u54EA\u5412\u76D1\u63A7\u5DF2\u652F\u6301\u5728Windows\u548CLinux\u4E0A\u4E00\u952E\u5B89\u88C5Agent\uFF0C\u9075\u5FAA\u672C\u6587\u6863\u7684\u6B65\u9AA4\uFF0C\u4F60\u53EF\u4EE5\u5F88\u8F7B\u677E\u7684\u5728\u670D\u52A1\u5668\u4E0A\u90E8\u7F72\u5B83
\u51C6\u5907\u5DE5\u4F5C
\u4F60\u9700\u8981\u63D0\u524D\u5728\u7BA1\u7406\u9762\u677F\u4E2D\u8BBE\u7F6E\u597D\u901A\u4FE1\u57DF\u540D\uFF0C\u6B64\u57DF\u540D\u4E0D\u53EF\u4EE5\u63A5\u5165CDN\uFF0C\u8FD9\u91CC\u4EE5\u524D\u9762\u63D0\u5230\u8FC7\u7684\u793A\u4F8B\u901A\u4FE1\u57DF\u540D \u201Cdata.example.com\u201D \u6765\u505A\u6F14\u793A
\u8FDB\u5165\u540E\u53F0\u7BA1\u7406\u9762\u677F\uFF0C\u8F6C\u5230\u201C\u8BBE\u7F6E\u201D\u9875\uFF0C\u5728\u201C\u672A\u63A5\u5165CDN\u7684\u9762\u677F\u670D\u52A1\u5668\u57DF\u540D/IP\u201D\u9879\u4E2D\u586B\u5165\u901A\u4FE1\u57DF\u540D\uFF0C\u7136\u540E\u70B9\u51FB"\u4FDD\u5B58"
Linux\u4E00\u952E\u5B89\u88C5
- \u9996\u5148\u5728\u7BA1\u7406\u9762\u677F\u4E2D\u6DFB\u52A0\u4E00\u53F0\u670D\u52A1\u5668
- \u70B9\u51FB\u65B0\u6DFB\u52A0\u7684\u670D\u52A1\u5668\u65C1\uFF0C\u7EFF\u8272\u7684Linux\u56FE\u6807\u6309\u94AE\uFF0C\u590D\u5236\u4E00\u952E\u5B89\u88C5\u547D\u4EE4
- \u5728\u88AB\u63A7\u7AEF\u670D\u52A1\u5668\u4E2D\u8FD0\u884C\u590D\u5236\u7684\u4E00\u952E\u5B89\u88C5\u547D\u4EE4\uFF0C\u7B49\u5F85\u5B89\u88C5\u5B8C\u6210\u540E\u8FD4\u56DE\u5230Dashboard\u4E3B\u9875\u67E5\u770B\u670D\u52A1\u5668\u662F\u5426\u4E0A\u7EBF
Windows\u4E00\u952E\u5B89\u88C5
- \u9996\u5148\u5728\u7BA1\u7406\u9762\u677F\u4E2D\u6DFB\u52A0\u4E00\u53F0\u670D\u52A1\u5668
- \u70B9\u51FB\u65B0\u6DFB\u52A0\u7684\u670D\u52A1\u5668\u65C1\uFF0C\u7EFF\u8272\u7684Windows\u56FE\u6807\u6309\u94AE\uFF0C\u590D\u5236\u4E00\u952E\u5B89\u88C5\u547D\u4EE4
- \u8FDB\u5165Windows\u670D\u52A1\u5668\uFF0C\u8FD0\u884CPowerShell\uFF0C\u5728PowerShell\u4E2D\u8FD0\u884C\u590D\u5236\u7684\u5B89\u88C5\u547D\u4EE4
- \u5982\u9047\u5230\u786E\u8BA4\u300C\u6267\u884C\u7B56\u7565\u53D8\u66F4\u300D\u8BF7\u9009\u62E9 Y
- \u7B49\u5F85\u5B89\u88C5\u5B8C\u6210\u540E\u8FD4\u56DEDashboard\u4E3B\u9875\u67E5\u770B\u670D\u52A1\u5668\u662F\u5426\u4E0A\u7EBF
\u5176\u4ED6\u65B9\u5F0F\u5B89\u88C5Agent
Linux\u5B89\u88C5Agent
- \u9996\u5148\u5728\u7BA1\u7406\u9762\u677F\u4E2D\u6DFB\u52A0\u4E00\u53F0\u670D\u52A1\u5668
- \u5728\u88AB\u63A7\u670D\u52A1\u5668\u4E2D\uFF0C\u8FD0\u884C\u811A\u672C\uFF08\u4F4D\u4E8E\u4E2D\u56FD\u5927\u9646\u7684\u670D\u52A1\u5668\u8BF7\u4F7F\u7528\u955C\u50CF\uFF09\uFF1A
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
\u5982\u679C\u4F60\u7684\u88AB\u63A7\u670D\u52A1\u5668\u4F4D\u4E8E\u4E2D\u56FD\u5927\u9646\uFF0C\u53EF\u4EE5\u4F7F\u7528\u955C\u50CF\uFF1A
curl -L https://fastly.jsdelivr.net/gh/naiba/nezha@master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
- \u9009\u62E9\u201C\u5B89\u88C5\u76D1\u63A7Agent\u201D
- \u8F93\u5165\u901A\u4FE1\u57DF\u540D\uFF0C\u5982\uFF1A\u201Ddata.example.com\u201C
- \u8F93\u5165\u9762\u677F\u901A\u4FE1\u7AEF\u53E3\uFF08RPC\u7AEF\u53E3\uFF09\uFF0C\u9ED8\u8BA4\u4E3A5555
- \u8F93\u5165Agent\u5BC6\u94A5\uFF0CAgent\u5BC6\u94A5\u5728\u7BA1\u7406\u9762\u677F\u4E2D\u6DFB\u52A0\u670D\u52A1\u5668\u65F6\u751F\u6210\uFF0C\u53EF\u4EE5\u5728\u7BA1\u7406\u9762\u677F\u4E2D\u7684\u201C\u4E3B\u673A\u201D\u9875\u4E2D\u627E\u5230
- \u7B49\u5F85\u5B89\u88C5\u5B8C\u6210\u540E\u8FD4\u56DEDashboard\u4E3B\u9875\u67E5\u770B\u670D\u52A1\u5668\u662F\u5426\u4E0A\u7EBF
Windows\u5B89\u88C5Agent
- \u8BF7\u53C2\u8003\u793E\u533A\u6587\u7AE0\uFF1A
\u54EA\u5412\u63A2\u9488 - Windows \u5BA2\u6237\u7AEF\u5B89\u88C5
OpenWRT\u5B89\u88C5Agent
\u5982\u4F55\u4F7F \u65E7\u7248OpenWRT/LEDE \u81EA\u542F\u52A8
- \u8BF7\u53C2\u8003\u9879\u76EE\uFF1A
\u54EA\u5412\u76D1\u63A7 For OpenWRT
\u5982\u4F55\u4F7F \u65B0\u7248OpenWRT \u81EA\u542F\u52A8\uFF1F\u6765\u81EA @\u827E\u65AF\u5FB7\u65AF
- \u9996\u5148\u5728 release \u4E0B\u8F7D\u5BF9\u5E94\u7684\u4E8C\u8FDB\u5236\u89E3\u538B zip \u5305\u540E\u653E\u7F6E\u5230
/root
- \u8FD0\u884C
chmod +x /root/nezha-agent
\u8D4B\u4E88\u6267\u884C\u6743\u9650\uFF0C\u7136\u540E\u521B\u5EFA /etc/init.d/nezha-service
\uFF1A
#!/bin/sh /etc/rc.common
@@ -21,4 +21,4 @@ import{_ as e,c as n,o as a,d as t}from"./app.c59cf861.js";const b='{"title":"\u
sleep 2
start
}
-
- \u8FD0\u884C
chmod +x /etc/init.d/nezha-service
\u8D4B\u4E88\u6267\u884C\u6743\u9650 - \u542F\u52A8\u670D\u52A1\uFF1A
/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
\u81EA\u5B9A\u4E49Agent\u76D1\u63A7\u9879\u76EE
\u81EA\u5B9A\u4E49\u76D1\u63A7\u7684\u7F51\u5361\u548C\u786C\u76D8\u5206\u533A
- \u6267\u884C
/opt/nezha/agent/nezha-agent --edit-agent-config
\u6765\u9009\u62E9\u81EA\u5B9A\u4E49\u7684\u7F51\u5361\u548C\u5206\u533A\uFF0C\u7136\u540E\u91CD\u542F Agent \u5373\u53EF\u751F\u6548
\u5176\u4ED6\u8FD0\u884C\u53C2\u6570
\u901A\u8FC7\u6267\u884C ./nezha-agent --help
\u67E5\u770B\u652F\u6301\u7684\u53C2\u6570\uFF0C\u5982\u679C\u4F60\u4F7F\u7528\u4E86\u4E00\u952E\u811A\u672C\u5B89\u88C5Agent\uFF0C\u53EF\u4EE5\u7F16\u8F91 /etc/systemd/system/nezha-agent.service
\uFF0C\u5728 ExecStart=
\u8FD9\u4E00\u884C\u7684\u672B\u5C3E\u52A0\u4E0A\u4EE5\u4E0B\u53C2\u6570
--report-delay
\u63A7\u5236\u7CFB\u7EDF\u4FE1\u606F\u4E0A\u62A5\u7684\u95F4\u9694\uFF0C\u9ED8\u8BA4\u4E3A 1 \u79D2\uFF0C\u53EF\u4EE5\u8BBE\u7F6E\u4E3A 3 \u6765\u8FDB\u4E00\u6B65\u964D\u4F4E agent \u7AEF\u7CFB\u7EDF\u8D44\u6E90\u5360\u7528\uFF08\u914D\u7F6E\u533A\u95F4 1-4\uFF09--skip-conn
\u4E0D\u76D1\u63A7\u8FDE\u63A5\u6570\uFF0C\u63A8\u8350 \u673A\u573A/\u8FDE\u63A5\u5BC6\u96C6\u578B\u670D\u52A1\u5668\u6216CPU\u5360\u7528\u8F83\u9AD8\u7684\u670D\u52A1\u5668\u8BBE\u7F6E--skip-procs
\u4E0D\u76D1\u63A7\u8FDB\u7A0B\u6570\uFF0C\u4E5F\u53EF\u4EE5\u964D\u4F4E agent \u5360\u7528--disable-auto-update
\u7981\u6B62 \u81EA\u52A8\u66F4\u65B0 Agent\uFF08\u5B89\u5168\u7279\u6027\uFF09--disable-force-update
\u7981\u6B62 \u5F3A\u5236\u66F4\u65B0 Agent\uFF08\u5B89\u5168\u7279\u6027\uFF09--disable-command-execute
\u7981\u6B62\u5728 Agent \u4E0A\u6267\u884C\u5B9A\u65F6\u4EFB\u52A1\u3001\u6253\u5F00\u5728\u7EBF\u7EC8\u7AEF\uFF08\u5B89\u5168\u7279\u6027\uFF09--tls
\u542F\u7528 SSL/TLS \u52A0\u5BC6\uFF08\u4F7F\u7528 nginx \u53CD\u5411\u4EE3\u7406 Agent \u7684 grpc \u8FDE\u63A5\uFF0C\u5E76\u4E14 nginx \u5F00\u542F SSL/TLS \u65F6\uFF0C\u9700\u8981\u542F\u7528\u8BE5\u9879\u914D\u7F6E\uFF09
FAQ
Agent\u6709Docker\u7248\u5417\uFF1F
Agent\u76EE\u524D\u6CA1\u6709\u63A8\u51FADocker\u955C\u50CF\u3002
Agent\u548CDashboard\u601D\u8DEF\u76F8\u53CD\uFF0CDashboard\u8981\u5C3D\u53EF\u80FD\u4E0D\u5F71\u54CD\u5BBF\u4E3B\u673A\u5DE5\u4F5C\uFF0C\u4F46Agent\u5219\u9700\u8981\u63D2\u5165\u5BBF\u4E3B\u673A\u4E2D\u6267\u884C\u76D1\u63A7\u548C\u5176\u4ED6\u547D\u4EE4\u3002
\u5C06Agent\u653E\u5165\u5BB9\u5668\u4E2D\u786E\u5B9E\u53EF\u4EE5\u7EE7\u7EED\u6267\u884C\u76D1\u63A7\u4EFB\u52A1\uFF0C\u4F46WebShell\u7B49\u529F\u80FD\u65E0\u6CD5\u6B63\u5E38\u8FD0\u884C\uFF0C\u56E0\u6B64\u4E0D\u63D0\u4F9BDocker\u955C\u50CF\u3002
`,34),l=[o];function i(r,c,p,d,h,u){return a(),n("div",null,l)}var k=e(s,[["render",i]]);export{b as __pageData,k as default};
+
chmod +x /etc/init.d/nezha-service
\u8D4B\u4E88\u6267\u884C\u6743\u9650/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
/opt/nezha/agent/nezha-agent --edit-agent-config
\u6765\u9009\u62E9\u81EA\u5B9A\u4E49\u7684\u7F51\u5361\u548C\u5206\u533A\uFF0C\u7136\u540E\u91CD\u542F Agent \u5373\u53EF\u751F\u6548\u901A\u8FC7\u6267\u884C ./nezha-agent --help
\u67E5\u770B\u652F\u6301\u7684\u53C2\u6570\uFF0C\u5982\u679C\u4F60\u4F7F\u7528\u4E86\u4E00\u952E\u811A\u672C\u5B89\u88C5Agent\uFF0C\u53EF\u4EE5\u7F16\u8F91 /etc/systemd/system/nezha-agent.service
\uFF0C\u5728 ExecStart=
\u8FD9\u4E00\u884C\u7684\u672B\u5C3E\u52A0\u4E0A\u4EE5\u4E0B\u53C2\u6570
--report-delay
\u63A7\u5236\u7CFB\u7EDF\u4FE1\u606F\u4E0A\u62A5\u7684\u95F4\u9694\uFF0C\u9ED8\u8BA4\u4E3A 1 \u79D2\uFF0C\u53EF\u4EE5\u8BBE\u7F6E\u4E3A 3 \u6765\u8FDB\u4E00\u6B65\u964D\u4F4E agent \u7AEF\u7CFB\u7EDF\u8D44\u6E90\u5360\u7528\uFF08\u914D\u7F6E\u533A\u95F4 1-4\uFF09--skip-conn
\u4E0D\u76D1\u63A7\u8FDE\u63A5\u6570\uFF0C\u63A8\u8350 \u673A\u573A/\u8FDE\u63A5\u5BC6\u96C6\u578B\u670D\u52A1\u5668\u6216CPU\u5360\u7528\u8F83\u9AD8\u7684\u670D\u52A1\u5668\u8BBE\u7F6E--skip-procs
\u4E0D\u76D1\u63A7\u8FDB\u7A0B\u6570\uFF0C\u4E5F\u53EF\u4EE5\u964D\u4F4E agent \u5360\u7528--disable-auto-update
\u7981\u6B62 \u81EA\u52A8\u66F4\u65B0 Agent\uFF08\u5B89\u5168\u7279\u6027\uFF09--disable-force-update
\u7981\u6B62 \u5F3A\u5236\u66F4\u65B0 Agent\uFF08\u5B89\u5168\u7279\u6027\uFF09--disable-command-execute
\u7981\u6B62\u5728 Agent \u4E0A\u6267\u884C\u5B9A\u65F6\u4EFB\u52A1\u3001\u6253\u5F00\u5728\u7EBF\u7EC8\u7AEF\uFF08\u5B89\u5168\u7279\u6027\uFF09--tls
\u542F\u7528 SSL/TLS \u52A0\u5BC6\uFF08\u4F7F\u7528 nginx \u53CD\u5411\u4EE3\u7406 Agent \u7684 grpc \u8FDE\u63A5\uFF0C\u5E76\u4E14 nginx \u5F00\u542F SSL/TLS \u65F6\uFF0C\u9700\u8981\u542F\u7528\u8BE5\u9879\u914D\u7F6E\uFF09Agent \u76EE\u524D\u6CA1\u6709\u63A8\u51FA Docker \u955C\u50CF\u3002
Agent \u7684\u8BBE\u8BA1\u601D\u8DEF\u548C Dashboard \u76F8\u53CD\uFF0CDashboard \u8981\u5C3D\u53EF\u80FD\u4E0D\u5F71\u54CD\u5BBF\u4E3B\u673A\u5DE5\u4F5C\uFF0C\u4F46 Agent \u5219\u9700\u8981\u5728\u5BBF\u4E3B\u673A\u4E2D\u6267\u884C\u76D1\u63A7\u670D\u52A1\u548C\u8FD0\u884C\u547D\u4EE4\u3002
\u5C06 Agent \u653E\u5165\u5BB9\u5668\u4E2D\u786E\u5B9E\u53EF\u4EE5\u7EE7\u7EED\u6267\u884C\u76D1\u63A7\u4EFB\u52A1\uFF0C\u4F46 WebShell \u7B49\u529F\u80FD\u65E0\u6CD5\u6B63\u5E38\u8FD0\u884C\uFF0C\u56E0\u6B64\u4E0D\u63D0\u4F9B Docker \u955C\u50CF\u3002
\u8BF7\u67E5\u770BDashboard\u76F8\u5173-\u540E\u53F0\u663E\u793A\u7684IP\u548CAgent\u5B9E\u9645IP\u4E0D\u4E00\u81F4\uFF1F
\u5728\u6B64\u4E0D\u518D\u8D58\u8FF0\u3002
\u591A\u51FA\u73B0\u5728\u56FD\u5185\u4E3B\u673A\u4E2D\uFF0C\u76EE\u524D\u4E00\u952E\u811A\u672C\u53EA\u4ECEgithub\u76F4\u63A5\u83B7\u53D6\u5B89\u88C5\u811A\u672C\uFF0C\u60A8\u53EF\u4EE5\u591A\u5C1D\u8BD5\u51E0\u6B21\uFF0C\u6216\u8005\u624B\u52A8\u5B89\u88C5Agent\uFF0C\u522B\u5FD8\u4E86\u4F7F\u7528\u955C\u50CF\u3002
',6),o=[i];function c(h,d,s,l,g,_){return a(),t("div",null,o)}var f=e(n,[["render",c]]);export{p as __pageData,f as default}; diff --git a/assets/guide_agentq.md.bb3a20db.lean.js b/assets/guide_agentq.md.bb3a20db.lean.js deleted file mode 100644 index 0da7919a..00000000 --- a/assets/guide_agentq.md.bb3a20db.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a,d as r}from"./app.c59cf861.js";const p='{"title":"Agent\u76F8\u5173","description":"","frontmatter":{},"headers":[{"level":3,"title":"\u540E\u53F0\u663E\u793A\u7684IP\u548CAgent\u5B9E\u9645IP\u4E0D\u4E00\u81F4\uFF1F","slug":"\u540E\u53F0\u663E\u793A\u7684ip\u548Cagent\u5B9E\u9645ip\u4E0D\u4E00\u81F4\uFF1F"},{"level":3,"title":"\u4E00\u952E\u811A\u672C\u5B89\u88C5\u51FA\u9519","slug":"\u4E00\u952E\u811A\u672C\u5B89\u88C5\u51FA\u9519"}],"relativePath":"guide/agentq.md"}',n={},i=r("",6),o=[i];function c(h,d,s,l,g,_){return a(),t("div",null,o)}var f=e(n,[["render",c]]);export{p as __pageData,f as default}; diff --git a/assets/guide_agentq.md.c0c374da.js b/assets/guide_agentq.md.c0c374da.js new file mode 100644 index 00000000..c3ca3182 --- /dev/null +++ b/assets/guide_agentq.md.c0c374da.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,d as n}from"./app.c59cf861.js";const p='{"title":"\u540E\u53F0\u663E\u793A\u7684IP\u548CAgent\u5B9E\u9645IP\u4E0D\u4E00\u81F4\uFF1F","description":"","frontmatter":{},"headers":[{"level":2,"title":"\u540E\u53F0\u663E\u793A\u7684IP\u548CAgent\u5B9E\u9645IP\u4E0D\u4E00\u81F4\uFF1F","slug":"\u540E\u53F0\u663E\u793A\u7684ip\u548Cagent\u5B9E\u9645ip\u4E0D\u4E00\u81F4\uFF1F"},{"level":2,"title":"\u4E00\u952E\u811A\u672C\u5B89\u88C5\u51FA\u9519","slug":"\u4E00\u952E\u811A\u672C\u5B89\u88C5\u51FA\u9519"},{"level":3,"title":"curl: Failed to connect to raw.githubusercontent.com......","slug":"curl-failed-to-connect-to-raw-githubusercontent-com"}],"relativePath":"guide/agentq.md"}',r={},o=n('\u8BF7\u67E5\u770B Dashboard\u76F8\u5173-\u540E\u53F0\u663E\u793A\u7684IP\u548CAgent\u5B9E\u9645IP\u4E0D\u4E00\u81F4\uFF1F
\u5728\u6B64\u4E0D\u518D\u8D58\u8FF0\u3002
\u591A\u51FA\u73B0\u5728\u56FD\u5185\u4E3B\u673A\u4E2D\uFF0C\u76EE\u524D\u4E00\u952E\u811A\u672C\u53EA\u4ECEgithub\u76F4\u63A5\u83B7\u53D6\u5B89\u88C5\u811A\u672C\uFF0C\u60A8\u53EF\u4EE5\u591A\u5C1D\u8BD5\u51E0\u6B21\uFF0C\u6216\u8005\u624B\u52A8\u5B89\u88C5Agent\uFF0C\u522B\u5FD8\u4E86\u4F7F\u7528\u955C\u50CF\u3002
',5),c=[o];function i(d,h,l,s,u,g){return a(),t("div",null,c)}var f=e(r,[["render",i]]);export{p as __pageData,f as default}; diff --git a/assets/guide_agentq.md.c0c374da.lean.js b/assets/guide_agentq.md.c0c374da.lean.js new file mode 100644 index 00000000..7002fb70 --- /dev/null +++ b/assets/guide_agentq.md.c0c374da.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,d as n}from"./app.c59cf861.js";const p='{"title":"\u540E\u53F0\u663E\u793A\u7684IP\u548CAgent\u5B9E\u9645IP\u4E0D\u4E00\u81F4\uFF1F","description":"","frontmatter":{},"headers":[{"level":2,"title":"\u540E\u53F0\u663E\u793A\u7684IP\u548CAgent\u5B9E\u9645IP\u4E0D\u4E00\u81F4\uFF1F","slug":"\u540E\u53F0\u663E\u793A\u7684ip\u548Cagent\u5B9E\u9645ip\u4E0D\u4E00\u81F4\uFF1F"},{"level":2,"title":"\u4E00\u952E\u811A\u672C\u5B89\u88C5\u51FA\u9519","slug":"\u4E00\u952E\u811A\u672C\u5B89\u88C5\u51FA\u9519"},{"level":3,"title":"curl: Failed to connect to raw.githubusercontent.com......","slug":"curl-failed-to-connect-to-raw-githubusercontent-com"}],"relativePath":"guide/agentq.md"}',r={},o=n("",5),c=[o];function i(d,h,l,s,u,g){return a(),t("div",null,c)}var f=e(r,[["render",i]]);export{p as __pageData,f as default}; diff --git a/assets/guide_dashboard.md.b8948c90.js b/assets/guide_dashboard.md.8f5dc9da.js similarity index 53% rename from assets/guide_dashboard.md.b8948c90.js rename to assets/guide_dashboard.md.8f5dc9da.js index 6bdaac9e..d5fbd3bc 100644 --- a/assets/guide_dashboard.md.b8948c90.js +++ b/assets/guide_dashboard.md.8f5dc9da.js @@ -1,4 +1,4 @@ -import{_ as e,c as a,o as n,d as t}from"./app.c59cf861.js";const k='{"title":"\u51C6\u5907\u5DE5\u4F5C","description":"","frontmatter":{},"headers":[{"level":2,"title":"\u51C6\u5907\u5DE5\u4F5C","slug":"\u51C6\u5907\u5DE5\u4F5C"},{"level":2,"title":"\u83B7\u53D6Github\u7684Client ID\u548C\u5BC6\u94A5","slug":"\u83B7\u53D6github\u7684client-id\u548C\u5BC6\u94A5"},{"level":2,"title":"\u5728\u670D\u52A1\u5668\u4E2D\u5B89\u88C5Dashboard","slug":"\u5728\u670D\u52A1\u5668\u4E2D\u5B89\u88C5dashboard"},{"level":2,"title":"\u914D\u7F6E\u53CD\u5411\u4EE3\u7406","slug":"\u914D\u7F6E\u53CD\u5411\u4EE3\u7406"},{"level":2,"title":"\u5728\u5B9D\u5854\u9762\u677F\u4E2D\u914D\u7F6ESSL","slug":"\u5728\u5B9D\u5854\u9762\u677F\u4E2D\u914D\u7F6Essl"},{"level":2,"title":"FAQ","slug":"faq"}],"relativePath":"guide/dashboard.md"}',s={},o=t(`\u642D\u5EFA\u4E00\u4E2A\u54EA\u5412\u76D1\u63A7\uFF0C\u4F60\u9700\u8981\uFF1A
TIP
\u5982\u679C\u4F60\u60F3\u4F7F\u7528CDN\uFF0C\u8BF7\u51C6\u5907\u4E24\u4E2A\u57DF\u540D\uFF0C\u4E00\u4E2A\u914D\u7F6E\u597DCDN\u7528\u4F5C\u516C\u5F00\u8BBF\u95EE\uFF0CCDN\u9700\u8981\u652F\u6301WebSocket\u534F\u8BAE\uFF1B\u53E6\u4E00\u4E2A\u57DF\u540D\u4E0D\u8981\u4F7F\u7528CDN\uFF0C\u7528\u4F5CAgent\u7AEF\u4E0EDashboard\u7684\u901A\u4FE1
\u672C\u6587\u6863\u5206\u522B\u4EE5 "cdn.example.com" \u548C "data.example.com" \u4E24\u4E2A\u57DF\u540D\u6765\u6F14\u793A
\u672C\u6587\u6863\u5C06\u4EE5\u5B9D\u5854\u9762\u677F\u53CD\u4EE3\u9762\u677F\u7684\u8FC7\u7A0B\u4F5C\u4E3A\u8303\u4F8B\uFF0C\u968F\u7740\u672A\u6765\u7248\u672C\u7684\u53D8\u5316\uFF0C\u90E8\u5206\u529F\u80FD\u7684\u5165\u53E3\u53EF\u80FD\u4F1A\u53D1\u751F\u6539\u53D8\uFF0C\u672C\u6587\u6863\u4EC5\u4F9B\u53C2\u8003
\u54EA\u5412\u76D1\u63A7\u63A5\u5165Github\u548CGitee\u4F5C\u4E3A\u540E\u53F0\u7BA1\u7406\u5458\u8D26\u53F7
Application name
- \u968F\u610F\u586B\u5199Homepage URL
- \u586B\u5199\u9762\u677F\u7684\u8BBF\u95EE\u57DF\u540D\uFF0C\u5982\uFF1A"http://cdn.example.com"Authorization callback URL
- \u586B\u5199\u56DE\u8C03\u5730\u5740\uFF0C\u5982\uFF1A"http://cdn.example.com/oauth2/callback"curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
+import{_ as e,c as a,o as n,d as t}from"./app.c59cf861.js";const k='{"title":"\u51C6\u5907\u5DE5\u4F5C","description":"","frontmatter":{},"headers":[{"level":2,"title":"\u51C6\u5907\u5DE5\u4F5C","slug":"\u51C6\u5907\u5DE5\u4F5C"},{"level":2,"title":"\u83B7\u53D6Github\u7684Client ID\u548C\u5BC6\u94A5","slug":"\u83B7\u53D6github\u7684client-id\u548C\u5BC6\u94A5"},{"level":2,"title":"\u5728\u670D\u52A1\u5668\u4E2D\u5B89\u88C5Dashboard","slug":"\u5728\u670D\u52A1\u5668\u4E2D\u5B89\u88C5dashboard"},{"level":2,"title":"\u914D\u7F6E\u53CD\u5411\u4EE3\u7406","slug":"\u914D\u7F6E\u53CD\u5411\u4EE3\u7406"},{"level":2,"title":"\u5728\u5B9D\u5854\u9762\u677F\u4E2D\u914D\u7F6ESSL","slug":"\u5728\u5B9D\u5854\u9762\u677F\u4E2D\u914D\u7F6Essl"},{"level":2,"title":"FAQ","slug":"faq"},{"level":3,"title":"\u6211\u5BF9\u9762\u677F\u63D0\u4F9B\u7684\u6570\u636E\u4FEE\u6539/\u589E\u52A0\u529F\u80FD\u4E0D\u6EE1\u610F\uFF0C\u6211\u60F3\u8981\u81EA\u5DF1\u4FEE\u6539/\u589E\u52A0\u6570\u636E\u600E\u4E48\u529E\uFF1F","slug":"\u6211\u5BF9\u9762\u677F\u63D0\u4F9B\u7684\u6570\u636E\u4FEE\u6539-\u589E\u52A0\u529F\u80FD\u4E0D\u6EE1\u610F\uFF0C\u6211\u60F3\u8981\u81EA\u5DF1\u4FEE\u6539-\u589E\u52A0\u6570\u636E\u600E\u4E48\u529E\uFF1F"},{"level":3,"title":"\u6570\u636E\u5E93\u4E2D\u5404\u8868/\u5217\u662F\u4EC0\u4E48\u610F\u601D\uFF1F","slug":"\u6570\u636E\u5E93\u4E2D\u5404\u8868-\u5217\u662F\u4EC0\u4E48\u610F\u601D\uFF1F"},{"level":3,"title":"Dashboard \u4F1A\u81EA\u52A8\u66F4\u65B0\u5417\uFF1F","slug":"dashboard-\u4F1A\u81EA\u52A8\u66F4\u65B0\u5417\uFF1F"},{"level":3,"title":"\u5982\u4F55\u66F4\u65B0 Dashboard\uFF1F","slug":"\u5982\u4F55\u66F4\u65B0-dashboard\uFF1F"}],"relativePath":"guide/dashboard.md"}',s={},o=t(`\u51C6\u5907\u5DE5\u4F5C
\u642D\u5EFA\u4E00\u4E2A\u54EA\u5412\u76D1\u63A7\uFF0C\u4F60\u9700\u8981\uFF1A
- \u4E00\u53F0\u53EF\u4EE5\u8FDE\u63A5\u516C\u7F51\u7684VPS\uFF0C\u9632\u706B\u5899\u548C\u5B89\u5168\u7B56\u7565\u9700\u8981\u653E\u884C8008\u548C5555\u7AEF\u53E3\uFF0C\u5426\u5219\u4F1A\u65E0\u6CD5\u8BBF\u95EE\u548C\u65E0\u6CD5\u63A5\u6536\u6570\u636E\u3002\u5355\u6838512MB\u5185\u5B58\u7684\u670D\u52A1\u5668\u914D\u7F6E\u5C31\u8DB3\u4EE5\u6EE1\u8DB3\u5927\u591A\u6570\u4F7F\u7528\u573A\u666F
- \u4E00\u4E2A\u5DF2\u7ECF\u8BBE\u7F6E\u597DA\u8BB0\u5F55\uFF0C\u6307\u5411Dashboard\u670D\u52A1\u5668ip\u7684\u57DF\u540D
TIP
\u5982\u679C\u4F60\u60F3\u4F7F\u7528CDN\uFF0C\u8BF7\u51C6\u5907\u4E24\u4E2A\u57DF\u540D\uFF0C\u4E00\u4E2A\u914D\u7F6E\u597DCDN\u7528\u4F5C\u516C\u5F00\u8BBF\u95EE\uFF0CCDN\u9700\u8981\u652F\u6301WebSocket\u534F\u8BAE\uFF1B\u53E6\u4E00\u4E2A\u57DF\u540D\u4E0D\u8981\u4F7F\u7528CDN\uFF0C\u7528\u4F5CAgent\u7AEF\u4E0EDashboard\u7684\u901A\u4FE1
\u672C\u6587\u6863\u5206\u522B\u4EE5 "cdn.example.com" \u548C "data.example.com" \u4E24\u4E2A\u57DF\u540D\u6765\u6F14\u793A
- \u4E00\u4E2AGithub/Gitee\u8D26\u53F7
\u672C\u6587\u6863\u5C06\u4EE5\u5B9D\u5854\u9762\u677F\u53CD\u4EE3\u9762\u677F\u7684\u8FC7\u7A0B\u4F5C\u4E3A\u8303\u4F8B\uFF0C\u968F\u7740\u672A\u6765\u7248\u672C\u7684\u53D8\u5316\uFF0C\u90E8\u5206\u529F\u80FD\u7684\u5165\u53E3\u53EF\u80FD\u4F1A\u53D1\u751F\u6539\u53D8\uFF0C\u672C\u6587\u6863\u4EC5\u4F9B\u53C2\u8003
\u83B7\u53D6Github\u7684Client ID\u548C\u5BC6\u94A5
\u54EA\u5412\u76D1\u63A7\u63A5\u5165Github\u548CGitee\u4F5C\u4E3A\u540E\u53F0\u7BA1\u7406\u5458\u8D26\u53F7
- \u9996\u5148\u6211\u4EEC\u9700\u8981\u65B0\u5EFA\u4E00\u4E2A\u9A8C\u8BC1\u5E94\u7528\uFF0C\u4EE5Github\u4E3A\u4F8B\uFF0C\u767B\u5F55Github\u540E\uFF0C\u6253\u5F00 https://github.com/settings/developers \uFF0C\u4F9D\u6B21\u9009\u62E9\u201COAuth Apps\u201D - \u201CNew OAuth App\u201D
Application name
- \u968F\u610F\u586B\u5199
Homepage URL
- \u586B\u5199\u9762\u677F\u7684\u8BBF\u95EE\u57DF\u540D\uFF0C\u5982\uFF1A"http://cdn.example.com"
Authorization callback URL
- \u586B\u5199\u56DE\u8C03\u5730\u5740\uFF0C\u5982\uFF1A"http://cdn.example.com/oauth2/callback" - \u70B9\u51FB\u201CRegister application\u201D
- \u4FDD\u5B58\u9875\u9762\u4E2D\u7684Client ID\uFF0C\u7136\u540E\u70B9\u51FB \u201CGenerate a new client secret\u201C\uFF0C\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684Client Secret\uFF0C\u65B0\u5EFA\u7684\u5BC6\u94A5\u4EC5\u4F1A\u663E\u793A\u4E00\u6B21\uFF0C\u8BF7\u59A5\u5584\u4FDD\u5B58
\u5728\u670D\u52A1\u5668\u4E2D\u5B89\u88C5Dashboard
- \u5728\u9762\u677F\u670D\u52A1\u5668\u4E2D\uFF0C\u8FD0\u884C\u5B89\u88C5\u811A\u672C\uFF1A
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
\u5982\u679C\u4F60\u7684\u9762\u677F\u670D\u52A1\u5668\u4F4D\u4E8E\u4E2D\u56FD\u5927\u9646\uFF0C\u53EF\u4EE5\u4F7F\u7528\u955C\u50CF\uFF1A
curl -L https://fastly.jsdelivr.net/gh/naiba/nezha@master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
\u7B49\u5F85Docker\u5B89\u88C5\u5B8C\u6BD5\u540E\uFF0C\u5206\u522B\u8F93\u5165\u4EE5\u4E0B\u503C\uFF1A
OAuth\u63D0\u4F9B\u5546
- Github\u6216Gitee
Client ID
- \u4E4B\u524D\u4FDD\u5B58\u7684Client ID
Client Secret
- \u4E4B\u524D\u4FDD\u5B58\u7684\u5BC6\u94A5
\u7528\u6237\u540D
- Github\u6216Gitee\u7684\u7528\u6237\u540D
\u7AD9\u70B9\u6807\u9898
- \u81EA\u5B9A\u4E49\u7AD9\u70B9\u6807\u9898
\u8BBF\u95EE\u7AEF\u53E3
- \u516C\u5F00\u8BBF\u95EE\u7AEF\u53E3\uFF0C\u53EF\u81EA\u5B9A\u4E49\uFF0C\u9ED8\u8BA48008
Agent\u7684\u901A\u4FE1\u7AEF\u53E3
- Agent\u4E0EDashboard\u7684\u901A\u4FE1\u7AEF\u53E3\uFF0C\u9ED8\u8BA45555
\u8F93\u5165\u5B8C\u6210\u540E\uFF0C\u7B49\u5F85\u62C9\u53D6\u955C\u50CF
\u5B89\u88C5\u7ED3\u675F\u540E\uFF0C\u5982\u679C\u4E00\u5207\u6B63\u5E38\uFF0C\u6B64\u65F6\u4F60\u53EF\u4EE5\u8BBF\u95EE\u57DF\u540D+\u7AEF\u53E3\u53F7\uFF0C\u5982 \u201Chttp://cdn.example.com:8008\u201D \u6765\u67E5\u770B\u9762\u677F
\u5C06\u6765\u5982\u679C\u9700\u8981\u518D\u6B21\u8FD0\u884C\u811A\u672C\uFF0C\u53EF\u4EE5\u8FD0\u884C\uFF1A
./nezha.sh
\u6765\u6253\u5F00\u7BA1\u7406\u811A\u672C
\u914D\u7F6E\u53CD\u5411\u4EE3\u7406
\u5728\u5B9D\u5854\u9762\u677F\u4E2D\u65B0\u5EFA\u4E00\u4E2A\u7AD9\u70B9\uFF0C\u57DF\u540D\u586B\u5199\u516C\u5F00\u8BBF\u95EE\u57DF\u540D\uFF0C\u5982 \u201Chttp://cdn.example.com\u201C \uFF0C\u7136\u540E\u70B9\u51FB\u201C\u8BBE\u7F6E\u201D\u8FDB\u5165\u7AD9\u70B9\u8BBE\u7F6E\u9009\u9879\uFF0C\u9009\u62E9\u201C\u53CD\u5411\u4EE3\u7406\u201D - \u201C\u65B0\u5EFA\u53CD\u5411\u4EE3\u7406\u201D
\u81EA\u5B9A\u4E49\u4E00\u4E2A\u4EE3\u7406\u540D\u79F0\uFF0C\u5728\u4E0B\u65B9\u201C\u76EE\u6807URL\u201D\u4E2D\u586B\u5165 http://127.0.0.1
\u7136\u540E\u70B9\u51FB\u201C\u4FDD\u5B58\u201D
\u6253\u5F00\u521A\u521A\u65B0\u5EFA\u7684\u53CD\u5411\u4EE3\u7406\u53F3\u8FB9\u7684\u201C\u914D\u7F6E\u6587\u4EF6\u201D\uFF0C\u5C06\u914D\u7F6E\u6587\u4EF6\u66FF\u6362\u4E3A\u4EE5\u4E0B\u5185\u5BB9\uFF1A
#PROXY-START/
@@ -21,4 +21,4 @@ import{_ as e,c as a,o as n,d as t}from"./app.c59cf861.js";const k='{"title":"\u
proxy /terminal/* http://ip:8008 {
websocket
}
-
\u5728\u5B9D\u5854\u9762\u677F\u4E2D\u914D\u7F6ESSL
\u9996\u5148\uFF0C\u5148\u6682\u65F6\u5173\u95ED\u53CD\u5411\u4EE3\u7406
\u6B63\u5982\u5728\u5176\u4ED6\u7F51\u7AD9\u4E2D\u914D\u7F6ESSL\u8BC1\u4E66\u4E00\u6837\uFF0C\u8FDB\u5165\u7AD9\u70B9\u8BBE\u7F6E\u4E2D\u7684\u201CSSL\u201D\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u81EA\u52A8\u7533\u8BF7 Let\xB4s Encrypt \u8BC1\u4E66\u6216\u624B\u52A8\u914D\u7F6E\u5DF2\u6709\u7684\u8BC1\u4E66
\u5B8C\u6210SSL\u7684\u8BBE\u7F6E\u540E\uFF0C\u4F60\u9700\u8981\u56DE\u5230 https://github.com/settings/developers \uFF0C\u7F16\u8F91\u4E4B\u524D\u521B\u5EFA\u7684\u9A8C\u8BC1\u5E94\u7528\u7A0B\u5E8F\uFF0C\u5C06\u4E4B\u524D\u6211\u4EEC\u586B\u5165\u7684"Homepage URL"\u548C"Authorization callback URL"\u4E2D\u7684\u57DF\u540D\u5168\u90E8\u4ECEhttp
\u6539\u4E3Ahttps
\uFF0C\u5982\uFF1A"https://cdn.example.com" \u548C "https://cdn.example.com/oauth2/callback" \uFF0C\u4E0D\u66F4\u6539\u6B64\u9879\u53EF\u80FD\u4F1A\u5BFC\u81F4\u4F60\u65E0\u6CD5\u767B\u5F55\u9762\u677F\u540E\u53F0
FAQ
\u6211\u5BF9\u9762\u677F\u63D0\u4F9B\u7684\u6570\u636E\u4FEE\u6539/\u589E\u52A0\u529F\u80FD\u4E0D\u6EE1\u610F\uFF0C\u6211\u60F3\u8981\u81EA\u5DF1\u4FEE\u6539/\u589E\u52A0\u6570\u636E\u600E\u4E48\u529E\uFF1F
\u5E38\u89C1\u4E8E\u6279\u91CF\u63D2\u5165Agent\u7B49\u9700\u6C42\u4E2D\uFF0C\u53EF\u4EE5\u76F4\u63A5\u4FEE\u6539\u6570\u636E\u5E93\u3002
\u8BF7\u6CE8\u610F\uFF0C\u6570\u636E\u5E93\u4E2D\u5E76\u975E\u4EC0\u4E48\u90FD\u53EF\u4EE5\u4FEE\u6539\uFF0C\u9519\u8BEF\u7684\u4FEE\u6539\u4F1A\u5BFC\u81F4\u6570\u636E\u6DF7\u4E71\u65E0\u6CD5\u542F\u52A8Dashboard\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\u6570\u636E\u5E93\uFF01
\u518D\u91CD\u590D\u4E00\u904D\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\u6570\u636E\u5E93\uFF01
\u8BF7\u5148\u505C\u6B62\u9762\u677F\u5BB9\u5668\uFF0C\u6570\u636E\u5E93\u662Fsqlite3\uFF0C\u4F4D\u4E8E/opt/nezha/dashboard/data/sqlite.db
\uFF0C\u8BF7\u5907\u4EFD\u540E\u64CD\u4F5C
\u6570\u636E\u5E93\u4E2D\u5404\u8868/\u5217\u662F\u4EC0\u4E48\u610F\u601D\uFF1F
\u6587\u6863\u4E0D\u63D0\u4F9B\u6570\u636E\u5E93\u89E3\u91CA\uFF0C\u6709\u80FD\u529B\u4FEE\u6539\u6570\u636E\u5E93\u7684\u7A0D\u52A0\u5206\u6790\u5E94\u8BE5\u5C31\u8DB3\u4EE5\u770B\u61C2\u3002
Dashboard\u4F1A\u81EA\u52A8\u66F4\u65B0\u5417\uFF1F
Agent\u901A\u5E38\u60C5\u51B5\u4E0B\u4F1A\u81EA\u52A8\u66F4\u65B0\uFF0C\u4F46Dashboard\u5E76\u4E0D\u4F1A\uFF0C\u9700\u8981\u624B\u52A8\u66F4\u65B0\u3002
`,34),r=[o];function p(l,c,i,d,h,u){return n(),a("div",null,r)}var m=e(s,[["render",p]]);export{k as __pageData,m as default};
+
\u9996\u5148\uFF0C\u5148\u6682\u65F6\u5173\u95ED\u53CD\u5411\u4EE3\u7406
\u6B63\u5982\u5728\u5176\u4ED6\u7F51\u7AD9\u4E2D\u914D\u7F6ESSL\u8BC1\u4E66\u4E00\u6837\uFF0C\u8FDB\u5165\u7AD9\u70B9\u8BBE\u7F6E\u4E2D\u7684\u201CSSL\u201D\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u81EA\u52A8\u7533\u8BF7 Let\xB4s Encrypt \u8BC1\u4E66\u6216\u624B\u52A8\u914D\u7F6E\u5DF2\u6709\u7684\u8BC1\u4E66
\u5B8C\u6210SSL\u7684\u8BBE\u7F6E\u540E\uFF0C\u4F60\u9700\u8981\u56DE\u5230 https://github.com/settings/developers \uFF0C\u7F16\u8F91\u4E4B\u524D\u521B\u5EFA\u7684\u9A8C\u8BC1\u5E94\u7528\u7A0B\u5E8F\uFF0C\u5C06\u4E4B\u524D\u6211\u4EEC\u586B\u5165\u7684"Homepage URL"\u548C"Authorization callback URL"\u4E2D\u7684\u57DF\u540D\u5168\u90E8\u4ECEhttp
\u6539\u4E3Ahttps
\uFF0C\u5982\uFF1A"https://cdn.example.com" \u548C "https://cdn.example.com/oauth2/callback" \uFF0C\u4E0D\u66F4\u6539\u6B64\u9879\u53EF\u80FD\u4F1A\u5BFC\u81F4\u4F60\u65E0\u6CD5\u767B\u5F55\u9762\u677F\u540E\u53F0
\u5E38\u89C1\u4E8E\u6279\u91CF\u63D2\u5165 Agent \u7B49\u9700\u6C42\u4E2D\uFF0C\u53EF\u4EE5\u76F4\u63A5\u4FEE\u6539\u6570\u636E\u5E93\u3002
\u8BF7\u6CE8\u610F\uFF0C\u6570\u636E\u5E93\u4E2D\u5E76\u975E\u4EC0\u4E48\u90FD\u53EF\u4EE5\u4FEE\u6539\uFF0C\u9519\u8BEF\u7684\u4FEE\u6539\u4F1A\u5BFC\u81F4\u6570\u636E\u6DF7\u4E71\u65E0\u6CD5\u542F\u52A8Dashboard\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\u6570\u636E\u5E93\uFF01
WARNING
\u518D\u91CD\u590D\u4E00\u904D\uFF0C\u8BF7\u52FF\u968F\u610F\u4FEE\u6539\u6570\u636E\u5E93\uFF01
\u5982\u9700\u8981\u5728\u6570\u636E\u5E93\u4E2D\u4FEE\u6539\u6570\u636E\uFF0C\u8BF7\u5148\u505C\u6B62\u9762\u677F\u5BB9\u5668\u518D\u4FEE\u6539\u3002
\u6570\u636E\u5E93\u7C7B\u578B\u662F sqlite3\uFF0C\u4F4D\u4E8E /opt/nezha/dashboard/data/sqlite.db
\uFF0C\u4FEE\u6539\u524D\u8BF7\u5907\u4EFD
\u6587\u6863\u4E0D\u63D0\u4F9B\u6570\u636E\u5E93\u89E3\u91CA\uFF0C\u6709\u80FD\u529B\u4FEE\u6539\u6570\u636E\u5E93\u7684\u7A0D\u52A0\u5206\u6790\u5E94\u8BE5\u5C31\u8DB3\u4EE5\u770B\u61C2\u3002
Agent\u901A\u5E38\u60C5\u51B5\u4E0B\u4F1A\u81EA\u52A8\u66F4\u65B0\uFF0C\u4F46Dashboard\u5E76\u4E0D\u4F1A\uFF0C\u9700\u8981\u624B\u52A8\u66F4\u65B0\u3002
\u8FD0\u884C\u811A\u672C ./nezha.sh
\uFF0C\u9009\u62E9\u91CD\u542F\u9762\u677F\u5E76\u66F4\u65B0
\u8BF7\u67E5\u770B\u5E38\u89C1\u95EE\u9898-\u5B9E\u65F6\u901A\u9053\u65AD\u5F00/\u5728\u7EBF\u7EC8\u7AEF\u8FDE\u63A5\u5931\u8D25
\u5728\u6B64\u4E0D\u518D\u8D58\u8FF0\u3002
\u9996\u5148\u89E3\u91CA\u540E\u53F0\u663E\u793A\u7684IP\u662F\u600E\u4E48\u6765\u7684\uFF1AAgent\u4F1A\u6BCF\u9694\u4E00\u6BB5\u65F6\u95F4\u8BF7\u6C42\u4E00\u904DIP-API\uFF0C\u83B7\u53D6\u5230IP\u4FE1\u606F\u540E\u8FDB\u884C\u4E0A\u62A5\uFF0C\u76EE\u524D\u4F7F\u7528\u7684IP-API\u53EF\u5728\u6B64\u67E5\u770Bmyip.go\u3002
\u5982\u60A8\u8BA4\u4E3A\u540E\u53F0\u663E\u793A\u7684IP\u548C\u670D\u52A1\u5546\u63D0\u4F9B\u7ED9\u60A8\u7684IP\u4E0D\u4E00\u81F4\uFF0C\u6700\u5927\u7684\u53EF\u80FD\u662F\u670D\u52A1\u5546\u7ED9\u60A8\u7684\u662F\u5165\u53E3\uFF0C\u4F46Agent\u6D4B\u8BD5\u7684\u662F\u60A8\u7684\u51FA\u53E3\u3002\u8FD9\u4E2A\u95EE\u9898\u4E5F\u53EF\u80FD\u4F1A\u51FA\u73B0\u5728\u591A\u7EBF\u4E3B\u673A\u4E2D\u3002
TIP
\u4E3E\u4E2A\u7B80\u5355\u4E5F\u5341\u5206\u5E38\u89C1\u7684\u4F8B\u5B50\uFF0C\u670D\u52A1\u5546\u7ED9\u60A8\u63D0\u4F9B\u7684\u662F\u4E00\u53F0\u9AD8\u9632\u4E3B\u673A\uFF0C\u4E3A\u4E86\u540C\u65F6\u6EE1\u8DB3\u9AD8\u9632\u548C\u4F4E\u7F51\u7EDC\u4E2D\u65AD\u7387\u7684\u76EE\u6807\uFF0C\u63D0\u4F9B\u7ED9\u60A8\u7684IP\u53EF\u80FD\u662F\u7ECF\u8FC7\u6620\u5C04\u540E\u7684\u9AD8\u9632IP\u800C\u5E76\u975E\u60A8\u4E3B\u673A\u7684\u771F\u5B9E\u51FA\u53E3IP
\u60A8\u4E5F\u53EF\u4EE5\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4\u5728Agent\u90E8\u7F72\u4E3B\u673A\u4E2D\u8FDB\u884C\u6D4B\u8BD5:
curl api.myip.la
+curl ip.sb
+curl ip-api.com
+
\u8BF7\u67E5\u770B\u6216\u7F16\u8F91 /opt/nezha/dashboard/data/config.yaml
\u6587\u4EF6\u3002
\u5BC6\u7801\u4F4D\u4E8E site-viewpassword\u3002
\u9996\u5148\u5C1D\u8BD5\u91CD\u542Fdocker\u518D\u64CD\u4F5C
systemctl status docker
+systemctl restart docker
+systemctl status docker
+
\u91CD\u542F\u540E\u5C1D\u8BD5\u91CD\u65B0\u5B89\u88C5\u9762\u677F\u3002
\u82E5\u4F9D\u7136\u51FA\u73B0iptables...\u7B49\u9519\u8BEF\uFF0C\u5219\u8003\u8651\u662F\u5426\u76F4\u63A5\u5173\u95EDiptables\u751A\u81F3\u79FB\u9664iptables\u3002
\u8FD9\u4E2A\u95EE\u9898\u4E5F\u53EF\u80FD\u7531\u5185\u6838\u5F15\u8D77\uFF0C\u4E5F\u53EF\u4EE5\u5C1D\u8BD5\u66F4\u6362\u5B98\u65B9\u5185\u6838\u3002
\u8BF7\u67E5\u770B\u5E38\u89C1\u95EE\u9898-\u5B9E\u65F6\u901A\u9053\u65AD\u5F00/\u5728\u7EBF\u7EC8\u7AEF\u8FDE\u63A5\u5931\u8D25
\u5728\u6B64\u4E0D\u518D\u8D58\u8FF0\u3002
\u9996\u5148\u89E3\u91CA\u540E\u53F0\u663E\u793A\u7684IP\u662F\u600E\u4E48\u6765\u7684\uFF0CAgent\u4F1A\u6BCF\u9694\u4E00\u6BB5\u65F6\u95F4\u8BF7\u6C42\u4E00\u904DIP-API\uFF0C\u83B7\u53D6\u5230IP\u4FE1\u606F\u540E\u8FDB\u884C\u4E0A\u62A5\uFF0C\u76EE\u524D\u4F7F\u7528\u7684IP-API\u53EF\u5728\u6B64\u67E5\u770Bmyip.go\u3002
\u5982\u60A8\u8BA4\u4E3A\u540E\u53F0\u663E\u793A\u7684IP\u548C\u670D\u52A1\u5546\u63D0\u4F9B\u7ED9\u60A8\u7684IP\u4E0D\u4E00\u81F4\uFF0C\u6700\u5927\u7684\u53EF\u80FD\u662F\u670D\u52A1\u5546\u7ED9\u60A8\u7684\u662F\u5165\u53E3\uFF0C\u4F46Agent\u6D4B\u8BD5\u7684\u662F\u60A8\u7684\u51FA\u53E3\u3002\u8FD9\u4E2A\u95EE\u9898\u4E5F\u53EF\u80FD\u4F1A\u51FA\u73B0\u5728\u591A\u7EBF\u4E3B\u673A\u4E2D\u3002
\u4E3E\u4E2A\u7B80\u5355\u4E5F\u5341\u5206\u5E38\u89C1\u7684\u4F8B\u5B50\uFF0C\u670D\u52A1\u5546\u7ED9\u60A8\u63D0\u4F9B\u7684\u662F\u4E00\u53F0\u9AD8\u9632\u4E3B\u673A\uFF0C\u4E3A\u4E86\u540C\u65F6\u6EE1\u8DB3\u9AD8\u9632\u548C\u4F4E\u7F51\u7EDC\u4E2D\u65AD\u7387\u7684\u76EE\u6807\uFF0C\u63D0\u4F9B\u7ED9\u60A8\u7684IP\u53EF\u80FD\u662F\u7ECF\u8FC7\u6620\u5C04\u540E\u7684\u9AD8\u9632IP\u800C\u5E76\u975E\u60A8\u4E3B\u673A\u7684\u771F\u5B9E\u51FA\u53E3IP\u3002
\u60A8\u4E5F\u53EF\u4EE5\u4F7F\u7528\u4EE5\u4E0B\u547D\u4EE4\u5728Agent\u90E8\u7F72\u4E3B\u673A\u4E2D\u8FDB\u884C\u6D4B\u8BD5\u3002
curl api.myip.la
-curl ip.sb
-curl ip-api.com
-
\u8BF7\u67E5\u770B\u6216\u7F16\u8F91/opt/nezha/dashboard/data/config.yaml
\u6587\u4EF6\u3002
\u5BC6\u7801\u4F4D\u4E8Esite-viewpassword\u3002
\u9996\u5148\u5C1D\u8BD5\u91CD\u542Fdocker\u518D\u64CD\u4F5C
systemctl status docker
-systemctl restart docker
-systemctl status docker
-
\u91CD\u542F\u540E\u5C1D\u8BD5\u91CD\u65B0\u5B89\u88C5\u9762\u677F\u3002
\u82E5\u4F9D\u7136\u51FA\u73B0iptables...\u7B49\u9519\u8BEF\uFF0C\u5219\u8003\u8651\u662F\u5426\u76F4\u63A5\u5173\u95EDiptables\u751A\u81F3\u79FB\u9664iptables\u3002
\u8FD9\u4E2A\u95EE\u9898\u4E5F\u53EF\u80FD\u7531\u5185\u6838\u5F15\u8D77\uFF0C\u4E5F\u53EF\u4EE5\u5C1D\u8BD5\u66F4\u6362\u5B98\u65B9\u5185\u6838\u3002
哪吒监控的Dashboard已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化
WARNING
哪吒监控使用 Crowdin 平台翻译文本,请不要直接修改除 zh-CN.toml
以外的toml文件
/resource/l10n/zh-CN.toml
中的配置来替换新功能中的文本zh-CN.toml
中哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题
WARNING
请注意: 此开发环境仅支持 dashboard v0.13.16
及更新版本。
data/config.yaml
中的 Oauth2 配置(回调连接可以填 http://localhost
)docker-compose up
theme-custom
放置到服务器上的 /opt/nezha/dashboard/theme-custom
位置80
端口,在 docker-compose.yaml
中修改配置。Nezha Monitoring's Dashboard has added localization to support multiple languages, and you can follow these steps to support localization when developing new features
WARNING
Nezha uses the Crowdin platform to translate text, please do not directly modify the toml files other than zh-CN.toml
.
/resource/l10n/zh-CN.toml
zh-CN.toml
TIP
If you don't understand Chinese at all, you can translate the text using Google or DeepL Translate, and specify in the Pull Request, we will revise the Chinese translation after you add the English translation
Nezha Monitoring provides a theme development environment that you can use to create new Nezha Monitoring themes
WARNING
Please note: This development environment only supports dashboard v0.13.16
and newer versions.
data/config.yaml
(The callback connection can be filled with http://localhost
)docker-compose up
theme-custom
in /opt/nezha/dashboard/theme-custom
on the server80
, change the configuration in docker-compose.yaml
.The service in the monitored server is called Agent. This document will describe how to install the Agent on the monitored server and connect it with Dashboard
Nezha Monitoring now supports one-click installation of the Agent on Windows and Linux. Follow the steps in this document and you can easily deploy it on your server
First of all, you need to set up the communication domain name in the settings page of the admin panel, this domain name can not connect to the CDN, here is the sample communication domain name "data.example.com" mentioned earlier for demonstration
Enter the administration panel, go to the "Settings" page, in the item "CDN Bypassed Domain/IP ", fill in the communication domain name, and then click "Save"
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
+ Nezha Monitoring The service in the monitored server is called Agent. This document will describe how to install the Agent on the monitored server and connect it with Dashboard
Install Agent using one-click script
Nezha Monitoring now supports one-click installation of the Agent on Windows and Linux. Follow the steps in this document and you can easily deploy it on your server
Preparation
First of all, you need to set up the communication domain name in the settings page of the admin panel, this domain name can not connect to the CDN, here is the sample communication domain name "data.example.com" mentioned earlier for demonstration
Enter the administration panel, go to the "Settings" page, in the item "CDN Bypassed Domain/IP ", fill in the communication domain name, and then click "Save"
One-click installation on Linux
- First add a server in the admin panel
- Click on the green Linux icon button next to the newly added server and copy the one-click installation command
- Run the copied one-click installation command on the monitored server, wait for the installation to complete, and then return to the Dashboard home page to see if the server is online.
One-click installation on Windows
- First add a server in the admin panel
- Click on the green Linux icon button next to the newly added server and copy the one-click installation command
- Login to Windows Server, open PowerShell, and run the copied installation command in PowerShell
- If you encounter the prompt "Implement Policy Change" please select Y
- Wait for the installation to complete and return to the Dashboard home page to see if the server is online
Other ways to install Agent
Installing Agent on Linux
- First add a server in the admin panel
- In the monitored server, run the script:
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
- Select “Install_agent”
- Input the communication domain name, e.g. "data.example.com"
- Input RPC port, default is 5555
- Input the Agent Secret, which is generated when adding a server in the administration panel and can be found in the " Servers " page of the administration panel
- Wait for the installation to complete and return to the Dashboard home page to see if the server is online
Installing Agent on Windows
- Please refer to the community article: 哪吒探针 - Windows 客户端安装(Chinese)
Installing Agent on OpenWRT
How to make the old version of OpenWRT/LEDE self-boot?
- Please refer to the project:
哪吒监控 For OpenWRT (Chinese)
How to make the new version of OpenWRT self-boot? By @艾斯德斯
- First download the corresponding binary from the release, unzip the zip package and place it in
/root
- Then run
chmod +x /root/nezha-agent
to give it execute access, create file /etc/init.d/nezha-service
:
#!/bin/sh /etc/rc.common
START=99
@@ -35,8 +35,8 @@
sleep 2
start
}
-
- Give it permission to execute:
chmod +x /etc/init.d/nezha-service
- Start the service
/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
Customize Agent
Customize the NIC and hard drive partitions to be monitored
- Run
/opt/nezha/agent/nezha-agent --edit-agent-config
to select a custom NIC and partition, and then restart Agent
Other Flags
Run ./nezha-agent --help
to view supported flags,if you are already using the one-click script, you can edit /etc/systemd/system/nezha-agent.service
,at the end of this line ExecStart=
add:
--report-delay
System information reporting interval, default is 1 second, can be set to 3 to reduce the system resource usage on the agent side (configuration range 1-4)--skip-conn
Not monitoring the number of connections, if it is a server with a large number of connections, the CPU usage will be high. It is recommended to set this to reduce CPU usage--skip-procs
Disable monitoring the number of processes can also reduce CPU and memory usage--disable-auto-update
Disable Automatic Update Agent (security feature)--disable-force-update
Disable Forced Update Agent (security feature)--disable-command-execute
Disable execution of scheduled tasks, disallow WebShell (security feature)--tls
Enable SSL/TLS encryption (If you are using nginx to reverse proxy Agent´s grpc connections, and if nginx has SSL/TLS enabled, you need to enable this configuration)
-
+
chmod +x /etc/init.d/nezha-service
/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
/opt/nezha/agent/nezha-agent --edit-agent-config
to select a custom NIC and partition, and then restart AgentRun ./nezha-agent --help
to view supported flags,if you are already using the one-click script, you can edit /etc/systemd/system/nezha-agent.service
,at the end of this line ExecStart=
add:
--report-delay
System information reporting interval, default is 1 second, can be set to 3 to reduce the system resource usage on the agent side (configuration range 1-4)--skip-conn
Not monitoring the number of connections, if it is a server with a large number of connections, the CPU usage will be high. It is recommended to set this to reduce CPU usage--skip-procs
Disable monitoring the number of processes can also reduce CPU and memory usage--disable-auto-update
Disable Automatic Update Agent (security feature)--disable-force-update
Disable Forced Update Agent (security feature)--disable-command-execute
Disable execution of scheduled tasks, disallow WebShell (security feature)--tls
Enable SSL/TLS encryption (If you are using nginx to reverse proxy Agent´s grpc connections, and if nginx has SSL/TLS enabled, you need to enable this configuration)There is currently no Docker image for Agent.
The Agent is designed to be the opposite of the Dashboard, in that the Dashboard is designed to work without affecting the server as much as possible, while the Agent needs to execute monitoring services and run commands in the server.
Putting the Agent in a container does continue to execute monitoring services, but features such as WebShell do not work, so we do not provide Docker image of the Agent.
To setup a Nezha monitorning Dashboard, you need these things:
TIP
If you want to use CDN, please prepare two domains, one connect to CDN for public access, CDN needs to support WebSocket protocol; the other domain should not connect to CDN, use it as Agent to send data to Dashboard.
This document uses "cdn.example.com" and "data.example.com" domains to demonstrate respectively
This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only
Nezha Monitor uses a Github account as the login account for the admin panel
Application name
- Fill in as you likeHomepage URL
- Fill in the panel's access domain name, such as: "http://cdn.example.com"Authorization callback URL
- Fill in the callback address, e.g., "http://cdn.example.com/oauth2/callback"curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
+ Nezha Monitoring Preparations
To setup a Nezha monitorning Dashboard, you need these things:
- A VPS that can connect to the Internet, firewall and security policies need to open ports 8008 and 5555, otherwise it will be inaccessible and unable to receive data. A 1 core 512MB RAM server is sufficient for most usage scenarios
- A domain name that has been set up with an A record that resolves to the Dashboard server IP
TIP
If you want to use CDN, please prepare two domains, one connect to CDN for public access, CDN needs to support WebSocket protocol; the other domain should not connect to CDN, use it as Agent to send data to Dashboard.
This document uses "cdn.example.com" and "data.example.com" domains to demonstrate respectively
- A Github account
This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only
Get the Client ID and Client Secret on Github
Nezha Monitor uses a Github account as the login account for the admin panel
- First we need to create a new authentication application, after logging into Github, open https://github.com/settings/developers and select "OAuth Apps" - "New OAuth App "
Application name
- Fill in as you like
Homepage URL
- Fill in the panel's access domain name, such as: "http://cdn.example.com"
Authorization callback URL
- Fill in the callback address, e.g., "http://cdn.example.com/oauth2/callback" - Click on "Registration Application"
- Remember the Client ID in the page, then click "Generate a new client secret" to create a new Client Secret, the new secret will be displayed only once, please save it properly
Installing Dashboard on the server
- In the panel server, run the installation script:
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
After waiting for the Docker installation to complete, input the following settings:
OAuth2 provider
- Github
Client ID
- Previously saved Client ID
Client Secret
- Previously saved secret
GitHub/Gitee login name
- Github username
Site title
- Custom site title
Site access port
- Public access port, customizable, default 8008
RPC port
- The communication port between Agent and Dashboard, default 5555
After the input is complete, wait to pull the mirror
After the installation, if everything is fine, you can visit the domain + port number, such as "http://cdn.example.com:8008" to view the Dashboard
In the future, if you need to run the script again, you can run:
./nezha.sh
to open the management script
Configure reverse proxy
Create a new site in the aaPanel, fill in the public access domain name, such as "http://cdn.example.com", then click "Settings" to enter the site settings option, select " Reverse proxy" - "New reverse proxy"
Customize a proxy name, fill in http://127.0.0.1
in the "Target URL" and click "Save"
Open the " configuration" to the right of the new reverse proxy you just created and replace the configuration file with the following:
#PROXY-START/
location / {
@@ -35,8 +35,8 @@
proxy /terminal/* http://ip:8008 {
websocket
}
-
Configuring SSL in the aaPanel
First, temporarily disable the reverse proxy
As with other websites, you can choose to automatically apply for a Let´s Encrypt certificate or manually configure an existing certificate by going to "SSL" in the site settings
After you finish setting up SSL, you need to go back to https://github.com/settings/developers and edit the authentication application you created before, change all the domain names in the "Homepage URL" and "Authorization callback URL" you filled in before from http
to https
, such as: "https://cdn.example.com" and "https://cdn.example.com/oauth2/callback", If you don't change these links, you may not be able to log into the admin panel
-
+
First, temporarily disable the reverse proxy
As with other websites, you can choose to automatically apply for a Let´s Encrypt certificate or manually configure an existing certificate by going to "SSL" in the site settings
After you finish setting up SSL, you need to go back to https://github.com/settings/developers and edit the authentication application you created before, change all the domain names in the "Homepage URL" and "Authorization callback URL" you filled in before from http
to https
, such as: "https://cdn.example.com" and "https://cdn.example.com/oauth2/callback", If you don't change these links, you may not be able to log into the admin panel
Commonly used in requirements such as batch installation of Agents, where you can modify the database directly.
Please note that not everything can be modified in the database, wrong modification will lead to data confusion and failure to start Dashboard, please do not modify the database at will!
WARNING
Again, please do not modify the database at will!
If you need to modify the data in the database, please stop the Dashboard container before modifying it.
The database type is sqlite3, located in /opt/nezha/dashboard/data/sqlite.db
, please backup before modifying the data
The documentation does not provide an explanation of the database. If you have the ability to modify the database, you should be able to read it with a little thinking.
The Agent normally updates automatically, but the Dashboard does not and needs to be updated manually.
Run the script . /nezha.sh
and select restart Dashboard and update
Nezha Monitoring supports monitoring of server load, CPU, memory, hard disk, bandwidth, data transfer, monthly data transfer, number of processes, number of connections, and sends alarm notifications when one of these items reaches a user-set limit.
#NEZHA#
is the panel message placeholder, the panel will automatically replace the placeholder with the actual message when it triggers the notification
The content of Body is in JSON
format:When the request type is FORM,the value is in the form of key:value
,value
can contain placeholders that will be automatically replaced when notified. When the request type is JSON It will only do string substitution and submit to the URL
directly.
Placeholders can also be placed inside the URL, and it will perform a simple string substitution when requested.
Refer to the example below, it is very flexible.
Telegram Example, contributed by @haitau
cpu
、memory
、swap
、disk
net_in_speed
Inbound speed, net_out_speed
Outbound speed, net_all_speed
Inbound + Outbound speed, transfer_in
Inbound Transfer, transfer_out
Outbound Transfer, transfer_all
Total Transferoffline
Offline monitoringload1
、load5
、load15
Loadprocess_count
Number of processes Currently, counting the number of processes takes up too many resources and is not supported at the momenttcp_conn_count
、udp_conn_count
Number of connections[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
0
Cover all, use ignore
to ignore specific servers1
Ignore all, use ignore
to monitoring specific servers[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
cover
with server id and boolean, e.g.: {"1": true, "2":false}
Complete examples:
TIP
Add an offline notification
[{"Type":"offline","Duration":10}]
TIP
Add an notification when the CPU exceeds 50% for 10s but the memory usage is below 20% for 20s
[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
Can be used as monthly transfer notificatin
type
transfer_in_cycle
Inbound transfer during the cycletransfer_out_cycle
Outbound transfer during the cycletransfer_all_cycle
The sum of inbound and outbound transfer during the cyclecycle_start
Start date of the statistical cycle (can be the start date of your server's billing cycle), the time format is RFC3339, for example, the format in Beijing time zone is 2022-01-11T08:00:00.00+08:00
cycle_interval
Interval time cycle (For example, if the cycle is in days and the value is 7, it means that the statistics are counted every 7 days)
cycle_unit
Statistics cycle unit, default hour
, optional (hour
, day
, week
, month
, year
)
min/max
, cover
, ignore
Please refer to the basic rules to configure
Example: The server with ID 3 (defined in the ignore
) is counted on the 15th of each month, and a notification is triggered when the monthly outbound traffic reaches 1TB during the cycle. [{"type":"transfer_out_cycle","max":1000000000000,"cycle_start":"2022-01-11T08:00:00.00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true}}]
//opt/nezha/agent/nezha-agent -s IP/Domin(Panel IP or Domain not connected to CDN):port(Panel RPC port) -p secret(Agent Secret) -d
Check the logs to see if the timeout is due to a DNS problem or poor networknc -v domain/IP port(Panel RPC port)
or telnet domain/IP port(Panel RPC port)
to check if it' s a network problem, check the inbound and outbound firewall between the local machine and the panel server, if you can' t determine the problem you can check it with the port checking tool provided by https://port.ping.pe//ws
and /terminal
paths, you can click here to see the reverse proxy configurationStop Panel
/opt/nezha
folder to the same path as the new serverLaunch Panel
The Servers area is responsible for managing the Agent, the most basic area in Nezha Monitoring, and the basis for other functions.
The first step is to add a servers, which can be customized with names, groups, display index and notes.
Servers in the same group will be displayed in groups in supported themes, and notes will only be displayed in the admin panel, no need to worry about leaking information.
Please refer to the previous article: Install Agent
We recommend using one-click installation, that is, after configuring the communication domain name, click the button on the column one-click installation and copy it to the monitored servers for installation.
The flags related to the update of the Agent are: --disable-auto-update
and --disable-force-update
. Please refer to Customize Agent
By default, the Agent is updated automatically, but when the user turns off automatic updates, the specified servers can also be selected for forced updates.
This feature does not take effect when -disable-force-update
is turned on.
This feature does not take effect when disable-command-execute
is turned on.
Both Linux and Windows are available and can be pasted using Ctrl+Shift+V.
For connection failure, please refer to Real-time channel disconnection/online terminal connection failure.
Note that in theWebShell function, the Agent also connects to the Domain names for public access via WebSocket, not via grpc.
Service area is a function setting area for setting up Agents to monitor external websites or servers
The monitoring results can be viewed on the "Services" page in the home page
To add a new monitor, you can go to the "Services" page in the administration panel and click "Add Service Monitor".
To add a service monitor, you need to complete the following settings:
Name
- Customize a name
Type
- Select a monitoring type. Nezha currently supports three monitoring types: "HTTP-GET", "ICMP-Ping" and "TCP-Ping".
Target
- Depending on the type you choose, the target is set in different ways
HTTP-GET
: Selecting this type, you should enter a URL as the target, the URL should be added withhttp://
orhttps://
If your target URL ishttps://
, it will also monitor the SSL certificate of that URL and trigger a notification when the SSL certificate expires or changes.
For example: https://example.com
ICMP-Ping
: When selecting this type, you should enter a domain name or IP without a port number
For example: 1.1.1.1 or example.com
TCP-Ping
: When selecting this type, you should enter a domain name or IP and include the port number
For example: 1.1.1.1:80 or example.com:22
Interval
: Sets the time interval in seconds between each time Agent sends requests to the target
Coverage
: Select a rule to determine which Agents to use to send requests to the target
Specific Servers
: Use with coverage to select the Agent to be excluded from the rule
Notification Group
: Select the notification method you have set up on the "Notification" page. Click here for more information
Enable Failure Notification
: Select whether to receive target failure notifications as needed, default is inactive
After setting, click "Add" and you are done.
Wait for a moment to go to the "Services" page on the home page to view the monitoring results
To manage existing service monitoring, you can go to the "Services" page in the administration panel
Select a monitoring configuration and click the icon on the right to edit or delete it
In the task area, you can set up scheduled tasks, periodic tasks, and multi-server batch execution tasks
Nezha monitoring supports pushing commands to the Agent for execution, so this feature is very flexible and can be used to periodically back up the server in conjunction with restic, rclone, or periodically restart a service to reset the network connection.
Go to the "Tasks" page of the admin panel and click "Add Scheduled Task"
To add a scheduled task you need to make the following settings:
Name
- Customize a task name
Cron Expression
- Set schedule time, the Cron Expression is like:: * * * * * *
sec min hour day month week
, see details in CRON Expression Format
For example: 0 0 3 * * *
is Every day at 3 o'clock
Command
- Just like writing shell/bat scripts, but line wrap is not recommended, Multiple Commands should be connected with &&/&
For example, to execute a periodic reboot command, you can type reboot
here
Coverage
and Specific Servers
- Similar to the settings on the Services page, select rules to determine which Agents need to execute scheduled tasks
Notification Group
- Select the notification method you have set up on the "Notification" page. Click here for more information
Send Success Notification
- When this item is activated, a message notification will be triggered when the task is successfully executed
To manage existing scheduled tasks, you can go to the "Tasks" page in the administration panel
Select a task configuration and the three icons on the right, which are:
Execute Now
- When clicked, the scheduled time will be ignored and the task will be executed immediatelyEdit
- Click to modify the task configurationDelete
- Delete this scheduled tasksource ~/.bashrc
at beginning of your command or execute by absolute path.哪吒监控的被控端服务被称为Agent,本文档将介绍如何在被控端服务器上安装Agent,并与Dashboard连接
目前哪吒监控已支持在Windows和Linux上一键安装Agent,遵循本文档的步骤,你可以很轻松的在服务器上部署它
你需要提前在管理面板中设置好通信域名,此域名不可以接入CDN,这里以前面提到过的示例通信域名 “data.example.com” 来做演示
进入后台管理面板,转到“设置”页,在“未接入CDN的面板服务器域名/IP”项中填入通信域名,然后点击"保存"
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
+ 哪吒监控 哪吒监控的被控端服务被称为Agent,本文档将介绍如何在被控端服务器上安装Agent,并与Dashboard连接
一键安装Agent
目前哪吒监控已支持在Windows和Linux上一键安装Agent,遵循本文档的步骤,你可以很轻松的在服务器上部署它
准备工作
你需要提前在管理面板中设置好通信域名,此域名不可以接入CDN,这里以前面提到过的示例通信域名 “data.example.com” 来做演示
进入后台管理面板,转到“设置”页,在“未接入CDN的面板服务器域名/IP”项中填入通信域名,然后点击"保存"
Linux一键安装
- 首先在管理面板中添加一台服务器
- 点击新添加的服务器旁,绿色的Linux图标按钮,复制一键安装命令
- 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到Dashboard主页查看服务器是否上线
Windows一键安装
- 首先在管理面板中添加一台服务器
- 点击新添加的服务器旁,绿色的Windows图标按钮,复制一键安装命令
- 进入Windows服务器,运行PowerShell,在PowerShell中运行复制的安装命令
- 如遇到确认「执行策略变更」请选择 Y
- 等待安装完成后返回Dashboard主页查看服务器是否上线
其他方式安装Agent
Linux安装Agent
- 首先在管理面板中添加一台服务器
- 在被控服务器中,运行脚本(位于中国大陆的服务器请使用镜像):
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
如果你的被控服务器位于中国大陆,可以使用镜像:
curl -L https://fastly.jsdelivr.net/gh/naiba/nezha@master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
- 选择“安装监控Agent”
- 输入通信域名,如:”data.example.com“
- 输入面板通信端口(RPC端口),默认为5555
- 输入Agent密钥,Agent密钥在管理面板中添加服务器时生成,可以在管理面板中的“主机”页中找到
- 等待安装完成后返回Dashboard主页查看服务器是否上线
Windows安装Agent
- 请参考社区文章:
哪吒探针 - Windows 客户端安装
OpenWRT安装Agent
如何使 旧版OpenWRT/LEDE 自启动
- 请参考项目:
哪吒监控 For OpenWRT
如何使 新版OpenWRT 自启动?来自 @艾斯德斯
- 首先在 release 下载对应的二进制解压 zip 包后放置到
/root
- 运行
chmod +x /root/nezha-agent
赋予执行权限,然后创建 /etc/init.d/nezha-service
:
#!/bin/sh /etc/rc.common
@@ -36,8 +36,8 @@
sleep 2
start
}
-
- 运行
chmod +x /etc/init.d/nezha-service
赋予执行权限 - 启动服务:
/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
自定义Agent监控项目
自定义监控的网卡和硬盘分区
- 执行
/opt/nezha/agent/nezha-agent --edit-agent-config
来选择自定义的网卡和分区,然后重启 Agent 即可生效
其他运行参数
通过执行 ./nezha-agent --help
查看支持的参数,如果你使用了一键脚本安装Agent,可以编辑 /etc/systemd/system/nezha-agent.service
,在 ExecStart=
这一行的末尾加上以下参数
--report-delay
控制系统信息上报的间隔,默认为 1 秒,可以设置为 3 来进一步降低 agent 端系统资源占用(配置区间 1-4)--skip-conn
不监控连接数,推荐 机场/连接密集型服务器或CPU占用较高的服务器设置--skip-procs
不监控进程数,也可以降低 agent 占用--disable-auto-update
禁止 自动更新 Agent(安全特性)--disable-force-update
禁止 强制更新 Agent(安全特性)--disable-command-execute
禁止在 Agent 上执行定时任务、打开在线终端(安全特性)--tls
启用 SSL/TLS 加密(使用 nginx 反向代理 Agent 的 grpc 连接,并且 nginx 开启 SSL/TLS 时,需要启用该项配置)
FAQ
Agent有Docker版吗?
Agent目前没有推出Docker镜像。
Agent和Dashboard思路相反,Dashboard要尽可能不影响宿主机工作,但Agent则需要插入宿主机中执行监控和其他命令。
将Agent放入容器中确实可以继续执行监控任务,但WebShell等功能无法正常运行,因此不提供Docker镜像。
-
+
chmod +x /etc/init.d/nezha-service
赋予执行权限/etc/init.d/nezha-service enable && /etc/init.d/nezha-service start
/opt/nezha/agent/nezha-agent --edit-agent-config
来选择自定义的网卡和分区,然后重启 Agent 即可生效通过执行 ./nezha-agent --help
查看支持的参数,如果你使用了一键脚本安装Agent,可以编辑 /etc/systemd/system/nezha-agent.service
,在 ExecStart=
这一行的末尾加上以下参数
--report-delay
控制系统信息上报的间隔,默认为 1 秒,可以设置为 3 来进一步降低 agent 端系统资源占用(配置区间 1-4)--skip-conn
不监控连接数,推荐 机场/连接密集型服务器或CPU占用较高的服务器设置--skip-procs
不监控进程数,也可以降低 agent 占用--disable-auto-update
禁止 自动更新 Agent(安全特性)--disable-force-update
禁止 强制更新 Agent(安全特性)--disable-command-execute
禁止在 Agent 上执行定时任务、打开在线终端(安全特性)--tls
启用 SSL/TLS 加密(使用 nginx 反向代理 Agent 的 grpc 连接,并且 nginx 开启 SSL/TLS 时,需要启用该项配置)Agent 目前没有推出 Docker 镜像。
Agent 的设计思路和 Dashboard 相反,Dashboard 要尽可能不影响宿主机工作,但 Agent 则需要在宿主机中执行监控服务和运行命令。
将 Agent 放入容器中确实可以继续执行监控任务,但 WebShell 等功能无法正常运行,因此不提供 Docker 镜像。
请查看Dashboard相关-后台显示的IP和Agent实际IP不一致?
在此不再赘述。
多出现在国内主机中,目前一键脚本只从github直接获取安装脚本,您可以多尝试几次,或者手动安装Agent,别忘了使用镜像。
请查看 Dashboard相关-后台显示的IP和Agent实际IP不一致?
在此不再赘述。
多出现在国内主机中,目前一键脚本只从github直接获取安装脚本,您可以多尝试几次,或者手动安装Agent,别忘了使用镜像。
搭建一个哪吒监控,你需要:
TIP
如果你想使用CDN,请准备两个域名,一个配置好CDN用作公开访问,CDN需要支持WebSocket协议;另一个域名不要使用CDN,用作Agent端与Dashboard的通信
本文档分别以 "cdn.example.com" 和 "data.example.com" 两个域名来演示
本文档将以宝塔面板反代面板的过程作为范例,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考
哪吒监控接入Github和Gitee作为后台管理员账号
Application name
- 随意填写Homepage URL
- 填写面板的访问域名,如:"http://cdn.example.com"Authorization callback URL
- 填写回调地址,如:"http://cdn.example.com/oauth2/callback"curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
+ 哪吒监控 准备工作
搭建一个哪吒监控,你需要:
- 一台可以连接公网的VPS,防火墙和安全策略需要放行8008和5555端口,否则会无法访问和无法接收数据。单核512MB内存的服务器配置就足以满足大多数使用场景
- 一个已经设置好A记录,指向Dashboard服务器ip的域名
TIP
如果你想使用CDN,请准备两个域名,一个配置好CDN用作公开访问,CDN需要支持WebSocket协议;另一个域名不要使用CDN,用作Agent端与Dashboard的通信
本文档分别以 "cdn.example.com" 和 "data.example.com" 两个域名来演示
- 一个Github/Gitee账号
本文档将以宝塔面板反代面板的过程作为范例,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考
获取Github的Client ID和密钥
哪吒监控接入Github和Gitee作为后台管理员账号
- 首先我们需要新建一个验证应用,以Github为例,登录Github后,打开 https://github.com/settings/developers ,依次选择“OAuth Apps” - “New OAuth App”
Application name
- 随意填写
Homepage URL
- 填写面板的访问域名,如:"http://cdn.example.com"
Authorization callback URL
- 填写回调地址,如:"http://cdn.example.com/oauth2/callback" - 点击“Register application”
- 保存页面中的Client ID,然后点击 “Generate a new client secret“,创建一个新的Client Secret,新建的密钥仅会显示一次,请妥善保存
在服务器中安装Dashboard
- 在面板服务器中,运行安装脚本:
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
如果你的面板服务器位于中国大陆,可以使用镜像:
curl -L https://fastly.jsdelivr.net/gh/naiba/nezha@master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
等待Docker安装完毕后,分别输入以下值:
OAuth提供商
- Github或Gitee
Client ID
- 之前保存的Client ID
Client Secret
- 之前保存的密钥
用户名
- Github或Gitee的用户名
站点标题
- 自定义站点标题
访问端口
- 公开访问端口,可自定义,默认8008
Agent的通信端口
- Agent与Dashboard的通信端口,默认5555
输入完成后,等待拉取镜像
安装结束后,如果一切正常,此时你可以访问域名+端口号,如 “http://cdn.example.com:8008” 来查看面板
将来如果需要再次运行脚本,可以运行:
./nezha.sh
来打开管理脚本
配置反向代理
在宝塔面板中新建一个站点,域名填写公开访问域名,如 “http://cdn.example.com“ ,然后点击“设置”进入站点设置选项,选择“反向代理” - “新建反向代理”
自定义一个代理名称,在下方“目标URL”中填入 http://127.0.0.1
然后点击“保存”
打开刚刚新建的反向代理右边的“配置文件”,将配置文件替换为以下内容:
#PROXY-START/
@@ -36,8 +36,8 @@
proxy /terminal/* http://ip:8008 {
websocket
}
-
在宝塔面板中配置SSL
首先,先暂时关闭反向代理
正如在其他网站中配置SSL证书一样,进入站点设置中的“SSL”,你可以选择自动申请 Let´s Encrypt 证书或手动配置已有的证书
完成SSL的设置后,你需要回到 https://github.com/settings/developers ,编辑之前创建的验证应用程序,将之前我们填入的"Homepage URL"和"Authorization callback URL"中的域名全部从http
改为https
,如:"https://cdn.example.com" 和 "https://cdn.example.com/oauth2/callback" ,不更改此项可能会导致你无法登录面板后台
FAQ
我对面板提供的数据修改/增加功能不满意,我想要自己修改/增加数据怎么办?
常见于批量插入Agent等需求中,可以直接修改数据库。
请注意,数据库中并非什么都可以修改,错误的修改会导致数据混乱无法启动Dashboard,请勿随意修改数据库!
再重复一遍,请勿随意修改数据库!
请先停止面板容器,数据库是sqlite3,位于/opt/nezha/dashboard/data/sqlite.db
,请备份后操作
数据库中各表/列是什么意思?
文档不提供数据库解释,有能力修改数据库的稍加分析应该就足以看懂。
Dashboard会自动更新吗?
Agent通常情况下会自动更新,但Dashboard并不会,需要手动更新。
-
+
首先,先暂时关闭反向代理
正如在其他网站中配置SSL证书一样,进入站点设置中的“SSL”,你可以选择自动申请 Let´s Encrypt 证书或手动配置已有的证书
完成SSL的设置后,你需要回到 https://github.com/settings/developers ,编辑之前创建的验证应用程序,将之前我们填入的"Homepage URL"和"Authorization callback URL"中的域名全部从http
改为https
,如:"https://cdn.example.com" 和 "https://cdn.example.com/oauth2/callback" ,不更改此项可能会导致你无法登录面板后台
常见于批量插入 Agent 等需求中,可以直接修改数据库。
请注意,数据库中并非什么都可以修改,错误的修改会导致数据混乱无法启动Dashboard,请勿随意修改数据库!
WARNING
再重复一遍,请勿随意修改数据库!
如需要在数据库中修改数据,请先停止面板容器再修改。
数据库类型是 sqlite3,位于 /opt/nezha/dashboard/data/sqlite.db
,修改前请备份
文档不提供数据库解释,有能力修改数据库的稍加分析应该就足以看懂。
Agent通常情况下会自动更新,但Dashboard并不会,需要手动更新。
运行脚本 ./nezha.sh
,选择重启面板并更新
请查看常见问题-实时通道断开/在线终端连接失败
在此不再赘述。
首先解释后台显示的IP是怎么来的,Agent会每隔一段时间请求一遍IP-API,获取到IP信息后进行上报,目前使用的IP-API可在此查看myip.go。
如您认为后台显示的IP和服务商提供给您的IP不一致,最大的可能是服务商给您的是入口,但Agent测试的是您的出口。这个问题也可能会出现在多线主机中。
举个简单也十分常见的例子,服务商给您提供的是一台高防主机,为了同时满足高防和低网络中断率的目标,提供给您的IP可能是经过映射后的高防IP而并非您主机的真实出口IP。
您也可以使用以下命令在Agent部署主机中进行测试。
curl api.myip.la
+ 哪吒监控 实时通道断开/在线终端连接失败
请查看常见问题-实时通道断开/在线终端连接失败
在此不再赘述。
后台显示的IP和Agent实际IP不一致?
首先解释后台显示的IP是怎么来的:Agent会每隔一段时间请求一遍IP-API,获取到IP信息后进行上报,目前使用的IP-API可在此查看myip.go。
如您认为后台显示的IP和服务商提供给您的IP不一致,最大的可能是服务商给您的是入口,但Agent测试的是您的出口。这个问题也可能会出现在多线主机中。
TIP
举个简单也十分常见的例子,服务商给您提供的是一台高防主机,为了同时满足高防和低网络中断率的目标,提供给您的IP可能是经过映射后的高防IP而并非您主机的真实出口IP
您也可以使用以下命令在Agent部署主机中进行测试:
curl api.myip.la
curl ip.sb
curl ip-api.com
-
查看密码忘记\删除查看密码
请查看或编辑/opt/nezha/dashboard/data/config.yaml
文件。
密码位于site-viewpassword。
面板安装失败: iptables ......
首先尝试重启docker再操作
systemctl status docker
+
查看密码忘记\删除查看密码
请查看或编辑 /opt/nezha/dashboard/data/config.yaml
文件。
密码位于 site-viewpassword。
面板安装失败: iptables ......
首先尝试重启docker再操作
systemctl status docker
systemctl restart docker
systemctl status docker
重启后尝试重新安装面板。
若依然出现iptables...等错误,则考虑是否直接关闭iptables甚至移除iptables。
这个问题也可能由内核引起,也可以尝试更换官方内核。
-
+
敬请期待
哪吒监控支持对服务器的负载、CPU、内存、硬盘、带宽、流量、月流量、进程数、连接数进行监控,并在其中某项达到用户设定值时发送报警通知
#NEZHA#
是面板消息占位符,面板触发通知时会自动用实际消息替换占位符
Body 内容是JSON
格式的:当请求类型为 FORM 时,值为 key:value
的形式,value
里面可放置占位符,通知时会自动替换。当请求类型为 JSON 时 只会简单进行字符串替换后直接提交到URL
。
URL 里面也可放置占位符,请求时会进行简单的字符串替换。
你可以参考以下的通知方式示例,也可以根据自己的需求灵活设置推送方式
server酱示例
wxpusher 示例,需要关注你的应用
{"appToken":"你的appToken","topicIds":[],"content":"#NEZHA#","contentType":"1","uids":["你的uid"]}
Telegram 示例 @haitau 贡献
cpu
、memory
、swap
、disk
net_in_speed
入站网速、net_out_speed
出站网速、net_all_speed
双向网速、transfer_in
入站流量、transfer_out
出站流量、transfer_all
双向流量offline
离线监控load1
、load5
、load15
负载process_count
进程数 目前取线程数占用资源太多,暂时不支持tcp_conn_count
、udp_conn_count
连接数0
监控所有,通过 ignore
忽略特定服务器1
忽略所有,通过 ignore
监控特定服务器[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
cover
使用,内容为服务器id和布尔值,例如:{"1": true, "2":false}
完整示例:
TIP
添加一个离线报警
[{"Type":"offline","Duration":10}]
TIP
添加一个监控 CPU 持续 10s 超过 50% 且 内存持续 20s 占用低于 20% 的报警
[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
可以用作月流量报警
transfer_in_cycle
周期内的入站流量transfer_out_cycle
周期内的出站流量transfer_all_cycle
周期内双向流量和2022-01-11T08:00:00.00+08:00
hour
,可选(hour
, day
, week
, month
, year
)示例: ID 为 3 的服务器(ignore 里面定义),以每月 15 号为统计周期,周期内统计的出站月流量达到 1TB 时报警 [{"type":"transfer_out_cycle","max":1000000000000,"cycle_start":"2022-01-11T08:00:00.00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true}}]
/opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d
查看日志是否是因为 DNS、网络不佳导致超时(timeout)nc -v 域名/IP 面板RPC端口
或者 telnet 域名/IP 面板RPC端口
来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 https://port.ping.pe/ 提供的端口检查工具进行检测。停止面板
/opt/nezha
文件夹,复制到新环境相同位置解压启动面板
主机区域负责管理Agent,是哪吒探针中最基础的区域,也是其他功能的基础。
第一步是添加主机,可以自定义名称、分组、排序和备注。
拥有相同分组的主机会在受支持的主题中划分到一起进行显示,备注仅会在后台显示,无需担心泄露信息。
请参考前文安装Agent
推荐使用一键安装,即配置好参数后,点击主机一键安装列上的按钮,复制到相应主机进行安装。
Agent更新相关的参数是 自定义agent监控项目 中的 --disable-auto-update
和 --disable-force-update
。
默认情况下,Agent会自动更新,无需干预。但当用户关闭自动更新后,也可以选中指定主机进行强制更新。
disable-force-update开启时此功能不生效。
即WebShell,disable-command-execute
开启时此功能不生效。
Linux和Windows均可用,可使用Ctrl+Shift+V粘贴。
连接失败请参考实时通道断开/在线终端连接失败。
注意在线终端功能中,Agent也是通过WebSocket连接到公开访问域名,而非通过grpc交互。
服务区域是设置 Agent 监控外部网站或服务器的功能设置区
设置好的服务监控可以在主页中的 “服务” 页查看监控结果
如需新增一个监控,可以进入管理面板中的 “服务” 页,点击“添加监控”
新增一个服务监控,你需要设置以下参数:
名称
- 自定义一个名称
类型
- 选择一个监控类型,目前哪吒监控支持三种监控类型,分别是 “HTTP-GET”、“ICMP-Ping” 和 “TCP-Ping”
目标
- 根据你选择的类型不同,目标的设置方法也不同
HTTP-GET
: 选择此类型,你应该输入一个URL作为目标,URL需添加http://
或https://
如果你的目标URL是https://
,将会同时监控该URL的SSL证书,当SSL证书到期或发生变更,会触发提醒
例如: https://example.com
ICMP-Ping
: 选择此类型时,你应该输入一个域名或IP,不含端口号
例如:1.1.1.1 或 example.com
TCP-Ping
: 选择此类型时,你应该输入一个域名或IP并包含端口号
例如:1.1.1.1:80 或 example.com:22
请求间隔
: 设定 Agent 每次请求目标的时间间隔,以秒为单位
覆盖范围
: 选择一条规则来确定要使用哪些 Agent 来请求目标
特定服务器
: 配合覆盖范围使用,选择规则内需要排除的 Agent
通知方式组
: 选择你已经在 “报警” 页设置好的通知方式,点击这里了解详情
启用故障通知
: 根据需要选择是否接收目标故障通知,默认为不勾选
设置完成后,点击 “添加” 即可
稍等片刻前往主页的 “服务” 页,查看监控结果
如需对已有的服务监控进行管理,可以前往管理面板中的 “服务” 页
选择一条监控配置,点击右侧的图标进行编辑或删除
在任务区域中,可以设置计划任务,定期任务,多服务器批量执行任务
哪吒监控支持推送命令到 Agent 执行,因此此功能非常灵活,使用此功能可以定期结合 restic、rclone 给服务器备份,或者定期重启某项服务来重置网络连接
进入管理面板的 “任务” 页,点击 “添加计划任务”
添加计划任务你需要填入以下参数:
名称
- 自定义一个任务名称
计划
- 设置计划时间,时间的格式为: * * * * * *
分别对应 秒 分 时 天 月 星期
,详情见计划表达式格式
如:0 0 3 * * *
对应为 每天3点
命令
- 你可以在这里设置需要执行的命令,就像写 Shell/Bat 脚本一样,但是不推荐换行,多个命令使用 &&/&
连接
例如执行定期重启命令,可以在这里输入 reboot
覆盖范围
和 特定服务器
- 跟“服务”页中的设置类似,选择规则来确定哪些 Agent 执行计划任务
通知方式组
- 选择你已经在 “报警” 页设置好的通知方式,点击这里了解详情
推送成功的消息
- 勾选此项,任务执行成功后会触发消息通知
如需对已有的计划任务进行管理,可以前往管理面板中的 “任务” 页
选择一条任务配置,右侧的三个图标,分别是:
立即执行
- 点击后将忽略计划时间,立刻执行任务编辑
- 点击可以修改任务配置删除
- 删除这条计划任务source ~/.bashrc
或者使用绝对路径执行diff --git a/en_US/guide/dashboard.html b/en_US/guide/dashboard.html index 5666221d..17e0544e 100644 --- a/en_US/guide/dashboard.html +++ b/en_US/guide/dashboard.html @@ -7,13 +7,13 @@ - +
diff --git a/en_US/guide/dashboardq.html b/en_US/guide/dashboardq.html index 9d940488..0950862b 100644 --- a/en_US/guide/dashboardq.html +++ b/en_US/guide/dashboardq.html @@ -14,7 +14,7 @@
diff --git a/en_US/guide/loginq.html b/en_US/guide/loginq.html index 3e845c23..954aba81 100644 --- a/en_US/guide/loginq.html +++ b/en_US/guide/loginq.html @@ -14,7 +14,7 @@
diff --git a/en_US/guide/notifications.html b/en_US/guide/notifications.html index 99c778cf..2f3d2347 100644 --- a/en_US/guide/notifications.html +++ b/en_US/guide/notifications.html @@ -14,7 +14,7 @@
diff --git a/en_US/guide/q2.html b/en_US/guide/q2.html index 6b3a864e..d1553e83 100644 --- a/en_US/guide/q2.html +++ b/en_US/guide/q2.html @@ -14,7 +14,7 @@
diff --git a/en_US/guide/q3.html b/en_US/guide/q3.html index 68739acc..bda20aaf 100644 --- a/en_US/guide/q3.html +++ b/en_US/guide/q3.html @@ -38,7 +38,7 @@ } }
Dashboard Configuration
CDN Bypassed Domain/IP
with the domain name you configured in Nginx or Caddy, for example data.example.com
, and save it./opt/nezha/dashboard/data/config.yaml
file in the panel server and change proxygrpcport
to the port that Nginx or Caddy is listening on, such as 443
as set in the previous step. Since we have SSL/TLS enabled in Nginx or Caddy, we need to set tls
to true
, restart the panel when you are done.Agent Configuration
Enable Cloudflare CDN (optional)
According to Cloudflare gRPC requirements: gRPC services must listen on port 443 and must support TLS and HTTP/2. So if you need to enable CDN, you must use port 443 when configuring Nginx or Caddy reverse proxy gRPC and configure the certificate (Caddy will automatically apply and configure the certificate).
Network
page and turn on the gRPC
switch, then go to the DNS
page, find the resolution record of the domain with gRPC configuration, and turn on the orange cloud icon to enable CDN.- + diff --git a/en_US/guide/q4.html b/en_US/guide/q4.html index 79b89a0a..a1e8e381 100644 --- a/en_US/guide/q4.html +++ b/en_US/guide/q4.html @@ -14,7 +14,7 @@
diff --git a/en_US/guide/q5.html b/en_US/guide/q5.html index f8531e66..d7bbf718 100644 --- a/en_US/guide/q5.html +++ b/en_US/guide/q5.html @@ -14,7 +14,7 @@
diff --git a/en_US/guide/servers.html b/en_US/guide/servers.html index 097787fe..5de5d325 100644 --- a/en_US/guide/servers.html +++ b/en_US/guide/servers.html @@ -14,7 +14,7 @@
diff --git a/en_US/guide/services.html b/en_US/guide/services.html index 3aa8658e..1049e511 100644 --- a/en_US/guide/services.html +++ b/en_US/guide/services.html @@ -14,7 +14,7 @@
diff --git a/en_US/guide/settings.html b/en_US/guide/settings.html index 0a841476..971d3aae 100644 --- a/en_US/guide/settings.html +++ b/en_US/guide/settings.html @@ -57,7 +57,7 @@ avatar.style} </style>
If you don't want to show your homepage directly, you can set a access password here
After setting the password, you need to enter the password to access the homepage
This setting is a prerequisite for using the one-click script to install the Agent, see here for details
If you want to be notified when a server's ip changes, you can set it up here
Select a rule here to determine which servers need to be monitored, and you can choose according to your needs
In conjunction with the coverage settings, set the exclusions for the selected rule here
Select the notification method, please set the notification method in the "Notifications" page
WARNING
When the settings are completed, the notification takes effect when enabled
is activated
WARNING
IP Change Alert does not show ip by default, if you don't want to hide it, you can activate "Do NOT desensitize Server IP In Notification Messages"
- + diff --git a/en_US/guide/tasks.html b/en_US/guide/tasks.html index c7ea0504..d6de20ba 100644 --- a/en_US/guide/tasks.html +++ b/en_US/guide/tasks.html @@ -14,7 +14,7 @@
diff --git a/en_US/index.html b/en_US/index.html index 7f9a9e02..288ba9b5 100644 --- a/en_US/index.html +++ b/en_US/index.html @@ -14,7 +14,7 @@
diff --git a/guide/agent.html b/guide/agent.html index bcb9e72e..286b471f 100644 --- a/guide/agent.html +++ b/guide/agent.html @@ -7,13 +7,13 @@ - +
diff --git a/guide/agentq.html b/guide/agentq.html index c2942654..1d62e60c 100644 --- a/guide/agentq.html +++ b/guide/agentq.html @@ -3,18 +3,18 @@
-
+
- + - - + +
diff --git a/guide/api.html b/guide/api.html index 0c11eed0..95f51c3d 100644 --- a/guide/api.html +++ b/guide/api.html @@ -126,7 +126,7 @@ Authorization: Token ] }
- + diff --git a/guide/dashboard.html b/guide/dashboard.html index aed4fb99..6114a08e 100644 --- a/guide/dashboard.html +++ b/guide/dashboard.html @@ -7,13 +7,13 @@ - +
diff --git a/guide/dashboardq.html b/guide/dashboardq.html index 77aaf58c..39761973 100644 --- a/guide/dashboardq.html +++ b/guide/dashboardq.html @@ -3,24 +3,24 @@
-
+
- + - - + +
diff --git a/guide/loginq.html b/guide/loginq.html index 44b4ea74..20669c78 100644 --- a/guide/loginq.html +++ b/guide/loginq.html @@ -3,18 +3,18 @@
-
+
- + - - + +
diff --git a/guide/notifications.html b/guide/notifications.html index 0c297add..ab1b30e5 100644 --- a/guide/notifications.html +++ b/guide/notifications.html @@ -14,7 +14,7 @@
diff --git a/guide/q1.html b/guide/q1.html index 8aab6ef6..871a8a61 100644 --- a/guide/q1.html +++ b/guide/q1.html @@ -60,7 +60,7 @@ ufw allow proto tcp from serverIp to any port 443443 -j DROP iptables -I INPUT -s serverIp -p tcp --dport 443 -j ACCEPT
- + diff --git a/guide/q2.html b/guide/q2.html index 232cc409..113a3f86 100644 --- a/guide/q2.html +++ b/guide/q2.html @@ -14,7 +14,7 @@
diff --git a/guide/q3.html b/guide/q3.html index 4e35f47b..9ee7b674 100644 --- a/guide/q3.html +++ b/guide/q3.html @@ -38,7 +38,7 @@ } }
Dashboard 面板端配置
未接入CDN的面板服务器域名/IP
中填入上一步在 Nginx 或 Caddy 中配置的域名 比如 data.example.com
,并保存。proxygrpcport
修改为 Nginx 或 Caddy 监听的端口,比如上一步设置的 443
;因为我们在 Nginx 或 Caddy 中开启了 SSL/TLS,所以需要将 tls
设置为 true
;修改完成后重启面板。Agent 端配置
开启 Cloudflare CDN(可选)
根据 Cloudflare gRPC 的要求:gRPC 服务必须侦听 443 端口 且必须支持 TLS 和 HTTP/2。 所以如果需要开启 CDN,必须在配置 Nginx 或者 Caddy 反向代理 gRPC 时使用 443 端口,并配置证书(Caddy 会自动申请并配置证书)。
网络
选项将 gRPC
开关打开,打开 DNS
选项,找到 Nginx 或 Caddy 反代 gRPC 配置的域名的解析记录,打开橙色云启用 CDN。- + diff --git a/guide/q4.html b/guide/q4.html index 181b3b05..b8faf488 100644 --- a/guide/q4.html +++ b/guide/q4.html @@ -14,7 +14,7 @@
diff --git a/guide/q5.html b/guide/q5.html index a27cc6a4..6ff4f94a 100644 --- a/guide/q5.html +++ b/guide/q5.html @@ -14,7 +14,7 @@
diff --git a/guide/servers.html b/guide/servers.html index d90fd849..0cd8f1ce 100644 --- a/guide/servers.html +++ b/guide/servers.html @@ -14,7 +14,7 @@
diff --git a/guide/services.html b/guide/services.html index 0dd28fad..e5f22602 100644 --- a/guide/services.html +++ b/guide/services.html @@ -14,7 +14,7 @@
diff --git a/guide/settings.html b/guide/settings.html index 56247c9a..673d06ba 100644 --- a/guide/settings.html +++ b/guide/settings.html @@ -57,7 +57,7 @@ avatar.style} </style>
如果你不想直接展示你的主页,你可以在这里设置一个查看密码
设置密码后,需要输入密码才可以访问主页
此项设置是使用一键脚本安装 Agent 的前提,详情请查看这里
如果你希望当某个服务器的ip发生变更时收到通知,可以在这里进行设置
在这里选择一条规则,来确定需要监控哪些服务器,可以根据自己的需求进行选择
配合覆盖范围的设置,在这里设置选定规则的排除项
选择通知方式,通知方式请提前在 “报警” 页内设置
WARNING
设置完成后,勾选启用时,通知生效
WARNING
IP变更通知默认打码,如果你不希望打码,可以勾选 “通知信息IP不打码”
- + diff --git a/guide/tasks.html b/guide/tasks.html index 4b2775a0..5e06318d 100644 --- a/guide/tasks.html +++ b/guide/tasks.html @@ -14,7 +14,7 @@
diff --git a/hashmap.json b/hashmap.json index 9951eb65..dcc586b1 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"developer_index.md":"73745970","developer_l10n.md":"84df007d","developer_theme.md":"10393f71","en_us_developer_index.md":"df68d0e0","en_us_developer_l10n.md":"ccda64e7","en_us_developer_theme.md":"269a5170","en_us_guide_agent.md":"eb18d6fc","en_us_guide_agentq.md":"094fcb6f","en_us_guide_api.md":"fde8c0a6","en_us_guide_dashboard.md":"0119ec1c","en_us_guide_dashboardq.md":"ac04f4d0","en_us_guide_loginq.md":"0379f96c","en_us_guide_notifications.md":"f2f143b0","en_us_guide_q2.md":"bbad7ab9","en_us_guide_q3.md":"37e5f372","en_us_guide_q4.md":"72447cee","en_us_guide_q5.md":"4bd8b06a","en_us_guide_servers.md":"f083b70a","en_us_guide_services.md":"c8ca2548","en_us_guide_settings.md":"91296351","en_us_guide_tasks.md":"5bd4651e","en_us_index.md":"3aaf4a98","guide_agent.md":"234c8088","guide_agentq.md":"bb3a20db","guide_api.md":"d9d6bcb1","guide_dashboard.md":"b8948c90","guide_dashboardq.md":"3a907dbe","guide_loginq.md":"f0ef566f","guide_notifications.md":"b7a587bd","guide_q1.md":"eae9ada6","guide_q2.md":"8c395f8c","guide_q3.md":"393bb3f1","guide_q4.md":"f2a6e087","guide_q5.md":"efdadad4","guide_servers.md":"236b045e","guide_services.md":"218f0dfd","guide_settings.md":"c386562b","guide_tasks.md":"c3d40967","index.md":"1bec4c22"} +{"developer_index.md":"73745970","developer_l10n.md":"84df007d","developer_theme.md":"10393f71","en_us_developer_index.md":"df68d0e0","en_us_developer_l10n.md":"ccda64e7","en_us_developer_theme.md":"269a5170","en_us_guide_agent.md":"405e94e9","en_us_guide_agentq.md":"094fcb6f","en_us_guide_api.md":"fde8c0a6","en_us_guide_dashboard.md":"661726af","en_us_guide_dashboardq.md":"ac04f4d0","en_us_guide_loginq.md":"0379f96c","en_us_guide_notifications.md":"f2f143b0","en_us_guide_q2.md":"bbad7ab9","en_us_guide_q3.md":"37e5f372","en_us_guide_q4.md":"72447cee","en_us_guide_q5.md":"4bd8b06a","en_us_guide_servers.md":"f083b70a","en_us_guide_services.md":"c8ca2548","en_us_guide_settings.md":"91296351","en_us_guide_tasks.md":"5bd4651e","en_us_index.md":"3aaf4a98","guide_agent.md":"48a9c7b9","guide_agentq.md":"c0c374da","guide_api.md":"d9d6bcb1","guide_dashboard.md":"8f5dc9da","guide_dashboardq.md":"08b34d6b","guide_loginq.md":"4cce1205","guide_notifications.md":"b7a587bd","guide_q1.md":"eae9ada6","guide_q2.md":"8c395f8c","guide_q3.md":"393bb3f1","guide_q4.md":"f2a6e087","guide_q5.md":"efdadad4","guide_servers.md":"236b045e","guide_services.md":"218f0dfd","guide_settings.md":"c386562b","guide_tasks.md":"c3d40967","index.md":"1bec4c22"} diff --git a/index.html b/index.html index 07f9cad6..b7c81511 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@