Not the answer you need?
Register and ask your own question!

Hiding example queries in qan

TylerTyler EntrantCurrent User Role Beginner
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?

Comments

  • MykolaMykola Percona Percona Staff Role
    Hi Tyler,

    as quick solution you can disable QAN for some hosts by the following command
    pmm-admin remove mysql:queries
    
  • TylerTyler Entrant Current User Role Beginner
    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.
  • MykolaMykola Percona Percona Staff Role
    Hi Tyler,

    I need to consult with QAN developers, I will answer on Monday.
  • MykolaMykola Percona Percona Staff Role
    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___"
            )
        ;
    '
    
This discussion has been closed.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.