Create budgets and threshold alerts
Set a monthly, quarterly, or annual spend limit for a project or subscription, get alerts at chosen percentages, and read budget statuses.
A budget sets a spend limit for a project or a subscription over a month, a quarter, or a year. It alerts its recipient when spend reaches the percentages of the limit that you choose, and when the forecast reaches the limit.
Before you begin
- To create, edit, or delete a budget, you need the Owner or Billing Operator role, or a custom role with Manage access to Budgets and to Billing & Cost. With the role on the subscription, you manage all of its budgets. With the role on one project only, you can create and manage budgets for that project only.
- The create form picks the alert recipient from the project's notification channels. Add the email address or webhook first. See Send alerts by email and webhook. With the Billing Operator role, you also need Read access to Observability, for example with the Reader role, so that the form can list the channels.
- With Read access to Budgets and to Billing & Cost, as with the Contributor or Reader role, you can view budgets but not change them.
Budgets are evaluated in US dollars
Enter the limit in US dollars
Budgets are evaluated in US dollars, whatever your subscription's currency. Enter the limit in USD and read budget amounts as USD, even where the console shows your subscription's currency symbol.
Create a budget
In the console, go to BillingBudgets, and select Create budget.
Enter a Budget name.
In Scope, select the project, the subscription, or the tenant. See What a budget measures.
In Reset period, select Monthly, Quarterly, or Annual.
Enter the limit amount. See Budgets are evaluated in US dollars.
Under Alert thresholds (% of limit), select the percentages to be alerted at. To add another one, type it, and select Add.
In Alert channel, select the notification channel to alert.
Select Create budget.
| Field | Rules |
|---|---|
| Budget name | 1–255 characters. Alerts name the budget, so a name that says what it covers helps the recipient. |
| Reset period | Calendar months, quarters, or years in UTC. Spend starts again from zero at each new period. The default is Monthly. |
| Limit amount (TRY) | More than 0. Enter the amount in US dollars. |
| Alert thresholds (% of limit) | At least one. Whole percentages from 1 to 500, so you can also be alerted above the limit. The default is 50 %, 80 %, and 100 %. |
| Alert channel | One email or webhook channel of the project. |
What a budget measures
| Scope | Spend that counts |
|---|---|
| Project · web-platform | The usage of the project. |
| Subscription · Production | The usage of the whole subscription. |
| Tenant · Acme | The usage of the subscription that you create the budget in, the same as a subscription budget. Other subscriptions of the tenant don't count. |
A budget counts all usage of its scope. You can't narrow it to a service or a tag. To follow the spend of a tag, group Cost Explorer by that tag. See Analyze spend with Cost Explorer.
Spend is the usage of the period priced at the rates that applied, including the discounts of Savings Plans and Reserved Instances, before taxes and credits. It's the same spend that Cost Explorer shows, in US dollars.
How budget alerts work
When you save a budget, the platform creates its alert rules: one for each threshold on the spend, and one for the forecast at 100 % of the limit. The platform evaluates them in the same cycle as alert rules, which the platform operator sets.
| Alert | Fires when | Resolves when |
|---|---|---|
| Spend at a threshold | The period's spend reaches the threshold's percentage of the limit. | The period ends, or the spend falls below the threshold, for example after you raise the limit. |
| Forecast at 100 % | The period's forecast reaches the limit. It isn't evaluated in the first 24 hours of a period. | The forecast drops below the limit, or the period ends. |
Each alert notifies its recipient once when it fires and once when it resolves, so you get one alert per threshold per period. Users who can read the budget also see these alerts in the console's notification feed. An alert notification names the budget and the threshold, for example Production monthly cap - 80% spent.
The forecast. The spend of the period's completed hours, extended in a straight line to the end of the period, and never less than the spend so far. For example, with 300 spent in the first 10 days of a 30-day month, the forecast is 900.
The recipient. The budget doesn't send through the channel that you selected, but through a channel of its own to the same address or URL, marked Managed by a budget:
- An email address that doesn't belong to an active user of your organization gets its own confirmation email, even when the channel that you selected is verified. Until the recipient confirms it, the budget's alerts are skipped.
- A webhook gets its own signing secret. To read it, rotate the secret in the budget's Edit dialog. See Edit or delete a budget.
You can't change these alert rules or this channel directly: they follow the budget's thresholds and recipient.
Read the budget list
BillingBudgets lists each budget with its scope and these columns:
| Column | Shows |
|---|---|
| Spent / Limit | The current period's spend, and the limit. |
| Progress | The spend as a share of the limit, with marks at the thresholds. |
| Forecast | The forecast for the current period, and its share of the limit. |
| Trend | The spend of the last 6 periods, including the current one. |
| Status | The status, and the number of the budget's alerts that are firing. |
The status depends only on the actual spend:
| Status | Meaning |
|---|---|
| On track | The spend hasn't reached the lowest threshold. |
| Breached | The spend has reached the lowest threshold, for example 50 % with the default thresholds. The limit itself isn't necessarily reached. |
The forecast doesn't change the status. A budget whose forecast has reached the limit shows On track and 1 alert firing as long as its spend is below the lowest threshold.
Under the status, Alerts not delivered means that the last delivery to the recipient failed.
Edit or delete a budget
To edit a budget, select Edit in its row, change the fields, and select Save changes. In this dialog, you type the recipient's email address or webhook URL directly, and you turn the 50, 75, 80, 90, and 100 % thresholds on or off. Thresholds that you typed when you created the budget aren't shown in the dialog, and they stay as they are. The dialog also shows:
- whether the alerts reach the recipient, and why the last delivery failed;
- for an email recipient that hasn't confirmed yet, Resend verification email;
- for a webhook, Rotate signing secret. The new secret is shown once, and the previous one stops working at once;
- the budget's Alert rules and their states.
Anyone who can view a budget can open this dialog. Only a role that can manage budgets can save it, or use Resend verification email and Rotate signing secret. See Before you begin.
To delete a budget, select Delete in its row, and confirm with Delete budget. Its spend tracking and its alerts stop. You can't undo the deletion.
Result
The budget appears in the list with the spend of its current period. The platform creates its alert rules in the next evaluation cycle.
Troubleshooting
| Message | Cause | Resolution |
|---|---|---|
| This project has no notification channel yet. | The project has no notification channel. | Select Manage notification channels, and add one. |
| Notification channels could not be loaded, so no recipient can be selected. | Your role can't read the project's notification channels. | Ask for a role with Read access to Observability, such as Reader. |
| Enter an https URL without a username or password that points to a public host. | The webhook URL isn't an HTTPS URL, contains a user name or password, or points to a non-public IP address. | Use a public HTTPS URL. |
| Alerts are held until the recipient confirms the verification email. | The email recipient hasn't confirmed the budget's confirmation email. | Ask the recipient to confirm, or select Resend verification email. |
| The verification link expired before the recipient confirmed it; alerts are not sent to it. | The confirmation link is older than 7 days. | Select Resend verification email. |
| Alerts for this budget are not being delivered | The recipient refused or didn't answer the last alert. | Check the reason in the Edit dialog. For the reasons, see Troubleshooting. |
| Couldn’t load budgets | The billing service didn't return the budgets. | Try again shortly. |
Related
- Analyze spend with Cost Explorer
- Detect cost anomalies
- Send alerts by email and webhook
- To manage budgets through the REST API, see POST
/scopes/{scopeId}/billing/budgets.