2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql, extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql, extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields "text_filter" and "dont_show_subgroups" for to new filters to generate the networkmap. * operation/agentes/networkmap.topology.php, operation/agentes/networkmap.groups.php, include/functions_networkmap.php, include/functions_servers.php: added the new filters for free text for agents and hidden the subgroups of any group in the group networkmap. * extensions/resource_registration.php, operation/agentes/networkmap.php, general/header.php, godmode/netflow/nf_report_form.php, godmode/agentes/module_manager.php, include/functions_groups.php, include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php, include/functions.php, include/functions_db.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6995 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3f0f929fa0
commit
dd48690877
|
@ -1,3 +1,26 @@
|
||||||
|
2012-09-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* pandoradb.sql, pandoradb.postgreSQL.sql, pandoradb.oracle.sql,
|
||||||
|
extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
|
||||||
|
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
|
||||||
|
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql: added the fields
|
||||||
|
"text_filter" and "dont_show_subgroups" for to new filters to
|
||||||
|
generate the networkmap.
|
||||||
|
|
||||||
|
* operation/agentes/networkmap.topology.php,
|
||||||
|
operation/agentes/networkmap.groups.php,
|
||||||
|
include/functions_networkmap.php, include/functions_servers.php:
|
||||||
|
added the new filters for free text for agents and hidden the
|
||||||
|
subgroups of any group in the group networkmap.
|
||||||
|
|
||||||
|
* extensions/resource_registration.php,
|
||||||
|
operation/agentes/networkmap.php, general/header.php,
|
||||||
|
godmode/netflow/nf_report_form.php,
|
||||||
|
godmode/agentes/module_manager.php, include/functions_groups.php,
|
||||||
|
include/auth/ldap.php, operation/agentes/estado_ultimopaquete.php,
|
||||||
|
include/functions.php, include/functions_db.php: cleaned source code
|
||||||
|
style.
|
||||||
|
|
||||||
2012-09-21 Ramon Novoa <rnovoa@artica.es>
|
2012-09-21 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* include/functions_netflow.php,
|
* include/functions_netflow.php,
|
||||||
|
|
|
@ -120,7 +120,8 @@ function process_upload_xml_report($xml, $group_filter = 0) {
|
||||||
|
|
||||||
$agents_item= array();
|
$agents_item= array();
|
||||||
if (isset($item['agent'])) {
|
if (isset($item['agent'])) {
|
||||||
$agents = agents_get_agents(array('id_grupo' => $group_filter), array('id_agente', 'nombre'));
|
$agents = agents_get_agents(array('id_grupo' => $group_filter),
|
||||||
|
array('id_agente', 'nombre'));
|
||||||
|
|
||||||
$agent_clean = str_replace(array('[', ']'), '', $item['agent']);
|
$agent_clean = str_replace(array('[', ']'), '', $item['agent']);
|
||||||
$regular_expresion = ($agent_clean != $item['agent']);
|
$regular_expresion = ($agent_clean != $item['agent']);
|
||||||
|
|
|
@ -73,9 +73,9 @@ CREATE TABLE IF NOT EXISTS `talert_special_days` (
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
ALTER TABLE `talert_templates` ADD COLUMN `special_day` tinyint(1) DEFAULT '0';
|
ALTER TABLE `talert_templates` ADD COLUMN `special_day` tinyint(1) DEFAULT '0';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tplanned_downtime`
|
-- Table `tplanned_downtime`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE `tplanned_downtime` ADD COLUMN `monday` tinyint(1) default 0;
|
ALTER TABLE `tplanned_downtime` ADD COLUMN `monday` tinyint(1) default 0;
|
||||||
ALTER TABLE `tplanned_downtime` ADD COLUMN `tuesday` tinyint(1) default 0;
|
ALTER TABLE `tplanned_downtime` ADD COLUMN `tuesday` tinyint(1) default 0;
|
||||||
ALTER TABLE `tplanned_downtime` ADD COLUMN `wednesday` tinyint(1) default 0;
|
ALTER TABLE `tplanned_downtime` ADD COLUMN `wednesday` tinyint(1) default 0;
|
||||||
|
@ -91,22 +91,19 @@ ALTER TABLE `tplanned_downtime` ADD COLUMN `type_downtime` varchar(100) NOT NULL
|
||||||
ALTER TABLE `tplanned_downtime` ADD COLUMN `type_execution` varchar(100) NOT NULL default 'once';
|
ALTER TABLE `tplanned_downtime` ADD COLUMN `type_execution` varchar(100) NOT NULL default 'once';
|
||||||
ALTER TABLE `tplanned_downtime` ADD COLUMN `type_periodicity` varchar(100) NOT NULL default 'weekly';
|
ALTER TABLE `tplanned_downtime` ADD COLUMN `type_periodicity` varchar(100) NOT NULL default 'weekly';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tplanned_downtime_agents`
|
-- Table `tplanned_downtime_agents`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
DELETE FROM tplanned_downtime_agents
|
DELETE FROM tplanned_downtime_agents
|
||||||
WHERE id_downtime NOT IN (SELECT id FROM tplanned_downtime);
|
WHERE id_downtime NOT IN (SELECT id FROM tplanned_downtime);
|
||||||
|
|
||||||
ALTER TABLE tplanned_downtime_agents
|
ALTER TABLE tplanned_downtime_agents
|
||||||
ADD FOREIGN KEY(`id_downtime`) REFERENCES tplanned_downtime(`id`)
|
ADD FOREIGN KEY(`id_downtime`) REFERENCES tplanned_downtime(`id`)
|
||||||
ON DELETE CASCADE;
|
ON DELETE CASCADE;
|
||||||
|
|
||||||
ALTER TABLE `tplanned_downtime_agents` ADD COLUMN `all_modules` tinyint(1) default 1;
|
ALTER TABLE `tplanned_downtime_agents` ADD COLUMN `all_modules` tinyint(1) default 1;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tplanned_downtime_modules`
|
-- Table `tplanned_downtime_modules`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
|
CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
|
||||||
`id` int(20) unsigned NOT NULL auto_increment,
|
`id` int(20) unsigned NOT NULL auto_increment,
|
||||||
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
||||||
|
@ -116,48 +113,60 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
|
||||||
FOREIGN KEY (`id_downtime`) REFERENCES tplanned_downtime(`id`)
|
FOREIGN KEY (`id_downtime`) REFERENCES tplanned_downtime(`id`)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tevento`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE `tevento` ADD COLUMN (`source` tinytext NOT NULL,
|
|
||||||
`id_extra` tinytext NOT NULL);
|
|
||||||
ALTER TABLE `tevento` MODIFY COLUMN `event_type` ENUM('going_unknown','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal','configuration_change') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'unknown';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tevento`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
ALTER TABLE `tevento` ADD COLUMN (`source` tinytext NOT NULL, `id_extra` tinytext NOT NULL);
|
||||||
|
ALTER TABLE `tevento` MODIFY COLUMN `event_type` ENUM('going_unknown','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal','configuration_change') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'unknown';
|
||||||
|
ALTER TABLE `tevento` ADD COLUMN `critical_instructions` TEXT NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE `tevento` ADD COLUMN `warning_instructions` TEXT NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE `tevento` ADD COLUMN `unknown_instructions` TEXT NOT NULL DEFAULT '';
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
-- Table `tgrupo`
|
-- Table `tgrupo`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE `tgrupo` ADD COLUMN `description` text;
|
ALTER TABLE `tgrupo` ADD COLUMN `description` text;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `talert_snmp`
|
-- Table `talert_snmp`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE `talert_snmp` ADD COLUMN (`_snmp_f1_` text, `_snmp_f2_` text, `_snmp_f3_` text,
|
ALTER TABLE `talert_snmp` ADD COLUMN (`_snmp_f1_` text, `_snmp_f2_` text, `_snmp_f3_` text,
|
||||||
`_snmp_f4_` text, `_snmp_f5_` text, `_snmp_f6_` text, `trap_type` int(11) NOT NULL default '-1',
|
`_snmp_f4_` text, `_snmp_f5_` text, `_snmp_f6_` text, `trap_type` int(11) NOT NULL default '-1',
|
||||||
`single_value` varchar(255) DEFAULT '');
|
`single_value` varchar(255) DEFAULT '');
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tagente_modulo`
|
-- Table `tagente_modulo`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE `tagente_modulo` ADD COLUMN `module_ff_interval` int(4) unsigned default '0';
|
ALTER TABLE `tagente_modulo` ADD COLUMN `module_ff_interval` int(4) unsigned DEFAULT '0';
|
||||||
ALTER TABLE `tagente_modulo` CHANGE COLUMN `post_process` `post_process` double(18,5) default NULL;
|
ALTER TABLE `tagente_modulo` CHANGE COLUMN `post_process` `post_process` double(18,5) DEFAULT NULL;
|
||||||
ALTER TABLE `tagente_modulo` ADD COLUMN `wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard';
|
ALTER TABLE `tagente_modulo` ADD COLUMN `wizard_level` enum('basic','advanced','custom','nowizard') DEFAULT 'nowizard';
|
||||||
ALTER TABLE `tagente_modulo` ADD COLUMN `macros` text;
|
ALTER TABLE `tagente_modulo` ADD COLUMN `macros` text;
|
||||||
ALTER TABLE `tagente_modulo` ADD COLUMN `quiet` tinyint(1) NOT NULL DEFAULT '0';
|
ALTER TABLE `tagente_modulo` ADD COLUMN `quiet` tinyint(1) NOT NULL DEFAULT '0';
|
||||||
|
ALTER TABLE `tagente_modulo` ADD COLUMN `critical_instructions` TEXT NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE `tagente_modulo` ADD COLUMN `warning_instructions` TEXT NOT NULL DEFAULT '';
|
||||||
|
ALTER TABLE `tagente_modulo` ADD COLUMN `unknown_instructions` TEXT NOT NULL DEFAULT '';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tnetwork_component`
|
-- Table `tnetwork_component`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE `tnetwork_component` CHANGE COLUMN `post_process` `post_process` double(18,5) default NULL;
|
ALTER TABLE `tnetwork_component` CHANGE COLUMN `post_process` `post_process` double(18,5) default NULL;
|
||||||
ALTER TABLE `tnetwork_component` ADD COLUMN `unit` TEXT NOT NULL AFTER `post_process`;
|
ALTER TABLE `tnetwork_component` ADD COLUMN `unit` TEXT NOT NULL AFTER `post_process`;
|
||||||
|
ALTER TABLE tnetwork_component ADD `wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard';
|
||||||
|
ALTER TABLE tnetwork_component ADD `only_metaconsole` tinyint(1) unsigned default '0';
|
||||||
|
ALTER TABLE tnetwork_component ADD `macros` text;
|
||||||
|
ALTER TABLE tnetwork_component ADD `critical_instructions` TEXT NOT NULL default '';
|
||||||
|
ALTER TABLE tnetwork_component ADD `warning_instructions` TEXT NOT NULL default '';
|
||||||
|
ALTER TABLE tnetwork_component ADD `unknown_instructions` TEXT NOT NULL default '';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tgraph_source` Alter table to allow negative values in weight
|
-- Table `tgraph_source` Alter table to allow negative values in weight
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE tgraph_source MODIFY weight FLOAT(5,3) NOT NULL DEFAULT '0.000';
|
ALTER TABLE tgraph_source MODIFY weight FLOAT(5,3) NOT NULL DEFAULT '0.000';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tevent_filter`
|
-- Table `tevent_filter`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tevent_filter` (
|
CREATE TABLE IF NOT EXISTS `tevent_filter` (
|
||||||
`id_filter` int(10) unsigned NOT NULL auto_increment,
|
`id_filter` int(10) unsigned NOT NULL auto_increment,
|
||||||
`id_group_filter` int(10) NOT NULL default 0,
|
`id_group_filter` int(10) NOT NULL default 0,
|
||||||
|
@ -177,78 +186,14 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` (
|
||||||
PRIMARY KEY (`id_filter`)
|
PRIMARY KEY (`id_filter`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tconfig`
|
-- Table `tconfig`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE tconfig MODIFY value TEXT NOT NULL;
|
ALTER TABLE tconfig MODIFY value TEXT NOT NULL;
|
||||||
--Join the all ips of "list_ACL_IPs_for_API_%" in one row (now We have a field "value" with hudge size)
|
--Join the all ips of "list_ACL_IPs_for_API_%" in one row (now We have a field "value" with hudge size)
|
||||||
INSERT INTO tconfig (token, `value`) SELECT 'list_ACL_IPs_for_API', GROUP_CONCAT(`value` SEPARATOR ';') AS `value` FROM tconfig WHERE token LIKE "list_ACL_IPs_for_API%";
|
INSERT INTO tconfig (token, `value`) SELECT 'list_ACL_IPs_for_API', GROUP_CONCAT(`value` SEPARATOR ';') AS `value` FROM tconfig WHERE token LIKE "list_ACL_IPs_for_API%";
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES ('event_fields', 'evento,id_agente,estado,timestamp');
|
INSERT INTO `tconfig` (`token`, `value`) VALUES ('event_fields', 'evento,id_agente,estado,timestamp');
|
||||||
DELETE FROM tconfig WHERE token LIKE "list_ACL_IPs_for_API_%";
|
DELETE FROM tconfig WHERE token LIKE "list_ACL_IPs_for_API_%";
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `treport_content_item`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE treport_content_item ADD FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`) ON UPDATE CASCADE ON DELETE CASCADE;
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `treport`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE treport ADD COLUMN `id_template` INTEGER UNSIGNED DEFAULT 0;
|
|
||||||
ALTER TABLE treport ADD COLUMN `id_group_edit` mediumint(8) unsigned NULL DEFAULT 0;
|
|
||||||
ALTER TABLE treport ADD COLUMN `metaconsole` tinyint(1) DEFAULT 0;
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tgraph`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE `tgraph` ADD COLUMN `id_graph_template` int(11) NOT NULL DEFAULT 0;
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `ttipo_modulo`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
UPDATE ttipo_modulo SET descripcion='Generic data' WHERE id_tipo=1;
|
|
||||||
UPDATE ttipo_modulo SET descripcion='Generic data incremental' WHERE id_tipo=4;
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tusuario`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `section` TEXT NOT NULL;
|
|
||||||
INSERT INTO `tusuario` (`section`) VALUES ('Default');
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `data_section` TEXT NOT NULL;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `disabled` int(4) NOT NULL DEFAULT 0;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `shortcut` tinyint(1) DEFAULT 0;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `shortcut_data` text;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `not_login` tinyint(1) unsigned NOT NULL DEFAULT 0;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `force_change_pass` tinyint(1) DEFAULT 0;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `last_pass_change` DATETIME NOT NULL DEFAULT 0;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `last_failed_login` DATETIME NOT NULL DEFAULT 0;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `failed_attempt` int(4) NOT NULL DEFAULT 0;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `login_blocked` tinyint(1) DEFAULT 0;
|
|
||||||
ALTER TABLE `tusuario` ADD COLUMN `metaconsole_access` enum('basic','advanced','custom','all','only_console') DEFAULT 'only_console';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `treport_content_item`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE `treport_content_item` ADD COLUMN `operation` TEXT;
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tmensajes`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE `tmensajes` MODIFY COLUMN `mensaje` TEXT NOT NULL;
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `talert_compound`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE `talert_compound` ADD COLUMN `special_day` tinyint(1) DEFAULT '0';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `talert_commands`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
INSERT INTO `talert_commands` (`name`, `command`, `description`, `internal`) VALUES ('Validate Event','Internal type','This alert validate the events matched with a module given the agent name (_field1_) and module name (_field2_)', 1);
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tconfig`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
INSERT INTO `tconfig` (`token`, `value`) VALUES
|
INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||||
('enable_pass_policy', 0),
|
('enable_pass_policy', 0),
|
||||||
('pass_size', 4),
|
('pass_size', 4),
|
||||||
|
@ -263,10 +208,63 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
||||||
('compare_pass', 3),
|
('compare_pass', 3),
|
||||||
('meta_style', 'meta_pandora'),
|
('meta_style', 'meta_pandora'),
|
||||||
('enable_refr', 0);
|
('enable_refr', 0);
|
||||||
|
UPDATE tconfig SET `value`='comparation' WHERE `token`= 'prominent_time';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
-- Table `treport_content_item`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
ALTER TABLE treport_content_item ADD FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
ALTER TABLE `treport_content_item` ADD COLUMN `operation` TEXT;
|
||||||
|
ALTER TABLE treport ADD COLUMN `id_template` INTEGER UNSIGNED DEFAULT 0;
|
||||||
|
ALTER TABLE treport ADD COLUMN `id_group_edit` mediumint(8) unsigned NULL DEFAULT 0;
|
||||||
|
ALTER TABLE treport ADD COLUMN `metaconsole` tinyint(1) DEFAULT 0;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tgraph`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
ALTER TABLE `tgraph` ADD COLUMN `id_graph_template` int(11) NOT NULL DEFAULT 0;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `ttipo_modulo`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
UPDATE ttipo_modulo SET descripcion='Generic data' WHERE id_tipo=1;
|
||||||
|
UPDATE ttipo_modulo SET descripcion='Generic data incremental' WHERE id_tipo=4;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tusuario`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `section` TEXT NOT NULL;
|
||||||
|
INSERT INTO `tusuario` (`section`) VALUES ('Default');
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `data_section` TEXT NOT NULL;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `disabled` int(4) NOT NULL DEFAULT 0;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `shortcut` tinyint(1) DEFAULT 0;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `shortcut_data` text;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `not_login` tinyint(1) unsigned NOT NULL DEFAULT 0;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `force_change_pass` tinyint(1) DEFAULT 0;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `last_pass_change` DATETIME NOT NULL DEFAULT 0;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `last_failed_login` DATETIME NOT NULL DEFAULT 0;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `failed_attempt` int(4) NOT NULL DEFAULT 0;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `login_blocked` tinyint(1) DEFAULT 0;
|
||||||
|
ALTER TABLE `tusuario` ADD COLUMN `metaconsole_access` enum('basic','advanced','custom','all','only_console') DEFAULT 'only_console';
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tmensajes`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
ALTER TABLE `tmensajes` MODIFY COLUMN `mensaje` TEXT NOT NULL;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `talert_compound`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
ALTER TABLE `talert_compound` ADD COLUMN `special_day` tinyint(1) DEFAULT '0';
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `talert_commands`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
INSERT INTO `talert_commands` (`name`, `command`, `description`, `internal`) VALUES ('Validate Event','Internal type','This alert validate the events matched with a module given the agent name (_field1_) and module name (_field2_)', 1);
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
-- Table `tpassword_history`
|
-- Table `tpassword_history`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tpassword_history` (
|
CREATE TABLE IF NOT EXISTS `tpassword_history` (
|
||||||
`id_pass` int(10) unsigned NOT NULL auto_increment,
|
`id_pass` int(10) unsigned NOT NULL auto_increment,
|
||||||
`id_user` varchar(60) NOT NULL,
|
`id_user` varchar(60) NOT NULL,
|
||||||
|
@ -276,60 +274,32 @@ CREATE TABLE IF NOT EXISTS `tpassword_history` (
|
||||||
PRIMARY KEY (`id_pass`)
|
PRIMARY KEY (`id_pass`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tconfig`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
UPDATE tconfig SET `value`='comparation'
|
|
||||||
WHERE `token`= 'prominent_time';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tnetwork_component`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE tnetwork_component ADD `wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard';
|
|
||||||
ALTER TABLE tnetwork_component ADD `only_metaconsole` tinyint(1) unsigned default '0';
|
|
||||||
ALTER TABLE tnetwork_component ADD `macros` text;
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tplugin`
|
-- Table `tplugin`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE tplugin ADD `macros` text;
|
ALTER TABLE tplugin ADD `macros` text;
|
||||||
ALTER TABLE tplugin ADD `parameters` text;
|
ALTER TABLE tplugin ADD `parameters` text;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `trecon_script`
|
-- Table `trecon_script`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
UPDATE trecon_script SET `description`='This script is used to automatically detect SNMP Interfaces on devices, used as Recon Custom Script in the recon task. Parameters used are:

* custom_field1 = network. i.e.: 192.168.100.0/24
* custom_field2 = several communities separated by comma. For example: snmp_community,public,private 
* custom_field3 = optative parameter to force process downed interfaces (use: '-a'). Only up interfaces are processed by default 

See documentation for more information.'
|
UPDATE trecon_script SET `description`='This script is used to automatically detect SNMP Interfaces on devices, used as Recon Custom Script in the recon task. Parameters used are:

* custom_field1 = network. i.e.: 192.168.100.0/24
* custom_field2 = several communities separated by comma. For example: snmp_community,public,private 
* custom_field3 = optative parameter to force process downed interfaces (use: '-a'). Only up interfaces are processed by default 

See documentation for more information.'
|
||||||
WHERE id_recon_script = 1;
|
WHERE id_recon_script = 1;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `trecon_task
|
-- Table `trecon_task
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE trecon_task MODIFY subnet TEXT NOT NULL DEFAULT '';
|
ALTER TABLE trecon_task MODIFY subnet TEXT NOT NULL DEFAULT '';
|
||||||
ALTER TABLE trecon_task MODIFY field1 TEXT NOT NULL DEFAULT '';
|
ALTER TABLE trecon_task MODIFY field1 TEXT NOT NULL DEFAULT '';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tlayout_data
|
-- Table `tlayout_data
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE tlayout_data ADD COLUMN `enable_link` tinyint(1) UNSIGNED NOT NULL default 1;
|
ALTER TABLE tlayout_data ADD COLUMN `enable_link` tinyint(1) UNSIGNED NOT NULL default 1;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tagente_modulo`
|
-- Table `tnetwork_map`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE tagente_modulo ADD `critical_instructions` TEXT NOT NULL default '';
|
ALTER TABLE tnetwork_map ADD `text_filter` VARCHAR(100) NOT NULL DEFAULT "";
|
||||||
ALTER TABLE tagente_modulo ADD `warning_instructions` TEXT NOT NULL default '';
|
ALTER TABLE tnetwork_map ADD `dont_show_subgroups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||||
ALTER TABLE tagente_modulo ADD `unknown_instructions` TEXT NOT NULL default '';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tevento`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE tevento ADD `critical_instructions` TEXT NOT NULL default '';
|
|
||||||
ALTER TABLE tevento ADD `warning_instructions` TEXT NOT NULL default '';
|
|
||||||
ALTER TABLE tevento ADD `unknown_instructions` TEXT NOT NULL default '';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tnetwork_component`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE tnetwork_component ADD `critical_instructions` TEXT NOT NULL default '';
|
|
||||||
ALTER TABLE tnetwork_component ADD `warning_instructions` TEXT NOT NULL default '';
|
|
||||||
ALTER TABLE tnetwork_component ADD `unknown_instructions` TEXT NOT NULL default '';
|
|
||||||
|
|
||||||
|
|
|
@ -332,3 +332,8 @@ ALTER TABLE tnetwork_component ADD (critical_instructions VARCHAR2(255) default
|
||||||
ALTER TABLE tnetwork_component ADD (warning_instructions VARCHAR2(255) default '');
|
ALTER TABLE tnetwork_component ADD (warning_instructions VARCHAR2(255) default '');
|
||||||
ALTER TABLE tnetwork_component ADD (unknown_instructions VARCHAR2(255) default '');
|
ALTER TABLE tnetwork_component ADD (unknown_instructions VARCHAR2(255) default '');
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tnetwork_map`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
ALTER TABLE tnetwork_map ADD (text_filter VARCHAR(100) DEFAULT '');
|
||||||
|
ALTER TABLE tnetwork_map ADD (dont_show_subgroups NUMBER(10, 0) default 0 NOT NULL);
|
|
@ -119,9 +119,9 @@ REFERENCES "tplanned_downtime"("id");
|
||||||
|
|
||||||
ALTER TABLE "tplanned_downtime_agents" ADD COLUMN "all_modules" SMALLINT default 1;
|
ALTER TABLE "tplanned_downtime_agents" ADD COLUMN "all_modules" SMALLINT default 1;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table "tplanned_downtime_modules"
|
-- Table "tplanned_downtime_modules"
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE "tplanned_downtime_modules" (
|
CREATE TABLE "tplanned_downtime_modules" (
|
||||||
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
||||||
"id_agent" BIGINT NOT NULL default 0,
|
"id_agent" BIGINT NOT NULL default 0,
|
||||||
|
@ -129,12 +129,15 @@ CREATE TABLE "tplanned_downtime_modules" (
|
||||||
"id_downtime" BIGINT NOT NULL REFERENCES tplanned_downtime("id") ON DELETE CASCADE
|
"id_downtime" BIGINT NOT NULL REFERENCES tplanned_downtime("id") ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tevento`
|
-- Table `tevento`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
ALTER TABLE "tevento" ADD COLUMN "source" text NULL default '';
|
ALTER TABLE "tevento" ADD COLUMN "source" text NULL default '';
|
||||||
ALTER TABLE "tevento" ADD COLUMN "id_extra" text NULL default '';
|
ALTER TABLE "tevento" ADD COLUMN "id_extra" text NULL default '';
|
||||||
|
ALTER TABLE "tevento" ADD COLUMN "critical_instructions" text default '';
|
||||||
|
ALTER TABLE "tevento" ADD COLUMN "warning_instructions" text default '';
|
||||||
|
ALTER TABLE "tevento" ADD COLUMN "unknown_instructions" text default '';
|
||||||
|
ALTER TYPE type_tevento_event ADD VALUE 'going_unknown' BEFORE 'unknown';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tgrupo`
|
-- Table `tgrupo`
|
||||||
|
@ -160,6 +163,12 @@ ALTER TABLE "talert_snmp" ADD COLUMN "single_value" varchar(255) DEFAULT '';
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
ALTER TABLE "tagente_modulo" ADD COLUMN "module_ff_interval" INTEGER NOT NULL default 0;
|
ALTER TABLE "tagente_modulo" ADD COLUMN "module_ff_interval" INTEGER NOT NULL default 0;
|
||||||
ALTER TABLE "tagente_modulo" ADD COLUMN "quiet" SMALLINT NOT NULL default 0;
|
ALTER TABLE "tagente_modulo" ADD COLUMN "quiet" SMALLINT NOT NULL default 0;
|
||||||
|
CREATE TYPE type_tagente_modulo_wizard_level AS ENUM ('basic','advanced','custom','nowizard');
|
||||||
|
ALTER TABLE "tagente_modulo" ADD COLUMN "wizard_level" type_tagente_modulo_wizard_level default 'nowizard';
|
||||||
|
ALTER TABLE "tagente_modulo" ADD COLUMN "macros" TEXT default '';
|
||||||
|
ALTER TABLE "tagente_modulo" ADD COLUMN "critical_instructions" text default '';
|
||||||
|
ALTER TABLE "tagente_modulo" ADD COLUMN "warning_instructions" text default '';
|
||||||
|
ALTER TABLE "tagente_modulo" ADD COLUMN "unknown_instructions" text default '';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tevent_filter`
|
-- Table `tevent_filter`
|
||||||
|
@ -286,14 +295,6 @@ ALTER TABLE "tnetwork_component" ADD COLUMN "wizard_level" type_tnetwork_compone
|
||||||
ALTER TABLE "tnetwork_component" ADD COLUMN "only_metaconsole" INTEGER default '0';
|
ALTER TABLE "tnetwork_component" ADD COLUMN "only_metaconsole" INTEGER default '0';
|
||||||
ALTER TABLE "tnetwork_component" ADD COLUMN "macros" TEXT default '';
|
ALTER TABLE "tnetwork_component" ADD COLUMN "macros" TEXT default '';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tagente_modulo`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
|
|
||||||
CREATE TYPE type_tagente_modulo_wizard_level AS ENUM ('basic','advanced','custom','nowizard');
|
|
||||||
ALTER TABLE "tagente_modulo" ADD COLUMN "wizard_level" type_tagente_modulo_wizard_level default 'nowizard';
|
|
||||||
ALTER TABLE "tagente_modulo" ADD COLUMN "macros" TEXT default '';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tplugin`
|
-- Table `tplugin`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
|
@ -301,36 +302,26 @@ ALTER TABLE "tagente_modulo" ADD COLUMN "macros" TEXT default '';
|
||||||
ALTER TABLE "tplugin" ADD COLUMN "macros" TEXT default '';
|
ALTER TABLE "tplugin" ADD COLUMN "macros" TEXT default '';
|
||||||
ALTER TABLE "tplugin" ADD COLUMN "parameters" TEXT default '';
|
ALTER TABLE "tplugin" ADD COLUMN "parameters" TEXT default '';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `trecon_task`
|
-- Table `trecon_task`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE "trecon_task" ALTER COLUMN "subnet" TYPE TEXT;
|
ALTER TABLE "trecon_task" ALTER COLUMN "subnet" TYPE TEXT;
|
||||||
ALTER TABLE "trecon_task" ALTER COLUMN "field1" TYPE TEXT;
|
ALTER TABLE "trecon_task" ALTER COLUMN "field1" TYPE TEXT;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tlayout_data`
|
-- Table `tlayout_data`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE "tlayout_data" ADD COLUMN "enable_link" SMALLINT NOT NULL default 1;
|
ALTER TABLE "tlayout_data" ADD COLUMN "enable_link" SMALLINT NOT NULL default 1;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tevento`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE "tevento" ADD COLUMN "critical_instructions" text default '';
|
|
||||||
ALTER TABLE "tevento" ADD COLUMN "warning_instructions" text default '';
|
|
||||||
ALTER TABLE "tevento" ADD COLUMN "unknown_instructions" text default '';
|
|
||||||
ALTER TYPE type_tevento_event ADD VALUE 'going_unknown' BEFORE 'unknown';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tagente_modulo`
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
ALTER TABLE "tagente_modulo" ADD COLUMN "critical_instructions" text default '';
|
|
||||||
ALTER TABLE "tagente_modulo" ADD COLUMN "warning_instructions" text default '';
|
|
||||||
ALTER TABLE "tagente_modulo" ADD COLUMN "unknown_instructions" text default '';
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
|
||||||
-- Table `tnetwork_component`
|
-- Table `tnetwork_component`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
ALTER TABLE "tnetwork_component" ADD COLUMN "critical_instructions" text default '';
|
ALTER TABLE "tnetwork_component" ADD COLUMN "critical_instructions" text default '';
|
||||||
ALTER TABLE "tnetwork_component" ADD COLUMN "warning_instructions" text default '';
|
ALTER TABLE "tnetwork_component" ADD COLUMN "warning_instructions" text default '';
|
||||||
ALTER TABLE "tnetwork_component" ADD COLUMN "unknown_instructions" text default '';
|
ALTER TABLE "tnetwork_component" ADD COLUMN "unknown_instructions" text default '';
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tnetwork_map`
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
ALTER TABLE "tnetwork_map" ADD COLUMN "text_filter" VARCHAR(100) DEFAULT '';
|
||||||
|
ALTER TABLE "tnetwork_map" ADD COLUMN "dont_show_subgroups" INTEGER NOT NULL DEFAULT 0;
|
|
@ -135,7 +135,8 @@ config_check();
|
||||||
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh');
|
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh');
|
||||||
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
if (!isset($_GET['sec2']))
|
if (!isset($_GET['sec2']))
|
||||||
$_GET['sec2'] = '';
|
$_GET['sec2'] = '';
|
||||||
|
@ -147,7 +148,8 @@ config_check();
|
||||||
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh');
|
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh');
|
||||||
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
echo ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$ignored_params['refr'] = '';
|
$ignored_params['refr'] = '';
|
||||||
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh').'</a>';
|
echo '<a id="autorefresh" class="white_bold" href="' . ui_get_url_refresh ($ignored_params).'">' . html_print_image("images/page_refresh.png", true, array("class" => 'bot', "alt" => 'lightning')) . ' '. __('Autorefresh').'</a>';
|
||||||
$values = array (
|
$values = array (
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
/* You can redefine $url and unset $id_agente to reuse the form. Dirty (hope temporal) hack */
|
/* You can redefine $url and unset $id_agente to reuse the form. Dirty (hope temporal) hack */
|
||||||
if (isset ($id_agente)) {
|
if (isset ($id_agente)) {
|
||||||
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente;
|
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente;
|
||||||
|
}
|
||||||
} else {
|
else {
|
||||||
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module';
|
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ $result_ins = -1;
|
||||||
$update = (string)get_parameter('update', 0);
|
$update = (string)get_parameter('update', 0);
|
||||||
$create = (string)get_parameter('create', 0);
|
$create = (string)get_parameter('create', 0);
|
||||||
|
|
||||||
if ($create){
|
if ($create) {
|
||||||
$name = (string) get_parameter ('name');
|
$name = (string) get_parameter ('name');
|
||||||
$group = (int) get_parameter ('id_group');
|
$group = (int) get_parameter ('id_group');
|
||||||
$description = get_parameter('description','');
|
$description = get_parameter('description','');
|
||||||
|
@ -49,7 +49,8 @@ if ($create){
|
||||||
|
|
||||||
$id = $result_ins;
|
$id = $result_ins;
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$id = (int)get_parameter('id');
|
$id = (int)get_parameter('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -419,7 +419,8 @@ function ldap_load_user ($login) {
|
||||||
$ret["is_admin"] = is_user_admin ($info[0][$config["auth"]["ldap_user_attr"]["id_user"]][0]);
|
$ret["is_admin"] = is_user_admin ($info[0][$config["auth"]["ldap_user_attr"]["id_user"]][0]);
|
||||||
if (isset ($info[0][$ldap_key])) {
|
if (isset ($info[0][$ldap_key])) {
|
||||||
$ret[$internal_key] = $info[0][$ldap_key][0];
|
$ret[$internal_key] = $info[0][$ldap_key][0];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$ret[$internal_key] = '';
|
$ret[$internal_key] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -506,7 +507,8 @@ function get_users ($order = false) {
|
||||||
$sr = @ldap_search ($ldap_cache["ds"], $config["auth"]["ldap_base_dn"], $config["auth"]["ldap_user_filter"], array_values ($config["auth"]["ldap_user_attr"]));
|
$sr = @ldap_search ($ldap_cache["ds"], $config["auth"]["ldap_base_dn"], $config["auth"]["ldap_user_filter"], array_values ($config["auth"]["ldap_user_attr"]));
|
||||||
if (!$sr) {
|
if (!$sr) {
|
||||||
$ldap_cache["error"] .= 'Error searching LDAP server (get_users): ' . ldap_error( $ldap_cache["ds"] );
|
$ldap_cache["error"] .= 'Error searching LDAP server (get_users): ' . ldap_error( $ldap_cache["ds"] );
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
ldap_sort ($ldap_cache["ds"], $sr, $config["auth"]["ldap_user_attr"]["fullname"]);
|
ldap_sort ($ldap_cache["ds"], $sr, $config["auth"]["ldap_user_attr"]["fullname"]);
|
||||||
$info = @ldap_get_entries( $ldap_cache["ds"], $sr );
|
$info = @ldap_get_entries( $ldap_cache["ds"], $sr );
|
||||||
for ( $i = 0; $i < $info['count']; $i++ ) {
|
for ( $i = 0; $i < $info['count']; $i++ ) {
|
||||||
|
@ -514,7 +516,8 @@ function get_users ($order = false) {
|
||||||
$ret[$info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]]["last_connect"] = $time;
|
$ret[$info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]]["last_connect"] = $time;
|
||||||
if (isset ($info[$i][$ldap_key])) {
|
if (isset ($info[$i][$ldap_key])) {
|
||||||
$ret[$info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]][$internal_key] = $info[$i][$ldap_key][0];
|
$ret[$info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]][$internal_key] = $info[$i][$ldap_key][0];
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$ret[$info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]][$internal_key] = '';
|
$ret[$info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]][$internal_key] = '';
|
||||||
}
|
}
|
||||||
$ret[$info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]]["is_admin"] = is_user_admin ($info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]);
|
$ret[$info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]]["is_admin"] = is_user_admin ($info[$i][$config["auth"]["ldap_user_attr"]["id_user"]][0]);
|
||||||
|
@ -541,6 +544,7 @@ function get_users ($order = false) {
|
||||||
function stripdn ($dn) {
|
function stripdn ($dn) {
|
||||||
list ($uid, $trash) = explode (',', $dn, 2);
|
list ($uid, $trash) = explode (',', $dn, 2);
|
||||||
list ($trash, $user) = explode ('=', $uid);
|
list ($trash, $user) = explode ('=', $uid);
|
||||||
|
|
||||||
return ($user);
|
return ($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,11 +79,13 @@ function safe_int ($value, $min = false, $max = false) {
|
||||||
$check = safe_int ($check, $min, $max);
|
$check = safe_int ($check, $min, $max);
|
||||||
if ($check !== false) {
|
if ($check !== false) {
|
||||||
$value[$key] = $check;
|
$value[$key] = $check;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
unset ($value[$key]);
|
unset ($value[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$value = (int) $value; //Cast as integer
|
$value = (int) $value; //Cast as integer
|
||||||
if (($min !== false && $value < $min) || ($max !== false && $value > $max)) {
|
if (($min !== false && $value < $min) || ($max !== false && $value > $max)) {
|
||||||
//If it's smaller than min or larger than max return false
|
//If it's smaller than min or larger than max return false
|
||||||
|
|
|
@ -66,7 +66,8 @@ function db_connect($host = null, $db = null, $user = null, $pass = null, $port
|
||||||
if ($critical) {
|
if ($critical) {
|
||||||
include ($config["homedir"]."/general/error_authconfig.php");
|
include ($config["homedir"]."/general/error_authconfig.php");
|
||||||
exit;
|
exit;
|
||||||
} else if ($error == 0) {
|
}
|
||||||
|
else if ($error == 0) {
|
||||||
// Display the error once even if multiple connection attempts are made
|
// Display the error once even if multiple connection attempts are made
|
||||||
$error = 1;
|
$error = 1;
|
||||||
ui_print_error_message (__("Error connecting to database %s at %s.", $db, $host));
|
ui_print_error_message (__("Error connecting to database %s at %s.", $db, $host));
|
||||||
|
|
|
@ -503,36 +503,36 @@ function groups_get_status ($id_group = 0) {
|
||||||
$agents = agents_get_group_agents($id_group);
|
$agents = agents_get_group_agents($id_group);
|
||||||
|
|
||||||
$agents_status = array();
|
$agents_status = array();
|
||||||
foreach($agents as $key => $agent){
|
foreach ($agents as $key => $agent) {
|
||||||
$agents_status[] = agents_get_status($key);
|
$agents_status[] = agents_get_status($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
$childrens = groups_get_childrens($id_group);
|
$childrens = groups_get_childrens($id_group);
|
||||||
|
|
||||||
foreach($childrens as $key => $child){
|
foreach ($childrens as $key => $child) {
|
||||||
$agents_status[] = groups_get_status($key);
|
$agents_status[] = groups_get_status($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status is 0 for normal, 1 for critical, 2 for warning and 3/-1 for unknown. 4 for fired alerts
|
// Status is 0 for normal, 1 for critical, 2 for warning and 3/-1 for unknown. 4 for fired alerts
|
||||||
|
|
||||||
// Checking if any agent has fired alert (4)
|
// Checking if any agent has fired alert (4)
|
||||||
if(is_int(array_search(4,$agents_status))){
|
if (is_int(array_search(4,$agents_status))) {
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
// Checking if any agent has critical status (1)
|
// Checking if any agent has critical status (1)
|
||||||
elseif(is_int(array_search(1,$agents_status))){
|
elseif (is_int(array_search(1,$agents_status))) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// Checking if any agent has warning status (2)
|
// Checking if any agent has warning status (2)
|
||||||
elseif(is_int(array_search(2,$agents_status))){
|
elseif (is_int(array_search(2,$agents_status))) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
// Checking if any agent has unknown status (-1)
|
// Checking if any agent has unknown status (-1)
|
||||||
elseif(is_int(array_search(-1,$agents_status))){
|
elseif (is_int(array_search(-1,$agents_status))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// Checking if any agents module has unknown status (3)
|
// Checking if any agents module has unknown status (3)
|
||||||
elseif(is_int(array_search(3,$agents_status))){
|
elseif (is_int(array_search(3,$agents_status))) {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -551,7 +551,7 @@ function groups_get_status ($id_group = 0) {
|
||||||
* @return string The group name
|
* @return string The group name
|
||||||
*/
|
*/
|
||||||
function groups_get_name ($id_group, $returnAllGroup = false) {
|
function groups_get_name ($id_group, $returnAllGroup = false) {
|
||||||
if($id_group > 0)
|
if ($id_group > 0)
|
||||||
return (string) db_get_value ('nombre', 'tgrupo', 'id_grupo', (int) $id_group);
|
return (string) db_get_value ('nombre', 'tgrupo', 'id_grupo', (int) $id_group);
|
||||||
elseif($returnAllGroup)
|
elseif($returnAllGroup)
|
||||||
return "All";
|
return "All";
|
||||||
|
@ -580,17 +580,17 @@ function groups_get_users ($id_group, $filter = false) {
|
||||||
$resultb = array();
|
$resultb = array();
|
||||||
$resultb = db_get_all_rows_filter ("tusuario_perfil", $filter);
|
$resultb = db_get_all_rows_filter ("tusuario_perfil", $filter);
|
||||||
|
|
||||||
if($resulta == false && $resultb == false)
|
if ($resulta == false && $resultb == false)
|
||||||
$result = false;
|
$result = false;
|
||||||
elseif($resulta == false)
|
elseif ($resulta == false)
|
||||||
$result = $resultb;
|
$result = $resultb;
|
||||||
elseif($resultb == false)
|
elseif ($resultb == false)
|
||||||
$result = $resulta;
|
$result = $resulta;
|
||||||
else
|
else
|
||||||
$result = array_merge($resulta,$resultb);
|
$result = array_merge($resulta,$resultb);
|
||||||
|
|
||||||
if ($result === false)
|
if ($result === false)
|
||||||
return array ();
|
return array ();
|
||||||
|
|
||||||
//This removes stale users from the list. This can happen if switched to another auth scheme
|
//This removes stale users from the list. This can happen if switched to another auth scheme
|
||||||
//(internal users still exist) or external auth has users removed/inactivated from the list (eg. LDAP)
|
//(internal users still exist) or external auth has users removed/inactivated from the list (eg. LDAP)
|
||||||
|
@ -636,7 +636,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
||||||
return; // Skip empty groups
|
return; // Skip empty groups
|
||||||
|
|
||||||
// Calculate entire row color
|
// Calculate entire row color
|
||||||
if ($data["monitor_alerts_fired"] > 0){
|
if ($data["monitor_alerts_fired"] > 0) {
|
||||||
echo "<tr class='group_view_alrm' style='height: 35px;'>";
|
echo "<tr class='group_view_alrm' style='height: 35px;'>";
|
||||||
}
|
}
|
||||||
elseif ($data["monitor_critical"] > 0) {
|
elseif ($data["monitor_critical"] > 0) {
|
||||||
|
@ -708,7 +708,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Monitors Unknown
|
// Monitors Unknown
|
||||||
if ($data["monitor_unknown"] > 0){
|
if ($data["monitor_unknown"] > 0) {
|
||||||
echo "<td class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
echo "<td class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
||||||
echo "<a style='font-weight: bold; font-size: 18px; color: #666; text-align: center;'
|
echo "<a style='font-weight: bold; font-size: 18px; color: #666; text-align: center;'
|
||||||
href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=3'>";
|
href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=3'>";
|
||||||
|
@ -722,10 +722,10 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
||||||
|
|
||||||
|
|
||||||
// Monitors Not Init
|
// Monitors Not Init
|
||||||
if ($data["monitor_not_init"] > 0){
|
if ($data["monitor_not_init"] > 0) {
|
||||||
echo "<td class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
echo "<td class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
||||||
echo "<a class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'
|
echo "<a class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'
|
||||||
href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=5'>";
|
href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=5'>";
|
||||||
echo $data["monitor_not_init"];
|
echo $data["monitor_not_init"];
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
@ -738,7 +738,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
||||||
// Monitors OK
|
// Monitors OK
|
||||||
echo "<td class='group_view_data_ok' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
echo "<td class='group_view_data_ok' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
||||||
if ($data["monitor_ok"] > 0) {
|
if ($data["monitor_ok"] > 0) {
|
||||||
echo "<a class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;' href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=0'>";
|
echo "<a class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;' href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=0'>";
|
||||||
echo $data["monitor_ok"];
|
echo $data["monitor_ok"];
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
}
|
}
|
||||||
|
@ -748,10 +748,10 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
|
||||||
// Monitors Warning
|
// Monitors Warning
|
||||||
if ($data["monitor_warning"] > 0){
|
if ($data["monitor_warning"] > 0) {
|
||||||
echo "<td class='group_view_data_warn' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
echo "<td class='group_view_data_warn' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
||||||
echo "<a class='group_view_data_warn' class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'
|
echo "<a class='group_view_data_warn' class='group_view_data_unk' style='font-weight: bold; font-size: 18px; text-align: center;'
|
||||||
href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=1'>";
|
href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=1'>";
|
||||||
echo $data["monitor_warning"];
|
echo $data["monitor_warning"];
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
@ -761,10 +761,10 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Monitors Critical
|
// Monitors Critical
|
||||||
if ($data["monitor_critical"] > 0){
|
if ($data["monitor_critical"] > 0) {
|
||||||
echo "<td class='group_view_data_crit' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
echo "<td class='group_view_data_crit' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
||||||
echo "<a class='group_view_data_crit' style='font-weight: bold; font-size: 18px; text-align: center;'
|
echo "<a class='group_view_data_crit' style='font-weight: bold; font-size: 18px; text-align: center;'
|
||||||
href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=2'>";
|
href='index.php?sec=estado&sec2=operation/agentes/status_monitor&ag_group=$id_group&status=2'>";
|
||||||
echo $data["monitor_critical"];
|
echo $data["monitor_critical"];
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
|
@ -773,7 +773,7 @@ function groups_get_group_row($id_group, $group_all, $group, &$printed_groups) {
|
||||||
echo "<td></td>";
|
echo "<td></td>";
|
||||||
}
|
}
|
||||||
// Alerts fired
|
// Alerts fired
|
||||||
if ($data["monitor_alerts_fired"] > 0){
|
if ($data["monitor_alerts_fired"] > 0) {
|
||||||
echo "<td class='group_view_data_alrm' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
echo "<td class='group_view_data_alrm' style='font-weight: bold; font-size: 18px; text-align: center;'>";
|
||||||
echo "<a class='group_view_data_alrm' style='font-weight: bold; font-size: 18px; text-align: center;'
|
echo "<a class='group_view_data_alrm' style='font-weight: bold; font-size: 18px; text-align: center;'
|
||||||
href='index.php?sec=estado&sec2=operation/agentes/alerts_status&ag_group=$id_group&filter=fired'>";
|
href='index.php?sec=estado&sec2=operation/agentes/alerts_status&ag_group=$id_group&filter=fired'>";
|
||||||
|
@ -819,7 +819,7 @@ function groups_get_group_by_id($id_group) {
|
||||||
*/
|
*/
|
||||||
function groups_create_group($group_name, $rest_values){
|
function groups_create_group($group_name, $rest_values){
|
||||||
|
|
||||||
if ($group_name == ""){
|
if ($group_name == "") {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -831,7 +831,8 @@ function groups_create_group($group_name, $rest_values){
|
||||||
|
|
||||||
if (!$check){
|
if (!$check){
|
||||||
$result = db_process_sql_insert('tgrupo', $values);
|
$result = db_process_sql_insert('tgrupo', $values);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$result = false;
|
$result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -845,8 +846,8 @@ function groups_agent_unknown ($group_array) {
|
||||||
|
|
||||||
if (empty ($group_array)) {
|
if (empty ($group_array)) {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
} else if (!is_array ($group_array)){
|
else if (!is_array ($group_array)) {
|
||||||
$group_array = array($group_array);
|
$group_array = array($group_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -855,50 +856,48 @@ function groups_agent_unknown ($group_array) {
|
||||||
|
|
||||||
// Agent of module group X and critical status
|
// Agent of module group X and critical status
|
||||||
$agents_critical = "SELECT tagente.id_agente
|
$agents_critical = "SELECT tagente.id_agente
|
||||||
FROM tagente_estado, tagente, tagente_modulo
|
FROM tagente_estado, tagente, tagente_modulo
|
||||||
WHERE tagente_estado.id_agente = tagente.id_agente
|
WHERE tagente_estado.id_agente = tagente.id_agente
|
||||||
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
|
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
|
||||||
AND tagente.disabled = 0
|
AND tagente.disabled = 0
|
||||||
AND tagente_modulo.disabled = 0
|
AND tagente_modulo.disabled = 0
|
||||||
AND estado = 1
|
AND estado = 1
|
||||||
AND tagente_estado.utimestamp != 0
|
AND tagente_estado.utimestamp != 0
|
||||||
AND tagente.id_grupo IN $group_clause
|
AND tagente.id_grupo IN $group_clause
|
||||||
group by tagente.id_agente";
|
GROUP by tagente.id_agente";
|
||||||
|
|
||||||
// Agent of module group X and warning status
|
// Agent of module group X and warning status
|
||||||
$agents_warning = "SELECT tagente.id_agente
|
$agents_warning = "SELECT tagente.id_agente
|
||||||
FROM tagente_estado, tagente, tagente_modulo
|
FROM tagente_estado, tagente, tagente_modulo
|
||||||
WHERE tagente_estado.id_agente = tagente.id_agente
|
WHERE tagente_estado.id_agente = tagente.id_agente
|
||||||
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
|
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
|
||||||
AND tagente.disabled = 0
|
AND tagente.disabled = 0
|
||||||
AND tagente_modulo.disabled = 0
|
AND tagente_modulo.disabled = 0
|
||||||
AND estado = 2
|
AND estado = 2
|
||||||
AND tagente_estado.utimestamp != 0
|
AND tagente_estado.utimestamp != 0
|
||||||
AND tagente.id_grupo IN $group_clause
|
AND tagente.id_grupo IN $group_clause
|
||||||
group by tagente.id_agente";
|
GROUP by tagente.id_agente";
|
||||||
|
|
||||||
// Agent of module group X and unknown status
|
// Agent of module group X and unknown status
|
||||||
$agents_unknown = "SELECT tagente.id_agente
|
$agents_unknown = "SELECT tagente.id_agente
|
||||||
FROM tagente_estado, tagente, tagente_modulo
|
FROM tagente_estado, tagente, tagente_modulo
|
||||||
WHERE tagente_estado.id_agente = tagente.id_agente
|
WHERE tagente_estado.id_agente = tagente.id_agente
|
||||||
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
|
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
|
||||||
AND tagente.disabled = 0
|
AND tagente.disabled = 0
|
||||||
AND tagente_modulo.disabled = 0
|
AND tagente_modulo.disabled = 0
|
||||||
AND estado = 3
|
AND estado = 3
|
||||||
AND tagente_estado.utimestamp != 0
|
AND tagente_estado.utimestamp != 0
|
||||||
AND tagente.id_grupo IN $group_clause
|
AND tagente.id_grupo IN $group_clause
|
||||||
group by tagente.id_agente";
|
GROUP by tagente.id_agente";
|
||||||
|
|
||||||
return db_get_sql ("SELECT COUNT(*) FROM ( SELECT DISTINCT tagente.id_agente
|
return db_get_sql ("SELECT COUNT(*) FROM ( SELECT DISTINCT tagente.id_agente
|
||||||
FROM tagente, tagente_modulo, tagente_estado
|
FROM tagente, tagente_modulo, tagente_estado
|
||||||
WHERE tagente.id_agente = tagente_modulo.id_agente
|
WHERE tagente.id_agente = tagente_modulo.id_agente
|
||||||
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
||||||
|
AND tagente.id_grupo IN $group_clause
|
||||||
AND tagente.id_grupo IN $group_clause
|
AND tagente.id_agente NOT IN ($agents_critical)
|
||||||
AND tagente.id_agente NOT IN ($agents_critical)
|
AND tagente.id_agente NOT IN ($agents_warning)
|
||||||
AND tagente.id_agente NOT IN ($agents_warning)
|
AND tagente.id_agente IN ($agents_unknown) ) AS t");
|
||||||
AND tagente.id_agente IN ($agents_unknown) ) AS t");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ok agents by using the status code in modules.
|
// Get ok agents by using the status code in modules.
|
||||||
|
@ -908,7 +907,8 @@ function groups_agent_ok ($group_array) {
|
||||||
if (empty ($group_array)) {
|
if (empty ($group_array)) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
} else if (!is_array ($group_array)){
|
}
|
||||||
|
else if (!is_array ($group_array)){
|
||||||
$group_array = array($group_array);
|
$group_array = array($group_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,13 +46,30 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0,
|
||||||
$font_size = 12, $layout = 'radial', $nooverlap = 0, $zoom = 1,
|
$font_size = 12, $layout = 'radial', $nooverlap = 0, $zoom = 1,
|
||||||
$ranksep = 2.5, $center = 0, $regen = 1, $pure = 0,
|
$ranksep = 2.5, $center = 0, $regen = 1, $pure = 0,
|
||||||
$id_networkmap = 0, $show_snmp_modules = 0, $cut_names = true,
|
$id_networkmap = 0, $show_snmp_modules = 0, $cut_names = true,
|
||||||
$relative = false) {
|
$relative = false, $text_filter = '') {
|
||||||
|
|
||||||
|
global $config;
|
||||||
|
|
||||||
$parents = array();
|
$parents = array();
|
||||||
$orphans = array();
|
$orphans = array();
|
||||||
|
|
||||||
$filter = array ();
|
$filter = array ();
|
||||||
$filter['disabled'] = 0;
|
$filter['disabled'] = 0;
|
||||||
|
|
||||||
|
if (!empty($text_filter)) {
|
||||||
|
switch ($config['dbtype']) {
|
||||||
|
case "mysql":
|
||||||
|
case "postgresql":
|
||||||
|
$filter[] =
|
||||||
|
'(nombre COLLATE utf8_general_ci LIKE "%' . $text_filter . '%")';
|
||||||
|
break;
|
||||||
|
case "oracle":
|
||||||
|
$filter[] =
|
||||||
|
'(upper(nombre) LIKE upper("%' . $text_filter . '%"))';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($group >= 1) {
|
if ($group >= 1) {
|
||||||
$filter['id_grupo'] = $group;
|
$filter['id_grupo'] = $group;
|
||||||
|
|
||||||
|
@ -128,6 +145,8 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0,
|
||||||
$node_count++;
|
$node_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$stats = array();
|
||||||
|
|
||||||
// Create nodes
|
// Create nodes
|
||||||
foreach ($nodes as $node_id => $node) {
|
foreach ($nodes as $node_id => $node) {
|
||||||
if ($center > 0 && ! networkmap_is_descendant ($node_id, $center, $parents)) {
|
if ($center > 0 && ! networkmap_is_descendant ($node_id, $center, $parents)) {
|
||||||
|
@ -177,7 +196,7 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate a dot graph definition for graphviz with groups
|
// Generate a dot graph definition for graphviz with groups
|
||||||
function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0, $font_size = 12, $layout = 'radial', $nooverlap = 0, $zoom = 1, $ranksep = 2.5, $center = 0, $regen = 1, $pure = 0, $modwithalerts = 0, $module_group = 0, $hidepolicymodules = 0, $depth = 'all', $id_networkmap = 0) {
|
function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0, $font_size = 12, $layout = 'radial', $nooverlap = 0, $zoom = 1, $ranksep = 2.5, $center = 0, $regen = 1, $pure = 0, $modwithalerts = 0, $module_group = 0, $hidepolicymodules = 0, $depth = 'all', $id_networkmap = 0, $dont_show_subgroups = 0) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$parents = array();
|
$parents = array();
|
||||||
|
@ -192,7 +211,12 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
|
||||||
$id_groups = groups_get_id_recursive($group, true);
|
$id_groups = groups_get_id_recursive($group, true);
|
||||||
|
|
||||||
foreach($id_groups as $id_group) {
|
foreach($id_groups as $id_group) {
|
||||||
if(check_acl($config["id_user"], $id_group, 'AR')) {
|
$add = false;
|
||||||
|
if (check_acl($config["id_user"], $id_group, 'AR')) {
|
||||||
|
$add = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($add) {
|
||||||
$groups[] = db_get_row ('tgrupo', 'id_grupo', $id_group);
|
$groups[] = db_get_row ('tgrupo', 'id_grupo', $id_group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -225,13 +249,19 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
|
||||||
|
|
||||||
$node_count = 0;
|
$node_count = 0;
|
||||||
|
|
||||||
|
$groups_hiden = array();
|
||||||
foreach ($nodes_groups as $node_group) {
|
foreach ($nodes_groups as $node_group) {
|
||||||
|
|
||||||
$node_count++;
|
$node_count++;
|
||||||
|
|
||||||
// Save node parent information to define edges later
|
// Save node parent information to define edges later
|
||||||
if ($node_group['parent'] != "0" && $node_group['id_grupo'] != $group) {
|
if ($node_group['parent'] != "0" && $node_group['id_grupo'] != $group) {
|
||||||
$parents[$node_count] = $nodes_groups[$node_group['parent']]['id_node'];
|
if ((!$dont_show_subgroups) || ($group == 0)) {
|
||||||
|
$parents[$node_count] = $nodes_groups[$node_group['parent']]['id_node'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$groups_hiden[$node_group['id_grupo']] = 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$orphans[$node_count] = 1;
|
$orphans[$node_count] = 1;
|
||||||
|
@ -251,6 +281,12 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
|
||||||
// Parse agents
|
// Parse agents
|
||||||
$nodes_agents = array();
|
$nodes_agents = array();
|
||||||
foreach ($agents as $agent) {
|
foreach ($agents as $agent) {
|
||||||
|
if ($dont_show_subgroups) {
|
||||||
|
if (!empty($groups_hiden[$agent['id_grupo']])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$node_count ++;
|
$node_count ++;
|
||||||
// Save node parent information to define edges later
|
// Save node parent information to define edges later
|
||||||
$parents[$node_count] = $agent['parent'] = $nodes_groups[$agent['id_grupo']]['id_node'];
|
$parents[$node_count] = $agent['parent'] = $nodes_groups[$agent['id_grupo']]['id_node'];
|
||||||
|
@ -270,7 +306,7 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
|
||||||
foreach ($modules as $key => $module) {
|
foreach ($modules as $key => $module) {
|
||||||
$node_count ++;
|
$node_count ++;
|
||||||
$agent_module = modules_get_agentmodule($key);
|
$agent_module = modules_get_agentmodule($key);
|
||||||
$alerts_module = db_get_sql('SELECT count(*) as num
|
$alerts_module = db_get_sql('SELECT count(*) AS num
|
||||||
FROM talert_template_modules
|
FROM talert_template_modules
|
||||||
WHERE id_agent_module = ' . $key);
|
WHERE id_agent_module = ' . $key);
|
||||||
|
|
||||||
|
@ -635,7 +671,7 @@ function networkmap_get_filter ($layout) {
|
||||||
*
|
*
|
||||||
* @return mixed New networkmap id if created. False if it could not be created.
|
* @return mixed New networkmap id if created. False if it could not be created.
|
||||||
*/
|
*/
|
||||||
function networkmap_create_networkmap ($name, $type = 'topology', $layout = 'radial', $nooverlap = true, $simple = false, $regenerate = true, $font_size = 12, $id_group = 0, $id_module_group = 0, $depth = 'all', $only_modules_with_alerts = false, $hide_policy_modules = false, $zoom = 1, $distance_nodes = 2.5, $center = 0) {
|
function networkmap_create_networkmap ($name, $type = 'topology', $layout = 'radial', $nooverlap = true, $simple = false, $regenerate = true, $font_size = 12, $id_group = 0, $id_module_group = 0, $depth = 'all', $only_modules_with_alerts = false, $hide_policy_modules = false, $zoom = 1, $distance_nodes = 2.5, $center = 0, $text_filter = '', $dont_show_subgroups = 0) {
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -657,6 +693,8 @@ function networkmap_create_networkmap ($name, $type = 'topology', $layout = 'rad
|
||||||
$values['distance_nodes'] = $distance_nodes;
|
$values['distance_nodes'] = $distance_nodes;
|
||||||
$values['center'] = $center;
|
$values['center'] = $center;
|
||||||
$values['id_user'] = $config['id_user'];
|
$values['id_user'] = $config['id_user'];
|
||||||
|
$values['text_filter'] = $text_filter;
|
||||||
|
$values['dont_show_subgroups'] = $dont_show_subgroups;
|
||||||
|
|
||||||
return @db_process_sql_insert ('tnetwork_map', $values);
|
return @db_process_sql_insert ('tnetwork_map', $values);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,8 @@ function servers_get_names () {
|
||||||
* This function forces a recon task to be queued by the server asap
|
* This function forces a recon task to be queued by the server asap
|
||||||
*/
|
*/
|
||||||
function servers_force_recon_task($id_recon_task) {
|
function servers_force_recon_task($id_recon_task) {
|
||||||
$values = array('utimestamp' => 0, 'status' => 1);
|
$values = array('utimestamp' => 0, 'status' => 1);
|
||||||
db_process_sql_update('trecon_task', $values, array('id_rt' => $id_recon_task));
|
db_process_sql_update('trecon_task', $values, array('id_rt' => $id_recon_task));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -234,7 +234,7 @@ function servers_get_info ($id_server = -1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config["realtimestats"] == 0){
|
if ($config["realtimestats"] == 0) {
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
// Take data from database if not realtime stats
|
// Take data from database if not realtime stats
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
|
@ -284,9 +284,9 @@ function servers_get_info ($id_server = -1) {
|
||||||
AND tagente.server_name = '" . $server["name"] . "'
|
AND tagente.server_name = '" . $server["name"] . "'
|
||||||
AND (UNIX_TIMESTAMP() - utimestamp) < (tagent_module_inventory.interval * 10)
|
AND (UNIX_TIMESTAMP() - utimestamp) < (tagent_module_inventory.interval * 10)
|
||||||
AND (UNIX_TIMESTAMP() - utimestamp) > tagent_module_inventory.interval");
|
AND (UNIX_TIMESTAMP() - utimestamp) > tagent_module_inventory.interval");
|
||||||
|
|
||||||
// Export server
|
// Export server
|
||||||
} else if ($server["server_type"] == 7) {
|
}
|
||||||
|
else if ($server["server_type"] == 7) {
|
||||||
|
|
||||||
// Get modules exported by this server
|
// Get modules exported by this server
|
||||||
$server["modules"] = db_get_sql ("SELECT COUNT(tagente_modulo.id_agente_modulo) FROM tagente, tagente_modulo, tserver_export WHERE tagente.disabled=0 AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.id_export = tserver_export.id AND tserver_export.id_export_server = " . $server["id_server"]);
|
$server["modules"] = db_get_sql ("SELECT COUNT(tagente_modulo.id_agente_modulo) FROM tagente, tagente_modulo, tserver_export WHERE tagente.disabled=0 AND tagente_modulo.id_agente = tagente.id_agente AND tagente_modulo.id_export = tserver_export.id AND tserver_export.id_export_server = " . $server["id_server"]);
|
||||||
|
@ -329,7 +329,8 @@ function servers_get_info ($id_server = -1) {
|
||||||
$server["module_lag"] = db_get_sql ("SELECT COUNT(id_rt) FROM trecon_task WHERE ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (86400)) > (utimestamp + interval_sweep) AND id_recon_server = ".$server["id_server"]);
|
$server["module_lag"] = db_get_sql ("SELECT COUNT(id_rt) FROM trecon_task WHERE ceil((sysdate - to_date('19700101000000','YYYYMMDDHH24MISS')) * (86400)) > (utimestamp + interval_sweep) AND id_recon_server = ".$server["id_server"]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
// Data, Plugin, WMI, Network and Others
|
// Data, Plugin, WMI, Network and Others
|
||||||
|
@ -443,7 +444,8 @@ function servers_get_info ($id_server = -1) {
|
||||||
|
|
||||||
if ($server["modules_total"] > 0) {
|
if ($server["modules_total"] > 0) {
|
||||||
$server["load"] = round ($server["modules"] / $server["modules_total"] * 100);
|
$server["load"] = round ($server["modules"] / $server["modules_total"] * 100);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
$server["load"] = 0;
|
$server["load"] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,10 +522,9 @@ function servers_check_status () {
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$sql = "SELECT COUNT(id_server) FROM tserver WHERE status = 1 AND keepalive > NOW() - INTERVAL '15 MINUTE'";
|
$sql = "SELECT COUNT(id_server) FROM tserver WHERE status = 1 AND keepalive > NOW() - INTERVAL '15 MINUTE'";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "oracle":
|
case "oracle":
|
||||||
$sql = "SELECT COUNT(id_server) FROM tserver WHERE status = 1 AND keepalive > systimestamp - INTERVAL '15' MINUTE";
|
$sql = "SELECT COUNT(id_server) FROM tserver WHERE status = 1 AND keepalive > systimestamp - INTERVAL '15' MINUTE";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$status = (int) db_get_sql ($sql); //Cast as int will assure a number value
|
$status = (int) db_get_sql ($sql); //Cast as int will assure a number value
|
||||||
// This function should just ack of server down, not set it down.
|
// This function should just ack of server down, not set it down.
|
||||||
|
@ -542,5 +543,4 @@ function servers_get_status ($id_server) {
|
||||||
$serverinfo = servers_get_info ($id_server);
|
$serverinfo = servers_get_info ($id_server);
|
||||||
return $serverinfo[$id_server];
|
return $serverinfo[$id_server];
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -432,13 +432,25 @@ foreach ($modules as $module) {
|
||||||
echo "<td class='".$tdcolor."f9' colspan='1'> </td>";
|
echo "<td class='".$tdcolor."f9' colspan='1'> </td>";
|
||||||
echo "<td class='".$tdcolor."f9' colspan='1'> x</td>";
|
echo "<td class='".$tdcolor."f9' colspan='1'> x</td>";
|
||||||
|
|
||||||
switch($module["datos"]){
|
switch ($module["datos"]) {
|
||||||
case 10: echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('TRACE')."</td>"; break;
|
case 10:
|
||||||
case 20: echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('DEBUG')."</td>"; break;
|
echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('TRACE')."</td>";
|
||||||
case 30: echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('INFO')."</td>"; break;
|
break;
|
||||||
case 40: echo "<td class=$tdcolor style='color:darkorange; font-weight:bold;'>".__('WARN')."</td>"; break;
|
case 20:
|
||||||
case 50: echo "<td class=$tdcolor style='color:red; font-weight:bold;'>".__('ERROR')."</td>"; break;
|
echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('DEBUG')."</td>";
|
||||||
case 60: echo "<td class=$tdcolor style='color:red; font-weight:bold;'>".__('FATAL')."</td>"; break;
|
break;
|
||||||
|
case 30:
|
||||||
|
echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('INFO')."</td>";
|
||||||
|
break;
|
||||||
|
case 40:
|
||||||
|
echo "<td class=$tdcolor style='color:darkorange; font-weight:bold;'>".__('WARN')."</td>";
|
||||||
|
break;
|
||||||
|
case 50:
|
||||||
|
echo "<td class=$tdcolor style='color:red; font-weight:bold;'>".__('ERROR')."</td>";
|
||||||
|
break;
|
||||||
|
case 60:
|
||||||
|
echo "<td class=$tdcolor style='color:red; font-weight:bold;'>".__('FATAL')."</td>";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ require_once ('include/functions_networkmap.php');
|
||||||
$filter = networkmap_get_filter ($layout);
|
$filter = networkmap_get_filter ($layout);
|
||||||
|
|
||||||
// Generate dot file
|
// Generate dot file
|
||||||
$graph = networkmap_generate_dot_groups (__('Pandora FMS'), $group, $simple, $font_size, $layout, $nooverlap, $zoom, $ranksep, $center, $regen, $pure, $modwithalerts, $module_group, $hidepolicymodules, $depth, $id_networkmap);
|
$graph = networkmap_generate_dot_groups (__('Pandora FMS'), $group, $simple, $font_size, $layout, $nooverlap, $zoom, $ranksep, $center, $regen, $pure, $modwithalerts, $module_group, $hidepolicymodules, $depth, $id_networkmap, $dont_show_subgroups);
|
||||||
|
|
||||||
if ($graph === false) {
|
if ($graph === false) {
|
||||||
ui_print_error_message (__('Map could not be generated'));
|
ui_print_error_message (__('Map could not be generated'));
|
||||||
|
|
|
@ -62,6 +62,8 @@ if ($add_networkmap) {
|
||||||
$simple = 0;
|
$simple = 0;
|
||||||
$regen = 1;
|
$regen = 1;
|
||||||
$font_size = 12;
|
$font_size = 12;
|
||||||
|
$text_filter = '';
|
||||||
|
$dont_show_subgroups = false;
|
||||||
$group = 0;
|
$group = 0;
|
||||||
$module_group = 0;
|
$module_group = 0;
|
||||||
$center = 0;
|
$center = 0;
|
||||||
|
@ -70,13 +72,20 @@ if ($add_networkmap) {
|
||||||
$sql = db_get_value_filter('COUNT(name)', 'tnetwork_map', array('name' => "%$name"));
|
$sql = db_get_value_filter('COUNT(name)', 'tnetwork_map', array('name' => "%$name"));
|
||||||
|
|
||||||
if ($check) {
|
if ($check) {
|
||||||
$id_networkmap = networkmap_create_networkmap("($sql) ".$name, $activeTab, $layout, $nooverlap, $simple, $regen, $font_size, $group, $module_group, $depth, $modwithalerts, $hidepolicymodules, $zoom, $ranksep, $center);
|
$id_networkmap = networkmap_create_networkmap("($sql) ".$name,
|
||||||
|
$activeTab, $layout, $nooverlap, $simple, $regen,
|
||||||
|
$font_size, $group, $module_group, $depth, $modwithalerts,
|
||||||
|
$hidepolicymodules, $zoom, $ranksep, $center, $text_filter,
|
||||||
|
$dont_show_subgroups);
|
||||||
$message = ui_print_result_message ($id_networkmap,
|
$message = ui_print_result_message ($id_networkmap,
|
||||||
__('Network map created successfully'),
|
__('Network map created successfully'),
|
||||||
__('Could not create network map'), '', true);
|
__('Could not create network map'), '', true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$id_networkmap = networkmap_create_networkmap($name, $activeTab, $layout, $nooverlap, $simple, $regen, $font_size, $group, $module_group, $depth, $modwithalerts, $hidepolicymodules, $zoom, $ranksep, $center);
|
$id_networkmap = networkmap_create_networkmap($name, $activeTab,
|
||||||
|
$layout, $nooverlap, $simple, $regen, $font_size, $group,
|
||||||
|
$module_group, $depth, $modwithalerts, $hidepolicymodules,
|
||||||
|
$zoom, $ranksep, $center, $text_filter, $dont_show_subgroups);
|
||||||
$message = ui_print_result_message ($id_networkmap,
|
$message = ui_print_result_message ($id_networkmap,
|
||||||
__('Network map created successfully'),
|
__('Network map created successfully'),
|
||||||
__('Could not create network map'), '', true);
|
__('Could not create network map'), '', true);
|
||||||
|
@ -96,6 +105,8 @@ if($save_networkmap || $update_networkmap) {
|
||||||
$regen = (int) get_parameter ('regen', 0);
|
$regen = (int) get_parameter ('regen', 0);
|
||||||
$show_snmp_modules = (int) get_parameter ('show_snmp_modules', 0);
|
$show_snmp_modules = (int) get_parameter ('show_snmp_modules', 0);
|
||||||
$font_size = (int) get_parameter ('font_size', 12);
|
$font_size = (int) get_parameter ('font_size', 12);
|
||||||
|
$text_filter = get_parameter ('text_filter', '');
|
||||||
|
$dont_show_subgroups = (bool)get_parameter ('dont_show_subgroups', 0);
|
||||||
$group = (int) get_parameter ('group', 0);
|
$group = (int) get_parameter ('group', 0);
|
||||||
$module_group = (int) get_parameter ('module_group', 0);
|
$module_group = (int) get_parameter ('module_group', 0);
|
||||||
$center = (int) get_parameter ('center', 0);
|
$center = (int) get_parameter ('center', 0);
|
||||||
|
@ -105,11 +116,25 @@ if($save_networkmap || $update_networkmap) {
|
||||||
|
|
||||||
if($save_networkmap) {
|
if($save_networkmap) {
|
||||||
if (!$check || $subcheck == $name) {
|
if (!$check || $subcheck == $name) {
|
||||||
$result = networkmap_update_networkmap($id_networkmap, array('name' => $name, 'type' => $activeTab, 'layout' => $layout,
|
$result = networkmap_update_networkmap($id_networkmap,
|
||||||
'nooverlap' => $nooverlap, 'simple' => $simple, 'regenerate' => $regen, 'font_size' => $font_size,
|
array('name' => $name,
|
||||||
'id_group' => $group, 'id_module_group' => $module_group, 'depth' => $depth, 'only_modules_with_alerts' => $modwithalerts,
|
'type' => $activeTab,
|
||||||
'hide_policy_modules' => $hidepolicymodules, 'zoom' => $zoom, 'distance_nodes' => $ranksep, 'center' => $center,
|
'layout' => $layout,
|
||||||
'show_snmp_modules' => (int)$show_snmp_modules));
|
'nooverlap' => $nooverlap,
|
||||||
|
'simple' => $simple,
|
||||||
|
'regenerate' => $regen,
|
||||||
|
'font_size' => $font_size,
|
||||||
|
'id_group' => $group,
|
||||||
|
'id_module_group' => $module_group,
|
||||||
|
'depth' => $depth,
|
||||||
|
'only_modules_with_alerts' => $modwithalerts,
|
||||||
|
'hide_policy_modules' => $hidepolicymodules,
|
||||||
|
'zoom' => $zoom,
|
||||||
|
'distance_nodes' => $ranksep,
|
||||||
|
'text_filter' => $text_filter,
|
||||||
|
'dont_show_subgroups' => $dont_show_subgroups,
|
||||||
|
'center' => $center,
|
||||||
|
'show_snmp_modules' => (int)$show_snmp_modules));
|
||||||
|
|
||||||
$message = ui_print_result_message ($result,
|
$message = ui_print_result_message ($result,
|
||||||
__('Network map saved successfully'),
|
__('Network map saved successfully'),
|
||||||
|
@ -133,14 +158,14 @@ if($nomaps && $id_networkmap == 0) {
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// If the map id is not defined, we set the first id of the active type
|
// If the map id is not defined, we set the first id of the active type
|
||||||
if(!$nomaps && $id_networkmap == 0) {
|
if (!$nomaps && $id_networkmap == 0) {
|
||||||
$networkmaps_of_type = networkmap_get_networkmaps('', $activeTab);
|
$networkmaps_of_type = networkmap_get_networkmaps('', $activeTab);
|
||||||
if($networkmaps_of_type !== false){
|
if ($networkmaps_of_type !== false) {
|
||||||
$id_networkmap = reset(array_keys($networkmaps_of_type));
|
$id_networkmap = reset(array_keys($networkmaps_of_type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$update_networkmap && !$save_networkmap && $id_networkmap != 0) {
|
if (!$update_networkmap && !$save_networkmap && $id_networkmap != 0) {
|
||||||
$networkmap_data = networkmap_get_networkmap($id_networkmap);
|
$networkmap_data = networkmap_get_networkmap($id_networkmap);
|
||||||
|
|
||||||
$layout = $networkmap_data['layout'];
|
$layout = $networkmap_data['layout'];
|
||||||
|
@ -154,6 +179,8 @@ if(!$update_networkmap && !$save_networkmap && $id_networkmap != 0) {
|
||||||
$regen = $networkmap_data['regenerate'];
|
$regen = $networkmap_data['regenerate'];
|
||||||
$show_snmp_modules = $networkmap_data['show_snmp_modules'];
|
$show_snmp_modules = $networkmap_data['show_snmp_modules'];
|
||||||
$font_size = $networkmap_data['font_size'];
|
$font_size = $networkmap_data['font_size'];
|
||||||
|
$text_filter = $networkmap_data['text_filter'];
|
||||||
|
$dont_show_subgroups = $networkmap_data['dont_show_subgroups'];
|
||||||
$group = $networkmap_data['id_group'];
|
$group = $networkmap_data['id_group'];
|
||||||
$module_group = $networkmap_data['id_module_group'];
|
$module_group = $networkmap_data['id_module_group'];
|
||||||
$center = $networkmap_data['center'];
|
$center = $networkmap_data['center'];
|
||||||
|
@ -161,7 +188,7 @@ if(!$update_networkmap && !$save_networkmap && $id_networkmap != 0) {
|
||||||
$activeTab = $networkmap_data['type'];
|
$activeTab = $networkmap_data['type'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($recenter_networkmap) {
|
if ($recenter_networkmap) {
|
||||||
$center = (int) get_parameter ('center', 0);
|
$center = (int) get_parameter ('center', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +243,8 @@ if (!$nomaps && $id_networkmap != 0) {
|
||||||
&tab='.$activeTab.'&save_networkmap=1&name='.$name.'&group='.$group.'
|
&tab='.$activeTab.'&save_networkmap=1&name='.$name.'&group='.$group.'
|
||||||
&layout='.$layout.'&nooverlap='.$nooverlap.'&simple='.$simple.'&regen='.$regen.'
|
&layout='.$layout.'&nooverlap='.$nooverlap.'&simple='.$simple.'&regen='.$regen.'
|
||||||
&zoom='.$zoom.'&ranksep='.$ranksep.'&fontsize='.$font_size.'&depth='.$depth.'
|
&zoom='.$zoom.'&ranksep='.$ranksep.'&fontsize='.$font_size.'&depth='.$depth.'
|
||||||
&modwithalerts='.$modwithalerts.'&hidepolicymodules='.$hidepolicymodules.'
|
&modwithalerts='.$modwithalerts.'&text_filter='.$text_filter.
|
||||||
|
'&dont_show_subgroups='.$dont_show_subgroups.'&hidepolicymodules='.$hidepolicymodules.'
|
||||||
&module_group='.$module_group.'&pure='.$pure.'&hidden_options='.(int)$hidden_options.'
|
&module_group='.$module_group.'&pure='.$pure.'&hidden_options='.(int)$hidden_options.'
|
||||||
&show_snmp_modules='.(int)$show_snmp_modules.'">' .
|
&show_snmp_modules='.(int)$show_snmp_modules.'">' .
|
||||||
html_print_image("images/file.png", true, array ("title" => __('Save map'))) .'</a>');
|
html_print_image("images/file.png", true, array ("title" => __('Save map'))) .'</a>');
|
||||||
|
@ -263,77 +291,57 @@ $layout_array = array (
|
||||||
'flat' => 'flat');
|
'flat' => 'flat');
|
||||||
|
|
||||||
$options_form = '<form action="index.php?sec=network&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&tab='.$activeTab.'&pure='.$pure.'&center='.$center.'" method="post">';
|
$options_form = '<form action="index.php?sec=network&sec2=operation/agentes/networkmap&id_networkmap='.$id_networkmap.'&tab='.$activeTab.'&pure='.$pure.'&center='.$center.'" method="post">';
|
||||||
$options_form .= '<table cellpadding="4" cellspacing="4" class="databox" width="99%">';
|
|
||||||
$options_form .= '<tr><td>';
|
|
||||||
$options_form .= '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
|
|
||||||
$options_form .= '<tr>';
|
unset($table);
|
||||||
$options_form .= '<td>';
|
$table->width = '95%';
|
||||||
$options_form .= __('Name') . '<br />';
|
$table->class = 'databox';
|
||||||
$options_form .= html_print_input_text ('name', $name, '', 10, 25, true);
|
$table->data = array();
|
||||||
$options_form .= '</td>';
|
$table->data[0][] = __('Name:') . ' ' .
|
||||||
$options_form .= '<td valign="top">' . __('Group') . '<br />';
|
html_print_input_text ('name', $name, '', 10, 25, true);
|
||||||
$options_form .= html_print_select_groups(false, 'AR', false, 'group', $group, '', 'All', 0, true);
|
$table->data[0][] = __('Group:') . ' ' .
|
||||||
$options_form .= '</td>';
|
html_print_select_groups(false, 'AR', false, 'group', $group, '', 'All', 0, true);
|
||||||
if ($activeTab == 'groups' || $activeTab == 'policies') {
|
if ($activeTab == 'groups' || $activeTab == 'policies') {
|
||||||
$options_form .= '<td valign="top">' . __('Module group') . '<br />';
|
$table->data[0][] = __('Module group') . ' ' .
|
||||||
$options_form .= html_print_select_from_sql ('SELECT id_mg, name FROM tmodule_group', 'module_group', $module_group, '', 'All', 0, true);
|
html_print_select_from_sql ('SELECT id_mg, name FROM tmodule_group', 'module_group', $module_group, '', 'All', 0, true);
|
||||||
$options_form .= '</td>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activeTab == 'topology') {
|
if ($activeTab == 'topology') {
|
||||||
$options_form .= '<td valign="top">' . __('Show interfaces') . '<br />';
|
$table->data[0][] = __('Show interfaces') . ' ' .
|
||||||
$options_form .= html_print_checkbox ('show_snmp_modules', '1', $show_snmp_modules, true);
|
html_print_checkbox ('show_snmp_modules', '1', $show_snmp_modules, true);
|
||||||
$options_form .= '</td>';
|
|
||||||
}
|
}
|
||||||
|
$table->data[0][] = __('Layout') . ' ' .
|
||||||
$options_form .= '<td valign="top">' . __('Layout') . '<br />';
|
html_print_select ($layout_array, 'layout', $layout, '', '', '', true);
|
||||||
$options_form .= html_print_select ($layout_array, 'layout', $layout, '', '', '', true);
|
|
||||||
$options_form .= '</td>';
|
|
||||||
|
|
||||||
if ($activeTab == 'groups') {
|
if ($activeTab == 'groups') {
|
||||||
$options_form .= '<td valign="top">' . __('Depth') . '<br />';
|
|
||||||
$depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'group' => __('Groups'));
|
$depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'group' => __('Groups'));
|
||||||
$options_form .= html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
$table->data[0][] = __('Depth') . ' ' .
|
||||||
$options_form .= '</td>';
|
html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($activeTab == 'policies') {
|
if ($activeTab == 'policies') {
|
||||||
$options_form .= '<td valign="top">' . __('Depth') . '<br />';
|
|
||||||
$depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'policy' => __('Policies'));
|
$depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'policy' => __('Policies'));
|
||||||
$options_form .= html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
$table->data[0][] = __('Depth') . ' ' .
|
||||||
$options_form .= '</td>';
|
html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
||||||
}
|
}
|
||||||
|
$table->data[1][] = __('No Overlap') . ' ' .
|
||||||
$options_form .= '</tr></table>';
|
html_print_checkbox ('nooverlap', '1', $nooverlap, true);
|
||||||
$options_form .= '</td></tr><tr><td>';
|
|
||||||
$options_form .= '<table cellpadding="0" cellspacing="0" border="0" width="100%">';
|
|
||||||
$options_form .= '<tr><td valign="top">' . __('No Overlap') . '<br />';
|
|
||||||
$options_form .= html_print_checkbox ('nooverlap', '1', $nooverlap, true);
|
|
||||||
$options_form .= '</td>';
|
|
||||||
|
|
||||||
if (($activeTab == 'groups' || $activeTab == 'policies') &&
|
if (($activeTab == 'groups' || $activeTab == 'policies') &&
|
||||||
$depth == 'all') {
|
$depth == 'all') {
|
||||||
$options_form .= '<td valign="top">' . __('Only modules with alerts') . '<br />';
|
$table->data[1][] = __('Only modules with alerts') . ' ' .
|
||||||
$options_form .= html_print_checkbox ('modwithalerts', '1', $modwithalerts, true);
|
html_print_checkbox ('modwithalerts', '1', $modwithalerts, true);
|
||||||
$options_form .= '</td>';
|
|
||||||
|
|
||||||
if ($activeTab == 'groups') {
|
if ($activeTab == 'groups') {
|
||||||
if($config['enterprise_installed']) {
|
if($config['enterprise_installed']) {
|
||||||
$options_form .= '<td valign="top">' . __('Hide policy modules') . '<br />';
|
$table->data[1][] = __('Hide policy modules') . ' ' .
|
||||||
$options_form .= html_print_checkbox ('hidepolicymodules', '1', $hidepolicymodules, true);
|
html_print_checkbox ('hidepolicymodules', '1', $hidepolicymodules, true);
|
||||||
$options_form .= '</td>';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$table->data[1][] = __('Simple') . ' ' .
|
||||||
|
html_print_checkbox ('simple', '1', $simple, true);
|
||||||
|
|
||||||
$options_form .= '<td valign="top">' . __('Simple') . '<br />';
|
$table->data[1][] = __('Regenerate') . ' ' .
|
||||||
$options_form .= html_print_checkbox ('simple', '1', $simple, true);
|
html_print_checkbox ('regen', '1', $regen, true);
|
||||||
$options_form .= '</td>';
|
|
||||||
|
|
||||||
$options_form .= '<td valign="top">' . __('Regenerate') . '<br />';
|
|
||||||
$options_form .= html_print_checkbox ('regen', '1', $regen, true);
|
|
||||||
$options_form .= '</td>';
|
|
||||||
|
|
||||||
if ($pure == "1") {
|
if ($pure == "1") {
|
||||||
// Zoom
|
// Zoom
|
||||||
$zoom_array = array (
|
$zoom_array = array (
|
||||||
|
@ -345,29 +353,31 @@ if ($pure == "1") {
|
||||||
'5' => 'x10',
|
'5' => 'x10',
|
||||||
);
|
);
|
||||||
|
|
||||||
$options_form .= '<td valign="top">' . __('Zoom') . '<br />';
|
$table->data[1][] = __('Zoom') . ' ' .
|
||||||
$options_form .= html_print_select ($zoom_array, 'zoom', $zoom, '', '', '', true, false, false, false);
|
html_print_select ($zoom_array, 'zoom', $zoom, '', '', '', true, false, false, false);
|
||||||
$options_form .= '</td>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($nooverlap == 1) {
|
if ($nooverlap == 1) {
|
||||||
$options_form .= "<td>";
|
$table->data[1][] = __('Distance between nodes') . ' ' .
|
||||||
$options_form .= __('Distance between nodes') . '<br />';
|
html_print_input_text ('ranksep', $ranksep, __('Separation between elements in the map (in Non-overlap mode)'), 3, 4, true);
|
||||||
$options_form .= html_print_input_text ('ranksep', $ranksep, __('Separation between elements in the map (in Non-overlap mode)'), 3, 4, true);
|
}
|
||||||
$options_form .= "</td>";
|
$table->data[1][] = __('Font') . ' ' .
|
||||||
|
html_print_input_text ('font_size', $font_size, $alt = 'Font size (in pt)', 2, 4, true);
|
||||||
|
$table->data[2][] = __('Free text for search (*):') . ' ' .
|
||||||
|
html_print_input_text('text_filter', $text_filter, '', 30, 100, true);
|
||||||
|
if ($activeTab == 'groups') {
|
||||||
|
$table->data[2][] = __('Don\'t show subgroups:') .
|
||||||
|
ui_print_help_tip(__('Only run with it is filter for any group'), true) .
|
||||||
|
' ' .
|
||||||
|
html_print_checkbox ('dont_show_subgroups', '1', $dont_show_subgroups, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$options_form .= "<td>";
|
$options_form .= html_print_input_hidden('update_networkmap',1, true) .
|
||||||
$options_form .= __('Font') . '<br />';
|
html_print_input_hidden('hidden_options',0, true);
|
||||||
$options_form .= html_print_input_text ('font_size', $font_size, $alt = 'Font size (in pt)', 2, 4, true);
|
$options_form .= html_print_table ($table, true);
|
||||||
$options_form .= "</td>";
|
$options_form .= "<div style='width: " . $table->width . "; text-align: right;'>" .
|
||||||
|
html_print_submit_button (__('Apply'), "updbutton", false, 'class="sub next"', true) .
|
||||||
$options_form .= '<td>';
|
"</div>";
|
||||||
$options_form .= html_print_input_hidden('update_networkmap',1, true);
|
$options_form .= '</form>';
|
||||||
$options_form .= html_print_input_hidden('hidden_options',0, true);
|
|
||||||
$options_form .= html_print_submit_button (__('Apply'), "updbutton", false, 'class="sub next"', true);
|
|
||||||
$options_form .= '</td></tr>';
|
|
||||||
$options_form .= '</table></table></form>';
|
|
||||||
|
|
||||||
ui_toggle($options_form, __('Map options'), '', $hidden_options);
|
ui_toggle($options_form, __('Map options'), '', $hidden_options);
|
||||||
|
|
||||||
|
@ -377,7 +387,7 @@ if($id_networkmap != 0) {
|
||||||
require_once('operation/agentes/networkmap.groups.php');
|
require_once('operation/agentes/networkmap.groups.php');
|
||||||
break;
|
break;
|
||||||
case 'policies':
|
case 'policies':
|
||||||
require_once(''.ENTERPRISE_DIR.'/operation/policies/networkmap.policies.php');
|
require_once(ENTERPRISE_DIR . '/operation/policies/networkmap.policies.php');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
case 'topology':
|
case 'topology':
|
||||||
|
|
|
@ -32,7 +32,7 @@ require_once ('include/functions_networkmap.php');
|
||||||
$filter = networkmap_get_filter ($layout);
|
$filter = networkmap_get_filter ($layout);
|
||||||
|
|
||||||
// Generate dot file
|
// Generate dot file
|
||||||
$graph = networkmap_generate_dot (__('Pandora FMS'), $group, $simple, $font_size, $layout, $nooverlap, $zoom, $ranksep, $center, $regen, $pure, $id_networkmap, $show_snmp_modules, true, true);
|
$graph = networkmap_generate_dot (__('Pandora FMS'), $group, $simple, $font_size, $layout, $nooverlap, $zoom, $ranksep, $center, $regen, $pure, $id_networkmap, $show_snmp_modules, true, true, $text_filter);
|
||||||
|
|
||||||
if ($graph === false) {
|
if ($graph === false) {
|
||||||
ui_print_error_message (__('Map could not be generated'));
|
ui_print_error_message (__('Map could not be generated'));
|
||||||
|
@ -101,5 +101,4 @@ else {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -1474,9 +1474,9 @@ CREATE TABLE tgroup_stat (
|
||||||
utimestamp NUMBER(10, 0) default 0 NOT NULL
|
utimestamp NUMBER(10, 0) default 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table "tnetwork_map"
|
-- Table "tnetwork_map"
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE tnetwork_map (
|
CREATE TABLE tnetwork_map (
|
||||||
id_networkmap NUMBER(10, 0) NOT NULL PRIMARY KEY,
|
id_networkmap NUMBER(10, 0) NOT NULL PRIMARY KEY,
|
||||||
id_user VARCHAR2(60) NOT NULL,
|
id_user VARCHAR2(60) NOT NULL,
|
||||||
|
@ -1497,7 +1497,9 @@ CREATE TABLE tnetwork_map (
|
||||||
distance_nodes BINARY_DOUBLE default 2.5,
|
distance_nodes BINARY_DOUBLE default 2.5,
|
||||||
center NUMBER(10, 0) default 0 NOT NULL,
|
center NUMBER(10, 0) default 0 NOT NULL,
|
||||||
contracted_nodes CLOB,
|
contracted_nodes CLOB,
|
||||||
show_snmp_modules NUMBER(5, 0) default 0 NOT NULL
|
show_snmp_modules NUMBER(5, 0) default 0 NOT NULL,
|
||||||
|
text_filter VARCHAR(100) DEFAULT '',
|
||||||
|
dont_show_subgroups NUMBER(10, 0) default 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE SEQUENCE tnetwork_map_s INCREMENT BY 1 START WITH 1;
|
CREATE SEQUENCE tnetwork_map_s INCREMENT BY 1 START WITH 1;
|
||||||
|
|
|
@ -1233,9 +1233,9 @@ CREATE TABLE "tgis_map_layer_has_tagente" (
|
||||||
CREATE INDEX "tgis_map_layer_has_tagente_tgis_map_layer_id_tmap_layer_idx" ON "tgis_map_layer_has_tagente"("tgis_map_layer_id_tmap_layer");
|
CREATE INDEX "tgis_map_layer_has_tagente_tgis_map_layer_id_tmap_layer_idx" ON "tgis_map_layer_has_tagente"("tgis_map_layer_id_tmap_layer");
|
||||||
CREATE INDEX "tgis_map_layer_has_tagente_tagente_id_agente_idx" ON "tgis_map_layer_has_tagente"("tagente_id_agente");
|
CREATE INDEX "tgis_map_layer_has_tagente_tagente_id_agente_idx" ON "tgis_map_layer_has_tagente"("tagente_id_agente");
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table "tgroup_stat"
|
-- Table "tgroup_stat"
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
--Table to store global system stats per group
|
--Table to store global system stats per group
|
||||||
CREATE TABLE "tgroup_stat" (
|
CREATE TABLE "tgroup_stat" (
|
||||||
"id_group" INTEGER NOT NULL default 0 PRIMARY KEY,
|
"id_group" INTEGER NOT NULL default 0 PRIMARY KEY,
|
||||||
|
@ -1252,9 +1252,9 @@ CREATE TABLE "tgroup_stat" (
|
||||||
"utimestamp" INTEGER NOT NULL default 0
|
"utimestamp" INTEGER NOT NULL default 0
|
||||||
);
|
);
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table "tnetwork_map"
|
-- Table "tnetwork_map"
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE "tnetwork_map" (
|
CREATE TABLE "tnetwork_map" (
|
||||||
"id_networkmap" SERIAL NOT NULL PRIMARY KEY,
|
"id_networkmap" SERIAL NOT NULL PRIMARY KEY,
|
||||||
"id_user" VARCHAR(60) NOT NULL,
|
"id_user" VARCHAR(60) NOT NULL,
|
||||||
|
@ -1275,21 +1275,23 @@ CREATE TABLE "tnetwork_map" (
|
||||||
"distance_nodes" DOUBLE PRECISION default 2.5,
|
"distance_nodes" DOUBLE PRECISION default 2.5,
|
||||||
"center" INTEGER NOT NULL default 0,
|
"center" INTEGER NOT NULL default 0,
|
||||||
"contracted_nodes" TEXT,
|
"contracted_nodes" TEXT,
|
||||||
"show_snmp_modules" SMALLINT NOT NULL default 0
|
"show_snmp_modules" SMALLINT NOT NULL default 0,
|
||||||
|
"text_filter" VARCHAR(100) DEFAULT '',
|
||||||
|
"dont_show_subgroups" INTEGER NOT NULL default 0
|
||||||
);
|
);
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table "tsnmp_filter"
|
-- Table "tsnmp_filter"
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE "tsnmp_filter" (
|
CREATE TABLE "tsnmp_filter" (
|
||||||
"id_snmp_filter" SERIAL NOT NULL PRIMARY KEY,
|
"id_snmp_filter" SERIAL NOT NULL PRIMARY KEY,
|
||||||
"description" varchar(255) default '',
|
"description" varchar(255) default '',
|
||||||
"filter" varchar(255) default ''
|
"filter" varchar(255) default ''
|
||||||
);
|
);
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table "tagent_custom_fields"
|
-- Table "tagent_custom_fields"
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE "tagent_custom_fields" (
|
CREATE TABLE "tagent_custom_fields" (
|
||||||
"id_field" SERIAL NOT NULL PRIMARY KEY,
|
"id_field" SERIAL NOT NULL PRIMARY KEY,
|
||||||
"name" varchar(45) NOT NULL default '',
|
"name" varchar(45) NOT NULL default '',
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
-- Priority : 3 - Warning (yellow)
|
-- Priority : 3 - Warning (yellow)
|
||||||
-- Priority : 4 - Critical (red)
|
-- Priority : 4 - Critical (red)
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `taddress`
|
-- Table `taddress`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `taddress` (
|
CREATE TABLE IF NOT EXISTS `taddress` (
|
||||||
`id_a` int(10) unsigned NOT NULL auto_increment,
|
`id_a` int(10) unsigned NOT NULL auto_increment,
|
||||||
`ip` varchar(60) NOT NULL default '',
|
`ip` varchar(60) NOT NULL default '',
|
||||||
|
@ -35,9 +35,9 @@ CREATE TABLE IF NOT EXISTS `taddress` (
|
||||||
KEY `ip` (`ip`)
|
KEY `ip` (`ip`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `taddress_agent`
|
-- Table `taddress_agent`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `taddress_agent` (
|
CREATE TABLE IF NOT EXISTS `taddress_agent` (
|
||||||
`id_ag` bigint(20) unsigned NOT NULL auto_increment,
|
`id_ag` bigint(20) unsigned NOT NULL auto_increment,
|
||||||
`id_a` bigint(20) unsigned NOT NULL default '0',
|
`id_a` bigint(20) unsigned NOT NULL default '0',
|
||||||
|
@ -45,9 +45,9 @@ CREATE TABLE IF NOT EXISTS `taddress_agent` (
|
||||||
PRIMARY KEY (`id_ag`)
|
PRIMARY KEY (`id_ag`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tagente`
|
-- Table `tagente`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tagente` (
|
CREATE TABLE IF NOT EXISTS `tagente` (
|
||||||
`id_agente` int(10) unsigned NOT NULL auto_increment,
|
`id_agente` int(10) unsigned NOT NULL auto_increment,
|
||||||
`nombre` varchar(600) BINARY NOT NULL default '',
|
`nombre` varchar(600) BINARY NOT NULL default '',
|
||||||
|
@ -610,106 +610,117 @@ CREATE TABLE IF NOT EXISTS `tmensajes` (
|
||||||
PRIMARY KEY (`id_mensaje`)
|
PRIMARY KEY (`id_mensaje`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tmodule_group`
|
-- Table `tmodule_group`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tmodule_group` (
|
CREATE TABLE IF NOT EXISTS `tmodule_group` (
|
||||||
`id_mg` tinyint(4) unsigned NOT NULL auto_increment,
|
`id_mg` tinyint(4) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(150) NOT NULL default '',
|
`name` varchar(150) NOT NULL default '',
|
||||||
PRIMARY KEY (`id_mg`)
|
PRIMARY KEY (`id_mg`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tnetwork_component`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tnetwork_component` (
|
CREATE TABLE IF NOT EXISTS `tnetwork_component` (
|
||||||
`id_nc` int(10) unsigned NOT NULL auto_increment,
|
`id_nc` int(10) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(80) NOT NULL,
|
`name` varchar(80) NOT NULL,
|
||||||
`description` varchar(250) default NULL,
|
`description` varchar(250) default NULL,
|
||||||
`id_group` int(6) NOT NULL default '1',
|
`id_group` int(6) NOT NULL default '1',
|
||||||
`type` smallint(6) NOT NULL default '6',
|
`type` smallint(6) NOT NULL default '6',
|
||||||
`max` bigint(20) NOT NULL default '0',
|
`max` bigint(20) NOT NULL default '0',
|
||||||
`min` bigint(20) NOT NULL default '0',
|
`min` bigint(20) NOT NULL default '0',
|
||||||
`module_interval` mediumint(8) unsigned NOT NULL default '0',
|
`module_interval` mediumint(8) unsigned NOT NULL default '0',
|
||||||
`tcp_port` int(10) unsigned NOT NULL default '0',
|
`tcp_port` int(10) unsigned NOT NULL default '0',
|
||||||
`tcp_send` text NOT NULL,
|
`tcp_send` text NOT NULL,
|
||||||
`tcp_rcv` text NOT NULL,
|
`tcp_rcv` text NOT NULL,
|
||||||
`snmp_community` varchar(255) NOT NULL default 'NULL',
|
`snmp_community` varchar(255) NOT NULL default 'NULL',
|
||||||
`snmp_oid` varchar(400) NOT NULL,
|
`snmp_oid` varchar(400) NOT NULL,
|
||||||
`id_module_group` tinyint(4) unsigned NOT NULL default '0',
|
`id_module_group` tinyint(4) unsigned NOT NULL default '0',
|
||||||
`id_modulo` int(10) unsigned default '0',
|
`id_modulo` int(10) unsigned default '0',
|
||||||
`id_plugin` INTEGER unsigned default '0',
|
`id_plugin` INTEGER unsigned default '0',
|
||||||
`plugin_user` text,
|
`plugin_user` text,
|
||||||
`plugin_pass` text,
|
`plugin_pass` text,
|
||||||
`plugin_parameter` text,
|
`plugin_parameter` text,
|
||||||
`max_timeout` tinyint(3) unsigned default '0',
|
`max_timeout` tinyint(3) unsigned default '0',
|
||||||
`history_data` tinyint(1) unsigned default '1',
|
`history_data` tinyint(1) unsigned default '1',
|
||||||
`min_warning` double(18,2) default 0,
|
`min_warning` double(18,2) default 0,
|
||||||
`max_warning` double(18,2) default 0,
|
`max_warning` double(18,2) default 0,
|
||||||
`str_warning` text,
|
`str_warning` text,
|
||||||
`min_critical` double(18,2) default 0,
|
`min_critical` double(18,2) default 0,
|
||||||
`max_critical` double(18,2) default 0,
|
`max_critical` double(18,2) default 0,
|
||||||
`str_critical` text,
|
`str_critical` text,
|
||||||
`min_ff_event` int(4) unsigned default '0',
|
`min_ff_event` int(4) unsigned default '0',
|
||||||
`custom_string_1` text,
|
`custom_string_1` text,
|
||||||
`custom_string_2` text,
|
`custom_string_2` text,
|
||||||
`custom_string_3` text,
|
`custom_string_3` text,
|
||||||
`custom_integer_1` int(10) default 0,
|
`custom_integer_1` int(10) default 0,
|
||||||
`custom_integer_2` int(10) default 0,
|
`custom_integer_2` int(10) default 0,
|
||||||
`post_process` double(18,5) default 0,
|
`post_process` double(18,5) default 0,
|
||||||
`unit` text,
|
`unit` text,
|
||||||
`wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard',
|
`wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard',
|
||||||
`only_metaconsole` tinyint(1) unsigned default '0',
|
`only_metaconsole` tinyint(1) unsigned default '0',
|
||||||
`macros` text,
|
`macros` text,
|
||||||
`critical_instructions` text NOT NULL default '',
|
`critical_instructions` text NOT NULL default '',
|
||||||
`warning_instructions` text NOT NULL default '',
|
`warning_instructions` text NOT NULL default '',
|
||||||
`unknown_instructions` text NOT NULL default '',
|
`unknown_instructions` text NOT NULL default '',
|
||||||
`critical_inverse` tinyint(1) unsigned default '0',
|
`critical_inverse` tinyint(1) unsigned default '0',
|
||||||
`warning_inverse` tinyint(1) unsigned default '0',
|
`warning_inverse` tinyint(1) unsigned default '0',
|
||||||
PRIMARY KEY (`id_nc`)
|
PRIMARY KEY (`id_nc`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tnetwork_component_group`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tnetwork_component_group` (
|
CREATE TABLE IF NOT EXISTS `tnetwork_component_group` (
|
||||||
`id_sg` int(10) unsigned NOT NULL auto_increment,
|
`id_sg` int(10) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(200) NOT NULL default '',
|
`name` varchar(200) NOT NULL default '',
|
||||||
`parent` mediumint(8) unsigned NOT NULL default '0',
|
`parent` mediumint(8) unsigned NOT NULL default '0',
|
||||||
PRIMARY KEY (`id_sg`)
|
PRIMARY KEY (`id_sg`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tnetwork_profile`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tnetwork_profile` (
|
CREATE TABLE IF NOT EXISTS `tnetwork_profile` (
|
||||||
`id_np` int(10) unsigned NOT NULL auto_increment,
|
`id_np` int(10) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(100) NOT NULL default '',
|
`name` varchar(100) NOT NULL default '',
|
||||||
`description` varchar(250) default '',
|
`description` varchar(250) default '',
|
||||||
PRIMARY KEY (`id_np`)
|
PRIMARY KEY (`id_np`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tnetwork_profile_component`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tnetwork_profile_component` (
|
CREATE TABLE IF NOT EXISTS `tnetwork_profile_component` (
|
||||||
`id_nc` mediumint(8) unsigned NOT NULL default '0',
|
`id_nc` mediumint(8) unsigned NOT NULL default '0',
|
||||||
`id_np` mediumint(8) unsigned NOT NULL default '0',
|
`id_np` mediumint(8) unsigned NOT NULL default '0',
|
||||||
KEY `id_np` (`id_np`)
|
KEY `id_np` (`id_np`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tnota`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tnota` (
|
CREATE TABLE IF NOT EXISTS `tnota` (
|
||||||
`id_nota` bigint(6) unsigned zerofill NOT NULL auto_increment,
|
`id_nota` bigint(6) unsigned zerofill NOT NULL auto_increment,
|
||||||
`id_incident` bigint(6) unsigned zerofill NOT NULL,
|
`id_incident` bigint(6) unsigned zerofill NOT NULL,
|
||||||
`id_usuario` varchar(100) NOT NULL default '0',
|
`id_usuario` varchar(100) NOT NULL default '0',
|
||||||
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
|
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
|
||||||
`nota` mediumtext NOT NULL,
|
`nota` mediumtext NOT NULL,
|
||||||
PRIMARY KEY (`id_nota`),
|
PRIMARY KEY (`id_nota`),
|
||||||
KEY `id_incident` (`id_incident`)
|
KEY `id_incident` (`id_incident`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `torigen`
|
-- Table `torigen`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `torigen` (
|
CREATE TABLE IF NOT EXISTS `torigen` (
|
||||||
`origen` varchar(100) NOT NULL default ''
|
`origen` varchar(100) NOT NULL default ''
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tperfil`
|
-- Table `tperfil`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tperfil` (
|
CREATE TABLE IF NOT EXISTS `tperfil` (
|
||||||
`id_perfil` int(10) unsigned NOT NULL auto_increment,
|
`id_perfil` int(10) unsigned NOT NULL auto_increment,
|
||||||
`name` TEXT NOT NULL,
|
`name` TEXT NOT NULL,
|
||||||
|
@ -726,9 +737,9 @@ CREATE TABLE IF NOT EXISTS `tperfil` (
|
||||||
PRIMARY KEY (`id_perfil`)
|
PRIMARY KEY (`id_perfil`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `trecon_script`
|
-- Table `trecon_script`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `trecon_script` (
|
CREATE TABLE IF NOT EXISTS `trecon_script` (
|
||||||
`id_recon_script` int(10) NOT NULL auto_increment,
|
`id_recon_script` int(10) NOT NULL auto_increment,
|
||||||
`name` varchar(100) default '',
|
`name` varchar(100) default '',
|
||||||
|
@ -737,9 +748,9 @@ CREATE TABLE IF NOT EXISTS `trecon_script` (
|
||||||
PRIMARY KEY (`id_recon_script`)
|
PRIMARY KEY (`id_recon_script`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `trecon_task`
|
-- Table `trecon_task`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `trecon_task` (
|
CREATE TABLE IF NOT EXISTS `trecon_task` (
|
||||||
`id_rt` int(10) unsigned NOT NULL auto_increment,
|
`id_rt` int(10) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(100) NOT NULL default '',
|
`name` varchar(100) NOT NULL default '',
|
||||||
|
@ -769,9 +780,9 @@ CREATE TABLE IF NOT EXISTS `trecon_task` (
|
||||||
KEY `recon_task_daemon` (`id_recon_server`)
|
KEY `recon_task_daemon` (`id_recon_server`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tserver`
|
-- Table `tserver`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tserver` (
|
CREATE TABLE IF NOT EXISTS `tserver` (
|
||||||
`id_server` int(10) unsigned NOT NULL auto_increment,
|
`id_server` int(10) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(100) NOT NULL default '',
|
`name` varchar(100) NOT NULL default '',
|
||||||
|
@ -817,9 +828,9 @@ CREATE TABLE IF NOT EXISTS `tserver` (
|
||||||
-- 9 web
|
-- 9 web
|
||||||
-- TODO: drop 2.x xxxx_server fields, unused since server_type exists.
|
-- TODO: drop 2.x xxxx_server fields, unused since server_type exists.
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tsesion`
|
-- Table `tsesion`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tsesion` (
|
CREATE TABLE IF NOT EXISTS `tsesion` (
|
||||||
`id_sesion` bigint(20) unsigned NOT NULL auto_increment,
|
`id_sesion` bigint(20) unsigned NOT NULL auto_increment,
|
||||||
`id_usuario` varchar(60) NOT NULL default '0',
|
`id_usuario` varchar(60) NOT NULL default '0',
|
||||||
|
@ -833,9 +844,9 @@ CREATE TABLE IF NOT EXISTS `tsesion` (
|
||||||
KEY `idx_user` (`id_usuario`)
|
KEY `idx_user` (`id_usuario`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `ttipo_modulo`
|
-- Table `ttipo_modulo`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `ttipo_modulo` (
|
CREATE TABLE IF NOT EXISTS `ttipo_modulo` (
|
||||||
`id_tipo` smallint(5) unsigned NOT NULL auto_increment,
|
`id_tipo` smallint(5) unsigned NOT NULL auto_increment,
|
||||||
`nombre` varchar(100) NOT NULL default '',
|
`nombre` varchar(100) NOT NULL default '',
|
||||||
|
@ -845,9 +856,9 @@ CREATE TABLE IF NOT EXISTS `ttipo_modulo` (
|
||||||
PRIMARY KEY (`id_tipo`)
|
PRIMARY KEY (`id_tipo`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `ttrap`
|
-- Table `ttrap`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `ttrap` (
|
CREATE TABLE IF NOT EXISTS `ttrap` (
|
||||||
`id_trap` bigint(20) unsigned NOT NULL auto_increment,
|
`id_trap` bigint(20) unsigned NOT NULL auto_increment,
|
||||||
`source` varchar(50) NOT NULL default '',
|
`source` varchar(50) NOT NULL default '',
|
||||||
|
@ -870,9 +881,9 @@ CREATE TABLE IF NOT EXISTS `ttrap` (
|
||||||
INDEX status (`status`)
|
INDEX status (`status`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tusuario`
|
-- Table `tusuario`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tusuario` (
|
CREATE TABLE IF NOT EXISTS `tusuario` (
|
||||||
`id_user` varchar(60) NOT NULL default '0',
|
`id_user` varchar(60) NOT NULL default '0',
|
||||||
`fullname` varchar(255) NOT NULL,
|
`fullname` varchar(255) NOT NULL,
|
||||||
|
@ -906,53 +917,64 @@ CREATE TABLE IF NOT EXISTS `tusuario` (
|
||||||
UNIQUE KEY `id_user` (`id_user`)
|
UNIQUE KEY `id_user` (`id_user`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tusuario_perfil`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tusuario_perfil` (
|
CREATE TABLE IF NOT EXISTS `tusuario_perfil` (
|
||||||
`id_up` bigint(10) unsigned NOT NULL auto_increment,
|
`id_up` bigint(10) unsigned NOT NULL auto_increment,
|
||||||
`id_usuario` varchar(100) NOT NULL default '',
|
`id_usuario` varchar(100) NOT NULL default '',
|
||||||
`id_perfil` int(10) unsigned NOT NULL default '0',
|
`id_perfil` int(10) unsigned NOT NULL default '0',
|
||||||
`id_grupo` int(10) NOT NULL default '0',
|
`id_grupo` int(10) NOT NULL default '0',
|
||||||
`assigned_by` varchar(100) NOT NULL default '',
|
`assigned_by` varchar(100) NOT NULL default '',
|
||||||
`id_policy` int(10) unsigned NOT NULL default '0',
|
`id_policy` int(10) unsigned NOT NULL default '0',
|
||||||
PRIMARY KEY (`id_up`)
|
PRIMARY KEY (`id_up`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tnews`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tnews` (
|
CREATE TABLE IF NOT EXISTS `tnews` (
|
||||||
`id_news` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id_news` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`author` varchar(255) NOT NULL DEFAULT '',
|
`author` varchar(255) NOT NULL DEFAULT '',
|
||||||
`subject` varchar(255) NOT NULL DEFAULT '',
|
`subject` varchar(255) NOT NULL DEFAULT '',
|
||||||
`text` TEXT NOT NULL,
|
`text` TEXT NOT NULL,
|
||||||
`timestamp` DATETIME NOT NULL DEFAULT 0,
|
`timestamp` DATETIME NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id_news`)
|
PRIMARY KEY(`id_news`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tgraph`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgraph` (
|
CREATE TABLE IF NOT EXISTS `tgraph` (
|
||||||
`id_graph` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id_graph` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`id_user` varchar(100) NOT NULL default '',
|
`id_user` varchar(100) NOT NULL default '',
|
||||||
`name` varchar(150) NOT NULL default '',
|
`name` varchar(150) NOT NULL default '',
|
||||||
`description` TEXT NOT NULL,
|
`description` TEXT NOT NULL,
|
||||||
`period` int(11) NOT NULL default '0',
|
`period` int(11) NOT NULL default '0',
|
||||||
`width` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
|
`width` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`height` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
|
`height` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`private` tinyint(1) UNSIGNED NOT NULL default 0,
|
`private` tinyint(1) UNSIGNED NOT NULL default 0,
|
||||||
`events` tinyint(1) UNSIGNED NOT NULL default 0,
|
`events` tinyint(1) UNSIGNED NOT NULL default 0,
|
||||||
`stacked` tinyint(1) UNSIGNED NOT NULL default 0,
|
`stacked` tinyint(1) UNSIGNED NOT NULL default 0,
|
||||||
`id_group` mediumint(8) unsigned NULL default 0,
|
`id_group` mediumint(8) unsigned NULL default 0,
|
||||||
`id_graph_template` int(11) NOT NULL default 0,
|
`id_graph_template` int(11) NOT NULL default 0,
|
||||||
PRIMARY KEY(`id_graph`)
|
PRIMARY KEY(`id_graph`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tgraph_source`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgraph_source` (
|
CREATE TABLE IF NOT EXISTS `tgraph_source` (
|
||||||
`id_gs` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id_gs` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`id_graph` int(11) NOT NULL default 0,
|
`id_graph` int(11) NOT NULL default 0,
|
||||||
`id_agent_module` int(11) NOT NULL default 0,
|
`id_agent_module` int(11) NOT NULL default 0,
|
||||||
`weight` float(5,3) NOT NULL DEFAULT 0,
|
`weight` float(5,3) NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY(`id_gs`)
|
PRIMARY KEY(`id_gs`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `treport`
|
-- Table `treport`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `treport` (
|
CREATE TABLE IF NOT EXISTS `treport` (
|
||||||
`id_report` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id_report` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`id_user` varchar(100) NOT NULL default '',
|
`id_user` varchar(100) NOT NULL default '',
|
||||||
|
@ -971,9 +993,9 @@ CREATE TABLE IF NOT EXISTS `treport` (
|
||||||
PRIMARY KEY(`id_report`)
|
PRIMARY KEY(`id_report`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `treport_content`
|
-- Table `treport_content`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `treport_content` (
|
CREATE TABLE IF NOT EXISTS `treport_content` (
|
||||||
`id_rc` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id_rc` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`id_report` INTEGER UNSIGNED NOT NULL default 0,
|
`id_report` INTEGER UNSIGNED NOT NULL default 0,
|
||||||
|
@ -1017,51 +1039,63 @@ CREATE TABLE IF NOT EXISTS `treport_content` (
|
||||||
ON UPDATE CASCADE ON DELETE CASCADE
|
ON UPDATE CASCADE ON DELETE CASCADE
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `treport_content_sla_combined`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `treport_content_sla_combined` (
|
CREATE TABLE IF NOT EXISTS `treport_content_sla_combined` (
|
||||||
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
||||||
`id_report_content` INTEGER UNSIGNED NOT NULL,
|
`id_report_content` INTEGER UNSIGNED NOT NULL,
|
||||||
`id_agent_module` int(10) unsigned NOT NULL,
|
`id_agent_module` int(10) unsigned NOT NULL,
|
||||||
`sla_max` double(18,2) NOT NULL default 0,
|
`sla_max` double(18,2) NOT NULL default 0,
|
||||||
`sla_min` double(18,2) NOT NULL default 0,
|
`sla_min` double(18,2) NOT NULL default 0,
|
||||||
`sla_limit` double(18,2) NOT NULL default 0,
|
`sla_limit` double(18,2) NOT NULL default 0,
|
||||||
`server_name` text,
|
`server_name` text,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`)
|
FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`)
|
||||||
ON UPDATE CASCADE ON DELETE CASCADE
|
ON UPDATE CASCADE ON DELETE CASCADE
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `treport_content_item`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `treport_content_item` (
|
CREATE TABLE IF NOT EXISTS `treport_content_item` (
|
||||||
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
||||||
`id_report_content` INTEGER UNSIGNED NOT NULL,
|
`id_report_content` INTEGER UNSIGNED NOT NULL,
|
||||||
`id_agent_module` int(10) unsigned NOT NULL,
|
`id_agent_module` int(10) unsigned NOT NULL,
|
||||||
`server_name` text,
|
`server_name` text,
|
||||||
`operation` text,
|
`operation` text,
|
||||||
PRIMARY KEY(`id`),
|
PRIMARY KEY(`id`),
|
||||||
FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`)
|
FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`)
|
||||||
ON UPDATE CASCADE ON DELETE CASCADE
|
ON UPDATE CASCADE ON DELETE CASCADE
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `treport_custom_sql`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `treport_custom_sql` (
|
CREATE TABLE IF NOT EXISTS `treport_custom_sql` (
|
||||||
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
||||||
`name` varchar(150) NOT NULL default '',
|
`name` varchar(150) NOT NULL default '',
|
||||||
`sql` TEXT,
|
`sql` TEXT,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Table `tlayout`
|
||||||
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tlayout` (
|
CREATE TABLE IF NOT EXISTS `tlayout` (
|
||||||
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`name` varchar(50) NOT NULL,
|
`name` varchar(50) NOT NULL,
|
||||||
`id_group` INTEGER UNSIGNED NOT NULL,
|
`id_group` INTEGER UNSIGNED NOT NULL,
|
||||||
`background` varchar(200) NOT NULL,
|
`background` varchar(200) NOT NULL,
|
||||||
`fullscreen` tinyint(1) UNSIGNED NOT NULL default 0,
|
`fullscreen` tinyint(1) UNSIGNED NOT NULL default 0,
|
||||||
`height` INTEGER UNSIGNED NOT NULL default 0,
|
`height` INTEGER UNSIGNED NOT NULL default 0,
|
||||||
`width` INTEGER UNSIGNED NOT NULL default 0,
|
`width` INTEGER UNSIGNED NOT NULL default 0,
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tlayout_data`
|
-- Table `tlayout_data`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tlayout_data` (
|
CREATE TABLE IF NOT EXISTS `tlayout_data` (
|
||||||
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`id_layout` INTEGER UNSIGNED NOT NULL default 0,
|
`id_layout` INTEGER UNSIGNED NOT NULL default 0,
|
||||||
|
@ -1083,9 +1117,9 @@ CREATE TABLE IF NOT EXISTS `tlayout_data` (
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tplugin`
|
-- Table `tplugin`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- The fields "net_dst_opt", "net_port_opt", "user_opt" and
|
-- The fields "net_dst_opt", "net_port_opt", "user_opt" and
|
||||||
-- "pass_opt" are deprecated for the 5.1.
|
-- "pass_opt" are deprecated for the 5.1.
|
||||||
CREATE TABLE IF NOT EXISTS `tplugin` (
|
CREATE TABLE IF NOT EXISTS `tplugin` (
|
||||||
|
@ -1104,18 +1138,18 @@ CREATE TABLE IF NOT EXISTS `tplugin` (
|
||||||
PRIMARY KEY(`id`)
|
PRIMARY KEY(`id`)
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tmodule`
|
-- Table `tmodule`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tmodule` (
|
CREATE TABLE IF NOT EXISTS `tmodule` (
|
||||||
`id_module` int(11) unsigned NOT NULL auto_increment,
|
`id_module` int(11) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(100) NOT NULL default '',
|
`name` varchar(100) NOT NULL default '',
|
||||||
PRIMARY KEY (`id_module`)
|
PRIMARY KEY (`id_module`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tserver_export`
|
-- Table `tserver_export`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tserver_export` (
|
CREATE TABLE IF NOT EXISTS `tserver_export` (
|
||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(100) NOT NULL default '',
|
`name` varchar(100) NOT NULL default '',
|
||||||
|
@ -1134,9 +1168,9 @@ CREATE TABLE IF NOT EXISTS `tserver_export` (
|
||||||
INDEX id_export_server (`id_export_server`)
|
INDEX id_export_server (`id_export_server`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tserver_export_data`
|
-- Table `tserver_export_data`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- id_export_server is real pandora fms export server process that manages this server
|
-- id_export_server is real pandora fms export server process that manages this server
|
||||||
-- id is the "destination" server to export
|
-- id is the "destination" server to export
|
||||||
CREATE TABLE IF NOT EXISTS `tserver_export_data` (
|
CREATE TABLE IF NOT EXISTS `tserver_export_data` (
|
||||||
|
@ -1150,9 +1184,9 @@ CREATE TABLE IF NOT EXISTS `tserver_export_data` (
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tplanned_downtime`
|
-- Table `tplanned_downtime`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime` (
|
CREATE TABLE IF NOT EXISTS `tplanned_downtime` (
|
||||||
`id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT,
|
`id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT,
|
||||||
`name` VARCHAR( 100 ) NOT NULL,
|
`name` VARCHAR( 100 ) NOT NULL,
|
||||||
|
@ -1179,9 +1213,9 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime` (
|
||||||
PRIMARY KEY ( `id` )
|
PRIMARY KEY ( `id` )
|
||||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tplanned_downtime_agents`
|
-- Table `tplanned_downtime_agents`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime_agents` (
|
CREATE TABLE IF NOT EXISTS `tplanned_downtime_agents` (
|
||||||
`id` int(20) unsigned NOT NULL auto_increment,
|
`id` int(20) unsigned NOT NULL auto_increment,
|
||||||
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
||||||
|
@ -1192,9 +1226,9 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime_agents` (
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tplanned_downtime_modules`
|
-- Table `tplanned_downtime_modules`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
|
CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
|
||||||
`id` int(20) unsigned NOT NULL auto_increment,
|
`id` int(20) unsigned NOT NULL auto_increment,
|
||||||
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
||||||
|
@ -1206,9 +1240,9 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- GIS extension Tables
|
-- GIS extension Tables
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tgis_data_history`
|
-- Table `tgis_data_history`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgis_data_history` (
|
CREATE TABLE IF NOT EXISTS `tgis_data_history` (
|
||||||
`id_tgis_data` INT NOT NULL AUTO_INCREMENT COMMENT 'key of the table' ,
|
`id_tgis_data` INT NOT NULL AUTO_INCREMENT COMMENT 'key of the table' ,
|
||||||
`longitude` DOUBLE NOT NULL ,
|
`longitude` DOUBLE NOT NULL ,
|
||||||
|
@ -1227,50 +1261,50 @@ ENGINE = InnoDB
|
||||||
COMMENT = 'Table to store historical GIS information of the agents';
|
COMMENT = 'Table to store historical GIS information of the agents';
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tgis_data_status`
|
-- Table `tgis_data_status`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgis_data_status` (
|
CREATE TABLE IF NOT EXISTS `tgis_data_status` (
|
||||||
`tagente_id_agente` INT(10) UNSIGNED NOT NULL COMMENT 'Reference to the agent' ,
|
`tagente_id_agente` INT(10) UNSIGNED NOT NULL COMMENT 'Reference to the agent' ,
|
||||||
`current_longitude` DOUBLE NOT NULL COMMENT 'Last received longitude',
|
`current_longitude` DOUBLE NOT NULL COMMENT 'Last received longitude',
|
||||||
`current_latitude` DOUBLE NOT NULL COMMENT 'Last received latitude',
|
`current_latitude` DOUBLE NOT NULL COMMENT 'Last received latitude',
|
||||||
`current_altitude` DOUBLE NULL COMMENT 'Last received altitude',
|
`current_altitude` DOUBLE NULL COMMENT 'Last received altitude',
|
||||||
`stored_longitude` DOUBLE NOT NULL COMMENT 'Reference longitude to see if the agent has moved',
|
`stored_longitude` DOUBLE NOT NULL COMMENT 'Reference longitude to see if the agent has moved',
|
||||||
`stored_latitude` DOUBLE NOT NULL COMMENT 'Reference latitude to see if the agent has moved',
|
`stored_latitude` DOUBLE NOT NULL COMMENT 'Reference latitude to see if the agent has moved',
|
||||||
`stored_altitude` DOUBLE NULL COMMENT 'Reference altitude to see if the agent has moved',
|
`stored_altitude` DOUBLE NULL COMMENT 'Reference altitude to see if the agent has moved',
|
||||||
`number_of_packages` INT NOT NULL DEFAULT 1 COMMENT 'Number of data packages received with this position since start_timestampa' ,
|
`number_of_packages` INT NOT NULL DEFAULT 1 COMMENT 'Number of data packages received with this position since start_timestampa' ,
|
||||||
`start_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp on wich the agente started to be in this position' ,
|
`start_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp on wich the agente started to be in this position' ,
|
||||||
`manual_placement` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '0 to show that the position cames from the agent, 1 to show that the position was established manualy' ,
|
`manual_placement` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '0 to show that the position cames from the agent, 1 to show that the position was established manualy' ,
|
||||||
`description` TEXT NULL COMMENT 'description of the region correoponding to this placemnt' ,
|
`description` TEXT NULL COMMENT 'description of the region correoponding to this placemnt' ,
|
||||||
PRIMARY KEY (`tagente_id_agente`) ,
|
PRIMARY KEY (`tagente_id_agente`) ,
|
||||||
INDEX `start_timestamp_index` USING BTREE (`start_timestamp` ASC),
|
INDEX `start_timestamp_index` USING BTREE (`start_timestamp` ASC),
|
||||||
INDEX `fk_tgisdata_tagente1` (`tagente_id_agente` ASC) ,
|
INDEX `fk_tgisdata_tagente1` (`tagente_id_agente` ASC) ,
|
||||||
CONSTRAINT `fk_tgisdata_tagente1`
|
CONSTRAINT `fk_tgisdata_tagente1`
|
||||||
FOREIGN KEY (`tagente_id_agente` )
|
FOREIGN KEY (`tagente_id_agente` )
|
||||||
REFERENCES `tagente` (`id_agente` )
|
REFERENCES `tagente` (`id_agente` )
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
ON UPDATE NO ACTION)
|
ON UPDATE NO ACTION)
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table to store last GIS information of the agents';
|
COMMENT = 'Table to store last GIS information of the agents';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tgis_map`
|
-- Table `tgis_map`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgis_map` (
|
CREATE TABLE IF NOT EXISTS `tgis_map` (
|
||||||
`id_tgis_map` INT NOT NULL AUTO_INCREMENT COMMENT 'table identifier' ,
|
`id_tgis_map` INT NOT NULL AUTO_INCREMENT COMMENT 'table identifier' ,
|
||||||
`map_name` VARCHAR(63) NOT NULL COMMENT 'Name of the map' ,
|
`map_name` VARCHAR(63) NOT NULL COMMENT 'Name of the map' ,
|
||||||
`initial_longitude` DOUBLE NULL COMMENT 'longitude of the center of the map when it\'s loaded' ,
|
`initial_longitude` DOUBLE NULL COMMENT "longitude of the center of the map when it\'s loaded" ,
|
||||||
`initial_latitude` DOUBLE NULL COMMENT 'latitude of the center of the map when it\'s loaded' ,
|
`initial_latitude` DOUBLE NULL COMMENT "latitude of the center of the map when it\'s loaded" ,
|
||||||
`initial_altitude` DOUBLE NULL COMMENT 'altitude of the center of the map when it\'s loaded' ,
|
`initial_altitude` DOUBLE NULL COMMENT "altitude of the center of the map when it\'s loaded" ,
|
||||||
`zoom_level` TINYINT(2) NULL DEFAULT '1' COMMENT 'Zoom level to show when the map is loaded.' ,
|
`zoom_level` TINYINT(2) NULL DEFAULT '1' COMMENT 'Zoom level to show when the map is loaded.' ,
|
||||||
`map_background` VARCHAR(127) NULL COMMENT 'path on the server to the background image of the map' ,
|
`map_background` VARCHAR(127) NULL COMMENT 'path on the server to the background image of the map' ,
|
||||||
`default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' ,
|
`default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' ,
|
||||||
`default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' ,
|
`default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' ,
|
||||||
`default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' ,
|
`default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' ,
|
||||||
`group_id` INT(10) NOT NULL DEFAULT 0 COMMENT 'Group that owns the map' ,
|
`group_id` INT(10) NOT NULL DEFAULT 0 COMMENT 'Group that owns the map' ,
|
||||||
`default_map` TINYINT(1) NULL DEFAULT 0 COMMENT '1 if this is the default map, 0 in other case',
|
`default_map` TINYINT(1) NULL DEFAULT 0 COMMENT '1 if this is the default map, 0 in other case',
|
||||||
PRIMARY KEY (`id_tgis_map`),
|
PRIMARY KEY (`id_tgis_map`),
|
||||||
INDEX `map_name_index` (`map_name` ASC)
|
INDEX `map_name_index` (`map_name` ASC)
|
||||||
)
|
)
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table containing information about a gis map';
|
COMMENT = 'Table containing information about a gis map';
|
||||||
|
@ -1288,9 +1322,9 @@ CREATE TABLE IF NOT EXISTS `tgis_map_connection` (
|
||||||
`default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' ,
|
`default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' ,
|
||||||
`default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' ,
|
`default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' ,
|
||||||
`default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' ,
|
`default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' ,
|
||||||
`initial_longitude` DOUBLE NULL COMMENT 'longitude of the center of the map when it\'s loaded' ,
|
`initial_longitude` DOUBLE NULL COMMENT "longitude of the center of the map when it\'s loaded" ,
|
||||||
`initial_latitude` DOUBLE NULL COMMENT 'latitude of the center of the map when it\'s loaded' ,
|
`initial_latitude` DOUBLE NULL COMMENT "latitude of the center of the map when it\'s loaded" ,
|
||||||
`initial_altitude` DOUBLE NULL COMMENT 'altitude of the center of the map when it\'s loaded' ,
|
`initial_altitude` DOUBLE NULL COMMENT "altitude of the center of the map when it\'s loaded" ,
|
||||||
`group_id` INT(10) NOT NULL DEFAULT 0 COMMENT 'Group that owns the map',
|
`group_id` INT(10) NOT NULL DEFAULT 0 COMMENT 'Group that owns the map',
|
||||||
PRIMARY KEY (`id_tmap_connection`) )
|
PRIMARY KEY (`id_tmap_connection`) )
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
|
@ -1362,103 +1396,99 @@ CREATE TABLE IF NOT EXISTS `tgis_map_layer_has_tagente` (
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table to define wich agents are shown in a layer';
|
COMMENT = 'Table to define wich agents are shown in a layer';
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tgroup_stat`
|
-- Table `tgroup_stat`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `tgroup_stat` (
|
CREATE TABLE IF NOT EXISTS `tgroup_stat` (
|
||||||
`id_group` int(10) unsigned NOT NULL default '0',
|
`id_group` int(10) unsigned NOT NULL default '0',
|
||||||
`modules` int(10) unsigned NOT NULL default '0',
|
`modules` int(10) unsigned NOT NULL default '0',
|
||||||
`normal` int(10) unsigned NOT NULL default '0',
|
`normal` int(10) unsigned NOT NULL default '0',
|
||||||
`critical` int(10) unsigned NOT NULL default '0',
|
`critical` int(10) unsigned NOT NULL default '0',
|
||||||
`warning` int(10) unsigned NOT NULL default '0',
|
`warning` int(10) unsigned NOT NULL default '0',
|
||||||
`unknown` int(10) unsigned NOT NULL default '0',
|
`unknown` int(10) unsigned NOT NULL default '0',
|
||||||
`non-init` int(10) unsigned NOT NULL default '0',
|
`non-init` int(10) unsigned NOT NULL default '0',
|
||||||
`alerts` int(10) unsigned NOT NULL default '0',
|
`alerts` int(10) unsigned NOT NULL default '0',
|
||||||
`alerts_fired` int(10) unsigned NOT NULL default '0',
|
`alerts_fired` int(10) unsigned NOT NULL default '0',
|
||||||
`agents` int(10) unsigned NOT NULL default '0',
|
`agents` int(10) unsigned NOT NULL default '0',
|
||||||
`agents_unknown` int(10) unsigned NOT NULL default '0',
|
`agents_unknown` int(10) unsigned NOT NULL default '0',
|
||||||
`utimestamp` int(20) unsigned NOT NULL default 0,
|
`utimestamp` int(20) unsigned NOT NULL default 0,
|
||||||
PRIMARY KEY (`id_group`)
|
PRIMARY KEY (`id_group`)
|
||||||
) ENGINE=InnoDB
|
) ENGINE=InnoDB
|
||||||
COMMENT = 'Table to store global system stats per group'
|
COMMENT = 'Table to store global system stats per group'
|
||||||
DEFAULT CHARSET=utf8;
|
DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tnetwork_map`
|
-- Table `tnetwork_map`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `tnetwork_map` (
|
CREATE TABLE IF NOT EXISTS `tnetwork_map` (
|
||||||
`id_networkmap` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
`id_networkmap` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`id_user` VARCHAR(60) NOT NULL,
|
`id_user` VARCHAR(60) NOT NULL,
|
||||||
`name` VARCHAR(100) NOT NULL,
|
`name` VARCHAR(100) NOT NULL,
|
||||||
`type` VARCHAR(20) NOT NULL,
|
`type` VARCHAR(20) NOT NULL,
|
||||||
`layout` VARCHAR(20) NOT NULL,
|
`layout` VARCHAR(20) NOT NULL,
|
||||||
`nooverlap` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
`nooverlap` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`simple` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
`simple` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`regenerate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
|
`regenerate` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
|
||||||
`font_size` INT UNSIGNED NOT NULL DEFAULT 12,
|
`font_size` INT UNSIGNED NOT NULL DEFAULT 12,
|
||||||
`id_group` INT NOT NULL DEFAULT 0,
|
`id_group` INT NOT NULL DEFAULT 0,
|
||||||
`id_module_group` INT NOT NULL DEFAULT 0,
|
`id_module_group` INT NOT NULL DEFAULT 0,
|
||||||
`id_policy` INT NOT NULL DEFAULT 0,
|
`id_policy` INT NOT NULL DEFAULT 0,
|
||||||
`depth` VARCHAR(20) NOT NULL,
|
`depth` VARCHAR(20) NOT NULL,
|
||||||
`only_modules_with_alerts` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
`only_modules_with_alerts` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`hide_policy_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
`hide_policy_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`zoom` FLOAT UNSIGNED NOT NULL DEFAULT 1,
|
`zoom` FLOAT UNSIGNED NOT NULL DEFAULT 1,
|
||||||
`distance_nodes` FLOAT UNSIGNED NOT NULL DEFAULT 2.5,
|
`distance_nodes` FLOAT UNSIGNED NOT NULL DEFAULT 2.5,
|
||||||
`center` INT UNSIGNED NOT NULL DEFAULT 0,
|
`center` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||||
`contracted_nodes` TEXT,
|
`contracted_nodes` TEXT,
|
||||||
`show_snmp_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
`show_snmp_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
PRIMARY KEY (`id_networkmap`)
|
`text_filter` VARCHAR(100) NOT NULL DEFAULT "",
|
||||||
|
`dont_show_subgroups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||||
|
PRIMARY KEY (`id_networkmap`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tsnmp_filter`
|
-- Table `tsnmp_filter`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `tsnmp_filter` (
|
CREATE TABLE IF NOT EXISTS `tsnmp_filter` (
|
||||||
`id_snmp_filter` int(10) unsigned NOT NULL auto_increment,
|
`id_snmp_filter` int(10) unsigned NOT NULL auto_increment,
|
||||||
`description` varchar(255) default '',
|
`description` varchar(255) default '',
|
||||||
`filter` varchar(255) default '',
|
`filter` varchar(255) default '',
|
||||||
PRIMARY KEY (`id_snmp_filter`)
|
PRIMARY KEY (`id_snmp_filter`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tagent_custom_fields`
|
-- Table `tagent_custom_fields`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `tagent_custom_fields` (
|
CREATE TABLE IF NOT EXISTS `tagent_custom_fields` (
|
||||||
`id_field` int(10) unsigned NOT NULL auto_increment,
|
`id_field` int(10) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(45) NOT NULL default '',
|
`name` varchar(45) NOT NULL default '',
|
||||||
`display_on_front` tinyint(1) NOT NULL default 0,
|
`display_on_front` tinyint(1) NOT NULL default 0,
|
||||||
PRIMARY KEY (`id_field`)
|
PRIMARY KEY (`id_field`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `tagent_custom_data`
|
-- Table `tagent_custom_data`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `tagent_custom_data` (
|
CREATE TABLE IF NOT EXISTS `tagent_custom_data` (
|
||||||
`id_field` int(10) unsigned NOT NULL,
|
`id_field` int(10) unsigned NOT NULL,
|
||||||
`id_agent` int(10) unsigned NOT NULL,
|
`id_agent` int(10) unsigned NOT NULL,
|
||||||
`description` text,
|
`description` text,
|
||||||
FOREIGN KEY (`id_field`) REFERENCES tagent_custom_fields(`id_field`)
|
FOREIGN KEY (`id_field`) REFERENCES tagent_custom_fields(`id_field`)
|
||||||
ON UPDATE CASCADE ON DELETE CASCADE,
|
ON UPDATE CASCADE ON DELETE CASCADE,
|
||||||
FOREIGN KEY (`id_agent`) REFERENCES tagente(`id_agente`)
|
FOREIGN KEY (`id_agent`) REFERENCES tagente(`id_agente`)
|
||||||
ON UPDATE CASCADE ON DELETE CASCADE,
|
ON UPDATE CASCADE ON DELETE CASCADE,
|
||||||
PRIMARY KEY (`id_field`, `id_agent`)
|
PRIMARY KEY (`id_field`, `id_agent`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
-- Table `ttag`
|
-- Table `ttag`
|
||||||
-- -----------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `ttag` (
|
CREATE TABLE IF NOT EXISTS `ttag` (
|
||||||
`id_tag` integer(10) unsigned NOT NULL auto_increment,
|
`id_tag` integer(10) unsigned NOT NULL auto_increment,
|
||||||
`name` varchar(100) NOT NULL default '',
|
`name` varchar(100) NOT NULL default '',
|
||||||
`description` text NOT NULL,
|
`description` text NOT NULL,
|
||||||
`url` mediumtext NOT NULL,
|
`url` mediumtext NOT NULL,
|
||||||
PRIMARY KEY (`id_tag`)
|
PRIMARY KEY (`id_tag`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue