Details
-
Problem report
-
Status: Confirmed
-
Trivial
-
Resolution: Unresolved
-
5.0.22
-
None
-
VM, OS Gentoo Base System release 2.7, php7.4, postgresql-13.5, zabbix-server 5.0.22, zabbix-agent2
Description
Steps to reproduce:
- Zabbix 5.0.22. Configure "Template DB PostgreSQL by Zabbix agent 2" on the host (https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/postgresql_agent2?at=refs%2Fheads%2Frelease%2F5.0)
- In /var/lib/postgresql/13/data/postgresql.conf max_connections = 100
- Problem "Connections sum: Total number of connections is too high (over 90 in 5m)" not created, but problem mail received.
- In /var/lib/postgresql/13/data/postgresql.conf max_connections = 150
Result:
1. With the postgresql setting (in /var/lib/postgresql/13/data/postgresql.conf) max_connections = 100:
Values received "Dbstat: Backends connected" (key pgsql.dbstat.sum.numbackends) = 97
Values received "Connections sum: Total" (key pgsql.connections.total) = 4
Values received "Connections sum: Total %" (key pgsql.connections.total_pct) = 4 % (4/100=4%)
The problem "Connections sum: Total number of connections is too high (over 90 in 5m)" is created when:
{postgresql-1:pgsql.connections.total_pct.min(5m)}
> 90 |
But I received an email and a log message:
"PostgreSQL database "zabbix" on "localhost" is not available: IMPORTANT: remaining connection slots are reserved for non-replication superuser connections".
The parameter "Connections sum: Total %" and the trigger "Connections sum: Total number of connections is too high (over 90 in 5m)" are not informative in this case.
2. With the postgresql setting (in /var/lib/postgresql/13/data/postgresql.conf) max_connections = 150:
Values received "Dbstat: Backends connected" (key pgsql.dbstat.sum.numbackends) = 110
Values received "Connections sum: Total" (key pgsql.connections.total) = 4
Values received "Connections sum: Total %" (key pgsql.connections.total_pct) = 2 % (4/150=2,666%)
Expected:
With the postgresql setting max_connections = 100 see the problem on the dashboard that the number of connections to the database is high and close to the maximum (97/100=97%). But there is no such trigger in the template.