Custom rake tasks for audit reporting on Faspex

IN THIS ARTICLE:

Rake tasks are scripts that allow you to retrieve, delete or update information on your Faspex server using the command line. This article describes a custom rake task available for creating audit reports of packages uploaded to Faspex.

In some cases you may not want to view a list of packages on your server in the Faspex web interface, such as if you have hundreds or thousands of packages saved on the server. In this instance it may be easier to view a report of all these packages in a file, which can then be imported to other data organization software and queried or manipulated.

There are two rake tasks that generate audit reports. One generates a report for all packages on Faspex, whereas the other generates a report for packages uploaded within Workgroups.

Please note that you must install these rake tasks as they are not yet included by default on Faspex. For more information on custom rake tasks and how to install them, see this article (Custom rake tasks on Faspex).

 

Faspex Audit Report

This rake task generates a report in CSV format for all packages uploaded on your Faspex server. This would correspond to the information listed under Server > Packages on the web interface. The syntax of the rake task is as follows:

asctl faspex:rake custom:faspex_audit_report -- [options]

 

The available options are the following:

short form long form description                                                                                      
-ffile --file=file report file (required)
-ddays --day=days number of days covered by report (default: 7)
-p --with_pkg_files prints files per package
-h --help print out help information for this rake task


You must specify the name of the file for the report, which must be writeable. By default the report covers 7 days worth of information, and does not include the name of each file per package.

Examples

If you wanted to generate an audit report in a file named audit_report.txt in the tmp directory for the past 21 days, you would use the following:

asctl faspex:rake custom:faspex_audit_report -- --file=/tmp/audit_report.txt -d21

 

To generate an audit report in a file named audit_report_files that includes the files for each package, you would use the following:

asctl faspex:rake custom:faspex_audit_report -- --file=/tmp/reportsaudit_report_files -p

 

Below is an example of what the output could look like:

ID,Package Title,Sender Name,Recipents,Package # Files,Package Size,Create at,Upload IP,Package File
"5","files for meeting","admin","test","1","1.3 KB","07/14/15 04:42 PM","10.0.201.74","newsanreq"
"6","new package","admin","*dropbox1","1","10 MB","07/14/15 05:27 PM","10.0.201.74","10MB.1"


Workgroup Audit Report

This rake task generates a report in CSV format for packages uploaded within Workgroups and Dropboxes on your Faspex server. The syntax of the rake task is as follows:

asctl faspex:rake custom:wg_audit_report -- [options]


The available options are the following:

short form long form description                                                                                      
-ffile --file=file report file (required)
-ddays --day=days number of days covered by report (default: 7)
-nwg_name --wg_name=wg_name report only for a specific Workgroup
-w --with_wg_users prints all users belonging to the workgroup on each line
-s --with_download_stats prints download stats
-p --with_pkg_files prints files per package
-h --help print out help information for this rake task


You must specify the name of the file for the report, which must be writeable. By default the report covers 7 days worth of information, and does not include the name of each file per package.

Examples

If you wanted to generate an audit report in a file named audit_report.txt in the tmp directory for the Workgroup Project_1 you would use the following:

asctl faspex:rake custom:wg_audit_report -- --file=/tmp/audit_report.txt --wg_name=Project_1

 

To generate an audit report in a file named audit_report_files that includes download information for each package, such as who downloaded it and the download duration, you would use the following:

asctl faspex:rake custom:wg_audit_report -- --file=/tmp/audit_report.txt -s

 

Below is an example of what the output could look like:

"ID","Package Title","WG Name","Sender Name","Package # Files","Package Size","Created At","Upload IP",
"Downloader Name","Downloader IP","Download Start","Download Stop","Download Elapsed","Download Elapsed"
"6","new package","dropbox1","admin","1","10 MB","07/14/15 05:27 PM","10.0.201.74","NA","NA","NA","NA","NA","NA"
"7","updated files","dropbox1","admin","2","28.9 KB","07/15/15 09:42 AM","10.0.201.74","NA","NA","NA","NA","NA","NA"
"8","my files","workgroup1","admin","1","3 Bytes","07/15/15 09:50 AM","10.0.201.74","test","10.0.201.74",
"2015-07-15 10:11:36 -0700","2015-07-15 10:11:37 -0700","less than 5 seconds","NO"
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk