diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 441197e393..d7a546a96a 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -105,6 +105,8 @@ if (!empty($sub2)) { $sub["snmpconsole"]["subtype"] = "nolink"; } +enterprise_hook ('cluster_menu'); + if (!empty($sub)) { $menu_operation["estado"]["text"] = __('Monitoring'); $menu_operation["estado"]["sec2"] = "operation/agentes/tactical"; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 4309a52e5f..bfd3ed2d30 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -3028,3 +3028,32 @@ CREATE TABLE IF NOT EXISTS `treset_pass` ( `reset_time` int(10) unsigned NOT NULL default 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +create table IF NOT EXISTS `tcluster`( + `id` int unsigned not null auto_increment, + `name` tinytext unsigned not null, + `cluster_type` enum('AA','AP') default 'AA' unsigned not null, + `description` text unsigned not null, + `group` integer unsigned not null, + PRIMARY KEY (`id`), + FOREIGN KEY (`group`) REFERENCES tgrupo(`id_grupo`) + ON DELETE SET NULL ON UPDATE CASCADE +) engine=InnoDB DEFAULT CHARSET=utf8; + +create table IF NOT EXISTS `tcluster_item`( + `id_cluster` int unsigned not null auto_increment, + `name` tinytext unsigned not null, + `item_type` enum('AA','AP') default 'AA' unsigned not null, + `critical_limit` INTEGER unsigned NOT NULL default '0', + `warning_limit` INTEGER unsigned NOT NULL default '0', + `is_critical` tinyint(2) unsigned NOT NULL default '0', + PRIMARY KEY (`id_cluster`) +) engine=InnoDB DEFAULT CHARSET=utf8; + +create table IF NOT EXISTS `tcluster_agent`( + `id_cluster` int unsigned not null auto_increment, + `id_agent` int unsigned not null, + PRIMARY KEY (`id_cluster`), + FOREIGN KEY (`id_agent`) REFERENCES tagente(`id_agente`) + ON DELETE SET NULL ON UPDATE CASCADE +) engine=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 9bde718a94..30c52a2918 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -268,6 +268,8 @@ INSERT INTO `ttipo_modulo` VALUES (31,'web_proc',9,'Remote HTTP module to check server response','mod_web_proc.png'), (32,'web_content_data',9,'Remote HTTP module to retrieve numeric data','mod_web_data.png'), (33,'web_content_string',9,'Remote HTTP module to retrieve string data','mod_web_data.png'), +(34,'cluster_proc',69,'Boolean cluster module','mod_cluster_proc.png'), +(35,'cluster_data',69,'Numeric cluster module','mod_cluster_data.png'), (100,'keep_alive',-1,'KeepAlive','mod_keepalive.png'); --