DEVOPS

Page on-call when BigQuery daily spend breaches the budget

Polls BigQuery job costs on a schedule, and when cumulative daily bytes billed crosses the budget it pages PagerDuty and posts the top contributors to Slack.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerFrequent schedule (e.g. every 30 min)
  • ActionSum today's bytes billed across jobsGoogle BigQueryBigQuery
  • LogicCompare running spend to daily budget
  • ActionOpen PagerDuty incident on breachPagerDutyPagerDuty
  • OutputPost top contributors to SlackSlack

What it does

It watches running spend, not individual queries. On a regular schedule it sums today's bytes billed across all BigQuery jobs, and when the cumulative total crosses your daily budget it fires a PagerDuty incident and posts the queries driving the breach to Slack so on-call can react immediately.

When to use it

Use it when a runaway backfill or a broken scheduled query can burn a day's budget in an hour and you need a real-time alarm, not a next-morning report. It protects against acute cost spikes rather than slow drift.

How it works

  1. 1A frequent schedule triggers the flow throughout the day.
  2. 2A BigQuery query sums today's bytes billed across all jobs.
  3. 3A logic step compares the running total to the daily budget.
  4. 4If breached, a PagerDuty incident is opened with the current spend and threshold.
  5. 5The top contributing queries are posted to Slack so on-call can identify and stop the culprit.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect BigQueryDatasets, queries, schemas.
  2. 2
    Connect PagerDutyIncidents, on-call, escalations.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.