![]() |
VOOZH | about |
The Redshift integration connects Datadog to your Amazon Redshift cluster to sync metadata, query history, and table-level metrics. Use it to monitor data freshness, detect anomalies, and trace lineage across your warehouse and downstream tools.
Datadog supports both provisioned Redshift clusters and Redshift Serverless workgroups.
Before you begin, make sure you have:
webhooks section of the .Connect to your Redshift cluster as a superuser and run the following SQL to create a dedicated role for Datadog.
Create a role and grant access to system catalog views.
-- Create a dedicated role for Datadog monitoring
CREATEROLEdatadog_role;-- Required for table size metrics
GRANTSELECTONsvv_table_infoTOROLEdatadog_role;Grant read-only access to your data.
Run the following for each schema you want Datadog to monitor:
GRANTUSAGEONSCHEMA"<YOUR_SCHEMA>"TOROLEdatadog_role;GRANTSELECTONALLTABLESINSCHEMA"<YOUR_SCHEMA>"TOROLEdatadog_role;ALTERDEFAULTPRIVILEGESINSCHEMA"<YOUR_SCHEMA>"GRANTSELECTONTABLESTOROLEdatadog_role;To generate grant statements for all schemas at once, run:
SELECT'GRANT USAGE ON SCHEMA "'||schema_name||'" TO ROLE datadog_role;'||'\n'||'GRANT SELECT ON ALL TABLES IN SCHEMA "'||schema_name||'" TO ROLE datadog_role;'||'\n'||'ALTER DEFAULT PRIVILEGES IN SCHEMA "'||schema_name||'" GRANT SELECT ON TABLES TO ROLE datadog_role;'ASgrant_statementFROMsvv_all_schemasWHEREschema_nameNOTIN('information_schema','pg_catalog','pg_internal','catalog_history');Copy and run the output to apply grants to all schemas.
Create or assign the Datadog database user.
Create a dedicated database user and assign the role:
-- Replace <STRONG_PASSWORD> with a secure password
CREATEUSERdatadog_userPASSWORD'<STRONG_PASSWORD>'SYSLOGACCESSUNRESTRICTED;GRANTROLEdatadog_roleTOdatadog_user;In Redshift Serverless, database users are automatically mapped from IAM identities. For example, an IAM role named DatadogIntegrationRole maps to the database user IAMR:DatadogIntegrationRole.
Grant the datadog_role to your IAM-mapped database user:
GRANTROLEdatadog_roleTO"IAMR:<YOUR_IAM_ROLE_NAME>";ALTERUSER"IAMR:<YOUR_IAM_ROLE_NAME>"SYSLOGACCESSUNRESTRICTED;Add the following policies to the Datadog AWS integration IAM role associated with the AWS account that contains your Redshift cluster.
Attach the AmazonRedshiftDataFullAccess AWS managed policy and an inline policy granting redshift:GetClusterCredentials for the Datadog database user created in the previous section:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "redshift:GetClusterCredentials",
"Resource": [
"arn:aws:redshift:<REGION>:<ACCOUNT_ID>:dbuser:<CLUSTER_IDENTIFIER>/datadog_user"
]
}
]
}
Attach the AmazonRedshiftDataFullAccess AWS managed policy and an inline policy granting redshift-serverless:GetCredentials for your workgroup:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "redshift-serverless:GetCredentials",
"Resource": "arn:aws:redshift-serverless:<REGION>:<ACCOUNT_ID>:workgroup/<WORKGROUP_ID>"
}
]
}
To configure the Redshift integration in Datadog:
Navigate to Datadog Data Observability > Settings.
Click the Configure button for the Redshift option.
Select a connected AWS account or add a new AWS account.
Enter your cluster connection details:
us-east-1).datadog_user).dev).us-east-1).dev).After you save, Datadog begins syncing your information schema and query history in the background. Initial syncs can take up to several hours depending on the size of your Redshift deployment.
After the initial sync completes, create a Data Observability monitor to start alerting on freshness, column-level metrics, and custom SQL metrics.
Additional helpful documentation, links, and articles:
| |