> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloud Cost Alerts and Budget Monitoring

> Set up cloud cost alerts with trigger conditions, multi-metric formulas, budgets, and notifications through Slack, Teams, or email.

Cloud costs change daily, and waiting for the monthly invoice to spot problems means you're always reacting too late. **Cloud cost alerts** in Costory monitor spend, formulas, and budget progress, then notify you through Slack, Microsoft Teams, or email when your trigger conditions are met.

<Frame caption="Summary dashboard of active alerts, showing status, coverage, and spend areas at a glance">
  <img src="https://mintcdn.com/costory/42bBN-TVANXyiZnv/images/alerts/create-alert.gif?s=269a00eb907f49be7045132143150f10" alt="Setting up a cloud cost alert in Costory" width="1156" height="720" data-path="images/alerts/create-alert.gif" />
</Frame>

## Prerequisites

* At least one cloud provider ([AWS](/setup/billing#aws), [GCP](/setup/billing#gcp), or [Azure](/setup/billing#azure)) connected to Costory
* A notification channel configured (Slack, Microsoft Teams, or email)

## Overview

Costory evaluates your cloud spend every day, or three times a day depending on your plan, across AWS, GCP, and Azure. You define the cost or metric query, write the formula when needed, choose the trigger condition, and select where notifications go.

Use **cloud cost alerts** to turn daily evaluation into proactive notifications instead of manual checks.

Where alerts fit in your day-to-day:

* Catching a cost spike in a specific service before it compounds over the full billing period
* Tracking team-level budgets with automatic notifications when a team approaches or exceeds its target
* Monitoring commitment coverage (<Tooltip tip="AWS's flexible commitment-based pricing. You commit to a consistent $/hour for 1 or 3 years and get discounted rates." cta="See Glossary" href="/docs/glossary#savings-plans">Savings Plans</Tooltip>, <Tooltip tip="A commitment to use a specific instance type for 1 or 3 years in exchange for significant discounts. Less flexible than Savings Plans." cta="See Glossary" href="/docs/glossary#reserved-instances">Reserved Instances</Tooltip>) to avoid paying on-demand rates unnecessarily
* Watching custom ratios like marginal cost per user, Savings Plan coverage, or any formula built from multiple cost and usage metrics

## Setting up a cloud cost alert

<Steps>
  <Step title="Navigate to Alerts">
    Go to **Alerts** in the Costory app. You'll see all your existing alerts in one place.
  </Step>

  <Step title="Create a new alert">
    Click **Create Alert**. Choose from a pre-built template for common alert types or configure your own custom logic.

    <Frame caption="Create an alert from Explorer or pick a pre-built template">
      <img src="https://mintcdn.com/costory/x3aha8mbLB6xBTlh/images/alert%20templates.png?fit=max&auto=format&n=x3aha8mbLB6xBTlh&q=85&s=fa9ff9201da062d201ce24aef3db18c1" alt="Selecting an alert template in Costory" width="1010" height="772" data-path="images/alert templates.png" />
    </Frame>
  </Step>

  <Step title="Configure the metric rows">
    Add one or more cost or usage metric rows. Each row gets a letter, such as `a`, `b`, or `c`, that you can reference in the alert formula.
  </Step>

  <Step title="Write the formula">
    Use a single metric, such as `a`, or combine multiple rows. For example, `(a - timeShift(a, 1 DAY)) / abs(timeShift(a, 1 DAY))` alerts on a daily percentage change.
  </Step>

  <Step title="Choose trigger conditions">
    Select the condition that should trigger the alert, such as an absolute cost threshold, a relative change, a change compared with last week, or a 7-day rolling relative change.

    <Frame caption="Configuring an egress cost alert">
      <img src="https://mintcdn.com/costory/FmAP18mWmbGpXikK/images/alerts-egress-cost-alert.png?fit=max&auto=format&n=FmAP18mWmbGpXikK&q=85&s=e3641306ccd894078adf8cdf68d1821e" alt="Configuring an egress cost alert in Costory" width="1914" height="857" data-path="images/alerts-egress-cost-alert.png" />
    </Frame>
  </Step>

  <Step title="Set the preview and scope">
    Review the preview chart and notification preview. Adjust filters, grouping, selected period, and aggregation until the alert evaluates the right cost surface.
  </Step>

  <Step title="Configure notifications">
    Select where to send alerts (Slack, Microsoft Teams, or email), who should receive them, and the notification frequency.
  </Step>

  <Step title="Save and activate">
    Your alert appears in the summary view and begins evaluating data after the next data refresh.
  </Step>
</Steps>

## Alert types

### Cloud cost alerts

Cloud cost alerts track spending, metrics, or formulas against trigger conditions. The new alert builder has three working areas:

| Area          | What you configure                                                         |
| ------------- | -------------------------------------------------------------------------- |
| Formula       | One or more metric rows and the formula that Costory evaluates             |
| Preview       | Chart and notification preview showing when the alert would have fired     |
| Configuration | Scope, filters, grouping, aggregation, currency, and notification settings |

Trigger conditions cover the most common FinOps alert patterns:

| Condition                         | What it does                                                            |
| --------------------------------- | ----------------------------------------------------------------------- |
| **Absolute cost**                 | Fires when the evaluated value exceeds or drops below a fixed threshold |
| **Relative change**               | Fires when the percentage change exceeds your threshold                 |
| **Change vs last week**           | Compares the current window with the same window in the previous week   |
| **7-day rolling relative change** | Smooths daily volatility before evaluating a percentage change          |

<Frame caption="Threshold mode selector showing absolute and period-over-period options">
  <img src="https://mintcdn.com/costory/FmAP18mWmbGpXikK/images/alerts-threshold-mode-selector.png?fit=max&auto=format&n=FmAP18mWmbGpXikK&q=85&s=efeb77912b496fdbcf3c58af29dda8a2" alt="Alert threshold mode selector showing absolute and period-over-period options" width="668" height="434" data-path="images/alerts-threshold-mode-selector.png" />
</Frame>

For period-over-period modes, Costory compares the current evaluation window against the relevant prior period using the same data delay rules described [below](#how-alerts-are-evaluated).

Multi-threshold severity levels (Info, Warning, Alert) let you escalate notifications based on how far costs have deviated. You can mix absolute and relative thresholds on the same alert, for example an informational notification when weekly spend increases by more than 10% and a warning when it exceeds a hard cap.

Use formulas for Savings Plan coverage ratios, marginal cost limits, cost-per-transaction thresholds, or comparisons between multiple cost queries. See the [example below](#example-savings-plan-coverage-alert) for a walkthrough.

### Budget alerts

Budget alerts track spend against allocated <Tooltip tip="A spending target set for a team, project, or cloud account over a given period." cta="See Glossary" href="/docs/glossary#budget">budgets</Tooltip> with percentage-based triggers. When a team approaches or exceeds its <Tooltip tip="A spending target set for a team, project, or cloud account over a given period." cta="See Glossary" href="/docs/glossary#budget">budget</Tooltip> target, Costory notifies the budget owner and each budget line owner automatically.

Weekly cumulative sums let you track running totals over the current week, so you can catch budget overruns before the month closes.

For a full walkthrough of setting up per-team budgets with automated alerts, see the [Automate Cloud Budgets](/use-cases/automate_budget) guide.

## Example: Savings Plan coverage alert

<Frame caption="Savings Plan coverage ratio alert configured with a custom formula">
  <img src="https://mintcdn.com/costory/0WD1AAdc_uIVll5h/images/savings-plan-coverage-ratio.png?fit=max&auto=format&n=0WD1AAdc_uIVll5h&q=85&s=2fc3d66a458fae4e913ad67048e730d2" alt="Savings Plan coverage alert" width="2464" height="1016" data-path="images/savings-plan-coverage-ratio.png" />
</Frame>

<Tooltip tip="AWS's flexible commitment-based pricing. You commit to a consistent $/hour for 1 or 3 years and get discounted rates." cta="See Glossary" href="/docs/glossary#savings-plans">Savings Plans</Tooltip> reduce your on-demand costs, but only when they actually cover your usage. If coverage drops, you're paying full price for compute that should be discounted. A coverage alert catches this early.

To set one up, create a cost alert with multiple metric rows:

| Row | Metric                      |
| --- | --------------------------- |
| `a` | Savings Plan covered cost   |
| `b` | Savings Plan uncovered cost |

Then add a formula that computes the ratio of covered spend to total eligible spend:

```
a / (a + b)
```

Set a threshold at the coverage percentage you want to maintain (e.g., alert when coverage drops below 80%). Use a 7-day rolling window to smooth out daily fluctuations.

This same approach works for other ratio-based alerts. You can divide infrastructure cost by active user count from an [external usage metric](/setup/usage-metrics/csv) to track marginal cost per user and alert when it rises above a target. Or compare <Tooltip tip="The cost under your negotiated EDP pricing, excluding all Savings Plan discounts and credits." cta="Learn more" href="/docs/savings-plan-cost-fluctuation">Contracted Cost</Tooltip> against on-demand cost to monitor how much your commitments are saving over time.

## Example: multiple cost queries in one formula

Use multiple cost rows when the alert logic compares two scoped views. For example, alert when non-production EC2 spend grows faster than production EC2 spend:

| Row | Query                                      |
| --- | ------------------------------------------ |
| `a` | EC2 cost where `environment = production`  |
| `b` | EC2 cost where `environment != production` |

Formula:

```
b / a
```

Choose **Relative change** or **Absolute cost** depending on whether you care about the ratio movement or a hard ratio limit. The preview panel shows which historical days would have triggered a notification.

## Example: period-over-period cost spike alert

<Frame caption="A weekly cost alert configured to fire when spend increases by more than 15% compared to the previous week">
  <img src="https://mintcdn.com/costory/FmAP18mWmbGpXikK/images/alerts-weekly-cost-spike.png?fit=max&auto=format&n=FmAP18mWmbGpXikK&q=85&s=0e21c7bc32f87a79b759a19e652e99c6" alt="Weekly cost alert set to fire when spend increases by more than 15 percent" width="1915" height="913" data-path="images/alerts-weekly-cost-spike.png" />
</Frame>

A hard spending cap catches runaway costs, but gradual week-over-week increases can slip under a fixed threshold for months. A period-over-period alert catches these trends early.

To set one up, create a cost alert and select a relative change trigger condition. Enter the change limit as a dollar amount or percentage. Choose the evaluation period, and Costory compares each window to the relevant prior period.

For example, to detect a weekly spend increase greater than 15%:

1. Set the mode to **increases by more than**
2. Enter **15** and select **%**
3. Set the evaluation period to **week**

Costory fires the alert whenever the current week's spend exceeds the previous week's by more than 15%. You can add a second threshold at a higher severity for larger swings, such as a warning at 15% and an alert at 30%.

## How alerts are evaluated

Alerts evaluate cost data with a built-in delay to ensure accuracy.

| Parameter            | Value                                                                  |
| -------------------- | ---------------------------------------------------------------------- |
| Evaluation frequency | Every day, or three times a day depending on your plan                 |
| Data delay           | At least 48 hours (cloud providers finalize billing data with a delay) |
| Lookback window      | 4 days                                                                 |

For example, if today is January 15, the alert evaluates spend from January 9 to 13 (a 4-day window, starting 48 hours before today).

<Info>
  Costory does not evaluate the most recent 48 hours because cloud providers (especially AWS) can revise billing data during that window. This avoids false positives from incomplete data.
</Info>

## Managing alerts

From the alerts summary page, you can snooze an alert to temporarily pause notifications during a planned migration or expected cost spike. Snoozed alerts stop sending notifications but continue evaluating in the background, so you can review what happened when you un-snooze. You can also delete an alert you no longer need, which removes the alert and its history permanently.

When an alert fires, the notification you receive in Slack, Teams, or email includes a direct link to <Tooltip tip="Costory's main interface for exploring cloud costs across all connected providers." cta="See Glossary" href="/docs/glossary#cost-explorer">Explorer</Tooltip> pre-filtered to the exact scope of the alert. Click **View in Explorer** to investigate the cost change immediately, without recreating filters manually.

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="How often are alerts evaluated?">
    Costory evaluates alerts every day, or three times a day depending on your plan. Data is checked with at least a 48-hour delay to ensure billing data from your cloud provider is finalized.
  </Accordion>

  <Accordion title="Can I set different severity levels on the same alert?">
    Yes. Cloud cost alerts support multi-threshold severity levels (Info, Warning, Alert), so you can receive an informational notification at one threshold and escalate to a warning or critical alert at a higher one.
  </Accordion>

  <Accordion title="What happens when I snooze an alert?">
    Snoozed alerts stop sending notifications but continue evaluating cost data in the background. When you un-snooze, you can review any threshold breaches that occurred while the alert was paused.
  </Accordion>

  <Accordion title="Can I alert on custom formulas or ratios?">
    Yes. You can define custom formulas using multiple cost or usage metrics available in Costory. Common examples include Savings Plan coverage ratios, marginal cost per user, and cost-per-transaction thresholds.
  </Accordion>

  <Accordion title="Can I mix absolute and relative thresholds on the same alert?">
    Yes. Each threshold row has its own mode, so you can combine an absolute cap (e.g., "is above \$50,000") with a relative change rule (e.g., "increases by more than 20%") on the same alert. The highest-severity breach across all rows determines the notification level.
  </Accordion>

  <Accordion title="Which notification channels does Costory support?">
    Alerts can be delivered to Slack, Microsoft Teams, or email. Each alert notification includes a direct link to [Explorer](/features/cost-explorer) pre-filtered to the scope of the alert.
  </Accordion>
</AccordionGroup>

## Key terms used in this article

* **Lookback window**: The number of days of cost data included in each evaluation. Costory uses a 4-day window, starting at least 48 hours in the past to ensure final cost data is available.
* **<Tooltip tip="Costory reporting fields used to filter, group, allocate, scope, alert, and report on costs." cta="See Glossary" href="/docs/glossary#dimensions">Dimensions</Tooltip>**: Cost groupings that let you scope alerts to teams, products, or environments, regardless of how resources are tagged in the cloud provider.

See the [Glossary](/docs/glossary) for a full list of terms.

## Next Steps

<CardGroup cols={2}>
  <Card title="Automate Cloud Budgets" icon="money-bill-trend-up" href="/use-cases/automate_budget">
    Define per-team budgets and get notified when teams exceed targets
  </Card>

  <Card title="Digest" icon="bolt" href="/features/digest">
    Auto-triage cost anomalies with AI-generated incident reports
  </Card>

  <Card title="Cost Reports" icon="paper-plane" href="/features/slack-reports">
    Send recurring cost snapshots to your team's channels
  </Card>

  <Card title="Explorer" icon="magnifying-glass" href="/features/cost-explorer">
    Drill into specific cost changes with full context
  </Card>

  <Card title="Dimensions" icon="tags" href="/features/tagging/dimensions">
    Create team-level and product-level cost groupings for targeted alerts
  </Card>
</CardGroup>
