Skip to main content

Analyse some log files

Project description

Log analyst

Features

  • parse log files
  • filters by date / timestamps
  • correlates log lines (start and end of some processing)
    • show total duration
  • friendly colored output
  • able to output short summaries
  • "folding" lines
    • keeps lines not matching an iso timestamp attached to the matching ones
  • supports gzipped files

Usage

usage: loga [-h] [--extra | --no-extra] [-s] [-n] [-max] [-f F] [-t T] TOML_FILE LOG_FILE

Parse some logs.

positional arguments:
  TOML_FILE            correlation rules to use
  LOG_FILE             (possibly gzipped) log file

options:
  -h, --help           show this help message and exit
  --extra, --no-extra  show extra log lines (not matched by iso_regex) (default: False)
  -s                   show summary (default: False)
  -n                   don't show log (default: False)
  -max                 show max durations (default: False)
  -f F                 start from a date
  -t T                 stop to a date

For instance, with systemd logs:

journalctl -b 5 -o short-iso | loga -s correlators/sample.toml -

Sample correlation

Note: the "loganalyst" section is a configuration, which is optional, use only in case overriding values is needed.

Use the documented correlation file in correlators/sample.toml. You can also download the file.

Project details


Download files

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

Source Distribution

logAnalyst-1.0.8.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

logAnalyst-1.0.8-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file logAnalyst-1.0.8.tar.gz.

File metadata

  • Download URL: logAnalyst-1.0.8.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.10.6 Linux/5.19.3-zen1-1-zen

File hashes

Hashes for logAnalyst-1.0.8.tar.gz
Algorithm Hash digest
SHA256 3f610c6561a33d1ae01abf662a8c5787f776cfb5869324fce2f5547a45203737
MD5 877a291e810c35ca685035e649df8094
BLAKE2b-256 2cbc3a86c070279b4620d94df06274b3297d7878e4a12050718c8e2e768ae127

See more details on using hashes here.

File details

Details for the file logAnalyst-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: logAnalyst-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.10.6 Linux/5.19.3-zen1-1-zen

File hashes

Hashes for logAnalyst-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 25df1426544f3c49e4213fb97fa8d3949398e99aae22cf82da0777afe94d2dc1
MD5 c34b01de8f4f587ba0334751a255445a
BLAKE2b-256 4f67068ef3f2a98092c94a4b78c4db60f2f074e147ab8b8d710ca54838f1b2a4

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