From: Juliana Fajardini Date: Mon, 24 Mar 2025 19:05:20 +0000 (-0700) Subject: exceptions: move defrag stats to common counter X-Git-Tag: suricata-8.0.0-beta1~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4c216a4bab16e28e19791e69e592ff7ba8ba45f;p=thirdparty%2Fsuricata.git exceptions: move defrag stats to common counter Part of making the exception policy stats counters more search friendly. Task #7185 --- diff --git a/etc/schema.json b/etc/schema.json index b1736ce241..9d586ca0b7 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -6021,11 +6021,6 @@ "type": "integer", "description": "Current memory use." }, - "memcap_exception_policy": { - "description": - "How many times defrag memcap exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" - }, "ipv4": { "type": "object", "properties": { @@ -6163,6 +6158,14 @@ "Consolidated stats on how many times app-layer error exception policy was applied, and which one", "$ref": "#/$defs/exceptionPolicy" } + }, + "defrag": { + "type": "object", + "memcap": { + "description": + "How many times defrag memcap exception policy was applied, and which one", + "$ref": "#/$defs/exceptionPolicy" + } } } }, diff --git a/src/decode.c b/src/decode.c index 18b7ffa852..fca344940c 100644 --- a/src/decode.c +++ b/src/decode.c @@ -683,7 +683,7 @@ void DecodeRegisterPerfCounters(DecodeThreadVars *dtv, ThreadVars *tv) dtv->counter_defrag_tracker_timeout = StatsRegisterCounter("defrag.wrk.tracker_timeout", tv); ExceptionPolicySetStatsCounters(tv, &dtv->counter_defrag_memcap_eps, &defrag_memcap_eps_stats, - DefragGetMemcapExceptionPolicy(), "defrag.memcap_exception_policy.", + DefragGetMemcapExceptionPolicy(), "exception_policy.defrag.memcap.", IsDefragMemcapExceptionPolicyStatsValid); for (int i = 0; i < DECODE_EVENT_MAX; i++) {