Resource Monitors & Budgets
Snowflake · Cost Management & Monitoring
Theory
A resource monitor tracks credits used by warehouses over an interval (daily, weekly, monthly, yearly or never) against a credit quota, and fires triggers at percentages you choose. Each trigger can NOTIFY, SUSPEND (stop the warehouse after running queries finish) or SUSPEND_IMMEDIATE (stop and cancel running queries). A monitor can be set for the whole account or assigned to specific warehouses, and each warehouse can have only one monitor.
Resource monitors only cover user-managed warehouses, not serverless features. Budgets complement them: a budget tracks spend for the account or a group of objects, including serverless usage, and sends notifications when projected spend exceeds the limit.
Why we use it
One runaway query, a warehouse with no auto-suspend or a bad loop can burn credits fast. Monitors and budgets catch this automatically, before the end-of-month bill does.
When to use it
Create monitors with notify triggers early (50 to 75%) and suspend triggers near the quota on every important warehouse, plus an account-level monitor as a backstop. Use budgets to watch serverless and whole-account spend.
Setting Thresholds
You define one or more percentage thresholds (e.g. 75% notify, 100% suspend) against a credit quota, and assign the monitor to one or more warehouses.
Suspend vs Suspend Immediately
A plain suspend lets already-running queries finish before stopping the warehouse; suspend immediately cancels queries in flight too — the harder stop for a hard budget ceiling.
Budgets for Account-Wide Spend
Where resource monitors watch warehouses, Budgets track and alert on spend across the whole account or a custom group of objects, including serverless features and AI services. Both live in Snowsight under Admin → Cost management.
How it works
- Warehouses consume credits
- Monitor compares usage with the quota
- Has a trigger percentage been reached? Yes: Run its action: notify, suspend or suspend immediately. No: Keep monitoring.
- Quota resets at the start of the next interval
- Review and adjust quotas regularly
Example
CREATE OR REPLACE RESOURCE MONITOR account_budget
WITH CREDIT_QUOTA = 2000 FREQUENCY = MONTHLY START_TIMESTAMP = IMMEDIATELY
TRIGGERS
ON 50 PERCENT DO NOTIFY
ON 75 PERCENT DO NOTIFY
ON 90 PERCENT DO SUSPEND
ON 100 PERCENT DO SUSPEND_IMMEDIATE;
ALTER ACCOUNT SET RESOURCE_MONITOR = account_budget;
SHOW RESOURCE MONITORS;Key points
- Resource monitors act automatically at credit thresholds you set
- SUSPEND lets running queries finish; SUSPEND_IMMEDIATE cancels them
- Monitors cover warehouses only, not serverless features
- Each warehouse can be assigned only one resource monitor
- Budgets track account or object-group spend including serverless