mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
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,7 +360,13 @@ 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;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$EventStormProtection = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user