Aurora RDS Postgres DB alerts by query execution latency

0

Hi fam,

I have this requirement, DB alerts by query execution latency , this means we need to set alarm one of our query running more that 5 second. but i did not find any metric regarding this.

layansp
質問済み 5ヶ月前188ビュー
1回答
1
承認された回答

Hello.

As you may know, RDS metrics do not include metrics related to slow queries.
So, enable query logging for RDS PostgreSQL and change "log_statement" to 1 in the RDS parameter group.
Also, by setting the value of "log_min_duration_statement" to 5000, queries that take more than 5 seconds to execute will be output to the log.
Please set the type of query you want to output to the log with the value of "log_statement".
https://repost.aws/knowledge-center/rds-postgresql-query-logging

After outputting to CloudWatch Logs, you can create metrics by using a metric filter, etc., and then you can create alarms.

profile picture
エキスパート
回答済み 5ヶ月前
profile picture
エキスパート
レビュー済み 1ヶ月前
  • thank you so much Riku, its work

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ