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

Template DB PostgreSQL Agent 2 not picking up the PG.DATABASE Macro

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 5.4.10
    • Templates (T)

      Similar to ZBX-18033.

      Also posted on the Forum.

       

      Steps to reproduce:

      1. Enable the PostgreSQL by Zabbix agent 2 template following these steps.

      Result:

       

      2022/02/24 08:31:23.181353 connection established using TLSv1.3 TLS_CHACHA20_POLY1305_SHA256
      2022/02/24 08:31:23.182144 received passive check request: 'pgsql.bgwriter["tcp://pgsql-slave01.prod.foo.com:5432","zbx_monitor","postgres"]' from '10.0.2.166'
      2022/02/24 08:31:23.182220 [1] processing update request (1 requests)
      2022/02/24 08:31:23.182257 [1] adding new request for key: 'pgsql.bgwriter["tcp://pgsql-slave01.prod.foo.com:5432","zbx_monitor","postgres"]'
      2022/02/24 08:31:23.182306 [1] created direct exporter task for plugin 'Postgres' itemid:0 key 'pgsql.bgwriter["tcp://pgsql-slave01.prod.foo.com:5432","zbx_monitor","postgres"]'
      2022/02/24 08:31:23.182376 executing direct exporter task for key 'pgsql.bgwriter["tcp://pgsql-slave01.prod.foo.com:5432","zbx_monitor","postgres"]'
      2022/02/24 08:31:23.191488 [Postgres] Connection failed: failed to connect to `host=pgsql-slave01.prod.foo.com user=zbx_monitor database=postgres`: failed SASL auth (FATAL: password authentication failed for user "zbx_monitor" (SQLSTATE 28P01)).
      2022/02/24 08:31:23.191503 failed to execute direct exporter task for key 'pgsql.bgwriter["tcp://pgsql-slave01.prod.foo.com:5432","zbx_monitor","postgres"]' error: 'Connection failed: failed to connect to `host=pgsql-slave01.prod.foo.com user=zbx_monitor database=postgres`: failed SASL auth (FATAL: password authentication failed for user "zbx_monitor" (SQLSTATE 28P01)).'
      2022/02/24 08:31:23.191531 sending passive check response: ZBX_NOTSUPPORTED: 'Connection failed: failed to connect to `host=pgsql-slave01.prod.foo.com user=zbx_monitor database=postgres`: failed SASL auth (FATAL: password authentication failed for user "zbx_monitor" (SQLSTATE 28P01)).' to '10.0.2.166' 

       

       

      The `{$PG.DATABASE}` is successfully set:

       

      {$PG.DATABASE} = testdb
      {$PG.URI} = tcp://pgsql-slave01.prod.foo.com:5432 

       

       

      Versions:

       

      zabbix_agent2 (Zabbix) 5.4.10
      zabbix_server (Zabbix) 5.4.9
      PostgreSQL: PostgreSQL 14.2 

       

       

            zit Zabbix Integration Team
            lpossamai Lucas Possamai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: