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

Problem with PostgreSQL by Zabbix agent 2 template items and discovery rules

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 6.4.3
    • None
    • GNU/Linux Debian 11
      Zabbix server 6.4.3
      Zabbix agent2 6.4.3
      PostgreSQL 13

      Steps to reproduce:

      Result:

      • All Zabbix agent items and discovery rules are unsupported.
      • This errors appears in the Zabbix agent2 log:
      zabbix_agent2[1397423]: [PostgreSQL] Connection failed: failed to connect to `host=/run/postgresql user=zabbix database=user=zbx_monitor`: server error (ERROR: no such database: user=zbx_monitor (SQLSTATE 08P01)).

      Is trying to use the user as database name.

      Expected:

      Get info from database.

      How to fix:

      Define database name in Zabbix agent items and discovery rules key as the last parameter:

      Zabbix agent items:

      pgsql.archive["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.bgwriter["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.connections["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.dbstat.sum["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.dbstat["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      {{pgsql.locks["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.oldest.xid["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.replication.process["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.uptime["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.wal.stat["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.ping["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]

      Discovery rules:

      pgsql.replication.process.discovery["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]
      pgsql.db.discovery["\{$PG.URI}","\{$PG.USER}","\{$PG.PASSWORD}","\{$PG.DATABASE}"]

            zabbix.support Zabbix Support Team
            facundo.aguirre Ignacio Facundo Aguirre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: