Symptom
Spend in a compartment or project clearly passed the budget, but no alert email arrived. Or the budget shows 0 spent while the cost report shows real money. Or the alert arrived a day late.
Budgets fail quietly. Nothing errors; the rule just never matches. Work through the checks below in order.
Set variables first. Budgets always live in the root compartment, so use the tenancy OCID:
export TENANCY=<tenancy-ocid>
Quick map
| Symptom | Likely cause | Fix |
|---|---|---|
| Budget shows 0 spend | Target is the wrong compartment, or a tag that isn't cost-tracking | Point the budget at the right compartment, or mark the tag as cost-tracking |
| Spend is right, no email | No alert rule, wrong --type, threshold too high | Add an ACTUAL rule at a realistic threshold |
| Forecast alert never fires | Less than three days of usage in the period | Wait, or add an ACTUAL rule as well |
| Alert arrives late | Budgets are evaluated periodically, not in real time | Set thresholds lower (for example 50/80/100%) |
| Email sent but not seen | Recipient typo, shared mailbox filtering | Fix recipients; allowlist the sender in your mail system |
| Can't see or create budgets | Missing IAM on the tenancy | Grant usage-budgets in tenancy |
1. Find the budget and check what it targets
List every budget, whatever it targets:
oci budgets budget list --compartment-id $TENANCY --target-type ALL --all \
--query 'data[].{name:"display-name",type:"target-type",targets:targets,amount:amount,actual:"actual-spend",forecast:"forecasted-spend",computed:"time-spend-computed"}' \
--output table
Without --target-type ALL, the list may show only compartment budgets, and a tag budget looks "missing".
Check three things:
- targets: for a
COMPARTMENTbudget this is a compartment OCID. Spend in child compartments counts toward the parent, but spend in a sibling compartment does not. Confirm the OCID is the compartment that actually holds the resources. - actual-spend: if this is 0 or far below the cost report, the target is wrong.
- time-spend-computed: when spend was last calculated. If it's old, the budget hasn't been evaluated yet since the spike.
Tip
Each compartment can have only one budget, and each tag value only one budget. If you can't create a budget, someone may already have one on that target; search the list for the OCID or tag.
2. Tag budgets: the tag must be cost-tracking
A tag budget target has the form namespace.key.value and only counts spend from resources carrying that tag, and only if the tag key is marked as a cost-tracking tag.
Check the tag:
oci iam tag-namespace list --compartment-id $TENANCY --all \
--query 'data[].{name:name,id:id}' --output table
oci iam tag get --tag-namespace-id <namespace-ocid> --tag-name CostCenter \
--query 'data.{name:name,"cost-tracking":"is-cost-tracking",retired:"is-retired"}'
If is-cost-tracking is false, turn it on:
oci iam tag update --tag-namespace-id <namespace-ocid> --tag-name CostCenter \
--is-cost-tracking true
Two more things break tag budgets:
- Untagged resources. Spend from resources without the tag never reaches the budget. Use OCI Search to list what does carry the tag, then compare it with what's in the project's compartments:
oci search resource structured-search --query-text \
"query all resources where (definedTags.namespace = 'Finance' && definedTags.key = 'CostCenter' && definedTags.value = 'prod')" \
--query 'data.items[].{type:"resource-type",name:"display-name",compartment:"compartment-id"}' --output table
- Value mismatch.
Finance.CostCenter.prodandFinance.CostCenter.Prodare different targets. Use tag defaults or a list-type tag with fixed values so people can't type variants.
Tagging is not retroactive. Spend from before the tag was applied, or before it was marked cost-tracking, doesn't move into the budget later.
3. Check the alert rules
A budget with no alert rule only shows a number in the Console. List its rules:
oci budgets alert-rule list --budget-id <budget-ocid> --all \
--query 'data[].{name:"display-name",type:type,threshold:threshold,ttype:"threshold-type",recipients:recipients,state:"lifecycle-state"}' \
--output table
Look for:
- type:
ACTUALfires on real spend.FORECASTfires on predicted end-of-period spend, and needs at least three days of usage in the period before it can trigger. A budget with only a forecast rule stays silent early in the month and after a budget is created. - threshold-type:
PERCENTAGEof the budget amount, orABSOLUTEin your billing currency. A threshold of100with typeABSOLUTEmeans 100 currency units, not 100%. - recipients: an empty value means nobody is emailed.
Add a sensible set of rules:
for t in 50 80 100; do
oci budgets alert-rule create --budget-id <budget-ocid> \
--type ACTUAL --threshold $t --threshold-type PERCENTAGE \
--display-name "actual-$t-pct" \
--recipients "cloud-cost@example.com,platform-oncall@example.com" \
--message "Actual spend passed $t% of budget. Check the cost report by compartment and service."
done
oci budgets alert-rule create --budget-id <budget-ocid> \
--type FORECAST --threshold 100 --threshold-type PERCENTAGE \
--display-name "forecast-100-pct" \
--recipients "cloud-cost@example.com"
Recipients can be separated by commas, spaces, tabs or semicolons.
4. Timing: budgets are not real-time alarms
Oracle's documentation states budget alerts are evaluated periodically, every 24 hours, and usage data itself arrives with a delay. A runaway workload can burn a day or more of spend before the email lands.
Warning
Don't rely on a budget to stop a cost incident. Budgets notify; they don't stop resources. For hard limits use compartment quotas, and for fast detection use Monitoring alarms on the metrics that drive cost (instance count, OCPUs, Object Storage bytes, egress).
Compare time-spend-computed with the time the spike started. If the budget hasn't been recomputed yet, the alert simply hasn't run.
5. Recipients and mail delivery
If the rule exists and the threshold was crossed:
- Check the recipient addresses for typos and trailing characters copied from chat tools.
- Ask the mail team to search quarantine and transport rules for the alert. Shared mailboxes and distribution lists that block external senders are a common cause.
- Prefer a distribution list over named people, so alerts survive staff changes.
6. IAM: who can see and manage budgets
If a user can't see the budget at all, they need permission on the tenancy, because budgets live in the root compartment:
Allow group CostAdmins to manage usage-budgets in tenancy
Allow group CostViewers to read usage-budgets in tenancy
Check with your tenancy admin before granting manage; anyone with it can delete alert rules for every team.
Prevent it next time
- Create budgets with the CLI or Terraform from a template that always includes 50/80/100%
ACTUALrules and a 100%FORECASTrule. - Monthly, run the list command from step 1 and look for budgets with 0 spend or no rules.
- Make cost tags cost-tracking at creation time, and use tag defaults on each project compartment so new resources are tagged automatically.
- Pair each budget with compartment quotas so a runaway job has a ceiling.
- Test the path once: create a temporary budget with a tiny amount on a sandbox compartment, wait for the next evaluation and confirm the email arrives.
Get the weekly HubDatAI email
One email a week with everything new: posts, learning sessions and videos. Free, no spam, unsubscribe in one click. What you get