Skip to main content

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

Metadata

Release files for log-analyzer 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for log-analyzer 0.0.2
File Interpreter ABI Platform
log_analyzer-0.0.2-py3-none-any.whl Python 3 none any Details

Release files / log_analyzer-0.0.2-py3-none-any.whl

Download URL log_analyzer-0.0.2-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9c305a91236045b0c1cf01bf43208b95d0b63bf1df844ee93a2aa90b33fda27
BLAKE2b-256 checksum
How to use checksums
3bca722d7e1fa83edba314f4cced013a4d1b8dc6537a940d0fbc129c6d81142d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page