Merge branch 'ent-7011-nexcon-se-sigue-generando-el-evento-de-alerta-cesada-aunque-esten-deshabilitados-los-eventos-de-la-alera' into 'develop'

Avoid events while ceasing alerts

See merge request artica/pandorafms!3827
This commit is contained in:
Daniel Rodriguez 2021-04-06 17:25:21 +00:00
commit 0f5f41e97f
1 changed files with 6 additions and 1 deletions

View File

@ -681,7 +681,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 (" .