Set Up an SNS Topic
Open SNS Console
Log into the AWS Management Console and navigate to Amazon SNS section.
Create SNS Topic
Click Create topic.
Choose Standard as the topic type.
Give your topic a name (e.g.,
RDS-Alerts
), then click Create topic.
Subscribe Email to SNS Topic
Once the topic is created, select the topic from the list.
Click Create subscription.
For Protocol, select Email.
Enter your email address in the Endpoint field where notifications will be sent.
Click Create subscription.
Confirm Subscription
Check your email for a confirmation message from AWS.
Click on the confirmation link to activate the subscription.
Create CloudWatch Alarm for RDS
Open CloudWatch Console
Log into the AWS Management Console and navigate to CloudWatch.
Create Alarm
In the CloudWatch dashboard, click on Alarms from the left-hand menu, then click Create alarm.
Select a Metric
Click on Select metric.
Navigate to RDS > Per-Database Metrics > DBInstanceIdentifier to choose a specific database.
Select a relevant metric (e.g., CPU Utilization, Free Storage Space, Read IOPS, Write IOPS).
Define Alarm Conditions
Set the Threshold type as either Static or Anomaly detection.
Choose the condition type:
For static thresholds, define a custom value, such as “CPU utilization > 80%”.
For anomaly detection, select the metric and let CloudWatch detect the anomaly.
Configure Actions
Under the Actions section, choose Send a notification to an SNS topic.
Select the SNS topic you created earlier (e.g.,
RDS-Alerts
).
Set Alarm Name and Description
Name your alarm (e.g.,
RDS-CPU-High-Usage
).Optionally, you can add a description that dynamically includes the database name using
${DBInstanceIdentifier}
.
Review and Create
Review your alarm configuration and click Create alarm.
Common Metrics for RDS CloudWatch Alarms
CPUUtilization: Monitor high CPU usage.
FreeableMemory: Ensure your database has enough memory (RAM) available
FreeStorageSpace: Ensure your database has enough storage available.
DatabaseConnections: Track the number of open connections.
ReadIOPS / WriteIOPS: Monitor read and write I/O operations per second.
ReadLatency / WriteLatency:Monitor delays in read/write operations.
ReplicaLag: Monitor replication lag in a read-replica.
...
Page Tree | ||||||
---|---|---|---|---|---|---|
|