How to Remove Old Data from a Warehouse in RSA Security Analytics 10.x
Issue
If your warehouse becomes full, then many notifications will be generated such as:- Notifications that a warehouse connector stream has stopped processing.
- Notifications that the warehouse is full or becoming full.
Resolution
In order to remove old files from the warehouse create a script on a warehouse connector that will run on an hourly basis as a cron job.Here the mount point of the NFS Share on the warehouse in the example below is /mnt/saw/lonsaw
Your mount point will be different but but will contain the rsasoc/v1/... directory structure.
The contents of the script is as follows:
find /mnt/saw/lonsaw/rsasoc/v1/logs/data* -mtime +365 -exec rm {} \;
find /mnt/saw/lonsaw/rsasoc/v1/sessions/data* -mtime +365 -exec rm {} \;
find /mnt/saw/lonsaw/rsasoc/v1/logs/data -type d -empty -delete
find /mnt/saw/lonsaw/rsasoc/v1/sessions/data -type d -empty -delete
find /mnt/saw/lonsaw/rsasoc/v1/sessions/data* -mtime +365 -exec rm {} \;
find /mnt/saw/lonsaw/rsasoc/v1/logs/data -type d -empty -delete
find /mnt/saw/lonsaw/rsasoc/v1/sessions/data -type d -empty -delete
- Create a file with the contents of the script as above (eg call it /root/saw-cleanup.sh)
- Modify the retention time to suit your environment. For example the script above deletes files that are older than 365 days and removes any empty directories.
- Make sure that this file is executable (chmod +x saw-cleanup.sh)
- Run this file as a cronjob. To do this add the line below to the /etc/crontab file on the warehouse connector appliance.
13 * * * * root run-parts /root/saw-cleanup.sh > /dev/null 2>&1
This will run the script every hour at 13 minutes past the hour and delete any files older than 365 days.
Notes
Notes: The SAW hardware platform is long past EOL, however customers may still use the WHC pointed to their own warehouse and this might be helpful.
Product Details
NetWitness Product Set: NetWitness Logs & Network
NetWitness Product/Service Type: Warehouse Connector, SAW
NetWitness Version/Condition: 10.x ,11.x, 12.x
Platform: CentOS, AlmaLinux
Summary
This article explains how to use a cron job to remove old data from your warehouse.
Approval Reviewer Queue
Technical approval queue