Check not_normal alerts when evaluating unknown modules.

Former-commit-id: 80f58d4ebfaf5179312a19eae8ea09a4a8d0bff5
This commit is contained in:
Ramon Novoa 2019-05-13 13:44:08 +02:00
parent 12c9952e4a
commit f48dd94c65
1 changed files with 5 additions and 1 deletions

View File

@ -391,7 +391,11 @@ sub pandora_generate_alerts ($$$$$$$$;$$$) {
}
# Get enabled alerts associated with this module
my $alert_type_filter = defined ($alert_type) ? " AND type = '$alert_type'" : '';
my $alert_type_filter = '';
if (defined($alert_type)) {
# not_normal includes unknown!
$alert_type_filter = $alert_type eq 'unknown' ? " AND (type = 'unknown' OR type = 'not_normal')" : " AND type = '$alert_type'";
}
my @alerts = get_db_rows ($dbh, '
SELECT talert_template_modules.id as id_template_module,
talert_template_modules.*, talert_templates.*