Auto Import
CloudShark includes a service called Auto-Imports. This service will monitor a list of local file directories for capture file uploads and automatically add them to CloudShark.
To set up a directory as an auto-import directory, click the Auto-Imports page in the left Administration menu. Up to five directories may be defined. Each directory can be configured with a default list of tags, which will be automatically applied to any capture file processed. An existing group and user may be selected as the owner of the capture file as well.
Directory requirements: Both the directory and the file to be imported must be readable by the ‘cloudshark’ system account. The permissions must be set on the file prior to copying/moving into the directory for CloudShark will process the file immediately upon creation. A subsequent command that fixes the permissions will fail because CloudShark will have already marked the file as unreadable.
These directories must be local to CloudShark. Remote file systems such as SMB and NFS will not trigger the Linux kernel’s inotify event, which the Auto-Imports service utilizes.
CloudShark can reprocess a capture file if the timestamp changes. The touch system command will perform this task. For example, to make CloudShark reprocess every capture file in /auto-imports:
cd /auto-imports
touch *.cap
Remove files after import
If the Auto-Import location is purely used to catch files as they are added to CloudShark, you may mark files to be deleted after they are imported. Internally this is implemented as a “move” command which has added performance benefits if the autoimport directory and internal capture storage directories are on the same physical disk.
If the cloudshark system account does not have write permissions on the directory itself, then the files will not be able to be removed but the file will still be uploaded.