Extend the platform,
empower your team.
Expand visibility to improve health and performance monitoring of your Snowflake
ExtensionSnowflake monitoring is based on a remote monitoring approach implemented as a Dynatrace ActiveGate extension. The extension queries the Account Usage and Information Schema for key performance and health metrics, extending your visibility, and allowing DAVIS AI to provide anomaly detection and problem analysis.
Ensure that you have log monitoring enabled to get full log insight.
Steps to activate remote monitoring (version 1.255+):
zzyxxx-tc12345.snowflakecomputing.com
)WARNING: WAREHOUSE CONSUMPTION:: Data in the "Queries" feature set is retrieved every hour.
Execution of the data retrieval queries requires warehouse to be active. Data in "default" feature set is
retrieved every 720 minutes. With an exception for snowflake.account.availability
metric that gets
retrieved every minute and does not require a warehouse.
There are two options to configure a user with proper permissions to query Snowflake for metrics.
Create a Dynatrace specific role and user to monitor Snowflake. In Snowflake, run the following to create a custom role with access to the ACCOUNT_USAGE schema.
This extension monitors SNOWFLAKE database, INFORMATION_SCHEMA, and ACCOUNT_USAGE schema. The SNOWFLAKE database is only viewable by users in the ACCOUNTADMIN role or any role granted by the ACCOUNTADMIN.
use role ACCOUNTADMIN;
grant imported privileges on database snowflake to role SYSADMIN;
use role SYSADMIN;
Alternatively, create a special DYNATRACE
role with access to ACCOUNT_USAGE
schema and INFORMATION_SCHEMA
.
create role DYNATRACE;
grant imported privileges on database SNOWFLAKE to role DYNATRACE;
-- Create a user, skip this step if you are using an existing user.
create user DYNATRACE_USER;
LOGIN_NAME = DYNATRACE_USER;
password = '<PASSWORD>';
default_warehouse = <WAREHOUSE>;
default_role = DYNATRACE;
default_namespace = SNOWFLAKE.ACCOUNT_USAGE;
-- Grant the monitor role to the user.
grant role DYNATRACE to user <USER>;
Example DQL query to list longest running queries:
Note: "Queries" feature set must be enabled.
fetch logs
| filter matchesValue(dt.extension.name, "com.dynatrace.extension.sql-snowflake")
| filter matchesValue(event.group, "longest_queries")
| sort asDouble(execution_status) desc
Example DQL query to list failed queries:
Note: "Queries" feature set must be enabled.
fetch logs
| filter matchesValue(dt.extension.name, "com.dynatrace.extension.sql-snowflake")
| filter matchesValue(event.group, "failed_queries")
| sort timestamp desc
Below is a complete list of the feature sets provided in this version. To ensure a good fit for your needs, individual feature sets can be activated and deactivated by your administrator during configuration.
Metric name | Metric key | Description | Unit |
---|---|---|---|
Snowflake availability | snowflake.account.availability | Whether Snowflake responds to queries or not | Percent |
Warehouse compute credits used | snowflake.account.warehouse.credits.compute | Number of credits used for the warehouse. | Count |
Warehouse cloud services credits used | snowflake.account.warehouse.credits.cloudServices | Number of credits used for cloud services for the warehouse. | Count |
Warehouse credits used | snowflake.account.warehouse.credits.total | Number of credits billed for the warehouse. | Count |
Account table storage bytes | snowflake.account.storage.table | Number of bytes of table storage used, including bytes for data currently in Time Travel. | Bytes |
Account stage storage bytes | snowflake.account.storage.stage | Number of bytes of stage storage used by files in all internal stages (named, table, and user). | Bytes |
Account fail-safe storage bytes | snowflake.account.storage.failsafe | Number of bytes of data in Fail-safe. | Bytes |
Warehouse compilation time | snowflake.account.warehouse.time.compilation | Query compillation time per warehouse. | MilliSecond |
Warehouse execution time | snowflake.account.warehouse.time.execution | Query execution time per warehouse. | MilliSecond |
Warehouse elapsed time | snowflake.account.warehouse.time.elapsed | Query total elapsed time per warehouse. | MilliSecond |
Warehouse queued provisioning time | snowflake.account.warehouse.time.queued.provisioning | Query queued provisioning time per warehouse. | MilliSecond |
Warehouse queued overload time | snowflake.account.warehouse.time.queued.overload | Query queued overload time per warehouse. | MilliSecond |
Warehouse blocked time | snowflake.account.warehouse.time.blocked | Query blocked time per warehouse. | MilliSecond |
Account compute credits | snowflake.account.credits.compute | Number of credits used by warehouses and serverless compute resources. | Count |
Account cloud services credits | snowflake.account.credits.cloudServices | Number of credits used for cloud services. | Count |
Account total credits used | snowflake.account.credits.total | Total number of credits used by the account. | Count |
v2.0.0
Breaking changes: monitoring configurations will have to be recreated to upgrade to this version.
Features:
snowflake.account.availability
that gets reported every minute and does not use a warehouse, meaning that it does not consume credits and allows warehouse to split.Improvements:
Bug fixes:
status
attribute for Failed Queries and Longest Queries was renamed to execution_status
to avoid conflict with built-in Dynatrace logs status
property.The extension has been reworked to better reflect the existing Snowflake monitoring requirements. Account level metrics from ACCOUNT_USAGE
schema are collected every 12 hours. Additionally, failed queries and top slowest queries are monitored every hour, if the corresponding feature sets are enabled.
Changes in this release
Initial release