Hiding example queries in qan

I’m trying to figure out how to hide example queries in qan for all hosts. I unchecked the "Send real query examples" option in the management gui but qan is still showing them.

Ideally I’d like to do this on a client-by-client basis in the config.yml file…is this possible?

Hi Tyler,

as quick solution you can disable QAN for some hosts by the following command

pmm-admin remove mysql:queries

oh noes! I need QAN, just wanted to open it up to some developers who shouldn’t be able to see production data.

Maybe a feature request for next release.

Hi Tyler,

I need to consult with QAN developers, I will answer on Monday.

Hi,

I created ticket for this issue: https://jira.percona.com/browse/PMM-546

Anyway workaround exists:

  1. you can disable “Send real query examples” for required instance
  2. wait 1-2 minutes for reconfiguration.
  3. run the following commands on docker server

docker exec -it pmm-server /usr/bin/mysqldump pmm query_examples > /tmp/backup-query_examples.sql
docker exec -it pmm-server /usr/bin/mysql -e '
DELETE
FROM pmm.query_examples
WHERE instance_id IN (
SELECT i.instance_id
FROM pmm.instances i
WHERE i.subsystem_id=3
AND i.name="___INSTANCE_NAME___"
)
;
'