Lines Matching refs:hostid

55 	zbx_uint64_t	hostid = 0, proxy_hostid;  in select_discovered_host()  local
117 ZBX_STR2UINT64(hostid, row[0]); in select_discovered_host()
120 zabbix_log(LOG_LEVEL_DEBUG, "End of %s():" ZBX_FS_UI64, __func__, hostid); in select_discovered_host()
122 return hostid; in select_discovered_host()
134 static void add_discovered_host_groups(zbx_uint64_t hostid, zbx_vector_uint64_t *groupids) in add_discovered_host_groups() argument
152 hostid); in add_discovered_host_groups()
186 zbx_db_insert_add_values(&db_insert, hostgroupid++, hostid, groupids->values[i]); in add_discovered_host_groups()
215 zbx_uint64_t dhostid, hostid = 0, proxy_hostid, druleid; in add_discovered_host() local
297 if (0 == hostid) in add_discovered_host()
312 ZBX_STR2UINT64(hostid, row2[0]); in add_discovered_host()
317 if (0 == hostid) in add_discovered_host()
427 hostid = DBget_maxid("hosts"); in add_discovered_host()
431 zbx_db_insert_add_values(&db_insert, hostid, proxy_hostid, host_unique, in add_discovered_host()
437 DBadd_host_inventory(hostid, cfg.default_inventory_mode); in add_discovered_host()
439 interfaceid = DBadd_interface(hostid, interface_type, 1, row[2], row[3], port, in add_discovered_host()
445 add_discovered_host_groups(hostid, &groupids); in add_discovered_host()
448 interfaceid = DBadd_interface(hostid, interface_type, 1, row[2], row[3], port, in add_discovered_host()
542 hostid = DBget_maxid("hosts"); in add_discovered_host()
555 zbx_db_insert_add_values(&db_insert, hostid, proxy_hostid, row[1], row[1], in add_discovered_host()
562 zbx_db_insert_add_values(&db_insert, hostid, proxy_hostid, row[1], row[1]); in add_discovered_host()
569 DBadd_host_inventory(hostid, cfg.default_inventory_mode); in add_discovered_host()
571 DBadd_interface(hostid, INTERFACE_TYPE_AGENT, useip, row[2], row[3], port, flags); in add_discovered_host()
573 add_discovered_host_groups(hostid, &groupids); in add_discovered_host()
577 ZBX_STR2UINT64(hostid, row2[0]); in add_discovered_host()
585 DBsql_id_ins(proxy_hostid), hostid); in add_discovered_host()
588 DBadd_interface(hostid, INTERFACE_TYPE_AGENT, useip, row[2], row[3], port, flags); in add_discovered_host()
603 return hostid; in add_discovered_host()
666 zbx_uint64_t hostid; in op_host_del() local
673 if (0 == (hostid = select_discovered_host(event))) in op_host_del()
678 zbx_vector_uint64_append(&hostids, hostid); in op_host_del()
698 zbx_uint64_t hostid; in op_host_enable() local
705 if (0 == (hostid = add_discovered_host(event))) in op_host_enable()
713 hostid); in op_host_enable()
729 zbx_uint64_t hostid; in op_host_disable() local
736 if (0 == (hostid = add_discovered_host(event))) in op_host_disable()
744 hostid); in op_host_disable()
765 zbx_uint64_t hostid; in op_host_inventory_mode() local
772 if (0 == (hostid = add_discovered_host(event))) in op_host_inventory_mode()
775 DBset_host_inventory(hostid, inventory_mode); in op_host_inventory_mode()
794 zbx_uint64_t hostid; in op_groups_add() local
801 if (0 == (hostid = add_discovered_host(event))) in op_groups_add()
804 add_discovered_host_groups(hostid, groupids); in op_groups_add()
824 zbx_uint64_t hostid; in op_groups_del() local
833 if (0 == (hostid = select_discovered_host(event))) in op_groups_del()
844 hostid); in op_groups_del()
852 " it must belong to at least one", zbx_host_string(hostid)); in op_groups_del()
861 hostid); in op_groups_del()
887 zbx_uint64_t hostid; in op_template_add() local
895 if (0 == (hostid = add_discovered_host(event))) in op_template_add()
898 if (SUCCEED != DBcopy_template_elements(hostid, lnk_templateids, &error)) in op_template_add()
921 zbx_uint64_t hostid; in op_template_del() local
929 if (0 == (hostid = select_discovered_host(event))) in op_template_del()
932 if (SUCCEED != DBdelete_template_elements(hostid, del_templateids, &error)) in op_template_del()