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

PostgreSQL Template does not use macros

XMLWordPrintable

      Steps to reproduce:

      1. Installed zabbix-agent2 5.0.28 from zabbix repository
      2. zabbix_agent2.conf has no active parameter related to PostgreSQL
      3. On zabbix-server, the host is associated to the DB PotgreSQL Agent 2 template
      4. The host has also the following macros set:
        1. $PG.HOST = localhost
        2. $PG.URI = postgresql://localhost:5433
        3. $PG.USER = zbx_monitor
        4. $PG.PORT = 5433

      Yes, my PostgreSQL is running on the non-default port 5433.

      Result:

      The discovery rule Database discovery fails with the following error:

       

      Connection failed: failed to connect to `host=localhost user=postgres database=postgres`: dial error (dial tcp 127.0.0.1:5432: connect: connection refused).

      The same message shows up on the zabbix-agent log.

      Additional Info:

      On the zabbix-server console, I can run:

      zabbix_get -s XXX.XXX.XXX.XXX -k 'pgsql.db.discovery[postgresql://localhost:5433,zbx_monitor,,postgres]'

      This command returns the correct discovery value. The zabbix_get command bellow:

      zabbix_get -s 10.1.1.10 -k 'pgsql.db.discovery[]'

      Gives me the same error above.

      I have other hosts running PostgreSQL and zabbix-agent2 version 5.0.1. On those hosts, the monitoring is working fine.

       

            zit Zabbix Integration Team
            humberto.fraga Humberto Fraga
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: