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

QAN agent - PMM Server - ERROR pg_stat_statements

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: PMM Server
    • Labels:
      None

      Description

      I'm seeing this line repeating every minute in /srv/logs/pmm-agent.log inside PMM server container

       

      {{[root@0b1aab8f29fc logs]# tail -f pmm-agent.log }}
      ERRO[2019-12-18T13:55:00.002+00:00] failed to query pg_stat_statements: pq: relation "pg_stat_statements" does not exist agentID=/agent_id/092fc55a-f719-4e2e-b88b-a6f7d9c221cb component=agent-builtin type=qan_postgresql_pgstatements_agent

       

      Similar error can be seen in postgresql.log

      Looking a bit deeper, I also see connections to "postgres" database.

      And in that database the extension is not installed

      [root@0b1aab8f29fc logs]# su - postgres
      Last login: Wed Dec 18 13:03:02 UTC 2019
      -bash-4.2$ psql
      psql (11.5)
      Type "help" for help.postgres=# SELECT * FROM pg_available_extensions WHERE name = 'pg_stat_statements';
      {{ name | default_version | installed_version | comment }}
      ---------------------------------------------------+----------------------------------------------------------
      {{ pg_stat_statements | 1.6 | | track execution statistics of all SQL statements executed}}
      (1 row)

       

      Installing the extension make the error line stop appearing.

      But the solution would be configure correctly the qan agent in the pmm-server:2 docker image so it connects always to "pmm-managed" and not to the empty "postgres".

       

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              fmbiete Francisco Miguel Biete Banon
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: