Query Monitor
Purpose:
Query Monitor enables Snowflake administrators to monitor query activity, receive email alerts, and take proactive actions when predefined rules are violated (e.g., long-running queries or warehouse overload).
Setup: Create a Query Monitor
From the top navigation, go to Operations → Query Monitor. Click “Create New” or edit an existing Monitor to open the configuration form.
The form includes the following fields:

- Name: A unique name for the monitor.
- Condition: Define the conditions that will trigger alerts.
MaxMyCloud utilizes the Snowflake Query History API, allowing you to build conditions based on any fields the API provides. For a complete list, refer to the Snowflake Documentation.
MaxMyCloud also provides built-in functions to refine your conditions:
Function | Description | Example |
---|---|---|
CREDIT_USED() | Returns the amount of credits consumed by a query. | credit_used() > 1 (Alert if query uses more than 1 credit.) |
RUN_HOUR() | Returns the hour of the day (0–23) when the query is running. | query_tag = 'FINISH BY 2am' AND run_hour() > 2 (Still running after 2 AM.) |
RUN_MINUTE() | Returns the minute of the hour (0–59) when the query is running. | run_minute() > 30 (Query running past 30 minutes into the hour.) |
RUN_TIME() | Returns the current time of day when the query is running in HH:MM format. | run_time() > '14:00' (Query still running after 2:00 PM.) |
- Cancel: Optionally kill the query automatically if the condition is met.
- Emails: List of recipient email addresses for alert notifications.
Click Save to return to the list of Query Monitors.
Alerts
If a running query meets a defined condition, alert emails are sent to the specified recipients.
- Example 1: A query is automatically cancelled when it violates a condition.
- Example 2: A query violates a condition, but is not cancelled — an email notification is still sent to alert administrators.

