An open API service indexing awesome lists of open source software.

https://github.com/samsoft00/web-server-access-log-parser

The goal is to write a parser in Java that parses web server access log file, loads the log to MySQL and checks if a given IP makes more than a certain number of requests for the given duration.
https://github.com/samsoft00/web-server-access-log-parser

Last synced: 3 months ago
JSON representation

The goal is to write a parser in Java that parses web server access log file, loads the log to MySQL and checks if a given IP makes more than a certain number of requests for the given duration.

Awesome Lists containing this project

README

        

# Web-Server-Access-Log-Parser
The goal is to write a parser in Java that parses web server access log file, loads the log to MySQL and checks if a given IP makes more than a certain number of requests for the given duration.

Solution


Web Server Access Log Parser
==========================================================

Developer: Oyewole Abayomi Samuel.

Position: Senior Java Developer.

Country: Nigeria.

Skype: [email protected]

Date: 2017-05-10


---------------------------------
Deliverables
---------------------------------

(1) Java program that can be run from command line


HOW TO RUN JAVA PROGRAM FROM CMD - USER MANUAL


==================================================

1. Extract the .jar file into a directory e.g Desktop/Download directory

2. Launch MYSQL client using Xampp OR Wampp, ensure MYSQL is on runing port - 3306

3. Create Database using this SQL below (See full information below)

CREATE DATABASE weblogs;

4. Next, open your favorite command line, cd into directory where you have parser.jar and run the following command.

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


Please note that the default MYSQL credential is

MYSQL Username: 'root'

MYSQL Password: ''


You can config your MYSQL client to use above credentials or run the program to dynamically by including MYSQL credentials at run time like this

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

See full Manual