How can we prevent PMM queries from appearing in the RDS MySQL slow query log?

Description:

  • we have around 2000 rds mysql instance being monitored by the PMM
  • we have set the long_query_time set to 1 sec
  • some times the pmm queries also get logged in the slow query log , which we dont want.
  • how we can avoid the pmm queries get logged in the rds slow query log.

Steps to Reproduce:

we tried “–extra-dsn-params="long_query_time=999999” but not helping .

Version:

percona/pmm-server:3
Pmm-admin version : Version: 3.5.0

Expected Result:

  • pmm queries should not get logged in the slow query log

Actual Result:

  • currently the pmm queries are getting logged in the slow query log

Hi,

For us to be able to narrow down the scope, could you please give a couple examples of queries you don’t want to be logged?

Hi Srinivasms, welcome to the forum.

I don’t think we have this possibility. Once you set log_query_time=1, queries that reach this value will be collected in the MySQL slow query log file. If these queries are not desired for your analysis, you can ignore, for example, using –filter in pt-query-digest.

pt-query-digest --filter '(defined $event->{user} ? $event->{user} : "") !~ m/pmm/' mysql-slowquery.log > mysql-slowquery.digested.log

Best regards,

Aldo