import{_ as e,o as a,c as s,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Servers","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1715016176000}'),n={name:"en_US/guide/servers.md"},l=o(`
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.
DDNS feature is suitable for servers that have dynamic IP addresses. When a different IP is reported by Agent, Dashboard will update DNS record automatically using configured settings.
Currently, DDNS supports two types of configurations: Single and Multiple. If Single is chosen, all Agent servers will use the same configuration to update DNS records, whereas selecting Multiple allows each server to use a specified configuration.
DDNS:
Enable: true
Provider: "webhook"
AccessID: ""
AccessSecret: ""
WebhookMethod: ""
WebhookURL: ""
WebhookRequestBody: ""
WebhookHeaders: ""
MaxRetries: 3
Profiles: null
Boolean value indicating whether the DDNS function is enabled.
Name of the DDNS provider, currently support webhook
, cloudflare
and tencentcloud
.
Secret ID associated with DDNS provider.
Only applied to tencentcloud
.
Secret key associated with DDNS provider.
Only applied to cloudflare
and tencentcloud
.
Request method of Webhook. For example, GET
and POST
.
Only applied to webhook
.
Request URL of Webhook.
Only applied to webhook
.
Request body of Webhook.
Only applied to webhook
.
Request headers of Webhook.
Only applied to webhook
.
The number of retry attempts after an update request has failed.
Multiple configuration setting. Will be ignored in Single configuration setting.
TIP
WebhookURL
, WebhookRequestBody
and WebhookHeaders
can use additional params:
{ip}
- Host IP
{domain}
- DDNS domain
{type}
- Your IP type, possibly "ipv4" or "ipv6"
{access_id}
- Credential #1
{access_secret}
- Credential #2
Example:
WebhookHeaders: |
a:{access_id}
b:{access_secret}
WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'
Please leave DDNS.Provider
field blank while using Multiple configuration. If not, the Multiple configuration will be ignored.
DDNS:
Enable: true
MaxRetries: 3
Profiles:
example:
Provider: ""
AccessID: ""
AccessSecret: ""
WebhookMethod: ""
WebhookURL: ""
WebhookRequestBody: ""
WebhookHeaders: ""
Multiple configuration setting.
Name of DDNS configuration, can be any string.
For other options, view Single.
After configuring config.yaml
, you will need to modify server settings in Dashboard to make DDNS function effective.
Explanation of DDNS-related options:
TIP
When modifying settings in the Dashboard and saving them, default configuration options will be filled into the config.yaml
file. At this time, in the DDNS field, there will be both single configuration and multiple configurations options available.
If you need to use a single configuration, please ignore the content related to the Profiles option.
Please leave DDNS.Provider
field blank while using Multiple configuration. If not, the Multiple configuration will be ignored.
In the Dashboard's logs, you can view the relevant logs for the DDNS. When configured correctly, there will be corresponding log entries when the DNS records are updated.
dashboard_1 | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3)
dashboard_1 | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功