Add menu section, new db tables and two new module types in pandoradb

This commit is contained in:
enriquecd 2018-01-16 15:41:35 +01:00
parent 9d01f98f21
commit 5ab43d8106
3 changed files with 33 additions and 0 deletions

View File

@ -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";

View File

@ -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;

View File

@ -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');
--