Monitoring the growth of individual postgres tables

0

We have an RDS db that contains multiple large postgres tables. Need to monitor how fast the tables grow (how many rows are inserted each day, and total size). We've been doing it manually by running SQL-queries, but want to make an automated report.

As a beginner (who's only used RDS & IAM) I suspect that I should use Lambda to run the SQL, and set up metrics in CloudWatch. Could use some general advice & pointers to get started. In example: Is there a suitable Lambda function blueprint I can use, or would I need to author one from scratch? Should I start by making a new dashboard in CloudWatch?

If someone could suggest a brief step-by-step list of what I'd need to do, that'd be very helpful.

1개 답변
0

If you were using Aurora Postgres instead of RDS Postgres, you could have used Database Activity Streams - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/DBActivityStreams.html

It sends all database activity including DDL, DML and DQL commands to a Kinesis Data Stream. You can take a look at this blog to see how to use the Activity Streams data for further processing.

Cloudwatch metrics for RDS does not offer anything like your requirement - https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-metrics.html

You can possibly look at building custom metrics if you want to go the Cloudwatch metrics route - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html

profile pictureAWS
전문가
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠