Skip to main content

Log analyzer

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

log_analyzer-0.0.2-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file log_analyzer-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: log_analyzer-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for log_analyzer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b9c305a91236045b0c1cf01bf43208b95d0b63bf1df844ee93a2aa90b33fda27
MD5 7d182b80559cf1f5cc4c2a320d3637fa
BLAKE2b-256 3bca722d7e1fa83edba314f4cced013a4d1b8dc6537a940d0fbc129c6d81142d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page