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

host.get method returns no results for hosts with no interfaces when filtering by "hostid"

    XMLWordPrintable

Details

    • Problem report
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.2.5
    • API (A)
    • None
    • Rocky Linux release 8.7 (Green Obsidian)
      zabbix-web.noarch 6.2.5-release1.el8
      zabbix-web-deps.noarch 6.2.5-release1.el8
      zabbix-web-mysql.noarch 6.2.5-release1.el8
    • Team B
    • Sprint 95 (Dec 2022)
    • 0.125

    Description

      Steps to reproduce:

      1. Create host without interfaces and note down the host ID and host name
      2. Perform API request "host.get" with params "{"filter": {"hostid": "<HOST ID>"}}"
      3. No results are returned
      4. Perform API request "host.get" with params "{"filter": {"host": "<HOST NAME>"}}"
      5. Host results are returned correctly
      6. Create SNMP interface on host
      7. Perform API request "host.get" with params "{"filter": {"hostid": "<HOST ID>"}}"
      8. Host results are returned correctly

      Result:
      Using host.get to retrieve host information using filter "hostid", returns empty host results if the host has no interfaces configured.

      Using filter "host", host results are correctly returned. Add any interface to host and use filter "hostid", host results are correctly returned.

      Expected:
      Using host.get with filter "hostid" should return results if the hostid exists, whether or not the host has interface configured.

      Attachments

        Activity

          People

            iivs Ivo Kurzemnieks
            martinmoerch Martin Mørch
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: