From: Juliana Fajardini Date: Mon, 24 Mar 2025 19:16:52 +0000 (-0700) Subject: exceptions: move flow memcap stats to common counter X-Git-Tag: suricata-8.0.0-beta1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f81190d2a17d630801510c16c6b61a912e27e4b;p=thirdparty%2Fsuricata.git exceptions: move flow memcap 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 9d586ca0b7..398bffb748 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -6166,6 +6166,14 @@ "How many times defrag memcap exception policy was applied, and which one", "$ref": "#/$defs/exceptionPolicy" } + }, + "flow": { + "type": "object", + "memcap": { + "description": + "How many times flow memcap exception policy was applied, and which one", + "$ref": "#/$defs/exceptionPolicy" + } } } }, @@ -6236,11 +6244,6 @@ "description": "Number of times memcap was reached for flows", "type": "integer" }, - "memcap_exception_policy": { - "description": - "How many times flow memcap exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" - }, "memuse": { "description": "Memory currently in use by the flows", "type": "integer" diff --git a/src/decode.c b/src/decode.c index fca344940c..77739ed0bd 100644 --- a/src/decode.c +++ b/src/decode.c @@ -648,7 +648,7 @@ void DecodeRegisterPerfCounters(DecodeThreadVars *dtv, ThreadVars *tv) dtv->counter_nsh = StatsRegisterMaxCounter("decoder.nsh", tv); dtv->counter_flow_memcap = StatsRegisterCounter("flow.memcap", tv); ExceptionPolicySetStatsCounters(tv, &dtv->counter_flow_memcap_eps, &flow_memcap_eps_stats, - FlowGetMemcapExceptionPolicy(), "flow.memcap_exception_policy.", + FlowGetMemcapExceptionPolicy(), "exception_policy.flow.memcap.", IsFlowMemcapExceptionPolicyStatsValid); dtv->counter_tcp_active_sessions = StatsRegisterCounter("tcp.active_sessions", tv);