Skip to content

rungalileo/galileoctl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

galileoctl

Galileo CLI is a command-line tool for Managing Galileo Stack, quick troubleshooting and collecting diagnostic bundles from Kubernetes clusters.

Features

  • Debug Commands: Collect logs, events, metrics, and database information
  • Connection Testing: Test connectivity between services in your cluster
  • Grafana Integration: Automatically capture Grafana dashboards as PNG screenshots
  • Prometheus Metrics: Query Prometheus for core metrics and save results
  • Preflight Checks: Validate cluster configuration before running commands
  • Complete Bundles: Generate comprehensive debug archives with all collected data (logs, events, metrics, and Grafana dashboards)
  • Pure Go Implementation: Uses Kubernetes client-go (no kubectl dependency)

Installation

Homebrew (macOS/Linux)

brew tap rungalileo/galileoctl
brew install galileoctl

Manual Installation

Download the latest release from GitHub Releases and add the binary to your PATH.

Supported Platforms:

  • Linux (amd64)
  • macOS (arm64)
  • Windows (amd64)

Usage Examples

Debug Commands

# Test API connections
galileoctl debug connections -n galileo

# Collect logs from all services
galileoctl debug logs -n galileo --tail=200

# Collect events with verbosity filter
galileoctl debug events -n galileo --since 1h --verbose error

# Query database data
galileoctl debug database data my_project -n galileo

# Query database queries
galileoctl debug database queries -n galileo 1h

# Collect metrics (Prometheus queries)
galileoctl debug metrics -n galileo --since=1h

# Capture Grafana dashboards (PNG screenshots with auto-configured namespace and time range)
galileoctl debug grafana -n galileo

# Complete debug bundle (logs, events, metrics, and Grafana dashboards)
galileoctl debug all -n galileo

Common Options

  • -n, --namespace: Kubernetes namespace (defaults to "galileo")
  • --since: Time window for logs/events (e.g., "1h", "30m", "2d")
  • --verbose: Filter by log level (error, warn, info, debug) (short -v)
  • lines (positional): Number of log lines per service. For the debug logs command this is the second positional argument (for example: galileoctl debug logs -n galileo 200 or galileoctl debug logs galileo 200). There is no --lines flag.
  • --time-window: Time window for metrics queries (e.g., "1h", "30m", "2d")

Output Structure

All collected data is saved in the galileoctl-debug-output/ directory with timestamped subdirectories:

galileoctl-debug-output/
├── logs_<namespace>_<timestamp>/
├── events_<namespace>_<timestamp>/
├── metrics_<namespace>_<timestamp>/
│   ├── api_failures.json
│   ├── job_failures.json
│   ├── job_latency_p50.json
│   └── rabbitmq_messages.json
└── grafana_<namespace>_<timestamp>/
    ├── dashboards.json
    ├── api.png
    ├── clickhouse.png
    └── ...

The debug all command also creates a compressed archive: galileoctl-complete-<timestamp>-<customer>.tar.gz

Technical Details

Grafana Dashboard Capture

The Grafana dashboard capture feature:

  • Automatically finds Grafana pods in the cluster
  • Port-forwards using Kubernetes client-go (no kubectl required)
  • Auto-fetches credentials from Kubernetes secrets
  • Configures dashboards with var-namespace=staging and from=now-1h via URL parameters
  • Captures full-page PNG screenshots of each dashboard
  • Handles API dashboards with extended wait times for data loading

Build from Source

Prerequisites

  • Go 1.25 or later
  • Kubernetes cluster access (kubeconfig configured)
  • Chrome/Chromium (for Grafana dashboard capture)

Build

git clone https://github.com/rungalileo/galileoctl.git
cd galileoctl
./build.sh

The binary will be created as galileoctl in the current directory.

Documentation

For more information, see the GitHub repository.

License

See LICENSE file for details.

About

A CLI for managing and troubleshooting Galileo Stacks

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •