This commit is contained in:
cantoblanco committed 2024-05-14 15:47:17 +00:00
1 parent d900d88c87
commit 8df244390b
179 files changed
+377 -393

No files matched your search

+23 -23
View File
@@ -10,29 +10,29 @@
<link rel="preload" href="/assets/inter-roman-latin.2ed14f66.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/framework.44fd0451.js">
<link rel="modulepreload" href="/assets/chunks/theme.ccb07a11.js">
<link rel="modulepreload" href="/assets/en_US_guide_notifications.md.da167b63.lean.js">
<link rel="modulepreload" href="/assets/en_US_guide_notifications.md.26ba83c4.lean.js">
<script src="https://cdn.wwads.cn/js/makemoney.js" async="true"></script>
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-FDME8GJGTW"></script>
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date),gtag("config","G-FDME8GJGTW");</script>
<script id="check-dark-light">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-b2cf3e0b><!--[--><!--]--><!--[--><span tabindex="-1" data-v-b8b11faa></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-b8b11faa> Skip to content </a><!--]--><!----><header class="VPNav" data-v-b2cf3e0b data-v-7e5bc4a5><div class="VPNavBar has-sidebar" data-v-7e5bc4a5 data-v-7683ced7><div class="container" data-v-7683ced7><div class="title" data-v-7683ced7><div class="VPNavBarTitle has-sidebar" data-v-7683ced7 data-v-4d981103><a class="title" href="/en_US/" data-v-4d981103><!--[--><!--]--><!----><!--[-->Nezha Monitoring<!--]--><!--[--><!--]--></a></div></div><div class="content" data-v-7683ced7><div class="curtain" data-v-7683ced7></div><div class="content-body" data-v-7683ced7><!--[--><!--]--><div class="VPNavBarSearch search" style="--vp-meta-key:&#39;Meta&#39;;" data-v-7683ced7><!--[--><div id="docsearch"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg class="DocSearch-Search-Icon" width="20" height="20" viewBox="0 0 20 20" aria-label="search icon"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-7683ced7 data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/en_US/" tabindex="0" data-v-7f418b0f data-v-5e623618 data-v-8f4dc553><!--[-->User Guide<!--]--><!----></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en_US/case/index.html" tabindex="0" data-v-7f418b0f data-v-5e623618 data-v-8f4dc553><!--[-->Community Projects<!--]--><!----></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en_US/developer/index.html" tabindex="0" data-v-7f418b0f data-v-5e623618 data-v-8f4dc553><!--[-->Development Manual<!--]--><!----></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-7683ced7 data-v-74abcbb9 data-v-764effdf><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-764effdf><span class="text" data-v-764effdf><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="option-icon" data-v-764effdf><path d="M0 0h24v24H0z" fill="none"></path><path d=" M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z " class="css-c4d79v"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="text-icon" data-v-764effdf><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="menu" data-v-764effdf><div class="VPMenu" data-v-764effdf data-v-e7ea1737><!----><!--[--><!--[--><div class="items" data-v-74abcbb9><p class="title" data-v-74abcbb9>English</p><!--[--><div class="VPMenuLink" data-v-74abcbb9 data-v-2f2cfafc><a class="VPLink link" href="/guide/notifications.html" data-v-2f2cfafc data-v-8f4dc553><!--[-->简体中文<!--]--><!----></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-7683ced7 data-v-f6a63727><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="toggle dark mode" aria-checked="false" data-v-f6a63727 data-v-82b282f1 data-v-f3c41672><span class="check" data-v-f3c41672><span class="icon" data-v-f3c41672><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-82b282f1><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.Line truncated
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">message</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">subject</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">Server Status Notification</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">body</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">contentType</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">Text</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">content</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#NEZHA#</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">toRecipients</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">emailAddress</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">address</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">ADDRESS FOR RECEVING EMAILS</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">}</span></span></code></pre></div><p>Notes for this method: This method requires calling Microsoft Graph V1.0, you need to go to Microsoft Graph and create your own application, give <code>Mail.Send</code> permission and get the Token, or you can go <a href="https://developer.microsoft.com/en-us/graph/graph-explorer" target="_blank" rel="noreferrer">Microsoft Graph Explorer</a> directly to give permission and get the Token, just replace the Token in the Header with the actual Token.</p></li><li><p><strong>DingTalk Group bot notification Example</strong></p><ul><li><p>Name: DingTalk Group</p></li><li><p>URL: <a href="https://oapi.dingtalk.com/robot/send?access_token=xxxxxxx" target="_blank" rel="noreferrer">https://oapi.dingtalk.com/robot/send?access_token=xxxxxxx</a></p></li><li><p>Request method: POST</p></li><li><p>Request Type: JSON</p></li><li><p>Header: <code>{&quot;Content-Type&quot;: &quot;application/json&quot;}</code></p></li><li><p>Body: <code>{&quot;msgtype&quot;: &quot;text&quot;,&quot;text&quot;: {&quot;content&quot;:&quot;nezha:\n#NEZHA#&quot;}}</code></p></li><li><p>Notes for this method:URL:Creating bot in DingTalk groups to obtain bot URLs, Security settings validation set to custom keywords,The security settings validation is set to a custom keyword, and the keyword must be included in the content field of the body, such as nezha</p></li><li><p><strong>Wechat Work Group bot Example, contributed by <a href="https://github.com/ChowRex" target="_blank" rel="noreferrer">@ChowRex</a></strong></p><p>Support placeholders:</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<div id="app"><div class="Layout" data-v-b2cf3e0b><!--[--><!--]--><!--[--><span tabindex="-1" data-v-b8b11faa></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-b8b11faa> Skip to content </a><!--]--><!----><header class="VPNav" data-v-b2cf3e0b data-v-7e5bc4a5><div class="VPNavBar has-sidebar" data-v-7e5bc4a5 data-v-7683ced7><div class="container" data-v-7683ced7><div class="title" data-v-7683ced7><div class="VPNavBarTitle has-sidebar" data-v-7683ced7 data-v-4d981103><a class="title" href="/en_US/" data-v-4d981103><!--[--><!--]--><!----><!--[-->Nezha Monitoring<!--]--><!--[--><!--]--></a></div></div><div class="content" data-v-7683ced7><div class="curtain" data-v-7683ced7></div><div class="content-body" data-v-7683ced7><!--[--><!--]--><div class="VPNavBarSearch search" style="--vp-meta-key:&#39;Meta&#39;;" data-v-7683ced7><!--[--><div id="docsearch"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg class="DocSearch-Search-Icon" width="20" height="20" viewBox="0 0 20 20" aria-label="search icon"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-7683ced7 data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/en_US/" tabindex="0" data-v-7f418b0f data-v-5e623618 data-v-8f4dc553><!--[-->User Guide<!--]--><!----></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en_US/case/index.html" tabindex="0" data-v-7f418b0f data-v-5e623618 data-v-8f4dc553><!--[-->Community Projects<!--]--><!----></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/en_US/developer/index.html" tabindex="0" data-v-7f418b0f data-v-5e623618 data-v-8f4dc553><!--[-->Development Manual<!--]--><!----></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-7683ced7 data-v-74abcbb9 data-v-764effdf><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-764effdf><span class="text" data-v-764effdf><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="option-icon" data-v-764effdf><path d="M0 0h24v24H0z" fill="none"></path><path d=" M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z " class="css-c4d79v"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="text-icon" data-v-764effdf><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></span></button><div class="menu" data-v-764effdf><div class="VPMenu" data-v-764effdf data-v-e7ea1737><!----><!--[--><!--[--><div class="items" data-v-74abcbb9><p class="title" data-v-74abcbb9>English</p><!--[--><div class="VPMenuLink" data-v-74abcbb9 data-v-2f2cfafc><a class="VPLink link" href="/guide/notifications.html" data-v-2f2cfafc data-v-8f4dc553><!--[-->简体中文<!--]--><!----></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-7683ced7 data-v-f6a63727><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="toggle dark mode" aria-checked="false" data-v-f6a63727 data-v-82b282f1 data-v-f3c41672><span class="check" data-v-f3c41672><span class="icon" data-v-f3c41672><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-82b282f1><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.Line truncated
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">message</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">subject</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">Server Status Notification</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">body</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">contentType</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">Text</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">content</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#NEZHA#</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">},</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">toRecipients</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">[</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F78C6C;">emailAddress</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#F07178;">address</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">ADDRESS FOR RECEVING EMAILS</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">]</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span></code></pre></div></li></ul></details><h3 id="dingtalk-group-bot-configuration-example" tabindex="-1">DingTalk Group Bot Configuration Example <a class="header-anchor" href="#dingtalk-group-bot-configuration-example" aria-label="Permalink to &quot;DingTalk Group Bot Configuration Example&quot;">​</a></h3><details><summary>Click to expand/collapse</summary><h4 id="url-parameter-acquisition-instructions-3" tabindex="-1">URL Parameter Acquisition Instructions <a class="header-anchor" href="#url-parameter-acquisition-instructions-3" aria-label="Permalink to &quot;URL Parameter Acquisition Instructions&quot;">​</a></h4><p>Create a bot in DingTalk in advance and get the bot&#39;s token.</p><p>The bot URL is obtained after creating a bot in the DingTalk group - Manage Bot - Create Bot. Choose custom keywords for the security method, and the Body content value must contain these keywords.</p><ul><li>Name: Nezha Assistant</li><li>URL: <a href="https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxx" target="_blank" rel="noreferrer">https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxx</a></li><li>Request Method: POST</li><li>Request Type: JSON</li><li>Header: <code>{&quot;Content-Type&quot;: &quot;application/json&quot;}</code></li><li>Body: <code>{&quot;msgtype&quot;: &quot;text&quot;,&quot;text&quot;: {&quot;content&quot;:&quot;Nezha Probe:\n#NEZHA#&quot;}}</code></li></ul></details><h3 id="wechat-work-group-bot-example-contributor-chowrex" tabindex="-1">WeChat Work Group Bot Example Contributor: <a href="https://github.com/ChowRex" target="_blank" rel="noreferrer">@ChowRex</a> <a class="header-anchor" href="#wechat-work-group-bot-example-contributor-chowrex" aria-label="Permalink to &quot;WeChat Work Group Bot Example Contributor: [@ChowRex](https://github.com/ChowRex)&quot;">​</a></h3><details><summary>Click to expand/collapse</summary><p>Supported placeholders list</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">content</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#NEZHA#</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">ServerName</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#SERVER.NAME#</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">ServerIP</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#SERVER.IP#</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
@@ -49,15 +49,15 @@
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">Load1</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#SERVER.LOAD1#</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">Load5</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#SERVER.LOAD5#</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">Load15</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#SERVER.LOAD15#</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">TCP_CONN_COUNT</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#SERVER.TCPCONNCOUNT</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> # Invalid</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">UDP_CONN_COUNT</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#SERVER.UDPCONNCOUNT</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> # Invalid</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span></code></pre></div><blockquote><p>Sorry, this document is <strong>NOT</strong> available in English.</p><p><a href="https://developer.work.weixin.qq.com/document/path/91770#markdown%E7%B1%BB%E5%9E%8B" target="_blank" rel="noreferrer">群机器人配置说明 - 文档 - 企业微信开发者中心</a></p></blockquote><ul><li><p>Name:WechatWork Group bot notification</p></li><li><p>URL:<a href="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY" target="_blank" rel="noreferrer">https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY</a></p></li><li><p>Request method: POST</p></li><li><p>Request type: JSON</p></li><li><p>Body:</p><div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">TCP_CONN_COUNT</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#SERVER.TCPCONNCOUNT</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> # invalid</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">UDP_CONN_COUNT</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">#SERVER.UDPCONNCOUNT</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span><span style="color:#A6ACCD;"> # invalid</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span></code></pre></div><blockquote><p>This document is <strong>NOT</strong> available in English.</p><p><a href="https://developer.work.weixin.qq.com/document/path/91770#markdown%E7%B1%BB%E5%9E%8B" target="_blank" rel="noreferrer">Group Bot Configuration Instructions - Document - WeChat Work Developer Center</a></p></blockquote><ul><li>Name: WeChat Work Group Bot</li><li>URL: <a href="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY" target="_blank" rel="noreferrer">https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY</a></li><li>Request Method: POST</li><li>Request Type: JSON</li><li>Body:<div class="language-json"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">msgtype</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;">markdown</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">,</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C792EA;">markdown</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">content</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;"># Nezha Notification</span><span style="color:#A6ACCD;">\n\n\&quot;</span><span style="color:#C3E88D;">#NEZHA#</span><span style="color:#A6ACCD;">\&quot;\n\n</span><span style="color:#C3E88D;">&gt; ServerName: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.NAME#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; IP: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.IP#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; IPv4: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.IPV4#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; IPv6: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.IPV6#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; CPU: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.CPU#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Memory: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.MEM#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; SWAP: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.SWAP#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Storage: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.DISK#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Real-time Upload: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.NETINSPEED#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Real-time Download: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.NETOUTSPEED#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Total Upload: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.TRANSFERIN#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Total Download: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.TRANSFEROUT#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; 1m Load: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.LOAD1#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; 5m Load: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.LOAD5#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; 15m Load: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.LOAD15#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; TCP Connections: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.TCPCONNCOUNT</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; UDP Connections: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.UDPCONNCOUNT</span><span style="color:#A6ACCD;">\&quot;\n\n</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#FFCB6B;">content</span><span style="color:#89DDFF;">&quot;</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">&quot;</span><span style="color:#C3E88D;"># Nezha Notification</span><span style="color:#A6ACCD;">\n\n\&quot;</span><span style="color:#C3E88D;">#NEZHA#</span><span style="color:#A6ACCD;">\&quot;\n\n</span><span style="color:#C3E88D;">&gt; Name: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.NAME#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; IP: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.IP#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; IPv4: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.IPV4#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">IPv6: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.IPV6#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; CPU: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.CPU#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Memory: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.MEM#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Swap: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.SWAP#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Disk: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.DISK#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Upload Speed: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.NETINSPEED#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Download Speed: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.NETOUTSPEED#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Total Upload: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.TRANSFERIN#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Total Download: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.TRANSFEROUT#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Load1: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.LOAD1#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Load5: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.LOAD5#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; Load15: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.LOAD15#</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; TCP Connection Count: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.TCPCONNCOUNT</span><span style="color:#A6ACCD;">\&quot;\n</span><span style="color:#C3E88D;">&gt; UDP Connection Count: </span><span style="color:#A6ACCD;">\&quot;</span><span style="color:#C3E88D;">#SERVER.UDPCONNCOUNT</span><span style="color:#A6ACCD;">\&quot;\n\n</span><span style="color:#89DDFF;">&quot;</span></span>
<span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">}</span></span>
<span class="line"><span style="color:#89DDFF;">}</span></span></code></pre></div><p>Delete relevant content information as needed</p><p><img src="https://user-images.githubusercontent.com/30169860/223605886-b7736825-24b8-4b6c-8bc9-96ac388599ef.png" alt="Notice Picture"></p></li></ul></li></ul></li></ul><br><br><h2 id="description-of-notification-rules" tabindex="-1">Description of notification rules <a class="header-anchor" href="#description-of-notification-rules" aria-label="Permalink to &quot;Description of notification rules&quot;">​</a></h2><h3 id="basic-rules" tabindex="-1">Basic Rules <a class="header-anchor" href="#basic-rules" aria-label="Permalink to &quot;Basic Rules&quot;">​</a></h3><ul><li>Type: one or more types can be selected, such as in a rule to select more than one type, you need to <strong>meet all the selected types at the same time</strong> to trigger the notification (see the example later) <ul><li><code>cpu</code>、<code>memory</code>、<code>swap</code>、<code>disk</code></li><li><code>net_in_speed</code> Inbound speed, <code>net_out_speed</code> Outbound speed, <code>net_all_speed</code> Inbound + Outbound speed, <code>transfer_in</code> Inbound Transfer, <code>transfer_out</code> Outbound Transfer, <code>transfer_all</code> Total Transfer</li><li><code>offline</code> Offline monitoring</li><li><code>load1</code>、<code>load5</code>、<code>load15</code> Load</li><li><code>process_count</code> Number of processes <em>Currently, counting the number of processes takes up too many resources and is not supported at the moment</em></li><li><code>tcp_conn_count</code>、<code>udp_conn_count</code> Number of connections</li></ul></li><li>duration:Lasting for a few seconds, the notification will only be triggered when the sampling record reaches 30% or more within a few seconds</li><li>min/max <ul><li>Transfer, network speed, and other values of the same type. Unit is byte (1KB=1024B,1MB = 1024*1024B)</li><li>Memory, hard disk, CPU. units are usage percentages</li><li>No setup required for offline monitoring</li></ul></li><li>cover <code>[{&quot;type&quot;:&quot;offline&quot;,&quot;duration&quot;:10, &quot;cover&quot;:0, &quot;ignore&quot;:{&quot;5&quot;: true}}]</code><ul><li><code>0</code> Cover all, use <code>ignore</code> to ignore specific servers</li><li><code>1</code> Ignore all, use <code>ignore</code> to monitoring specific servers<br> For example: <code>[{&quot;type&quot;:&quot;offline&quot;,&quot;duration&quot;:10, &quot;cover&quot;:0, &quot;ignore&quot;:{&quot;5&quot;: true}}]</code></li></ul></li><li>ignore: Select to ignore specific servers, use with <code>cover</code> with server id and boolean, e.g.: <code>{&quot;1&quot;: true, &quot;2&quot;:false}</code></li></ul><p><strong>Complete examples:</strong></p><blockquote><blockquote><p>Add an offline notification</p></blockquote><ul><li>Name: Offline notification</li><li>Rules: <code>[{&quot;Type&quot;:&quot;offline&quot;,&quot;Duration&quot;:10}]</code></li><li>Enable: √</li></ul></blockquote><blockquote><blockquote><p>Add an notification when the CPU exceeds 50% for 10s <strong>but</strong> the memory usage is below 20% for 20s</p></blockquote><ul><li>Name: CPU and RAM</li><li>Rules: <code>[{&quot;Type&quot;:&quot;cpu&quot;,&quot;Min&quot;:0,&quot;Max&quot;:50,&quot;Duration&quot;:10},{&quot;Type&quot;:&quot;memory&quot;,&quot;Min&quot;:20,&quot;Max&quot;:0,&quot;Duration&quot;:20}]</code></li><li>Enable: √</li></ul></blockquote><blockquote><blockquote><p>Send specific server notifications to specific notification groups</p></blockquote><p>Case:<br> You have four servers, 1, 2, 3, 4, and two different notification groups, A and B<br> 1, 2 The two servers are down for 10 minutes and send a notification to Notification Group A<br> 3, 4 These two servers are down for ten minutes and then send a notification to Notification Group B</p><p>First you need to set up two notification groups, A and B, and then add two alarm rules:</p><p><strong>Rule I:</strong></p><ul><li>Name: 1, 2 Off-line, send notification to group A</li><li>Rules:<code>[{&quot;type&quot;:&quot;offline&quot;,&quot;duration&quot;:600,&quot;cover&quot;:1,&quot;ignore&quot;:{&quot;1&quot;:true,&quot;2&quot;:true}}]</code></li><li>Notification group: A</li><li>Enable: √</li></ul><p><strong>Rule II:</strong></p><ul><li>Name: 3, 4 Off-line, send notification to group B</li><li>Rules:<code>[{&quot;type&quot;:&quot;offline&quot;,&quot;duration&quot;:600,&quot;cover&quot;:1,&quot;ignore&quot;:{&quot;3&quot;:true,&quot;4&quot;:true}}]</code></li><li>Notification group: B</li><li>Enable: √</li></ul></blockquote><p><strong>Using these rules flexibly will help you to make full use of the notification function</strong></p><br><h3 id="special-any-cycle-transfer-notification" tabindex="-1">Special: Any-cycle transfer notification <a class="header-anchor" href="#special-any-cycle-transfer-notification" aria-label="Permalink to &quot;Special: Any-cycle transfer Line truncated
<script>__VP_HASH_MAP__ = JSON.parse("{\"case_index.md\":\"73e6bfcc\",\"case_case1.md\":\"b0ffeb45\",\"case_case3.md\":\"48bb8f95\",\"case_case2.md\":\"ed3674ae\",\"developer_l10n.md\":\"44af3a03\",\"developer_index.md\":\"40e8edab\",\"case_case5.md\":\"c6a30f74\",\"case_case4.md\":\"622962b5\",\"en_us_case_case3.md\":\"d6e1e0c9\",\"en_us_case_case2.md\":\"3050bd1d\",\"en_us_guide_dashboardq.md\":\"1d2992f0\",\"en_us_guide_agentq.md\":\"8b51bd53\",\"en_us_guide_dashboard.md\":\"f5ba44c9\",\"en_us_developer_theme.md\":\"c6c2705e\",\"en_us_case_case1.md\":\"68d4b8c0\",\"en_us_guide_api.md\":\"ff18d057\",\"en_us_case_index.md\":\"426c1c9c\",\"developer_theme.md\":\"de32339f\",\"en_us_guide_q4.md\":\"34457c09\",\"en_us_guide_notifications.md\":\"da167b63\",\"guide_agent.md\":\"c5504e5b\",\"guide_q3.md\":\"ccf3ac7d\",\"guide_agentq.md\":\"a7cf9dc4\",\"guide_q6.md\":\"ddbb7fcc\",\"guide_q4.md\":\"20d0f5c4\",\"guide_q5.md\":\"4a1bad66\",\"en_us_developer_index.md\":\"9ebb076b\",\"guide_dashboardq.md\":\"5f436dce\",\"en_us_developer_l10n.md\":\"13b00a40\",\"en_us_guide_q7.md\":\"32e7f672\",\"guide_q1.md\":\"9b7b06a4\",\"en_us_case_case5.md\":\"0c5c8026\",\"guide_q8.md\":\"d9f62b2a\",\"en_us_case_case4.md\":\"5c1a6961\",\"en_us_guide_q6.md\":\"b458d2f7\",\"en_us_index.md\":\"1aa6edfc\",\"en_us_guide_loginq.md\":\"da359af2\",\"guide_loginq.md\":\"6ab914ff\",\"en_us_guide_q8.md\":\"156ed04a\",\"guide_dashboard.md\":\"224f2444\",\"en_us_guide_q2.md\":\"890a5b8b\",\"guide_tasks.md\":\"9d198fac\",\"index.md\":\"c76cb732\",\"guide_q7.md\":\"cba664b5\",\"en_us_guide_tasks.md\":\"7f2837a8\",\"en_us_guide_services.md\":\"522160e5\",\"en_us_guide_q5.md\":\"b118b88f\",\"guide_notifications.md\":\"1e97e129\",\"en_us_guide_servers.md\":\"89212d49\",\"guide_api.md\":\"4a4d6c33\",\"guide_services.md\":\"1ae95d3e\",\"en_us_guide_agent.md\":\"df49cb2f\",\"guide_q2.md\":\"f3513918\",\"en_us_guide_q3.md\":\"5dfcdcea\",\"guide_servers.md\":\"9dbc33a5\",\"en_us_guide_settings.md\":\"786426d1\",\"guide_settings.md\":\"2309481e\"}")
<span class="line"><span style="color:#89DDFF;">}</span></span></code></pre></div></li></ul><p>You can remove or add relevant information as needed.</p></details><h2 id="notification-rule-explanation" tabindex="-1">Notification Rule Explanation <a class="header-anchor" href="#notification-rule-explanation" aria-label="Permalink to &quot;Notification Rule Explanation&quot;">​</a></h2><h3 id="basic-rules" tabindex="-1">Basic Rules <a class="header-anchor" href="#basic-rules" aria-label="Permalink to &quot;Basic Rules&quot;">​</a></h3><ul><li><code>type</code>: You can choose one or more types. If multiple types are selected in one rule, <strong>all selected types must be satisfied</strong> to trigger a notification (refer to the examples below) <ul><li><code>cpu</code>, <code>memory</code>, <code>swap</code>, <code>disk</code></li><li><code>net_in_speed</code> inbound network speed, <code>net_out_speed</code> outbound network speed, <code>net_all_speed</code> total network speed, <code>transfer_in</code> inbound traffic, <code>transfer_out</code> outbound traffic, <code>transfer_all</code> total traffic</li><li><code>offline</code> offline monitoring</li><li><code>load1</code>, <code>load5</code>, <code>load15</code> load</li><li><code>process_count</code> process count (currently resource-intensive due to thread count, not supported temporarily)</li><li><code>tcp_conn_count</code>, <code>udp_conn_count</code> connection count</li></ul></li><li><code>duration</code>: Duration in seconds. An notification is triggered if 30% or more of the samples exceed the threshold within this duration (to prevent data spikes).</li><li><code>min</code> or <code>max</code>: <ul><li>For traffic and network speed, the unit is bytes (1KB = 1024B, 1MB = 1024 * 1024B)</li><li>For memory, disk, and CPU, the unit is percentage</li><li>No need to set this for offline monitoring</li></ul></li><li><code>cover</code>: <ul><li><code>0</code> monitors all servers, use <code>ignore</code> to exclude specific servers</li><li><code>1</code> ignores all servers, use <code>ignore</code> to monitor specific servers<br> Example: <code>[{&quot;type&quot;:&quot;offline&quot;,&quot;duration&quot;:10, &quot;cover&quot;:0, &quot;ignore&quot;:{&quot;5&quot;: true}}]</code></li></ul></li><li><code>ignore</code>: Select specific servers to exclude, used with <code>cover</code>, content is server ID and boolean value, e.g., <code>{&quot;1&quot;: true, &quot;2&quot;: false}</code></li></ul><p><strong>Complete Examples:</strong></p><p>Add an offline notification:</p><ul><li>Name: Offline Notification</li><li>Rule: <code>[{&quot;Type&quot;:&quot;offline&quot;,&quot;Duration&quot;:10}]</code></li><li>Enabled: √</li></ul><p>Add an notification for CPU usage exceeding 50% for 10 seconds <strong>and</strong> memory usage below 20% for 20 seconds:</p><ul><li>Name: CPU+Memory</li><li>Rule: <code>[{&quot;Type&quot;:&quot;cpu&quot;,&quot;Min&quot;:0,&quot;Max&quot;:50,&quot;Duration&quot;:10},{&quot;Type&quot;:&quot;memory&quot;,&quot;Min&quot;:20,&quot;Max&quot;:0,&quot;Duration&quot;:20}]</code></li><li>Enabled: √</li></ul><p>Send notifications for specific servers to specific notification groups:</p><p>Scenario example:<br> There are 4 servers (1, 2, 3, 4) and two notification groups (A, B).<br> Notify group A if servers 1 and 2 are offline for 10 minutes.<br> Notify group B if servers 3 and 4 are offline for 10 minutes.</p><p>First, set up notification groups A and B, then add two notification rules:</p><p><strong>Rule 1:</strong></p><ul><li>Name: 1, 2 Offline, Send to Notification Group A</li><li>Rule: <code>[{&quot;type&quot;:&quot;offline&quot;,&quot;duration&quot;:600,&quot;cover&quot;:1,&quot;ignore&quot;:{&quot;1&quot;:true,&quot;2&quot;:true}}]</code></li><li>Notification Group: A</li><li>Enabled: √</li></ul><p><strong>Rule 2:</strong></p><ul><li>Name: 3, 4 Offline, Send to Notification Group B</li><li>Rule: <code>[{&quot;type&quot;:&quot;offline&quot;,&quot;duration&quot;:600,&quot;cover&quot;:1,&quot;ignore&quot;:{&quot;3&quot;:true,&quot;4&quot;:true}}]</code></li><li>Notification Group: B</li><li>Enabled: √</li></ul><p><strong>Flexibly using parameters can make your notification function fully utilized</strong></p><h3 id="special-any-cycle-traffic-notification" tabindex="-1">Special: Any Cycle Traffic notification <a class="header-anchor" href="#special-any-cycle-traffic-notification" aria-label="Permalink to &quot;Special: Any Cycle Traffic notification&quot;">​</a></h3><p>Can be used for monthly traffic monitoring</p><ul><li><code>type</code>: <ul><li><code>transfer_in_cycle</code> inbound traffic during the cycle</li><li><code>transfer_out_cycle</code> outbound traffic during the cycle</li><li><code>transfer_all_cycle</code> total traffic during the cycle</li></ul></li><li><code>cycle_start</code>: The start date of the statistical cycle (can be the start date of your server billing cycle). The time format is RFC3339, e.g., Beijing Line truncated
<script>__VP_HASH_MAP__ = JSON.parse("{\"developer_index.md\":\"111a68f3\",\"en_us_guide_loginq.md\":\"cbcb363e\",\"en_us_case_case4.md\":\"9e4f3127\",\"en_us_guide_q8.md\":\"babff2f0\",\"case_case2.md\":\"1b519ed4\",\"developer_theme.md\":\"650aa830\",\"developer_l10n.md\":\"82b6ef01\",\"en_us_guide_q6.md\":\"88b5afe3\",\"en_us_guide_agent.md\":\"cc9897a3\",\"guide_q8.md\":\"3f79bbbf\",\"en_us_guide_q3.md\":\"2c8f5905\",\"guide_q6.md\":\"2387732f\",\"guide_q4.md\":\"385e3441\",\"en_us_guide_q2.md\":\"f03cfb16\",\"guide_q7.md\":\"5f75b305\",\"guide_q5.md\":\"f2042fe7\",\"guide_tasks.md\":\"8f7f039f\",\"en_us_case_case2.md\":\"04a1553e\",\"en_us_developer_theme.md\":\"02a748b8\",\"en_us_case_index.md\":\"e0cbd391\",\"en_us_guide_agentq.md\":\"d6149542\",\"en_us_developer_l10n.md\":\"9c7c5854\",\"guide_q2.md\":\"266cd01b\",\"case_case1.md\":\"5ca7d527\",\"case_case3.md\":\"7b739806\",\"en_us_guide_q5.md\":\"a97be7a8\",\"en_us_guide_q7.md\":\"43c5a1a6\",\"en_us_guide_q4.md\":\"b3bf1aae\",\"en_us_case_case1.md\":\"feb3e39a\",\"en_us_guide_tasks.md\":\"bb6ba1f3\",\"en_us_guide_notifications.md\":\"26ba83c4\",\"en_us_guide_dashboardq.md\":\"0c4d5040\",\"en_us_case_case5.md\":\"3d7ef894\",\"guide_agentq.md\":\"658b47c5\",\"en_us_developer_index.md\":\"11878279\",\"guide_loginq.md\":\"74c0b434\",\"case_case5.md\":\"e585c67c\",\"case_index.md\":\"87221e96\",\"guide_dashboardq.md\":\"23ea658c\",\"en_us_index.md\":\"b913a84e\",\"guide_agent.md\":\"543f423f\",\"guide_api.md\":\"ad4b295f\",\"en_us_case_case3.md\":\"1ac3d51f\",\"case_case4.md\":\"b184f4de\",\"en_us_guide_servers.md\":\"f9e06964\",\"guide_q3.md\":\"a7ac5ff7\",\"guide_services.md\":\"460da91d\",\"en_us_guide_dashboard.md\":\"b5a70b91\",\"guide_settings.md\":\"330c6934\",\"guide_notifications.md\":\"a70fdddd\",\"guide_q1.md\":\"d83a745a\",\"index.md\":\"c944995f\",\"en_us_guide_services.md\":\"2500cf90\",\"guide_servers.md\":\"e4f7abb2\",\"en_us_guide_settings.md\":\"8c07b41e\",\"guide_dashboard.md\":\"f6e4d1f8\",\"en_us_guide_api.md\":\"381d03f9\"}")
__VP_SITE_DATA__ = JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"VitePress\",\"description\":\"A VitePress site\",\"base\":\"/\",\"head\":[],\"appearance\":true,\"themeConfig\":{\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/nezhahq/nezhahq.github.io\"}],\"algolia\":{\"appId\":\"HP6QF6KMZD\",\"apiKey\":\"fb8bae9ed373d1057e0c07fcf32b3f1a\",\"indexName\":\"nezhahq\"},\"footer\":{\"message\":\"This work is licensed under a <a rel=\\\"license\\\" href=\\\"http://creativecommons.org/licenses/by-nc-sa/4.0/\\\">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License\",\"copyright\":\"Copyright © 2022-present NezhaHQ\"}},\"locales\":{\"root\":{\"lang\":\"zh-CN\",\"label\":\"简体中文\",\"title\":\"哪吒监控\",\"description\":\"哪吒监控是一个轻量化的运维工具\",\"link\":\"/\",\"themeConfig\":{\"lastUpdatedText\":\"上次更新\",\"editLink\":{\"pattern\":\"https://github.com/nezhahq/nezhahq.github.io/edit/main/docs/:path\",\"text\":\"在GitHub中编辑\"},\"nav\":[{\"text\":\"使用指南\",\"link\":\"/\",\"activeMatch\":\"^/$|^/guide/\"},{\"text\":\"社区项目\",\"link\":\"/case/index.html\",\"activeMatch\":\"^/case/\"},{\"text\":\"开发手册\",\"link\":\"/developer/index.html\",\"activeMatch\":\"^/developer/\"}],\"sidebar\":{\"/\":[{\"text\":\"安装手册\",\"items\":[{\"text\":\"安装 Dashboard\",\"link\":\"/guide/dashboard.html\"},{\"text\":\"安装 Agent\",\"link\":\"/guide/agent.html\"}]},{\"text\":\"管理面板配置\",\"items\":[{\"text\":\"服务器\",\"link\":\"/guide/servers.html\"},{\"text\":\"服务\",\"link\":\"/guide/services.html\"},{\"text\":\"任务\",\"link\":\"/guide/tasks.html\"},{\"text\":\"告警\",\"link\":\"/guide/notifications.html\"},{\"text\":\"设置\",\"link\":\"/guide/settings.html\"},{\"text\":\"API\",\"link\":\"/guide/api.html\"}]},{\"text\":\"常见问题\",\"items\":[{\"text\":\"反向代理 Telegram API\",\"link\":\"/guide/q1.html\"},{\"text\":\"Agent 启动/上线 问题自检流程\",\"link\":\"/guide/q2.html\"},{\"text\":\"反向代理 gRPC 端口\",\"link\":\"/guide/q3.html\"},{\"text\":\"实时通道断开/在线终端连接失败\",\"link\":\"/guide/q4.html\"},{\"text\":\"面板数据迁移、备份和恢复\",\"link\":\"/guide/q5.html\"},{\"text\":\"设置每月重置流量统计\",\"link\":\"/guide/q6.html\"},{\"text\":\"自定义 Agent 监控项目\",\"link\":\"/guide/q7.html\"},{\"text\":\"使用 Cloudflare Access 作为 OAuth2 提供方\",\"link\":\"/guide/q8\"}]},{\"text\":\"排障指南\",\"items\":[{\"text\":\"Dashboard 相关\",\"link\":\"/guide/dashboardq.html\"},{\"text\":\"Agent 相关\",\"link\":\"/guide/agentq.html\"},{\"text\":\"登录相关\",\"link\":\"/guide/loginq.html\"}]}],\"/guide/\":[{\"text\":\"安装手册\",\"items\":[{\"text\":\"安装 Dashboard\",\"link\":\"/guide/dashboard.html\"},{\"text\":\"安装 Agent\",\"link\":\"/guide/agent.html\"}]},{\"text\":\"管理面板配置\",\"items\":[{\"text\":\"服务器\",\"link\":\"/guide/servers.html\"},{\"text\":\"服务\",\"link\":\"/guide/services.html\"},{\"text\":\"任务\",\"link\":\"/guide/tasks.html\"},{\"text\":\"告警\",\"link\":\"/guide/notifications.html\"},{\"text\":\"设置\",\"link\":\"/guide/settings.html\"},{\"text\":\"API\",\"link\":\"/guide/api.html\"}]},{\"text\":\"常见问题\",\"items\":[{\"text\":\"反向代理 Telegram API\",\"link\":\"/guide/q1.html\"},{\"text\":\"Agent 启动/上线 问题自检流程\",\"link\":\"/guide/q2.html\"},{\"text\":\"反向代理 gRPC 端口\",\"link\":\"/guide/q3.html\"},{\"text\":\"实时通道断开/在线终端连接失败\",\"link\":\"/guide/q4.html\"},{\"text\":\"面板数据迁移、备份和恢复\",\"link\":\"/guide/q5.html\"},{\"text\":\"设置每月重置流量统计\",\"link\":\"/guide/q6.html\"},{\"text\":\"自定义 Agent 监控项目\",\"link\":\"/guide/q7.html\"},{\"text\":\"使用 Cloudflare Access 作为 OAuth2 提供方\",\"link\":\"/guide/q8\"}]},{\"text\":\"排障指南\",\"items\":[{\"text\":\"Dashboard 相关\",\"link\":\"/guide/dashboardq.html\"},{\"text\":\"Agent 相关\",\"link\":\"/guide/agentq.html\"},{\"text\":\"登录相关\",\"link\":\"/guide/loginq.html\"}]}],\"/case/\":[{\"text\":\"社区项目\",\"items\":[{\"text\":\"1. 搭建哪吒 Telegram 机器人\",\"link\":\"/case/case1.html\"},{\"text\":\"2. 使用 Siri 语音运行快捷指令查询服务器状态\",\"link\":\"/case/case2.html\"},{\"text\":\"3. 自建多用户多语言 Telegram 服务器状态查询机器人\",\"link\":\"/case/case3.html\"},{\"text\":\"4. Fake-agent,监控数据作弊器\",\"link\":\"/case/case4.html\"},{\"text\":\"5. 使用 Argo 隧道的哪吒服务端\",\"link\":\"/case/case5.html\"}]}],\"/developer/\":[{\"text\":\"开发手册\",\"items\":[{\"text\":\"创建新主题\",\"link\":\"/developer/theme.html\"},{\"text\":\"l10n\",\"link\":\"/developer/l10n.html\"}]}]}}},\"en_US\":{\"lang\":\"en-US\",\"label\":\"English\",\"title\":\"Nezha MoniLine truncated
</body>