Abnormal event alerts

更新时间:
复制 MD 格式

This topic describes how to configure abnormal event alerts, using node downtime detection as an example. By creating an alert policy and a notification subscription, you can receive timely notifications through channels such as DingTalk, email, or SMS when an abnormal event is detected. This allows you to respond and resolve issues promptly.

Prerequisites

  • If you are a RAM user, ensure you have been granted the AliyunECSReadOnlyAccess, AliyunSubManageFullAccess, and AliyunSysomFullAccess system policies. For more information, see Grant permissions to a RAM user.

  • The SysOM console is activated.

    When you log on to the SysOM console for the first time, click Activate Service to activate the service.

  • The CloudMonitor service is activated.

  • The ECS instance is running and the Cloud Assistant Agent is installed.

  • The SysOM component is installed. For installation instructions, see Component Management.

Configure alert policy

  1. Go to the SysOM console.

  2. In the left-side navigation pane, choose Abnormal event alerts > Policy Management.

  3. On the Policy Management page, click Create Policy.

  4. Configure the following parameters:

    • Policy Name: Enter a name for the policy.

    • Cluster Name: Select a managed cluster.

    • Select the abnormal events for nodes and pods that will trigger alerts. You can select multiple items. This topic uses node downtime detection, which is based on an anomaly detection algorithm, as an example.

    • Select the clusters, nodes, or pod abnormal events for which you want to receive alerts. Note: Click the arrow to move your selections to the list of selected items.

    • Select the abnormal event types for which you want to receive alerts. The page provides the Node and Pod tabs. On the Node tab, detection items are grouped into four categories: saturation, errors, latency, and load. Available items include Node CPU Utilization Detection, Node Network Packet Loss Detection, Node OOM Event Prediction, Node User-mode OOM Event, Node Downtime Detection, and Node Load Average Detection.

  5. Select Apply this edit (selected by default), and then click Save.

Other operations

  • To modify a policy, find it on the Policy Management page and click Edit in the Actions column.

  • To delete a policy, find it on the Policy Management page and click Delete in the Actions column.

    In the confirmation dialog box that appears, click OK.

Configure alert contacts

DingTalk bot

The SysOM console currently supports only DingTalk bot notifications. To configure other notification channels, see Configure SMS/email alerts.
  1. Go to the SysOM console.

  2. In the left-side navigation pane, choose Abnormal event alerts > Alert contact management > Create Contact.

  3. Configure the DingTalk bot information for the alert contact, including Name, Push Target (set to DingTalk by default), Webhook, and secret key, and then click Save.

SMS and email

  1. Log on to the CloudMonitor console.

  2. To add an alert contact, in the left-side navigation pane, click Alert Contacts, and then click Create Contact. Enter the contact information as prompted. You must fill in the Name, Verification Email, and Verification Mobile Number fields.

    A new alert contact's email address must be activated before use.
  3. Add the alert contact to an alert contact group. Click Alert Contact Groups, and then click Create Contact Group. Enter a group name and add the contacts.

    You can also edit an existing alert contact group to add or remove contacts.

  4. Create an event subscription policy.

    1. In the left-side navigation pane, click Event Subscriptions, and then click Create Subscription Policy.

    2. Enter a Name, and for Subscription Type, select System Events.

    3. In the Product field under Subscription Scope, enter sysom and select SysOM. In the Alert Subscription step, you can also configure filter conditions as needed, such as Event Type, Event Level, Event Name, Event Severity, Rule Name, Event Content, and Event Resource.

    4. Select the event type and event severity. If you have already selected Node CPU Utilization Detection in the SysOM console, you do not need to select it again here. You can use the default setting, which selects all events.

    5. In the Notification Settings drop-down list, click Create Notification Setting. Enter a policy name, and from the Contact Group drop-down list, select the alert contact group that you created. In the Deduplication and Throttling step, you can configure Merged Content and the trigger method for throttling (Conditional Trigger, Direct Trigger, or Direct Trigger Without Muting).

    6. Configure other parameters. For detailed descriptions of the parameters, see Manage event subscriptions (recommended). Then, click Submit.

Debug event subscription

After you create the subscription policy, you can debug it to verify that event notifications are sent correctly.

  1. Click Debug Event Subscription.

  2. In the Product field, enter sysom and select SysOM.

  3. Select the name of the event subscription that you created, and then click OK. You will receive a test notification.

  4. After you configure the alert policy and subscription policy, SysOM sends notifications when an abnormal event occurs. The following images show examples.

    DingTalk bot

    image.png

    Email

    image.png

    SMS

    image.png