I created Aurora Server Less DB Cluster (mysql5.10) on AWS.
then I enabled only slow query logs by setting keys in parameter cluster groups as -
slow_query_log : 1
long_query_time: 0.5
log_output: file
but In cluodWatch when I was looking for logs, I found logs-
Please help me to find out, is there a way to disable logs of rdsadmin from cloudwatch??
I could not find a clear answer on AWS site explaining which parameters are supported for RDS Serverless v1. After some quick test, I cant make the long_query_time
parameter work with Serverless. Maybe the cluster need to be restarted, or we need to recreate a parameter group ? https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.parameter-groups
My solution is to enable slow_query log (it works), and stream the log to CloudWatch Logs.
Then I query the log with CloudWatch Logs Insights with the following query (assuming you have selected the slow_query log stream) :
parse @message "Query_time: * Lock_time: * Rows_sent: * Rows_examined: *\n*" as Query_time,Lock_time,Rows_sent,Rows_examined,q
| filter Query_time > 0.250
It will display all query slower than 250ms.