How can I create CloudWatch alarms to monitor my Amazon RDS SQL Server DB instance’s memory consumption using Enhanced Monitoring?
My Amazon Relational Database Service (Amazon RDS) SQL Server DB instance is using more memory than expected. How can I set an Amazon CloudWatch alarm to monitor how much memory is consumed by SQL Server?
"My Amazon Relational Database Service (Amazon RDS) SQL Server DB instance is using more memory than expected. How can I set an Amazon CloudWatch alarm to monitor how much memory is consumed by SQL Server?Short descriptionAfter you enable Enhanced Monitoring for your RDS DB instance, you can create a CloudWatch alarm and use Amazon Simple Notification Service (Amazon SNS) to receive notifications about SQL Server memory consumption. This example uses the Enhanced Monitoring metric sqlServerTotKb to create a CloudWatch alarm and sends an SNS notification about the memory consumed by your Amazon RDS for SQL Server DB instance.ResolutionOpen the CloudWatch console, and then choose Log groups from the navigation pane.Filter for RDSOSMetrics from the list of Log Groups, select RDSOSMetrics. Navigate to Metric filters, and then choose Create Metric Filter.Enter a Filter Pattern for your RDS DB instance, such as {$.instanceID = "nameOfYourRDSInstance"}. For example, you can enter the RDS DB instance name {$.instanceID ="sqltest"}.From the Select Log Data to Test section, choose the resource ID of your RDS DB instance.Note: To find the resource ID of your RDS DB instance, open the Amazon RDS console, and then choose Databases from the navigation pane. Choose your RDS DB instance, and navigate to the Configuration tab. The resource ID appears in the Instance section.Select Next to assign a Filter name.Filter name: MyFilterEnter a Metric Namespace and Metric Name. See the following example:Metric Namespace: EMMetricMetric Name: SQLServerMemoryConsumptionEnter the metric value $.memory.sqlServerTotKb and then choose Next.Choose Create Metric Filter. A custom metric with the name specified is created. This metric reports the Enhanced Monitoring data in a CloudWatch graph.Select the Metric Filter, and then choose Create Alarm.From the Metrics section on the next page, verify the Namespace and Metric name, and then set the Period to 1 minute.From the Conditions section, define the threshold of the metric alarm. See the following example:Threshold type: StaticWhenever SQLServerMemoryConsumption is: Greater > thresholdThen: Enter 20971520Note: To specify 20 GiB as a threshold, enter the value in KiB. For example, 20971520 (20 * 1024 * 1024).Choose Next.From the Configure Action section, choose In Alarm.Select an SNS topic, or choose Create new topic using the email address where you want to receive alerts, and then choose Next.Enter an alarm name and description and choose Next. See the following example:Alarm name: RDS DB instance: SQLTEST: SQL Server Memory Consumption> 20 GiBAlarm description: SQL Server Memory consumption on your RDS DB instance is highFrom the Preview and Create page, verify the details of your alarm.Choose Create alarm.After the alarm is created, you can view it under Alarms on the CloudWatch console. Whenever your SQL Server memory usage exceeds the defined threshold, your alarm enters the ALARM state and you receive an email notification.Follow"