Basic Usage

Master the essential Gonzo usage patterns. This guide covers the most common ways to analyze logs and the fundamental workflows you'll use daily.

circle-info

New to Gonzo? Complete the Quick Start Tutorial first for a hands-on introduction to the interface.

Core Usage Patterns

Reading from Files

The most common way to use Gonzo is analyzing log files directly:

# Analyze a single log file
gonzo -f application.log

# Analyze multiple specific files
gonzo -f application.log -f error.log -f debug.log

# Use glob patterns for multiple files
gonzo -f "/var/log/*.log"
gonzo -f "/var/log/app/*.log" -f "/var/log/nginx/*.log"

Perfect for focused analysis of one application or service:

gonzo -f /var/log/myapp.log

Best for:

  • Debugging specific applications

  • Analyzing archived log files

  • Initial investigation of issues

Real-Time Log Following

Monitor logs as they grow, similar to tail -f:

circle-check

Stdin Processing (Piping)

Gonzo excels at processing log streams from other commands:

Command-Line Options

Essential Flags

Flag
Description
Example

-h, --help

Gonzo help

-h, --help

-f, --file

Specify log files or patterns

gonzo -f app.log

--follow

Follow files like tail -f

gonzo -f app.log --follow

-u, --update-interval

Dashboard refresh rate

gonzo -f app.log -u 2s

-b, --log-buffer

Maximum log entries to keep

gonzo -f app.log -b 5000

--ai-model

AI model for analysis

gonzo -f app.log --ai-model="gpt-4"

Buffer and Performance Tuning

Optimize Gonzo for your log volume and system resources:

Working with Different Log Formats

Gonzo automatically detects and handles multiple log formats, including Custom Formats. Use the Quick Start section to try out a few of the supported log formats.

JSON Logs

Features:

  • ✅ Automatic field extraction

  • ✅ Structured attribute display

  • ✅ Nested object support

  • ✅ Array handling

Logfmt Format

Features:

  • ✅ Key-value pair extraction

  • ✅ Quoted value support

  • ✅ Numeric type detection

  • ✅ Space and special character handling

Plain Text Logs

Features:

  • ✅ Pattern-based level detection

  • ✅ Timestamp recognition

  • ✅ Service name extraction

  • ✅ Word frequency analysis

circle-info

Format Detection: Gonzo automatically detects the format of each log entry. You can mix different formats in the same analysis session.

Essential Workflows

Debugging Application Issues

Performance Monitoring

System Health Monitoring

Panel Navigation

Key Shortcuts for Daily Use

Key
Action
Try This

Tab / Shift+Tab

Switch between panels

Navigate around the 2x2 grid

↑/↓ or k/j

Move up/down in lists

Navigate through log entries

Enter

View details

Press on a log entry or the Counts panel

Space

Pause/unpause dashboard

Freeze the display to examine data

/

Enter filter mode

Type regex patterns to filter logs

s

Search/highlight

Search and highlight text in logs

f

Enter full screen log viewer

Fill your terminal with full screen log viewer

Escape

Close modal/exit filter mode

Close modal/exit filter mode

q

Quit Gonzo

Exit the application

?/h

Show help

Show help

Configuration for Daily Use

Environment Variables

Set these for consistent behavior:

Config File Setup

Create ~/.config/gonzo/config.yml for persistent settings:

Common Patterns by Use Case

Web Application Monitoring

Microservices Debugging

Database Troubleshooting

CI/CD Pipeline Analysis

Best Practices

🎯 Efficient Filtering

  • Start broad, then narrow down with specific filters

  • Use regex for pattern matching: *(api|web)

  • Combine severity with keywords: *error.*database

Performance Optimization

  • Use --follow only when needed for real-time analysis

  • Adjust buffer sizes based on log volume

  • Filter early to reduce processing overhead

🔍 Effective Analysis

  • Use the Counts panel for pattern recognition

  • Leverage AI analysis for complex issues

  • Pause the feed when examining specific entries

🛠️ Workflow Integration

  • Create shell aliases for common commands

  • Use config files for consistent settings

  • Combine with other tools (stern, kubectl, docker)

Troubleshooting Common Issues

File Access Problems

Performance Issues

Display Issues

What's Next?

Now that you've mastered basic usage, explore these advanced features:

  • Interface Overview - Deep dive into each panel

  • Log Input Methods - OTLP, streaming, and advanced sources

  • Filtering & Search - Advanced filtering techniques

  • Configuration - Customize for your workflow


You're now ready to use Gonzo effectively for daily log analysis! 🚀 These patterns will handle 90% of your log analysis needs.

Last updated