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

pg_stat_monitor integration is broken with version 0.6.0 of the plugin

    XMLWordPrintable

    Details

      Description

      PMM allows to specify the query source as pg_stat_monitor

      sudo pmm-admin add postgresql username=pmm --password=pmm --query-source=pgstatmonitor

      This executes a query as follows against pg_stat_monitor view in PostgreSQL

      SELECT /* pmm-agent:pgstatmonitor */ "pg_stat_monitor"."bucket", "pg_stat_monitor"."bucket_start_time", "pg_stat_monitor"."userid", "pg_stat_monitor"."dbid", "pg_stat_monitor"."queryid", "pg_stat_monitor"."query", "pg_stat_monitor"."total_calls", "pg_stat_monitor"."total_time", "pg_stat_monitor"."effected_rows", "pg_stat_monitor"."shared_blks_hit", "pg_stat_monitor"."shared_blks_read", "pg_stat_monitor"."shared_blks_dirtied", "pg_stat_monitor"."shared_blks_written", "pg_stat_monitor"."local_blks_hit", "pg_stat_monitor"."local_blks_read", "pg_stat_monitor"."local_blks_dirtied", "pg_stat_monitor"."local_blks_written", "pg_stat_monitor"."temp_blks_read", "pg_stat_monitor"."temp_blks_written", "pg_stat_monitor"."blk_read_time", "pg_stat_monitor"."blk_write_time", "pg_stat_monitor"."client_ip", "pg_stat_monitor"."resp_calls", "pg_stat_monitor"."cpu_user_time", "pg_stat_monitor"."cpu_sys_time", "pg_stat_monitor"."tables_names" FROM "pg_stat_monitor" WHERE queryid IS NOT NULL AND query IS NOT NULL

      This query fails in PostgreSQL side because many of the columns (for example, total_calls, effected_rows, tables_names) are not existing any more in the pg_stat_monitor view.

      This result is agent in "waiting" status. For example.

      postgresql_pgstatmonitor_agent Waiting /agent_id/b31cd972-ca48-45c4-8e08-8f95baac2840 /service_id/afa49241-7f74-4495-bbef-30427262dc3d

       

      Suggested implementation:

      • If new docker images will be created
        • Create docker images for PostgreSQL with latest pg_stat_monitor for PG 11, PG 12 and PG 13
        • Use them in Travis CI matrix instead of current ones
      • If not
        • Remove PPG images from Travis CI matrix
      • Rename field names in pmm-agent.

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              andrii.skomorokhov Andrii Skomorokhov
              Reporter:
              jobin.augustine Jobin Augustine
              Votes:
              0 Vote for this issue
              Watchers:
              6 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 - 4 hours, 30 minutes
                  4h 30m

                    Smart Checklist