# Monitoring and Alerts

## Introduction

The monitoring and alert system provides you with a powerful feature to monitor the running status and anomalies of tasks. By using built-in rules or creating custom rules, you can monitor the running status of tasks in real-time and receive alert notifications when anomalies occur. This guide will help you understand the core concepts, features, and operational steps of the monitoring and alert system.

## Core Concepts

1. **System Messages**: Full messages generated internally by the system, including key attributes such as product, module, object, and message content. System messages are the basis for monitoring rules and alert events.
2. **Monitoring Rules**: A set of configuration information defined by the user to filter key system messages of interest. Monitoring rules help you determine which messages need attention.
3. **Alert Events**: System messages filtered based on monitoring rules. Alert events will be displayed on the product interface for users to view and handle.
4. **Alert Message Push**: After an alert event occurs, alert notifications are sent to the corresponding recipients according to the configured notification strategy (such as phone, SMS, etc.).

## Alert Event List

In the alert event list, you can view all alert information triggered by monitoring rules under the current instance. For alert events in the list, you can perform the following operations:

- **Suppress**: Set the current alert event to stop sending messages within a specified time.
- **Close**: Close the current alert event and stop receiving such messages.

![](https://tq2pllvokz.feishu.cn/space/api/box/stream/download/asynccode/?code=MWNiN2NjNWRlMWRkNDE3YjE3ZDhiMzg5NDJmMjlkYmFfVlVZd0dCQXFCeGFtaUVjSFY5U0NEeDlvN3RJS1ozNVdfVG9rZW46SjFVdmIyY2dEb2pWbXR4cFcwTGNMVlNMblFlXzE2ODk1NjM4OTk6MTY4OTU2NzQ5OV9WNA)

### Alert Message List

The alert message list displays all message notifications generated by the actual triggered notification strategy. These notifications are triggered by alert events.

![](https://tq2pllvokz.feishu.cn/space/api/box/stream/download/asynccode/?code=N2ZlNDAzOGY2MTI4MGY4Yjk3NTZlYTgyNjgxZGFiN2Vfd1dRU09FblNYc2Z0MVhJR3N5cXJCQUt1UlpFSHAxYUlfVG9rZW46RGxDUGJJWjd2b053dDl4aFlsYmN3NUNobk5oXzE2ODk1NjM4OTk6MTY4OTU2NzQ5OV9WNA)

### Monitoring Rule List

The monitoring rule list displays all currently configured rules. You can filter, sort, and operate on the rules in the list, such as viewing details, enabling/disabling, copying, editing, and subscribing/unsubscribing.

![](https://tq2pllvokz.feishu.cn/space/api/box/stream/download/asynccode/?code=ZDdjYzc3NjZmNzAxNjI3YjFhZDcyNWViNzA5MzA5ZTJfYjhhamdDS0pycExXUnRqZjE3NGFib3BYODlUdUZ0Y3pfVG9rZW46T2l4RGJETGdMb0x3UHZ4N0tnZWM5M0NIbldnXzE2ODk1NjM4OTk6MTY4OTU2NzQ5OV9WNA)

For a single rule, you can perform the following operations:

| **Operation Name** | **Behavior Definition**                 | **Operable Personnel**    |
| ------------------ | --------------------------------------- | ------------------------- |
| View Details       | Open the details page of the monitoring alert rule to view complete information | Open to all instance members |
| Enable/Disable     | Set the alert rule to enable or stop    | Instance administrators, instance operation and maintenance roles |
| Copy               | Copy the configuration attributes of the current rule to create a new rule | Instance administrators, instance operation and maintenance roles |
| Edit               | Support users to modify the attributes of the monitoring rule through appropriate interactions | Instance administrators, instance operation and maintenance roles |
| Subscribe/Unsubscribe | Add/remove the operator to/from the alert recipients | Open to all instance members |

#### System Built-in Rules

The product provides some global built-in monitoring rules that you can enable as needed.

| **Rule Name**       | **Rule Function**                       | **Default Status** |
| ------------------- | --------------------------------------- | ------------------ |
| General Rule for Monitoring Task Failure | Default rule for globally monitoring task instance failures, triggered when an instance fails | Default status is off |

## Create a New Monitoring Rule

To create a custom monitoring rule, follow these steps:
1. Click the "New Rule" button.
2. Fill in the basic information, including the rule name, description, and alert level.
3. Set the trigger conditions, including monitoring messages and filtering conditions.
4. Configure monitoring notifications, including notification policies, alert subscriptions, and Webhook notifications.
5. Select the start and end time for notifications.
| Category   | Parameter   | Description                                                                                                  |
| ---- | --------- | --------------------------------------------------------------------------------------------------- |
| Basic Information | Name        | Enter the name of the new custom rule.                                                                                       |
|      | Description        | Optional, you can add a description of the current rule, or fill in the handling method after receiving the alert, etc.                                                              |
|      | Alert Level      | High Risk: Send using all alert channels, including phone&#xA;Severe: Send using all alert channels, including phone&#xA;Warning: System, email, SMS, Webhook, excluding phone&#xA;Reminder: System, email, Webhook, excluding phone, SMS |
| Trigger Conditions | Monitoring Message      | Specific monitoring object                                                                                             |
|      | Filtering Conditions      | Filtering conditions for messages, multiple conditions are in an "AND" relationship                                                                              |
| Monitoring Notifications | Notification Policy      | Click the dropdown box to directly select the information managed in the notification "Notification Policy", or click the + sign to create a new notification policy. For specific notification policy configuration, see Notification Policy                                               |
|      | Alert Subscription      | Dropdown to select the specific person to be notified for this rule                                                                                  |
|      | Webhook Notification | Select the notification method. Currently supported notification types are: - DingTalk - Feishu - WeChat (coming soon)                                                              |
|      | Notification Start Time    | The start time for sending notifications after the monitoring rule is triggered                                                                                    |
|      | Notification End Time    | The end time for sending notifications after the monitoring rule is triggered                                                                                    |


## Notification Policy List

The notification policy list displays all defined notification policies. You can search and filter operations in the list.

![](https://tq2pllvokz.feishu.cn/space/api/box/stream/download/asynccode/?code=ZWFmNTliY2NmMjJjMzJlNDM5NmMxZjc1MDAwN2RmOGFfRkd3NUltb1lwaTVSZlY0RkZyWHJPVU50VVpyT3h2R21fVG9rZW46TGFqZGJzbm5hb0tscVd4UzJkSGN4ZzhKbktkXzE2ODk1NjM4OTk6MTY4OTU2NzQ5OV9WNA)

#### Create New Notification Policy

To create a new notification policy, follow these steps:

1. Click the "New Policy" button.
2. Fill in the basic information, including the policy name and description.
3. Configure the notification method, including specific notification settings for different alert levels.
4. Set the notification time, including the sending interval, maximum number of sends, and do-not-disturb start and end times.
![](https://tq2pllvokz.feishu.cn/space/api/box/stream/download/asynccode/?code=M2UzYTZhYzNmYzliNjI3YmRiMTNlYmZlYmZkZjk2YjZfUmF2VmhSdkp5TWFjWlpBUmt1VDRTTjFibDBsMEdNQW9fVG9rZW46QlBZZGI0OXVnbzA5aFN4TzcwamNiYUh6blJiXzE2ODk1NjM4OTk6MTY4OTU2NzQ5OV9WNA)

| **Category** | **Parameter**   | **Description**                                                                                                                 |
| ------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Basic Info   | Name            | The name of the notification policy                                                                                              |
|              | Description     | Optional, you can add a description for the current rule                                                                         |
| Notification Method | High-Risk Alert | Set the specific notification method for different alert levels. Supported methods include: 1. wehook                                                             |
|              | Severe Alert    | Same as above                                                                                                                    |
|              | Warning Alert   | Same as above                                                                                                                    |
|              | Reminder Alert  | Same as above                                                                                                                    |
| Notification Time | Interval (minutes) | The time interval between two alerts.                                                                                                           |
|              | Max Send Times  | The maximum number of alerts. Once the set number is exceeded, no more alerts will be generated.                                                        |
|              | Do Not Disturb Start Time | After setting the Do Not Disturb time, the system will not send alerts during this period. For example, if an alert is triggered when the task status is set to failed, and the Do Not Disturb time for the task is set from 00:00 to 08:00, no alert will be sent during this period. If the task is still in the abnormal state at 8:00, an alert will be sent. |
|              | Do Not Disturb End Time   | Same as above                                                                                                                    |

## Configuration Management

In Configuration Management, you can configure personal information and Webhook.

### Personal Configuration
In personal settings, you can modify the phone number and email address of the currently logged-in user, as well as set the do-not-disturb period.

![](https://tq2pllvokz.feishu.cn/space/api/box/stream/download/asynccode/?code=Yzc4MmIyMmI4MWRkMDM3MzU1Nzc3Y2Q5N2MzNTZmMzRfNklQakhNNWNnS0RtcnBqdTVHdmFVNUIxMHloVXFpS0FfVG9rZW46V1FPR2JTUlVpb2VkY3Z4MnVwbWN4ZmxObkZiXzE2ODk1NjM4OTk6MTY4OTU2NzQ5OV9WNA)

#### Webhook Configuration

Webhook configuration is used to define the Webhook channels required for alert pushing. Currently, Feishu and DingTalk are supported.

![](https://tq2pllvokz.feishu.cn/space/api/box/stream/download/asynccode/?code=NmYwYTIwMzIzNTJmZWQ0MzcwMDE0MGI1MjdiNzRmNzhfdzBLUlJPVWtlemdDNkFxaUFHYU5hREY1ZGNQV2FsQlFfVG9rZW46VXV4bGJJOG9Eb1llbzN4Z0lZaWNhMkQ3bmtiXzE2ODk1NjM4OTk6MTY4OTU2NzQ5OV9WNA)

#### Create a New Webhook Configuration

To create a new Webhook configuration, follow these steps:

1. Click the "New Configuration" button.
2. Fill in the required parameters, such as Webhook name, description, address, etc.
3. Test after the Webhook address to ensure the test passes, then click "OK" to save.

![](https://tq2pllvokz.feishu.cn/space/api/box/stream/download/asynccode/?code=ZTA4ZmFlOTkwMmFiOTg4NTNlZTEwNTQzNDAwZWM4NmZfT0xwVjFJWlFjMmxkV05kdmhUaEhzN3FWc0tRS2VZSG9fVG9rZW46UU5jQmJLM3Q4b2R5YTN4M0NVdmNzQklobjBnXzE2ODk1NjM4OTk6MTY4OTU2NzQ5OV9WNA)


### DingTalk Alert Configuration

When configuring DingTalk alerts, please ensure that the security policy of the DingTalk bot meets the following requirements:

- Set the security level to "Everyone can receive".
- Set the signature to "No signature required".

By following the above steps, you can easily create and configure monitoring alert rules to ensure timely notifications when tasks run abnormally. Please note that the operations and settings mentioned in this guide may change due to product version updates. Please adjust according to the actual situation.

![](https://tq2pllvokz.feishu.cn/space/api/box/stream/download/asynccode/?code=MDQ4OWU3MTc2MjA2YjJhOTBmMDFjNTc0ZjRhMGY4ZDlfME5IWGVCREc1UkRpSlRBWDBGU2JRNm96MUYyTTFvMGRfVG9rZW46WHZxc2JkTk5nb0Z2cHZ4YnFpcmNWeVBMbnNmXzE2ODk1NjM4OTk6MTY4OTU2NzQ5OV9WNA)