# Snowflake Warehouse Has No Resource Monitor

> Flags Snowflake warehouses with no resource monitor assigned, leaving no credit quota to notify or suspend on runaway spend.

Source: https://zop.dev/integrations/snowflake/recommendations/snowflake-warehouse-has-no-resource-monitor

---

## Nothing caps a warehouse by default

A [resource monitor](https://docs.snowflake.com/en/user-guide/resource-monitors) tracks credit use by the warehouses assigned
to it, plus the cloud services that support them, against a quota for a month, week, day, year or
custom range. At thresholds you choose it can notify, suspend the warehouses once running
statements finish, or suspend them immediately and cancel what is running.
[CREATE WAREHOUSE](https://docs.snowflake.com/en/sql-reference/sql/create-warehouse) assigns no monitor by default.

Monitors are how Snowflake puts a hard credit ceiling on warehouses. They do not cover
serverless features or AI services; Snowflake points to budgets for those.

## Listing warehouses without a monitor

```sql
SHOW WAREHOUSES
  ->> SELECT "name", "size", "max_cluster_count", "resource_monitor"
      FROM $1
      WHERE "resource_monitor" IS NULL OR "resource_monitor" = 'null'
      ORDER BY "size";
```

The `resource_monitor` column in [SHOW WAREHOUSES](https://docs.snowflake.com/en/sql-reference/sql/show-warehouses) shows the
monitor explicitly assigned to that warehouse. `SHOW RESOURCE MONITORS;` lists the monitors that
exist and their quotas.

## What counts as having no monitor

ZopNight reads the warehouse's resource monitor property. The finding fires when that property is
absent, empty, or the literal value null. Any named monitor clears the warehouse, regardless of its
quota or which actions it triggers.

## Situations the check does not weigh

The check looks only at the warehouse's own assignment. An account-level monitor, which Snowflake
allows once per account to control credit use across all warehouses together, does not count. The rule also does not judge whether an existing
monitor's quota is sensible.

## A guardrail, not a saving

This finding shows no dollar figure: a monitor saves nothing until something goes wrong. What it
protects against is unbounded spend. A 2X-Large warehouse uses 32 credits an hour on Gen1, so a
job that loops over a weekend can burn well over a thousand credits before Monday.

## Attaching a monitor

Only the ACCOUNTADMIN role can create resource monitors and assign warehouses to them.

1. Create a monitor sized to the warehouse's normal monthly use:

```sql
CREATE RESOURCE MONITOR etl_wh_monitor WITH
  CREDIT_QUOTA = 500
  FREQUENCY = MONTHLY
  START_TIMESTAMP = IMMEDIATELY
  TRIGGERS ON 75 PERCENT DO NOTIFY
           ON 100 PERCENT DO SUSPEND
           ON 110 PERCENT DO SUSPEND_IMMEDIATE;
```

2. Assign it: `ALTER WAREHOUSE etl_wh SET RESOURCE_MONITOR = etl_wh_monitor;`
3. Enable notifications for the people who should hear about it. Snowflake disables resource
   monitor notifications by default.

**Warning**
A warehouse can belong to only one monitor below the account level, and a SUSPEND trigger
will stop production work when the quota is hit. Set the quota with headroom and pair it with a
NOTIFY threshold well before it.
