This commit is contained in:
dysf888 committed 2023-04-21 11:42:48 +00:00
1 parent 83377dc328
commit d2b6c012e2
165 files changed
+393 -393

No files matched your search

+5 -5
View File
@@ -6,9 +6,9 @@
<title>Flexible notification methods | Nezha Monitoring</title>
<meta name="description" content="Nezha Monitoring is a lightweight O&M tool">
<link rel="stylesheet" href="/assets/style.0b9f658b.css">
<link rel="modulepreload" href="/assets/chunks/AlgoliaSearchBox.98396bc7.js">
<link rel="modulepreload" href="/assets/app.3817bf4e.js">
<link rel="modulepreload" href="/assets/en_US_guide_notifications.md.b1cfb902.lean.js">
<link rel="modulepreload" href="/assets/chunks/AlgoliaSearchBox.5f34673f.js">
<link rel="modulepreload" href="/assets/app.38e99b9a.js">
<link rel="modulepreload" href="/assets/en_US_guide_notifications.md.feadf36b.lean.js">
<meta name="twitter:title" content="Flexible notification methods | Nezha Monitoring">
<meta property="og:title" content="Flexible notification methods | Nezha Monitoring">
@@ -57,8 +57,8 @@
<span class="token punctuation">}</span>
<span class="token punctuation">}</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=""></p></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-hidden="true">#</a></h2><h3 id="basic-rules" tabindex="-1">Basic Rules <a class="header-anchor" href="#basic-rules" aria-hidden="true">#</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-hidden="true">#</a></h3><p>Can be used as monthly transfer notificatin</p><ul><li><p>type</p><ul><li><code>transfer_in_cycle</code> Inbound transfer during the cycle</li><li><code>transfer_out_cycle</code> Outbound transfer durinLine truncated
<script>__VP_HASH_MAP__ = JSON.parse("{\"case_case1.md\":\"ab041901\",\"case_case2.md\":\"aa65704d\",\"case_case3.md\":\"00ed2a5b\",\"case_case4.md\":\"7efb90b0\",\"case_case5.md\":\"ed51855f\",\"case_index.md\":\"0e468c21\",\"developer_index.md\":\"426207c3\",\"developer_l10n.md\":\"7a254502\",\"developer_theme.md\":\"7a2d8b90\",\"en_us_case_case1.md\":\"9dedef12\",\"en_us_case_case2.md\":\"b14e2e3b\",\"en_us_case_case3.md\":\"5d780c14\",\"en_us_case_case4.md\":\"85517e0c\",\"en_us_case_index.md\":\"6a8e5490\",\"en_us_developer_index.md\":\"9d8fad63\",\"en_us_developer_l10n.md\":\"6cb3d58b\",\"en_us_developer_theme.md\":\"33df1832\",\"en_us_guide_agent.md\":\"58fef874\",\"en_us_guide_agentq.md\":\"6fd0ad3a\",\"en_us_guide_api.md\":\"1a609500\",\"en_us_guide_dashboard.md\":\"e3929380\",\"en_us_guide_dashboardq.md\":\"69fe58cd\",\"en_us_guide_loginq.md\":\"cb7b70de\",\"en_us_guide_notifications.md\":\"b1cfb902\",\"en_us_guide_q2.md\":\"1fede52d\",\"en_us_guide_q3.md\":\"9c599d6b\",\"en_us_guide_q4.md\":\"74c83acc\",\"en_us_guide_q5.md\":\"023197e3\",\"en_us_guide_q6.md\":\"e76b06c2\",\"en_us_guide_q7.md\":\"fbaf7d36\",\"en_us_guide_servers.md\":\"907abee0\",\"en_us_guide_services.md\":\"9aead7e8\",\"en_us_guide_settings.md\":\"2c039877\",\"en_us_guide_tasks.md\":\"7db037a5\",\"en_us_index.md\":\"11305dae\",\"guide_agent.md\":\"59488614\",\"guide_agentq.md\":\"a75bbe9c\",\"guide_api.md\":\"13d6fa7e\",\"guide_dashboard.md\":\"81760078\",\"guide_dashboardq.md\":\"7139c1fb\",\"guide_loginq.md\":\"f3f9f895\",\"guide_notifications.md\":\"401936ef\",\"guide_q1.md\":\"cfb89f63\",\"guide_q2.md\":\"1e5d3a9b\",\"guide_q3.md\":\"2beb91cb\",\"guide_q4.md\":\"200041ae\",\"guide_q5.md\":\"4e736eea\",\"guide_q6.md\":\"b699a0ae\",\"guide_q7.md\":\"764a1f90\",\"guide_servers.md\":\"935137e3\",\"guide_services.md\":\"7b6688ec\",\"guide_settings.md\":\"9d745df6\",\"guide_tasks.md\":\"4870a789\",\"index.md\":\"12d2b26b\"}")</script>
<script type="module" async src="/assets/app.3817bf4e.js"></script>
<script>__VP_HASH_MAP__ = JSON.parse("{\"case_case1.md\":\"0c3f80aa\",\"case_case2.md\":\"4ef3816f\",\"case_case3.md\":\"17ff1c6b\",\"case_case4.md\":\"c09b19e7\",\"case_case5.md\":\"414284cb\",\"case_index.md\":\"37a3453d\",\"developer_index.md\":\"4421af87\",\"developer_l10n.md\":\"02caf252\",\"developer_theme.md\":\"e0e1b2fa\",\"en_us_case_case1.md\":\"48335ab4\",\"en_us_case_case2.md\":\"e8c5ccd1\",\"en_us_case_case3.md\":\"6088ec09\",\"en_us_case_case4.md\":\"0290bd98\",\"en_us_case_index.md\":\"a6ee6607\",\"en_us_developer_index.md\":\"87edd528\",\"en_us_developer_l10n.md\":\"7d37737a\",\"en_us_developer_theme.md\":\"5512a3dc\",\"en_us_guide_agent.md\":\"ef2781cf\",\"en_us_guide_agentq.md\":\"74df7478\",\"en_us_guide_api.md\":\"fe0296d9\",\"en_us_guide_dashboard.md\":\"3f8f5c21\",\"en_us_guide_dashboardq.md\":\"2e1818ad\",\"en_us_guide_loginq.md\":\"3abcdc85\",\"en_us_guide_notifications.md\":\"feadf36b\",\"en_us_guide_q2.md\":\"9af5cebb\",\"en_us_guide_q3.md\":\"4f68700f\",\"en_us_guide_q4.md\":\"43665576\",\"en_us_guide_q5.md\":\"c58dc333\",\"en_us_guide_q6.md\":\"f668bcbe\",\"en_us_guide_q7.md\":\"b97accc0\",\"en_us_guide_servers.md\":\"eeedb4ff\",\"en_us_guide_services.md\":\"daa489d6\",\"en_us_guide_settings.md\":\"bf853e66\",\"en_us_guide_tasks.md\":\"144bf954\",\"en_us_index.md\":\"e3e35a40\",\"guide_agent.md\":\"2252e51c\",\"guide_agentq.md\":\"2f3d0390\",\"guide_api.md\":\"2134da73\",\"guide_dashboard.md\":\"44772dfe\",\"guide_dashboardq.md\":\"a4f85b94\",\"guide_loginq.md\":\"d65f1996\",\"guide_notifications.md\":\"3bb1053b\",\"guide_q1.md\":\"56d9b06f\",\"guide_q2.md\":\"084c5e18\",\"guide_q3.md\":\"661b010e\",\"guide_q4.md\":\"8bfb9718\",\"guide_q5.md\":\"a332b970\",\"guide_q6.md\":\"a0164dc2\",\"guide_q7.md\":\"adbf16d9\",\"guide_servers.md\":\"6bb0d2f7\",\"guide_services.md\":\"fcc49b1f\",\"guide_settings.md\":\"e73556c7\",\"guide_tasks.md\":\"fffc0c27\",\"index.md\":\"e1b60f47\"}")</script>
<script type="module" async src="/assets/app.38e99b9a.js"></script>
</body>
</html>