From b453eea1502cc5455f383c4fe82c6011fee93495 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 19 Dec 2023 12:13:23 -0600 Subject: [PATCH] stats: add rules skipped Rule skipped is a count of the number of rules that are skipped due to missing requirements. Feature: #6637 --- etc/schema.json | 3 +++ src/output-json-stats.c | 1 + 2 files changed, 4 insertions(+) diff --git a/etc/schema.json b/etc/schema.json index 76d88ec4c8fb..0756acd00800 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -4871,6 +4871,9 @@ }, "rules_failed": { "type": "integer" + }, + "rules_skipped": { + "type": "integer" } }, "additionalProperties": false diff --git a/src/output-json-stats.c b/src/output-json-stats.c index 7bfcfc58cad2..718298e48592 100644 --- a/src/output-json-stats.c +++ b/src/output-json-stats.c @@ -98,6 +98,7 @@ static json_t *EngineStats2Json(const DetectEngineCtx *de_ctx, json_integer(sig_stat->good_sigs_total)); json_object_set_new(jdata, "rules_failed", json_integer(sig_stat->bad_sigs_total)); + json_object_set_new(jdata, "rules_skipped", json_integer(sig_stat->skipped_sigs_total)); } return jdata;