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

VictoriaMetrics agent does not collect some metrics from PostgreSQL exporter

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • 2.31.0
    • 2.31.0
    • PMM Sever 2.31.0 rc

      PMM Client 2.31.0 rc

      PostgreSQL 14.5

    • Yes
    • 1
    • Yes
    • Yes
    • No
    • [obsolete] Implex
    • Hide

      1. Run PMM Server and PMM Agent

      2. Run PostgreSQL database instance and add it to monitoring (change username/password and address/port please):
      $ pmm-admin add postgresql --username=postgres --password=postgres pg-local 127.0.0.1:5432

      3. Connect to PostgreSQL exporter web interface (e.g. 127.0.0.1:42002 - please check port on PMM Inventory or by $ pmm-admin list command) and click "Metrics" link

      • Page with metrics should be displayed

      4. Connect to VM agent web interface (e.g. 127.0.0.1:42002 - please check port on PMM Inventory or by $ pmm-admin list command) and click the "targets" link

      • Page with targets should be displayed

      5. Find PostgreSQL exporter by agent_id on "targets" page and click the Endpoint link

      • Page with metrics from PostgreSQL exporter, collected by VM agent, should be displayed

      6. Find following metrics on both pages (VM agent and PostgreSQL exporter):

      • pg_stat_bgwriter_checkpoint_write_time 
      • pg_stat_bgwriter_buffers_alloc
      • pg_stat_bgwriter_checkpoint_sync_time
      • pg_stat_bgwriter_buffers_backend_fsync
      • pg_stat_bgwriter_buffers_backend
      • pg_stat_bgwriter_buffers_clean
      • pg_stat_bgwriter_buffers_checkpoint

      Following metrics should be present on both pages (on VM agent and PostgreSQL exporter)

      Show
      1. Run PMM Server and PMM Agent 2. Run PostgreSQL database instance and add it to monitoring (change username/password and address/port please): $ pmm-admin add postgresql --username=postgres --password=postgres pg-local 127.0.0.1:5432 3. Connect to PostgreSQL exporter web interface (e.g. 127.0.0.1:42002 - please check port on PMM Inventory or by $ pmm-admin list command) and click "Metrics" link Page with metrics should be displayed 4. Connect to VM agent web interface (e.g. 127.0.0.1:42002 - please check port on PMM Inventory or by $ pmm-admin list command) and click the "targets" link Page with targets should be displayed 5. Find PostgreSQL exporter by agent_id on "targets" page and click the Endpoint link Page with metrics from PostgreSQL exporter, collected by VM agent, should be displayed 6. Find following metrics on both pages (VM agent and PostgreSQL exporter): pg_stat_bgwriter_checkpoint_write_time  pg_stat_bgwriter_buffers_alloc pg_stat_bgwriter_checkpoint_sync_time pg_stat_bgwriter_buffers_backend_fsync pg_stat_bgwriter_buffers_backend pg_stat_bgwriter_buffers_clean pg_stat_bgwriter_buffers_checkpoint Following metrics should be present on both pages (on VM agent and PostgreSQL exporter)

    Description

      User Impact:

      As a user of PMM Server I'm not able to get data on PostgreSQL / PostgreSQL Instances Overview page for following Dashboards:

      • Max Allocated Buffers
      • Total Written Files to disk
      • Total Files Synchronization to Disk

      Steps to reproduce:

      • Run PMM Server and PMM Agent
      • Run PostgreSQL database instance and add it to monitoring (change username/password and address/port please):
        • pmm-admin add postgresql --username=postgres --password=postgres pg-local 127.0.0.1:5432
      • Connect to PostgreSQL exporter web interface (e.g. 127.0.0.1:42002 - please check port on PMM Inventory or by $ pmm-admin list command) and click "Metrics" link
        • Page with metrics should be displayed
      • Connect to VM agent web interface (e.g. 127.0.0.1:42002 - please check port on PMM Inventory or by $ pmm-admin list command) and click the "targets" link
        • Page with targets should be displayed
      • Find PostgreSQL exporter by agent_id on "targets" page and click the Endpoint link
        • Page with metrics from PostgreSQL exporter, collected by VM agent, should be displayed
      • Find following metrics on both pages (VM agent and PostgreSQL exporter):
        • pg_stat_bgwriter_checkpoint_write_time 
        • pg_stat_bgwriter_buffers_alloc
        • pg_stat_bgwriter_checkpoint_sync_time
        • pg_stat_bgwriter_buffers_backend_fsync
        • pg_stat_bgwriter_buffers_backend
        • pg_stat_bgwriter_buffers_clean
        • pg_stat_bgwriter_buffers_checkpoint

      Actual result:

      Following metrics are present on PostgreSQL exporter metrics page, but not present on VM Agent metrics page for PostgreSQL exporter

      Expected result:

      Following metrics are present on both pages

       

       

      Attachments

        1. image-2022-09-14-15-40-18-590.png
          image-2022-09-14-15-40-18-590.png
          147 kB
        2. image-2022-09-15-15-43-47-799.png
          image-2022-09-15-15-43-47-799.png
          165 kB
        3. image-2022-09-15-15-43-50-376.png
          image-2022-09-15-15-43-50-376.png
          439 kB
        4. image-2022-09-15-15-43-58-096.png
          image-2022-09-15-15-43-58-096.png
          474 kB
        5. postgres_exporter_metrics.png
          postgres_exporter_metrics.png
          424 kB
        6. Snag_32c5cf7.png
          Snag_32c5cf7.png
          474 kB
        7. vmagent_collected_metrics.png
          vmagent_collected_metrics.png
          392 kB

        Activity

          People

            Unassigned Unassigned
            igor.cherkasov Ihor Cherkasov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Smart Checklist