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

There is no trigger in Template DB PostgreSQL that the number of backends connections to the database is large and close to the maximum

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 5.0.22
    • Templates (T)
    • VM, OS Gentoo Base System release 2.7, php7.4, postgresql-13.5, zabbix-server 5.0.22, zabbix-agent2

      Steps to reproduce:

      1. 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)
      2. In /var/lib/postgresql/13/data/postgresql.conf max_connections = 100
      3. Problem "Connections sum: Total number of connections is too high (over 90 in 5m)" not created, but problem mail received.
      4. 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.

            zit Zabbix Integration Team
            anyqov Alexey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: