From 68178749c6b23f4eea724f68433868a75eff43f4 Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Mon, 24 Mar 2025 12:34:31 -0700 Subject: [PATCH] exceptions: move midstream stats to common counter Part of making the exception policy stats counters more search friendly. Task #7185 (cherry picked from commit 78b16a9b760ad89cdd1914ebab5c0e48900254c0) --- etc/schema.json | 10 +++++----- src/stream-tcp.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/etc/schema.json b/etc/schema.json index e0c5a2ac4e..24508c2b3f 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -4969,6 +4969,11 @@ }, "tcp": { "type": "object", + "midstream": { + "description": + "How many times midstream exception policy was applied, and which one", + "$ref": "#/$defs/exceptionPolicy" + }, "ssn_memcap": { "description": "How many times session memcap exception policy was applied, and which one", @@ -5324,11 +5329,6 @@ "midstream_pickups": { "type": "integer" }, - "midstream_exception_policy": { - "description": - "How many times midstream exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" - }, "no_flow": { "type": "integer" }, diff --git a/src/stream-tcp.c b/src/stream-tcp.c index e3a75b3116..0a0e45ea91 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -5976,11 +5976,11 @@ TmEcode StreamTcpThreadInit(ThreadVars *tv, void *initdata, void **data) if (stream_config.midstream) { ExceptionPolicySetStatsCounters(tv, &stt->counter_tcp_midstream_eps, &stream_midstream_enabled_eps_stats, stream_config.midstream_policy, - "tcp.midstream_exception_policy.", IsMidstreamExceptionPolicyStatsValid); + "exception_policy.tcp.midstream.", IsMidstreamExceptionPolicyStatsValid); } else { ExceptionPolicySetStatsCounters(tv, &stt->counter_tcp_midstream_eps, &stream_midstream_disabled_eps_stats, stream_config.midstream_policy, - "tcp.midstream_exception_policy.", IsMidstreamExceptionPolicyStatsValid); + "exception_policy.tcp.midstream.", IsMidstreamExceptionPolicyStatsValid); } stt->counter_tcp_wrong_thread = StatsRegisterCounter("tcp.pkt_on_wrong_thread", tv);