Monitoring budgets and reports
Where budget alerts, action proposals and monthly reports show up, how to route budget alerts with an event rule, and how to tell whether a mail went out.
Budget alerts
A budget alert is recorded whether or not it is mailed. The Budgets page lists this period's alerts under "Fired this period", each with the time and who it reached:
| Shown | Meaning |
|---|---|
| "emailed to …" | The mail went to every address on the budget |
| "shown here only (the budget has no e-mail addresses)" | The alert fired, and the budget has no addresses |
| "email … failed" | Sending failed; hover over the line for the reason |
Over the API, GET /billing/api/budgets/status returns each budget's alerts of this period.
Budget alerts as events
Every new alert, actual or forecast, is also an event on the organization's default event bus:
| Field | Value |
|---|---|
source |
ews.billing |
detail-type |
Budget Threshold Crossed |
detail |
budgetId, budgetName, kind (actual or forecast), thresholdPercent, spend, forecast, amount, percent, currency, period, periodStart, periodEnd, scope, consoleUrl |
The event is delivered only where an event rule on the default bus matches it; write a rule that sends it to a queue, a function or an HTTPS endpoint (see Events).
Action proposals
A proposal of a budget with an action is mailed to the budget's notification addresses and listed on Budgets under Proposed by budgets (see Let a budget propose stopping resources).
Monthly reports
Reports & DATEV shows, after "Sent:", the last six months the cost report went out for, each
with the total and its status: "sent", "no recipients" or "failed". GET /billing/api/cost-report
returns the list with the status (sent, no_recipients or failed) and the error of a failed
send; it holds the 24 oldest months sent (see
Get the monthly cost report).