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

PostgreSQL monitoring using zabbix-agent2 5.0.8 with pgbouncer does not work

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Workaround proposed
    • Icon: Trivial Trivial
    • None
    • 5.0.8
    • Server (S), Templates (T)
    • None
    • SLES 15.01 Postgresql 12

      Hello.
      The Template DB PostgreSQL Agent 2 version 0.38 template does not work with the {$PG macro.URI} - /var/run/postgresql/.s.PGSQL.6432 (pgbouncer). Within an hour after the system restarts, data is collected, and then the Database discovery rule and some of the data elements go to the status of not supported.

      The Postgresql log file contains the following entries:
      2021-01-28 16:55:44.186 GMT zabbix postgres [9384]LOG: could not send data to client: Broken pipe
      2021-01-28 16:55:44.186 GMT zabbix postgres [9384]FATAL: connection to client lost
      2021-01-28 17:01:05.682 GMT zabbix postgres [10282]ERROR: prepared statement "lrupsc_4_20" does not exist
      2021-01-28 17:02:43.036 GMT zabbix postgres [10057]ERROR: prepared statement "lrupsc_7_2" does not exist
      2021-01-28 17:06:44.661 GMT zabbix postgres [10199]ERROR: prepared statement "lrupsc_7_3" does not exist
      2021-01-28 17:11:42.607 GMT zabbix postgres [10275]ERROR: prepared statement "lrupsc_7_1" does not exist
      2021-01-28 17:11:44.615 GMT zabbix postgres [10118]ERROR: prepared statement "lrupsc_7_3" does not exist
      2021-01-28 17:12:43.823 GMT zabbix postgres [10118]ERROR: prepared statement "lrupsc_7_2" does not exist.

      In the log file Zabbix Server:
      12222:20210128:182111.279 item "Zabbix server:pgsql.dbstat["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_12_11" does not exist (SQLSTATE 26000).
      12219:20210128:182112.279 item "Zabbix server:pgsql.dbstat.sum["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_11_4" does not exist (SQLSTATE 26000).
      12226:20210128:182113.280 item "Zabbix server:pgsql.locks["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_12_12" does not exist (SQLSTATE 26000).
      12225:20210128:182114.282 item "Zabbix server:pgsql.oldest.xid["{$PG.URI}","{$PG.USER}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_13_0" does not exist (SQLSTATE 26000).
      12218:20210128:182115.283 item "Zabbix server:pgsql.oldest.xid["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_11_17" does not exist (SQLSTATE 26000).
      12223:20210128:182117.288 item "Zabbix server:pgsql.replication.count["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_11_18" does not exist (SQLSTATE 26000).
      12226:20210128:182118.291 item "Zabbix server:pgsql.replication.lag.b["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_12_16" does not exist (SQLSTATE 26000).
      12219:20210128:182119.293 item "Zabbix server:pgsql.replication.lag.sec["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_11_6" does not exist (SQLSTATE 26000).
      12218:20210128:182120.299 item "Zabbix server:pgsql.replication.process["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_12_17" does not exist (SQLSTATE 26000).
      12223:20210128:182121.305 item "Zabbix server:pgsql.replication.recovery_role["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_11_8" does not exist (SQLSTATE 26000).
      12225:20210128:182122.307 item "Zabbix server:pgsql.replication.status["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_12_16" does not exist (SQLSTATE 26000).
      12218:20210128:182123.311 item "Zabbix server:pgsql.uptime["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_11_9" does not exist (SQLSTATE 26000).
      12275:20210128:182128.595 sending configuration data to proxy "zproxy-sc.meteorf.ru" at "10.1.152.163", datalen 1105775
      12225:20210128:182142.361 item "Zabbix server:pgsql.db.age["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}","zabbix"]" became not supported: Cannot fetch data: ERROR: prepared statement "lrupsc_10_0" does not exist (SQLSTATE 26000).

      At the same time, the Replication Discovery rule is in the status not supported permanently, with the comment Cannot find the "data" array in the received JSON object.

        1. image-2021-02-01-13-45-34-230.png
          image-2021-02-01-13-45-34-230.png
          111 kB
        2. pgbouncer.ini
          10 kB
        3. pgbouncer-1.ini
          10 kB
        4. zabbix_server.conf
          26 kB
        5. zabbix_server-1.conf
          26 kB
        6. zabbix.conf.php
          2 kB
        7. zabbix.conf-1.php
          2 kB

            drasikhov Denis Rasikhov
            a.yagupov Alexander Yagupov
            Team INT
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: