guide
guide8 min read

How to set Snowflake resource monitors (and why credit caps alone miss Cortex spend)

A five-step setup with working SQL, plus the serverless and Cortex spend that resource monitors cannot cap

To set a Snowflake resource monitor, an ACCOUNTADMIN runs CREATE RESOURCE MONITOR with a credit quota, a frequency and trigger thresholds, then attaches it to a warehouse or to the whole account with ALTER. The catch, per Snowflake's resource monitor documentation, is that monitors only control credits used by virtual warehouses. Serverless features, including Cortex AI functions, bill outside that cap, so a monitor can sit at 40% while the invoice climbs.

Key Takeaways

  • •A resource monitor is a credit quota plus triggers (NOTIFY, SUSPEND, SUSPEND_IMMEDIATE) attached to one or more warehouses or to the account.
  • •Resource monitors cover virtual warehouse credits only. Serverless and Cortex spend is not capped by them, so you need a second control for it.
  • •Snowflake Budgets are the documented place to track serverless and AI spend against a monthly limit, alongside monitors for warehouses.
  • •SUSPEND lets running queries finish, while SUSPEND_IMMEDIATE cancels them. Pick one deliberately for each threshold.
  • •A monitor you never review drifts. Quotas should be re-derived from actual usage each quarter, not set once.

How to set Snowflake resource monitors: what they cap and what they don't

Before the steps, it helps to be exact about scope. A resource monitor watches credits consumed by virtual warehouses over a period and fires actions when usage crosses a percentage of the quota. That is a good fit for runaway queries, an orchestrator that retries in a loop, or a BI tool that wakes a large warehouse every minute.

It is not a general spending cap. Snowflake's own documentation describes monitors as a warehouse control, and serverless features meter separately. If your bill is rising and the warehouse monitors look healthy, the growth is probably coming from somewhere they cannot see.

Spend sourceCovered by a resource monitor?What to use instead or as well
Virtual warehouse computeYesResource monitor with NOTIFY and SUSPEND triggers
Cortex AI functions and other AI servicesNoA budget, plus daily review of metering history
Serverless tasks, Snowpipe, auto-clustering, search optimizationNoA budget, plus metering history by service type
Storage and data transferNoUsage views and alerts on growth

Step 1: Find out what you actually spend per warehouse

Do not pick a quota from a guess. Query the metering views first. In SNOWFLAKE.ACCOUNT_USAGE, WAREHOUSE_METERING_HISTORY gives credits per warehouse per hour, and METERING_DAILY_HISTORY gives daily credits by service type. Sum the last three full months per warehouse and note the highest month. That number, plus a margin you can defend, becomes the quota.

Also look at the daily history grouped by service type. If warehouse credits are flat but total credits are rising, you have found the gap this post is about before you have written any monitor.

Step 2: Create the monitor with a quota and triggers

Creating a monitor requires the ACCOUNTADMIN role by default. A typical monthly monitor for one team looks like this: CREATE RESOURCE MONITOR analytics_monthly WITH CREDIT_QUOTA = 500 FREQUENCY = MONTHLY START_TIMESTAMP = IMMEDIATELY TRIGGERS ON 75 PERCENT DO NOTIFY ON 90 PERCENT DO NOTIFY ON 100 PERCENT DO SUSPEND ON 110 PERCENT DO SUSPEND_IMMEDIATE;

The quota of 500 is a placeholder. Use the number from Step 1. FREQUENCY can be DAILY, WEEKLY, MONTHLY, YEARLY or NEVER, and the quota resets at the start of each period. Per the documentation, a monitor can hold multiple NOTIFY triggers but only one SUSPEND and one SUSPEND_IMMEDIATE, so plan the ladder before you write it.

Step 3: Choose between SUSPEND and SUSPEND_IMMEDIATE

SUSPEND stops the warehouse from starting new work and lets running statements finish. SUSPEND_IMMEDIATE cancels running statements as well. Our opinion: use SUSPEND at 100% for anything that serves people, and reserve SUSPEND_IMMEDIATE for the overshoot threshold (110% above) so a month-end report is not killed mid-run for a small overage.

Be aware that enforcement is not instantaneous. Snowflake notes that usage can pass a threshold slightly before the action takes effect, so set the quota below the number you truly cannot exceed.

Step 4: Attach the monitor to warehouses or the account

A monitor does nothing until it is assigned. For a single warehouse: ALTER WAREHOUSE reporting_wh SET RESOURCE_MONITOR = analytics_monthly; A monitor can cover several warehouses, but each warehouse can have only one monitor. For an account-wide cap: ALTER ACCOUNT SET RESOURCE_MONITOR = account_monthly; An account-level monitor tracks total warehouse credits, while warehouse-level monitors track their own assigned set.

Layering is the usual pattern: one account-level monitor as a backstop, then per-team or per-workload monitors with tighter quotas. Remember to enable notifications for the users who should receive them in Snowsight, otherwise a NOTIFY trigger fires into the void.

Step 5: Cover Cortex and serverless spend separately

This is the step most setup guides skip. Because resource monitors do not apply to serverless features, add a second control. Snowflake Budgets let you set a monthly spending limit in credits and get notified when projected or actual spend approaches it, and they can track serverless usage that monitors cannot.

Then watch the source directly. Group METERING_DAILY_HISTORY by SERVICE_TYPE and compare each service's credits to its trailing 14-day average. A Cortex-driven increase looks like a new service type growing from near zero while warehouse credits stay flat. Our rule of thumb, which is an opinion and not a Snowflake recommendation, is to alert on any service type that doubles its trailing average, since AI functions called inside a scheduled query can multiply cost per row.

Where the manual approach breaks down

Everything above works, and for one account it is a morning of effort. The ongoing cost is in the maintenance. Quotas go stale when workloads change, new warehouses ship without a monitor, a budget is created but nobody owns the alert, and the daily service-type check lives in someone's head.

Our Cost Agent, part of Data Workers, is built for that upkeep. You can ask it in Claude Code or Cursor, "How much are we spending on Snowflake this month?" or "What's causing the warehouse queue to spike?", and it answers from the same metering views used above. It flags warehouses with no monitor and service types growing faster than their baseline. Every agent is an MCP server, so this works from your editor rather than a new dashboard. The open-source edition is read-only by default, so it can report on spend without changing any monitor.

We covered how our agents share context across cost, quality and governance in a separate post. The relevant point here is that a cost spike is rarely only a cost problem. A new Cortex call inside a transformation touches pipelines, so the Pipeline Agent and Cost Agent look at the same change. Our Connectors Agent handles the Snowflake connection, including the read-only role setup, so the metering views are available without granting broad access.

Agents reach these tools through the Model Context Protocol, the open standard that Claude Code and Cursor both support. In Pro, writes such as altering a quota go through approval workflows and are recorded in a tamper-evident audit trail, so a monitor change is never silent.

A short checklist to finish

  • •Every warehouse has a monitor, either its own or an account-level backstop.
  • •Each monitor has at least two NOTIFY thresholds below 100% and a named recipient.
  • •A budget exists for serverless and AI spend, with an owner.
  • •A daily check compares credits by service type to a trailing average.
  • •Quotas are reviewed against actual usage every quarter.

Frequently Asked Questions

Do Snowflake resource monitors cover Cortex spend? No. According to Snowflake's documentation, resource monitors control credits used by virtual warehouses. Cortex and other serverless features meter separately, so use a budget and review metering history by service type.

Who can create a Snowflake resource monitor? By default only the ACCOUNTADMIN role can create one. Other roles can be granted privileges to view or modify a monitor, but creation and account-level assignment normally stay with that role.

What happens when a resource monitor hits its credit quota? It runs the action tied to the threshold. NOTIFY sends an alert, SUSPEND stops the assigned warehouses from taking new queries once running ones finish, and SUSPEND_IMMEDIATE also cancels running queries.

Can one resource monitor cover multiple warehouses? Yes. A single monitor can be assigned to many warehouses and they share its quota, but each warehouse can be assigned to only one monitor. An account-level monitor can exist alongside warehouse-level ones.

How often should I revisit resource monitor quotas? We suggest quarterly, or any time a major workload ships. A quota set once from a guess either blocks real work or lets waste through, and neither shows up until the month ends.