Description:
You can specify what actions an alarm takes when it changes state between the OK, ALARM, and INSUFFICIENT_DATA states. The most common type of alarm action is to notify one or more people by sending a message to an Amazon Simple Notification Service topic.
Rationale:
A metric alarm has the following possible states:
OK
– The metric or expression is within the defined threshold.ALARM
– The metric or expression is outside of the defined threshold.INSUFFICIENT_DATA
– The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.
Impact:
Cloud Watch doesn't test or validate the actions that you specify, nor does it detect any Amazon EC2 Auto Scaling or Amazon SNS errors resulting from an attempt to invoke nonexistent actions. Make sure that your alarm actions exist.
Default Value:
cloud watch alarm default value is disabled.
Pre-requisites:
make sure at least one cloudwatch alarm exists
Audit:
Open the Cloud Watch console at https://console.aws.amazon.com/cloudwatch/.
In the navigation pane, choose Alarms, All alarms.
Choose to Create an alarm.
Choose Select Metric.
- In the Metric Name column, verify each alarm available for the EC2instance metric parameter name. If the EC2 instance metric is not used by any of your existing alarms, the configuration changes made to your EC2 are not monitored using Amazon Cloud Watch
Remediation:
Implementation Steps:
Step 1:Open the Cloud Watch console at https://console.aws.amazon.com/cloudwatch/.
Step 2:In the navigation pane, choose Alarms, All alarms.
Step 03:Choose Create alarm.
Step 04:Choose Select Metric.
Step 05: After selecting metric, you can select define alarm
Step 06::In the Actions section, click the Notification button, select State is ALARM from the Whenever this alarm dropdown menu, and choose the AWS SNS topic name created at Step 1 from Send notification to.
Step07:In the Alarm Preview section, select Minutes from the Period dropdown list and Sum from the Statistic list.
Step 08:Review the Cloud Watch alarm configuration details then click Create Alarm.
Using AWS CLI:
This command is used to describe the Cloudwatch metrics
aws cloudwatch describe-alarms-for-metric --region us-east-1 --metric-name EC2 Intances EventCount --namespace CloudTrailMetrics
Back out Plan:
If you want to remove or delete then to select the metric, follow the below steps:
Open the Cloud Watch console at https://console.aws.amazon.com/cloudwatch/
In the navigation pane, choose Alarms.
Select the check box to the left of the name of the alarm, and choose Actions, choose Delete.
Reference