LAB 65 ‐ Budget - DevWithNehaCloud/Oracle-Cloud-Infrastructure-wiki GitHub Wiki
Oracle Cloud Infrastructure (OCI) Budgets and Cost Management
1. Overview
OCI Budgets is a governance tool used to track and manage cloud spending across compartments or specific resources tagged with cost-tracking tags. It helps organizations and cloud engineers monitor their monthly spend, prevent accidental billing spikes, and receive proactive threshold-based email alerts.
Key Concepts
- Budget Scope: The scope defines where the budget applies. It can be targeted to an entire Tenancy (Root Compartment), a specific child compartment, or filtered by Cost-Tracking Tags.
- Monthly Reset: Budgets operate on a monthly recurring cycle and reset automatically on the specified day of each month.
- Alert Rules: Automated triggers linked to the budget that evaluate spending against defined thresholds and send notifications to email recipients.
- Threshold Metrics:
- Actual Spend: Alerts trigger when real-time, accrued spending reaches or exceeds the threshold.
- Forecasted Spend: Alerts trigger when OCI's predictive algorithms estimate that the monthly budget will exceed the threshold based on historical trends.
2. Key Benefits of OCI Budgets
- 100% Free of Charge: Creating and maintaining budgets and alert rules does not incur any cloud cost.
- Proactive Protection: Immediate notification ensures orphan resources (unattached storage, running compute instances, unassigned IPs) are detected before causing large invoices.
- Multi-Tiered Alerting: Multiple alert rules can be configured on a single budget (e.g., 50%, 80%, 100% threshold limits).
3. Step-by-Step Implementation Guide
Step 1: Navigate to Budgets
- Log in to the OCI Console.
- Open the Navigation Menu (top-left corner).
- Scroll to Billing & Cost Management and select Budgets.
Step 2: Configure Budget Parameters
- Click the Create Budget button.
- In the configuration window, provide the following details:
- Name: Specify a descriptive name (e.g.,
Zero-Spend-AlertorMonthly-Lab-Budget). - Description: Add contextual notes for tracking purpose.
- Budget Scope: Select Compartment (choose the Root Compartment to track tenancy-wide expenses) or Cost-Tracking Tag.
- Budget Amount: Enter the maximum spending limit in your account currency (e.g.,
0.10or1.00SGD for near-zero spend tracking). - Budget Start Day: Select the monthly reset day (typically day
1of the month).
- Name: Specify a descriptive name (e.g.,
Step 3: Configure Alert Rules and Notifications
- Under the Alert Rules section:
- Metric: Select Actual Spend (avoids premature triggers from predictive spikes).
- Threshold Type: Select Percentage of Budget (set to
100%) or specify an Absolute Amount. - Email Recipients: Enter one or more valid email addresses (comma-separated) to receive alerts.
- Email Message (Optional): Enter a custom notification message with actionable remediation steps.
- Click Create Budget at the bottom to finalize.
Step 4: Verification
- Verify that the budget appears in the Budgets List with the status Active.
- Confirm the displayed values for Current Spend, Budget Amount, and Forecasted Spend.
- Check the linked Alert Rules tab within the budget details page to ensure triggers are properly registered.