Creating an Alarm Rule (Earlier Version)
To monitor the usage of cloud service resources or key operations on them, you can create an alarm rule. After the alarm rule is created, if a metric reaches the specified threshold or the specified event occurs, Cloud Eye immediately informs you of the exception through SMN.
This topic describes how to create an alarm rule.
In some regions, Cloud Eye has been upgraded to the latest version. The alarm rule page has been optimized. The upgrade is being rolled out in other regions. For details, see the console. This section describes how to configure alarm rules in the earlier version. For details about how to configure alarm rules in the latest version, see Creating an Alarm Rule (New Edition).
Billing
Alarm notifications sent by SMN will be billed based on their frequency and message length. For details, see Product Pricing Details.
Constraints
- When Specific resources is selected for the monitoring scope, a maximum of 1,000 resources can be selected for a single alarm rule by default. If the current resource quota cannot meet your requirements, you can apply for a higher quota by referring to Quotas. The maximum quota is 1,500. The actual quota varies depending on the service. If the number of resources exceeds 1,000, you are advised to use resource groups for configuration.
- When creating an alarm rule of the metric type, if you select All resources or Resource groups as the monitoring scope, you can exclude resources. By default, a maximum of 100 resources can be excluded for a single alarm rule. If the current resource quota cannot meet your requirements, you can apply for a higher quota by referring to Quotas. The maximum quota is 500. The actual quota varies depending on the service.
Prerequisites
| Alarm Type | Prerequisites |
|---|---|
| Metric |
|
| Event | Before creating an alarm rule for a custom event, ensure that the event source is the same as that specified in Reporting an Event. |
Creating an Alarm Rule
- Log in to the Cloud Eye console.
- In the navigation pane, choose Alarm Management > Alarm Rules.
- On the displayed page, click Create Alarm Rule in the upper right corner.
- On the Create Alarm Rule page, configure parameters. Assume that you want to notify all contacts in the contact group Notification_Group every hour when the raw data of CPU usage of any ECS exceeds 80% for three consecutive periods. In this case:
- Set Alarm Type to Metric.
- Set Cloud Product to Elastic Cloud Server - ECSs.
- Set Resource Level to Cloud product.
- Set Monitoring Scope to All resources.
- Set Method to Configure manually and set an alarm policy to trigger Hourly alarms when Raw data of ECSs / CPU Usage > 80% (marked as Major) for 3 times (consecutively).
- Enable Alarm Notifications and set Notified By to Contact groups.
- Select Notification_Group for Contact Group. Retain the default values for other parameters or leave them blank.
- Click Create.
Basic Parameters of an Alarm Rule
| Parameter | Description |
|---|---|
| Name | Name of the alarm rule. The name is automatically generated, but you can change it to a custom one. The rule name cannot exceed 128 characters and can contain only letters, digits, underscores (_), and hyphens (-). |
| Description | (Optional) Alarm rule description. It can contain up to 256 characters. |
Parameters of the Alarm Content
The alarm content parameters vary depending on the alarm type. You can check the parameter description based on the selected alarm type.
When setting Alarm Type to Metric, you can configure the alarm content by referring to the following table.
| Parameter | Description | Example Value |
|---|---|---|
| Cloud Product | Name of the monitored service. For details about supported cloud products and their metrics, see Cloud Product Metrics. | Elastic Cloud Server - ECSs |
| Resource Level | Resource level of the monitored object. You can select Cloud product or Specific dimension. Cloud product is recommended. Take ECS as an example. ECS is the cloud product. Specific dimensions are disks, mount points, processes, and more. For details about dimensions, see Dimensions. NOTE: If you select Cloud product, metrics across dimensions (such as Disk Usage and CPU Usage) can be configured in the same alarm rule. If you select Specific dimension, only metrics of the specified dimension can be configured for the same alarm rule. | Cloud product |
| Monitoring Scope | Monitoring scope the alarm rule applies to. You can select All resources, Resource groups, or Specific resources.
| Specific resources |
| Group | When Monitoring Scope is set to Resource groups, you need to select a group. If no resource group meets your needs, click Create Resource Group to create one. After selecting a resource group from the drop-down list, you can click View Resource Details in a Group to view the details of resources in the group. After an alarm rule is configured, the group cannot be modified. NOTE: If the resource group contains an EVS resource with the type in the format of ECS instance ID-volume-Volume ID, the instance cannot report monitoring data after the alarm rule is created. As a result, no alarm can be triggered. | - |
| Instance | When Monitoring Scope is set to Specific resources, you need to select the monitored objects for the alarm rule. Click Select Specific Resources to select desired resources. | - |
| Method | Method for configuring an alarm policy. The options are as follows:
| Configure manually |
| Template | When you set Method to Associate template, you need to select a template. You can select a default or custom template. An alarm template may contain alarm policies of multiple cloud products or different dimensions of the same cloud product. When you create an alarm rule, the alarm policies vary according to the resource level.
| - |
| Alarm Policy | When you set Method to Configure manually, you need to configure alarm policies. You can add up to 50 alarm policies for a single alarm rule. You can choose to send alarm notifications when any of the policies is met or when all policies are met. For details about alarm policy parameters, see Configuring Alarm Policies for Metrics. You can customize alarm policy parameters or select Use Template to select an alarm template and modify the alarm policies in that template. Changes made will not affect the original policies in that template. An alarm will be triggered when the monitored data reaches the threshold for the specified consecutive times. For example, Cloud Eye triggers a major alarm if the average CPU usage of the monitored object is 80% or more for three consecutive 5-minute periods. | - |
| Operation | If there are multiple alarm policies, you can click Delete to delete one. NOTE: You can also click Create above the alarm policy list to add more alarm policies. | Delete |
When setting Alarm Type to Event, you can configure the alarm content by referring to the following table.
| Parameter | Description | Example Value |
|---|---|---|
| Event Type | This parameter is only available if Alarm Type is set to Event. You can select either System event or Custom event. For details about the events supported by each cloud service, see Events Supported by Event Monitoring. | System event |
| Event Source | This parameter is only available if Alarm Type is set to Event.
| Elastic Cloud Server |
| Monitoring Scope | Monitoring scope the alarm rule applies to.
NOTE:
| Specific resources |
| Group | When Monitoring Scope is set to Resource groups, you need to select a group. If no resource group meets your needs, click Create Resource Group to create one. After selecting a resource group from the drop-down list, you can click View Resource Details in a Group to view the details of resources in the group. After an alarm rule is configured, the group cannot be modified. | - |
| Dimension | When you set Monitoring Scope to Specific resources, select a dimension of the resources to connect the event data of the selected cloud service to Cloud Eye by dimension. | Document Database Instances |
| Instance | When Monitoring Scope is set to Specific resources, you need to select the monitored objects for the alarm rule. Click Select Specific Resources to select desired resources. | - |
| Method | Method used to create an alarm rule. If you select System event for Event Type, Method can be Associate template or Configure manually. If you select Custom event for Event Type, only Configure manually is supported.
| Configure manually |
| Template | When you set Method to Associate template, you need to select a template. You can select a default or custom template. | - |
| Alarm Policy | When you set Method to Configure manually, you need to configure alarm policies. You can add up to 50 alarm policies to an alarm rule. For details about alarm policy parameters, see Configuring Alarm Policies for Events. You can customize alarm policy parameters or select Use Template to select an alarm template and modify the alarm policies in that template. Changes made will not affect the original policies in that template. The event that triggers an alarm is an instant operation. For example, an alarm is triggered if a VM is restarted. | - |
| Operation | If there are multiple alarm policies, you can click Delete to delete one. NOTE: You can also click Create above the alarm policy list to add more alarm policies. | Delete |
Alarm Notification Parameters
If no notification is received after alarm notification is enabled, rectify the fault by referring to Why Do Subscribers Fail to Receive Messages After I Publish Messages to a Topic?
Notification policies, contact groups, and notification templates are available only in some regions. These features will be available in other regions later. For details, check the console.
| Parameter | Description | Example Value |
|---|---|---|
| Alarm Notifications | Whether to send alarm notifications by SMS, email, FunctionGraph (function), FunctionGraph (Workflow), WeCom, DingTalk, Lark, WeLink Chatbot, HTTP, or HTTPS. This parameter is enabled by default. | Enabled |
| Notified By | Notification method. Select Notification policies, Contact groups, or Topic subscriptions.
NOTE: Cloud Eye uses SMN for alarm notifications. If SMN has major delays, the alarm notifications may also be delayed. | Contact groups |
| Notification Window | If Notified By is set to Contact groups or Topic subscriptions, you need to set the notification window. Cloud Eye sends notifications only within the validity period specified in the alarm rule. For example, if the notification window is set to 08:00 to 20:00, notifications are sent only within this specified time range when a metric reaches the specified threshold or a specified event occurs. | 08:00-20:00 |
| Time Zone | Time zone for the alarm notification window. By default, it matches the time zone of the client browser, but can be manually configured. | (GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi, Kuala Lumpur, Singapore, Perth, Taipei, Irkutsk, Ulaanbaatar |
| Trigger Condition | This parameter is required when you set Notified By to Contact groups or Topic subscriptions.
| Generated alarm |
| Notification Template | This parameter is only available if you set Notified By to Contact groups or Topic subscriptions. You can select an existing template or create one to send alarm notifications. NOTE: Some cloud services do not support fields such as the resource name, enterprise project, resource tag, private IP address, and public IP address in the notification template. When you select a system template as the notification template, these fields will appear blank in the alarm notifications even if you have them configured. | - |
(Optional) Parameters of Advanced Settings
| Parameter | Description |
|---|---|
| Enterprise Project | 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. |
| Tags | Key-value pairs that you can use to easily categorize and search for cloud resources. You are advised to create predefined tags in TMS. For details, see Creating Predefined Tags. If you have configured tag policies for Cloud Eye, add tags to alarm rules based on the tag policies. If you add a tag that does not comply with the tag policies, alarm rules may fail to be created. Contact your administrator to learn more about tag policies.
|
| No-Data Processing | If Alarm Type is set to Metric, you can configure whether to trigger alarms when no data is reported. This parameter is selected by default. When enabled, an insufficient data alarm record will be generated if the configured metric reports no data for three consecutive hours. |
Reference
If Notified By is set to Notification policies and System template is selected for Notification Template, SMN sends alarms in non-JSON format. To receive JSON-formatted alarms, select a notification template whose Protocol is HTTP/HTTPS and Format is JSON under Notification Policies. For details, see Creating, Deleting, Copying, or Modifying a Notification Template and Creating, Modifying, or Deleting a Notification Policy.
If Notified By is set to Contact groups or Topic subscriptions and a default template is selected, SMN sends alarms in a fixed format. JSON-formatted alarms are unavailable. Table 6 lists related alarm fields.
- The alarm fields in the following table are common fields. If there are special fields, submit a service ticket to contact technical support.
- AlarmNotificationType, LastAlarmLevel, IngressMaxBandwidthPerSec, EgressMaxBandwidthPerSec, RelatedResourceName, IsCycleTrigger, RecommendedSolution, ImpactScope, DataPointTime, and ResourceDimensionInfos are available only in some regions. They will be available in other regions later. For details, see the notification you receive.
| Field | Description |
|---|---|
| message_type | The value is alarm. |
| alarm_id | Alarm rule ID. |
| alarm_name | Alarm rule name. |
| alarm_status | Alarm status. Range:
|
| time | Time when an alarm was generated. |
| namespace | Service namespace. The format is service.item. The values of service and item must be character strings and start with a letter. |
| metric_name | Metric name. |
| dimension |
|
| period | Aggregation granularity of the monitoring data. For details about aggregation, see What Is Aggregation? Range:
|
| filter | Data aggregation method. Range:
|
| comparison_operator | Operator of alarm thresholds. Range: >, =, <, >=, and <=. |
| value | Alarm threshold. Supported range: 0 to Number.MAX_VALUE (1.7976931348623157e+108) |
| unit | Data unit. Enter up to 32 characters. |
| count | Number of consecutive times that the alarm policy was met. Supported range: 1 to 5 |
| alarmValue |
|
| sms_content | SMS message content. |
| template_variable | Variable required by the template. For details, see Table 7. |
| Parameter | Description |
|---|---|
| AccountName | Account name. |
| Namespace | Service name. |
| DimensionName | Dimension name. |
| MetricName | Metric name. |
| IsAlarm | Whether an alarm was generated. Range:
|
| IsCycleTrigger | Whether to continuously trigger alarms. Range:
|
| AlarmLevel | Alarm severity. Range: Critical, Major, Minor, and Warning. |
| Region | Region name. |
| ResourceId | Resource ID. |
| CurrentData | Current metric value. |
| AlarmTime | Time when an alarm was generated. |
| DataPoint | Metric value when an alarm is triggered. |
| AlarmRuleName | Alarm rule name. |
| AlarmId | Alarm rule ID. |
| AlarmDesc | Alarm description. |
| MonitoringRange | Monitoring scope. Range:
|
| Filter | Data aggregation method. Range:
|
| ComparisonOperator | Operator of alarm thresholds. Range: >, =, <, >=, and <=. |
| Value | Alarm threshold. Supported range: 0 to Number.MAX_VALUE (1.7976931348623157e+108) |
| Unit | Data unit. Enter up to 32 characters. |
| Count | Number of consecutive times that the alarm policy was met. Supported range: 1 to 5 |
| EventContent | Additional information about event monitoring. |
| AlarmNotificationType | Alarm notification type. Range:
|
| LastAlarmLevel | Severity of the last alarm. Range: Critical, Major, Minor, and Warning. When an alarm policy has several thresholds and the metric data triggers them, the alarm severity updates and this parameter appears in the notification. |
| IngressMaxBandwidthPerSec | Inbound peak bandwidth. This parameter is supported only by some event alarms. If it is not supported, it is left empty in the notification. |
| EgressMaxBandwidthPerSec | Outbound peak bandwidth. This parameter is supported only by some event alarms. If it is not supported, it is left empty in the notification. |
| RelatedResourceName | Related resource. This parameter is supported only by some event alarms. If it is not supported, it is left empty in the notification. |
| IsCycleTrigger | Trigger condition. For event alarms, the value can be: true: cumulative. false: instant. For metric or WAN quality alarms, the value is false. |
| RecommendedSolution | Recommended solution. This parameter is supported only by some event alarms. If it is not supported, it is left empty in the notification. |
| ImpactScope | Scope of impact. This parameter is supported only by some event alarms. If it is not supported, it is left empty in the notification. |
| DataPointTime | Time when the event occurred. This parameter has a value only for event alarms. |
| ResourceDimensionInfos | Dimension information. It is available for metric and WAN quality alarms. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot