From ed20d818ee8ae35d6bcc345043dd1e57aabd9992 Mon Sep 17 00:00:00 2001 From: vgilc Date: Mon, 10 Sep 2012 16:00:14 +0000 Subject: [PATCH] 2012-09-10 Vanessa Gil * pandoradb.sql pandoradb.postgreSQL.sql pandoradb.oracle.sql extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql godmode/agentes/configurar_agente.php godmode/agentes/module_manager_editor.php godmode/agentes/module_manager_editor_common.php godmode/modules/manage_network_components.php godmode/modules/manage_network_components_form.php godmode/modules/manage_network_components_form_common.php include/functions_alerts.php include/functions_events.php operation/events/events_list.php: Added several fields to modules and events. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6948 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 19 +++++++++++ .../pandoradb_migrate_4.0.x_to_5.0.mysql.sql | 15 ++++++++ .../pandoradb_migrate_4.0.x_to_5.0.oracle.sql | 15 ++++++++ ...doradb_migrate_4.0.x_to_5.0.postgreSQL.sql | 14 ++++++++ .../godmode/agentes/configurar_agente.php | 14 ++++++-- .../godmode/agentes/module_manager_editor.php | 10 ++++++ .../agentes/module_manager_editor_common.php | 14 ++++++++ .../modules/manage_network_components.php | 19 +++++++++-- .../manage_network_components_form.php | 9 +++++ .../manage_network_components_form_common.php | 15 ++++++++ pandora_console/include/functions_alerts.php | 5 ++- pandora_console/include/functions_events.php | 6 ++-- .../operation/events/events_list.php | 34 +++++++++++++++++++ pandora_console/pandoradb.oracle.sql | 9 +++++ pandora_console/pandoradb.postgreSQL.sql | 10 ++++-- pandora_console/pandoradb.sql | 12 +++++-- 16 files changed, 205 insertions(+), 15 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 908aa7b63a..dab3d4b32b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,22 @@ +2012-09-10 Vanessa Gil + + * pandoradb.sql + pandoradb.postgreSQL.sql + pandoradb.oracle.sql + extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql + extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql + extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql + godmode/agentes/configurar_agente.php + godmode/agentes/module_manager_editor.php + godmode/agentes/module_manager_editor_common.php + godmode/modules/manage_network_components.php + godmode/modules/manage_network_components_form.php + godmode/modules/manage_network_components_form_common.php + include/functions_alerts.php + include/functions_events.php + operation/events/events_list.php: Added several fields to modules + and events. + 2012-09-07 Miguel de Dios * include/javascript/pandora.js, include/functions_ui.php, diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql index b5920a8e27..a45c216c64 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql @@ -305,3 +305,18 @@ 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 `tlocal_component` +-- ----------------------------------------------------- +ALTER TABLE tlocal_component ADD `critical_instructions` TEXT NOT NULL default ''; +ALTER TABLE tlocal_component ADD `warning_instructions` TEXT NOT NULL default ''; +ALTER TABLE tlocal_component ADD `unknown_instructions` TEXT NOT NULL default ''; + +-- ----------------------------------------------------- +-- Table `tpolicy_modules` +-- ----------------------------------------------------- +ALTER TABLE tpolicy_modules ADD `critical_instructions` TEXT NOT NULL default ''; +ALTER TABLE tpolicy_modules ADD `warning_instructions` TEXT NOT NULL default ''; +ALTER TABLE tpolicy_modules ADD `unknown_instructions` TEXT NOT NULL default ''; + diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql index 7d6c4205dc..c046a1d594 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql @@ -304,3 +304,18 @@ ALTER TABLE trecon_task MODIFY field1 TEXT NOT NULL; -- Table `tlayout_data` -- ----------------------------------------------------- ALTER TABLE tlayout_data ADD (enable_link NUMBER(5, 0) NOT NULL default 1); + +-- ----------------------------------------------------- +-- Table `tlocal_component` +-- ----------------------------------------------------- +ALTER TABLE tlocal_component ADD (critical_instructions VARCHAR2(255) default ''); +ALTER TABLE tlocal_component ADD (warning_instructions VARCHAR2(255) default ''); +ALTER TABLE tlocal_component ADD (unknown_instructions VARCHAR2(255) default ''); + +-- ----------------------------------------------------- +-- Table `tpolicy_modules` +-- ----------------------------------------------------- +ALTER TABLE tpolicy_modules ADD (critical_instructions VARCHAR2(255) default ''); +ALTER TABLE tpolicy_modules ADD (warning_instructions VARCHAR2(255) default ''); +ALTER TABLE tpolicy_modules ADD (unknown_instructions VARCHAR2(255) default ''); + diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql index ac0de9d5fa..2dcf0428aa 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql @@ -305,3 +305,17 @@ 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 `tlocal_component` +-- ----------------------------------------------------- +ALTER TABLE "tlocal_component" ADD COLUMN "critical_instructions" text default ''; +ALTER TABLE "tlocal_component" ADD COLUMN "warning_instructions" text default ''; +ALTER TABLE "tlocal_component" ADD COLUMN "unknown_instructions" text default ''; + +-- ----------------------------------------------------- +-- Table `tpolicy_modules` +-- ----------------------------------------------------- +ALTER TABLE "tpolicy_modules" ADD COLUMN "critical_instructions" text default ''; +ALTER TABLE "tpolicy_modules" ADD COLUMN "warning_instructions" text default ''; +ALTER TABLE "tpolicy_modules" ADD COLUMN "unknown_instructions" text default ''; diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 7b7cdf4c51..776d479f13 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -781,6 +781,9 @@ if ($update_module || $create_module) { $unit = (string) get_parameter('unit'); $id_tag = (array) get_parameter('id_tag_selected'); $serialize_ops = (string) get_parameter('serialize_ops'); + $critical_instructions = (string) get_parameter('critical_instructions'); + $warning_instructions = (string) get_parameter('warning_instructions'); + $unknown_instructions = (string) get_parameter('unknown_instructions'); if ($prediction_module != 3) { unset($serialize_ops); @@ -840,8 +843,10 @@ if ($update_module) { 'custom_integer_2' => $custom_integer_2, 'min_ff_event' => $ff_event, 'unit' => $unit, - 'macros' => $macros, - 'quiet' => $quiet_module); + 'quiet' => $quiet_module, + 'critical_instructions' => $critical_instructions, + 'warning_instructions' => $warning_instructions, + 'unknown_instructions' => $unknown_instructions); if ($prediction_module == 3 && $serialize_ops == '') { $result = false; @@ -950,7 +955,10 @@ if ($create_module) { 'min_ff_event' => $ff_event, 'unit' => $unit, 'macros' => $macros, - 'quiet' => $quiet_module); + 'quiet' => $quiet_module, + 'critical_instructions' => $critical_instructions, + 'warning_instructions' => $warning_instructions, + 'unknown_instructions' => $unknown_instructions); if ($prediction_module == 3 && $serialize_ops == '') { $id_agent_module = false; diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 19a65a89ea..f00816e391 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -201,6 +201,11 @@ if ($id_agent_module) { $ff_event = $module['min_ff_event']; // Select tag info. $id_tag = tags_get_module_tags ($id_agent_module); + + $critical_instructions = $module['critical_instructions']; + $warning_instructions = $module['warning_instructions']; + $unknown_instructions = $module['unknown_instructions']; + } else { if (!isset ($moduletype)) { @@ -253,6 +258,11 @@ else { $snmp3_privacy_method = ""; $snmp3_privacy_pass = ""; $snmp3_security_level = ""; + + $critical_instructions = ''; + $warning_instructions = ''; + $unknown_instructions = ''; + } } diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 6bfbca6c89..e501f6cbc3 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -122,6 +122,10 @@ $table_simple->style[0] = 'font-weight: bold; vertical-align: top; width: 26%'; $table_simple->style[1] = 'width: 40%'; $table_simple->style[2] = 'font-weight: bold; vertical-align: top'; +$table_simple->colspan[4][1] = 3; +$table_simple->colspan[5][1] = 3; +$table_simple->colspan[6][1] = 3; + $table_simple->data[0][0] = __('Name'); $table_simple->data[0][1] = html_print_input_text ('name', io_safe_output($name), '', 45, 100, true, $disabledBecauseInPolicy); @@ -250,6 +254,16 @@ else { $table_simple->data[3][3] = html_print_checkbox ("history_data", 1, $history_data, true, $disabledBecauseInPolicy); } +$table_simple->data[4][0] = __('Critical instructions'); +$table_simple->data[4][1] = html_print_textarea ('critical_instructions', 2, 65, $critical_instructions, '', true); + + +$table_simple->data[5][0] = __('Warning instructions'); +$table_simple->data[5][1] = html_print_textarea ('warning_instructions', 2, 65, $warning_instructions, '', true); + +$table_simple->data[6][0] = __('Unknown instructions'); +$table_simple->data[6][1] = html_print_textarea ('unknown_instructions', 2, 65, $unknown_instructions, '', true); + /* Advanced form part */ $table_advanced->id = 'advanced'; $table_advanced->width = '98%'; diff --git a/pandora_console/godmode/modules/manage_network_components.php b/pandora_console/godmode/modules/manage_network_components.php index f1187a050e..dff9b419f5 100644 --- a/pandora_console/godmode/modules/manage_network_components.php +++ b/pandora_console/godmode/modules/manage_network_components.php @@ -75,6 +75,9 @@ $unit = (string) get_parameter('unit'); $id = (int) get_parameter ('id'); $wizard_level = get_parameter ('wizard_level'); $only_metaconsole = get_parameter ('only_metaconsole'); +$critical_instructions = (string) get_parameter('critical_instructions'); +$warning_instructions = (string) get_parameter('warning_instructions'); +$unknown_instructions = (string) get_parameter('unknown_instructions'); $snmp_version = (string) get_parameter('snmp_version'); $snmp3_auth_user = (string) get_parameter('snmp3_auth_user'); @@ -110,6 +113,7 @@ if ($duplicate_network_component) { } if ($create_component) { + $custom_string_1 = ''; $custom_string_2 = ''; $custom_string_3 = ''; @@ -160,7 +164,10 @@ if ($create_component) { 'unit' => $unit, 'wizard_level' => $wizard_level, 'only_metaconsole' => $only_metaconsole, - 'macros' => $macros)); + 'macros' => $macros, + 'critical_instructions' => $critical_instructions, + 'warning_instructions' => $warning_instructions, + 'unknown_instructions' => $unknown_instructions)); } else { $id = ''; @@ -232,7 +239,10 @@ if ($update_component) { 'unit' => $unit, 'wizard_level' => $wizard_level, 'only_metaconsole' => $only_metaconsole, - 'macros' => $macros)); + 'macros' => $macros, + 'critical_instructions' => $critical_instructions, + 'warning_instructions' => $warning_instructions, + 'unknown_instructions' => $unknown_instructions)); } else { $result = ''; @@ -342,7 +352,10 @@ $url = ui_get_url_refresh (array ('offset' => false, 'max_critical' => false, 'str_critical' => false, 'ff_event' => false, - 'id_component_type' => false)); + 'id_component_type' => false, + 'critical_instructions' => false, + 'warning_instructions' => false, + 'unknown_instructions' => false)); $search_id_group = (int) get_parameter ('search_id_group'); diff --git a/pandora_console/godmode/modules/manage_network_components_form.php b/pandora_console/godmode/modules/manage_network_components_form.php index 422e5ff53e..8ba5ddfaf2 100644 --- a/pandora_console/godmode/modules/manage_network_components_form.php +++ b/pandora_console/godmode/modules/manage_network_components_form.php @@ -60,6 +60,9 @@ if ($create_network_from_module) { $post_process = $data_module["post_process"]; $unit = $data_module["unit"]; $wizard_level = $data_module["wizard_level"]; + $critical_instructions = $data_module["critical_instructions"]; + $warning_instructions = $data_module["warning_instructions"]; + $unknown_instructions = $data_module["unknown_instructions"]; } @@ -103,6 +106,9 @@ if (isset ($id)) { $unit = $component["unit"]; $wizard_level = $component["wizard_level"]; $only_metaconsole = $component["only_metaconsole"]; + $critical_instructions = $component["critical_instructions"]; + $warning_instructions = $component["warning_instructions"]; + $unknown_instructions = $component["unknown_instructions"]; if ($type >= 15 && $type <= 18) { @@ -145,6 +151,9 @@ if (isset ($id)) { $unit = ''; $wizard_level = 'nowizard'; $only_metaconsole = 0; + $critical_instructions = ''; + $warning_instructions = ''; + $unknown_instructions = ''; $snmp_version = 1; $snmp3_auth_user = ''; diff --git a/pandora_console/godmode/modules/manage_network_components_form_common.php b/pandora_console/godmode/modules/manage_network_components_form_common.php index 0f89285e81..d18a1d535e 100644 --- a/pandora_console/godmode/modules/manage_network_components_form_common.php +++ b/pandora_console/godmode/modules/manage_network_components_form_common.php @@ -44,6 +44,9 @@ $table->colspan = array (); if(!enterprise_installed()) { $table->colspan[0][1] = 3; } +$table_simple->colspan[7][1] = 4; +$table_simple->colspan[8][1] = 4; +$table_simple->colspan[9][1] = 4; $table->data = array (); $table->data[0][0] = __('Name'); @@ -114,4 +117,16 @@ $table->data[5][3] = html_print_input_text ('max', $max, '', 5, 15, true); $table->data[6][0] = __('Unit'); $table->data[6][1] = html_print_input_text ('unit', $unit, '', 12, 25, true); $table->data[6][2] = $table->data[6][3] = ''; + +$table->data[7][0] = __('Critical instructions'); +$table->data[7][1] = html_print_textarea ('critical_instructions', 2, 65, $critical_instructions, '', true); +$table->data[7][2] = $table->data[7][3] = ''; + +$table->data[8][0] = __('Warning instructions'); +$table->data[8][1] = html_print_textarea ('warning_instructions', 2, 65, $warning_instructions, '', true); +$table->data[8][2] = $table->data[8][3] = ''; + +$table->data[9][0] = __('Unknown instructions'); +$table->data[9][1] = html_print_textarea ('unknown_instructions', 2, 65, $unknown_instructions, '', true); +$table->data[9][2] = $table->data[9][3] = ''; ?> diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index eb6c2dfc6e..7c54651a6f 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -1164,6 +1164,9 @@ function alerts_validate_alert_agent_module ($id_alert_agent_module, $noACLs = f $alert = alerts_get_alert_agent_module ($id); $agent_id = modules_get_agentmodule_agent ($alert["id_agent_module"]); $group_id = agents_get_agentmodule_group ($agent_id); + $critical_instructions = db_get_value('critical_instructions', 'tagente_modulo', 'id_agente_modulo', $agent_id); + $warning_instructions = db_get_value('warning_instructions', 'tagente_modulo', 'id_agente_modulo', $agent_id); + $unknown_instructions = db_get_value('unknown_instructions', 'tagente_modulo', 'id_agente_modulo', $agent_id); if (!$noACLs){ if (! check_acl ($config['id_user'], $group_id, "AW")) { @@ -1180,7 +1183,7 @@ function alerts_validate_alert_agent_module ($id_alert_agent_module, $noACLs = f alerts_get_alert_template_description ($alert["id_alert_template"]), $group_id, $agent_id, 1, $config["id_user"], "alert_manual_validation", 1, $alert["id_agent_module"], - $id); + $id, $critical_instructions, $warning_instructions, $unknown_instructions); } elseif ($result === false) { return false; diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 7b5462b7f3..b67feca4b8 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -268,17 +268,17 @@ function events_get_description ($id_event) { * * @return int event id */ -function events_create_event ($event, $id_group, $id_agent, $status = 0, $id_user = "", $event_type = "unknown", $priority = 0, $id_agent_module = 0, $id_aam = 0) { +function events_create_event ($event, $id_group, $id_agent, $status = 0, $id_user = "", $event_type = "unknown", $priority = 0, $id_agent_module = 0, $id_aam = 0, $critical_instructions = '', $warning_instructions = '', $unknown_instructions = '') { global $config; switch ($config["dbtype"]) { case "mysql": $sql = sprintf ('INSERT INTO tevento (id_agente, id_grupo, evento, timestamp, estado, utimestamp, id_usuario, event_type, criticity, - id_agentmodule, id_alert_am) + id_agentmodule, id_alert_am, critical_instructions, warning_instructions, unknown_instructions) VALUES (%d, %d, "%s", NOW(), %d, UNIX_TIMESTAMP(NOW()), "%s", "%s", %d, %d, %d)', $id_agent, $id_group, $event, $status, $id_user, $event_type, - $priority, $id_agent_module, $id_aam); + $priority, $id_agent_module, $id_aam, $critical_instructions, $warning_instructions, $unknown_instructions); break; case "postgresql": $sql = sprintf ('INSERT INTO tevento (id_agente, id_grupo, evento, timestamp, diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 03ed03248e..2bbdcdb7cf 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -1111,6 +1111,40 @@ foreach ($result as $event) { } $string .= ''; + + $string .= '' . '' . __('Critical instructions') . ''; + if ($event["critical_instructions"] != '') { + $string .= $event["critical_instructions"]; + $string .= ''; + $odd = ($odd == '')? 'rowOdd' : ''; + } + else { + $string .= '- ' . __('Empty') . ' -'; + } + $string .= ''; + + $string .= '' . '' . __('Warning instructions') . ''; + if ($event["warning_instructions"] != '') { + $string .= $event["warning_instructions"]; + $string .= ''; + $odd = ($odd == '')? 'rowOdd' : ''; + } + else { + $string .= '- ' . __('Empty') . ' -'; + } + $string .= ''; + + $string .= '' . '' . __('Unknown instructions') . ''; + if ($event["unknown_instructions"] != '') { + $string .= $event["unknown_instructions"]; + $string .= ''; + $odd = ($odd == '')? 'rowOdd' : ''; + } + else { + $string .= '- ' . __('Empty') . ' -'; + } + $string .= ''; + $string .= ''; $data = array($string); diff --git a/pandora_console/pandoradb.oracle.sql b/pandora_console/pandoradb.oracle.sql index 710f1c1926..d6b16f55e9 100644 --- a/pandora_console/pandoradb.oracle.sql +++ b/pandora_console/pandoradb.oracle.sql @@ -229,6 +229,9 @@ CREATE TABLE tagente_modulo ( warning_instructions CLOB default '', unknown_instructions CLOB default '', quiet NUMBER(5, 0) default 0 NOT NULL, + critical_instructions VARCHAR2(255) default '', + warning_instructions VARCHAR2(255) default '', + unknown_instructions VARCHAR2(255) default '', CONSTRAINT t_agente_modulo_wizard_level_cons CHECK (wizard_level IN ('basic','advanced','custom','nowizard')) ); CREATE INDEX tagente_modulo_id_agente_idx ON tagente_modulo(id_agente); @@ -536,6 +539,9 @@ CREATE TABLE tevento ( tags CLOB, source VARCHAR2(100) default '' NOT NULL, id_extra VARCHAR2(100) default '' NOT NULL, + critical_instructions VARCHAR2(255) default '', + warning_instructions VARCHAR2(255) default '', + unknown_instructions VARCHAR2(255) default '', CONSTRAINT tevento_event_type_cons CHECK (event_type IN ('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')) ); CREATE INDEX tevento_id_1_idx ON tevento(id_agente, id_evento); @@ -672,6 +678,9 @@ CREATE TABLE tnetwork_component ( wizard_level VARCHAR2(100) default 'nowizard' NOT NULL, only_metaconsole NUMBER(5, 0) default 0 NOT NULL, macros CLOB default '', + critical_instructions VARCHAR2(255) default '', + warning_instructions VARCHAR2(255) default '', + unknown_instructions VARCHAR2(255) default '', CONSTRAINT t_network_component_wizard_level_cons CHECK (wizard_level IN ('basic','advanced','custom','nowizard')) ); diff --git a/pandora_console/pandoradb.postgreSQL.sql b/pandora_console/pandoradb.postgreSQL.sql index d820c89ced..2774182e86 100644 --- a/pandora_console/pandoradb.postgreSQL.sql +++ b/pandora_console/pandoradb.postgreSQL.sql @@ -439,7 +439,10 @@ CREATE TABLE "tevento" ( "user_comment" text NOT NULL, "tags" text NOT NULL, "source" text NOT NULL default '', - "id_extra" text NOT NULL default '' + "id_extra" text NOT NULL default '', + "critical_instructions" TEXT default '', + "warning_instructions" TEXT default '', + "unknown_instructions" TEXT default '' ); CREATE INDEX "tevento_id_1_idx" ON "tevento"("id_agente", "id_evento"); CREATE INDEX "tevento_id_2_idx" ON "tevento"("utimestamp", "id_evento"); @@ -551,7 +554,10 @@ CREATE TABLE "tnetwork_component" ( "unit" TEXT default '', "wizard_level" type_tlocal_component_wizard_level default 'nowizard', "only_metaconsole" INTEGER default '0', - "macros" TEXT default '' + "macros" TEXT default '', + "critical_instructions" TEXT default '', + "warning_instructions" TEXT default '', + "unknown_instructions" TEXT default '' ); CREATE TABLE "tnetwork_component_group" ( diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 5f652ff311..cf76b5fe55 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -217,9 +217,9 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` ( `custom_integer_2` int(10) default 0, `wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard', `macros` text, - `critical_instructions` text, - `warning_instructions` text, - `unknown_instructions` text, + `critical_instructions` text NOT NULL default '', + `warning_instructions` text NOT NULL default '', + `unknown_instructions` text NOT NULL default '', `quiet` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id_agente_modulo`), KEY `main_idx` (`id_agente_modulo`,`id_agente`), @@ -518,6 +518,9 @@ CREATE TABLE IF NOT EXISTS `tevento` ( `tags` text NOT NULL, `source` tinytext NOT NULL, `id_extra` tinytext NOT NULL, + `critical_instructions` text NOT NULL default '', + `warning_instructions` text NOT NULL default '', + `unknown_instructions` text NOT NULL default '', PRIMARY KEY (`id_evento`), KEY `indice_1` (`id_agente`,`id_evento`), KEY `indice_2` (`utimestamp`,`id_evento`), @@ -653,6 +656,9 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` ( `wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard', `only_metaconsole` tinyint(1) unsigned default '0', `macros` text, + `critical_instructions` text NOT NULL default '', + `warning_instructions` text NOT NULL default '', + `unknown_instructions` text NOT NULL default '', PRIMARY KEY (`id_nc`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;