]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stats: add rules skipped 10211/head
authorJason Ish <jason.ish@oisf.net>
Tue, 19 Dec 2023 18:13:23 +0000 (12:13 -0600)
committerVictor Julien <victor@inliniac.net>
Sat, 20 Jan 2024 19:59:29 +0000 (20:59 +0100)
Rule skipped is a count of the number of rules that are skipped due to
missing requirements.

Feature: #6637
(cherry picked from commit b453eea1502cc5455f383c4fe82c6011fee93495)

etc/schema.json
src/output-json-stats.c

index 4a445ca1fc364a0bc10b687ac2150fca95f7f9e7..e01c6828c3c81378fa5dd4032777e01fed927256 100644 (file)
                                     },
                                     "rules_failed": {
                                         "type": "integer"
+                                    },
+                                    "rules_skipped": {
+                                        "type": "integer"
                                     }
                                 },
                                 "additionalProperties": false
index 7bfcfc58cad24aa8c962245f2967f057048e9bf2..718298e4859293caae590dcc779ca82baba92ebc 100644 (file)
@@ -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;