Skip to content

vai-airbyte/tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Support Tools

A collection of scripts for troubleshooting and parsing data.

Tools

collect-k8s-logs.sh

Collects logs from all pods in a Kubernetes namespace, with support for multi-container pods, init containers, and previous container logs (after restarts).

# Basic usage - will prompt for namespace
./collect-k8s-logs.sh

# Specify namespace and time range
./collect-k8s-logs.sh -n airbyte --since 1h

# Filter by label selector
./collect-k8s-logs.sh -n airbyte -l "app=airbyte,component=worker"

# Create compressed archive for sharing
./collect-k8s-logs.sh -n airbyte --since 2h --tgz --rm

Options:

Flag Description
-n, --namespace Kubernetes namespace
-o, --out Output directory (default: ./logs/<namespace>_<timestamp>)
--since Log duration: 5s, 2m, 3h, 7d
-l, --selector Label selector to filter pods
--gzip Gzip individual log files
--tgz Create a .tar.gz archive
--rm Remove original directory after archiving (with --tgz)

flatten_sync_logs.py

Formats multi-line Airbyte sync log blocks into single lines for easier terminal viewing and grep-ability.

# Interactive
python3 flatten_sync_logs.py

# From file
python3 flatten_sync_logs.py sync_logs.txt

parse_credits.py

Parses Airbyte Cloud credit export CSVs, splitting the Credits column (e.g., 1.5 $1,234.56) into separate numeric Credits and Monetary columns.

python3 parse_credits.py export.csv

Output is written to processed_file.csv in the same directory as the input.


pgdumprestore/restore-airbyte-db.sh

Spins up a fresh Postgres container and restores the database dump for local inspection.

cd pgdumprestore
./restore-airbyte-db.sh database.dump

After restore, connect with:

psql -h localhost -p 5433 -U postgres -d db-airbyte

Requires: Docker

Environment:

  • PGDUMP_PASSWORD - Postgres password (default: postgres)

Requirements

  • kubectl configured with cluster access (for collect-k8s-logs.sh)
  • Python 3.x (for Python scripts)
  • Docker (for pgdumprestore)

About

Tools I use in support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published