Skip to main content
Rules are the core of AnomalyArmor’s alerting system. Each rule defines what events trigger alerts, what conditions must be met, and where notifications are sent.
Prerequisites: Before creating alert rules, you need:

Rule Components

Every alert rule has these parts: Anatomy of an alert rule showing components

Creating a Rule

1

Navigate to Alert Rules

Go to Alerts in the sidebar, then click the Rules tab.
2

Click Create Rule

Click Create Rule to open the rule builder.
3

Select Event Type

Choose what triggers this rule:
Event TypeDescription
Schema Change DetectedColumn/table added, removed, or modified
Freshness ViolationData not updated within SLA threshold
Discovery FailedConnection or permission error during scan
Asset RemovedTable or view no longer exists
New Asset DiscoveredPreviously unknown table/view found
Schema Change Detected is the most commonly used event type for monitoring production databases.
4

Define Scope

Filter which events match this rule:Data Source (optional)
  • Select specific connections or leave blank for all
Schema (optional)
  • Include only specific schemas (e.g., public, analytics)
  • Exclude schemas (e.g., test_*, pg_temp)
Asset (optional)
  • Target specific tables/views
  • Use patterns: orders*, *_staging
5

Add Conditions

Further filter events (varies by event type):For Schema Changes:
  • Change type: Column Added, Column Removed, Type Changed, Table Added, Table Removed
  • Affected column pattern: *_id, created_*
For Freshness Violations:
  • Minimum delay: Only alert if data is X hours late
  • Threshold exceeded by: Alert only after threshold exceeded by Y%
6

Select Destinations

Choose where alerts are sent:
  • Select one or more configured destinations
  • Each destination type can be selected multiple times (different channels)
Select one or more configured destinations for the rule. For example:
  • Slack #data-alerts
  • Slack #data-engineering
  • PagerDuty (Data On-Call)
  • Email (Data Team)
7

Set Operating Schedule (Optional)

Assign an operating schedule to restrict when this rule fires:
  • Select a schedule from the dropdown, or leave as “No schedule” for always-active
  • Events outside the schedule’s active hours are suppressed
  • Suppressed events still appear in the alert log
Create schedules under Alerts > Schedules before assigning them to rules.
8

Name and Save

Give your rule a clear, descriptive name:Good names:
  • “Production Schema Changes - Breaking”
  • “Orders Table Freshness”
  • “All Discovery Failures”
Avoid:
  • “Rule 1”
  • “New rule”
  • “Test”
Click Save to activate the rule.

Event Types in Detail

Schema Change Detected

Triggers when table or column structure changes:
ChangeDescription
Column RemovedExisting column no longer exists
Table RemovedEntire table no longer exists
Column Type ChangedData type modified
Column AddedNew column appeared
Table AddedNew table discovered
Column RenamedName change detected (remove + add)
Example rule:
  • Event: Schema Change
  • Scope: Data source = production
  • Conditions: Change type = Column Removed OR Table Removed
  • Destinations: Slack, PagerDuty

Freshness Violation

Triggers when data isn’t updated within the SLA:
ConditionDescription
SLA exceededLatest timestamp older than threshold
Warning thresholdApproaching SLA (e.g., 80% of threshold)
ResolvedData became fresh again
Example rule:
  • Event: Freshness Violation
  • Scope: Asset = orders, payments, users
  • Conditions: (none - all violations)
  • Destinations: Slack

Discovery Failed

Triggers when a discovery job can’t complete:
Failure TypeDescription
Connection failedCan’t reach database
Authentication failedInvalid credentials
Permission deniedUser lacks access
TimeoutDiscovery took too long
Example rule:
  • Event: Discovery Failed
  • Scope: All data sources
  • Conditions: (none)
  • Destinations: Email, Slack

Asset Removed

Triggers when a previously-known asset no longer exists: Common causes:
  • Table was intentionally dropped
  • Table was renamed
  • Permission revoked
  • Discovery ran against wrong database
Example rule:
  • Event: Asset Removed
  • Scope: Data source = production
  • Destinations: Slack

Rule Examples

Critical Tables Only

Monitor your most important tables closely:
FieldValue
NameCritical Tables - All Changes
EventSchema Change Detected
Data Sourceproduction-postgres
Assetsorders, users, payments, products
ConditionsAll changes
DestinationsSlack #critical-data, PagerDuty

Production Breaking Changes

Alert only on potentially breaking changes:
FieldValue
NameProduction - Breaking Changes Only
EventSchema Change Detected
Data Sourceproduction-postgres
Schemapublic, analytics
Change TypeColumn Removed, Table Removed, Type Changed
DestinationsSlack #data-alerts, PagerDuty

Non-Production Informational

Low-priority notifications for dev/staging:
FieldValue
NameStaging Schema Changes (Info Only)
EventSchema Change Detected
Data Sourcestaging-postgres
ConditionsAll changes
DestinationsEmail (daily digest)

Freshness by Criticality

Different thresholds for different tables: Revenue Tables Freshness
FieldValue
EventFreshness Violation
Assetsorders, payments, revenue_*
DestinationsSlack, PagerDuty
Analytics Tables Freshness
FieldValue
EventFreshness Violation
Assetsdaily_*, weekly_*, analytics_*
DestinationsSlack

Managing Rules

Enabling/Disabling

Toggle rules on or off without deleting:
  1. Go to Alerts → Rules
  2. Find the rule
  3. Click the toggle switch
Disabled rules won’t evaluate events but preserve configuration.

Editing Rules

Modify existing rules:
  1. Go to Alerts → Rules
  2. Click the rule name
  3. Make changes
  4. Click Save
Changes take effect immediately. Events that already fired won’t re-fire.

Deleting Rules

Remove rules you no longer need:
  1. Go to Alerts → Rules
  2. Click the rule menu (⋮)
  3. Select Delete
  4. Confirm deletion
Deleted rules can’t be recovered. Consider disabling instead if you might need the rule later.

Advanced Configuration

Multiple Destinations

A single rule can send to multiple places: Rule: “Critical Schema Changes”
  • Slack #data-alerts
  • Slack #data-engineering
  • PagerDuty
  • Email team@company.com (daily digest)

Pattern Matching

Use patterns in asset filters:
PatternMatches
orders*orders, orders_2024, orders_archive
*_stagingorders_staging, users_staging
analytics.*All tables in analytics schema
*.usersusers table in any schema

Troubleshooting

  1. Check enabled: Is the toggle ON?
  2. Check scope: Does the asset match the filter?
  3. Check conditions: Are conditions too restrictive?
  4. Check events: Is discovery running and finding changes?
  5. Check destination: Is it configured correctly?
  1. Review scope: Is it broader than intended?
  2. Check conditions: Add filters to narrow matches
  3. Review event type: Correct event selected?
  4. Check duplicates: Multiple rules for same scope?
  1. Required fields: Ensure name, event type, and destination are set
  2. Valid scope: Check pattern syntax
  3. Destination exists: Verify destination is configured

Next Steps

Set Up Slack

Configure Slack as a destination

Best Practices

Reduce alert fatigue