Snowflake - Resource Monitoring
Guidance Questions
- What do resource monitors measure?
- Used credits.
- When resources like Virtual Warehouses run they consume credits, to help control this usage and prevent overconsumption, Snowflake has provided resource monitors.
- Source
- What actions can resource monitors trigger based on usage thresholds?
- Notify -> Just sends a notification.
- Notify and suspend -> Sends notification and suspends virtual warehouse as soon as it finishes all running processes.
- Notify and suspend immediately -> Sends notification and suspends virtual warehouse, drops all running processes.
- Multiple thresholds can be set with different actions on the same resource.
- Source
- Who can create resource monitors?
- Users with ACCOUNTADMIN role.
- Other users if enabled by ACCOUNTADMIN.
- The SQL command used to create Monitors is:
- MONITOR
- MODIFY
- Source
- What are the scheduling options for resource monitor tracking and actions?
- Default: starts immediately upon monitor creation, resents at the beginning of each calendar month.
- Frequency: The interval at which credits reset, relative to start date.
- Daily.
- Weekly.
- Monthly.
- Yearly.
- Never, reset, just keep accumulating until a certain threshold is reached.
- Start: Time and Date when the interval starts:
- Immediately.
- Later, set the time and date yourself.
- Resource monitors always reset at 12AM UTC.
- If you put the start date on the last day of the month, snowflake automatically places it on the last day of all the subsequent months even if they have different numbers of days, also accounts for leap years.
- End: The time and date on which to suspend the virtual warehouse regardless of credit usage.
- Rarely used.
- Source
- How are notifications enabled for resource monitors?
- In the Classic Console by an account admin level user.
- In Preferences >> Notifications.
- Before enabling email notifications, must verify email address.
- To enable notifications you must use the ACCOUNTADMIN role.
- Source
Quiz
- Which of the following scenarios can Snowflake resource monitors be configured to support?
- Send a notification when a warehouse reaches a credit consumption threshold.
- Suspend a warehouse at a specific date and time, regardless of whether a credit quota threshold has been reached.
- Monitor credit usage of warehouse with no interval end date, and do a different suspend action at 80% and 90% thresholds.
- Which statements are true regarding resource monitor creation and usage?
- Users with ACCOUNTADMIN role can create resource monitors.
- Users can be granted privileges to view and modify resource monitors.
- Which statements regarding Snowflake credit usage tracking are true?
- By default, credit usage tracking resets back to 0 at the beginning of each calendar month, matching the Snowflake billing cycle.
- By default, a resource monitor starts tracking assigned warehouse as soon as it is created, at the current timestamp.
- The schedule of a resource monitor can be customized to reset at an interval (such as daily, weekly, or annually) relative to a designated start date.
- When a resource monitor action is set to "Suspend Immediately" and it's credit quota threshold is reached, additional credits may be consumed while it's assigned warehouses are being suspended.
- True
- Which must be done for resource monitor notifications to be received by account administrators?
- Account administrators must enable notifications in the web interface preferences.
- Each account administrator must provide and verify their email address.