Skip to content
forked from ludei/jsalparser

JSalParser - parse AWS S3, CloudFront, and Apache log files in Java

License

Notifications You must be signed in to change notification settings

pedivo/jsalparser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSalParser Cli

The JSalParser Cli creates a command line interface to parse Extended Log Format files generated by Apache HTTP Server, AWS S3, or AWS CloudFront (to name a few) into Java POJOs (Plain Old Java Objects), enhance the data and convert to other formats.

It extends the JSalParser Project (https://github.com/hiramsoft/jsalparser).

Synopsis

How to parse multiple files

    java -jar jsalparser.jar \
        --store-engine excel \ 
        --input /var/log/s3 \ 
        --output /mnt/data/parser.xlsx \
        --enhancers geoip \
        --enhancers useragent \
        --enhancer-options geoip-database-path=/mnt/maxmind/country.mmdb

Options

argument Description
help list all commands
input Path where all log files are stored
output Path to file that will be created after the process
store-engine Define which store engine will be used. Allowed values: json,excel
locale If the date on your log files is not formatted in English you can overwrite the locale using it.
enhancers Which data enhancers do you want to use. Allowed values: geoip and useragent
enhancer-options Options required to initialize some enhancers. Allowed values: geoip-account-id, geoip-licence-key, geoip-database-path

Enhancers

Enhancer Description
geoip Add requester country using GeoLite 2 (https://dev.maxmind.com/geoip/geoip2/geolite2/)
useragent Add more data about the user agent using (https://github.com/woothee/woothee)

Motivation

I was requested to convert multiple s3 log files to excel to allow some non-programmers to do some analysis on the requests. In the beginning, I did an ah doc implementation, but this request became more regular. I created this command-line interface to convert those logs to excel or json in an extremely easy way and also allowing me to enhance some information when required.

Related Documentation

Next Steps

I will add tests as soon as possible.

License

BSD

About

JSalParser - parse AWS S3, CloudFront, and Apache log files in Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 92.2%
  • ANTLR 7.8%