Skip to content

Convert Fortinet's Fortiguard WebFilter logs to CSV Format

I put together this script called csvify_fortinet_logs in order to convert the space separated format of Fortinet Router's Fortiguard WebFilterLog to a more widely used and favorable for analysis format, CSV. I wanted to analyse the web filter log of the router, but could not use it as an input to pandas, so had to code this.

What the script does is, convert the log from following transaction format:

To CSV:

CSV Format

 

It's made using Python, and needs numpy and pandas library.

The code should be pretty self explanatory (and there's comments too!).  I used pandas to combine the CSVs because I am using it for analysis pretty often, but there could be a better way to do it.

You can download the script from Github.

PS. I'm creating posts for each of my Github repos / projects so that its more reachable for people from Google Search.

Published inData ScienceHow To'sProjects

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *