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

Again: Error 1054: Unknown column 'performance_schema.events_statements_summary_by_digest.QUERY_SAMPLE_TEXT' in 'field list'

Details

    • Bug
    • Status: Done
    • Critical
    • Resolution: Fixed
    • 2.27.0, 2.28.0
    • 2.29.0
    • PMM Agent
    • Debian 11

    • 2
    • Yes
    • Yes
    • C/S Core

    Description

      User impact:

      pmm-agent.log is cluttered with 'Unknown column...' errors when MariaDB from Debian package (10.2, 10.3, 10.4, 10.5) is added to monitoring

      STR:

      Install PMM Server and Client
      Add MariaDB to PMM

      docker run --name
      mariadb10.4 -e MYSQL_ROOT_PASSWORD=pass -p 3309:3306
      -p 33062:33060 -d mariadb:10.4 --performance-schema=1
      
      pmm-admin add mysql
      --username=root --password=pass --query-source=perfschema mariadb10.4
      127.0.0.1:3309

      Check pmm-agent.log

      Result:

      ERRO[2021-06-03T13:25:06.059+00:00] failed to query events_statements_summary_by_digest: Error 1054: Unknown column 'performance_schema.events_statements_summary_by_digest.QUERY_SAMPLE_TEXT' in 'field list'  agentID=/agent_id/bb5efe0c-12b1-4d65-a137-213f44fb18ed component=agent-builtin type=qan_mysql_perfschema_agent
      ERRO[2021-06-03T13:25:11.059+00:00] failed to query events_statements_summary_by_digest: Error 1054: Unknown column 'performance_schema.events_statements_summary_by_digest.QUERY_SAMPLE_TEXT' in 'field list'  agentID=/agent_id/bb5efe0c-12b1-4d65-a137-213f44fb18ed component=agent-builtin type=qan_mysql_perfschema_agent
      ERRO[2021-06-03T13:25:16.059+00:00] failed to query events_statements_summary_by_digest: Error 1054: Unknown column 'performance_schema.events_statements_summary_by_digest.QUERY_SAMPLE_TEXT' in 'field list'  agentID=/agent_id/bb5efe0c-12b1-4d65-a137-213f44fb18ed component=agent-builtin type=qan_mysql_perfschema_agent
      ERRO[2021-06-03T13:25:21.059+00:00] failed to query events_statements_summary_by_digest: Error 1054: Unknown column 'performance_schema.events_statements_summary_by_digest.QUERY_SAMPLE_TEXT' in 'field list'  agentID=/agent_id/bb5efe0c-12b1-4d65-a137-213f44fb18ed component=agent-builtin type=qan_mysql_perfschema_agent
      

      How to test.

      Acceptance criteria

      Scenario: Adding a MariaDB instance from a Debian distro, using Performance Schema as the source for QAN
      When: Add a MariaDB instance from a Debian distro using performance_schema as the query source for QAN
      Then: The proper query should be executed to get queries from perf_schema
      And: In the pmm-agent log there shouldn't be any errors like this:
      Error 1054: Unknown column 'performance_schema.events_statements_summary_by_digest.QUERY_SAMPLE_TEXT'

      How to test example

      1. Start PMM server.
      2. Start a MariaDB instance from a Debian distribution.
      For my tests I started a Debian docker container and then manually installed MariaDB inside it.

      3. Get your local IP address to use it when adding the MariaDB instance to PMM

      (hostname -I | awk '{print $1}'
      

      4. Config pmm-admin inside the pmm-server docker container.

      docker exec pmm-server pmm-admin config --server-insecure-tls --server-url=https://admin:[email protected]:443
      

      5. Add the MariaDB instance

      docker exec pmm-server pmm-admin add mysql --host <IP from step 3> --port 3306 --username=root --password=root --service-name=maria102 --query-source=perfschema
      

      6. Check there are no errors in the log (the output should be empty).

      docker exec pmm-server cat /srv/logs/pmm-agent.log | grep -i QUERY_SAMPLE_TEXT
      

      Solution:
      Check if vendor is Debian, and the version string has mariadb, set vendor as mariadb

      case strings.Contains(strings.ToLower(ven), "debian") && strings.Contains(strings.ToLower(ver), "mariadb"):
      		vendor = "mariadb"
      

      Attachments

        1. docker-compose.yml
          2 kB
          Vadym Yarosh
        2. Dockerfile
          0.7 kB
          Vadym Yarosh

        Issue Links

          Activity

            People

              carlos.salguero Carlos Salguero
              IZSkiSurfer Ingo Zansinger
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist