Skip to main content

No project description provided

Project description

DAGnostics 🔍

DAGnostics is an intelligent ETL monitoring system that leverages LLMs to analyze, categorize, and report DAG failures in data pipelines. It provides automated parsing of DAG errors and is designed to generate comprehensive statistics for better observability.

🌟 Features (Current Implementation)

  • Automated DAG error log parsing and categorization using LLMs (Ollama, OpenAI, Anthropic, Gemini)
  • Error pattern recognition and log clustering
  • Airflow integration for log collection
  • Web dashboard UI for monitoring (backend API may be incomplete)
  • CLI for analysis and monitoring commands

Planned / Not Yet Implemented:

  • Report generation and export (HTML, JSON, etc.)
  • Monitoring daemon (background process)
  • Alerting (email/SMS)
  • Full integration with existing ETL monitoring systems

🛠 Tech Stack

  • Python 3.10+
  • uv for dependency management
  • Ollama for local LLM deployment (default, fully integrated)
  • OpenAI, Anthropic, Gemini LLM support (requires configuration)
  • FastAPI for API endpoints
  • Typer for CLI interface

📋 Prerequisites

  • Python 3.10 or higher
  • uv installed on your system (pip install uv)
  • Ollama installed and running locally (for default LLM usage)
  • Access to your ETL system's logs

🚀 Quick Start

  1. Navigate to the project and install dependencies:
cd dagnostics
uv sync
  1. Set up pre-commit hooks:
uv run pre-commit install
  1. Set up Ollama with your preferred model:
ollama pull mistral
  1. Configure your environment:
cp config/config.yaml.example config/config.yaml

📁 Project Structure

dagnostics/
├── data/
│   ├── clusters/              # Drain3 cluster persistence
│   ├── baselines/            # Baseline cluster data
│   ├── raw/
│   └── processed/
├── src/dagnostics/
│   ├── api/                  # FastAPI application
│   ├── core/                 # Data models and configuration
│   ├── llm/                  # LLM engine and providers
│   ├── monitoring/           # Airflow integration and analysis
│   ├── reporting/            # (Stub) Reporting logic
│   ├── web/                  # Web dashboard UI
│   └── utils/
├── config/
└── migrations/

🔧 Configuration

The application is configured through config/config.yaml.


📊 Usage

Command-Line Interface (CLI)

DAGnostics provides a CLI for managing the monitoring and reporting system. Use the following commands:

Start the System (Stub)

uv run dagnostics start

Note: The monitoring daemon is not yet implemented. This command is a placeholder.

Analyze a Specific Task Failure

uv run dagnostics analyze <dag-id> <task-id> <run-id> <try-number>
  • Options:
    • --llm/-l: LLM provider (ollama, openai, anthropic, gemini)
    • --format/-f: Output format (json, yaml, text)
    • --verbose/-v: Verbose output

Generate a Report (Not Yet Implemented)

uv run dagnostics report
uv run dagnostics report --daily

Note: Report generation and export are not yet implemented. These commands are placeholders.

Python API (Planned)

# Example usage (not yet implemented)
from dagnostics.monitoring import DAGMonitor
from dagnostics.reporting import ReportGenerator

monitor = DAGMonitor()
generator = ReportGenerator()
report = generator.create_daily_report()

Note: The Python API for monitoring and reporting is not yet implemented.


🛠 Development Tasks

The tasks/ folder contains utility scripts for common development tasks, such as setting up the environment, linting, formatting, and running tests. These tasks are powered by Invoke.

Available Tasks

Run the following commands from the root of the project:

Command                  Description                                     
invoke dev.setup        Set up the development environment.             
invoke dev.clean        Clean build artifacts and temporary files.     
invoke dev.format      Format the code using black and isort.     
invoke dev.lint        Lint the code using flake8 and mypy.       
invoke dev.test        Run all tests with pytest.                   

🧪 Testing

# Run all tests
uv run pytest

# Run with coverage
uv run pytest --cov=dagnostics

# Run specific test file
uv run pytest tests/llm/test_parser.py

📝 Development

  1. Create a new branch:
git checkout -b feature/amazing-feature
  1. Make your changes and ensure tests pass:
./scripts/test.sh
  1. Format and lint your code:
./scripts/lint.sh
  1. Commit your changes:
git commit -m "Add amazing feature"

🌐 Web Dashboard

A modern web dashboard UI is included in src/dagnostics/web/. It provides:

  • Monitor status and statistics (requires backend API)
  • Error trends and categories (requires backend API)
  • Task analysis form (requires backend API)

Note: The backend API endpoints for the dashboard may be incomplete or stubbed. Some dashboard features may not display real data yet.


🚧 Limitations / Roadmap

  • Report generation and export: Not yet implemented. No HTML, JSON, or other report files are produced.
  • Monitoring daemon: The background monitoring process is a stub.
  • Alerting: Email/SMS alerting is not implemented.
  • Python API: Not yet implemented.
  • Web dashboard: UI is present, but backend data may be incomplete.
  • LLM providers: Only Ollama is fully integrated by default. OpenAI, Anthropic, and Gemini require additional setup and may not be fully tested.

See CONTRIBUTING.md for how to help!


🤝 Contributing

See CONTRIBUTING.md for detailed guidelines.


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

  • Inspired by the daily L1 support rotation practice
  • Built with Python, uv, Ollama, and LangChain
  • Special thanks to the open-source community

📞 Support

For questions and support, please open an issue in the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dagnostics-0.2.3.tar.gz (204.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dagnostics-0.2.3-py3-none-any.whl (56.6 kB view details)

Uploaded Python 3

File details

Details for the file dagnostics-0.2.3.tar.gz.

File metadata

  • Download URL: dagnostics-0.2.3.tar.gz
  • Upload date:
  • Size: 204.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.16

File hashes

Hashes for dagnostics-0.2.3.tar.gz
Algorithm Hash digest
SHA256 edbf2a187350388357eb7d62399aa62dacd95f8dca86f9f8727653ed35511d14
MD5 80476f288cb9df2dce8bfabd70a5c6ee
BLAKE2b-256 3b538b3c1675c8ea0b0fdc63b25acfe38f652f144a8646d94a1efedb0f75beea

See more details on using hashes here.

File details

Details for the file dagnostics-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: dagnostics-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 56.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.16

File hashes

Hashes for dagnostics-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 facabf1e0c1bfe5156ad92e1abaa63f3a7ccf023a5ca605fdcbb1f580c9e3126
MD5 937580c09a583c0a99b84f303bc23b04
BLAKE2b-256 b84ddfd5121a011326bcc69a38e63443e2988b2c3a522ac054fcba0234e13928

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page