Skip to main content

Budget alerts

A budget alert is a USD threshold for a scope over a rolling window of 7, 30 or 90 days. The status is computed live from the data every time the dashboard loads, so there is nothing to schedule.

StatusMeaning
OKSpend in the window is below the threshold
WarningSpend has reached 80 % of the threshold
Over budgetSpend has exceeded the threshold

Scopes​

  • Total spend of the whole instance.
  • One dimension value: in the dashboard an issue, actor, provider, model, source or repository. Via the API additionally a project (project: PLAT), an actor type (human or agent), any custom metadata key, and the "None" bucket (omit value), for example "No issue".

Create an alert​

In the dashboard, open the Budget alerts card and add a scope, threshold and window (the name is optional). Admins manage alerts; viewers see them. Or use the API with a signed-in session:

curl -X POST https://costpilot.example.com/api/alerts \
-H 'Cookie: <session cookie>' \
-H 'Content-Type: application/json' \
-d '{"name":"Platform squad, monthly","dimension":"project","value":"PLAT","thresholdUsd":1500,"days":30}'

Leave dimension and value out for a total-spend alert. Alerts are listed with GET /api/alerts and removed with DELETE /api/alerts/:id. See the API reference.

Notifications​

Alerts are shown in the dashboard. There is no outbound notification (Slack, email) yet; poll GET /api/alerts from your own automation if you need one.