alerts for blocking locks on RDS Postgresql or Aurora Postgresql

0

Looking for a solution to create an alert for blocking locks in Aurora Postgres or RDS postgres. Has anyone done this and how did you accomplish this?

Thanks!

Jeremy

asked 8 months ago773 views
2 Answers
0

Hi Jeremy, have you tried this?

  1. Enabling Enhanced Monitoring: Start by enabling Enhanced Monitoring for your RDS or Aurora instance. You can enable Enhanced Monitoring when creating a new instance or modify an existing one. You can select the desired granularity level (e.g., 1 second, 10 seconds, etc.) depending on your needs.

  2. Set up CloudWatch Alarms: Once Enhanced Monitoring is enabled, you can set up CloudWatch Alarms to monitor for blocking locks. In the metrics list, search for the relevant metric related to locks. It might be under the "Database" or "PostgreSQL" namespace, and the metric name might contain "lock" or "blocking." Define your threshold for the alarm.

  3. Set Up Actions: Define actions to take when the alarm state is triggered. Common actions include sending notifications through Amazon SNS (Simple Notification Service), executing an AWS Lambda function, or running a custom script.

  4. Notification Configuration: Configure your notification targets (e.g., email, SMS, or a webhook) to receive alerts when the alarm state changes (e.g., from OK to ALARM).

[Blog Post Link that might help] https://aws.amazon.com/blogs/database/monitor-amazon-rds-for-postgresql-and-amazon-aurora-for-postgresql-database-log-errors-and-set-up-notifications-using-amazon-cloudwatch/

  1. Publish the PostgreSQL log to CloudWatch Logs.
  2. Create an SNS topic.
  3. Create an SNS subscription.
  4. Create a metric filter on the log group in CloudWatch Logs.
  5. Create an alarm in CloudWatch.
AWS
answered 8 months ago
  • Blocking locks are not reported in cloudwatch. I've looked into this extensively already.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions