]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
exceptions: move flow memcap stats to common counter
authorJuliana Fajardini <jufajardini@oisf.net>
Mon, 24 Mar 2025 19:16:52 +0000 (12:16 -0700)
committerVictor Julien <victor@inliniac.net>
Tue, 1 Apr 2025 08:17:01 +0000 (10:17 +0200)
Part of making the exception policy stats counters more search
friendly.

Task #7185

etc/schema.json
src/decode.c

index 9d586ca0b751e238b099b7d4f1456f3a688d3a25..398bffb748b4fb5392d2c46417d41e5316adddaf 100644 (file)
                                         "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"
+                            }
                         }
                     }
                 },
                             "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"
index fca344940c003de85d8c6ff43a2cece1eae1ee57..77739ed0bdb74b6b42481a301a49ca52b2256f40 100644 (file)
@@ -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);