Add a default timeout for web modules. Ref .

This commit is contained in:
Ramon Novoa 2017-05-05 12:54:55 +02:00
parent 18bac01a5f
commit e49400ae15
2 changed files with 8 additions and 0 deletions
pandora_server

@ -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

@ -208,6 +208,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->{"servermode"} = "";
$pa_config->{'snmp_logfile'} = "/var/log/pandora_snmptrap.log";
$pa_config->{"network_threads"} = 3; # Fixed default
@ -604,6 +605,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/^eventserver\s+([0-9]*)/i) {
$pa_config->{'eventserver'}= clean_blank($1);
}