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

Details

    • Problem report
    • Status: Elaborating
    • Trivial
    • Resolution: Unresolved
    • 6.0.4, 6.0.5
    • None
    • Agent2 plugin (N)
    • Ubuntu 20.04
    • Team INT

    Description

      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. 

      Attachments

        Issue Links

          Activity

            People

              esneiders Eriks Sneiders
              kiwwi Lukas Sabla
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: