See www.zabbix.com for the official Zabbix site.

Docs/specs/ZBXNEXT-1241

From Zabbix.org
Jump to: navigation, search

Host inventory mode setting for new and discovered hosts

ZBXNEXT-1241

Status: v1.0

Owner: Andris Zeila

Summary

Currently all hosts are created with disabled host inventory and the only way to change it is by opening host configuration and selecting new inventory mode there. Zabbix must provide means to automatize this process.

Specification

Default host inventory mode

A new configuration option Default host inventory mode must be added to Other configuration parameters in Administration/General configuration (under Group for discovered hosts option). The inventory mode configuration is stored in config table default_inventory_mode field and can have the following values:

  • -1 - disabled (default)
  • 0 - manual
  • 1 - automatic

This option must be followed whenever a new host or host prototype is created by server or frontend, unless it is overriden during host discovery or auto registration by Set host inventory mode operation.

Host discovery

The discovery and auto registration actions must support a new operation type - Set host inventory mode. By choosing this operation type user will be provided with a selector to choose the host inventory mode to set. Only manual and automatic host inventory modes are supported.

The new operation type will have operationtype value 10 (OPERATION_TYPE_HOST_INVENTORY) and its inventory mode value will be stored in opinventory table inventory_mode field with the possible values:

  • 0 - manual (a host_inventory record for this host will be created if necessary and its inventory_mode field will be set to 0)
  • 1 - automatic (a host_inventory record for this host will be created if necessary and its inventory_mode field will be set to 1)

API changes

Translation strings

  • Set host inventory mode
  • Default host inventory mode

Database changes

A new table opinventory must be added:

TABLE|opinventory|operationid|ZBX_DATA
FIELD		|operationid	|t_id		|	|NOT NULL	|0			|1|operations
FIELD		|inventory_mode	|t_integer	|'0'	|NOT NULL	|0

A new field must be added to config table:

FIELD		|default_inventory_mode	|t_integer	|'-1'	|NOT NULL	|ZBX_NODATA

Documentation

ChangeLog

  • v1.0 Initial version