An ability to control statements cache and query execution mode parameters in PostgreSQL plugin of Zabbix agent 2

XMLWordPrintable

    • Type: Change Request
    • Resolution: Fixed
    • Priority: Medium
    • Affects Version/s: 6.0.21, 6.4.6, 7.0.0alpha4
    • Component/s: Agent2 plugin (G)
    • None
    • Environment:
    • Sprint 106 (Nov 2023), Sprint 107 (Dec 2023)
    • 1

      During the work on the ZBX-18938 it was noted that the plugin uses prepared statements enabled by default, which breaks monitoring of PostgreSQL instances through PgBouncer (most likely other proxying/pooling alternatives will be affected as well).

      To reproduce the issue:

      1) Install PostgreSQL.
      2) Install PgBouncer and set it to the transaction pooling mode by default.
      3) Install Zabbix server/frontend, use the PgBouncer socket file or port for the connection.
      4) Install Zabbix agent 2, set up the host for monitoring.
      5) At first, monitoring will work normally. Now restart the postgresql service - in Zabbix server log you'll see 'prepared statement "lrupsc_*" does not exist (SQLSTATE 26000)' errors like described in ZBX-18938.
      6) Restart either the pgbouncer or zabbix-agent2 service - the problem will go away.

      So we should probably consider the addition of plugin parameters that will allow to control this behaviour (for all connections by default and per named session as well): https://pkg.go.dev/github.com/jackc/pgx/v5#ConnConfig

            Assignee:
            Eriks Sneiders
            Reporter:
            Denis Rasikhov (Inactive)
            Team INT
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: