idaholab / Malcolm

Malcolm is a powerful, easily deployable network traffic analysis tool suite for full packet capture artifacts (PCAP files), Zeek logs and Suricata alerts.
https://idaholab.github.io/Malcolm/
Other
353 stars 58 forks source link

provide threshold for pruning extracted files #453

Closed mmguero closed 5 months ago

mmguero commented 6 months ago

The files that are preserved from file carving (whether EXTRACTED_FILE_PRESERVATION is all or quarantined) are never deleted, at least not on Malcolm (on hedgehog they are using this script).

Eventually this will cause the disk to fill without external intervention.

We should provide a way to specify whether or not to prune these files, and to set that limit. It could be either a "don't let the extracted_files directory grow to beyond this size" (prune_files.sh doesn't support that right now, but it would be a good addition as an option for that script) or a "start pruning when the utilized disk space hits some high-water mark".

mmguero commented 6 months ago

tangentially related to #441

mmguero commented 5 months ago

I think this is complete. Here's what I've done (you can ignore the one commit in the middle of there where I bumped beats/logstash)

And i have tested file-monitor's new behavior: