Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt

Use this file to discover all available pages before exploring further.

Metrics are statistical measurements that track properties of your data over time. AnomalyArmor captures metrics on a schedule, builds baselines, and alerts you when values fall outside expected ranges.
Metrics flow: Collect → Compare to Baseline → Detect Anomalies → Alert

What Metrics Track

Metric TypeWhat It MeasuresExample Use Case
row_countTotal rows in a tableDetect data loss or unexpected growth
null_percentPercentage of null valuesCatch ETL issues leaving nulls
distinct_countUnique values in a columnDetect cardinality changes
duplicate_countDuplicate valuesFind unexpected duplicates
min_valueMinimum numeric valueCatch invalid data (negative prices)
max_valueMaximum numeric valueDetect outliers
meanAverage numeric valueMonitor central tendency

How Anomaly Detection Works

  1. Baseline building: Historical values establish what’s “normal”
  2. Z-score calculation: Each new value is compared to the baseline
  3. Sensitivity threshold: Values exceeding the threshold trigger alerts
A sensitivity of 2.0 means values more than 2 standard deviations from the mean are flagged as anomalies.

Common Questions

How is a metric different from a validity rule?

A metric captures a numeric property over time (row count, null percentage, distinct count) and flags statistical anomalies against a learned baseline. A validity rule checks a deterministic condition on current data (value in allowed set, format match, range bounds). Use metrics to catch “this number changed suspiciously”; use validity rules to catch “this data broke a known contract”.

What’s the default sensitivity for anomaly detection, and when should I change it?

Default is 2.0 standard deviations - roughly 95% of normal variance stays silent, outliers alert. Raise to 3.0 for noisy metrics where 2σ produces false alerts; lower to 1.5 for business-critical metrics where you’d rather investigate a false positive than miss a real anomaly. Tune per-metric, not globally.

How much history does AnomalyArmor need before metric anomaly detection works?

Typically 7-14 days of captures at your chosen sampling interval. During this “learning” phase, values are recorded but no alerts fire. You can shorten the wait by temporarily reducing the sample interval, then relaxing it once the baseline is established.

Can I define a custom metric that isn’t in the built-in list?

Yes, via custom SQL monitoring. Write a SELECT that returns a single numeric column and AnomalyArmor treats the result as a metric - baseline learning, anomaly detection, and alerting all work the same way as built-in metrics.

Next Steps

Create a Metric

Set up your first data quality metric

Set Up Alerts

Get notified when anomalies are detected