Skip to content

Commit

Permalink
stats: add checks for drop reason counters
Browse files Browse the repository at this point in the history
Leaving checks for stream reassembly aside as those were already added
by another commit.

Related to Task #6230
Task #6571
  • Loading branch information
jufajardini authored and victorjulien committed Dec 27, 2023
1 parent 30f3f9b commit d8b73c4
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/exception-policy-applayer-01/suricata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ outputs:
flows: all # start or all: 'start' logs only a single drop
# per flow direction. All logs each dropped pkt.
- flow
- stats

action-order:
- pass
- drop
Expand Down
6 changes: 6 additions & 0 deletions tests/exception-policy-applayer-01/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ checks:
match:
event_type: flow
flow.action: drop
- filter:
min-version: 7
count: 1
match:
event_type: stats
stats.ips.drop_reason.applayer_error: 1
2 changes: 2 additions & 0 deletions tests/exception-policy-defrag-01/suricata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ outputs:
flows: all # start or all: 'start' logs only a single drop
# per flow direction. All logs each dropped pkt.
- flow
- stats

action-order:
- pass
- drop
Expand Down
6 changes: 6 additions & 0 deletions tests/exception-policy-defrag-01/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ checks:
event_type: flow
flow.action: drop
proto: ICMP
- filter:
min-version: 7
count: 1
match:
event_type: stats
stats.ips.drop_reason.defrag_memcap: 1
1 change: 1 addition & 0 deletions tests/exception-policy-midstream-02/suricata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ outputs:
flows: start # start or all: 'start' logs only a single drop
# per flow direction. All logs each dropped pkt.
- flow
- stats
6 changes: 6 additions & 0 deletions tests/exception-policy-midstream-02/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ checks:
count: 0
match:
event_type: anomaly
- filter:
min-version: 7
count: 1
match:
event_type: stats
stats.ips.drop_reason.stream_midstream: 1
6 changes: 6 additions & 0 deletions tests/exception-policy-simulated-flow-memcap/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@ checks:
match:
event_type: stats
stats.tcp.midstream_pickups: 1
- filter:
min-version: 7
count: 1
match:
event_type: stats
stats.ips.drop_reason.flow_memcap: 1
2 changes: 2 additions & 0 deletions tests/exception-policy-stream-ssn-memcap-01/suricata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ outputs:
flows: all # start or all: 'start' logs only a single drop
# per flow direction. All logs each dropped pkt.
- flow
- stats

action-order:
- pass
- drop
Expand Down
6 changes: 6 additions & 0 deletions tests/exception-policy-stream-ssn-memcap-01/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ checks:
match:
event_type: flow
flow.action: drop
- filter:
min-version: 7
count: 1
match:
event_type: stats
stats.ips.drop_reason.stream_memcap: 1

0 comments on commit d8b73c4

Please sign in to comment.