check problems migration

This commit is contained in:
daniel 2018-03-08 12:09:03 +01:00
parent ff8051b433
commit 1f3b95f6d1
2 changed files with 44 additions and 0 deletions

View File

@ -34,6 +34,7 @@ enterprise_include_once ('include/functions_local_components.php');
enterprise_include_once ('include/functions_events.php');
enterprise_include_once ('include/functions_agents.php');
enterprise_include_once ('include/functions_modules.php');
enterprise_include_once ('include/functions_collection.php');
/**
* Parse the "other" parameter.
@ -10142,4 +10143,24 @@ function api_set_metaconsole_synch($keys) {
}
/**
* Returns the collections associated to this agent
*/
function api_get_agent_collections($id_agent) {
// ACL!
$collections = enterprise_hook("collection_get_collections_in_agent", array($id_agent));
echo json_encode($collections);
}
/**
* Returns if collection exists in this node
*/
function api_get_check_collection_id($id_collection) {
// ACL!
$exists = enterprise_hook("collection_exits_directory", array($id_collection));
echo json_encode($exists);
}
?>

View File

@ -3081,3 +3081,26 @@ create table IF NOT EXISTS `tcluster_agent`(
ON UPDATE CASCADE
) engine=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tmigration_queue`
-- ---------------------------------------------------------------------
create table IF NOT EXISTS `tmigration_queue`(
`id_metaconsole_agent` int unsigned not null,
`id_source_node` int unsigned not null,
`id_target_node` int unsigned not null,
`priority` int unsigned not null default 0,
`step` int unsigned not null default 0
) engine=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------
-- Table `tmigration_module_queue`
-- ---------------------------------------------------------------------
create table IF NOT EXISTS `tmigration_module_queue`(
`id_source_node` int unsigned not null,
`id_target_node` int unsigned not null,
`id_source_agentmodule` int unsigned not null,
`id_target_agentmodule` int unsigned not null,
`last_replication_timestamp` bigint(20) NOT NULL default 0
) engine=InnoDB DEFAULT CHARSET=utf8;