diff --git a/pandora_agents/unix/AIX/pandora_agent.conf b/pandora_agents/unix/AIX/pandora_agent.conf index ad763d18d7..11a4f644bd 100644 --- a/pandora_agents/unix/AIX/pandora_agent.conf +++ b/pandora_agents/unix/AIX/pandora_agent.conf @@ -94,6 +94,9 @@ transfer_mode tentacle # User the agent will run as #pandora_user root +# Agent mode: Learn (default), No-learn, Autodisable +# agent_mode autodisable + # Secondary server configuration # ============================== diff --git a/pandora_agents/unix/Darwin/pandora_agent.conf b/pandora_agents/unix/Darwin/pandora_agent.conf index 9fcc65c23a..2aaef59652 100644 --- a/pandora_agents/unix/Darwin/pandora_agent.conf +++ b/pandora_agents/unix/Darwin/pandora_agent.conf @@ -135,6 +135,9 @@ transfer_mode tentacle # Minimum available bytes in the temporal directory to enable the XML buffer #temporal_min_size 1024 +# Agent mode: Learn (default), No-learn, Autodisable +# agent_mode autodisable + # Secondary server configuration # ============================== diff --git a/pandora_agents/unix/FreeBSD/pandora_agent.conf b/pandora_agents/unix/FreeBSD/pandora_agent.conf index 627a08fc9b..9d6edf6f1e 100644 --- a/pandora_agents/unix/FreeBSD/pandora_agent.conf +++ b/pandora_agents/unix/FreeBSD/pandora_agent.conf @@ -139,6 +139,9 @@ xml_buffer 1 # Minimum available bytes in the temporal directory to enable the XML buffer temporal_min_size 1024 +# Agent mode: Learn (default), No-learn, Autodisable +# agent_mode autodisable + #Secondary server configuration #============================== diff --git a/pandora_agents/unix/HP-UX/pandora_agent.conf b/pandora_agents/unix/HP-UX/pandora_agent.conf index 1d4d215471..da03b8bbba 100644 --- a/pandora_agents/unix/HP-UX/pandora_agent.conf +++ b/pandora_agents/unix/HP-UX/pandora_agent.conf @@ -96,6 +96,9 @@ transfer_mode tentacle # User the agent will run as #pandora_user root +# Agent mode: Learn (default), No-learn, Autodisable +# agent_mode autodisable + # Secondary server configuration # ============================== diff --git a/pandora_agents/unix/Linux/pandora_agent.conf b/pandora_agents/unix/Linux/pandora_agent.conf index 4c55feee9a..59c0062bd2 100644 --- a/pandora_agents/unix/Linux/pandora_agent.conf +++ b/pandora_agents/unix/Linux/pandora_agent.conf @@ -146,6 +146,9 @@ xml_buffer 1 # Minimum available bytes in the temporal directory to enable the XML buffer temporal_min_size 1024 +# Agent mode: Learn (default), No-learn, Autodisable +# agent_mode autodisable + # Secondary server configuration # ============================== diff --git a/pandora_agents/unix/NetBSD/pandora_agent.conf b/pandora_agents/unix/NetBSD/pandora_agent.conf index 4f2697d313..0bf510d678 100644 --- a/pandora_agents/unix/NetBSD/pandora_agent.conf +++ b/pandora_agents/unix/NetBSD/pandora_agent.conf @@ -108,6 +108,9 @@ transfer_mode tentacle # User the agent will run as #pandora_user root +# Agent mode: Learn (default), No-learn, Autodisable +# agent_mode autodisable + # Secondary server configuration # ============================== diff --git a/pandora_agents/unix/SunOS/pandora_agent.conf b/pandora_agents/unix/SunOS/pandora_agent.conf index 7251bf0a5f..0db79ed4ce 100644 --- a/pandora_agents/unix/SunOS/pandora_agent.conf +++ b/pandora_agents/unix/SunOS/pandora_agent.conf @@ -99,6 +99,9 @@ transfer_mode tentacle # User the agent will run as #pandora_user root +# Agent mode: Learn (default), No-learn, Autodisable +# agent_mode autodisable + # Secondary server configuration # ============================== diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index d749eff817..c39283870a 100644 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -2372,6 +2372,16 @@ while (1) { $xml_header .= "' parent_agent_name='" .$Conf{'parent_agent_name'}; } + if (defined ($Conf{'agent_mode'})) { + if ($Conf{'agent_mode'} =~ m/no.?learn/ig) { + $xml_header .= "' agent_mode='0"; + } elsif ($Conf{'agent_mode'} =~ m/auto.?disable.?/ig) { + $xml_header .= "' agent_mode='2"; + } else { + $xml_header .= "' agent_mode='1"; + } + } + # Check the gis mode (exec or manual). If exec script is defined, we execute it and get the coordenates if (defined ($Conf{'gis_exec'}) && (-e $Conf{'gis_exec'})) { my $coord_str = `$Conf{'gis_exec'}`; diff --git a/pandora_agents/win32/bin/pandora_agent.conf b/pandora_agents/win32/bin/pandora_agent.conf index fd0a5c0f32..33db004683 100644 --- a/pandora_agents/win32/bin/pandora_agent.conf +++ b/pandora_agents/win32/bin/pandora_agent.conf @@ -96,6 +96,9 @@ remote_config 0 # Enable or disable XML buffer. xml_buffer 1 +# Agent mode: Learn (default), No-learn, Autodisable +# agent_mode autodisable + # Secondary server configuration # ============================== diff --git a/pandora_agents/win32/pandora_windows_service.cc b/pandora_agents/win32/pandora_windows_service.cc index e2f18755bf..f7d0b5fc6a 100644 --- a/pandora_agents/win32/pandora_windows_service.cc +++ b/pandora_agents/win32/pandora_windows_service.cc @@ -384,7 +384,7 @@ string Pandora_Windows_Service::getXmlHeader () { char timestamp[20]; string agent_name, os_name, os_version, encoding, value, xml, address, parent_agent_name, agent_name_cmd; - string custom_id, url_address, latitude, longitude, altitude, position_description, gis_exec, gis_result; + string custom_id, url_address, latitude, longitude, altitude, position_description, gis_exec, gis_result, agent_mode; time_t ctime; struct tm *ctime_tm = NULL; int pos; @@ -539,12 +539,28 @@ Pandora_Windows_Service::getXmlHeader () { } } } + + // Get agent mode + agent_mode = conf->getValue ("agent_mode"); + // Convert the type string to lowercase + for (int i = 0; i < agent_mode.length(); i++) { + agent_mode[i] = tolower(agent_mode[i]); + } + if (!agent_mode.compare("no-learn") || !agent_mode.compare("nolearn")) { + agent_mode = "0"; + } else if (!agent_mode.compare("autodisable")) { + agent_mode = "2"; + } else { + agent_mode = "1"; + } xml += "\" interval=\"" + conf->getValue ("interval") + "\" os_name=\"" + os_name + "\" os_version=\"" + os_version + "\" group=\"" + conf->getValue ("group") + - "\" parent_agent_name=\"" + conf->getValue ("parent_agent_name") + "\">\n"; + "\" parent_agent_name=\"" + conf->getValue ("parent_agent_name") + + "\" agent_mode=\"" + agent_mode + + "\">\n"; return xml; } diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.mysql.sql index 02278d0ed1..3b37c5d32a 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.mysql.sql @@ -38,4 +38,5 @@ UPDATE `talert_commands` SET `fields_descriptions` = '[\"Integria IMS -- --------------------------------------------------------------------- INSERT INTO `tconfig` (`token`, `value`) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO `tconfig` (`token`, `value`) VALUES ('small_operation_step_datos_purge', '1000'); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_autodisable_deletion', '30'); diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.oracle.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.oracle.sql index 0594afda40..65d6ca5135 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.oracle.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_6.1.oracle.sql @@ -33,4 +33,5 @@ UPDATE talert_commands SET fields_descriptions = '[\"Integria IMS API& INSERT INTO tconfig (token, value) VALUES ('big_operation_step_datos_purge', '100'); INSERT INTO tconfig (token, value) VALUES ('small_operation_step_datos_purge', '1000'); +INSERT INTO tconfig (token, value) VALUES ('days_autodisable_deletion', '30'); diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 20cd96aa5c..46403f256f 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -305,6 +305,9 @@ $table->data[1][1] = __('Learning mode') . ' ' . $table->data[1][1] .= __('Normal mode') . ' ' . html_print_radio_button_extended ("modo", 0, '', $modo, false, 'show_modules_not_learning_mode_context_help();', 'style="margin-right: 40px;"', true); +$table->data[1][1] .= __('Autodisable mode') . ' ' . + html_print_radio_button_extended ("modo", 2, '', $modo, false, 'show_modules_not_learning_mode_context_help();', + 'style="margin-right: 40px;"', true); // Status (Disabled / Enabled) $table->data[2][0] = __('Status'); @@ -509,11 +512,11 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/'); } function show_modules_not_learning_mode_context_help() { - if ($("input[name='modo'][value=1]").is(':checked')) { - $("#modules_not_learning_mode_context_help").hide(); + if ($("input[name='modo'][value=0]").is(':checked')) { + $("#modules_not_learning_mode_context_help").show(); } else { - $("#modules_not_learning_mode_context_help").show(); + $("#modules_not_learning_mode_context_help").hide(); } } diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 34c825c48f..ee888f3766 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -658,7 +658,7 @@ if ($update_agent) { // if modified some agent paramenter $grupo = (int) get_parameter_post ("grupo", 0); $intervalo = (int) get_parameter_post ("intervalo", SECONDS_5MINUTES); $comentarios = str_replace('`','‘',(string) get_parameter_post ("comentarios", "")); - $modo = (bool) get_parameter_post ("modo", 0); //Mode: Learning or Normal + $modo = (int) get_parameter_post ("modo", 0); //Mode: Learning, Normal or Autodisabled $id_os = (int) get_parameter_post ("id_os"); $disabled = (bool) get_parameter_post ("disabled"); $server_name = (string) get_parameter_post ("server_name", ""); diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php index ca313b8216..aa12b01b32 100644 --- a/pandora_console/godmode/setup/performance.php +++ b/pandora_console/godmode/setup/performance.php @@ -68,6 +68,9 @@ $table->data[7][1] = html_print_input_text ('days_compact', $config["days_compac $table->data[8][0] = __('Max. days before delete unknown modules'); $table->data[8][1] = html_print_input_text ('days_delete_unknown', $config["days_delete_unknown"], '', 5, 5, true); +$table->data[9][0] = __('Max. days before delete autodisabled agents'); +$table->data[9][1] = html_print_input_text ('days_autodisable_deletion', $config["days_autodisable_deletion"], '', 5, 5, true); + $table_other = new stdClass(); $table_other->width = '100%'; $table_other->class = 'databox filters'; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 69104a1f45..0e36c1fafa 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -376,6 +376,8 @@ function config_update_config () { $error_update[] = __('Max. days before delete unknown modules'); if (!config_update_value ('days_compact', (int) get_parameter ('days_compact'))) $error_update[] = __('Max. days before compact data'); + if (!config_update_value ('days_autodisable_deletion', (int) get_parameter ('days_autodisable_deletion'))) + $error_update[] = __('Max. days before autodisable deletion'); if (!config_update_value ('report_limit', (int) get_parameter ('report_limit'))) $error_update[] = __('Item limit for realtime reports)'); if (!config_update_value ('step_compact', (int) get_parameter ('step_compact'))) diff --git a/pandora_console/pandoradb.data.oracle.sql b/pandora_console/pandoradb.data.oracle.sql index 69540f3826..7d78c7435e 100644 --- a/pandora_console/pandoradb.data.oracle.sql +++ b/pandora_console/pandoradb.data.oracle.sql @@ -60,6 +60,7 @@ INSERT INTO tconfig (token, value) VALUES ('language','en_GB'); INSERT INTO tconfig (token, value) VALUES ('block_size','20'); INSERT INTO tconfig (token, value) VALUES ('days_purge','45'); INSERT INTO tconfig (token, value) VALUES ('days_delete_unknown','0'); +INSERT INTO tconfig (token, value) VALUES ('days_autodisable_deletion','30'); INSERT INTO tconfig (token, value) VALUES ('days_compact','0'); INSERT INTO tconfig (token, value) VALUES ('graph_res','5'); INSERT INTO tconfig (token, value) VALUES ('step_compact','1'); diff --git a/pandora_console/pandoradb.data.postgreSQL.sql b/pandora_console/pandoradb.data.postgreSQL.sql index 8ea140a1ed..2810a99f72 100644 --- a/pandora_console/pandoradb.data.postgreSQL.sql +++ b/pandora_console/pandoradb.data.postgreSQL.sql @@ -47,6 +47,7 @@ INSERT INTO "tconfig" ("token", "value") VALUES ('block_size','20'), ('days_purge','60'), ('days_delete_unknown','0'), +('days_autodisable_deletion','30'), ('days_compact','15'), ('graph_res','5'), ('step_compact','1'), diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 39e046f3c2..9194f65f79 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -35,6 +35,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('days_purge','45'), ('days_delete_unknown','0'), ('days_compact','0'), +('days_autodisable_deletion','30'), ('graph_res','5'), ('step_compact','1'), ('db_scheme_first_version', '6.0dev'), diff --git a/pandora_server/bin/pandora_server b/pandora_server/bin/pandora_server index 12d3cd412d..cc3590b245 100755 --- a/pandora_server/bin/pandora_server +++ b/pandora_server/bin/pandora_server @@ -316,6 +316,9 @@ sub pandora_server_tasks ($) { # Set the status of unknown modules pandora_module_unknown ($pa_config, $dbh); + # Check if an autodisabled agent needs to be autodisable + pandora_disable_autodisable_agents ($pa_config, $dbh); + # Set event storm protection pandora_set_event_storm_protection (pandora_get_tconfig_token ($dbh, 'event_storm_protection', 0)); } diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 6f4b973b48..317bf209a7 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -48,6 +48,8 @@ Exported Functions: =item * C +=item * C + =item * C =item * C @@ -168,6 +170,7 @@ our @EXPORT = qw( pandora_delete_agent pandora_delete_all_template_module_actions pandora_delete_module + pandora_disable_autodisable_agents pandora_evaluate_alert pandora_evaluate_snmp_alerts pandora_event @@ -2791,12 +2794,12 @@ Create a new entry in B optionaly with position information =cut ########################################################################## -sub pandora_create_agent ($$$$$$$$$$;$$$$$$$) { +sub pandora_create_agent ($$$$$$$$$$;$$$$$$$$) { my ($pa_config, $server_name, $agent_name, $address, $group_id, $parent_id, $os_id, $description, $interval, $dbh, $timezone_offset, $longitude, $latitude, $altitude, $position_description, - $custom_id, $url_address) = @_; + $custom_id, $url_address, $agent_mode) = @_; logger ($pa_config, "Server '$server_name' creating agent '$agent_name' address '$address'.", 10); @@ -2807,6 +2810,8 @@ sub pandora_create_agent ($$$$$$$$$$;$$$$$$$) { return; } } + + $agent_mode = 1 unless defined($agent_mode); $description = "Created by $server_name" unless ($description ne ''); my ($columns, $values) = db_insert_get_values ({ 'nombre' => safe_input($agent_name), @@ -2817,7 +2822,7 @@ sub pandora_create_agent ($$$$$$$$$$;$$$$$$$) { 'server_name' => $server_name, 'intervalo' => $interval, 'id_parent' => $parent_id, - 'modo' => 1, + 'modo' => $agent_mode, 'custom_id' => $custom_id, 'url_address' => $url_address, 'timezone_offset' => $timezone_offset @@ -4657,6 +4662,22 @@ sub pandora_module_unknown ($$) { } } +########################################################################## +=head2 C<< pandora_disable_autodisable_agents (I<$pa_config>, I<$dbh>) >> + +Puts all autodisable agents with all modules unknown on disabled mode + +=cut +########################################################################## +sub pandora_disable_autodisable_agents ($$) { + my ($pa_config, $dbh) = @_; + + db_do ($dbh, 'UPDATE tagente SET disabled=1 + WHERE disabled=0 AND + tagente.total_count=tagente.unknown_count AND + tagente.modo=2'); +} + ########################################################################## =head2 C<< get_module_tags (I<$pa_config>, I<$dbh>, I<$id_agentmodule>) >> diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index e86f063553..286ec3aa4e 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -249,6 +249,10 @@ sub process_xml_data ($$$$$) { $parent_id = 0; } } + + # Get agent mode + my $agent_mode = 1; # Default value learning mode + $agent_mode = $data->{'agent_mode'} if (defined ($data->{'agent_mode'})); # Unknown agent! if (! defined ($agent_name) || $agent_name eq '') { @@ -301,6 +305,9 @@ sub process_xml_data ($$$$$) { shift (@address_list); } + # A module with No-learn mode (modo = 0) creates its modules on database only when it is created + my $new_agent = 0; + # Get agent id my $agent_id = get_agent_id ($dbh, $agent_name); if ($agent_id < 1) { @@ -331,12 +338,15 @@ sub process_xml_data ($$$$$) { $description = $data->{'description'} if (defined ($data->{'description'})); $agent_id = pandora_create_agent($pa_config, $pa_config->{'servername'}, $agent_name, $address, $group_id, $parent_id, $os, - $description, $interval, $dbh, $timezone_offset, undef, undef, undef, undef, $custom_id, $url_address); + $description, $interval, $dbh, $timezone_offset, undef, undef, undef, undef, $custom_id, $url_address, $agent_mode); if (! defined ($agent_id)) { return; } + # This agent is new. + $new_agent = 1; + # Add the main address to the address list if ($address ne '') { pandora_add_agent_address($pa_config, $agent_id, $agent_name, $address, $dbh); @@ -381,7 +391,12 @@ sub process_xml_data ($$$$$) { # Check if agent is disabled and return if it's disabled. Disabled agents doesnt process data # in order to avoid not only events, also possible invalid data coming from agents. - return if ($agent->{'disabled'} == 1); + # But, if agent is in mode autodisable, put it enable and retrieve all data + if ($agent->{'disabled'} == 1) { + return unless ($agent->{'modo'} == 2); + logger($pa_config, "Autodisable agent ID $agent_id is recovered to enable mode.",10); + db_do ($dbh, 'UPDATE tagente SET disabled=0 WHERE id_agente=?', $agent_id); + } # Do not overwrite agent parameters if the agent is in normal mode if ($agent->{'modo'} == 0) {; @@ -487,7 +502,7 @@ sub process_xml_data ($$$$$) { # Single data if (! defined ($module_data->{'datalist'})) { my $data_timestamp = get_tag_value ($module_data, 'timestamp', $timestamp); - process_module_data ($pa_config, $module_data, $server_id, $agent_name, $module_name, $module_type, $interval, $data_timestamp, $dbh); + process_module_data ($pa_config, $module_data, $server_id, $agent_name, $module_name, $module_type, $interval, $data_timestamp, $dbh, $new_agent); next; } @@ -505,7 +520,7 @@ sub process_xml_data ($$$$$) { $module_data->{'data'} = $data->{'value'}; my $data_timestamp = get_tag_value ($data, 'timestamp', $timestamp); process_module_data ($pa_config, $module_data, $server_id, $agent_name, $module_name, - $module_type, $interval, $data_timestamp, $dbh); + $module_type, $interval, $data_timestamp, $dbh, $new_agent); } } } @@ -522,10 +537,10 @@ sub process_xml_data ($$$$$) { ########################################################################## # Process module data, creating module if necessary. ########################################################################## -sub process_module_data ($$$$$$$$$) { +sub process_module_data ($$$$$$$$$$) { my ($pa_config, $data, $server_id, $agent_name, $module_name, $module_type, $interval, $timestamp, - $dbh) = @_; + $dbh, $force_processing) = @_; # Get agent data my $agent = get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE nombre = ?', safe_input($agent_name)); @@ -596,8 +611,8 @@ sub process_module_data ($$$$$$$$$) { return; } - # Is the agent learning? - if ($agent->{'modo'} ne '1') { + # Is the agent not learning? + if (($agent->{'modo'} == 0) && !($force_processing)) { logger($pa_config, "Learning mode disabled. Skipping module '$module_name' agent '$agent_name'.", 10); $ModuleSem->up (); return; @@ -697,7 +712,7 @@ sub process_module_data ($$$$$$$$$) { } # Update module configuration if in learning mode and not a policy module - if ($agent->{'modo'} eq '1' && $policy_linked == 0) { + if ((($agent->{'modo'} eq '1') || ($agent->{'modo'} eq '2')) && $policy_linked == 0) { update_module_configuration ($pa_config, $dbh, $module, $module_conf); } diff --git a/pandora_server/lib/PandoraFMS/ReconServer.pm b/pandora_server/lib/PandoraFMS/ReconServer.pm index 3712474f01..1a523c13f9 100644 --- a/pandora_server/lib/PandoraFMS/ReconServer.pm +++ b/pandora_server/lib/PandoraFMS/ReconServer.pm @@ -184,7 +184,7 @@ sub data_consumer ($$) { if ($agent_id > 0) { # Skip if not in learning mode - next if ($agent->{'modo'} != 1); + next unless (($agent->{'modo'} == 1) || ($agent->{'modo'} == 2)); } # Get the parent host diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index 2928af5b46..9a7f1f1ffc 100644 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -367,6 +367,14 @@ sub pandora_purgedb ($$) { AND id_rc NOT IN (SELECT id_report_content FROM treport_content_sla_combined)"); } + + # Delete disabled autodisable agents after some period + log_message ('PURGE', 'Delete autodisabled agents where last contact is bigger than ' . $conf->{'_days_autodisable_deletion'} . ' days.'); + db_do ($dbh, "DELETE FROM tagente + WHERE UNIX_TIMESTAMP(ultimo_contacto) + ? < UNIX_TIMESTAMP(NOW()) + AND disabled=1 + AND modo=2 + AND total_count=unknown_count", $conf->{'_days_autodisable_deletion'}*8600); # Delete old netflow data @@ -683,6 +691,7 @@ sub pandora_load_config ($) { $conf->{'_big_operation_step_datos_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'big_operation_step_datos_purge'"); $conf->{'_small_operation_step_datos_purge'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'small_operation_step_datos_purge'"); + $conf->{'_days_autodisable_deletion'} = get_db_value ($dbh, "SELECT value FROM tconfig WHERE token = 'days_autodisable_deletion'"); $BIG_OPERATION_STEP = $conf->{'_big_operation_step_datos_purge'} if ( $conf->{'_big_operation_step_datos_purge'} );