Add total hits to output
This commit is contained in:
@@ -78,7 +78,8 @@ def process_rules(data):
|
||||
matched[field] = message[field]
|
||||
# Subtract 2, 1 for source and 1 for index
|
||||
if matched_field_number == rule_field_length - 2:
|
||||
rule_notify(rule, index, message, matched)
|
||||
meta = {"matched": matched, "total_hits": 1}
|
||||
rule_notify(rule, index, message, meta=meta)
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
||||
Reference in New Issue
Block a user