nezhahq.github.io/assets/en_US_guide_servers.md.588f80ca.js
2024-05-02 19:48:10 +00:00

27 lines
18 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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":1714679251000}'),n={name:"en_US/guide/servers.md"},l=o(`<h1 id="servers" tabindex="-1">Servers <a class="header-anchor" href="#servers" aria-label="Permalink to &quot;Servers&quot;"></a></h1><h2 id="introduction" tabindex="-1">Introduction <a class="header-anchor" href="#introduction" aria-label="Permalink to &quot;Introduction&quot;"></a></h2><p>The Servers area is responsible for managing the Agent, the most basic area in Nezha Monitoring, and the basis for other functions.</p><h2 id="add-a-server" tabindex="-1">Add a server <a class="header-anchor" href="#add-a-server" aria-label="Permalink to &quot;Add a server&quot;"></a></h2><p>The first step is to add a servers, which can be customized with names, groups, display index and notes.<br> 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.</p><h2 id="install-agent" tabindex="-1">Install Agent <a class="header-anchor" href="#install-agent" aria-label="Permalink to &quot;Install Agent&quot;"></a></h2><p>Please refer to the previous article: <a href="/en_US/guide/agent.html">Install Agent</a><br> We recommend using one-click installation, that is, <strong>after configuring the communication domain name</strong>, click the button on the column <strong>one-click installation</strong> and copy it to the monitored servers for installation.</p><h2 id="forced-updates" tabindex="-1">Forced Updates <a class="header-anchor" href="#forced-updates" aria-label="Permalink to &quot;Forced Updates&quot;"></a></h2><p>The flags related to the update of the Agent are: <code>--disable-auto-update</code> and <code>--disable-force-update</code>. Please refer to <a href="/en_US/guide/agent.html#customize-agent">Customize Agent</a><br> 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.<br> This feature does not take effect when <code>-disable-force-update</code> is turned on.</p><h2 id="data-list" tabindex="-1">Data List <a class="header-anchor" href="#data-list" aria-label="Permalink to &quot;Data List&quot;"></a></h2><ul><li>Version number: Record the current version of Agent</li><li>Secret: Used when configuring the Agent</li><li>One-Click Installation: A more convenient way to install Agent</li><li>Manage: WebShell on the left, Edit in the middle, Delete on the right</li></ul><h2 id="webshell" tabindex="-1">Webshell <a class="header-anchor" href="#webshell" aria-label="Permalink to &quot;Webshell&quot;"></a></h2><p>This feature does not take effect when <code>disable-command-execute</code> is turned on.<br> Both Linux and Windows are available and can be pasted using Ctrl+Shift+V.<br> For connection failure, please refer to <a href="/en_US/guide/q4.html">Real-time channel disconnection/online terminal connection failure</a>.<br> Note that in theWebShell function, the Agent also connects to the <strong>Domain names for public access</strong> via WebSocket, not via grpc.</p><h2 id="ddns" tabindex="-1">DDNS <a class="header-anchor" href="#ddns" aria-label="Permalink to &quot;DDNS&quot;"></a></h2><p>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.</p><h3 id="why-choose-nezha-s-ddns-feature" tabindex="-1">Why choose Nezha&#39;s DDNS feature <a class="header-anchor" href="#why-choose-nezha-s-ddns-feature" aria-label="Permalink to &quot;Why choose Nezha&#39;s DDNS feature&quot;"></a></h3><ul><li>Manage your DDNS configuration centrally, without deploying a single service on every server.</li><li>Save your credentials only on the Dashboard server to prevent data leaks.</li></ul><h3 id="configuration-description" tabindex="-1">Configuration description <a class="header-anchor" href="#configuration-description" aria-label="Permalink to &quot;Configuration description&quot;"></a></h3><p>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.</p><h4 id="single" tabindex="-1">Single <a class="header-anchor" href="#single" aria-label="Permalink to &quot;Single&quot;"></a></h4><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#F07178;">DDNS</span><span style="color:#89DDFF;">:</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">Enable</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#FF9CAC;">true</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">Provider</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">webhook</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">AccessID</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">AccessSecret</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">WebhookMethod</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">WebhookURL</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">WebhookRequestBody</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">WebhookHeaders</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">MaxRetries</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">3</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">Profiles</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">null</span></span></code></pre></div><h5 id="enable" tabindex="-1">Enable <a class="header-anchor" href="#enable" aria-label="Permalink to &quot;Enable&quot;"></a></h5><p>Boolean value indicating whether the DDNS function is enabled.</p><h5 id="provider" tabindex="-1">Provider <a class="header-anchor" href="#provider" aria-label="Permalink to &quot;Provider&quot;"></a></h5><p>Name of the DDNS provider, currently support <code>webhook</code>, <code>cloudflare</code> and <code>tencentcloud</code>.</p><h5 id="accessid" tabindex="-1">AccessID <a class="header-anchor" href="#accessid" aria-label="Permalink to &quot;AccessID&quot;"></a></h5><p>Secret ID associated with DDNS provider.</p><p>Only applied to <code>tencentcloud</code>.</p><h5 id="accesssecret" tabindex="-1">AccessSecret <a class="header-anchor" href="#accesssecret" aria-label="Permalink to &quot;AccessSecret&quot;"></a></h5><p>Secret key associated with DDNS provider.</p><p>Only applied to <code>cloudflare</code> and <code>tencentcloud</code>.</p><h5 id="webhookmethod" tabindex="-1">WebhookMethod <a class="header-anchor" href="#webhookmethod" aria-label="Permalink to &quot;WebhookMethod&quot;"></a></h5><p>Request method of Webhook. For example, <code>GET</code> and <code>POST</code>.</p><p>Only applied to <code>webhook</code>.</p><h5 id="webhookurl" tabindex="-1">WebhookURL <a class="header-anchor" href="#webhookurl" aria-label="Permalink to &quot;WebhookURL&quot;"></a></h5><p>Request URL of Webhook.</p><p>Only applied to <code>webhook</code>.</p><h5 id="webhookrequestbody" tabindex="-1">WebhookRequestBody <a class="header-anchor" href="#webhookrequestbody" aria-label="Permalink to &quot;WebhookRequestBody&quot;"></a></h5><p>Request body of Webhook.</p><p>Only applied to <code>webhook</code>.</p><h5 id="webhookheaders" tabindex="-1">WebhookHeaders <a class="header-anchor" href="#webhookheaders" aria-label="Permalink to &quot;WebhookHeaders&quot;"></a></h5><p>Request headers of Webhook.</p><p>Only applied to <code>webhook</code>.</p><h5 id="maxretries" tabindex="-1">MaxRetries <a class="header-anchor" href="#maxretries" aria-label="Permalink to &quot;MaxRetries&quot;"></a></h5><p>The number of retry attempts after an update request has failed.</p><h5 id="profiles" tabindex="-1">Profiles <a class="header-anchor" href="#profiles" aria-label="Permalink to &quot;Profiles&quot;"></a></h5><p>Multiple configuration setting. Will be ignored in Single configuration setting.</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><code>WebhookURL</code>, <code>WebhookRequestBody</code> and <code>WebhookHeaders</code> can use additional params</p><p><code>{ip}</code> - Host IP</p><p><code>{domain}</code> - DDNS domain</p><p><code>{type}</code> - Your IP type, possibly &quot;ipv4&quot; or &quot;ipv6&quot;</p><p><code>{access_id}</code> - Credential #1</p><p><code>{access_secret}</code> - Credential #2</p><p>Example:</p><div class="language-"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#A6ACCD;">WebhookHeaders: |</span></span>
<span class="line"><span style="color:#A6ACCD;"> a:{access_id}</span></span>
<span class="line"><span style="color:#A6ACCD;"> b:{access_secret}</span></span>
<span class="line"><span style="color:#A6ACCD;">WebhookRequestBody: &#39;{&quot;domain&quot;: &quot;{domain}&quot;, &quot;ip&quot;: &quot;{ip}&quot;, &quot;type&quot;: &quot;{type}&quot;}&#39;</span></span></code></pre></div></div><h4 id="multiple" tabindex="-1">Multiple <a class="header-anchor" href="#multiple" aria-label="Permalink to &quot;Multiple&quot;"></a></h4><p>Please leave <code>DDNS.Provider</code> field blank while using Multiple configuration. If not, the Multiple configuration will be ignored.</p><div class="language-yaml"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#F07178;">DDNS</span><span style="color:#89DDFF;">:</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">Enable</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#FF9CAC;">true</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">MaxRetries</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">3</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">Profiles</span><span style="color:#89DDFF;">:</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">example</span><span style="color:#89DDFF;">:</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">Provider</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">AccessID</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">AccessSecret</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">WebhookMethod</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">WebhookURL</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">WebhookRequestBody</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#F07178;">WebhookHeaders</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;&quot;</span></span></code></pre></div><h5 id="profiles-1" tabindex="-1">Profiles <a class="header-anchor" href="#profiles-1" aria-label="Permalink to &quot;Profiles&quot;"></a></h5><p>Multiple configuration setting.</p><h5 id="example" tabindex="-1">example <a class="header-anchor" href="#example" aria-label="Permalink to &quot;example&quot;"></a></h5><p>Name of DDNS configuration, can be any string.</p><p>For other options, view <a href="#single">Single</a>.</p><h3 id="dashboard-configuration" tabindex="-1">Dashboard configuration <a class="header-anchor" href="#dashboard-configuration" aria-label="Permalink to &quot;Dashboard configuration&quot;"></a></h3><p>After configuring <code>config.yaml</code>, you will need to modify server settings in Dashboard to make DDNS function effective.</p><p>Explanation of DDNS-related options:</p><ul><li>Enable DDNS Enable the DDNS functionality for this server.</li><li>Enable DDNS IPv4 Enable IPv4 resolution when updating DDNS records.</li><li>Enable DDNS IPv6 Enable IPv6 resolution when updating DDNS records.</li><li>DDNS Domain The domain name the record points to.</li><li>DDNS Configuration The DDNS configuration to use in case of multiple configurations.</li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>When modifying settings in the Dashboard and saving them, default configuration options will be filled into the <code>config.yaml</code> file. At this time, in the DDNS field, there will be both single configuration and multiple configurations options available.</p><p>If you need to use a single configuration, please ignore the content related to the Profiles option.</p><p>Please leave <code>DDNS.Provider</code> field blank while using Multiple configuration. If not, the Multiple configuration will be ignored.</p></div><h3 id="view-log" tabindex="-1">View log <a class="header-anchor" href="#view-log" aria-label="Permalink to &quot;View log&quot;"></a></h3><p>In the Dashboard&#39;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.</p><div class="language-shell"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">dashboard_1</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">|</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">2024/03/16</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">23</span><span style="color:#C3E88D;">:16:25</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">NEZH</span><span style="color:#A6ACCD;">A</span><span style="color:#89DDFF;">&gt;&gt;</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">正在尝试更新域名</span><span style="color:#89DDFF;">(</span><span style="color:#FFCB6B;">ddns.example.com</span><span style="color:#89DDFF;">)</span><span style="color:#C3E88D;">DDNS</span><span style="color:#89DDFF;">(</span><span style="color:#FFCB6B;">1/3</span><span style="color:#89DDFF;">)</span></span>
<span class="line"><span style="color:#FFCB6B;">dashboard_1</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">|</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">2024/03/16</span><span style="color:#A6ACCD;"> </span><span style="color:#F78C6C;">23</span><span style="color:#C3E88D;">:16:28</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">NEZH</span><span style="color:#A6ACCD;">A</span><span style="color:#89DDFF;">&gt;&gt;</span><span style="color:#A6ACCD;"> </span><span style="color:#C3E88D;">尝试更新域名</span><span style="color:#89DDFF;">(</span><span style="color:#FFCB6B;">ddns.example.com</span><span style="color:#89DDFF;">)</span><span style="color:#C3E88D;">DDNS成功</span></span></code></pre></div>`,64),t=[l];function r(p,i,c,d,h,u){return a(),s("div",null,t)}const b=e(n,[["render",r]]);export{y as __pageData,b as default};