Added the async_recovery configuration token.
This commit is contained in:
parent
6fa2cab7c6
commit
f94629a61a
|
@ -462,4 +462,7 @@ event_expiry_time 0
|
|||
# the SNMP Enterprise Server when pandora_db is run.
|
||||
claim_back_snmp_modules 1
|
||||
|
||||
# If set to 1 asynchronous modules that do not receive data for twice their
|
||||
# interval will become normal. Set to 0 to disable.
|
||||
async_recovery 1
|
||||
|
||||
|
|
|
@ -277,3 +277,8 @@ restart_delay 60
|
|||
|
||||
# Update parent from the agent xml
|
||||
#update_parent 1
|
||||
|
||||
# If set to 1 asynchronous modules that do not receive data for twice their
|
||||
# interval will become normal. Set to 0 to disable.
|
||||
async_recovery 1
|
||||
|
||||
|
|
|
@ -335,6 +335,9 @@ sub pandora_load_config {
|
|||
# Event auto-expiry time window
|
||||
$pa_config->{"claim_back_snmp_modules"} = 1; # 5.1
|
||||
|
||||
# Auto-recovery of asynchronous modules.
|
||||
$pa_config->{"async_recovery"} = 1; # 5.1SP1
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# This values are not stored in .conf files.
|
||||
# This values should be stored in database, not in .conf files!
|
||||
|
@ -797,6 +800,9 @@ sub pandora_load_config {
|
|||
elsif ($parametro =~ m/^claim_back_snmp_modules\s(.*)/i) {
|
||||
$pa_config->{'claim_back_snmp_modules'}= safe_input($1);
|
||||
}
|
||||
elsif ($parametro =~ m/^async_recovery\s+([0-1])/i) {
|
||||
$pa_config->{'async_recovery'}= safe_input($1);
|
||||
}
|
||||
} # end of loop for parameter #
|
||||
|
||||
# Set to RDBMS' standard port
|
||||
|
|
|
@ -4219,6 +4219,8 @@ sub pandora_module_unknown ($$) {
|
|||
$module->{'id_tipo_modulo'} == 22 ||
|
||||
$module->{'id_tipo_modulo'} == 23) {
|
||||
|
||||
next if ($pa_config->{"async_recovery"} == 0);
|
||||
|
||||
# Set the module state to normal
|
||||
logger ($pa_config, "Module " . $module->{'nombre'} . " is going to NORMAL", 10);
|
||||
db_do ($dbh, 'UPDATE tagente_estado SET last_status = 0, estado = 0 WHERE id_agente_estado = ?', $module->{'id_agente_estado'});
|
||||
|
|
Loading…
Reference in New Issue