Creating Alarm Policy

Last updated: 2021-03-29 14:43:21

    This document describes how to create an alarm policy.

    Use Cases

    You can set threshold alarms for the performance consumption metrics of the Tencent Cloud service resources supported by Cloud Monitor. You can also set event alarms for the service status of Tencent Cloud service instances or the underlying platform infrastructure. This way, when an exception occurs, you will promptly receive notifications, which will allow you to take appropriate measures. An alarm policy consists of five required parameters: name, policy type, alarm trigger condition, alarm object, and alarm notification template. You can create alarm policies by following the directions below:

    Concepts

    Term Definition
    Alarm policy It consists of alarm name, alarm policy type, alarm trigger condition, alarm object, and alarm notification template
    Alarm policy type Alarm policy type identifies policy category and corresponds to specific Tencent Cloud products. For example, if you choose the CVM policy, you can customize metric alarms for CPU utilization, disk utilization, and more
    Alarm trigger condition An alarm trigger condition is a semantic condition consisting of metric, comparison, threshold, statistical period, and duration
    Notification template A notification template can be quickly reused for multiple policies, making it suitable for alarm receipt in various use cases. For more information, please see Creating Alarm Notification Template

    Directions

    1. Log in to the Cloud Monitor Console.
    2. Click Alarm Configuration > Alarm Policy to enter the alarm policy configuration page.
    3. Click Add and configure a new alarm policy as shown below:
      Configuration Type Configuration Item Description
      Basic information Policy name Custom policy name
      Remarks Custom policy remarks
      Monitoring type Tencent Cloud service monitoring
      Policy type Select the desired policy type for monitoring Tencent Cloud services
      Project This configuration item has two functions:
      • It manages alarm policies. After setting a project, you can quickly locate the alarm policies of a project in the alarm policy list.
      • It manages instances. Choose a project based on your needs. Then, in "Alarm Object", you can quickly select instances under the project. You can assign Tencent Cloud services to each project based on your business types. If you want to create a project, please see Project Management. After creating a project, you can use the console of each Tencent Cloud service to assign projects to resources. Some Tencent Cloud services such as TencentDB for MySQL do not support project assignment. In that case, you can refer to Specifying Project for Instance to assign projects to the corresponding instances. If you do not have project permissions, please see Cloud Access Management (CAM) to get permissions.
      Alarm rule configuration Alarm object
      • If you select "instance ID", the alarm policy will be associated with the selected instance.
      • If you select "instance group", the alarm policy will be associated with the selected instance group.
      • If you select "all objects", the alarm policy will be associated with all instances under the current account.
      Manual configuration
      (metric alarm)
      • An alarm trigger condition is a semantic condition consisting of metric, comparison, threshold, measurement period, and duration. You can set an alarm threshold according to the trend of metric change in the chart.
        For example, if the metric is CPU utilization, the comparison is `>`, the threshold is `80%`, the measurement period is `5 minutes`, and the duration is `2 periods`,
        then data on the CPU utilization of a CVM instance will be collected once every 5 minutes, and an alarm will be triggered if the CPU utilization exceeds 80% for two consecutive periods.
      • Alarm frequency: you can set a repeated notification policy for each alarm rule. This way, an alarm notification will be sent repeatedly at a specified frequency when an alarm is triggered.
        Frequency options: do not repeat, once every 5 minutes, once every 10 minutes, at an exponentially increasing interval, and other frequency options.
        • An exponentially increasing interval means that a notification is sent when an alarm is triggered the first time, second time, fourth time, eighth time, and so on. In other words, the alarm notification will be sent less and less frequently as time goes on to reduce the disturbance caused by repeated notifications.
        • Default logic for repeated alarm notifications: the alarm notification will be sent to you at the configured frequency within 24 hours after an alarm is triggered. After 24 hours, the alarm notification will be sent once every day by default.
      Manual configuration
      (event alarm)
      You can create event alarms so that when the Tencent Cloud service resources or the underlying infrastructure services encounter any errors, you will promptly receive notifications and can then take measures accordingly. For more information, please see Event Center.
      Template Click "Template" and select a configured template from the drop-down list. For detailed configurations, please see Configuring Trigger Condition Template. If a newly created template is not displayed, click **Refresh** on the right.
      Alarm notification configuration Alarm notification You can select a preset or custom notification template. Each alarm policy can be bound to three notification templates at most. For more information, please see Notification Template.
      Advanced configuration Auto scaling After this option is enabled and configured successfully, an auto scaling policy will be triggered for scaling when the alarm condition is met.
    1. After configuring the above information, click Save. The alarm policy will be created successfully.

    Note:

    CVM alarms can be sent normally only after the monitoring Agent has been installed on CVM instances and reports monitoring metric data. On the Cloud Monitor page, you can view CVM instances that do not have Agent installed and download the IP address list.