diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2aea5fea44..22e8c7fd8e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2010-12-22 Sancho Lerena + + * pandoradb_migrate_v3.1_to_v3.2.sql + pandoradb.sql: Some fields are now TEXT due the problem with new + HTML entities encoding. + + 2010-12-22 Sergio Martin * godmode/massive/massive_edit_agents.php: Fixed the massive edition diff --git a/pandora_console/extras/pandoradb_migrate_v3.1_to_v3.2.sql b/pandora_console/extras/pandoradb_migrate_v3.1_to_v3.2.sql index 778f6a92f8..faec3449b9 100644 --- a/pandora_console/extras/pandoradb_migrate_v3.1_to_v3.2.sql +++ b/pandora_console/extras/pandoradb_migrate_v3.1_to_v3.2.sql @@ -181,3 +181,42 @@ ALTER TABLE tagente_modulo MODIFY `tcp_rcv` TEXT default ''; -- ----------------------------------------------------- UPDATE tnews SET subject='Welcome to Pandora FMS 3.2!',text='This is the new Pandora FMS Console. A lot of new features have been added since last version. Please read the documentation about it, and feel free to test any option.\r\n\r\nThe Pandora FMS Team.',timestamp=NOW() WHERE id_news = '1'; + +-- Bigger fields due the HTML encoding + +alter table talert_templates modify field1 text; +alter table talert_templates modify field2 text; +alter table talert_templates modify field3 text; +alter table talert_templates modify name text; + +alter table talert_templates modify field2_recovery text; +alter table talert_templates modify field3_recovery text; + +alter table talert_actions modify field1 text; +alter table talert_actions modify field2 text; +alter table talert_actions modify field3 text; +alter table talert_actions modify name text; + +alter table tagente_estado modify datos text; +alter table tagente_modulo modify nombre text; +alter table tagente_modulo modify plugin_user text; +alter table tagente_modulo modify plugin_pass text; + +alter table talert_snmp modify al_field1 text; +alter table talert_snmp modify al_field2 text; +alter table talert_snmp modify al_field3 text; + +alter table tevento modify evento text; + +alter table tincidencia modify titulo text; +alter table tincidencia modify descripcion text; + +alter table tnetwork_component modify tcp_send text; +alter table tnetwork_component modify tcp_rcv text; +alter table tnetwork_component modify plugin_user text; +alter table tnetwork_component modify plugin_pass text; + +alter table tsesion modify descripcion text; +alter table ttrap modify oid text; +alter table ttrap modify oid_custom text; + diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 06ad089af4..e9125c1fa1 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -109,7 +109,7 @@ CREATE TABLE IF NOT EXISTS `tagente_datos_log4x` ( CREATE TABLE `tagente_estado` ( `id_agente_estado` int(10) unsigned NOT NULL auto_increment, `id_agente_modulo` int(10) NOT NULL default '0', - `datos` varchar(255) NOT NULL default '', + `datos` text NOT NULL default '', `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', `estado` int(4) NOT NULL default '0', `id_agente` int(10) NOT NULL default '0', @@ -145,7 +145,7 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` ( `id_agente` int(10) unsigned NOT NULL default '0', `id_tipo_modulo` smallint(5) NOT NULL default '0', `descripcion` TEXT NOT NULL default '', - `nombre` varchar(100) NOT NULL default '', + `nombre` text NOT NULL default '', `id_policy_module` INTEGER unsigned NOT NULL default '0', `max` bigint(20) default '0', `min` bigint(20) default '0', @@ -161,8 +161,8 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` ( `id_modulo` int(10) unsigned default '0', `disabled` tinyint(1) unsigned NOT NULL default '0', `id_export` smallint(4) unsigned default '0', - `plugin_user` varchar(250) default '', - `plugin_pass` varchar(250) default '', + `plugin_user` text default '', + `plugin_pass` text default '', `plugin_parameter` text, `id_plugin` int(10) default '0', `post_process` double(18,13) default NULL, @@ -202,9 +202,9 @@ CREATE TABLE IF NOT EXISTS `tagent_access` ( CREATE TABLE IF NOT EXISTS `talert_snmp` ( `id_as` int(10) unsigned NOT NULL auto_increment, `id_alert` int(10) unsigned NOT NULL default '0', - `al_field1` varchar(100) NOT NULL default '', - `al_field2` varchar(255) NOT NULL default '', - `al_field3` varchar(255) NOT NULL default '', + `al_field1` text NOT NULL default '', + `al_field2` text NOT NULL default '', + `al_field3` text NOT NULL default '', `description` varchar(255) default '', `alert_type` int(2) unsigned NOT NULL default '0', `agent` varchar(100) default '', @@ -223,19 +223,19 @@ CREATE TABLE IF NOT EXISTS `talert_snmp` ( CREATE TABLE IF NOT EXISTS `talert_commands` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', - `command` varchar(500) default '', - `description` varchar(255) default '', + `command` text default '', + `description` text default '', `internal` tinyint(1) default 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `talert_actions` ( `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(255) default '', + `name` text default '', `id_alert_command` int(10) unsigned NOT NULL, - `field1` varchar(255) NOT NULL default '', - `field2` varchar(255) default '', - `field3` varchar(255) default '', + `field1` text NOT NULL default '', + `field2` text default '', + `field3` text default '', `id_group` mediumint(8) unsigned NULL default 0, PRIMARY KEY (`id`), FOREIGN KEY (`id_alert_command`) REFERENCES talert_commands(`id`) @@ -244,12 +244,12 @@ CREATE TABLE IF NOT EXISTS `talert_actions` ( CREATE TABLE IF NOT EXISTS `talert_templates` ( `id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(255) default '', + `name` text default '', `description` mediumtext, `id_alert_action` int(10) unsigned NULL, - `field1` varchar(255) default '', - `field2` varchar(255) default '', - `field3` mediumtext NOT NULL, + `field1` text default '', + `field2` text default '', + `field3` text NOT NULL, `type` ENUM ('regex', 'max_min', 'max', 'min', 'equal', 'not_equal', 'warning', 'critical', 'onchange', 'unknown'), `value` varchar(255) default '', `matches_value` tinyint(1) default 0, @@ -268,8 +268,8 @@ CREATE TABLE IF NOT EXISTS `talert_templates` ( `saturday` tinyint(1) default 1, `sunday` tinyint(1) default 1, `recovery_notify` tinyint(1) default '0', - `field2_recovery` varchar(255) NOT NULL default '', - `field3_recovery` mediumtext NOT NULL, + `field2_recovery` text NOT NULL default '', + `field3_recovery` text NOT NULL, `priority` tinyint(4) default '0', `id_group` mediumint(8) unsigned NULL default 0, PRIMARY KEY (`id`), @@ -409,7 +409,7 @@ CREATE TABLE IF NOT EXISTS `tevento` ( `id_grupo` mediumint(4) NOT NULL default '0', `estado` tinyint(3) unsigned NOT NULL default '0', `timestamp` datetime NOT NULL default '0000-00-00 00:00:00', - `evento` varchar(255) NOT NULL default '', + `evento` text NOT NULL default '', `utimestamp` bigint(20) NOT NULL default '0', `event_type` enum('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') default 'unknown', `id_agentmodule` int(10) NOT NULL default '0', @@ -443,8 +443,8 @@ CREATE TABLE IF NOT EXISTS `tincidencia` ( `id_incidencia` bigint(6) unsigned zerofill NOT NULL auto_increment, `inicio` datetime NOT NULL default '0000-00-00 00:00:00', `cierre` datetime NOT NULL default '0000-00-00 00:00:00', - `titulo` varchar(100) NOT NULL default '', - `descripcion` mediumtext NOT NULL, + `titulo` text NOT NULL default '', + `descripcion` text NOT NULL, `id_usuario` varchar(60) NOT NULL default '', `origen` varchar(100) NOT NULL default '', `estado` int(10) NOT NULL default '0', @@ -504,15 +504,15 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` ( `min` bigint(20) NOT NULL default '0', `module_interval` mediumint(8) unsigned NOT NULL default '0', `tcp_port` int(10) unsigned NOT NULL default '0', - `tcp_send` varchar(255) NOT NULL, - `tcp_rcv` varchar(255) NOT NULL default 'NULL', + `tcp_send` text NOT NULL, + `tcp_rcv` text NOT NULL, `snmp_community` varchar(255) NOT NULL default 'NULL', `snmp_oid` varchar(400) NOT NULL, `id_module_group` tinyint(4) unsigned NOT NULL default '0', `id_modulo` int(10) unsigned default '0', `id_plugin` INTEGER unsigned default '0', - `plugin_user` varchar(250) default '', - `plugin_pass` varchar(250) default '', + `plugin_user` text default '', + `plugin_pass` text default '', `plugin_parameter` text, `max_timeout` tinyint(3) unsigned default '0', `history_data` tinyint(1) unsigned default '1', @@ -668,7 +668,7 @@ CREATE TABLE IF NOT EXISTS `tsesion` ( `ID_usuario` varchar(60) NOT NULL default '0', `IP_origen` varchar(100) NOT NULL default '', `accion` varchar(100) NOT NULL default '', - `descripcion` varchar(200) NOT NULL default '', + `descripcion` text NOT NULL default '', `fecha` datetime NOT NULL default '0000-00-00 00:00:00', `utimestamp` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`ID_sesion`), @@ -690,8 +690,8 @@ CREATE TABLE IF NOT EXISTS `ttipo_modulo` ( CREATE TABLE IF NOT EXISTS `ttrap` ( `id_trap` bigint(20) unsigned NOT NULL auto_increment, `source` varchar(50) NOT NULL default '', - `oid` varchar(255) NOT NULL default '', - `oid_custom` varchar(255) default '', + `oid` text NOT NULL default '', + `oid_custom` text default '', `type` int(11) NOT NULL default '0', `type_custom` varchar(100) default '', `value` text default '', @@ -794,7 +794,7 @@ CREATE TABLE IF NOT EXISTS `treport_content` ( `description` mediumtext, `id_agent` int(10) unsigned NOT NULL default 0, `text` TEXT default NULL, - `external_source` TEXT default NULL, + `external_source` TinyText default NULL, `treport_custom_sql_id` INTEGER UNSIGNED default 0, `header_definition` TinyText default NULL, `column_separator` TinyText default NULL,