From: Juliana Fajardini Date: Mon, 24 Mar 2025 20:36:34 +0000 (-0700) Subject: exceptions: add checks for new stats counters X-Git-Tag: suricata-7.0.11~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bc5827cddf22dd21fdd2180cb2488af745cccc5;p=thirdparty%2Fsuricata-verify.git exceptions: add checks for new stats counters Using more search-friendly stats counters for exception_policy counters. Related to Task #7185 --- diff --git a/tests/exception-policy-applayer-01/test.yaml b/tests/exception-policy-applayer-01/test.yaml index 8569a2be2..35c8f7f25 100644 --- a/tests/exception-policy-applayer-01/test.yaml +++ b/tests/exception-policy-applayer-01/test.yaml @@ -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 diff --git a/tests/exception-policy-applayer-03/test.yaml b/tests/exception-policy-applayer-03/test.yaml index c0189b0f8..598e96404 100644 --- a/tests/exception-policy-applayer-03/test.yaml +++ b/tests/exception-policy-applayer-03/test.yaml @@ -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 diff --git a/tests/exception-policy-defrag-01/test.yaml b/tests/exception-policy-defrag-01/test.yaml index 3f00f7808..9c0ceabf5 100644 --- a/tests/exception-policy-defrag-01/test.yaml +++ b/tests/exception-policy-defrag-01/test.yaml @@ -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 diff --git a/tests/exception-policy-master-switch/exception-policy-master-switch-01/suricata.yaml b/tests/exception-policy-master-switch/exception-policy-master-switch-01/suricata.yaml index 510b047e9..c615582f8 100644 --- a/tests/exception-policy-master-switch/exception-policy-master-switch-01/suricata.yaml +++ b/tests/exception-policy-master-switch/exception-policy-master-switch-01/suricata.yaml @@ -26,4 +26,11 @@ outputs: - drop: alerts: yes flows: all + - stats: + null-values: false + + - stats: + enabled: yes + filename: stats.log + append: yes diff --git a/tests/exception-policy-master-switch/exception-policy-master-switch-01/test.yaml b/tests/exception-policy-master-switch/exception-policy-master-switch-01/test.yaml index ff4fb586d..acc59148c 100644 --- a/tests/exception-policy-master-switch/exception-policy-master-switch-01/test.yaml +++ b/tests/exception-policy-master-switch/exception-policy-master-switch-01/test.yaml @@ -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 diff --git a/tests/exception-policy-midstream-01/test.yaml b/tests/exception-policy-midstream-01/test.yaml index 864d32564..26fbcf3b9 100644 --- a/tests/exception-policy-midstream-01/test.yaml +++ b/tests/exception-policy-midstream-01/test.yaml @@ -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 diff --git a/tests/exception-policy-midstream-02/test.yaml b/tests/exception-policy-midstream-02/test.yaml index b8f0b02ca..9b8caa054 100644 --- a/tests/exception-policy-midstream-02/test.yaml +++ b/tests/exception-policy-midstream-02/test.yaml @@ -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 diff --git a/tests/exception-policy-midstream-04/test.yaml b/tests/exception-policy-midstream-04/test.yaml index 263ac2efe..0b71f0462 100644 --- a/tests/exception-policy-midstream-04/test.yaml +++ b/tests/exception-policy-midstream-04/test.yaml @@ -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 diff --git a/tests/exception-policy-midstream-05/test.yaml b/tests/exception-policy-midstream-05/test.yaml index 5d90a9a66..56304546c 100644 --- a/tests/exception-policy-midstream-05/test.yaml +++ b/tests/exception-policy-midstream-05/test.yaml @@ -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 diff --git a/tests/exception-policy-midstream-06/test.yaml b/tests/exception-policy-midstream-06/test.yaml index 3b6cf2b93..03122264c 100644 --- a/tests/exception-policy-midstream-06/test.yaml +++ b/tests/exception-policy-midstream-06/test.yaml @@ -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 diff --git a/tests/exception-policy-simulated-flow-memcap/test.yaml b/tests/exception-policy-simulated-flow-memcap/test.yaml index a79398b34..d297e0d28 100644 --- a/tests/exception-policy-simulated-flow-memcap/test.yaml +++ b/tests/exception-policy-simulated-flow-memcap/test.yaml @@ -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 diff --git a/tests/exception-policy-stream-reassembly-memcap-06/test.yaml b/tests/exception-policy-stream-reassembly-memcap-06/test.yaml index 4990a3735..ab4c833c4 100644 --- a/tests/exception-policy-stream-reassembly-memcap-06/test.yaml +++ b/tests/exception-policy-stream-reassembly-memcap-06/test.yaml @@ -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 diff --git a/tests/exception-policy-stream-ssn-memcap-01/test.yaml b/tests/exception-policy-stream-ssn-memcap-01/test.yaml index 93d3f7567..2fbb4b9b2 100644 --- a/tests/exception-policy-stream-ssn-memcap-01/test.yaml +++ b/tests/exception-policy-stream-ssn-memcap-01/test.yaml @@ -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