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

pgsql.custom.query cannot query different databases on same host

XMLWordPrintable

    • Sprint 90 (Jul 2022), Sprint 91 (Aug 2022), Sprint 92 (Sep 2022), Sprint 93 (Oct 2022), Sprint 94 (Nov 2022), Sprint 95 (Dec 2022)
    • 1

      We operation multiple postgresql databases on single host, in which we used to monitor data with simple sql queries via zabbix-agent2 plugin item - pgsql.custom.query. We use zabbix-agent active type of items and single database user zbx_monitor. 

      Steps to reproduce:

      1. Configure multiple zabbix agent active items with key pgsql.custom.query - different databases, single user
      2. Items become alternately enabled / not supported with error "...<tablename> relation does not exist".

      In postgres log it seems like zabbix-agent queries wrong database - mostly postgres as default and not the one sent via key parameter. Sometimes it runs query from one item against database from other item.

      We have tried to use item key with uri, user, password and database as well as key with named session, but with same result.

      As last working version for us was 6.0.3, we suspect commit 139fbddc248 to be a culprit of our troubles. 

            esneiders Eriks Sneiders
            kiwwi Lukas Sabla
            Team INT
            Votes:
            3 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: