Giter VIP home page Giter VIP logo

log-analyzer's Introduction

Latest version on Supported Python versions Travis Pipelines build status codecov

Description

Log-analyzer is a human and straightforward log analyzer for rapid troubleshooting.

Note:

This project starts to be an interview project. Now I am using it to monitor my website traffic.

Get started

Install from github

pip install git+http://github.com/yurilaaziz/log-analyzer.git

Install from PyPi

pip install log-analyzer

Run log analyzer

log-analyzer 

By default, the log-analyzer reads the log from /var/log/access.log

screen shot log-analyzer

Run log analyzer with external configuration

LOGANALYZER_CONFIG_FILE=sample.config.yml log-analyzer 

Run log analyzer with another log file

LOGANALYZER_PARSER_INPUT=/tmp/test.log log-analyzer 

Design

Design log-analyzer

Log Analyzer containers on three components :

  • Parser Process :

    • Reads the log file
    • Process lines following a pattern class
    • Push data to the Persistence driver
  • Consumer Process (Console Display):

    • Reads data from the persistence driver
    • Display an array ordered by hits
  • Alert Manager:

    • Compute rules defined in the pattern alert's class
    • Push notification to persistence driver to be displayed on the console
  • Persistence Driver:

    • Define interfaces between producer and consumer.
    • Allow persisting data to different data-store

Configuration

Log Analyzer uses Config42 to manage its configuration. that means every variable present in the configuration file could be overloaded from Environment variables, Configuration file, external data store (ETCD)

Here an example of default configuration in YAML format: configuration file

TO DO

  • Rework the Alert Manager process to Delete Alert Class and read Alerting rules from the configuration
  • Rework the main for a better CLI with 'docopt'
  • Write a persistence driver to support ElasticSearch/InfluxDB data-store
  • Support multiple log files/sources
  • Support multiple Persistence drivers

log-analyzer's People

Contributors

yurilaaziz 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.