]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
exceptions: add checks for new stats counters
authorJuliana Fajardini <jufajardini@oisf.net>
Mon, 24 Mar 2025 20:36:34 +0000 (13:36 -0700)
committerVictor Julien <victor@inliniac.net>
Tue, 1 Apr 2025 08:17:01 +0000 (10:17 +0200)
Using more search-friendly stats counters for exception_policy counters.

Related to
Task #7185

13 files changed:
tests/exception-policy-applayer-01/test.yaml
tests/exception-policy-applayer-03/test.yaml
tests/exception-policy-defrag-01/test.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-01/suricata.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-01/test.yaml
tests/exception-policy-midstream-01/test.yaml
tests/exception-policy-midstream-02/test.yaml
tests/exception-policy-midstream-04/test.yaml
tests/exception-policy-midstream-05/test.yaml
tests/exception-policy-midstream-06/test.yaml
tests/exception-policy-simulated-flow-memcap/test.yaml
tests/exception-policy-stream-reassembly-memcap-06/test.yaml
tests/exception-policy-stream-ssn-memcap-01/test.yaml

index 8569a2be2478198d982f700a966743ec123cbd00..35c8f7f256b8645c8522cf580118462989d1658f 100644 (file)
@@ -57,8 +57,8 @@ checks:
       count: 1
       match:
         event_type: stats
-        stats.app_layer.error.exception_policy.drop_flow: 1
-        stats.app_layer.error.exception_policy.pass_flow: 0
+        stats.exception_policy.app_layer.error.drop_flow: 1
+        stats.exception_policy.app_layer.error.pass_flow: 0
   - filter:
       min-version: 8
       count: 1
index c0189b0f84562f05003beda69a34806839d5a8b7..598e964042d1160bbe16fc121480ef56a31fa5e2 100644 (file)
@@ -69,8 +69,8 @@ checks:
     count: 1
     match:
       event_type: stats
-      stats.app_layer.error.exception_policy.pass_packet: 1
-      stats.app_layer.error.exception_policy.drop_packet: 0
+      stats.exception_policy.app_layer.error.pass_packet: 1
+      stats.exception_policy.app_layer.error.drop_packet: 0
 - filter:
     min-version: 8
     count: 1
index 3f00f7808343d59b818158a7664596f7d076662c..9c0ceabf5f5340b3a4b8f67d7ccf52f4a464c350 100644 (file)
@@ -43,6 +43,6 @@ checks:
       count: 1
       match:
         event_type: stats
-        stats.defrag.memcap_exception_policy.drop_packet: 1
-        stats.defrag.memcap_exception_policy.pass_packet: 0
+        stats.exception_policy.defrag.memcap.drop_packet: 1
+        stats.exception_policy.defrag.memcap.pass_packet: 0
 
index 510b047e9134476a3b77983a7db2b83fb0de7827..c615582f87cefe4cd62d6cc68478e4085681e16e 100644 (file)
@@ -26,4 +26,11 @@ outputs:
         - drop:
             alerts: yes
             flows: all
+        - stats:
+            null-values: false
+
+  - stats:
+       enabled: yes
+       filename: stats.log
+       append: yes
 
index ff4fb586dd3f271133d713868f1a3ac9bf2a6b2b..acc59148cba4e6aa4269a7014c329e5c3fc9bf55 100644 (file)
@@ -42,3 +42,9 @@ checks:
         event_type: flow
         flow.exception_policy[0].target: "stream_midstream"
         flow.exception_policy[0].policy: "drop_flow"
+  - filter:
+      min-version: 8
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.midstream.drop_flow: 1
index 864d325647c8ef9e901cb5b2c740b5f4b290ba6b..26fbcf3b9667e41efe945b1d2a9a66512640329f 100644 (file)
@@ -23,7 +23,7 @@ checks:
       count: 1
       match:
         event_type: stats
-        stats.tcp.midstream_exception_policy.pass_flow: 9
+        stats.exception_policy.tcp.midstream.pass_flow: 9
   - filter:
       min-version: 8
       count: 1
index b8f0b02ca7369802d817a23dca50b6d5a33255a8..9b8caa0542cbb4b1c7ded90a9e1e209c0d1edcf0 100644 (file)
@@ -35,7 +35,7 @@ checks:
       count: 1
       match:
         event_type: stats
-        stats.tcp.midstream_exception_policy.drop_flow: 1
+        stats.exception_policy.tcp.midstream.drop_flow: 1
   - filter:
       min-version: 8
       count: 1
index 263ac2efed675059a565022603f9363823664f01..0b71f0462dd35eddfb393c7052fcdc5c85609a4e 100644 (file)
@@ -24,7 +24,7 @@ checks:
     count: 1
     match:
       event_type: stats
-      stats.tcp.midstream_exception_policy.pass_flow: 2
+      stats.exception_policy.tcp.midstream.pass_flow: 2
 - filter:
     min-version: 8
     count: 1
index 5d90a9a66d22d7e8c4c58dbe7dae0ad662e3cba8..56304546ca9c63cdc760fe0acef6184333631bce 100644 (file)
@@ -23,7 +23,7 @@ checks:
       count: 1
       match:
         event_type: stats
-        stats.tcp.midstream_exception_policy.bypass: 1
+        stats.exception_policy.tcp.midstream.bypass: 1
   - filter:
       min-version: 8
       count: 1
index 3b6cf2b93cb6d4579e352fe416b5d6708ac57e12..03122264ca4050b262df908a60d3d4b352be6afe 100644 (file)
@@ -21,7 +21,7 @@ checks:
       count: 1
       match:
         event_type: stats
-        stats.tcp.midstream_exception_policy.drop_flow: 1
+        stats.exception_policy.tcp.midstream.drop_flow: 1
   - filter:
       min-version: 8
       count: 1
index a79398b340fb7135eae4860d91365db230213a89..d297e0d28d5954c4cd428b81cccf1fb195885525 100644 (file)
@@ -37,8 +37,8 @@ checks:
       count: 1
       match:
         event_type: stats
-        stats.flow.memcap_exception_policy.drop_packet: 1
-        stats.flow.memcap_exception_policy.pass_packet: 0
+        stats.exception_policy.flow.memcap.drop_packet: 1
+        stats.exception_policy.flow.memcap.pass_packet: 0
   - filter:
       min-version: 8
       count: 1
index 4990a373560873390bde5befb2d0d984540d86eb..ab4c833c48775325fc32a8ae9862ce10fc17d0c9 100644 (file)
@@ -52,7 +52,7 @@ checks:
       count: 1
       match:
         event_type: stats
-        stats.tcp.reassembly_exception_policy.pass_packet: 1
+        stats.exception_policy.tcp.reassembly.pass_packet: 1
   - filter:
       min-version: 8
       count: 1
index 93d3f75673ceb618267424775b7a9c8f2ae72140..2fbb4b9b22e04acd75ed162a70e1d60dbbb9c14f 100644 (file)
@@ -56,7 +56,7 @@ checks:
       count: 1
       match:
         event_type: stats
-        stats.tcp.ssn_memcap_exception_policy.drop_flow: 1
+        stats.exception_policy.tcp.ssn_memcap.drop_flow: 1
   - filter:
       min-version: 8
       count: 1