PEPAI / tools

log-bill

Estimate what your logs cost per pattern, offline, before you ship them.

The problem

Teams pay per GB for logs and often only see on the invoice which pattern produced the volume.

log-bill reads a sample of a log file (plain text or JSON lines), groups the lines into patterns by masking the variable parts, and shows each pattern's share of the volume. With a time window and a price file you supply, it extrapolates to an estimated cost per day and per month.

Example output

$ log-bill scan --window 1m tests/fixtures/scan-text.log
total: 3 lines, 118 bytes
Pe19dc70d8299c276  2 lines  108 bytes  91.5%  user <NUM> failed at <TS> from <IP>
P46ab161881a7d411  1 line  10 bytes  8.5%  disk full
factor: 1440
per day: 169920 bytes, 0.000 GB
per month: 5097600 bytes, 0.005 GB

Real output of the binary on a synthetic test fixture from the repository.

Install

cargo install --locked log-bill

Needs Rust 1.85 or newer. Ready-made binaries for Linux, Windows and macOS are on the releases page.

What it deliberately does not do

Links

GitHubcrates.ioQuality
← Back to all tools