Giter Site home page Giter Site logo

log-parser's Introduction

About the implementation

In my implementation I decided to a clean and simple application, using only simple Java 8. The database connection was handled by jdbc connection on the ConnectionManager class.

Before starting the parsing process, all parameters given by the user are validated and the process only continues if all parameters are valid.

The log file was parsed using the Java 8 stream. During this stage the log data is loaded into MySQL database. And after a query using the user's parameters is applied, returning only the results that fits the parameters.

Instructions:

  • The parser.jar is located under resources\

  • Place the file connection.properties on the same directory of the parser.jar. This file contains the properties for database connection configuration and should be filled before running the application

  • The command for running the application should include the path to the mysql driver. Example:

java -cp "<mysql-driver-jar>": "parser.jar" com.ef.Parser --accesslog=/path/to/file --startDate=2017-01-01.13:00:00 --duration=hourly --threshold=100 
  • There is a mysql driver located on resources\db\mysql-connector-java-5.1.45-bin.jar

SQL

For database creation, refer to the file resources\db\schema.sql . This files contains the database and table creation

Queries

  1. Write MySQL query to find IPs that mode more than a certain number of requests for a given time period The query can be found on resources\db\query1.sql

  2. Write MySQL query to find requests made by a given IP The query can be found on resources\db\query2.sql

Author

log-parser's People

Contributors

pedroveras avatar

Watchers

James Cloos avatar  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.