Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eve/stats: allow hiding counters whose valued is 0 - v3 #10809

Closed

Conversation

jufajardini
Copy link
Contributor

Some stats can be quite verbose if logging all zero valued-counters. This allows users to disable logging such counters. Default is still true, as that's the expected behavior for the engine.

Task #5976

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/5976

Previous PR: #10766

Describe changes:

  • rebased

Provide values to any of the below to override the defaults.
SV_BRANCH=OISF/suricata-verify#1753

Json Stats Output Sample
jq .stats -c eve.json (from the feature-5976-zero-stats-01 sv test)

{"uptime":0,"ips":{"accepted":32},"decoder":{"pkts":32,"bytes":9598,"ipv6":32,"ethernet":32,"tcp":32,"avg_pkt_size":299,"max_pkt_size":2974},"tcp":{"syn":1,"synack":1,"rst":3,"sessions":1,"ssn_from_pool":1,"segment_from_cache":9,"segment_from_pool":7,"memuse":7667712,"reassembly_memuse":1376256},"flow":{"total":1,"tcp":1,"wrk":{"spare_sync_avg":100,"spare_sync":1},"end":{"state":{"closed":1},"tcp_state":{"closed":1}},"mgr":{"rows_per_sec":13762},"spare":9900,"recycler":{"recycled":1,"queue_max":1},"memuse":7154304},"app_layer":{"flow":{"tls":1}},"memcap_pressure":21,"memcap_pressure_max":21}

Some stats can be quite verbose if logging all zero valued-counters.
This allows users to disable logging such counters. Default is still
true, as that's the expected behavior for the engine.

Task OISF#5976
Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 82.76%. Comparing base (172b55c) to head (264b408).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10809   +/-   ##
=======================================
  Coverage   82.75%   82.76%           
=======================================
  Files         928      928           
  Lines      247913   247921    +8     
=======================================
+ Hits       205162   205181   +19     
+ Misses      42751    42740   -11     
Flag Coverage Δ
fuzzcorpus 64.23% <0.00%> (-0.01%) ⬇️
suricata-verify 62.01% <81.81%> (+0.01%) ⬆️
unittests 62.17% <54.54%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

ERROR:

ERROR: QA failed on SURI_TLPR1_alerts_cmp.

Pipeline 20018

@victorjulien victorjulien added this to the 8.0 milestone Apr 12, 2024
@victorjulien
Copy link
Member

Merged in #10832, thanks!

@catenacyber
Copy link
Contributor

Thanks for this feature Juliana :-)

@jufajardini
Copy link
Contributor Author

Thanks for this feature Juliana :-)

🙇🏽 ! I feel it will only be complete when this can be done for individual counters, though :P

@jufajardini jufajardini deleted the 5976-hide-zero-counters/v3 branch April 15, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants