Merge branch 'ent-4041-7980-bug-parametro-event_storm_protection' into 'develop'

Variability event_storm_protection check is added with empty data

See merge request artica/pandorafms!2428
This commit is contained in:
Alejandro Fraguas 2019-06-03 11:58:52 +02:00
commit 45c58a7c72
2 changed files with 5 additions and 2 deletions

View File

@ -270,7 +270,7 @@ function config_update_config()
$error_update[] = __('Referer security');
}
if (!config_update_value('event_storm_protection', get_parameter('event_storm_protection'))) {
if (!config_update_value('event_storm_protection', get_parameter('event_storm_protection', 0))) {
$error_update[] = __('Event storm protection');
}

View File

@ -360,9 +360,12 @@ sub pandora_generate_alerts ($$$$$$$$;$$$) {
my ($pa_config, $data, $status, $agent, $module, $utimestamp, $dbh, $timestamp, $extra_macros, $last_data_value, $alert_type) = @_;
# No alerts when event storm protection is enabled
if ($EventStormProtection == 1) {
if ($EventStormProtection == 1) {
return;
}
# Warmup interval for alerts.
if ($pa_config->{'warmup_alert_on'} == 1) {