Updated on 2024-01-12 GMT+08:00

Alarm Policies

You can set alarm policies for metrics and events of a cloud service. When a metric triggers the threshold in the alarm policy for multiple times in a specified period, you will be notified. This section describes how to configure alarm policies for metrics and events.

Configuring Alarm Policies for Metrics

You can monitor key metrics of cloud services by configuring alarm rules. Then you can handle exceptions in a timely manner. A metric alarm policy must include a metric name, statistic, consecutive triggering times, threshold, and frequency. For details, see the following table.

Items in an alarm policy for metrics

Item

Description

Example Value

Metric Name

Specifies the metric name.

CPU Usage

Statistic

Specifies the metric value type. Cloud Eye supports the following statistics for metrics: Raw data, Avg., Max., Min., Variance, and Sum.

  • Raw data indicates the metric data that is not processed or converted.
  • Avg. is the value calculated by averaging raw data during a rollup period.
  • Max. is the highest value observed during a rollup period.
  • Min. is the lowest value observed during a rollup period.
  • Variance: indicates the difference between each data point in the original value and the average value within a rollup period.
  • Sum is the sum of raw data during a rollup period.
NOTE:
  • A rollup period can be 5 minutes, 20 minutes, 1 hour, 4 hours, or 24 hours. Select a rollup period based on your service requirements.
  • If you set a rollup period, alarm notifications will be delayed. If you set the rollup period to 5 minutes, alarm notifications will be delayed for 10 to 15 minutes. If you set the rollup period to 20 minutes, alarm notifications will be delayed for 20 minutes. If you set the rollup period to 1 hour, alarm notifications will be delayed for 1 hour and 20 minutes. If you set the rollup period to 4 hours, alarm notifications will be delayed for 4 hours and 40 minutes. If you set the rollup period to 24 hours, alarm notifications will be delayed for 25 hours.

Raw data

Consecutive Triggering Times

Specifies the number of consecutive times that an alarm is triggered.

The value can be set to 1, 2, 3, 4, 5, 10, 15, 30, 60, 90, 120, or 180 times (consecutively).

2 times (consecutively)

Operator

Specifies the operator used to compare metric value and the threshold.

Cloud Eye supports >, >=, <, <=, =, !=, Increase compared with last period, Decrease compared with last period, and Increase or decrease compared with last period.

NOTE:
  • Increase compared with last period: The monitoring data in the current monitoring period increases sharply when compared with that in the previous monitoring period.
  • Decrease compared with last period: The monitoring data in the current monitoring period decreases sharply when compared with that in the previous monitoring period.
  • Increase or decrease compared with last period: The monitoring data in the current monitoring period increases or decreases sharply when compared with that in the previous monitoring period.

=

Threshold

Specifies the metric threshold.

70

Frequency

Specifies how often alarms are repeatedly notified when there is already an alarm.

The following options are available:

Trigger only one alarm, Every 5 minutes, Every 10 minutes, Every 15 minutes, Every 30 minutes, Every 1 hour, Every 3 hours, Every 6 hours, Every 12 hours, and One day.

Every 5 minutes

Example of configuring an alarm policy for a metric

For example, in an alarm policy, the metric name is CPU usage, the statistic is average, the rollup period is 5 minutes, the consecutive triggering times is 2, the operator is =, the threshold is 80%, and the frequency is every 5 minutes.

This alarm policy indicates that the average CPU usage is collected every 5 minutes. If the CPU usage of an ECS is greater than 80% for two consecutive times, an alarm is generated every 5 minutes.

Figure 1 Alarm policy for a metric

Configuring Alarm Policies for Events

You can configure alarm policies for various system and custom events so that you can take measures in a timely manner when an event occurs. An event alarm policy must include the event name, triggering period, triggering type, triggering times, and alarm frequency. For details, see the following table.

Items in an alarm policy for events

Item

Description

Example Value

Event Name

Specifies the name of a service event.

Startup failure

Triggering Period

Specifies the event triggering period.

The following options are available: Within 5 minutes, Within 20 minutes, Within 1 hours, Within 4 hours, and Within 24 hours.

NOTE:

This parameter is optional when you select Accumulative trigger.

Within 5 minutes

Trigger type

The value can be:

Immediate trigger (default): After the event occurs, an alarm is triggered immediately.

Cumulative trigger: An alarm is generated only after the event is triggered for a preset number of times within the triggering period.

Accumulative trigger

Triggering times

Specifies the cumulative number of times the event occurred within the triggering period.

NOTE:

This parameter is optional when you select Accumulative trigger.

2

Frequency

Specifies how often alarms are repeatedly notified when there is already an alarm.

The following options are available:

Trigger only one alarm, Every 5 minutes, Every 10 minutes, Every 15 minutes, Every 30 minutes, Every 1 hour, Every 3 hours, Every 6 hours, Every 12 hours, and One day.

NOTE:

This parameter is optional when you select Accumulative trigger.

Every 5 minutes

Example of configuring an alarm policy for an event

For example, in an alarm policy, the event name is startup failure, the triggering period is 5 minutes, the trigger type is cumulative trigger, the triggering times is 2, and the alarm frequency is once every 5 minutes.

This alarm policy indicates that an alarm is generated every 5 minutes if the startup failure event is triggered for 2 consecutive times within 5 minutes.

Figure 2 Alarm policy for an event