Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ynqa/logu
Extract patterns from unstructured log messages
https://github.com/ynqa/logu
cli log-analyzer rust streaming terminal tui
Last synced: 7 days ago
JSON representation
Extract patterns from unstructured log messages
- Host: GitHub
- URL: https://github.com/ynqa/logu
- Owner: ynqa
- License: mit
- Created: 2024-08-05T11:44:00.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-05T13:26:37.000Z (5 months ago)
- Last Synced: 2025-01-01T09:04:34.065Z (14 days ago)
- Topics: cli, log-analyzer, rust, streaming, terminal, tui
- Language: Rust
- Homepage:
- Size: 35.2 KB
- Stars: 85
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-rust - ynqa/logu - Extract patterns from (streaming) unstructured log messages [![ci](https://github.com/ynqa/logu/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ynqa/logu/actions/workflows/ci.yml) (Applications / System tools)
- fucking-awesome-rust - ynqa/logu - Extract patterns from (streaming) unstructured log messages [![ci](https://github.com/ynqa/logu/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ynqa/logu/actions/workflows/ci.yml) (Applications / System tools)
- trackawesomelist - ynqa/logu (⭐76) - Extract patterns from (streaming) unstructured log messages [![ci](https://github.com/ynqa/logu/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ynqa/logu/actions/workflows/ci.yml) (Recently Updated / [Oct 06, 2024](/content/2024/10/06/README.md))
README
# logu
![logu.gif](https://github.com/ynqa/ynqa/blob/master/demo/logu.gif)
*logu* is for extracting patterns from (streaming) unstructured log messages.
For parsing unstructured logs, it uses the parser from
[Drain](https://github.com/logpai/Drain3).
In simple terms, it tokenizes log messages,
builds a tree structure, and groups similar logs into a single cluster,
converting unstructured log data into a format that can be organized and analyzed.This approach is also used by
[Grafana Loki](https://github.com/grafana/loki/tree/v3.0.0/pkg/pattern/drain).
If you are interested in log parsers themselves,
other methods are summarized at
[logpai/logparser](https://github.com/logpai/logparser),
so please take a look.## Features
- [x] Extract patterns from streaming log messages
- Enables more detailed analysis
- [ ] Displays the number of messages included
and a list of specific examples in the cluster
- [ ] Identifies attributes such as IP, port## Installation
### Homebrew
```bash
brew install ynqa/tap/logu
```### Cargo
```bash
cargo install logu
```## Examples
```bash
stern --context kind-kind - | logu
```## Keymap
| Key | Action
| :- | :-
| Ctrl + C | Exit `logu`## Usage
```bash
Usage: logu [OPTIONS]Options:
--retrieval-timeout
Timeout to read a next line from the stream in milliseconds. [default: 10]
--render-interval
Interval to render the list in milliseconds. [default: 100]
--train-interval
[default: 10]
--cluster-size-th
Threshold to filter out small clusters. [default: 0]
--max-clusters--max-node-depth
[default: 2]
--sim-th
[default: 0.4]
--max-children
[default: 100]
--param-str
[default: <*>]
-h, --help
Print help (see more with '--help')
-V, --version
Print version
```