Alarms#

Alarm allows you to track changes in metric values and statuses for instances, volumes, Auto Scaling groups, buckets, backups, VPN tunnels and connecctions, Direct Connect virtual interfaces and connections over a predefined period of time and initiate varios actions when a specified alarm condition occurs. For example, a user can be notified if the average CPU utilization for a given instance (or average CPU utilization for all instances in an Auto Scaling group) has exceeded 80% during the last hour.

Alarm description#

An alarm has the following parameters:

  • Name — The alarm name.

  • Description – A short description of the alarm (optional).

  • Metric – The full metric ID, including namespace, metric name, and dimension.

  • Number of periods – The number of specified time periods, over which metric values are collected.

  • Period duration.

  • Statistics – A function, which aggregates metric values over the specified period.

  • Threshold – A value against which the aggregated metric values will be compared.

  • Comparison operator – An arithmetic operation used to compare a metric with a threshold value (>, ≥, ≤, <).

  • Action – An action performed when the alarm status changes (Send e-mail or Execute policy).

  • email — An email address to which a notification is sent when the action Send email is chosen.

  • Auto Scaling group — An Auto Scaling group to which the action “Execute policy” is applied.

  • Policy — A policy executed when the action Execute policy is selected.

The following statistics can be calculated for a metric:

  • Average – The average value.

  • Sum – Sum of values.

  • Maximum – The maximum value.

  • Minimum – The minimum value.

  • Number of points – The number of entries with metric data.

Each statistics is calculated for one period.

Note

In case of Auto Scaling group, the average value for the corresponding metrics of instances in the group is calculated.

An alarm can be in one of three states:

  • INSUFFICIENT DATA – The amount of data collected is insufficient to validate the respective metric.

  • OK – The metric value does not match the threshold condition.

  • ALARM – The metric value matches the threshold condition.

The detailed description of alarm structure.

Creating an alarm#

  1. Go to the section Monitoring Alarms.

  2. Click Create.

  3. In the window that opens, select the metrics to be monitored in the Metric tab:

    • Namespace, in which the metric is selected:

      • AWS/EC2;

      • AWS/EBS;

      • AWS/S3;

      • AWS/Backup;

      • AWS/DX;

      • AWS/VPN.

    • Resource type — (for namespaces AWS/EC2, AWS/Backup, AWS/DX and AWS/VPN):

      • instance or Auto Scaling group in the AWS/EC2 namespace;

      • current project, protected instance or volume in the AWS/Backup namespace;

      • virtual interface or connection in the AWS/DX namespace;

      • VPN connection or VPN tunnel in AWS/VPN space.

    • Resource ID:

      • ID of an instance or Auto Scaling group depending on the selected resource type for AWS/EC2;

      • Volume ID for AWS/EBS;

      • bucket name for AWS/S3;

      • name of a protected instance or volume depending on the selected resource type for AWS/Backup; in case of a project you can select metrics only in the current project;

      • Virtual interface ID or connection ID for AWS/DX;

      • VPN connection ID or VPN tunnel IP address for AWS/VPN.

    • Metric name.

Note

To use the MemoryUtilization metric, RAM Monitoring should be enabled on the instance (or instances in the Auto Scaling group) and CloudWatch agent should be installed (see for more information).

  1. Click Next.

  2. In the Parameters tab, specify the remaining alarm parameters:

    • The alarm name and, optionally, its description.

    • Statistics.

    • The condition of triggering an alarm for the selected metric. It includes a comparison operator and a threshold value. If necessary, you can also change the metric selected in the previous step.

    • The number and duration of time periods, over which metric values are collected.

    This step displays a metric graph with a threshold level. This allows you to adjust the threshold value based on the latest metric values.

  3. If you need to set actions to be executed when an alarm state changes, click Set actions. The available actions include sending email notifications and executing a policy for an Auto Scaling group.

    Note

    You can set up to five actions for each alarm.

    To set the email address to which notifications will be sent when the alarm status changes, click on send an email notifications. Select the state of the alarm at which the notification should be sent, and specify the address to which it will be sent. The notification contains the time of state change, the reason for the change and other information.

    To assign a policy to the alarm, click on execute an Auto Scaling group policy. Select the state of the alarm at which the scaling policy should be executed, the group to which the policy belongs, and the policy itself. When the alarm goes to the predefined state, instances from the specified Auto Scaling group will be added or removed, depending on the conditions of the policy. Learn more about Auto Scaling group policies.

    Note

    A policy can be applied to a different group than the one whose metrics are controlled by the alarm. Moreover, you can assign a policy to the alarm even if the monitored resource does not belong to any Auto Scaling group. For example, you can monitor the metrics of an instance with a load balancer and, depending on its values, apply different policies to the group the load balancer serves.

    To add additional actions, click Add actions.

  4. After setting all the required parameters, click Create.

Alarm usage example#

If Number of periods is set to 1, Period duration is set to 3600 seconds, and statistics is set to Maximum, then the alarm will monitor the maximum value of the metric for the last hour.

If Number of periods is set to 12 and Period duration is set to 300 seconds, then the alarm will validate the maximum value of the metric every five minutes during the last hour. The alarm will be triggered only if the condition is met for all periods.

Note

By varying the number and duration of the periods, you can fine-tune the frequency of validating the metric values, depending on how critical, for example, processor load peaks are for your tasks. Note that the total duration of the periods must not exceed 24 hours.

For a more flexible alarm setup, use CloudWatch API.

Change an alarm#

  1. Go to the section Monitoring Alarms.

  2. In the resource table, select the alarm and click Modify.

  3. In the window that opens, edit the alarm parameters on the Parameters step.

    If you need to modify the metric parameters, go to Metrics tab by clicking Back. Edit the metric parameters and click Next to return to Parameters.

  4. If you need to set actions to be executed when an alarm state changes, click Set actions.

    To change the email address to which notifications will be sent when the alarm state changes, click on to send an email notification. You can also change the state of the alarm at which the notification should be sent, and the address to which it will be sent. To add another action, click Add action.

    To modify the assigned policy, click execute an Auto Scaling group policy. You can modify the alarm state in which the scaling policy should be executed, the group to which the policy belongs, and the policy itself. To assign additional actions, click Add action.

  5. Click Modify.

This operation can also be performed on the alarm page. To do this, go to the Information tab and click Modify.

Available alarms#

The list of all monitored alarms can be found in the Alarms subsection. For each alarm, the following parameters are shown:

  • State.

  • Alarm name.

  • Condition – an alarm triggering rule when it goes into the ALARM state.

  • Dimensions — the ID of the instance, volume, or Auto Scaling group for which this alarm was created.

Clicking the alarm name opens alarm page.

Information on an alarm#

There are two tabs on the alarm page: Information and History of Changes.

The Information tab#

This tab shows:

  • alarm state and the reason why it is in this state;

  • alarm parameters;

  • an interactive graph of the metric, which is monitored by the alarm;

  • controls used to change or delete the alarm.

The History of Changes tab#

This tab shows a list of alarm-related events. There may be three types of events:

  • alarm modification (creation, deletion, and change);

  • change in alarm state;

  • executed actions — sending an email notification or executing an Auto Scaling group policy.