Merge branch 'ent-300-proteccion-contra-tormenta-de-eventos-solo-funciona-en-el-servidor-master' into 'develop'

Modified events protection checking to protect secundary servers too

See merge request artica/pandorafms!917
This commit is contained in:
vgilc 2017-10-26 12:32:54 +02:00
commit 0191fd38d4

View File

@ -314,9 +314,6 @@ sub pandora_server_tasks ($) {
# Check if an autodisabled agent needs to be autodisable # Check if an autodisabled agent needs to be autodisable
pandora_disable_autodisable_agents ($pa_config, $dbh); 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));
} }
# TASKS EXECUTED EVERY 60 SECONDS (High latency tasks) # TASKS EXECUTED EVERY 60 SECONDS (High latency tasks)
@ -355,6 +352,9 @@ sub pandora_server_tasks ($) {
# Rotate Log File # Rotate Log File
if (($counter % 30) == 0) { if (($counter % 30) == 0) {
pandora_rotate_logfile($pa_config); pandora_rotate_logfile($pa_config);
# Set event storm protection
pandora_set_event_storm_protection (pandora_get_tconfig_token ($dbh, 'event_storm_protection', 0));
} }
# Pandora self monitoring # Pandora self monitoring
if (defined($pa_config->{"self_monitoring"}) if (defined($pa_config->{"self_monitoring"})