Details

    • Type: Improvement
    • Status: New
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PMM Client, QAN Agent
    • Labels:
      None

      Description

      When adding mysql:queries service for QAN, by default (auto) pmm-admin seems to make the choice based on just local host vs remote host criteria, as we can see in https://github.com/percona/pmm-client/blob/master/pmm/mysql_queries.go :

       

      mr.QuerySource = mf.QuerySource
      if mr.QuerySource == "auto" {
      // MySQL is local if the server hostname == MySQL hostname.
      osHostname, _ := os.Hostname()
      if osHostname == mi.Hostname {
      mr.QuerySource = "slowlog"
      } else {
      mr.QuerySource = "perfschema"
      }
      }
      

      This leads to silently enabling slow log when pmm-admin runs on same host as monitored instance, even if for example P_S digesting was already enabled and slow log was disabled.

       

      In my opinion, pmm-admin should at minimum inform what source was chosen and why, and if slow log was enabled, inform about that - it is MySQL setting changed after all!

      Optimally, I think the auto mode should display what query logging is currently enabled, and suggest to choose either of them based on that.

      For example, if host is remote, likely the only source available will be P_S, and pmm-admin should print that one was used.

      If host is local, and both P_S and slow log are disabled, it should suggest enabling slow log, and also should suggest setting long_query_time to 1 second maybe (default 10 seconds is usually way too much). 

      If P_S digesting is already enabled, and slow log disabled, pmm-admin should ask if proceed with P_S. 

      If both are enabled, it should suggest using slow log (and adjusting long_query_time), but also warn that P_S query instrumentation is enabled as well.

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                przemyslaw.malkowski@percona.com Przemyslaw Malkowski
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: