Help Center/ Cloud Application Engine/ User Guide/ System Settings/ Configuring Event Notification Rules
Updated on 2024-05-25 GMT+08:00

Configuring Event Notification Rules

This section describes how to configure event notification rules. If you have configured event notification rules, notifications will be sent when instance scheduling, health check, image pull, volume mounting, or container startup succeeds or fails. In this way, you can handle alarms in a timely manner.

  • You can configure up to 50 event notification rules.
  • The Simple Message Notification (SMN) service is charged separately. For details, see Pricing Details.

Data Privacy Statement

  • The SMN service encrypts and saves the subscription endpoint information of the DingTalk robot, Lark robot, and WeCom chatbot entered by users in the database so that SMN can send messages to DingTalk, Lark, and WeCom groups.
  • SMN does not use the subscription endpoint information for other purposes except sending group messages.
  • After a user deletes a subscription endpoint, SMN permanently deletes the subscription endpoint information from the database.

Creating an Event Notification Rule

  1. Log in to CAE.
  2. Choose System Settings.
  3. Click Edit in the Event Notification Rules module.
  4. Click Create Event Notification Rule and configure basic information by referring to Table 1.

    Table 1 Configuring basic information

    Parameter

    Description

    Name

    Enter an event notification rule name. The name cannot be changed after creation.

    The value starts and ends with a letter and contains 1 to 64 characters, including letters, digits, hyphens (-), and underscores (_).

    Trigger Event

    Select an event that triggers notification from the drop-down list.

    • Health checked
    • Health check failed
    • Image pulled
    • Pull image failed
    • Container started up
    • Container startup failed
    • Volume mounted
    • Attach volume failed

    Effected Components

    • All in the environment: The rule takes effect for all components in the environment.
    • All in the application: The rule takes effect for all components in the selected application.
      NOTE:

      All in the environment and All in the application policies also take effect for newly added components.

    • Some: The rule takes effect for the selected components.
      NOTE:

      Components in the Not deployed state cannot be selected.

    Alarm Policy

    • Trigger Mode: Select Accumulative or Immediate.
    • Monitor for: Set this parameter when Trigger Mode is set to Accumulative.
      • 5 minutes
      • 20 minutes
      • 1 hour
      • 4 hours
      • 24 hours
    • Occurrences: Set this parameter when Trigger Mode is set to Accumulative.

      Value range: 1 to 100. The operators > and ≥ are supported.

  5. Configure the event notification sending mode and endpoint address.

    • WeCom chatbot: Enter a webhook address starting with https://qyapi.weixin.qq.com/cgi-bin/webhook/send.
    • Emails: Enter an email address, for example, 12345678@163.com.
    • SMS: Enter the subscription endpoint address, for example, 13900000000.

  6. Click OK.

    After creation, click the subscription confirmation link in the email or SMS to confirm the subscription. Otherwise, SMN cannot send messages when the trigger conditions are met.

Editing an Event Notification Rule

  1. Log in to CAE.
  2. Choose System Settings.
  3. Click Edit in the Event Notification Rules module.
  4. Select the target rule and click Edit in the Operation column.
  5. Edit the event notification rule again by referring to Table 2.

    Table 2 Editing an event notification rule

    Parameter

    Description

    Trigger Event

    Select an event that triggers notification from the drop-down list.

    • Health checked
    • Health check failed
    • Image pulled
    • Pull image failed
    • Container started up
    • Container startup failed
    • Volume mounted
    • Attach volume failed

    Effected Components

    • All in the environment: The rule takes effect for all components in the environment.
    • All in the application: The rule takes effect for all components in the selected application.
      NOTE:

      All in the environment and All in the application policies also take effect for newly added components.

    • Some: The rule takes effect for the selected components.
      NOTE:

      Components in the Not deployed state cannot be selected.

    Alarm Policy

    • Trigger Mode: Select Accumulative or Immediate.
    • Monitor for: Set this parameter when Trigger Mode is set to Accumulative.
      • 5 minutes
      • 20 minutes
      • 1 hour
      • 4 hours
      • 24 hours
    • Occurrences: Set this parameter when Trigger Mode is set to Accumulative.

      Value range: 1 to 100. The operators > and ≥ are supported.

  6. Click OK.

    After editing, the event notification rule is enabled.

Deleting an Event Notification Rule

  1. Log in to CAE.
  2. Choose System Settings.
  3. Click Edit in the Event Notification Rules module.
  4. Select the target rule and click Delete in the Operation column.
  5. If Deleted is displayed, the rule is deleted.

Viewing an Event Notification Rule

  1. Log in to CAE.
  2. Choose System Settings.
  3. Click Edit in the Event Notification Rules module.
  4. On the event notification rule details page, you can view the name, status, and configuration of the created event notification rules.

Enabling or Disabling an Event Notification Rule

You can enable or disable a created event notification rule.

  1. Log in to CAE.
  2. Choose System Settings.
  3. Click Edit in the Event Notification Rules module.
  4. In the event notification rule list, select a rule and click the button in the Status column.

    • indicates that the rule is enabled.
    • indicates that the rule is disabled.

  5. If Event notification rule updated is displayed, the rule is enabled or disabled.