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] [-x | --extra | --no-extra] [-s | --summary | --no-summary] [-n | --nolog | --no-nolog] [-m | --max | --no-max] [-b DATE] [-e DATE] 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
  -x, --extra, --no-extra
                        show extra log lines (not matched by iso_regex) (default: False)
  -s, --summary, --no-summary
                        show summary (default: False)
  -n, --nolog, --no-nolog
                        don't show log (default: False)
  -m, --max, --no-max   show max durations (default: False)
  -b DATE, --begin DATE
                        start from a date
  -e DATE, --end DATE   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.10.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

logAnalyst-1.0.10-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: logAnalyst-1.0.10.tar.gz
  • Upload date:
  • Size: 5.3 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.10.tar.gz
Algorithm Hash digest
SHA256 5a48e1699d13a0f9a6fa6ce02205ceb7423a5b962e900747ad49d980e41da33b
MD5 87e6d4a085ecd990b8c5a6f89649e04e
BLAKE2b-256 8ba92413b86b4de2410b41b99eb36e288b8ed4bc56dc2eedfdc00fcf8f555348

See more details on using hashes here.

File details

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

File metadata

  • Download URL: logAnalyst-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 8a82fbb5c2d57afdfee85b25910f9136394da93dd60f5ba2ec295015eb21708b
MD5 88f8251485d8685900ce8fae492d949d
BLAKE2b-256 c295846cdaa1f25ee4dfe154804bc92d8a9404b0f58e965ba2f27591c3d8fe0e

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