Skip to content

Feat/11856 generic visualisation v3 - #42

Closed
Davihan11 wants to merge 1 commit into
CESNET:mainfrom
Davihan11:feat/11856-generic-visualisation-v3
Closed

Feat/11856 generic visualisation v3#42
Davihan11 wants to merge 1 commit into
CESNET:mainfrom
Davihan11:feat/11856-generic-visualisation-v3

Conversation

@Davihan11

Copy link
Copy Markdown
Collaborator

Add a standalone tool to plot Suricata counter values from eve.json/eve-stats.json files. It reads JSON-lines, keeps the stats event records, optionally filters them with a universal jq filter, and plots the requested counter paths over time (or against the traffic multiplier with --by-multiplier).

Key features:

  • Universal jq filter with automatic leading-dot normalization for bare field identifiers (e.g. 'uptime > 30' -> '.uptime > 30')
  • Correct series alignment: x and y extracted from the same record
  • --delta mode to show per-interval rates instead of cumulative values
  • --by-multiplier mode to plot a summary value against the multiplier
  • NaN handling in plots; empty/all-NaN series produce no figure
  • Robust error handling and informative diagnostics (typo detection, warn-once for insufficient --delta points)
  • Documented in README with usage examples

Add a standalone tool to plot Suricata counter values from
eve.json/eve-stats.json files. It reads JSON-lines, keeps the stats
event records, optionally filters them with a universal jq filter, and
plots the requested counter paths over time (or against the traffic
multiplier with --by-multiplier).

Key features:
- Universal jq filter with automatic leading-dot normalization for bare
  field identifiers (e.g. 'uptime > 30' -> '.uptime > 30')
- Correct series alignment: x and y extracted from the same record
- --delta mode to show per-interval rates instead of cumulative values
- --by-multiplier mode to plot a summary value against the multiplier
- NaN handling in plots; empty/all-NaN series produce no figure
- Robust error handling and informative diagnostics (typo detection,
  warn-once for insufficient --delta points)
- Documented in README with usage examples

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a standalone visualization utility to the Suricata Test Suite for plotting counter values from eve.json / eve-stats.json (JSON-lines) with optional jq-based filtering, plus README documentation so users can discover and use it.

Changes:

  • Introduces util/visualize.py CLI tool to extract and plot .stats counters over time or by traffic multiplier, with --delta support.
  • Adds universal jq filtering with “bare identifier” normalization (e.g. uptime > 30.uptime > 30).
  • Documents the tool and usage examples in README.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
util/visualize.py New plotting CLI for Suricata stats counters (jq filter, delta mode, multiplier mode, plotting).
README.md Adds a new section documenting util/visualize.py usage and options.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread util/visualize.py
Comment thread util/visualize.py
Comment thread util/visualize.py
@Davihan11 Davihan11 self-assigned this Aug 11, 2026
@Davihan11 Davihan11 added the enhancement New feature or request label Aug 12, 2026
@Davihan11

Copy link
Copy Markdown
Collaborator Author

Further testing is required

@matyas7dub

Copy link
Copy Markdown
Collaborator

An image of the produced result would be nice to get a quick idea of what to expect from the code.

@Davihan11

Copy link
Copy Markdown
Collaborator Author

An image of the produced result would be nice to get a quick idea of what to expect from the code.

obrázok

@Davihan11

Copy link
Copy Markdown
Collaborator Author
obrázok obrázok obrázok obrázok obrázok obrázok

@Davihan11

Copy link
Copy Markdown
Collaborator Author

Will put a v4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants