Budgets
Set spending targets, track progress with daily-rate forecasting, and get alerted before you overspend.
Creating a budget#
Create budgets from the Analytics page (Budget Section) or from the budget endpoints. Each budget has:
- ✓Name — descriptive label (e.g., 'Azure Production Monthly')
- ✓Amount — the spending target in dollars
- ✓Period — monthly, quarterly, or yearly
- ✓Scope — all subscriptions, a specific provider, or a specific subscription
- ✓Service filter (optional) — limit to a specific service (e.g., 'Microsoft.Compute')
- ✓Alert thresholds — warning (default 80%) and critical (default 100%)
- ✓Email notifications — toggle + recipient list
How spend is calculated#
Budget spend uses the cost resolver (same data source as the Dashboard and Analytics). For the current month, this means Redis-cached cost data refreshed every 4 hours. For past periods, it reads from PostgreSQL.
Forecasting#
CCO forecasts month-end spend using a simple daily run-rate:
This forecast drives two additional alert levels: forecast_warning and forecast_critical. These trigger when the projected month-end spend would exceed your thresholds — even if actual spend hasn't crossed them yet.
Where budgets appear#
- ✓Dashboard — Budget Tracking section with progress bars and breach dates
- ✓Analytics — Budget Section adapts to your scope selection
- ✓Analytics charts — dashed purple budget reference line on cost history
- ✓Alerts — budget threshold breaches create Alert records
- ✓Reports — Full Report includes Budget Status section
- ✓AI Assistant — budget status is available via natural language queries
Budget alerts#
A Celery Beat task checks budgets every 4 hours. It creates Alert records (type = budget) when:
- ✓Actual spend crosses the warning threshold (e.g., 80%)
- ✓Actual spend crosses the critical threshold (e.g., 100%)
- ✓Forecasted month-end spend would cross the warning threshold
- ✓Forecasted month-end spend would cross the critical threshold
Budget alerts have a 24-hour cooldown to prevent duplicate notifications. They appear on the Alerts page with a purple type badge.