-
Change Request
-
Resolution: Fixed
-
Medium
-
6.0.21, 6.4.6, 7.0.0alpha4
-
None
-
zabbix_server 6.0.21
zabbix_agent2 6.0.21
Debian 12 Bookworm
PgBouncer 1.18.0 (default Debian repo)
postgresql-15 15.3-0+deb12u1 (default Debian repo)
AlmaLinux 9.2 (Turquoise Kodkod)
PgBouncer 1.20.1 (epel)
PostgreSQL: postgresql-server-15.3-1.module_el9.2.0+32+f3c125b5.x86_64 (from dnf module v15)zabbix_server 6.0.21 zabbix_agent2 6.0.21 Debian 12 Bookworm PgBouncer 1.18.0 (default Debian repo) postgresql-15 15.3-0+deb12u1 (default Debian repo) AlmaLinux 9.2 (Turquoise Kodkod) PgBouncer 1.20.1 (epel) PostgreSQL: postgresql-server-15.3-1.module_el9.2.0+32+f3c125b5.x86_64 (from dnf module v15)
-
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
- causes
-
ZBX-23837 zabbix-agent2 upgrade saturates postgres connections for monitoring
- Closed