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>
|
||||
|
||||
* include/functions_netflow.php,
|
||||
|
|
|
@ -120,7 +120,8 @@ function process_upload_xml_report($xml, $group_filter = 0) {
|
|||
|
||||
$agents_item= array();
|
||||
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']);
|
||||
$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';
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tplanned_downtime`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
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 `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_periodicity` varchar(100) NOT NULL default 'weekly';
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tplanned_downtime_agents`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
DELETE FROM tplanned_downtime_agents
|
||||
WHERE id_downtime NOT IN (SELECT id FROM tplanned_downtime);
|
||||
|
||||
ALTER TABLE tplanned_downtime_agents
|
||||
ADD FOREIGN KEY(`id_downtime`) REFERENCES tplanned_downtime(`id`)
|
||||
ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE `tplanned_downtime_agents` ADD COLUMN `all_modules` tinyint(1) default 1;
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tplanned_downtime_modules`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`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`)
|
||||
ON DELETE CASCADE
|
||||
) 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`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE `tgrupo` ADD COLUMN `description` text;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `talert_snmp`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
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',
|
||||
`single_value` varchar(255) DEFAULT '');
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tagente_modulo`
|
||||
-- -----------------------------------------------------
|
||||
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` ADD COLUMN `wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard';
|
||||
------------------------------------------------------------------------
|
||||
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` 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 `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`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
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 `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
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE tgraph_source MODIFY weight FLOAT(5,3) NOT NULL DEFAULT '0.000';
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tevent_filter`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tevent_filter` (
|
||||
`id_filter` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_group_filter` int(10) NOT NULL default 0,
|
||||
|
@ -177,78 +186,14 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` (
|
|||
PRIMARY KEY (`id_filter`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tconfig`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
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)
|
||||
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');
|
||||
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
|
||||
('enable_pass_policy', 0),
|
||||
('pass_size', 4),
|
||||
|
@ -263,10 +208,63 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
|
|||
('compare_pass', 3),
|
||||
('meta_style', 'meta_pandora'),
|
||||
('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`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tpassword_history` (
|
||||
`id_pass` int(10) unsigned NOT NULL auto_increment,
|
||||
`id_user` varchar(60) NOT NULL,
|
||||
|
@ -276,60 +274,32 @@ CREATE TABLE IF NOT EXISTS `tpassword_history` (
|
|||
PRIMARY KEY (`id_pass`)
|
||||
) 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`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE tplugin ADD `macros` text;
|
||||
ALTER TABLE tplugin ADD `parameters` text;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- 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.'
|
||||
WHERE id_recon_script = 1;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `trecon_task
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE trecon_task MODIFY subnet TEXT NOT NULL DEFAULT '';
|
||||
ALTER TABLE trecon_task MODIFY field1 TEXT NOT NULL DEFAULT '';
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tlayout_data
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE tlayout_data ADD COLUMN `enable_link` tinyint(1) UNSIGNED NOT NULL default 1;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `tagente_modulo`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE tagente_modulo ADD `critical_instructions` TEXT NOT NULL default '';
|
||||
ALTER TABLE tagente_modulo ADD `warning_instructions` TEXT NOT NULL default '';
|
||||
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 '';
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tnetwork_map`
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE tnetwork_map ADD `text_filter` VARCHAR(100) NOT NULL DEFAULT "";
|
||||
ALTER TABLE tnetwork_map ADD `dont_show_subgroups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
|
||||
|
||||
|
|
|
@ -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 (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;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table "tplanned_downtime_modules"
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE "tplanned_downtime_modules" (
|
||||
"id" BIGSERIAL NOT NULL PRIMARY KEY,
|
||||
"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
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tevento`
|
||||
-- -----------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE "tevento" ADD COLUMN "source" 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`
|
||||
|
@ -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 "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`
|
||||
|
@ -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 "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`
|
||||
-- -----------------------------------------------------
|
||||
|
@ -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 "parameters" TEXT default '';
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `trecon_task`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
ALTER TABLE "trecon_task" ALTER COLUMN "subnet" TYPE TEXT;
|
||||
ALTER TABLE "trecon_task" ALTER COLUMN "field1" TYPE TEXT;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tlayout_data`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
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`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
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 "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 ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
||||
echo '</a>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
|
||||
if (!isset($_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 ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
||||
echo '</a>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$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>';
|
||||
$values = array (
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
/* You can redefine $url and unset $id_agente to reuse the form. Dirty (hope temporal) hack */
|
||||
if (isset ($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';
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,8 @@ if ($create){
|
|||
|
||||
$id = $result_ins;
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$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]);
|
||||
if (isset ($info[0][$ldap_key])) {
|
||||
$ret[$internal_key] = $info[0][$ldap_key][0];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$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"]));
|
||||
if (!$sr) {
|
||||
$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"]);
|
||||
$info = @ldap_get_entries( $ldap_cache["ds"], $sr );
|
||||
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;
|
||||
if (isset ($info[$i][$ldap_key])) {
|
||||
$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]]["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) {
|
||||
list ($uid, $trash) = explode (',', $dn, 2);
|
||||
list ($trash, $user) = explode ('=', $uid);
|
||||
|
||||
return ($user);
|
||||
}
|
||||
|
||||
|
|
|
@ -79,11 +79,13 @@ function safe_int ($value, $min = false, $max = false) {
|
|||
$check = safe_int ($check, $min, $max);
|
||||
if ($check !== false) {
|
||||
$value[$key] = $check;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
unset ($value[$key]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$value = (int) $value; //Cast as integer
|
||||
if (($min !== false && $value < $min) || ($max !== false && $value > $max)) {
|
||||
//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) {
|
||||
include ($config["homedir"]."/general/error_authconfig.php");
|
||||
exit;
|
||||
} else if ($error == 0) {
|
||||
}
|
||||
else if ($error == 0) {
|
||||
// Display the error once even if multiple connection attempts are made
|
||||
$error = 1;
|
||||
ui_print_error_message (__("Error connecting to database %s at %s.", $db, $host));
|
||||
|
|
|
@ -831,7 +831,8 @@ function groups_create_group($group_name, $rest_values){
|
|||
|
||||
if (!$check){
|
||||
$result = db_process_sql_insert('tgrupo', $values);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
|
@ -845,8 +846,8 @@ function groups_agent_unknown ($group_array) {
|
|||
|
||||
if (empty ($group_array)) {
|
||||
return 0;
|
||||
|
||||
} else if (!is_array ($group_array)){
|
||||
}
|
||||
else if (!is_array ($group_array)) {
|
||||
$group_array = array($group_array);
|
||||
}
|
||||
|
||||
|
@ -863,7 +864,7 @@ function groups_agent_unknown ($group_array) {
|
|||
AND estado = 1
|
||||
AND tagente_estado.utimestamp != 0
|
||||
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
|
||||
$agents_warning = "SELECT tagente.id_agente
|
||||
|
@ -875,7 +876,7 @@ function groups_agent_unknown ($group_array) {
|
|||
AND estado = 2
|
||||
AND tagente_estado.utimestamp != 0
|
||||
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
|
||||
$agents_unknown = "SELECT tagente.id_agente
|
||||
|
@ -887,18 +888,16 @@ function groups_agent_unknown ($group_array) {
|
|||
AND estado = 3
|
||||
AND tagente_estado.utimestamp != 0
|
||||
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
|
||||
FROM tagente, tagente_modulo, tagente_estado
|
||||
WHERE tagente.id_agente = tagente_modulo.id_agente
|
||||
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
||||
|
||||
AND tagente.id_grupo IN $group_clause
|
||||
AND tagente.id_agente NOT IN ($agents_critical)
|
||||
AND tagente.id_agente NOT IN ($agents_warning)
|
||||
AND tagente.id_agente IN ($agents_unknown) ) AS t");
|
||||
|
||||
}
|
||||
|
||||
// Get ok agents by using the status code in modules.
|
||||
|
@ -908,7 +907,8 @@ function groups_agent_ok ($group_array) {
|
|||
if (empty ($group_array)) {
|
||||
return 0;
|
||||
|
||||
} else if (!is_array ($group_array)){
|
||||
}
|
||||
else if (!is_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,
|
||||
$ranksep = 2.5, $center = 0, $regen = 1, $pure = 0,
|
||||
$id_networkmap = 0, $show_snmp_modules = 0, $cut_names = true,
|
||||
$relative = false) {
|
||||
$relative = false, $text_filter = '') {
|
||||
|
||||
global $config;
|
||||
|
||||
$parents = array();
|
||||
$orphans = array();
|
||||
|
||||
$filter = array ();
|
||||
$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) {
|
||||
$filter['id_grupo'] = $group;
|
||||
|
||||
|
@ -128,6 +145,8 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0,
|
|||
$node_count++;
|
||||
}
|
||||
|
||||
$stats = array();
|
||||
|
||||
// Create nodes
|
||||
foreach ($nodes as $node_id => $node) {
|
||||
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
|
||||
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;
|
||||
|
||||
$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);
|
||||
|
||||
foreach($id_groups as $id_group) {
|
||||
$add = false;
|
||||
if (check_acl($config["id_user"], $id_group, 'AR')) {
|
||||
$add = true;
|
||||
}
|
||||
|
||||
if ($add) {
|
||||
$groups[] = db_get_row ('tgrupo', 'id_grupo', $id_group);
|
||||
}
|
||||
}
|
||||
|
@ -225,14 +249,20 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
|
|||
|
||||
$node_count = 0;
|
||||
|
||||
$groups_hiden = array();
|
||||
foreach ($nodes_groups as $node_group) {
|
||||
|
||||
$node_count++;
|
||||
|
||||
// Save node parent information to define edges later
|
||||
if ($node_group['parent'] != "0" && $node_group['id_grupo'] != $group) {
|
||||
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 {
|
||||
$orphans[$node_count] = 1;
|
||||
}
|
||||
|
@ -251,6 +281,12 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
|
|||
// Parse agents
|
||||
$nodes_agents = array();
|
||||
foreach ($agents as $agent) {
|
||||
if ($dont_show_subgroups) {
|
||||
if (!empty($groups_hiden[$agent['id_grupo']])) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$node_count ++;
|
||||
// Save node parent information to define edges later
|
||||
$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) {
|
||||
$node_count ++;
|
||||
$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
|
||||
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.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
@ -657,6 +693,8 @@ function networkmap_create_networkmap ($name, $type = 'topology', $layout = 'rad
|
|||
$values['distance_nodes'] = $distance_nodes;
|
||||
$values['center'] = $center;
|
||||
$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);
|
||||
}
|
||||
|
|
|
@ -284,9 +284,9 @@ function servers_get_info ($id_server = -1) {
|
|||
AND tagente.server_name = '" . $server["name"] . "'
|
||||
AND (UNIX_TIMESTAMP() - utimestamp) < (tagent_module_inventory.interval * 10)
|
||||
AND (UNIX_TIMESTAMP() - utimestamp) > tagent_module_inventory.interval");
|
||||
|
||||
// Export server
|
||||
} else if ($server["server_type"] == 7) {
|
||||
}
|
||||
else if ($server["server_type"] == 7) {
|
||||
|
||||
// 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"]);
|
||||
|
@ -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"]);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Data, Plugin, WMI, Network and Others
|
||||
|
@ -443,7 +444,8 @@ function servers_get_info ($id_server = -1) {
|
|||
|
||||
if ($server["modules_total"] > 0) {
|
||||
$server["load"] = round ($server["modules"] / $server["modules_total"] * 100);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$server["load"] = 0;
|
||||
}
|
||||
|
||||
|
@ -520,7 +522,6 @@ function servers_check_status () {
|
|||
case "postgresql":
|
||||
$sql = "SELECT COUNT(id_server) FROM tserver WHERE status = 1 AND keepalive > NOW() - INTERVAL '15 MINUTE'";
|
||||
break;
|
||||
|
||||
case "oracle":
|
||||
$sql = "SELECT COUNT(id_server) FROM tserver WHERE status = 1 AND keepalive > systimestamp - INTERVAL '15' MINUTE";
|
||||
break;
|
||||
|
@ -542,5 +543,4 @@ function servers_get_status ($id_server) {
|
|||
$serverinfo = servers_get_info ($id_server);
|
||||
return $serverinfo[$id_server];
|
||||
}
|
||||
|
||||
?>
|
|
@ -433,12 +433,24 @@ foreach ($modules as $module) {
|
|||
echo "<td class='".$tdcolor."f9' colspan='1'> x</td>";
|
||||
|
||||
switch ($module["datos"]) {
|
||||
case 10: echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('TRACE')."</td>"; break;
|
||||
case 20: echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('DEBUG')."</td>"; 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;
|
||||
case 10:
|
||||
echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('TRACE')."</td>";
|
||||
break;
|
||||
case 20:
|
||||
echo "<td class=$tdcolor style='color:darkgreen; font-weight:bold;'>".__('DEBUG')."</td>";
|
||||
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);
|
||||
|
||||
// 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) {
|
||||
ui_print_error_message (__('Map could not be generated'));
|
||||
|
|
|
@ -62,6 +62,8 @@ if ($add_networkmap) {
|
|||
$simple = 0;
|
||||
$regen = 1;
|
||||
$font_size = 12;
|
||||
$text_filter = '';
|
||||
$dont_show_subgroups = false;
|
||||
$group = 0;
|
||||
$module_group = 0;
|
||||
$center = 0;
|
||||
|
@ -70,13 +72,20 @@ if ($add_networkmap) {
|
|||
$sql = db_get_value_filter('COUNT(name)', 'tnetwork_map', array('name' => "%$name"));
|
||||
|
||||
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,
|
||||
__('Network map created successfully'),
|
||||
__('Could not create network map'), '', true);
|
||||
}
|
||||
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,
|
||||
__('Network map created successfully'),
|
||||
__('Could not create network map'), '', true);
|
||||
|
@ -96,6 +105,8 @@ if($save_networkmap || $update_networkmap) {
|
|||
$regen = (int) get_parameter ('regen', 0);
|
||||
$show_snmp_modules = (int) get_parameter ('show_snmp_modules', 0);
|
||||
$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);
|
||||
$module_group = (int) get_parameter ('module_group', 0);
|
||||
$center = (int) get_parameter ('center', 0);
|
||||
|
@ -105,10 +116,24 @@ if($save_networkmap || $update_networkmap) {
|
|||
|
||||
if($save_networkmap) {
|
||||
if (!$check || $subcheck == $name) {
|
||||
$result = networkmap_update_networkmap($id_networkmap, array('name' => $name, 'type' => $activeTab, 'layout' => $layout,
|
||||
'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, 'center' => $center,
|
||||
$result = networkmap_update_networkmap($id_networkmap,
|
||||
array('name' => $name,
|
||||
'type' => $activeTab,
|
||||
'layout' => $layout,
|
||||
'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,
|
||||
|
@ -154,6 +179,8 @@ if(!$update_networkmap && !$save_networkmap && $id_networkmap != 0) {
|
|||
$regen = $networkmap_data['regenerate'];
|
||||
$show_snmp_modules = $networkmap_data['show_snmp_modules'];
|
||||
$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'];
|
||||
$module_group = $networkmap_data['id_module_group'];
|
||||
$center = $networkmap_data['center'];
|
||||
|
@ -216,7 +243,8 @@ if (!$nomaps && $id_networkmap != 0) {
|
|||
&tab='.$activeTab.'&save_networkmap=1&name='.$name.'&group='.$group.'
|
||||
&layout='.$layout.'&nooverlap='.$nooverlap.'&simple='.$simple.'&regen='.$regen.'
|
||||
&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.'
|
||||
&show_snmp_modules='.(int)$show_snmp_modules.'">' .
|
||||
html_print_image("images/file.png", true, array ("title" => __('Save map'))) .'</a>');
|
||||
|
@ -263,77 +291,57 @@ $layout_array = array (
|
|||
'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 .= '<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>';
|
||||
$options_form .= '<td>';
|
||||
$options_form .= __('Name') . '<br />';
|
||||
$options_form .= html_print_input_text ('name', $name, '', 10, 25, true);
|
||||
$options_form .= '</td>';
|
||||
$options_form .= '<td valign="top">' . __('Group') . '<br />';
|
||||
$options_form .= html_print_select_groups(false, 'AR', false, 'group', $group, '', 'All', 0, true);
|
||||
$options_form .= '</td>';
|
||||
|
||||
|
||||
|
||||
unset($table);
|
||||
$table->width = '95%';
|
||||
$table->class = 'databox';
|
||||
$table->data = array();
|
||||
$table->data[0][] = __('Name:') . ' ' .
|
||||
html_print_input_text ('name', $name, '', 10, 25, true);
|
||||
$table->data[0][] = __('Group:') . ' ' .
|
||||
html_print_select_groups(false, 'AR', false, 'group', $group, '', 'All', 0, true);
|
||||
if ($activeTab == 'groups' || $activeTab == 'policies') {
|
||||
$options_form .= '<td valign="top">' . __('Module group') . '<br />';
|
||||
$options_form .= html_print_select_from_sql ('SELECT id_mg, name FROM tmodule_group', 'module_group', $module_group, '', 'All', 0, true);
|
||||
$options_form .= '</td>';
|
||||
$table->data[0][] = __('Module group') . ' ' .
|
||||
html_print_select_from_sql ('SELECT id_mg, name FROM tmodule_group', 'module_group', $module_group, '', 'All', 0, true);
|
||||
}
|
||||
|
||||
if ($activeTab == 'topology') {
|
||||
$options_form .= '<td valign="top">' . __('Show interfaces') . '<br />';
|
||||
$options_form .= html_print_checkbox ('show_snmp_modules', '1', $show_snmp_modules, true);
|
||||
$options_form .= '</td>';
|
||||
$table->data[0][] = __('Show interfaces') . ' ' .
|
||||
html_print_checkbox ('show_snmp_modules', '1', $show_snmp_modules, true);
|
||||
}
|
||||
|
||||
$options_form .= '<td valign="top">' . __('Layout') . '<br />';
|
||||
$options_form .= html_print_select ($layout_array, 'layout', $layout, '', '', '', true);
|
||||
$options_form .= '</td>';
|
||||
|
||||
$table->data[0][] = __('Layout') . ' ' .
|
||||
html_print_select ($layout_array, 'layout', $layout, '', '', '', true);
|
||||
if ($activeTab == 'groups') {
|
||||
$options_form .= '<td valign="top">' . __('Depth') . '<br />';
|
||||
$depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'group' => __('Groups'));
|
||||
$options_form .= html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
||||
$options_form .= '</td>';
|
||||
$table->data[0][] = __('Depth') . ' ' .
|
||||
html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
||||
}
|
||||
|
||||
if ($activeTab == 'policies') {
|
||||
$options_form .= '<td valign="top">' . __('Depth') . '<br />';
|
||||
$depth_levels = array('all' => __('All'), 'agent' => __('Agents'), 'policy' => __('Policies'));
|
||||
$options_form .= html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
||||
$options_form .= '</td>';
|
||||
$table->data[0][] = __('Depth') . ' ' .
|
||||
html_print_select ($depth_levels, 'depth', $depth, '', '', '', true, false, false);
|
||||
}
|
||||
|
||||
$options_form .= '</tr></table>';
|
||||
$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>';
|
||||
|
||||
$table->data[1][] = __('No Overlap') . ' ' .
|
||||
html_print_checkbox ('nooverlap', '1', $nooverlap, true);
|
||||
if (($activeTab == 'groups' || $activeTab == 'policies') &&
|
||||
$depth == 'all') {
|
||||
$options_form .= '<td valign="top">' . __('Only modules with alerts') . '<br />';
|
||||
$options_form .= html_print_checkbox ('modwithalerts', '1', $modwithalerts, true);
|
||||
$options_form .= '</td>';
|
||||
$table->data[1][] = __('Only modules with alerts') . ' ' .
|
||||
html_print_checkbox ('modwithalerts', '1', $modwithalerts, true);
|
||||
|
||||
if ($activeTab == 'groups') {
|
||||
if($config['enterprise_installed']) {
|
||||
$options_form .= '<td valign="top">' . __('Hide policy modules') . '<br />';
|
||||
$options_form .= html_print_checkbox ('hidepolicymodules', '1', $hidepolicymodules, true);
|
||||
$options_form .= '</td>';
|
||||
$table->data[1][] = __('Hide policy modules') . ' ' .
|
||||
html_print_checkbox ('hidepolicymodules', '1', $hidepolicymodules, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
$table->data[1][] = __('Simple') . ' ' .
|
||||
html_print_checkbox ('simple', '1', $simple, true);
|
||||
|
||||
$options_form .= '<td valign="top">' . __('Simple') . '<br />';
|
||||
$options_form .= html_print_checkbox ('simple', '1', $simple, true);
|
||||
$options_form .= '</td>';
|
||||
|
||||
$options_form .= '<td valign="top">' . __('Regenerate') . '<br />';
|
||||
$options_form .= html_print_checkbox ('regen', '1', $regen, true);
|
||||
$options_form .= '</td>';
|
||||
|
||||
$table->data[1][] = __('Regenerate') . ' ' .
|
||||
html_print_checkbox ('regen', '1', $regen, true);
|
||||
if ($pure == "1") {
|
||||
// Zoom
|
||||
$zoom_array = array (
|
||||
|
@ -345,29 +353,31 @@ if ($pure == "1") {
|
|||
'5' => 'x10',
|
||||
);
|
||||
|
||||
$options_form .= '<td valign="top">' . __('Zoom') . '<br />';
|
||||
$options_form .= html_print_select ($zoom_array, 'zoom', $zoom, '', '', '', true, false, false, false);
|
||||
$options_form .= '</td>';
|
||||
$table->data[1][] = __('Zoom') . ' ' .
|
||||
html_print_select ($zoom_array, 'zoom', $zoom, '', '', '', true, false, false, false);
|
||||
}
|
||||
|
||||
if ($nooverlap == 1) {
|
||||
$options_form .= "<td>";
|
||||
$options_form .= __('Distance between nodes') . '<br />';
|
||||
$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][] = __('Distance between nodes') . ' ' .
|
||||
html_print_input_text ('ranksep', $ranksep, __('Separation between elements in the map (in Non-overlap mode)'), 3, 4, true);
|
||||
}
|
||||
$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 .= __('Font') . '<br />';
|
||||
$options_form .= html_print_input_text ('font_size', $font_size, $alt = 'Font size (in pt)', 2, 4, true);
|
||||
$options_form .= "</td>";
|
||||
|
||||
$options_form .= '<td>';
|
||||
$options_form .= html_print_input_hidden('update_networkmap',1, true);
|
||||
$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>';
|
||||
$options_form .= html_print_input_hidden('update_networkmap',1, true) .
|
||||
html_print_input_hidden('hidden_options',0, true);
|
||||
$options_form .= html_print_table ($table, true);
|
||||
$options_form .= "<div style='width: " . $table->width . "; text-align: right;'>" .
|
||||
html_print_submit_button (__('Apply'), "updbutton", false, 'class="sub next"', true) .
|
||||
"</div>";
|
||||
$options_form .= '</form>';
|
||||
|
||||
ui_toggle($options_form, __('Map options'), '', $hidden_options);
|
||||
|
||||
|
@ -377,7 +387,7 @@ if($id_networkmap != 0) {
|
|||
require_once('operation/agentes/networkmap.groups.php');
|
||||
break;
|
||||
case 'policies':
|
||||
require_once(''.ENTERPRISE_DIR.'/operation/policies/networkmap.policies.php');
|
||||
require_once(ENTERPRISE_DIR . '/operation/policies/networkmap.policies.php');
|
||||
break;
|
||||
default:
|
||||
case 'topology':
|
||||
|
|
|
@ -32,7 +32,7 @@ require_once ('include/functions_networkmap.php');
|
|||
$filter = networkmap_get_filter ($layout);
|
||||
|
||||
// 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) {
|
||||
ui_print_error_message (__('Map could not be generated'));
|
||||
|
@ -101,5 +101,4 @@ else {
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
|
@ -1474,9 +1474,9 @@ CREATE TABLE tgroup_stat (
|
|||
utimestamp NUMBER(10, 0) default 0 NOT NULL
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table "tnetwork_map"
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE tnetwork_map (
|
||||
id_networkmap NUMBER(10, 0) NOT NULL PRIMARY KEY,
|
||||
id_user VARCHAR2(60) NOT NULL,
|
||||
|
@ -1497,7 +1497,9 @@ CREATE TABLE tnetwork_map (
|
|||
distance_nodes BINARY_DOUBLE default 2.5,
|
||||
center NUMBER(10, 0) default 0 NOT NULL,
|
||||
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;
|
||||
|
|
|
@ -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_tagente_id_agente_idx" ON "tgis_map_layer_has_tagente"("tagente_id_agente");
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table "tgroup_stat"
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
--Table to store global system stats per group
|
||||
CREATE TABLE "tgroup_stat" (
|
||||
"id_group" INTEGER NOT NULL default 0 PRIMARY KEY,
|
||||
|
@ -1252,9 +1252,9 @@ CREATE TABLE "tgroup_stat" (
|
|||
"utimestamp" INTEGER NOT NULL default 0
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table "tnetwork_map"
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE "tnetwork_map" (
|
||||
"id_networkmap" SERIAL NOT NULL PRIMARY KEY,
|
||||
"id_user" VARCHAR(60) NOT NULL,
|
||||
|
@ -1275,21 +1275,23 @@ CREATE TABLE "tnetwork_map" (
|
|||
"distance_nodes" DOUBLE PRECISION default 2.5,
|
||||
"center" INTEGER NOT NULL default 0,
|
||||
"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"
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE "tsnmp_filter" (
|
||||
"id_snmp_filter" SERIAL NOT NULL PRIMARY KEY,
|
||||
"description" varchar(255) default '',
|
||||
"filter" varchar(255) default ''
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table "tagent_custom_fields"
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE "tagent_custom_fields" (
|
||||
"id_field" SERIAL NOT NULL PRIMARY KEY,
|
||||
"name" varchar(45) NOT NULL default '',
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
-- Priority : 3 - Warning (yellow)
|
||||
-- Priority : 4 - Critical (red)
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `taddress`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `taddress` (
|
||||
`id_a` int(10) unsigned NOT NULL auto_increment,
|
||||
`ip` varchar(60) NOT NULL default '',
|
||||
|
@ -35,9 +35,9 @@ CREATE TABLE IF NOT EXISTS `taddress` (
|
|||
KEY `ip` (`ip`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `taddress_agent`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `taddress_agent` (
|
||||
`id_ag` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_a` bigint(20) unsigned NOT NULL default '0',
|
||||
|
@ -45,9 +45,9 @@ CREATE TABLE IF NOT EXISTS `taddress_agent` (
|
|||
PRIMARY KEY (`id_ag`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tagente`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tagente` (
|
||||
`id_agente` int(10) unsigned NOT NULL auto_increment,
|
||||
`nombre` varchar(600) BINARY NOT NULL default '',
|
||||
|
@ -610,16 +610,18 @@ CREATE TABLE IF NOT EXISTS `tmensajes` (
|
|||
PRIMARY KEY (`id_mensaje`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tmodule_group`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tmodule_group` (
|
||||
`id_mg` tinyint(4) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(150) NOT NULL default '',
|
||||
PRIMARY KEY (`id_mg`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tnetwork_component`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_component` (
|
||||
`id_nc` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(80) NOT NULL,
|
||||
|
@ -667,7 +669,9 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` (
|
|||
PRIMARY KEY (`id_nc`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tnetwork_component_group`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_component_group` (
|
||||
`id_sg` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(200) NOT NULL default '',
|
||||
|
@ -675,7 +679,9 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component_group` (
|
|||
PRIMARY KEY (`id_sg`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tnetwork_profile`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_profile` (
|
||||
`id_np` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
|
@ -683,13 +689,18 @@ CREATE TABLE IF NOT EXISTS `tnetwork_profile` (
|
|||
PRIMARY KEY (`id_np`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tnetwork_profile_component`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_profile_component` (
|
||||
`id_nc` mediumint(8) unsigned NOT NULL default '0',
|
||||
`id_np` mediumint(8) unsigned NOT NULL default '0',
|
||||
KEY `id_np` (`id_np`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tnota`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnota` (
|
||||
`id_nota` bigint(6) unsigned zerofill NOT NULL auto_increment,
|
||||
`id_incident` bigint(6) unsigned zerofill NOT NULL,
|
||||
|
@ -700,16 +711,16 @@ CREATE TABLE IF NOT EXISTS `tnota` (
|
|||
KEY `id_incident` (`id_incident`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `torigen`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `torigen` (
|
||||
`origen` varchar(100) NOT NULL default ''
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tperfil`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tperfil` (
|
||||
`id_perfil` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` TEXT NOT NULL,
|
||||
|
@ -726,9 +737,9 @@ CREATE TABLE IF NOT EXISTS `tperfil` (
|
|||
PRIMARY KEY (`id_perfil`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `trecon_script`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `trecon_script` (
|
||||
`id_recon_script` int(10) NOT NULL auto_increment,
|
||||
`name` varchar(100) default '',
|
||||
|
@ -737,9 +748,9 @@ CREATE TABLE IF NOT EXISTS `trecon_script` (
|
|||
PRIMARY KEY (`id_recon_script`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `trecon_task`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `trecon_task` (
|
||||
`id_rt` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
|
@ -769,9 +780,9 @@ CREATE TABLE IF NOT EXISTS `trecon_task` (
|
|||
KEY `recon_task_daemon` (`id_recon_server`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tserver`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tserver` (
|
||||
`id_server` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
|
@ -817,9 +828,9 @@ CREATE TABLE IF NOT EXISTS `tserver` (
|
|||
-- 9 web
|
||||
-- TODO: drop 2.x xxxx_server fields, unused since server_type exists.
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tsesion`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tsesion` (
|
||||
`id_sesion` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`id_usuario` varchar(60) NOT NULL default '0',
|
||||
|
@ -833,9 +844,9 @@ CREATE TABLE IF NOT EXISTS `tsesion` (
|
|||
KEY `idx_user` (`id_usuario`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `ttipo_modulo`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `ttipo_modulo` (
|
||||
`id_tipo` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`nombre` varchar(100) NOT NULL default '',
|
||||
|
@ -845,9 +856,9 @@ CREATE TABLE IF NOT EXISTS `ttipo_modulo` (
|
|||
PRIMARY KEY (`id_tipo`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `ttrap`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `ttrap` (
|
||||
`id_trap` bigint(20) unsigned NOT NULL auto_increment,
|
||||
`source` varchar(50) NOT NULL default '',
|
||||
|
@ -870,9 +881,9 @@ CREATE TABLE IF NOT EXISTS `ttrap` (
|
|||
INDEX status (`status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tusuario`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tusuario` (
|
||||
`id_user` varchar(60) NOT NULL default '0',
|
||||
`fullname` varchar(255) NOT NULL,
|
||||
|
@ -906,6 +917,9 @@ CREATE TABLE IF NOT EXISTS `tusuario` (
|
|||
UNIQUE KEY `id_user` (`id_user`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tusuario_perfil`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tusuario_perfil` (
|
||||
`id_up` bigint(10) unsigned NOT NULL auto_increment,
|
||||
`id_usuario` varchar(100) NOT NULL default '',
|
||||
|
@ -916,7 +930,9 @@ CREATE TABLE IF NOT EXISTS `tusuario_perfil` (
|
|||
PRIMARY KEY (`id_up`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tnews`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnews` (
|
||||
`id_news` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`author` varchar(255) NOT NULL DEFAULT '',
|
||||
|
@ -926,6 +942,9 @@ CREATE TABLE IF NOT EXISTS `tnews` (
|
|||
PRIMARY KEY(`id_news`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tgraph`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tgraph` (
|
||||
`id_graph` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_user` varchar(100) NOT NULL default '',
|
||||
|
@ -942,6 +961,9 @@ CREATE TABLE IF NOT EXISTS `tgraph` (
|
|||
PRIMARY KEY(`id_graph`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tgraph_source`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tgraph_source` (
|
||||
`id_gs` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_graph` int(11) NOT NULL default 0,
|
||||
|
@ -950,9 +972,9 @@ CREATE TABLE IF NOT EXISTS `tgraph_source` (
|
|||
PRIMARY KEY(`id_gs`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `treport`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `treport` (
|
||||
`id_report` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_user` varchar(100) NOT NULL default '',
|
||||
|
@ -971,9 +993,9 @@ CREATE TABLE IF NOT EXISTS `treport` (
|
|||
PRIMARY KEY(`id_report`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `treport_content`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `treport_content` (
|
||||
`id_rc` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_report` INTEGER UNSIGNED NOT NULL default 0,
|
||||
|
@ -1017,6 +1039,9 @@ CREATE TABLE IF NOT EXISTS `treport_content` (
|
|||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `treport_content_sla_combined`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `treport_content_sla_combined` (
|
||||
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
||||
`id_report_content` INTEGER UNSIGNED NOT NULL,
|
||||
|
@ -1030,6 +1055,9 @@ CREATE TABLE IF NOT EXISTS `treport_content_sla_combined` (
|
|||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `treport_content_item`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `treport_content_item` (
|
||||
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
||||
`id_report_content` INTEGER UNSIGNED NOT NULL,
|
||||
|
@ -1041,6 +1069,9 @@ CREATE TABLE IF NOT EXISTS `treport_content_item` (
|
|||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `treport_custom_sql`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `treport_custom_sql` (
|
||||
`id` INTEGER UNSIGNED NOT NULL auto_increment,
|
||||
`name` varchar(150) NOT NULL default '',
|
||||
|
@ -1048,6 +1079,9 @@ CREATE TABLE IF NOT EXISTS `treport_custom_sql` (
|
|||
PRIMARY KEY(`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8;
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tlayout`
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tlayout` (
|
||||
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) NOT NULL,
|
||||
|
@ -1059,9 +1093,9 @@ CREATE TABLE IF NOT EXISTS `tlayout` (
|
|||
PRIMARY KEY(`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tlayout_data`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tlayout_data` (
|
||||
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_layout` INTEGER UNSIGNED NOT NULL default 0,
|
||||
|
@ -1083,9 +1117,9 @@ CREATE TABLE IF NOT EXISTS `tlayout_data` (
|
|||
PRIMARY KEY(`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tplugin`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- The fields "net_dst_opt", "net_port_opt", "user_opt" and
|
||||
-- "pass_opt" are deprecated for the 5.1.
|
||||
CREATE TABLE IF NOT EXISTS `tplugin` (
|
||||
|
@ -1104,18 +1138,18 @@ CREATE TABLE IF NOT EXISTS `tplugin` (
|
|||
PRIMARY KEY(`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tmodule`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tmodule` (
|
||||
`id_module` int(11) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
PRIMARY KEY (`id_module`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tserver_export`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tserver_export` (
|
||||
`id` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
|
@ -1134,9 +1168,9 @@ CREATE TABLE IF NOT EXISTS `tserver_export` (
|
|||
INDEX id_export_server (`id_export_server`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tserver_export_data`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- id_export_server is real pandora fms export server process that manages this server
|
||||
-- id is the "destination" server to export
|
||||
CREATE TABLE IF NOT EXISTS `tserver_export_data` (
|
||||
|
@ -1150,9 +1184,9 @@ CREATE TABLE IF NOT EXISTS `tserver_export_data` (
|
|||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tplanned_downtime`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime` (
|
||||
`id` MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR( 100 ) NOT NULL,
|
||||
|
@ -1179,9 +1213,9 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime` (
|
|||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tplanned_downtime_agents`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime_agents` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`id_agent` mediumint(8) unsigned NOT NULL default '0',
|
||||
|
@ -1192,9 +1226,9 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime_agents` (
|
|||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tplanned_downtime_modules`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
|
||||
`id` int(20) unsigned NOT NULL auto_increment,
|
||||
`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;
|
||||
|
||||
-- GIS extension Tables
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tgis_data_history`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tgis_data_history` (
|
||||
`id_tgis_data` INT NOT NULL AUTO_INCREMENT COMMENT 'key of the table' ,
|
||||
`longitude` DOUBLE NOT NULL ,
|
||||
|
@ -1227,9 +1261,9 @@ ENGINE = InnoDB
|
|||
COMMENT = 'Table to store historical GIS information of the agents';
|
||||
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tgis_data_status`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tgis_data_status` (
|
||||
`tagente_id_agente` INT(10) UNSIGNED NOT NULL COMMENT 'Reference to the agent' ,
|
||||
`current_longitude` DOUBLE NOT NULL COMMENT 'Last received longitude',
|
||||
|
@ -1253,15 +1287,15 @@ CREATE TABLE IF NOT EXISTS `tgis_data_status` (
|
|||
ENGINE = InnoDB
|
||||
COMMENT = 'Table to store last GIS information of the agents';
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tgis_map`
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tgis_map` (
|
||||
`id_tgis_map` INT NOT NULL AUTO_INCREMENT COMMENT 'table identifier' ,
|
||||
`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_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_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_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.' ,
|
||||
`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' ,
|
||||
|
@ -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_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' ,
|
||||
`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_altitude` DOUBLE NULL COMMENT 'altitude 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_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',
|
||||
PRIMARY KEY (`id_tmap_connection`) )
|
||||
ENGINE = InnoDB
|
||||
|
@ -1362,10 +1396,9 @@ CREATE TABLE IF NOT EXISTS `tgis_map_layer_has_tagente` (
|
|||
ENGINE = InnoDB
|
||||
COMMENT = 'Table to define wich agents are shown in a layer';
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tgroup_stat`
|
||||
-- -----------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tgroup_stat` (
|
||||
`id_group` int(10) unsigned NOT NULL default '0',
|
||||
`modules` int(10) unsigned NOT NULL default '0',
|
||||
|
@ -1384,10 +1417,9 @@ CREATE TABLE IF NOT EXISTS `tgroup_stat` (
|
|||
COMMENT = 'Table to store global system stats per group'
|
||||
DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tnetwork_map`
|
||||
-- -----------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_map` (
|
||||
`id_networkmap` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_user` VARCHAR(60) NOT NULL,
|
||||
|
@ -1409,13 +1441,14 @@ CREATE TABLE IF NOT EXISTS `tnetwork_map` (
|
|||
`center` INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`contracted_nodes` TEXT,
|
||||
`show_snmp_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`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;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tsnmp_filter`
|
||||
-- -----------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tsnmp_filter` (
|
||||
`id_snmp_filter` int(10) unsigned NOT NULL auto_increment,
|
||||
`description` varchar(255) default '',
|
||||
|
@ -1423,10 +1456,9 @@ CREATE TABLE IF NOT EXISTS `tsnmp_filter` (
|
|||
PRIMARY KEY (`id_snmp_filter`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tagent_custom_fields`
|
||||
-- -----------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tagent_custom_fields` (
|
||||
`id_field` int(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(45) NOT NULL default '',
|
||||
|
@ -1434,10 +1466,9 @@ CREATE TABLE IF NOT EXISTS `tagent_custom_fields` (
|
|||
PRIMARY KEY (`id_field`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `tagent_custom_data`
|
||||
-- -----------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tagent_custom_data` (
|
||||
`id_field` int(10) unsigned NOT NULL,
|
||||
`id_agent` int(10) unsigned NOT NULL,
|
||||
|
@ -1449,10 +1480,9 @@ CREATE TABLE IF NOT EXISTS `tagent_custom_data` (
|
|||
PRIMARY KEY (`id_field`, `id_agent`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
------------------------------------------------------------------------
|
||||
-- Table `ttag`
|
||||
-- -----------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `ttag` (
|
||||
`id_tag` integer(10) unsigned NOT NULL auto_increment,
|
||||
`name` varchar(100) NOT NULL default '',
|
||||
|
|
Loading…
Reference in New Issue