⏱ Resource Monitors in Snowflake
Track Warehouse Credit Usage & Prevent Cost Overruns
Resource Monitors help you control your Snowflake compute spend by monitoring how many credits your Virtual Warehouses consume.
They are most useful for:
- Preventing unexpected high bills
- Controlling warehouse usage for teams or projects
- Automatically suspending warehouses when limits are hit
- Sending alerts before limits exceed
1. What Exactly Is a Resource Monitor?
A Resource Monitor (RM) is a Snowflake object that tracks credit consumption of one or more Virtual Warehouses.
It allows you to:
✔ Set a monthly/weekly/daily credit quota ✔ Define actions Snowflake should take when thresholds are reached ✔ Receive notifications ✔ Automatically suspend warehouses
2. Why Use Resource Monitors?
| Business Need | How RM Helps |
|---|---|
| Avoid sudden big billing spikes | Stops warehouses when usage crosses threshold |
| Different teams need cost limits | Assign separate monitors for Marketing, Finance, DE, DS |
| Want to control ETL/BI workloads | Set daily/weekly/monthly credit caps |
| Need governance + transparency | View exactly where credits are consumed |
3. Resource Monitor Actions
A Resource Monitor supports 3 actions:
| Action | Meaning |
|---|---|
| Notify | Sends alert when the monitor reaches a threshold % |
| Suspend | Suspends the assigned warehouses (no new queries allowed) |
| Suspend_immediate | Immediately suspends running + queued queries |
4. Resource Monitor Example (Simple & Common)
CREATE OR REPLACE RESOURCE MONITOR marketing_rm
WITH CREDIT_QUOTA = 100
FREQUENCY = MONTHLY
START_TIMESTAMP = IMMEDIATELY
TRIGGERS ON 80 PERCENT DO NOTIFY
ON 100 PERCENT DO SUSPEND;
Meaning:
- Total monthly credit budget = 100 credits
- At 80% usage → send notification
- At 100% usage → suspend warehouse automatically
5. Assign Warehouse to Resource Monitor
ALTER WAREHOUSE marketing_wh
SET RESOURCE_MONITOR = marketing_rm;
From now on: This warehouse cannot consume more than 100 credits/month.
6. Where to See Resource Monitor Usage?
A. Snowflake Web UI
Navigation:
Admin → Cost Management → Resource Monitors
Here you can see:
- Current usage
- Alerts
- Which warehouses are attached
- Credit consumption charts
B. SQL – ACCOUNT_USAGE
You can query these system tables:
| Purpose | Table |
|---|---|
| RM definitions | SNOWFLAKE.ACCOUNT_USAGE.RESOURCE_MONITORS |
| RM triggers fired | SNOWFLAKE.ACCOUNT_USAGE.RESOURCE_MONITOR_HISTORY |
Example:
SELECT *
FROM SNOWFLAKE.ACCOUNT_USAGE.RESOURCE_MONITOR_HISTORY
ORDER BY START_TIME DESC;
7. Best Practices for Resource Monitors
✔ Use separate RMs per team
(Example: Marketing, Finance, Data Engineering)
✔ Use Notify at 70–80%
So teams get warning before suspension.
✔ Avoid Suspend Immediate unless required
It can kill running queries.
✔ Review credit consumption monthly
Using Resource Monitor dashboard + Account Usage views.
✔ Combine with Auto-Suspend
To reduce unnecessary idle credit usage.
8. Example: Enterprise Setup
| Team | Warehouse | Monthly Budget | Action |
|---|---|---|---|
| Marketing | MK_WH | 150 credits | Suspend at 100% |
| Finance | FIN_WH | 80 credits | Notify only |
| Data Engineering | ETL_WH | 300 credits | Suspend Immediate at 120% |
| Data Science | DS_WH | 500 credits | Notify at 80% |
9. Resetting Resource Monitor
Usage resets based on the FREQUENCY:
- Daily
- Weekly
- Monthly
- Yearly
- Never (manual monitoring)
10. Remove Resource Monitor From a Warehouse
ALTER WAREHOUSE marketing_wh
UNSET RESOURCE_MONITOR;