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

tweak compression settings #16

Closed
thezoggy opened this issue Jun 8, 2023 · 1 comment
Closed

tweak compression settings #16

thezoggy opened this issue Jun 8, 2023 · 1 comment

Comments

@thezoggy
Copy link
Contributor

thezoggy commented Jun 8, 2023

With the recent changes for nfdump 1.7.2 to unify compression settings -z it looks like nfsen needs some updates to be able to really use that.

My goal is to want to start using zstd by default for compression instead of lz4.

Right now in nfsen conf there is $ZIPcollected which either 0 or 1.

If 1, then -y is added to argument to start collector (which for lz4).
https://github.com/phaag/nfsen/blob/main/libexec/NfSenRC.pm#L98

It looks like work still needs to be done on nfcapd side to actually store zstd.

Once that is added, then perhaps might make a nfsen a little more future proof by having a $Comparg to be just inserted as the user sets (and set to -y if $ZIPcollected is set to 1, to maintain backwards support) so that way people that actually want to tweak things could just do -z=<x> without having to hack the source :)

@phaag
Copy link
Owner

phaag commented Jun 16, 2023

The config allows now more flexible settings for the compression:

The nfsen-dist.conf comments:

# Compress flows in profiles. Set to any value accepted by nfcapd/nfdump
# e.g. "-z=lz4", "-z=zstd:5" 
# the value 1 is accepted for compatibility and set to "-z=lz4" 
# the value "" means no compression
$ZIPprofiles	 = "-z=lz4";

@phaag phaag closed this as completed Jun 16, 2023
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

No branches or pull requests

2 participants