Giter VIP home page Giter VIP logo

parser's Introduction

Access Log Parser

Access log parser is a java command line tool to parse an access log.

Usage

The tool is executed with the following command:

java -cp "parser.jar" com.ef.Parser --accesslog=/path/to/file --startDate=2017-01-01.13:00:00 --duration=hourly --threshold=100

Make sure you have in the same directory of the jar the properties file named parser.properties. There you can configure the DataBase Access

Parameters

The parameters are:

  • accesslog = Path to the access log file
  • startDate = The date we want to monitor. The format must be yyyy-MM-dd.HH:mm:ss
  • duration = We span of time we want to monitor beginning with startDate. It can be hourly or daily
  • threshold = The amount of request an IP address must exceed in the given time span to be blocked

File format

The file is a pipe ('|') separated file. It must have the following format:

date_time(yyyy-MM-dd HH:MM:ss.SSS)|ip_address(String)|request(String)|status_code(Integer)|user_agent(String)

Database Creation

If you need to create the database in your local environment, please, make sure you have installed MySQL 8. You will have to create a new schema. Once you create the schema, find in the "dbScripts" folder, the "create-tables.sql" file and run it. Configure the "parser.properties" file to run with the new schema configuration.

Database queries

You will find database queries in the "dbScripts folder"

parser's People

Contributors

matiasdsalerno avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.