From: Juliana Fajardini Date: Mon, 24 Mar 2025 19:24:14 +0000 (-0700) Subject: exceptions: move ssn memcap stats to common counter X-Git-Tag: suricata-8.0.0-beta1~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e83ae9a5fa2dc34a95bb8cb83378843e642ba91;p=thirdparty%2Fsuricata.git exceptions: move ssn 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 398bffb748..8c6a359b1d 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -6174,6 +6174,14 @@ "How many times flow memcap exception policy was applied, and which one", "$ref": "#/$defs/exceptionPolicy" } + }, + "tcp": { + "type": "object", + "ssn_memcap": { + "description": + "How many times session memcap exception policy was applied, and which one", + "$ref": "#/$defs/exceptionPolicy" + } } } }, @@ -6663,11 +6671,6 @@ "ssn_memcap_drop": { "type": "integer" }, - "ssn_memcap_exception_policy": { - "description": - "How many times session memcap exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" - }, "stream_depth_reached": { "type": "integer" }, diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 03bd6c57a4..811f82fe69 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -5999,7 +5999,7 @@ TmEcode StreamTcpThreadInit(ThreadVars *tv, void *initdata, void **data) stt->counter_tcp_ssn_from_cache = StatsRegisterCounter("tcp.ssn_from_cache", tv); stt->counter_tcp_ssn_from_pool = StatsRegisterCounter("tcp.ssn_from_pool", tv); ExceptionPolicySetStatsCounters(tv, &stt->counter_tcp_ssn_memcap_eps, &stream_memcap_eps_stats, - stream_config.ssn_memcap_policy, "tcp.ssn_memcap_exception_policy.", + stream_config.ssn_memcap_policy, "exception_policy.tcp.ssn_memcap.", IsStreamTcpSessionMemcapExceptionPolicyStatsValid); stt->counter_tcp_pseudo = StatsRegisterCounter("tcp.pseudo", tv);