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

Allow to create host inventory in Zabbix API

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.2.6
    • API (A)

      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?

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

              Created:
              Updated: