Ensure that you have log monitoring enabled to get full log insight.
Steps to activate remote monitoring (version 1.255+):
- Activate Extension in the Hub by going to:
- Manage → Dynatrace Hub → Snowflake → Add to environment
- Add new monitoring configuration
- Specify full URL for connection (for example, https://zzyxxx-tc12345.snowflakecomputing.com)
- Specify database name to connect to and warehouse which will execute the monitoring queries
It is recommended to execute the queries on the smallest possible warehouse. The queries are executed every 30 minutes.
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>;