Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modern Grok Debugger

A fast, interactive Grok and Regexp debugger and pattern generator built with FastAPI, PyGrok, and Alpine.js. Designed for security analysts, log engineers, and DevOps teams working with Logstash, Elastic Common Schema (ECS), and Vector log pipelines.


Features

  • Real-Time Log Parsing: Instant Grok pattern and standard regular expression evaluations without page reloads.
  • ECS Bracket & Dot Notation Support: Native parsing and validation for nested target variables such as %{WORD:[observer][ingress][vlan][id]} or %{IP:client.ip}.
  • Partial Match Diagnostics: When a pattern fails to match a log line, the engine highlights the exact token where parsing broke down.
  • Pattern Auto-Generator (Beta): Generates starter Grok patterns automatically from raw sample logs.
  • Custom Pattern Definitions: Inline custom pattern definitions with line-number gutter synchronization.
  • Color-Coded Token Highlighting: Automatic visual mapping connecting extracted fields to corresponding segments in sample logs.
  • LocalStorage State Persistence: Automatically retains log inputs, custom definitions, and patterns across browser refreshes.

Inspirations & Credits

This project was built to modernize and combine capabilities of Grok debugging tools:


Project Structure

.
├── app/
│   ├── main.py              # FastAPI application & API routes
│   ├── grok_engine.py       # Core Grok evaluation, sanitization & auto-generation engine
│   └── templates/
│       └── index.html       # Single-page UI built with Alpine.js & Tailwind CSS
├── requirements.txt         # Python dependencies
└── README.md

Getting Started

Prerequisites

  • Python 3.10+

Local Setup

  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
uvicorn app.main:app --reload --port 8000
  1. Open http://localhost:8000 in your browser.

About

A fast, interactive Grok and Regexp debugger and pattern generator.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages