Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-25487

Postgres monitoring via agent2 plugin does not reflect changes in postgres 17 statistics views

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.5
    • Agent2 plugin (N)
    • None
    • Zabbix 7.0.5 on RHEL9, agent2 monitoring of postgres 17

      Steps to reproduce:

      1. Setup postgres monitoring via agent2 usinz Zabbix standard template as usual
      2. The master item "PostgreSQL: Get bgwriter" become unsupported with error message "Cannot fetch data: ERROR: column "checkpoints_timed" does not exist (SQLSTATE 42703)."

      Probable cause:

      The postgres statistics view "pg_stat_bgwriter" no longer contains checkpoint related stats. These stats has been moved into newly introduced stats view "pg_stat_checkpointer"

      See postgres docs for details:
      https://www.postgresql.org/docs/16/monitoring-stats.html#MONITORING-PG-STAT-BGWRITER-VIEW

      https://www.postgresql.org/docs/17/monitoring-stats.html#MONITORING-PG-STAT-BGWRITER-VIEW

      https://www.postgresql.org/docs/17/monitoring-stats.html#MONITORING-PG-STAT-CHECKPOINTER-VIEW

       

      Example from postgres 16:

      zabbix=# select * from pg_stat_bgwriter;
       checkpoints_timed | checkpoints_req | checkpoint_write_time | checkpoint_sync_time | buffers_checkpoint | buffers_clean | maxwritten_clean | buffers_backend | buffers_backend_fsync | buffers_alloc |          stats_reset
      -------------------+-----------------+-----------------------+----------------------+--------------------+---------------+------------------+-----------------+-----------------------+---------------+-------------------------------
                   63141 |              19 |           17035937552 |              1541265 |         1705306581 |      22714679 |           167344 |        56214268 |                     0 |     294692381 | 2024-03-26 10:28:56.398235+01
      (1 row)
       

      Example from postgres 17

      zabbix=# select * from pg_stat_bgwriter;
       buffers_clean | maxwritten_clean | buffers_alloc |          stats_reset
      ---------------+------------------+---------------+-------------------------------
                   0 |                0 |         41482 | 2024-10-31 14:59:30.032494+01
      (1 row)
       

      Expected:
      Please add support for postgres 17 to both agent2 plugin and respective template.

            zit Zabbix Integration Team
            kbelunek Karel Bělunek
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: