Skip to main content

Quickstart Guide

This guide will help you get started with Anomstack quickly. We'll cover the basic setup and show you how to monitor your first metric.

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/andrewm4894/anomstack.git
cd anomstack
  1. Install dependencies:
pip install -r requirements.txt

Basic Configuration

  1. Create a new metric batch in the metrics directory:
mkdir -p metrics/my_first_metric
  1. Create a SQL file for your metric (metrics/my_first_metric/query.sql):
SELECT 
timestamp,
value
FROM your_table
WHERE timestamp >= CURRENT_TIMESTAMP - INTERVAL '7 days'
ORDER BY timestamp
  1. Create a configuration file (metrics/my_first_metric/config.yaml):
name: my_first_metric
description: "My first metric in Anomstack"
source:
type: sqlite # or your preferred data source
query: query.sql
schedule: "0 * * * *" # Run every hour

Running Anomstack

  1. Start the Dagster UI:
dagster dev -f anomstack/main.py
  1. Start the dashboard:
python dashboard/app.py
  1. Access the dashboard at http://localhost:5000

Monitoring Your Metric

  1. The metric will be automatically ingested based on your schedule
  2. Anomstack will train a model on your historical data
  3. New data points will be scored for anomalies
  4. You'll receive alerts if anomalies are detected

Next Steps

Ready-Made Example Metrics

Want to see Anomstack in action with real data? Try these ready-made example metric batches:

  • Currency: Track currency exchange rates from public APIs.
  • Yahoo Finance (yfinance): Monitor stock prices and financial data using the Yahoo Finance API.
  • Weather: Analyze weather data from Open Meteo.
  • CoinDesk: Get Bitcoin price data from the CoinDesk API.
  • Hacker News: Track top stories and scores from Hacker News.
  • Netdata: Monitor system metrics using the Netdata API.

See the full list of examples for more, including BigQuery, Prometheus, Google Trends, and more.

Common Issues

Metric Not Showing Up

  • Check the Dagster UI for any job failures
  • Verify your SQL query returns the expected data
  • Ensure your configuration file is valid YAML

No Alerts

  • Check your alert configuration
  • Verify your email/Slack settings
  • Look for any alert throttling settings

Need Help?