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

`selectInheritedTags` doesn't support "extend" value anymore on `host.get` API

XMLWordPrintable

    • Sprint candidates

      Steps to reproduce:

      Send the following request to Zabbix API : 

      {
        "jsonrpc": "2.0",
        "method": "host.get",
        "params": {
          "output": [
            "hostid"
          ],
          "selectInheritedTags": "extend"
        },
        "id": 1
      } 

       

      Result:

      {
        "jsonrpc": "2.0",
        "result": [
          {
            "hostid": "10084",
            "inheritedTags": [
              [],
              [],
              [],
              [],
              []
            ]
          }
        ],
        "id": 1
      } 

      Expected:

      {
        "jsonrpc": "2.0",
        "result": [
          {
            "hostid": "10084",
            "inheritedTags": [
              {
                "tag": "class",
                "value": "software"
              },
              {
                "tag": "target",
                "value": "server"
              },
              {
                "tag": "target",
                "value": "zabbix"
              },
              {
                "tag": "class",
                "value": "os"
              },
              {
                "tag": "target",
                "value": "linux"
              }
            ]
          }
        ],
        "id": 1
      }

       

      Notes:

      1. To have the right output (Expected), you have to specify `["tag", "value"]` for `selectInheritedTags` field.

      2. The number of arrays returned by the API when using "extend" match the number of inherited tags

            zabbix.dev Zabbix Development Team
            romgille Romain GILLE
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: