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

Update Postgresql Template to support postgresql 12

    XMLWordPrintable

    Details

    • Team:
      Team INT
    • Sprint:
      Sprint 65 (Jun 2020), Sprint 66 (Jul 2020), Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021), Sprint 74 (Mar 2021)
    • Story Points:
      0.1

      Description

      Steps to reproduce:

      1. Install postgresql 12
      2. Add official postgresql monitoring https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/postgresql

      Result:

      In postgresql log we see constantly

      2020-06-24 17:21:22 EEST ERROR: field name must not be null
      2020-06-24 17:21:22 EEST STATEMENT: SELECT json_object_agg(datname, row_to_json(T)) FROM (
       SELECT datname,
       numbackends,
       xact_commit,
       xact_rollback,
       blks_read,
       blks_hit,
       tup_returned,
       tup_fetched,
       tup_inserted,
       tup_updated,
       tup_deleted,
       conflicts,
       temp_files,
       temp_bytes,
       deadlocks
       FROM pg_stat_database) T

      Expected:
      no entries in the logs

      The reason is that in Postgresql 12 the pg_stat_database
      has one more line that is agregate for all databases

      The pg_stat_database view will contain one row for each database in the cluster, plus one for the shared objects, showing database-wide statistics.

      The fix is prety easy ... just add WHERE datname IS NOT NULL in pgsql.dbstat.sql

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abakaldin Alexander Bakaldin
              Reporter:
              zeridon Vladimir Vitkov
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: