Skip to main content

AI-powered cost and query observability for Snowflake

Project description

❄️ FrostWatch

Snowflake cost monitoring shouldn't cost more than the savings.

CI PyPI Python 3.11+ Docker License: MIT

FrostWatch is an open source, self-hostable, AI-powered cost and query observability tool for Snowflake. Point it at your Snowflake account and get instant answers to "where is all our money going?" — no SaaS contract, no percentage-of-spend pricing, no phone-home.

What it does

  • Cost breakdown by warehouse, user, role, and query tag — updated on a schedule you control
  • Anomaly detection that flags unusual spend spikes against a rolling 21-day baseline
  • Plain-English explanations of anomalies and expensive queries, powered by your own LLM (Anthropic, OpenAI, Gemini, or a local Ollama model)
  • Query recommendations — suggested rewrites, warehouse right-sizing, clustering candidates
  • Weekly digests delivered to Slack or email
  • Clean web UI — dark-themed React dashboard, no BI tool required
  • REST API — all data accessible via /api/* endpoints
  • CLI — sync, config, and server management from the terminal

Quickstart

Option A — Docker (recommended)

# 1. Copy and edit the config
curl -O https://raw.githubusercontent.com/arunrajiah/frostwatch/main/frostwatch.yaml.example
cp frostwatch.yaml.example frostwatch.yaml
# Edit frostwatch.yaml with your Snowflake credentials and LLM API key

# 2. Start
docker compose up -d

# 3. Open the UI
open http://localhost:8000

Option B — pip

pip install frostwatch

# Initialize config
frostwatch config init
# Edit ~/.frostwatch/config.yaml with your credentials

# Start the server
frostwatch serve

Option C — from source

git clone https://github.com/arunrajiah/frostwatch
cd frostwatch

# Install Python package in editable mode
pip install -e ".[dev]"

# Build the frontend
cd frontend && npm install && npm run build && cd ..

# Initialize config
frostwatch config init

# Run
frostwatch serve --reload

Configuration

All config lives in ~/.frostwatch/config.yaml. Every field can also be set via environment variable with the FROSTWATCH_ prefix.

snowflake_account: "xy12345.us-east-1"
snowflake_user: "FROSTWATCH_USER"
snowflake_password: "your_password"
snowflake_role: "ACCOUNTADMIN"       # needs SELECT on ACCOUNT_USAGE

llm_provider: "anthropic"            # anthropic | openai | gemini | ollama
llm_api_key: "sk-ant-..."

slack_webhook_url: "https://hooks.slack.com/services/..."
email_recipients: ["ops@example.com"]

schedule_cron: "0 8 * * 1"          # weekly digest — Monday 8am
sync_cron: "0 */6 * * *"            # data sync — every 6 hours
credits_per_dollar: 3.0              # adjust for your Snowflake contract rate
snowflake_query_limit: 500           # queries fetched per sync

See frostwatch.yaml.example for the full reference.

Snowflake permissions

FrostWatch only reads from SNOWFLAKE.ACCOUNT_USAGE. The minimum required grant:

-- Create a dedicated role (recommended)
CREATE ROLE frostwatch_role;
GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE frostwatch_role;
GRANT ROLE frostwatch_role TO USER your_user;

The ACCOUNTADMIN role already has this access. No data is ever written to Snowflake.

LLM providers

Provider llm_provider Default model
Anthropic (Claude) anthropic claude-sonnet-4-6
OpenAI openai gpt-4o
Google Gemini gemini gemini-2.0-flash
Ollama (local) ollama llama3 — set llm_base_url to your Ollama server

FrostWatch is BYO-LLM. Your data never passes through a hosted proxy — it goes directly from your server to the LLM provider using the API key you supply.

CLI reference

frostwatch serve             Start the web server (default: http://localhost:8000)
frostwatch serve --reload    Start with auto-reload for development
frostwatch sync              Run a one-off Snowflake sync
frostwatch config init       Create ~/.frostwatch/config.yaml from the example
frostwatch config show       Print current config (secrets masked)
frostwatch version           Print version

API

The REST API is available under /api. Interactive docs are at http://localhost:8000/docs when the server is running.

Key endpoints:

Method Path Description
GET /api/dashboard Cost summary + recent anomalies
GET /api/queries Top queries by credit usage
GET /api/warehouses Per-warehouse cost aggregates
GET /api/anomalies Detected anomalies with LLM explanations
POST /api/sync Trigger a manual Snowflake sync
GET /api/settings Current configuration
PUT /api/settings Update configuration
POST /api/settings/test-snowflake Test Snowflake connectivity
POST /api/reports/generate Generate an AI cost report

Architecture

┌─────────────┐     read-only     ┌──────────────────────────────────┐
│  Snowflake  │ ◄───────────────  │  frostwatch serve                │
│ ACCOUNT_    │                   │                                  │
│ USAGE views │                   │  FastAPI + APScheduler           │
└─────────────┘                   │  ├── /api/*  (REST)              │
                                  │  └── /       (React SPA)         │
┌─────────────┐                   │                                  │
│  LLM API    │ ◄───────────────  │  SQLite  (local cache + history) │
│ (your key)  │                   └──────────────────────────────────┘
└─────────────┘

FrostWatch runs entirely inside your infrastructure. The only outbound calls are to Snowflake and your chosen LLM provider.

Roadmap

See ROADMAP.md.

Contributing

Contributions are welcome! Please open an issue before starting large changes so we can align on direction.

  • Read CONTRIBUTING.md for setup instructions and PR guidelines
  • Follow our Code of Conduct
  • All PRs require passing CI (lint, type check, tests, frontend build) and one maintainer review

License

MIT — free to use, modify, and self-host. See the license file for details.

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

frostwatch-0.1.4.tar.gz (85.8 kB view details)

Uploaded Source

Built Distribution

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

frostwatch-0.1.4-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file frostwatch-0.1.4.tar.gz.

File metadata

  • Download URL: frostwatch-0.1.4.tar.gz
  • Upload date:
  • Size: 85.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for frostwatch-0.1.4.tar.gz
Algorithm Hash digest
SHA256 26e6184f070ea01dce2fc9952fc5748327e07ae794b82212401f4d84167b2ec9
MD5 c0dcd385cc33fd98b51982528424bff0
BLAKE2b-256 e5f93eb995d90fc6286669e1abf800b94b2b40824a13e156a1ab0b2d251ec3b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for frostwatch-0.1.4.tar.gz:

Publisher: release.yml on arunrajiah/frostwatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file frostwatch-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: frostwatch-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for frostwatch-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 67c94b1d829b6c87e3111c1dc2921cf71d275ccfccea81d5c93d4da59f3966ed
MD5 e1053d0f4803b060b059e6bd678f46fa
BLAKE2b-256 6a7692a8146b0c260b0192741026fcf74dc33a3dd993f7980293165a9be73b02

See more details on using hashes here.

Provenance

The following attestation bundles were made for frostwatch-0.1.4-py3-none-any.whl:

Publisher: release.yml on arunrajiah/frostwatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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