import{_ as o,o as s,c as e,R as t}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1715112843000}'),n={name:"en_US/guide/notifications.md"},a=t(`

Nezha Monitoring supports monitoring of server load, CPU, memory, hard disk, data transfer, monthly data transfer, number of processes, number of connections, and sends alarm notifications when one of these items reaches a user-set limit.


Flexible notification methods

In panel messages, the placeholder #DATETIME# represents the timestamp of when an event occurs. When the notification is triggered, the panel automatically replaces #DATETIME# with the actual time of the event.

#NEZHA# is the panel message placeholder, the panel will automatically replace the placeholder with the actual message when it triggers the notification

The content of Body is in JSON format:When the request type is FORM,the value is in the form of key:valuevalue can contain placeholders that will be automatically replaced when notified. When the request type is JSON It will only do string substitution and submit to the URL directly.

Placeholders can also be placed inside the URL, and it will perform a simple string substitution when requested.

Refer to the example below, it is very flexible.



Description of notification rules

Basic Rules

Complete examples:

Add an offline notification

Add an notification when the CPU exceeds 50% for 10s but the memory usage is below 20% for 20s

Send specific server notifications to specific notification groups

Case:
You have four servers, 1, 2, 3, 4, and two different notification groups, A and B
1, 2 The two servers are down for 10 minutes and send a notification to Notification Group A
3, 4 These two servers are down for ten minutes and then send a notification to Notification Group B

First you need to set up two notification groups, A and B, and then add two alarm rules:

Rule I:

Rule II:

Using these rules flexibly will help you to make full use of the notification function


Special: Any-cycle transfer notification

Can be used as monthly transfer notificatin

Example:

The servers with ID 3 and 4 (defined in the ignore) are counted on the 1st of each month, and a notification is triggered when the monthly outbound transfer reaches 1TB during the cycle.

[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]

Description of mode of triggering notification

Set the task to be executed when notification

If you need to perform a task while sending a notification message, you can set those items

`,28),l=[a];function p(r,c,i,u,D,y){return s(),e("div",null,l)}const q=o(n,[["render",p]]);export{F as __pageData,q as default};