Imperva Cyber Community

communities_1.jpg

Convert Bulk MPRV (not encrypted DB audit) files to CSV files 

10-14-2019 10:50

This bash script converts previously exported but not encrypted DB Audit files to CSV format like described in KB article which can be reached via https://imperva.my.salesforce.com/kA2D0000000CcSX?popup=true link

Prerequisites:
- create /var/tmp/audit/ folder (you need to copy archived files to this folder as bulk) on related MX
- create /var/tmp/csv/ folder (converted files will be stored here) on related MX

Usage:
1. Copy the script to MX server
2. Copy the archive files to /var/tmp/audit/ folder of related MX. (archive files should not be stored in subfolders)
3. Run the script "./mprv_to_csv.sh"

Note: If you logout while script running, it will be interrupted, you should run it with nohup command

4. After all of the archive files exported, you can find CSV files under "/var/tmp/csv/<audit_archive_filename>/" subfolders

Note: If the audit archives are encrypted or signed, this article may help: https://imperva.my.salesforce.com/kA2D0000000CcSX?popup=true
#DatabaseActivityMonitoring
#AllImperva

Statistics
0 Favorited
120 Views
1 Files
0 Shares
21 Downloads
Attachment(s)
zip file
mprv_to_csv.zip   572 B   1 version
Uploaded - 10-14-2019
compressed file of "mprv_to_csv.sh" script

Comments

12-19-2019 06:49

As we saw, files converts in more csv.
Is there a method to generate a single csv files complete with all data?

Thank you

10-15-2019 03:31

That's a nice little script, well done!

It's also nice that there is scope for improvement, you could add error checking/handling, and the ability to handle encrypted files in the same script, but it's a nice simple implementation of the mechanism in the KB article.

Kudos to you!

Related Entries and Links

No Related Resource entered.