Docker and Kubernetes log aggregation, inspection, export, and preview toolkit.
Project description
Kubelog
Docker and Kubernetes log aggregation, inspection, export, and preview toolkit.
Kubelog is a terminal-first log aggregation tool for teams that need to inspect container logs without standing up a full observability stack. It reads Docker JSON logs, Kubernetes CRI/containerd logs, structured JSON logs, plain text logs, directories of log files, and stdin; normalizes them into one schema; then provides Rich terminal summaries, search, severity filtering, time bucketing, exports, comparisons, and a local Flask preview dashboard.
- Multi-format ingestion - Parse Docker JSON, Kubernetes CRI/containerd, JSON application logs, plain text logs, directories, and pipes.
- Log aggregation - Group by level, source, parser, namespace, pod, container, service, stream, or time bucket.
- Search and filtering - Filter by query, severity, minimum severity, namespace, pod, container, service, and time range.
- Export workflows - Write normalized logs as JSONL, CSV, or a self-contained HTML report.
- Preview server - Launch a local Flask dashboard with HTML views and JSON APIs for logs, summary, and time buckets.
- Dataset comparison - Compare two log captures by severity or Kubernetes metadata to spot regressions quickly.
Installation
pip install kubelog
Usage
Inspect a Docker JSON log:
kubelog inspect /var/lib/docker/containers/app/app-json.log
Aggregate Kubernetes pod logs by severity:
kubelog aggregate /var/log/pods --by level
Search for errors in piped logs:
kubectl logs deploy/api --all-containers | kubelog search "timeout" -
Export normalized logs:
kubelog export ./logs --format csv --out build/logs.csv --min-level WARN
kubelog export ./logs --format html --out build/report.html
Serve a local dashboard:
kubelog serve ./logs --port 8765
Compare two captures:
kubelog compare before.log after.log --by level
Commands
| Command | Description |
|---|---|
kubelog inspect [paths...] |
Inspect source types, parsers, levels, services, top messages, and time range. |
kubelog collect [paths...] |
Normalize and print logs from files, directories, or stdin. |
kubelog aggregate [paths...] |
Aggregate logs by severity, source, Kubernetes metadata, or time bucket. |
kubelog search <query> [paths...] |
Search normalized log messages and source paths. |
kubelog tail [paths...] |
Print newest entries and optionally follow appended file logs. |
kubelog export [paths...] |
Export logs as JSONL, CSV, or HTML. |
kubelog serve [paths...] |
Start a local Flask dashboard and JSON API server. |
kubelog compare <left> <right> |
Compare two log captures by severity or metadata field. |
Configuration
Kubelog works without a config file. Use command flags to control parsing, filtering, and output:
kubelog collect ./logs \
--source auto \
--min-level WARN \
--namespace production \
--since 2h \
--limit 200
Supported parser hints are auto, docker, kubernetes, k8s, cri, containerd, json, and plain. Relative time filters accept 15m, 2h, and 1d; ISO timestamps are also supported.
License
MIT License. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kubelog-0.1.0.tar.gz.
File metadata
- Download URL: kubelog-0.1.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66fa933615cc5f552e02501b27c804962949251e201aa51094c5581c0ab7a4da
|
|
| MD5 |
119ba3c1b7cd5840bd617aba6aa50ed1
|
|
| BLAKE2b-256 |
4a0145ecae72e272d2f557cd2c06c766d49e53056176f1fde4564304a6681328
|
File details
Details for the file kubelog-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kubelog-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e97ef7b4a7bff3a8f3f3fe08db0e614320c88a8cb2fb2988d3d0a5e06c67f3ec
|
|
| MD5 |
aac719b1e069e3d63d87f00338842bd8
|
|
| BLAKE2b-256 |
e5fc5a0009cacb90f18a056ba64099a84074458d96a24dfcc85a09ef76657bc9
|