Skip to content

feat: add new metrics #22

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

edoardomich
Copy link

Enhance the coverage by including additional metrics introduced in version 7.0.x series, as well as new ones added in the recently released version 8.0.0. Additionally, I propose adding a flag to retrieve global metrics that represent the aggregated totals of the per-thread counters.

The tests were conducted using simple container images with Suricata v6.0.20, v7.0.11, and the newly released v8.0.0

Copy link
Collaborator

@awelzel awelzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @edoardomich , thanks for your contribution. Mind checking out the comments and see if you agree with them and adapt the changes?

If you could add a suricata dump-counters output into testdata for 8.0.x with the configuration you used to develop this, that'd be awesome! Maybe also add a smoke test for the flow_end merics that seemed to be non-functional. The tests aren't the best, but hopefully sufficient for adding another smoke test.

Thanks!

@edoardomich
Copy link
Author

I corrected the typos and the suggested changes. I also add some tests for the new metrics.
Let me know if I had to perform new changes or I can squash the commits for the merge

@edoardomich edoardomich requested a review from awelzel July 23, 2025 15:56
Copy link
Collaborator

@awelzel awelzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. There's two more minor nits. Please squash the fixups together and I'll merge it into master and cut a release.

Thanks a lot!

Add additional metrics for version 7.0.x and the upcoming 8.0.0 and correct small typos and compatability problems with the old 6.0.20
Add also the option to expose overall total metrics defined at the top-level as the sum of all the per-thread ones, avoiding more computation on the receiving side
aligned with the total number of new metrics
add `TestDump800AFPacket` and `TestDump800AFPacketFileStore` to test new metrics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants