Added an option to configure the interval before a module becomes
unknown.
This commit is contained in:
parent
f475dc80bd
commit
f3f381ace3
|
@ -476,3 +476,7 @@ claim_back_snmp_modules 1
|
||||||
# If set to 1 asynchronous modules that do not receive data for twice their
|
# If set to 1 asynchronous modules that do not receive data for twice their
|
||||||
# interval will become normal. Set to 0 to disable.
|
# interval will become normal. Set to 0 to disable.
|
||||||
async_recovery 1
|
async_recovery 1
|
||||||
|
|
||||||
|
# Time interval (as a multiple of the module interval) before a module becomes unknown. Twice the module's interval by default.
|
||||||
|
#unknown_interval 2
|
||||||
|
|
||||||
|
|
|
@ -479,3 +479,7 @@ claim_back_snmp_modules 1
|
||||||
# If set to 1 asynchronous modules that do not receive data for twice their
|
# If set to 1 asynchronous modules that do not receive data for twice their
|
||||||
# interval will become normal. Set to 0 to disable.
|
# interval will become normal. Set to 0 to disable.
|
||||||
async_recovery 1
|
async_recovery 1
|
||||||
|
|
||||||
|
# Time interval (as a multiple of the module interval) before a module becomes unknown. Twice the module's interval by default.
|
||||||
|
#unknown_interval 2
|
||||||
|
|
||||||
|
|
|
@ -477,3 +477,6 @@ claim_back_snmp_modules 1
|
||||||
# interval will become normal. Set to 0 to disable.
|
# interval will become normal. Set to 0 to disable.
|
||||||
async_recovery 1
|
async_recovery 1
|
||||||
|
|
||||||
|
# Time interval (as a multiple of the module interval) before a module becomes unknown. Twice the module's interval by default.
|
||||||
|
#unknown_interval 2
|
||||||
|
|
||||||
|
|
|
@ -289,3 +289,6 @@ restart_delay 60
|
||||||
# interval will become normal. Set to 0 to disable.
|
# interval will become normal. Set to 0 to disable.
|
||||||
async_recovery 1
|
async_recovery 1
|
||||||
|
|
||||||
|
# Time interval (as a multiple of the module interval) before a module becomes unknown. Twice the module's interval by default.
|
||||||
|
#unknown_interval 2
|
||||||
|
|
||||||
|
|
|
@ -343,6 +343,9 @@ sub pandora_load_config {
|
||||||
# Auto-recovery of asynchronous modules.
|
# Auto-recovery of asynchronous modules.
|
||||||
$pa_config->{"async_recovery"} = 1; # 5.1SP1
|
$pa_config->{"async_recovery"} = 1; # 5.1SP1
|
||||||
|
|
||||||
|
# Unknown interval (as a multiple of the module's interval)
|
||||||
|
$pa_config->{"unknown_interval"} = 2; # > 5.1SP2
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# This values are not stored in .conf files.
|
# This values are not stored in .conf files.
|
||||||
# This values should be stored in database, not in .conf files!
|
# This values should be stored in database, not in .conf files!
|
||||||
|
@ -814,6 +817,9 @@ sub pandora_load_config {
|
||||||
elsif ($parametro =~ m/^async_recovery\s+([0-1])/i) {
|
elsif ($parametro =~ m/^async_recovery\s+([0-1])/i) {
|
||||||
$pa_config->{'async_recovery'}= safe_input($1);
|
$pa_config->{'async_recovery'}= safe_input($1);
|
||||||
}
|
}
|
||||||
|
elsif ($parametro =~ m/^unknown_interval\s([0-9]*)/i) { # > 5.1SP2
|
||||||
|
$pa_config->{'unknown_interval'}= safe_input($1);
|
||||||
|
}
|
||||||
} # end of loop for parameter #
|
} # end of loop for parameter #
|
||||||
|
|
||||||
# Set to RDBMS' standard port
|
# Set to RDBMS' standard port
|
||||||
|
|
|
@ -2880,7 +2880,7 @@ sub pandora_module_keep_alive_nd {
|
||||||
AND tagente_modulo.disabled = 0
|
AND tagente_modulo.disabled = 0
|
||||||
AND (tagente_modulo.flag = 1 OR ((tagente_estado.last_execution_try + tagente_estado.current_interval) < UNIX_TIMESTAMP()))
|
AND (tagente_modulo.flag = 1 OR ((tagente_estado.last_execution_try + tagente_estado.current_interval) < UNIX_TIMESTAMP()))
|
||||||
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
||||||
AND ( tagente_estado.utimestamp + (tagente.intervalo * 2) < UNIX_TIMESTAMP())');
|
AND ( tagente_estado.utimestamp + (tagente.intervalo * ?) < UNIX_TIMESTAMP())', $pa_config->{'unknown_interval'});
|
||||||
|
|
||||||
my %data = ('data' => 0);
|
my %data = ('data' => 0);
|
||||||
foreach my $module (@modules) {
|
foreach my $module (@modules) {
|
||||||
|
@ -4168,7 +4168,7 @@ sub pandora_module_unknown ($$) {
|
||||||
AND ((tagente_estado.estado <> 3 AND tagente_modulo.id_tipo_modulo NOT IN (21, 22, 23, 100))
|
AND ((tagente_estado.estado <> 3 AND tagente_modulo.id_tipo_modulo NOT IN (21, 22, 23, 100))
|
||||||
OR (tagente_estado.estado <> 0 AND tagente_modulo.id_tipo_modulo IN (21, 22, 23)))
|
OR (tagente_estado.estado <> 0 AND tagente_modulo.id_tipo_modulo IN (21, 22, 23)))
|
||||||
AND tagente_estado.utimestamp != 0
|
AND tagente_estado.utimestamp != 0
|
||||||
AND (tagente_estado.current_interval * 2) + tagente_estado.utimestamp < UNIX_TIMESTAMP()');
|
AND (tagente_estado.current_interval * ?) + tagente_estado.utimestamp < UNIX_TIMESTAMP()', $pa_config->{'unknown_interval'});
|
||||||
|
|
||||||
foreach my $module (@modules) {
|
foreach my $module (@modules) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue