Avoid events while ceasing alerts

This commit is contained in:
fbsanchez 2021-02-10 10:21:39 +01:00
parent 40852de906
commit 7017c6136e
1 changed files with 6 additions and 1 deletions

View File

@ -679,7 +679,12 @@ sub pandora_process_alert ($$$$$$$$;$$) {
$alert->{'critical_instructions'} = $critical_instructions; $alert->{'critical_instructions'} = $critical_instructions;
$alert->{'warning_instructions'} = $warning_instructions; $alert->{'warning_instructions'} = $warning_instructions;
$alert->{'unknown_instructions'} = $unknown_instructions; $alert->{'unknown_instructions'} = $unknown_instructions;
# Generate event only if not quieted by module or agent.
return if ((ref($module) eq 'HASH' && $module->{'quiet'} != "0")
|| (ref($agent) eq 'HASH' && $agent->{'quiet'} != "0")
|| (ref($alert) eq 'HASH' && $alert->{'disable_event'} != "0"));
# Generate an event # Generate an event
if ($table eq 'tevent_alert') { if ($table eq 'tevent_alert') {
pandora_event ($pa_config, "Alert ceased (" . pandora_event ($pa_config, "Alert ceased (" .