How do I use Enhanced Monitoring to create CloudWatch alarms to monitor my Amazon RDS SQL Server DB instance's memory usage?

3 分的閱讀內容
0

My Amazon Relational Database Service (Amazon RDS) SQL Server DB instance uses more memory than expected. I want to set an Amazon CloudWatch alarm to monitor how much memory SQL Server uses.

Short description

Activate Enhanced Monitoring for your RDS DB instance, and then create a CloudWatch alarm. Use Amazon Simple Notification Service (Amazon SNS) to receive notifications about SQL Server memory usage.

Resolution

This example uses the Enhanced Monitoring metric sqlServerTotKb to create a CloudWatch alarm. Amazon SNS then sends a notification about the memory that the Amazon RDS for SQL Server DB instance uses.

Complete the following steps:

  1. Open the CloudWatch console.
  2. In the navigation pane, choose Log groups.
  3. From the list of Log Groups, choose RDSOSMetrics.
  4. For Metric filters, choose Create Metric Filter.
  5. Enter a Filter Pattern for your RDS DB instance in the following format: {$.instanceID = "nameOfYourRDSInstance"}. For example, {$.instanceID="sqltest"}.
  6. 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. In the navigation pane, choose Databases. Choose your RDS DB instance, navigate to the Configuration tab, and find resource ID in the Instance section.
  7. Choose Next, and then enter a Filter name, such as MyFilter.
  8. Enter a Metric Namespace, such as EMMetric, and Metric name, such as SQLServerMemoryConsumption.
  9. Enter the metric value $.memory.sqlServerTotKb, and then choose Next.
  10. Choose Create Metric Filter.
  11. Select the metric filter, and then choose Create Alarm.
  12. From the Metrics section, verify the Namespace and Metric name, and then set the Period to 1 minute.
  13. From the Conditions section, enter the threshold conditions. For example:
    Threshold type: Static
    Whenever SQLServerMemoryConsumption is: Greater > threshold
    Threshold: 20971520
    Note: To specify 20 GiB as a threshold, enter the value in KiB. For example, 20971520 (20 * 1024 * 1024).
  14. Choose Next.
  15. From the Configure Action section, choose In Alarm.
  16. Select an SNS topic, or choose Create new topic. Use the email address where you want to receive alerts, and then choose Next.
  17. Enter an alarm name and description, and then choose Next. For example:
    Alarm name: RDS DB instance: SQLTEST: SQL Server Memory Usage > 20 GiB
    Alarm description: SQL Server Memory usage on your RDS DB instance is high
  18. From the Preview and Create page, verify the details of your alarm.
  19. Choose Create alarm.

You can view the alarm under Alarms on the CloudWatch console. When your SQL Server memory usage exceeds the defined threshold, your alarm enters the ALARM state and you receive an email notification.

2 評論

hey thanks for this , $.memory.sqlServerTotKb i, n my case i am not getting any data by using this metric value , how i can extract ??

回答 5 個月前

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
管理員
回答 5 個月前