How-to guide

Set budgets and cost anomaly alerts on Google Cloud

Learn to set Google Cloud budgets and cost anomaly alerts, route them to the right people, and tune them so real spikes get noticed.

By the Cloudverg engineering team · · 7 min read

Why this matters

Your Google Cloud bill can jump for plain reasons: someone leaves a large VM running over the weekend, a data transfer job runs more often than planned, or a new service gets switched on without a cap. Budgets and anomaly alerts are the two signals that catch this. A budget tracks spend against a number you set. An anomaly alert watches for a sudden change in the shape of your spend, even when you are still under budget.

They do different jobs, so run both. A budget tells you that you have crossed a line. It is slow and predictable, and it fires whether the month is busy or quiet. An anomaly alert tells you that something changed this week. It reacts to the movement in your bill, not to the total. A quiet account can still have a spike that matters.

The setup is small: a budget per project or folder, a billing account, a notification channel, and a look at how alerts reach people. Most of the work is deciding the numbers and keeping the alert list honest. Do that once and the rest is maintenance.

Before you start

You need the Billing Account Administrator role on the Cloud Billing account, or someone who has it. Budgets live on the billing account, not on a project, so project-level access is not enough to create them. You also want a project to hold the notification plumbing: a Pub/Sub topic, a Cloud Function or Cloud Run service if you plan to send alerts to chat, and the service accounts that run them.

Decide who gets the email. A budget can send to up to five email recipients, and those can be Google Groups. Use groups so people can join and leave without touching the budget. Pick a group that people actually read, not a shared inbox nobody checks.

Check that Project Owner and Billing Account Administrator are granted to few people. Those roles can change budgets and turn off billing. Nothing in an alert will stop spend on its own unless you build that, so the access list is the real control.

Finally, agree on a baseline. Pull the last few months of spend per project from the Billing reports page, or export billing data to BigQuery if you want more control. You need a number that reflects normal use before you can tell what counts as a spike.

How to do it

Start with budgets at the level where people can act. One budget per project is easy to explain and easy to assign. If you have many small projects, budgets on folders work too, but remember that a folder budget can hide which project caused a jump. A mixed approach is fine: tight budgets on big projects, one folder budget for a group of small ones.

Set the budget amount slightly above expected spend, not at it. If a project normally runs near a number, a budget at that number will fire every month and people will ignore it. Give room for normal variation. Then add thresholds at percentages of the budget, for example 50, 90 and 100, and think about which ones actually need an email.

Anomaly alerts are separate and live in the same console area. Turn on the alert, set the notification channel, and let it learn. The model needs history before it can flag a change, so give it a couple of weeks before you judge it. You can scope anomaly alerts to a project, folder or the whole billing account.

Route the messages somewhere people look. Email is fine for budgets. For anomalies, a Pub/Sub topic that feeds a chat channel or a ticket queue gets faster attention. Keep the plumbing in one project and label it clearly so the next person can find it.

  1. Pick the scope. Choose which projects or folders get their own budget. Prefer the projects that carry most of the spend and that have a clear owner.
  2. Create the budget. In Billing, open Budgets and alerts and create a budget. Set the amount from your baseline with some room above normal spend, and name it after the project or team.
  3. Set thresholds. Add thresholds at percentages of the budget, such as 50, 90 and 100. Send the high ones to a group that acts on them and keep the low ones quiet if nobody needs them.
  4. Add recipients. Enter up to five email recipients or Google Groups for each budget. Use groups so membership can change without editing the budget.
  5. Turn on anomaly alerts. Enable cost anomaly alerts for the billing account and scope them to the projects or folders you care about. Give the model a couple of weeks of history before judging the results.
  6. Route the messages. For faster delivery, point anomaly alerts at a Pub/Sub topic and forward them to chat or a ticket queue with a small function. Keep that plumbing in one clearly named project.
  7. Test the path. Create a temporary budget with a low amount on a test project to see the email. Send a test message to the topic to confirm your subscriber receives it.
  8. Review after a month. Read the budget list and the alert history. Raise amounts that fire too often, add projects with no budget, and remove recipients who no longer need the mail.

How to check it worked

Open the budget and confirm the scope, amount, thresholds and recipients. Then wait for a threshold to cross or force a small test by setting a temporary budget with a low amount on a test project. A test budget on a project you control is the fastest way to see the email arrive and to check the subject line and body.

For anomaly alerts, check that the alert is enabled and that the notification channel resolves. Send a test message to the topic with the Pub/Sub console and confirm your function or subscriber receives it. If you send to chat, check the message shows the project and the amount.

After the first month, open the budget list and read it. Are half the budgets firing every month? Raise those amounts or narrow the scope. Are some projects missing a budget? Add them. This review takes a few minutes and keeps the signal useful.

Also confirm that the people named as recipients still exist and that the groups are current. An alert that goes to two people who left the company is worse than no alert, because it feels covered.

Mistakes to avoid

The common failure is too many budgets with tight amounts. Every one fires, the group gets a dozen emails, and people set a filter. Start with the few projects that carry most of the spend and add more only when the first set is quiet enough to trust.

Another mistake is setting the budget at last month's bill. Spend moves, so a budget pinned to a single month will be wrong within weeks. Base it on a range and revisit it when workloads change.

Do not rely on alerts to stop anything. Budget alerts are notifications. If you want a hard stop, that is a separate design with quotas and policy, and it needs care because it can break production. Keep that discussion explicit rather than assuming the budget does it.

Finally, do not let the person who set the alerts be the only one who knows how. Write down the budget names, the groups, the Pub/Sub topic and the function that delivers messages. A short note in the repo or a runbook entry is enough. If you want an outside read on where spend is going and how the alerts are wired, a fixed-scope review such as the Cloud cost audit from Cloudverg at $4,500/month is one option among others.

Frequently asked questions

Do Google Cloud budget alerts stop spending?

No. Budget alerts are notifications only. To stop or limit spend you need quotas, policy controls or disabling billing, and each has trade-offs because it can break running workloads. Treat budgets as a signal, not a brake.

What is the difference between a budget alert and a cost anomaly alert?

A budget compares total spend to a number you set and fires when you cross a threshold. An anomaly alert looks for an unusual change in spend over time, so it can catch a spike even when you are under budget. Run both, because they catch different problems.

How many email recipients can a budget have?

A budget can send to up to five email addresses or Google Groups. Groups are the better choice because you can change membership without editing the budget. Make sure the group is one people actually read.

Why does my anomaly alert not fire at all?

The model needs history before it can flag a change, so new billing accounts and new projects take time. Check that the alert is enabled and scoped to the right project or folder. Then confirm the notification channel reaches your subscriber.

Monthly plan

Want help with this? Cloud cost audit

$4,500/month

2 weeks · Starts within 10 business days

A two-week, read-only review of your AWS, Azure, Google Cloud or Oracle bill, with every saving ranked by dollars per month.

Renews monthly. Cancel any time.
What is included

Related guides

More cloud costs guides   Cloud cost audit

Smallest way to start

Get a senior architect on your problem this week

Ninety minutes a month on the cloud, AI or security question that is blocking you, a pre-read of your material and a written summary within two business days.

$450/month

Renews monthly. Cancel any time.