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

Macros broken in Agent2 PostgreSQL plugin

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 6.4.3
    • Agent2 plugin (N)
    • Alma Linux 9.2
      Zabbix 6.4.3

      After installing and setting up the postgresql plugin for Agent2, as described in our documentation here: https://www.zabbix.com/integrations/postgresql#postgresql_agent2
      there are issues with the plugin, and it is not working.
      After the last step, setting the macros, I was receiving this error log message:

      Connection failed: failed to connect to `host=localhost user=zabbix database=user=zbx_monitor`: server error (FATAL: database "user=zbx_monitor" does not exist (SQLSTATE 3D000)).

      The error message is stating that a database "user=zbx_monitor" does not exist. I set the {$PG.USER} value to "zbx_monitor" ({$PG.DATABASE} value was set to "zabbix"), which was the user in the database I created for this plugin, but it looks like something with the macros is broken.

      I couldn't get it to work by setting macros, so I set these parameters in the plugin configuration file 'postgresql.conf' as I would set the macros in frontend:

      • Plugins.PostgreSQL.Default.Uri=
      • Plugins.PostgreSQL.Default.User=
      • Plugins.PostgreSQL.Default.Password=
      • Plugins.PostgreSQL.Default.Database=

      After setting these parameters in the plugin configuration file, the plugin works and is collecting data.

      To reproduce: Follow the steps in documentation - https://www.zabbix.com/integrations/postgresql#postgresql_agent2

            rzvejs Rudolfs Zvejs (Inactive)
            tbross Tomass Janis Bross
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: