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

Query analytics not working

kumargsvnkumargsvn ContributorCurrent User Role Novice
slow query log enabled in db, however still getting below error in PMM- Query_analytics

QAN API error: "qh.Profile: No query classes for selected instance and time range. Please check whether your MySQL settings match the recommended.".
Check the /var/log/qan-api.log file in docker container for more information.

Comments

  • MykolaMykola Percona Percona Staff Role
    Hi kumargsvn,

    The root of the issue: no queries for analyzing.
    please configure mysql settings according to this page https://www.percona.com/doc/percona-monitoring-and-management/conf-mysql.html
  • kumargsvnkumargsvn Contributor Current User Role Novice
    Hi Mykola

    Thanks for your help. Going through the variables mentioned in the above page, the log_slow_slave_statements variables should be set in the slave instance, right? or can we set in master side also?
  • Michael CoburnMichael Coburn Principal Architect, Percona Percona Staff Role
  • kumargsvnkumargsvn Contributor Current User Role Novice
    ok, got it. thanks for the info, Michael.
  • kumargsvnkumargsvn Contributor Current User Role Novice
    And one question regarding upgrade, I have upgraded the pmm server from 1.1.1 to 1.2.0
    However the pmm-data still showing as 1.1.1

    [[email protected] docker]# docker ps -a
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    1aaff75d9412 percona/pmm-server:1.2.0 "/opt/entrypoint.sh" 8 minutes ago Up 46 seconds 443/tcp, 0.0.0.0:8080->80/tcp pmm-server
    7df251682e28 percona/pmm-server:1.1.1 "/bin/true" 5 months ago pmm-data

    I have used below commands to upgrade:
    docker ps -a
    docker stop pmm-server && docker rm pmm-server
    docker run -d \
    -p 8080:80 \
    --volumes-from pmm-data \
    --name pmm-server \
    --restart always \
    percona/pmm-server:1.2.0
  • kumargsvnkumargsvn Contributor Current User Role Novice
    And also I have upgraded the client using yum update,

    When I opened query analytics page, it is giving below error.

    QAN API error: "qh.Profile: No query classes for selected instance and time range. Please check whether your MySQL settings match the recommended.".
    Check the /var/log/qan-api.log file in docker container for more information.
  • MykolaMykola Percona Percona Staff Role
    Hi kumargsvn
    And one question regarding upgrade, I have upgraded the pmm server from 1.1.1 to 1.2.0
    However the pmm-data still showing as 1.1.1
    it is expected, pmm-data container save all your data.
    so if you remove/update it - you lose your data.
    1.2.0 is fully compatible with all pmm-data versions >= 1.0.7
    QAN API error: "qh.Profile: No query classes for selected instance and time range. Please check whether your MySQL settings match the recommended.".
    It is absolutely the same issue as before: no queries for analyzing.
    you have two ways:
    1. use recommended settings for slowlog from documentation https://www.percona.com/doc/percona-monitoring-and-management/conf-mysql.html
      please note that mysql restart is needed.
    2. you can use performance schema as query source. please find screenshot below
  • kumargsvnkumargsvn Contributor Current User Role Novice
    Thanks Mykola,
    Thanks for the your help. Before upgrade as suggested I have updated/changed the variables dynamically and it worked fine with slowlog option. However after upgrade it is giving the error which I had reported.
  • MykolaMykola Percona Percona Staff Role
    do you see queries in slow log?
    if yes, can you find query date/time in log and choose this time period in QAN interface?

    can you try to use performance schema as query source?
  • kumargsvnkumargsvn Contributor Current User Role Novice
    yes, I have selected 3h, 12h and 5d interval. I have tried to change the query source as "performance schema" but no luck..
  • MykolaMykola Percona Percona Staff Role
    kumargsvn
    can you share the following logs?
    1. from docker
    2. from pmm-client
    also can you restart qan-agent on pmm-client?
    pmm-admin restart mysql:queries
    
  • kumargsvnkumargsvn Contributor Current User Role Novice
    Hi Mykola,

    pmm-admin restart mysql:queries worked. Thank you.


    Is there a way to upgrade pmm-data container to latest version to match with pmm-server, without losing the data ?
Sign In or Register to comment.

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