Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-2593

Allow to create host inventory in Zabbix API

    XMLWordPrintable

    Details

    • Type: Change Request
    • Status: Need info
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.6
    • Fix Version/s: None
    • Component/s: API (A)

      Description

      In Zabbix API it is possible to create host with inventory, but if host is already created and inventory this host is disabled, it is not possible to update this host to create inventory.

      in your API class CHost.php there is some additional code that restrict to create inventory while Host Update function.

      Host update function actially call massUpdate function and here we see this code:

      if (!isset($existingInventoriesDb[$hostId])) {
      							$host = get_host_by_hostid($hostId);
      							self::exception(ZBX_API_ERROR_PARAMETERS, _s(
      								'Inventory disabled for host "%1$s".', $host['host']
      							));
      						}
      

      Why you cant create new inventory for host if there is no inventory for host exists yet?

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sperr0w Sergei Prutskikh
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: