From fa0bbc17537d17445027ebcd82b360fca66059fc Mon Sep 17 00:00:00 2001 From: slerena Date: Tue, 20 Jan 2009 10:37:04 +0000 Subject: [PATCH] 2009-01-20 Sancho Lerena * index.php: Added support for external authentication, based on a HASH. * pandoradb.sql: New tables for local templates. * pandoradb_migrate*: Updated script. * godmode/agentes/agent_manager.php: Fixed field for inventory server. * module_manager_editor.php: Fixed snmp community for WMI modules. * module_manager_editor_*.php: New fields in editor (War/Crit, FF). * config_process.php, godmode/setup/setup.php: Added new option for hash auth. * functions.php: Added again (please don't delete it) function to remove quotes on automatic protection (magicquotes). * menu.css: Added icon to inventory server option in the menu. * estado_monitores.php: Fix module edit link, better data render on tooltip * estado_ultimopaquete.php: Fix module edit link. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1360 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 26 +++++++++++++ pandora_console/ajax.php | 4 +- .../godmode/agentes/agent_manager.php | 29 +++++++------- .../godmode/agentes/module_manager_editor.php | 6 ++- .../agentes/module_manager_editor_data.php | 39 +++++++++++++++++++ .../agentes/module_manager_editor_network.php | 3 +- .../agentes/module_manager_editor_plugin.php | 31 +++++++++++++++ .../agentes/module_manager_editor_wmi.php | 31 +++++++++++++++ pandora_console/godmode/setup/setup.php | 17 ++++++++ pandora_console/include/config_process.php | 5 +++ pandora_console/include/functions.php | 24 ++++++++++++ pandora_console/include/styles/menu.css | 5 +++ pandora_console/index.php | 19 ++++++++- .../operation/agentes/estado_monitores.php | 16 ++++++-- .../agentes/estado_ultimopaquete.php | 2 +- pandora_console/pandoradb.sql | 22 +++++++++++ .../pandoradb_migrate_20_to_21.sql | 5 ++- 17 files changed, 258 insertions(+), 26 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a49d8dc453..e8dfef0893 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,29 @@ +2009-01-20 Sancho Lerena + + * index.php: Added support for external authentication, based on a HASH. + + * pandoradb.sql: New tables for local templates. + + * pandoradb_migrate*: Updated script. + + * godmode/agentes/agent_manager.php: Fixed field for inventory server. + + * module_manager_editor.php: Fixed snmp community for WMI modules. + + * module_manager_editor_*.php: New fields in editor (War/Crit, FF). + + * config_process.php, + godmode/setup/setup.php: Added new option for hash auth. + + * functions.php: Added again (please don't delete it) function to remove + quotes on automatic protection (magicquotes). + + * menu.css: Added icon to inventory server option in the menu. + + * estado_monitores.php: Fix module edit link, better data render on tooltip + + * estado_ultimopaquete.php: Fix module edit link. + 2009-01-19 Esteban Sanchez * godmode/agentes/alert_manager.php: Removed effect on AJAX tip. diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index 0bf4acfe28..f4ec80641c 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -2,7 +2,7 @@ // Pandora FMS - the Flexible Monitoring System // ============================================ -// Copyright (c) 2008 Artica Soluciones Tecnologicas, http://www.artica.es +// Copyright (c) 2009 Artica Soluciones Tecnologicas, http://www.artica.es // Please see http://pandora.sourceforge.net for full contribution list // This program is free software; you can redistribute it and/or @@ -41,4 +41,4 @@ if (file_exists ($page)) { } else { echo "
Sorry! I can't find the page $page!"; } -?> \ No newline at end of file +?> diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index b9978945c6..2c38177ca5 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -122,36 +122,37 @@ $table->data[8][1] = print_select_from_sql ('SELECT id_server, name FROM tserver $table->data[9][0] = ''.__('Prediction Server').''.print_help_tip (__('You must select a Prediction Server for the Agent, so it can work properly with this kind of modules'), true); $table->data[9][1] = print_select_from_sql ('SELECT id_server, name FROM tserver WHERE prediction_server = 1 ORDER BY name', 'prediction_server', $id_prediction_server, '', '', 0, true); +// 10 enterprise_hook ('inventory_server'); // Custom ID -$table->data[10][0] = ''.__('Custom ID').''; -$table->data[10][1] = print_input_text ('custom_id', $custom_id, '', 16, 255, true); +$table->data[11][0] = ''.__('Custom ID').''; +$table->data[11][1] = print_input_text ('custom_id', $custom_id, '', 16, 255, true); // Description -$table->data[11][0] = ''.__('Description').''; -$table->data[11][1] = print_input_text ('comentarios', $comentarios, '', 45, 255, true); +$table->data[12][0] = ''.__('Description').''; +$table->data[12][1] = print_input_text ('comentarios', $comentarios, '', 45, 255, true); // Learn mode / Normal mode -$table->data[12][0] = ''.__('Module definition').''.pandora_help("module_definition", true); -$table->data[12][1] = __('Learning mode').' '.print_radio_button_extended ("modo", 1, '', $modo, false, '', 'style="margin-right: 40px;"', true); -$table->data[12][1] .= __('Normal mode').' '.print_radio_button_extended ("modo", 0, '', $modo, false, '', 'style="margin-right: 40px;"', true); +$table->data[13][0] = ''.__('Module definition').''.pandora_help("module_definition", true); +$table->data[13][1] = __('Learning mode').' '.print_radio_button_extended ("modo", 1, '', $modo, false, '', 'style="margin-right: 40px;"', true); +$table->data[13][1] .= __('Normal mode').' '.print_radio_button_extended ("modo", 0, '', $modo, false, '', 'style="margin-right: 40px;"', true); // Status (Disabled / Enabled) -$table->data[13][0] = ''.__('Status').''; -$table->data[13][1] = __('Disabled').' '.print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); -$table->data[13][1] .= __('Active').' '.print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true); +$table->data[14][0] = ''.__('Status').''; +$table->data[14][1] = __('Disabled').' '.print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"', true); +$table->data[14][1] .= __('Active').' '.print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"', true); // Remote configuration -$table->data[14][0] = ''.__('Remote configuration').''; +$table->data[15][0] = ''.__('Remote configuration').''; if (file_exists ($filename['md5'])) { - $table->data[14][1] = date ("F d Y H:i:s.", fileatime ($filename['md5'])); + $table->data[15][1] = date ("F d Y H:i:s.", fileatime ($filename['md5'])); // Delete remote configuration - $table->data[14][1] .= ''; + $table->data[15][1] .= ''; } else { - $table->data[14][1] = ''.__('Not available').''; + $table->data[15][1] = ''.__('Not available').''; } print_table ($table); diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index d8eba54c33..864091efce 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -108,7 +108,11 @@ if (($form_moduletype == "networkserver" || $form_moduletype == "wmiserver") && $form_tcp_send = ""; $form_tcp_rcv = ""; $form_tcp_port = ""; - $form_snmp_community = "public"; + + if ($form_moduletype == "wmiserver") + $form_snmp_community = ""; + else + $form_snmp_community = "public"; $form_snmp_oid = ""; $form_ip_target = $direccion_agente; // taken from configurar_agente.php $form_plugin_user = ""; diff --git a/pandora_console/godmode/agentes/module_manager_editor_data.php b/pandora_console/godmode/agentes/module_manager_editor_data.php index 1d49f61274..87e74ce1ef 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_data.php +++ b/pandora_console/godmode/agentes/module_manager_editor_data.php @@ -67,6 +67,12 @@ if ($update_module_id != NULL){ $form_prediction_module = $row['prediction_module']; $form_max_timeout = $row['max_timeout']; $form_custom_id = $row['custom_id']; + $form_history_data = $row['history_data']; + $form_min_warning = $row['min_warning']; + $form_max_warning = $row['max_warning']; + $form_min_critical = $row['min_critical']; + $form_max_critical = $row['max_critical']; + $form_ff_event = $row['min_ff_event']; if ($tbl_disabled == 1) $disabled_status = true; @@ -173,6 +179,39 @@ foreach ($result as $row) { print_select ($fields, "form_id_module_group", $form_id_module_group,'','','',false,false,false); echo ''; +// Max / min value +echo ''; +echo ''.__('Min. Value').""; +echo ''; +echo ''.__('Max. Value').""; +echo ''; +echo ''; + +// Warning value threshold +echo ''; +echo ''.__('Warning status').""; +echo ''.__("Min.").' '; +echo ' '.__("Max.").' '; + +// Critical value threshold +echo ''.__('Critical status').""; +echo ''.__("Min.").' '; +echo ' '.__("Max.").' '; +echo ''; + +// History data ? +echo ""; +echo ''.__('Historical data').""; +echo ''; +print_checkbox ("form_history_data", 1, $form_history_data, false); + +//FF stands for Flip-Flop +echo ''.__('FF threshold'); +pandora_help ("ff_threshold"); +echo ''; +echo ''; + + // Description echo ''; echo ''.__('Description').""; diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php index 3ec7bfa9e5..2cc77bdeb8 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_network.php +++ b/pandora_console/godmode/agentes/module_manager_editor_network.php @@ -119,7 +119,7 @@ if ($update_module_id != NULL){ echo ""; } echo ""; @@ -258,6 +258,7 @@ echo ''.__("Min.").' '; echo ''; +// History data ? echo ""; echo ''.__('Historical data').""; echo ''; diff --git a/pandora_console/godmode/agentes/module_manager_editor_plugin.php b/pandora_console/godmode/agentes/module_manager_editor_plugin.php index 632add5334..7ce9b84184 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_plugin.php +++ b/pandora_console/godmode/agentes/module_manager_editor_plugin.php @@ -69,6 +69,12 @@ if ($update_module_id != NULL){ $form_prediction_module = $row['prediction_module']; $form_max_timeout = $row['max_timeout']; $form_custom_id = $row['custom_id']; + $form_history_data = $row['history_data']; + $form_min_warning = $row['min_warning']; + $form_max_warning = $row['max_warning']; + $form_min_critical = $row['min_critical']; + $form_max_critical = $row['max_critical']; + $form_ff_event = $row['min_ff_event']; if ($tbl_disabled == 1){ $disabled_status = 'checked="ckecked"'; @@ -162,6 +168,31 @@ if ($update_module_id != NULL){ echo ''.__('Max. timeout').""; echo ''; +// Warning value threshold +echo ''; +echo ''.__('Warning status').""; +echo ''.__("Min.").' '; +echo ' '.__("Max.").' '; + +// Critical value threshold +echo ''.__('Critical status').""; +echo ''.__("Min.").' '; +echo ' '.__("Max.").' '; +echo ''; + +// History data ? +echo ""; +echo ''.__('Historical data').""; +echo ''; +print_checkbox ("form_history_data", 1, $form_history_data, false); + +//FF stands for Flip-Flop +echo ''.__('FF threshold'); +pandora_help ("ff_threshold"); +echo ''; +echo ''; + + // Interval & id_module_group echo ''; echo ''.__('Interval').""; diff --git a/pandora_console/godmode/agentes/module_manager_editor_wmi.php b/pandora_console/godmode/agentes/module_manager_editor_wmi.php index d3a1f57d37..4b38a6673c 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_wmi.php +++ b/pandora_console/godmode/agentes/module_manager_editor_wmi.php @@ -68,6 +68,12 @@ if ($update_module_id != NULL){ $form_prediction_module = $row['prediction_module']; $form_max_timeout = $row['max_timeout']; $form_custom_id = $row['custom_id']; + $form_history_data = $row['history_data']; + $form_min_warning = $row['min_warning']; + $form_max_warning = $row['max_warning']; + $form_min_critical = $row['min_critical']; + $form_max_critical = $row['max_critical']; + $form_ff_event = $row['min_ff_event']; if ($tbl_disabled == 1){ $disabled_status = 'checked="ckecked"'; @@ -218,6 +224,31 @@ echo ''.__('Max. Value').""; echo ''; echo ''; + +// Warning value threshold +echo ''; +echo ''.__('Warning status').""; +echo ''.__("Min.").' '; +echo ' '.__("Max.").' '; + +// Critical value threshold +echo ''.__('Critical status').""; +echo ''.__("Min.").' '; +echo ' '.__("Max.").' '; +echo ''; + +// History data ? +echo ""; +echo ''.__('Historical data').""; +echo ''; +print_checkbox ("form_history_data", 1, $form_history_data, false); + +//FF stands for Flip-Flop +echo ''.__('FF threshold'); +pandora_help ("ff_threshold"); +echo ''; +echo ''; + // Post process / Export server echo ''; echo ''.__('Post process'); diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index de026cc08e..62dc69da33 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -51,6 +51,8 @@ if ($update_settings) { $config["trap2agent"] = (string) get_parameter ('trap2agent', $config["trap2agent"]); $config["autoupdate"] = (string) get_parameter ('autoupdate', $config["autoupdate"]); $config["prominent_time"] = (string) get_parameter ('prominent_time', $config["prominent_time"]); + $config["loginhash_pwd"] = (string) get_parameter ('loginhash_pwd', $config["loginhash_pwd"]); + $config["timesource"] = (string) get_parameter ('timesource', $config["timesource"]); $config["event_view_hr"] = (int) get_parameter ('event_view_hr', $config["event_view_hr"]); $config["style"] = substr ($config["style"], 0, strlen ($config["style"]) - 4); @@ -73,6 +75,7 @@ if ($update_settings) { process_sql ("UPDATE tconfig SET VALUE='".$config["prominent_time"]."' WHERE token = 'prominent_time'"); process_sql ("UPDATE tconfig SET VALUE='".$config["timesource"]."' WHERE token = 'timesource'"); process_sql ("UPDATE tconfig SET VALUE='".$config["event_view_hr"]."' WHERE token = 'event_view_hr'"); + process_sql ("UPDATE tconfig SET VALUE='".$config["loginhash_pwd"]."' WHERE token = 'loginhash_pwd'"); } echo "

".__('Setup')." > "; @@ -116,6 +119,9 @@ $table->data[9][1] = print_input_text ('graph_res', $config["graph_res"], '', 5, $table->data[10][0] = __('Compact interpolation in hours (1 Fine-20 bad)'); $table->data[10][1] = print_input_text ('step_compact', $config["step_compact"], '', 5, 5, true); +$table->data[11][0] = __('Auto login (Hash) password'); +$table->data[11][1] = print_input_text ('loginhash_pwd', $config["loginhash_pwd"], '', 15, 15, true); + $table->data[13][0] = __('Style template'); $table->data[13][1] = print_select ($file_styles, 'style', $config["style"], '', '', '', true); @@ -139,8 +145,19 @@ $table->data[16][1] = print_select ($sources, 'timesource', $config["timesource" $table->data[17][0] = __('Automatic update check'); $table->data[17][1] = print_checkbox ('autoupdate', 1, $config["autoupdate"], true); +// 18 enterprise_hook ('load_snmpforward_enterprise'); +$table->data[19][0] = __('Activate AD Authentication'); +$table->data[19][1] = print_checkbox ('ad_auth', 1, $config["ad_auth"], false); + +$table->data[20][0] = __('Activate AD Authentication'); +$table->data[20][1] = print_input_text ('loginhash_pwd', $config["loginhash_pwd"], '', 15, 15, true); + +$table->data[21][0] = __('Activate AD Authentication'); +$table->data[21][1] = print_input_text ('loginhash_pwd', $config["loginhash_pwd"], '', 15, 15, true); + + echo '
'; print_input_hidden ('update_settings', 1); print_table ($table); diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 537d2eedc6..16c86e0d9f 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -122,6 +122,11 @@ if (!isset($config["event_view_hr"])){ process_sql ("INSERT INTO tconfig (token,value) VALUES ('event_view_hr', ".$config["event_view_hr"].")"); } +if (!isset($config["loginhash_pwd"])){ + $config["loginhash_pwd"] = rand(0,1000)."pandorahash"; + process_sql ("INSERT INTO tconfig (token,value) VALUES ('loginhash_pwd', ".$config["loginhash_pwd"].")"); +} + if (isset ($config['homeurl']) && $config['homeurl'][0] != '/') { $config['homeurl'] = '/'.$config['homeurl']; } diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 42a72ed140..ab9beeaf64 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -982,4 +982,28 @@ if (!function_exists ("mb_strtoupper")) { return strlen ($string); } } + +/** + * Avoid magic_quotes protection + * + * @param string Text string to be stripped of magic_quotes protection + */ + +function unsafe_string ($string) { + if (get_magic_quotes_gpc () == 1) + $string = stripslashes ($string); + return $string; +} + +/** + * Put quotes if magic_quotes protection + * + * @param string Text string to be protected with quotes if magic_quotes protection is disabled + */ + +function safe_sql_string ($string) { + if (get_magic_quotes_gpc () == 0) + $string = mysql_escape_string ($string); + return $string; +} ?> diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index fb181f314f..0cbf3c0d5f 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -164,6 +164,11 @@ } +/* inventory */ +#oper-inventory { + background:transparent url(../../images/page_white_text.png) no-repeat 4px 3px; +} + .mainmenu.selected, .submenu.selected, .menu li:hover, #oper-agents.selected, #oper-servers.selected, #oper-incidents.selected, #oper-events.selected, #oper-users.selected, #oper-snmpc.selected, #oper-messages.selected, #oper-reporting.selected, #oper-visualc.selected, #oper-extensions.selected, #oper-agents:hover, #oper-servers:hover, #oper-incidents:hover, #oper-events:hover, #oper-users:hover, #oper-snmpc:hover, #oper-messages:hover, #oper-reporting:hover, #oper-visualc:hover, #oper-extensions:hover, diff --git a/pandora_console/index.php b/pandora_console/index.php index 590e7d6ef7..cd79bda6c1 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -142,8 +142,25 @@ $page = $sec2; //Reference variable for old time sake $sec = get_parameter_get ('sec'); $sec = safe_url_extraclean ($sec); +// Hash login process +if (! isset ($_SESSION['id_usuario']) && isset ($_GET["loginhash"])) { + $loginhash_data = get_parameter("loginhash_data", ""); + $loginhash_user = get_parameter("loginhash_user", ""); + + if ($loginhash_data == md5($loginhash_user.$config["loginhash_pwd"])) { + update_user_contact ($loginhash_user); + logon_db ($loginhash_user, $REMOTE_ADDR); + $_SESSION['id_usuario'] = $loginhash_user; + $config["id_user"] = $loginhash_user; + } else { + require_once ('general/login_page.php'); + audit_db ("system", $REMOTE_ADDR, "Logon Failed (loginhash", ""); + exit; + } +} + // Login process -if (! isset ($_SESSION['id_usuario']) && isset ($_GET["login"])) { +elseif (! isset ($_SESSION['id_usuario']) && isset ($_GET["login"])) { $nick = get_parameter_post ("nick"); $pass = get_parameter_post ("pass"); // Connect to Database diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index 91c9374b5d..65a5567f03 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -68,18 +68,26 @@ foreach ($modules as $module) { $data[1] = ''; if (give_acl ($config['id_user'], $id_grupo, "AW")) - $data[1] .= ''; + $data[1] .= ''; $data[2] = substr ($module["nombre"], 0, 25); $data[3] = substr ($module["descripcion"], 0, 35); if ($module["estado"] == 2) { - $data[4] = ''; + $data[4] = ''; + $data[4] = ''; + $data[4] = ''; + } else { + $data[4] .= substr(salida_limpia($module["datos"]),0,42) . '">'; + } + + + if ($module["module_interval"] > 0) { $data[5] = $module["module_interval"]; } else { diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php index 4a8645cf11..20c449ac26 100644 --- a/pandora_console/operation/agentes/estado_ultimopaquete.php +++ b/pandora_console/operation/agentes/estado_ultimopaquete.php @@ -111,7 +111,7 @@ if (mysql_num_rows ($result3)) { echo ""; echo ""; if (give_acl ($config['id_user'], $id_grupo, "AW")) - echo ''; + echo ''; echo ""; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index ad04a80254..372494b6c4 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -766,3 +766,25 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime_agents` ( `id_downtime` mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- tlocal_component is a repository of local modules for +-- physical agents on Windows / Unix physical agents +CREATE TABLE IF NOT EXISTS `tlocal_component` ( + `id` int(10) unsigned NOT NULL auto_increment, + `name` varchar(80) NOT NULL, + `data` mediumtext NOT NULL, + `description` varchar(250) default NULL, + `id_os` int(10) unsigned default '0', + `os_version` varchar(100) default '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +CREATE TABLE IF NOT EXISTS `tlocal_component_group` ( + `id` int(10) unsigned NOT NULL auto_increment, + `name` varchar(200) NOT NULL default '', + `parent` mediumint(8) unsigned NOT NULL default '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + diff --git a/pandora_console/pandoradb_migrate_20_to_21.sql b/pandora_console/pandoradb_migrate_20_to_21.sql index 45239eb3ac..86a581d31b 100644 --- a/pandora_console/pandoradb_migrate_20_to_21.sql +++ b/pandora_console/pandoradb_migrate_20_to_21.sql @@ -1,6 +1,8 @@ ALTER TABLE tagente ADD `custom_id` varchar(255) default ''; ALTER TABLE tagente_modulo ADD `custom_id` varchar(255) default ''; ALTER TABLE tgrupo ADD `custom_id` varchar(255) default ''; +ALTER TABLE talert_template_modules ADD `last_reference` bigint(20) NOT +NULL default '0'; ALTER TABLE `tagente_datos` DROP INDEX `data_index2`; ALTER TABLE `tagente_datos` DROP `timestamp`, DROP `id_agente`; @@ -16,14 +18,13 @@ ALTER TABLE `tagente_estado` ADD INDEX ( `last_execution_try` ); ALTER TABLE `tagente_modulo` ADD `min_warning` double(18,2) default 0; ALTER TABLE `tagente_modulo` ADD `max_warning` double(18,2) default 0; -ALTER TABLE `tagente_modulo` ADD `min_critical` double(18,2) default 0; -ALTER TABLE `tagente_modulo` ADD `max_critical` double(18,2) default 0; ALTER TABLE `tagente_modulo` ADD `min_ff_event` int(4) unsigned default '0'; ALTER TABLE `tagente_modulo` ADD `delete_pending` int(1) unsigned default 0; ALTER TABLE `tagente_modulo` DROP INDEX `tam_plugin`; ALTER TABLE `tagente_modulo` DROP PRIMARY KEY , ADD PRIMARY KEY ( `id_agente_modulo` ); + ALTER TABLE `tagente_modulo` ADD INDEX `main_idx` ( `id_agente_modulo` , `id_agente` ); ALTER TABLE `tagent_access` DROP `timestamp`;