require_once dirname(__FILE__).'/include/config.inc.php';
require_once dirname(__FILE__).'/include/forms.inc.php';
$page['title'] = _('Configuration of hosts');
$page['file'] = 'hosts.php';
$page['type'] = detect_page_type(PAGE_TYPE_HTML);
$page['scripts'] = ['multiselect.js', 'textareaflexible.js', 'class.cviewswitcher.js', 'class.cverticalaccordion.js',
'inputsecret.js', 'macrovalue.js'
require_once dirname(__FILE__).'/include/page_header.php';
'hosts' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID, null],
'groups' => [T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({add}) || isset({update})'],
'mass_update_groups' => [T_ZBX_INT, O_OPT, null,
IN([ZBX_ACTION_ADD, ZBX_ACTION_REPLACE, ZBX_ACTION_REMOVE]),
'hostids' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID, null],
'groupids' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID, null],
'applications' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID, null],
'hostid' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID, 'isset({form}) && {form} == "update"'],
'clone_hostid' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID,
'isset({form}) && {form} == "full_clone"'
'host' => [T_ZBX_STR, O_OPT, null, NOT_EMPTY, 'isset({add}) || isset({update})',
'visiblename' => [T_ZBX_STR, O_OPT, null, null, 'isset({add}) || isset({update})'],
'description' => [T_ZBX_STR, O_OPT, null, null, null],
'proxy_hostid' => [T_ZBX_INT, O_OPT, P_SYS, DB_ID, null],
'status' => [T_ZBX_INT, O_OPT, null,
IN([HOST_STATUS_MONITORED, HOST_STATUS_NOT_MONITORED]), null
'interfaces' => [T_ZBX_STR, O_OPT, null, NOT_EMPTY,
'isset({add}) || isset({update})'
'mainInterfaces' => [T_ZBX_INT, O_OPT, null, DB_ID, null],
'tags' => [T_ZBX_STR, O_OPT, null, null, null],
'mass_update_tags' => [T_ZBX_INT, O_OPT, null,
IN([ZBX_ACTION_ADD, ZBX_ACTION_REPLACE, ZBX_ACTION_REMOVE]),
'mass_update_macros' => [T_ZBX_INT, O_OPT, null,
IN([ZBX_ACTION_ADD, ZBX_ACTION_REPLACE, ZBX_ACTION_REMOVE, ZBX_ACTION_REMOVE_ALL]),
'macros_add' => [T_ZBX_INT, O_OPT, null, IN([0,1]), null],
'macros_update' => [T_ZBX_INT, O_OPT, null, IN([0,1]), null],
'macros_remove' => [T_ZBX_INT, O_OPT, null, IN([0,1]), null],
'macros_remove_all' => [T_ZBX_INT, O_OPT, null, IN([0,1]), null],
'templates' => [T_ZBX_INT, O_OPT, null, DB_ID, null],
'add_templates' => [T_ZBX_INT, O_OPT, null, DB_ID, null],
'templates_rem' => [T_ZBX_STR, O_OPT, P_SYS|P_ACT, null, null],
'clear_templates' => [T_ZBX_INT, O_OPT, null, DB_ID, null],
'ipmi_authtype' => [T_ZBX_INT, O_OPT, null, BETWEEN(-1, 6), null],
'ipmi_privilege' => [T_ZBX_INT, O_OPT, null, BETWEEN(0, 5), null],
'ipmi_username' => [T_ZBX_STR, O_OPT, null, null, null],
'ipmi_password' => [T_ZBX_STR, O_OPT, null, null, null],
'tls_connect' => [T_ZBX_INT, O_OPT, null,
IN([HOST_ENCRYPTION_NONE, HOST_ENCRYPTION_PSK, HOST_ENCRYPTION_CERTIFICATE]),
'tls_accept' => [T_ZBX_INT, O_OPT, null,
(HOST_ENCRYPTION_NONE | HOST_ENCRYPTION_PSK | HOST_ENCRYPTION_CERTIFICATE)