---
title: Cost Guards
slug: cost-guards
docTags: 
createdAt: 2026-01-30T18:50:24.236Z
---

Cost Guards are alerts that help you monitor **usage and spend** and take action before things get out of control.

They are typically used to track activity at the **workload level**, allowing you to detect:

- Unexpected spikes in cost
- Unusual drops in usage (potential outages)
- Sustained increases over time

## What is a Cost Guard?

A Cost Guard is a rule that watches usage or cost over a rolling time window and triggers an alert when a condition is met.

Examples:

- Spend **greater than $1,000 in the last 7 days**
- Usage **greater than 10,000 requests in the last hour**
- Spend **less than $10 in the last day** (possible outage signal)

Cost Guards are tied to **workloads**, so you can monitor specific parts of your system independently.

## Cost Guards Page Overview

Navigate to **Cost → Cost Guards**.

### What You’ll See

Each Cost Guard in the list includes:

- **Name**
- **Alert Type** (Cost or Usage)
- **Rule** (condition and threshold)
- **Workload**
- **Status** (On or Off)

You can toggle a Cost Guard off if you want to temporarily pause alerts without deleting it.

## Creating a Cost Guard

### Navigate

- Go to **Cost → Cost Guards**
- Click **Create Cost Guard** (top right)

### Step 1: Define the Alert

- **Alert Type**
  Choose:
  - **Cost** (monitors spend), or
  - **Usage** (monitors raw usage volume)
- **Name**
  Use a clear, descriptive name
  Example: Image Pipeline Spend Spike
- **Description (optional)**
  Add context if needed

### Step 2: Select a Workload

- Choose the workload you want to monitor

If the workload does not exist:

- Create one using the **Workloads** page

Cost Guards operate at the workload level, so this selection is required.

### Step 3: Define the Rule

**Condition**

Choose whether the alert triggers when the value is:

- **Greater than** (most common, for detecting spikes)
- **Less than** (useful for detecting drops or outages)

**Threshold Value**

- For cost: enter a **currency amount**
- For usage: enter a **unit value**

**Time Window**

Select a rolling window:

- Last hour
- Last day
- Last week (7 days)
- Last month (30 days)

These are always rolling periods, not fixed calendar intervals.

### Step 4: Configure Notification Frequency

Choose how often alerts are sent:

- **Once**
  Trigger only the first time the condition is met
- **Every time**
  Trigger on every evaluation that meets the condition
- **At most every X hours**
  Throttle notifications to a maximum frequency
  Example: no more than once every 24 hours

This helps reduce alert noise while still keeping visibility.

### Step 5: Choose Notification Channels

Define how alerts are delivered.

**Email**

- Send notifications via email
- Can be used for individuals or workload owners

**Webhooks**

- Send alerts to an external system
- Useful for automation, such as:
  - Triggering workflows
  - Updating internal systems
  - Integrating with monitoring or incident tools

### Save the Cost Guard

Click **Save** to activate the Cost Guard.

It will immediately begin monitoring based on your configuration.

## When to Use Cost Guards

Cost Guards are most effective when applied to:

- High-cost workloads
- Critical production systems
- Newly launched features with uncertain usage patterns
- Systems where unexpected drops indicate issues

They are often used by engineering and operations teams to maintain control over system behavior.

## Summary

Cost Guards provide a simple way to monitor and control usage and spend.

They:

- Track cost or usage over time
- Trigger alerts based on thresholds
- Operate at the workload level
- Support flexible notification options

Used correctly, they help you detect problems early and maintain control over your system’s behavior.
