Logstreem
logstreem ingest

logstreem ingest

Pipe anything into a dataset — a file, a stream, another command's output.

$logstreem ingest

Reads stdin or files and posts to ingest, batching and compressing as it goes.

Usage
logstreem ingest <dataset> [file...] [--format json|ndjson|csv|logfmt]
FlagTypeDescription
<dataset>stringTarget dataset. Created if it does not exist. Required.
--format <fmt>enumjson, ndjson, csv or logfmt. Detected from the first line by default.
--timestamp-field <f>stringWhich field holds the event time. Default _time.
--batch-size <n>numberEvents per request. Default 1000.
--flush-interval <d>stringMax buffering delay. Default 2s.
--add <k=v>string[]Attach a constant field to every event. Repeatable.
--dry-runbooleanParse and print, do not send.
Examples
# A file
logstreem ingest api-gateway-prod events.ndjson

# A live stream, tagged with the host
tail -f /var/log/app.log | logstreem ingest api-gateway-prod \
  --format logfmt --add host="$(hostname)" --add env=production

# Another tool's JSON
kubectl get events -o json | jq -c '.items[]' \
  | logstreem ingest k8s-events

# Check the parse before committing to it
head -20 weird.log | logstreem ingest scratch --format logfmt --dry-run

--dry-run first, always

Format detection is good, not perfect. One --dry-run on twenty lines tells you whether the timestamp was parsed and the fields split the way you expected — before you write a million events with message as the only field.