Variability event_storm_protection check is added with empty data
This commit is contained in:
parent
bf202496da
commit
86dabc6476
|
@ -270,7 +270,7 @@ function config_update_config()
|
||||||
$error_update[] = __('Referer security');
|
$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');
|
$error_update[] = __('Event storm protection');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -360,9 +360,15 @@ sub pandora_generate_alerts ($$$$$$$$;$$$) {
|
||||||
my ($pa_config, $data, $status, $agent, $module, $utimestamp, $dbh, $timestamp, $extra_macros, $last_data_value, $alert_type) = @_;
|
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
|
# No alerts when event storm protection is enabled
|
||||||
if ($EventStormProtection == 1) {
|
if(isnumber $EventStormProtection ){
|
||||||
|
if ($EventStormProtection == 1)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
$EventStormProtection = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
# Warmup interval for alerts.
|
# Warmup interval for alerts.
|
||||||
if ($pa_config->{'warmup_alert_on'} == 1) {
|
if ($pa_config->{'warmup_alert_on'} == 1) {
|
||||||
|
|
Loading…
Reference in New Issue