[ZBXNEXT-2593] Allow to create host inventory in Zabbix API Created: 2014 Nov 14 Updated: 2016 Aug 03 |
|
Status: | Need info |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | API (A) |
Affects Version/s: | 2.2.6 |
Fix Version/s: | None |
Type: | Change Request | Priority: | Major |
Reporter: | Sergei Prutskikh | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 1 |
Labels: | api, database, usability | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
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? |
Comments |
Comment by richlv [ 2014 Nov 14 ] |
have you set "inventory_mode" to 0 or 1 as per https://www.zabbix.com/documentation/2.2/manual/api/reference/host/object ? |
Comment by Aleksandrs Saveljevs [ 2016 Aug 03 ] |
Is the problem still relevant for you? |