Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-6336

Incompatible pmm-admin options: '--disable-queryexamples' and '--query-source=perfschema'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.10.0
    • Component/s: QAN API
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      Platform Sprint 23
    • Needs Review:
      Yes
    • Needs QA:
      Yes

      Description

      Issue:

      --disable-queryexamples Disable collection of query examples

      In case of user doesn't want to show a query example which has "Sensitive Data" on PMM Query Analytics UI  they can disable it with the help of --disable-queryexamples  option in pmm-admin.

      But this option is not working as expected when mysql instance added using {{ --query-source perfschema}}  option and on PMM Query Analytics UI  query Examples is visible with original data.

      we do not see this issue when using --query-source slowlog 

      Reproduciable Testcase:

      PMM 2.9.0

      # pmm-admin add mysql PS_5730 127.0.0.1:5730 --username=msandbox --password=msandbox --query-source perfschema --disable-queryexamples
      MySQL Service added.
      Service ID : /service_id/2cb4c1a3-5b16-47a5-8688-b5b1e38450b5
      Service name: PS_5730
      Table statistics collection enabled (the limit is 1000, the actual table count is 309).
      PS 5.7.30:
      create table t1(c1 int, c2 varchar(100));
      insert into t1 values(552436,'userData');
      insert into t1 values(552437,'userData-2');
      insert into t1 values(652437,'userData-5');
      

       

       

       

      Suggested solution:
      We don't pass disablequeryexamples value here https://github.com/percona/pmm-agent/blob/859220fb454b9990a8e8851b93f2fa4bbad64046/agents/mysql/perfschema/perfschema.go#L80

       

      Working fine with  --query-source slowlog 

       

      # pmm-admin add mysql PS_5730 127.0.0.1:5730 --username=msandbox --password=msandbox --query-source slowlog --disable-queryexamples
      MySQL Service added.
      Service ID : /service_id/64324742-cdda-45b4-8221-861651290466
      Service name: PS_5730
      Table statistics collection enabled (the limit is 1000, the actual table count is 310).
      create table t100 (c1 int, c2 varchar(100));
      insert into t100 values(552436,'userData');
      insert into t100 values(452436,'userData-3');
      insert into t100 values(4524436,'userData-8');
      

       

       

        

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned
                Reporter:
                lalit.choudhary Lalit Choudhary
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 5 hours
                    5h