This commit is contained in:
hhhkkk520
2022-05-20 18:14:04 +00:00
parent 827f253854
commit e03ff3e248
56 changed files with 379 additions and 69 deletions
@@ -20,4 +20,4 @@ import{_ as e,c as n,o as t,d as a}from"./app.2c402e15.js";const m='{"title":"In
<span class="token function">sleep</span> <span class="token number">2</span>
start
<span class="token punctuation">}</span>
</code></pre></div><ul><li>Give it permission to execute: <code>chmod +x /etc/init.d/nezha-service</code></li><li>Start the service <code>/etc/init.d/nezha-service enable &amp;&amp; /etc/init.d/nezha-service start</code><br><br></li></ul><h2 id="customize-agent" tabindex="-1">Customize Agent <a class="header-anchor" href="#customize-agent" aria-hidden="true">#</a></h2><h4 id="customize-the-nic-and-hard-drive-partitions-to-be-monitored" tabindex="-1">Customize the NIC and hard drive partitions to be monitored <a class="header-anchor" href="#customize-the-nic-and-hard-drive-partitions-to-be-monitored" aria-hidden="true">#</a></h4><ul><li>Run <code>/opt/nezha/agent/nezha-agent --edit-agent-config</code> to select a custom NIC and partition, and then restart Agent</li></ul><h4 id="other-flags" tabindex="-1">Other Flags <a class="header-anchor" href="#other-flags" aria-hidden="true">#</a></h4><p>Run <code>./nezha-agent --help</code> to view supported flags\uFF0Cif you are already using the one-click script, you can edit <code>/etc/systemd/system/nezha-agent.service</code>\uFF0Cat the end of this line <code>ExecStart=</code> add:</p><ul><li><code>--report-delay</code> 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)</li><li><code>--skip-conn</code> 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</li><li><code>--skip-procs</code> Disable monitoring the number of processes can also reduce CPU and memory usage</li><li><code>--disable-auto-update</code> Disable <strong>Automatic Update</strong> Agent (security feature)</li><li><code>--disable-force-update</code> Disable <strong>Forced Update</strong> Agent (security feature)</li><li><code>--disable-command-execute</code> Disable execution of scheduled tasks, disallow open online terminals on the Agent side (security feature)</li><li><code>--tls</code> 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)</li></ul>`,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};
</code></pre></div><ul><li>Give it permission to execute: <code>chmod +x /etc/init.d/nezha-service</code></li><li>Start the service <code>/etc/init.d/nezha-service enable &amp;&amp; /etc/init.d/nezha-service start</code><br><br></li></ul><h2 id="customize-agent" tabindex="-1">Customize Agent <a class="header-anchor" href="#customize-agent" aria-hidden="true">#</a></h2><h4 id="customize-the-nic-and-hard-drive-partitions-to-be-monitored" tabindex="-1">Customize the NIC and hard drive partitions to be monitored <a class="header-anchor" href="#customize-the-nic-and-hard-drive-partitions-to-be-monitored" aria-hidden="true">#</a></h4><ul><li>Run <code>/opt/nezha/agent/nezha-agent --edit-agent-config</code> to select a custom NIC and partition, and then restart Agent</li></ul><h4 id="other-flags" tabindex="-1">Other Flags <a class="header-anchor" href="#other-flags" aria-hidden="true">#</a></h4><p>Run <code>./nezha-agent --help</code> to view supported flags\uFF0Cif you are already using the one-click script, you can edit <code>/etc/systemd/system/nezha-agent.service</code>\uFF0Cat the end of this line <code>ExecStart=</code> add:</p><ul><li><code>--report-delay</code> 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)</li><li><code>--skip-conn</code> 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</li><li><code>--skip-procs</code> Disable monitoring the number of processes can also reduce CPU and memory usage</li><li><code>--disable-auto-update</code> Disable <strong>Automatic Update</strong> Agent (security feature)</li><li><code>--disable-force-update</code> Disable <strong>Forced Update</strong> Agent (security feature)</li><li><code>--disable-command-execute</code> Disable execution of scheduled tasks, disallow WebShell (security feature)</li><li><code>--tls</code> 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)</li></ul>`,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};
-1
View File
@@ -1 +0,0 @@
import{_ as e,c as t,o,a}from"./app.2c402e15.js";const h='{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md"}',s={},n=a("p",null,"Comming soon",-1),r=[n];function c(_,i,p,d,l,m){return o(),t("div",null,r)}var u=e(s,[["render",c]]);export{h as __pageData,u as default};
@@ -1 +0,0 @@
import{_ as e,c as t,o,a}from"./app.2c402e15.js";const h='{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md"}',s={},n=a("p",null,"Comming soon",-1),r=[n];function c(_,i,p,d,l,m){return o(),t("div",null,r)}var u=e(s,[["render",c]]);export{h as __pageData,u as default};
+113
View File
@@ -0,0 +1,113 @@
import{_ as t,c as o,o as e,d as u}from"./app.2c402e15.js";const v='{"title":"Create Token","description":"","frontmatter":{},"headers":[{"level":2,"title":"Create Token","slug":"create-token"},{"level":2,"title":"Authentication method","slug":"authentication-method"},{"level":2,"title":"How to use","slug":"how-to-use"}],"relativePath":"en_US/guide/api.md"}',n={},q=u(`<p><strong>Nezha Monitoring now supports querying the status information of the Agent in the Dashboard using the API</strong></p><h2 id="create-token" tabindex="-1">Create Token <a class="header-anchor" href="#create-token" aria-hidden="true">#</a></h2><p>API allows Token authentication method and Cookies authentication method<br> To create a new Token, after entering the admin panel, click on the avatar in the upper right corner and select &quot;API Token&quot; to enter the Token management page<br> Click &quot;Add Token&quot; and after customizing the notes, click &quot;Add&quot;<br> To delete a Token, please select the corresponding Token and click the delete icon on the right</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Token is the authentication tool of API, it is very important for your Dashboard&#39;s information security, please don&#39;t leak your Token to others</p></div><h2 id="authentication-method" tabindex="-1">Authentication method <a class="header-anchor" href="#authentication-method" aria-hidden="true">#</a></h2><p>Token authentication method:</p><div class="language-"><pre><code>Request Headers:
Authorization: Token
</code></pre></div><h2 id="how-to-use" tabindex="-1">How to use <a class="header-anchor" href="#how-to-use" aria-hidden="true">#</a></h2><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>The negative timestamp in the example below is (0000-00-00)<br> It is currently used to indicate that the Agent has never reported since the Dashboard went live<br> However, it is not recommended to use positivity or negativity to determine the status</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><strong>The request method is <code>Get</code> and the return format is <code>JSON</code>.</strong></p></div><ul><li>Get a list of servers: <code>GET /api/v1/server/list?tag=</code><br> query: tag (ServerTag means the group of servers, if this value is provided, only the servers in this group are queried)</li></ul><p>JSON Return Example:</p><div class="language-"><pre><code>{
&quot;code&quot;: 0,
&quot;message&quot;: &quot;success&quot;,
&quot;result&quot;: [
{
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Server1&quot;,
&quot;tag&quot;: &quot;Tag1&quot;,
&quot;last_active&quot;: 1653014667,
&quot;ipv4&quot;: &quot;1.1.1.1&quot;,
&quot;ipv6&quot;: &quot;&quot;,
&quot;valid_ip&quot;: &quot;1.1.1.1&quot;
},
{
&quot;id&quot;: 2,
&quot;name&quot;: &quot;Server2&quot;,
&quot;tag&quot;: &quot;Tag2&quot;,
&quot;last_active&quot;: -62135596800,
&quot;ipv4&quot;: &quot;&quot;,
&quot;ipv6&quot;: &quot;&quot;,
&quot;valid_ip&quot;: &quot;&quot;
}
]
}
</code></pre></div><ul><li>Get server details: <code>GET /api/v1/server/details?id=&amp;tag=</code><br> query: id (ServerID. Multiple IDs are separated by commas, provide this value to query the server corresponding to the ID, while ignoring the tag value)<br> query: tag (ServerTag, if this value is provided, only the servers in this group are queried)</li></ul><p>JSON Return Example:</p><div class="language-"><pre><code>{
&quot;code&quot;: 0,
&quot;message&quot;: &quot;success&quot;,
&quot;result&quot;: [
{
&quot;id&quot;: 1,
&quot;name&quot;: &quot;Server1&quot;,
&quot;tag&quot;: &quot;Tag1&quot;,
&quot;last_active&quot;: 1653015042,
&quot;ipv4&quot;: &quot;1.1.1.1&quot;,
&quot;ipv6&quot;: &quot;&quot;,
&quot;valid_ip&quot;: &quot;1.1.1.1&quot;,
&quot;host&quot;: {
&quot;Platform&quot;: &quot;darwin&quot;,
&quot;PlatformVersion&quot;: &quot;12.3.1&quot;,
&quot;CPU&quot;: [
&quot;Apple M1 Pro 1 Physical Core&quot;
],
&quot;MemTotal&quot;: 17179869184,
&quot;DiskTotal&quot;: 2473496842240,
&quot;SwapTotal&quot;: 0,
&quot;Arch&quot;: &quot;arm64&quot;,
&quot;Virtualization&quot;: &quot;&quot;,
&quot;BootTime&quot;: 1652683962,
&quot;CountryCode&quot;: &quot;hk&quot;,
&quot;Version&quot;: &quot;&quot;
},
&quot;status&quot;: {
&quot;CPU&quot;: 17.330210772540017,
&quot;MemUsed&quot;: 14013841408,
&quot;SwapUsed&quot;: 0,
&quot;DiskUsed&quot;: 2335048912896,
&quot;NetInTransfer&quot;: 2710273234,
&quot;NetOutTransfer&quot;: 695454765,
&quot;NetInSpeed&quot;: 10806,
&quot;NetOutSpeed&quot;: 5303,
&quot;Uptime&quot;: 331080,
&quot;Load1&quot;: 5.23486328125,
&quot;Load5&quot;: 4.873046875,
&quot;Load15&quot;: 3.99267578125,
&quot;TcpConnCount&quot;: 195,
&quot;UdpConnCount&quot;: 70,
&quot;ProcessCount&quot;: 437
}
},
{
&quot;id&quot;: 2,
&quot;name&quot;: &quot;Server2&quot;,
&quot;tag&quot;: &quot;Tag2&quot;,
&quot;last_active&quot;: -62135596800,
&quot;ipv4&quot;: &quot;&quot;,
&quot;ipv6&quot;: &quot;&quot;,
&quot;valid_ip&quot;: &quot;&quot;,
&quot;host&quot;: {
&quot;Platform&quot;: &quot;&quot;,
&quot;PlatformVersion&quot;: &quot;&quot;,
&quot;CPU&quot;: null,
&quot;MemTotal&quot;: 0,
&quot;DiskTotal&quot;: 0,
&quot;SwapTotal&quot;: 0,
&quot;Arch&quot;: &quot;&quot;,
&quot;Virtualization&quot;: &quot;&quot;,
&quot;BootTime&quot;: 0,
&quot;CountryCode&quot;: &quot;&quot;,
&quot;Version&quot;: &quot;&quot;
},
&quot;status&quot;: {
&quot;CPU&quot;: 0,
&quot;MemUsed&quot;: 0,
&quot;SwapUsed&quot;: 0,
&quot;DiskUsed&quot;: 0,
&quot;NetInTransfer&quot;: 0,
&quot;NetOutTransfer&quot;: 0,
&quot;NetInSpeed&quot;: 0,
&quot;NetOutSpeed&quot;: 0,
&quot;Uptime&quot;: 0,
&quot;Load1&quot;: 0,
&quot;Load5&quot;: 0,
&quot;Load15&quot;: 0,
&quot;TcpConnCount&quot;: 0,
&quot;UdpConnCount&quot;: 0,
&quot;ProcessCount&quot;: 0
}
}
]
}
</code></pre></div>`,16),a=[q];function i(r,s,d,l,c,p){return e(),o("div",null,a)}var m=t(n,[["render",i]]);export{v as __pageData,m as default};
@@ -0,0 +1 @@
import{_ as t,c as o,o as e,d as u}from"./app.2c402e15.js";const v='{"title":"Create Token","description":"","frontmatter":{},"headers":[{"level":2,"title":"Create Token","slug":"create-token"},{"level":2,"title":"Authentication method","slug":"authentication-method"},{"level":2,"title":"How to use","slug":"how-to-use"}],"relativePath":"en_US/guide/api.md"}',n={},q=u("",16),a=[q];function i(r,s,d,l,c,p){return e(),o("div",null,a)}var m=t(n,[["render",i]]);export{v as __pageData,m as default};
@@ -0,0 +1,44 @@
import{_ as a,c as n,o as s,d as t}from"./app.2c402e15.js";const k='{"title":"Site Title","description":"","frontmatter":{},"headers":[{"level":2,"title":"Site Title","slug":"site-title"},{"level":2,"title":"Admin List","slug":"admin-list"},{"level":2,"title":"Theme","slug":"theme"},{"level":2,"title":"Language","slug":"language"},{"level":2,"title":"Custom code (style, script)","slug":"custom-code-style-script"},{"level":2,"title":"Access Password","slug":"access-password"},{"level":2,"title":"CDN Bypassed Domain/IP","slug":"cdn-bypassed-domain-ip"},{"level":2,"title":"IP Change Alert","slug":"ip-change-alert"}],"relativePath":"en_US/guide/settings.md"}',e={},o=t(`<h2 id="site-title" tabindex="-1">Site Title <a class="header-anchor" href="#site-title" aria-hidden="true">#</a></h2><p>You can customize your site title here<br><br></p><h2 id="admin-list" tabindex="-1">Admin List <a class="header-anchor" href="#admin-list" aria-hidden="true">#</a></h2><ul><li><p>If you have changed your Github/Gitee username, you can change it in this item, otherwise you can&#39;t log in, please separate multiple users with commas: <code>user1,user2</code></p></li><li><p>To change your administrator account, please go to <code>/opt/nezha/dashboard/data/config.yaml</code> to set the new administrator <code>Client ID</code> and <code>Client Secret</code>.<br><br></p></li></ul><h2 id="theme" tabindex="-1">Theme <a class="header-anchor" href="#theme" aria-hidden="true">#</a></h2><p>Select the home page theme here, and update the panel if there is not an existing theme in the options<br><br></p><h2 id="language" tabindex="-1">Language <a class="header-anchor" href="#language" aria-hidden="true">#</a></h2><p>Nezha Monitoring currently supports the following languages:</p><ul><li>\u7B80\u4F53\u4E2D\u6587</li><li>English</li><li>Espa\xF1ol</li></ul><p><a href="https://crowdin.com/project/nezha" target="_blank" rel="noopener noreferrer"><img src="https://badges.crowdin.net/nezha/localized.svg" alt=""></a><br> We welcome corrections to translations and contributions of additional languages<br><br></p><h2 id="custom-code-style-script" tabindex="-1">Custom code (style, script) <a class="header-anchor" href="#custom-code-style-script" aria-hidden="true">#</a></h2><p>Change logo, change color tone, add statistics code, etc.</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>The custom code only takes effect in the visitor&#39;s home page, not in the admin panel.<br> Since the code of different themes is different, if you really need to modify the content of the admin panel, please enter Docker to changes it by yourself.</p></div><br><h4 id="example-of-changing-the-default-theme-progress-bar-color" tabindex="-1">Example of changing the default theme progress bar color <a class="header-anchor" href="#example-of-changing-the-default-theme-progress-bar-color" aria-hidden="true">#</a></h4><div class="language-html"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
<span class="token selector">.ui.fine.progress&gt; .bar</span> <span class="token punctuation">{</span>
<span class="token property">background-color</span><span class="token punctuation">:</span> pink <span class="token important">!important</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h4 id="example-of-modifying-daynight-theme-progress-bar-color-and-footer-by-hyt-allen-xu" tabindex="-1">Example of modifying DayNight theme progress bar color and footer (by <a href="https://github.com/hyt-allen-xu" target="_blank" rel="noopener noreferrer">@hyt-allen-xu</a>) <a class="header-anchor" href="#example-of-modifying-daynight-theme-progress-bar-color-and-footer-by-hyt-allen-xu" aria-hidden="true">#</a></h4><div class="language-html"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
<span class="token selector">.ui.fine.progress&gt; .progress-bar</span> <span class="token punctuation">{</span>
<span class="token property">background-color</span><span class="token punctuation">:</span> #00a7d0 <span class="token important">!important</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">&gt;</span></span><span class="token script"><span class="token language-javascript">
window<span class="token punctuation">.</span><span class="token function-variable function">onload</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
<span class="token keyword">var</span> footer<span class="token operator">=</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">&quot;div.footer-container&quot;</span><span class="token punctuation">)</span>
footer<span class="token punctuation">.</span>innerHTML<span class="token operator">=</span><span class="token string">&quot;\xA92022 &quot;</span>your name<span class="token string">&quot; &amp; Powered by &quot;</span>your name&quot;
footer<span class="token punctuation">.</span>style<span class="token punctuation">.</span>visibility<span class="token operator">=</span><span class="token string">&quot;visible&quot;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h4 id="example-of-modifying-the-logo-of-the-default-theme-modifying-the-footer-by-ilay1678" tabindex="-1">Example of modifying the logo of the default theme, modifying the footer (by <a href="https://github.com/iLay1678" target="_blank" rel="noopener noreferrer">@iLay1678</a>) <a class="header-anchor" href="#example-of-modifying-the-logo-of-the-default-theme-modifying-the-footer-by-ilay1678" aria-hidden="true">#</a></h4><div class="language-html"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
<span class="token selector">.right.menu&gt;a</span><span class="token punctuation">{</span>
<span class="token property">visibility</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token selector">.footer .is-size-7</span><span class="token punctuation">{</span>
<span class="token property">visibility</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token selector">.item img</span><span class="token punctuation">{</span>
<span class="token property">visibility</span><span class="token punctuation">:</span> hidden<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">&gt;</span></span><span class="token script"><span class="token language-javascript">
window<span class="token punctuation">.</span><span class="token function-variable function">onload</span> <span class="token operator">=</span> <span class="token keyword">function</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
<span class="token keyword">var</span> avatar<span class="token operator">=</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">&quot;.item img&quot;</span><span class="token punctuation">)</span>
<span class="token keyword">var</span> footer<span class="token operator">=</span>document<span class="token punctuation">.</span><span class="token function">querySelector</span><span class="token punctuation">(</span><span class="token string">&quot;div.is-size-7&quot;</span><span class="token punctuation">)</span>
footer<span class="token punctuation">.</span>innerHTML<span class="token operator">=</span><span class="token string">&quot;Powered by YOUR NAME&quot;</span>
footer<span class="token punctuation">.</span>style<span class="token punctuation">.</span>visibility<span class="token operator">=</span><span class="token string">&quot;visible&quot;</span>
avatar<span class="token punctuation">.</span>src<span class="token operator">=</span><span class="token string">&quot;Your square logo link&quot;</span>
avatar<span class="token punctuation">.</span>style<span class="token punctuation">.</span>visibility<span class="token operator">=</span><span class="token string">&quot;visible&quot;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h4 id="example-of-modifying-the-background-image-of-hotaru-theme" tabindex="-1">Example of modifying the background image of hotaru theme <a class="header-anchor" href="#example-of-modifying-the-background-image-of-hotaru-theme" aria-hidden="true">#</a></h4><div class="language-html"><pre><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>style</span><span class="token punctuation">&gt;</span></span><span class="token style"><span class="token language-css">
<span class="token selector">.hotaru-cover</span> <span class="token punctuation">{</span>
<span class="token property">background</span><span class="token punctuation">:</span> <span class="token url"><span class="token function">url</span><span class="token punctuation">(</span>https://s3.ax1x.com/2020/12/08/DzHv6A.jpg<span class="token punctuation">)</span></span> center<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>style</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h2 id="access-password" tabindex="-1">Access Password <a class="header-anchor" href="#access-password" aria-hidden="true">#</a></h2><p>If you don&#39;t want to show your homepage directly, you can set a access password here<br> After setting the password, you need to enter the password to access the homepage<br><br></p><h2 id="cdn-bypassed-domain-ip" tabindex="-1">CDN Bypassed Domain/IP <a class="header-anchor" href="#cdn-bypassed-domain-ip" aria-hidden="true">#</a></h2><p>This setting is a prerequisite for using the one-click script to install the Agent, see <a href="/en_US/guide/agent.html#preparation">here</a> for details <br></p><h2 id="ip-change-alert" tabindex="-1">IP Change Alert <a class="header-anchor" href="#ip-change-alert" aria-hidden="true">#</a></h2><p>If you want to be notified when a server&#39;s ip changes, you can set it up here</p><h4 id="coverage" tabindex="-1">Coverage <a class="header-anchor" href="#coverage" aria-hidden="true">#</a></h4><p>Select a rule here to determine which servers need to be monitored, and you can choose according to your needs</p><h4 id="specific-servers" tabindex="-1">Specific Servers <a class="header-anchor" href="#specific-servers" aria-hidden="true">#</a></h4><p>In conjunction with the coverage settings, set the exclusions for the selected rule here</p><h4 id="send-notification-to-specific-notification-group" tabindex="-1">Send Notification To Specific Notification Group <a class="header-anchor" href="#send-notification-to-specific-notification-group" aria-hidden="true">#</a></h4><p>Select the notification method, please set the notification method in the &quot;Notifications&quot; page<br><br></p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p><strong>When the settings are completed, the notification takes effect when <code>enabled</code> is activated</strong></p></div><br><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>IP Change Alert does not show ip by default, if you don&#39;t want to hide it, you can activate &quot;Do NOT desensitize Server IP In Notification Messages&quot;</p></div>`,37),p=[o];function c(i,l,r,u,d,h){return s(),n("div",null,p)}var f=a(e,[["render",c]]);export{k as __pageData,f as default};
@@ -0,0 +1 @@
import{_ as a,c as n,o as s,d as t}from"./app.2c402e15.js";const k='{"title":"Site Title","description":"","frontmatter":{},"headers":[{"level":2,"title":"Site Title","slug":"site-title"},{"level":2,"title":"Admin List","slug":"admin-list"},{"level":2,"title":"Theme","slug":"theme"},{"level":2,"title":"Language","slug":"language"},{"level":2,"title":"Custom code (style, script)","slug":"custom-code-style-script"},{"level":2,"title":"Access Password","slug":"access-password"},{"level":2,"title":"CDN Bypassed Domain/IP","slug":"cdn-bypassed-domain-ip"},{"level":2,"title":"IP Change Alert","slug":"ip-change-alert"}],"relativePath":"en_US/guide/settings.md"}',e={},o=t("",37),p=[o];function c(i,l,r,u,d,h){return s(),n("div",null,p)}var f=a(e,[["render",c]]);export{k as __pageData,f as default};
@@ -1 +0,0 @@
import{_ as e,c as t,o as s,a}from"./app.2c402e15.js";const m='{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/settings.md"}',n={},o=a("p",null,"settings",-1),r=[o];function c(_,i,d,p,l,f){return s(),t("div",null,r)}var g=e(n,[["render",c]]);export{m as __pageData,g as default};
@@ -1 +0,0 @@
import{_ as e,c as t,o as s,a}from"./app.2c402e15.js";const m='{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/settings.md"}',n={},o=a("p",null,"settings",-1),r=[o];function c(_,i,d,p,l,f){return s(),t("div",null,r)}var g=e(n,[["render",c]]);export{m as __pageData,g as default};
+1
View File
@@ -0,0 +1 @@
import{_ as e,c as t,o,d as a}from"./app.2c402e15.js";const g='{"title":"How to use","description":"","frontmatter":{},"headers":[{"level":2,"title":"How to use","slug":"how-to-use"},{"level":2,"title":"Manage tasks","slug":"manage-tasks"},{"level":2,"title":"FAQ","slug":"faq"}],"relativePath":"en_US/guide/tasks.md"}',i={},s=a('<p><strong>In the task area, you can set up scheduled tasks, periodic tasks, and multi-server batch execution tasks</strong></p><p>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.</p><h2 id="how-to-use" tabindex="-1">How to use <a class="header-anchor" href="#how-to-use" aria-hidden="true">#</a></h2><p>Go to the &quot;Tasks&quot; page of the admin panel and click &quot;Add Scheduled Task&quot;<br> To add a scheduled task you need to make the following settings:</p><ul><li><p><code>Name</code> - Customize a task name</p></li><li><p><code>Cron Expression</code> - Set schedule time, the Cron Expression is like:\uFF1A <code>* * * * * *</code> <code>sec min hour day month week</code>, see details in <a href="https://pkg.go.dev/github.com/robfig/cron/v3#hdr-CRON_Expression_Format" target="_blank" rel="noopener noreferrer">CRON Expression Format</a><br> For example: <code>0 0 3 * * *</code> is <code>Every day at 3 o&#39;clock</code></p></li><li><p><code>Command</code> - Just like writing shell/bat scripts, <strong>but line wrap is not recommended</strong>, <strong>Multiple Commands should be connected with <code>&amp;&amp;/&amp;</code></strong><br> For example, to execute a periodic reboot command, you can type <code>reboot</code> here</p></li><li><p><code>Coverage</code> and <code>Specific Servers</code> - Similar to the settings on the Services page, select rules to determine which Agents need to execute scheduled tasks</p></li><li><p><code>Notification Group</code> - Select the notification method you have set up on the &quot;Notification&quot; page. <a href="/en_US/guide/notifications.html#flexible-notification-methods">Click here</a> for more information</p></li><li><p><code>Send Success Notification</code> - When this item is activated, a message notification will be triggered when the task is successfully executed<br><br></p></li></ul><h2 id="manage-tasks" tabindex="-1">Manage tasks <a class="header-anchor" href="#manage-tasks" aria-hidden="true">#</a></h2><p>To manage existing scheduled tasks, you can go to the &quot;Tasks&quot; page in the administration panel<br> Select a task configuration and the three icons on the right, which are:</p><ul><li><code>Execute Now</code> - When clicked, the scheduled time will be ignored and the task will be executed immediately</li><li><code>Edit</code> - Click to modify the task configuration</li><li><code>Delete</code> - Delete this scheduled task<br><br></li></ul><h2 id="faq" tabindex="-1">FAQ <a class="header-anchor" href="#faq" aria-hidden="true">#</a></h2><ol><li>Command not found<br> Command not found may cause by missing PATH environment variable, for Linux Server, you may try adding <code>source ~/.bashrc</code> at beginning of your command or execute by absolute path.</li></ol>',10),n=[s];function c(r,d,l,h,u,p){return o(),t("div",null,n)}var f=e(i,[["render",c]]);export{g as __pageData,f as default};
@@ -0,0 +1 @@
import{_ as e,c as t,o,d as a}from"./app.2c402e15.js";const g='{"title":"How to use","description":"","frontmatter":{},"headers":[{"level":2,"title":"How to use","slug":"how-to-use"},{"level":2,"title":"Manage tasks","slug":"manage-tasks"},{"level":2,"title":"FAQ","slug":"faq"}],"relativePath":"en_US/guide/tasks.md"}',i={},s=a("",10),n=[s];function c(r,d,l,h,u,p){return o(),t("div",null,n)}var f=e(i,[["render",c]]);export{g as __pageData,f as default};
-1
View File
@@ -1 +0,0 @@
import{_ as e,c as t,o as s,a}from"./app.2c402e15.js";const m='{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/tasks.md"}',o={},r=a("p",null,"tasks",-1),n=[r];function c(_,d,i,p,l,f){return s(),t("div",null,n)}var h=e(o,[["render",c]]);export{m as __pageData,h as default};
@@ -1 +0,0 @@
import{_ as e,c as t,o as s,a}from"./app.2c402e15.js";const m='{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/tasks.md"}',o={},r=a("p",null,"tasks",-1),n=[r];function c(_,d,i,p,l,f){return s(),t("div",null,n)}var h=e(o,[["render",c]]);export{m as __pageData,h as default};
@@ -1,6 +1,6 @@
import{_ as t,c as o,o as u,d as q}from"./app.2c402e15.js";const T='{"title":"\u521B\u5EFAToken","description":"","frontmatter":{},"headers":[{"level":2,"title":"\u521B\u5EFAToken","slug":"\u521B\u5EFAtoken"},{"level":2,"title":"\u8BA4\u8BC1\u65B9\u5F0F","slug":"\u8BA4\u8BC1\u65B9\u5F0F"},{"level":2,"title":"\u4F7F\u7528\u8BF4\u660E","slug":"\u4F7F\u7528\u8BF4\u660E"}],"relativePath":"guide/api.md"}',n={},e=q(`<p><strong>\u54EA\u5412\u9762\u677F\u73B0\u5728\u5DF2\u7ECF\u652F\u6301\u4F7F\u7528API\u63A5\u53E3\u67E5\u8BE2\u9762\u677F\u4E2DAgent\u7684\u72B6\u6001\u4FE1\u606F</strong></p><h2 id="\u521B\u5EFAtoken" tabindex="-1">\u521B\u5EFAToken <a class="header-anchor" href="#\u521B\u5EFAtoken" aria-hidden="true">#</a></h2><p>\u54EA\u5412\u9762\u677F\u7684API\u63A5\u53E3\u5141\u8BB8\u4F7F\u7528Token\u8BA4\u8BC1\u4E0ECookies\u8BA4\u8BC1<br> \u8981\u65B0\u5EFA\u4E00\u4E2AToken\uFF0C\u5728\u8FDB\u5165\u7BA1\u7406\u9762\u677F\u540E\uFF0C\u70B9\u51FB\u53F3\u4E0A\u89D2\u7684\u5934\u50CF\uFF0C\u9009\u62E9 \u201CAPI Token\u201D\uFF0C\u8FDB\u5165Token\u7BA1\u7406\u9875\u9762<br> \u70B9\u51FB \u201C\u6DFB\u52A0Token\u201D\uFF0C\u81EA\u5B9A\u4E49\u5907\u6CE8\u540E\uFF0C\u70B9\u51FB \u201C\u6DFB\u52A0\u201D<br> \u5982\u9700\u5220\u9664\u4E00\u4E2AToken\uFF0C\u8BF7\u9009\u62E9\u76F8\u5E94\u7684Token\uFF0C\u70B9\u51FB\u53F3\u4FA7\u7684\u5220\u9664\u56FE\u6807</p><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Token\u662FAPI\u63A5\u53E3\u7684\u9274\u6743\u5DE5\u5177\uFF0C\u5B83\u5BF9\u4F60\u7684\u9762\u677F\u7684\u4FE1\u606F\u5B89\u5168\u975E\u5E38\u91CD\u8981\uFF0C\u8BF7\u4E0D\u8981\u6CC4\u6F0F\u4F60\u7684Token\u7ED9\u4ED6\u4EBA</p></div><h2 id="\u8BA4\u8BC1\u65B9\u5F0F" tabindex="-1">\u8BA4\u8BC1\u65B9\u5F0F <a class="header-anchor" href="#\u8BA4\u8BC1\u65B9\u5F0F" aria-hidden="true">#</a></h2><p>Token\u8BA4\u8BC1\u65B9\u5F0F\uFF1A</p><div class="language-"><pre><code>Request Headers:
Authorization: Token
</code></pre></div><h2 id="\u4F7F\u7528\u8BF4\u660E" tabindex="-1">\u4F7F\u7528\u8BF4\u660E <a class="header-anchor" href="#\u4F7F\u7528\u8BF4\u660E" aria-hidden="true">#</a></h2><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>\u4E0B\u9762\u793A\u4F8B\u4E2D\u7684\u8D1F\u6570\u65F6\u95F4\u6233\u4E3A\uFF080000-00-00\uFF09<br> \u76EE\u524D\u8868\u793A\u9762\u677F\u4E0A\u7EBF\u540E\u8BE5\u670D\u52A1\u5668\u4ECE\u672A\u6C47\u62A5\u8FC7<br> \u4F46\u4E0D\u5EFA\u8BAE\u7528\u6B63\u8D1F\u6027\u5224\u65AD\u72B6\u6001</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><strong>\u8BF7\u6C42\u65B9\u5F0F\u4E3A <code>Get</code>\uFF0C\u8FD4\u56DE\u683C\u5F0F\u4E3A <code>JSON</code></strong></p></div><ul><li>\u83B7\u53D6\u670D\u52A1\u5668\u5217\u8868\uFF1A<code>GET /api/v1/server/list?tag=</code><br> query: tag (ServerTag\u662F\u670D\u52A1\u5668\u7684\u5206\u7EC4\uFF0C\u63D0\u4F9B\u6B64\u53C2\u6570\u5219\u4EC5\u67E5\u8BE2\u8BE5\u5206\u7EC4\u4E0B\u7684\u670D\u52A1\u5668)</li></ul><p>JSON\u8FD4\u56DE\u793A\u4F8B\uFF1A</p><div class="language-"><pre><code>{
</code></pre></div><h2 id="\u4F7F\u7528\u8BF4\u660E" tabindex="-1">\u4F7F\u7528\u8BF4\u660E <a class="header-anchor" href="#\u4F7F\u7528\u8BF4\u660E" aria-hidden="true">#</a></h2><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>\u4E0B\u9762\u793A\u4F8B\u4E2D\u7684\u8D1F\u6570\u65F6\u95F4\u6233\u4E3A\uFF080000-00-00\uFF09<br> \u76EE\u524D\u8868\u793ADashboard\u4E0A\u7EBF\u540E\u8BE5Agent\u4ECE\u672A\u6C47\u62A5\u8FC7<br> \u4F46\u4E0D\u5EFA\u8BAE\u7528\u6B63\u8D1F\u6027\u5224\u65AD\u72B6\u6001</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p><strong>\u8BF7\u6C42\u65B9\u5F0F\u4E3A <code>Get</code>\uFF0C\u8FD4\u56DE\u683C\u5F0F\u4E3A <code>JSON</code></strong></p></div><ul><li>\u83B7\u53D6\u670D\u52A1\u5668\u5217\u8868\uFF1A<code>GET /api/v1/server/list?tag=</code><br> query: tag (ServerTag\u662F\u670D\u52A1\u5668\u7684\u5206\u7EC4\uFF0C\u63D0\u4F9B\u6B64\u53C2\u6570\u5219\u4EC5\u67E5\u8BE2\u8BE5\u5206\u7EC4\u4E2D\u7684\u670D\u52A1\u5668)</li></ul><p>JSON\u8FD4\u56DE\u793A\u4F8B\uFF1A</p><div class="language-"><pre><code>{
&quot;code&quot;: 0,
&quot;message&quot;: &quot;success&quot;,
&quot;result&quot;: [
@@ -24,7 +24,7 @@ Authorization: Token
}
]
}
</code></pre></div><ul><li>\u83B7\u53D6\u670D\u52A1\u5668\u8BE6\u60C5\uFF1A<code>GET /api/v1/server/details?id=&amp;tag=</code><br> query: id (ServerID \u591A\u4E2AID\u4EE5\u9017\u53F7\u5206\u9694\uFF0C\u63D0\u4F9B\u6B64\u53C2\u6570\u5219\u67E5\u8BE2\u8BE5\u5217\u8868\u5BF9\u5E94\u7684\u670D\u52A1\u5668\uFF0C\u540C\u65F6\u65E0\u89C6tag\u53C2\u6570)<br> query: tag (ServerTag \u63D0\u4F9B\u6B64\u53C2\u6570\u5219\u4EC5\u67E5\u8BE2\u8BE5\u5206\u7EC4\u4E0B\u7684\u670D\u52A1\u5668)</li></ul><p>JSON\u8FD4\u56DE\u793A\u4F8B\uFF1A</p><div class="language-"><pre><code>{
</code></pre></div><ul><li>\u83B7\u53D6\u670D\u52A1\u5668\u8BE6\u60C5\uFF1A<code>GET /api/v1/server/details?id=&amp;tag=</code><br> query: id (ServerID \u591A\u4E2AID\u4EE5\u9017\u53F7\u5206\u9694\uFF0C\u63D0\u4F9B\u6B64\u53C2\u6570\u5219\u67E5\u8BE2\u8BE5ID\u5BF9\u5E94\u7684\u670D\u52A1\u5668\uFF0C\u540C\u65F6\u65E0\u89C6tag\u53C2\u6570)<br> query: tag (ServerTag \u63D0\u4F9B\u6B64\u53C2\u6570\u5219\u4EC5\u67E5\u8BE2\u8BE5\u5206\u7EC4\u4E0B\u7684\u670D\u52A1\u5668)</li></ul><p>JSON\u8FD4\u56DE\u793A\u4F8B\uFF1A</p><div class="language-"><pre><code>{
&quot;code&quot;: 0,
&quot;message&quot;: &quot;success&quot;,
&quot;result&quot;: [