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
- Clone the repository:
git clone https://github.com/andrewm4894/anomstack.git
cd anomstack
- Install dependencies:
pip install -r requirements.txt
Basic Configuration
- Create a new metric batch in the
metrics
directory:
mkdir -p metrics/my_first_metric
- 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
- 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
- Start the Dagster UI:
dagster dev -f anomstack/main.py
- Start the dashboard:
python dashboard/app.py
- Access the dashboard at
http://localhost:5000
Monitoring Your Metric
- The metric will be automatically ingested based on your schedule
- Anomstack will train a model on your historical data
- New data points will be scored for anomalies
- 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?
- Check the GitHub Issues
- Join our Discord Community
- Read the detailed documentation