Assign Budget Alerts to a Subscription in Azure

Objective

Conceptual Overview

As an SRE (Site Reliability Engineer), managing and optimizing cloud spend is just as important as ensuring reliability and performance. Azure Budgets help you stay within cost limits by setting thresholds and generating alerts when costs approach or exceed a set budget.

Example Scenario: Your organization’s Azure subscription has a monthly budget of $500. As an SRE, you need to:

Pre-Requisites

Step 1: Navigate to Cost Management + Billing

  1. Sign in to the Azure Portal.
  2. In the search bar, type “Cost Management + Billing” and open it.
  3. Select Budgets under the Cost Management section.

Step 2: Create a Budget

  1. Click + Add to create a new budget.
  2. Choose the Subscription scope (you can also select a Resource Group later).
  3. Enter the following details:
    • Name: SRE-Monthly-Budget
    • Reset Period: Monthly
    • Start Date: Today’s date
    • End Date: 12 months from now
    • Budget Amount: 500 USD
  4. Click Next to define alert conditions.

Step 3: Configure Budget Alerts

  1. Set alert conditions for:
    • 80% of budget: To warn before hitting the limit.
    • 100% of budget: To indicate overspending.
  2. Under Alert Recipients, enter your email or the SRE team’s distribution list.
  3. (Optional) Link to an Azure Action Group to trigger automation — such as:
    • Sending alerts to Microsoft Teams or Slack.
    • Invoking an Azure Function that auto-scales down resources.

Step 4: Review and Create

  1. Review all configurations.
  2. Click Create to deploy the budget and alert configuration.
  3. Once created, Azure will automatically track and send notifications when thresholds are met.

Step 5: Verify Alert Trigger (Simulation)

You can simulate spending to test the alert by:

Optional Automation (Advanced)

To integrate with an SRE workflow:

  1. Create an Action Group in Azure Monitor that sends a webhook to a monitoring system (e.g., PagerDuty or Grafana OnCall).
  2. Attach that Action Group to your budget alert for automated incident tracking.

Questions

Note: A reference script is given in the Sample ProjectsFiles -> scripts folder create_azure_budget_alert.sh

💬
AI Learning Assistant