AWS CloudWatch Alarm
Creating a CloudWatch Alarm to Automatically Trigger an SSM Runbook on MySQL Cluster Failures
To set up a CloudWatch Alarm for automatically triggering an SSM Runbook when your MySQL cluster experiences issues, follow these steps:
-
Access the CloudWatch Service Dashboard.
- Open the AWS dashboard and select CloudWatch from the list of services.
-
Create a New Alarm:
- In the CloudWatch dashboard’s left panel, select Alarms -> All alarms.
- Click Create alarm.

- Select a Metric:
- Click on select metric.
- In the AWS namespaces, search and select NetworkELB.

- Choose Target Group Metric:
- Under Metrics, select Target Group Metrics.

- Select Specific Metric:
- Find and select the UnHealthyHostCount metric for the Network ELB in use.
- Click Select metric.

- Set the Threshold:
- Choose Static as the Threshold type.
- Select Greater than….
- Enter the value as 1.

- Configure Notifications:
- In the Notification section, select Create new topic.
- Name the topic mysql-failover-topic and enter an email for notifications.

- Select System Manager Action:
- In System Manager action, choose create Incident.
- Select the previously created response plan mysql-failover-plan.

- Complete the Setup:
- Click Next, name the alarm mysql-cluster-failed-alert.
- Click Next again, review the settings, and then click Create alarm.


By following the above steps, you can set up an alarm to automatically trigger a response for MySQL cluster issues.