Updated on 2024-09-30 GMT+08:00

Creating an Alarm Rule

Scenarios

The alarm function provides the alarm service for monitoring data. By creating alarm rules, you define how the alarm system checks monitoring data and sends alarm notifications when metric data meets alarm policies.

After creating alarm rules for important metrics or events, you can promptly identify metric data exceptions or events and quickly rectify the faults.

Functions

  • Alarm rules can be created for all monitoring items on Cloud Eye.
  • Alarm rules can be created for all resources, resource groups, log monitoring, custom monitoring, event monitoring, and website monitoring.
  • You can set validity periods of alarm rules, that is, customize the time when alarm rules take effect.
  • Notifications can be sent by email, SMS message, or HTTP/HTTPS message.

Procedure

  1. Log in to the management console.
  2. Click Service List in the upper left corner and select Cloud Eye.
  3. In the navigation pane on the left, choose Alarm Management > Alarm Rules, and click Create Alarm Rule in the upper right corner.
  4. On the Create Alarm Rule page, configure the parameters.
    1. Configure the alarm rule name and description.
      Table 1 Name and Description

      Parameter

      Description

      Name

      Specifies the alarm rule name. The system generates a random name, which you can modify.

      Example value: alarm-b6al

      Description

      (Optional) Provides supplementary information about the alarm rule.

    2. Select a monitored object and configure alarm content parameters.
      Table 2 Parameters

      Parameter

      Description

      Example Value

      Resource Type

      Specifies the type of the resource the alarm rule is created for.

      Elastic Cloud Server

      Dimension

      Specifies the metric dimension of the selected resource type.

      ECSs

      Monitoring Scope

      The monitoring scope of an alarm rule can be All resources, Resource groups, or Specified resources.

      NOTE:
      • If you select All resources, an alarm notification will be sent when any instance meets an alarm policy, and existing alarm rules will be automatically applied for newly purchased resources.
      • If Resource groups is selected and any resource in the group meets the alarm policy, an alarm is triggered.
      • If you select Specific resources, select one or more resources and click to add them to the box on the right.

      All resources

      Group

      This parameter is mandatory when Monitoring Scope is set to Resource groups.

      N/A

      Method

      You can select an associated template, use an existing template or create a custom template as required.

      NOTE:

      After an associated template is modified, the policies contained in this alarm rule to be created will be modified accordingly.

      Configure manually

      Template

      Specifies the template to be used.

      You can select a default alarm template or customize a template.

      ECS Alarm Template

      Alarm Policy

      Specifies the policy for triggering an alarm.

      If you set Resource Type to Custom Monitoring or a specific cloud service, whether an alarm will be triggered depends on whether the metric data in consecutive periods reaches the threshold. For example, Cloud Eye triggers an alarm if the average CPU usage of the monitored object is 80% or more for three consecutive 5-minute periods.

      If you set Resource Type is to Event Monitoring, the event that triggers the alarm is an instant event. For example, if event improper ECS running occurs, Cloud Eye triggers an alarm.

      NOTE:

      A maximum of 50 alarm policies can be added to an alarm rule. If any one of these alarm policies is met, an alarm is triggered.

      N/A

      Mount Point or Disk

      This parameter is displayed on the console and can be configured only when the following conditions are met:

      • Monitoring Scope: Specific resources
      • Resource Type: ECSs or BMSs
      • Trigger Rule: Configure manually.
      • Metric Name in an alarm policy: disk metric whose name is prefixed with Agent

      For the Windows OS, enter a drive letter, such as C, D, or E. For the Linux OS, enter a mount point, such as /dev or /opt.

      /dev

      Alarm Severity

      Specifies the alarm severity, which can be Critical, Major, Minor, or Informational.

      Major

    3. Configure the alarm notification.
      Table 3 Alarm Notification parameters

      Parameter

      Description

      Alarm Notification

      Specifies whether to notify users when alarms are triggered. Notifications can be sent by email, SMS message, or HTTP/HTTPS message.

      Notification Object

      Specifies the object to which alarm notifications will be sent. You can select the account contact or a topic.

      • The account contact is the tenant owner. If a user registers both a mobile number and an email address, they will receive alarm information through both channels. However, if only one of these contact methods is registered, the alarm information will be sent exclusively to that registered one.
      • A topic is a specific event type for publishing messages or subscribing to notifications. If the required topic is not available, create one first and add subscriptions to it. For details, Creating a Topic and Adding Subscriptions.

      Validity Period

      Cloud Eye sends notifications only within the notification window specified in the alarm rule.

      If Validity Period is set to 08:00-20:00, Cloud Eye sends notifications only from 08:00 to 20:00.

      Trigger Condition

      Specifies the condition for triggering an alarm notification.

      • If Alarm Type is set to Metric, you can select Generated alarm, Cleared alarm, or both.
      • If Alarm Type is set to Event, you can select Generated alarm only.
    4. Select an enterprise project.
      Figure 1 Advanced Settings
      Table 4 Name and Description

      Parameter

      Description

      Enterprise Project

      Specifies the enterprise project that the alarm rule belongs to. Only users with the enterprise project permissions can manage the alarm rule. For details about how to create an enterprise project, see Creating an Enterprise Project.

    5. Click Create.

After the alarm rule is created, if the metric data reaches the specified threshold, Cloud Eye immediately informs you that an exception has occurred.