Merge branch '662-modulos-web-de-latencia-pasan-a-desconocido-ext-3807' into 'develop'

Add a default timeout for web modules. Ref artica/pandora_enterprise#662.

See merge request !437
This commit is contained in:
vgilc 2017-05-08 11:30:51 +02:00
commit 93f6ad2e8d
2 changed files with 8 additions and 0 deletions

View File

@ -382,6 +382,10 @@ webserver 1
web_threads 1
# Default timeout (in seconds) for web modules.
web_timeout 60
# Uncomment to perform web checks with CURL instead of LWP.
#web_engine curl

View File

@ -223,6 +223,7 @@ sub pandora_load_config {
$pa_config->{"exportserver"} = 1; # default
$pa_config->{"inventoryserver"} = 1; # default
$pa_config->{"webserver"} = 1; # 3.0
$pa_config->{"web_timeout"} = 60; # 6.0SP5
$pa_config->{"transactionalserver"} = 0; # Default 0, introduced on 6.1
$pa_config->{"transactional_threads"} = 1; # Default 1, introduced on 6.1
$pa_config->{"transactional_threshold"} = 2; # Default 2, introduced on 6.1
@ -637,6 +638,9 @@ sub pandora_load_config {
elsif ($parametro =~ m/^webserver\s+([0-9]*)/i) {
$pa_config->{'webserver'}= clean_blank($1);
}
elsif ($parametro =~ m/^web_timeout\s+([0-9]*)/i) {
$pa_config->{'web_timeout'}= clean_blank($1);
}
elsif ($parametro =~ m/^transactionalserver\s+([0-9]*)/i) {
$pa_config->{'transactionalserver'}= clean_blank($1);
}