Monitoring RDS with Datadog - Integration, Enhanced Monitoring, and DBM
With Amazon RDS, simply enabling RDS in the AWS integration delivers CPU and connection counts. Per-process OS metrics are handled by Enhanced Monitoring and a dedicated Lambda, and per-SQL slowness by the Agent and Database Monitoring, with different work to add at each tier.
Whether the AWS Integration Alone Is Enough Depends on the Questions You Want to Answer
The gap between metrics such as CPU utilization and "which SQL is slow" is described in the Database Monitoring explanation, and with RDS you close that gap through three tiers of work. The Datadog RDS integration divides monitoring into three forms, Standard / Enhanced / Native: the deeper the tier, the finer the metrics that arrive, and the work to add spreads to both the AWS side and the DB side (as of October 2026; source: Amazon RDS).
| Tier | Data path | What arrives | Work to add |
|---|---|---|---|
| Tier 1 (Standard) | The AWS integration retrieves it from CloudWatch | Instance-level metrics such as CPU utilization, connection count, and read and write latency | Enable RDS in the integration UI and add three IAM permissions |
| Tier 2 (Enhanced) | Agent on RDS → CloudWatch Logs → Lambda | Per-process CPU and memory, load average, swap | Enable Enhanced Monitoring on the RDS side and prepare a KMS key and a Lambda |
| Tier 3 (Native + DBM) | An Agent placed on a separate host logs in to the DB directly | Per-query metrics, samples of running queries, execution plans | Parameter group, a read-only DB user, Agent configuration |
When choosing a tier, you will not hesitate if you first write down what you want to answer after an incident. "Was the DB slow?" is answered at tier 1. If you want to separate "was the slowness the DB engine, or some other process running on the same instance?", you need tier 2, and if you want to go as far as saying "which query was the cause?", you need tier 3. Tiers 2 and 3 are independent of each other, but both build on the AWS integration of tier 1. If you skip tier 1 and add only tier 3, infrastructure metrics such as CPU do not appear in the DBM UI. Tier 3, DBM, is billed per monitored DB host, so check the unit price on Datadog's official pricing page. The mechanism is summarized in the Database Monitoring explanation, and the combined total with other products in the pricing guide.
In Tier 1, Check RDS in the Integration UI and Add Three IAM Permissions
Complete the connection to your account (role, external ID, and regions to collect from) with the AWS integration setup steps; here, add only the RDS-specific work. On the Metric Collection tab of the AWS integration UI, confirm that RDS is enabled, add the following three permissions to the IAM policy you give Datadog, and then install the Amazon RDS integration tile (as of October 2026).
| Permission | What Datadog uses it for |
|---|---|
rds:DescribeDBInstances | Lists instances and tags them |
rds:ListTagsForResource | Copies custom tags attached to RDS onto metrics |
rds:DescribeEvents | Ingests RDS events as Datadog events |
The metrics that arrive begin with aws.rds., such as aws.rds.cpuutilization, aws.rds.database_connections, and aws.rds.replica_lag, and all engines are covered. The ingestion interval follows the CloudWatch integration settings, so if you want to shorten ingestion delay, one option is to switch to Metric Streams. If Performance Insights is enabled on the RDS side, the aws.rds.dbload family, which represents the number of active sessions, also arrives, and up to this point you can read quite a lot about "whether the DB is being kept waiting." On the other hand, CloudWatch CPU utilization is a value measured from the hypervisor side, and it does not tell you which process inside the instance used it. Tier 1 also contains no query-level information at all.
Enhanced Monitoring Arrives by a Separate Path Through CloudWatch Logs
Tier 2 metrics are not CloudWatch metrics. They are OS values collected by an AWS agent running on the RDS instance and written out to the RDSOSMetrics log group in CloudWatch Logs. Datadog reads this log group with a dedicated Lambda function, converts it into metrics, and sends them. The targets are MySQL / Aurora / MariaDB / SQL Server / Oracle / PostgreSQL, and the work proceeds in the AWS console in the following order (as of October 2026).
- RDS: Enable Enhanced Monitoring when creating the instance or with
Modify, and choose the collection interval (Monitoring Granularity). Datadog's recommended value is15 - KMS: Create a customer managed key. Give it an alias such as
lambda-datadog-key, and do not start it with aws - Lambda: In the same region, deploy the serverless app
Datadog-RDS-Enhancedand enter the key ID inKMSKeyId - Environment variables: Put the API key as JSON in
kmsEncryptedKeys, encrypt it with the same key, and save - Trigger: Choose CloudWatch Logs and specify
RDSOSMetricsas the log group
This function is a different thing from the Datadog Forwarder for logs, and it handles only RDS OS metrics. If you already have an API key encrypted for the Forwarder, the function's README describes how to reuse it. You cannot create a test event from the Test tab, so verify operation by whether aws.rds.cpuutilization.total or aws.rds.process.cpuUsedPc appears on the Datadog side. On the cost side, AWS charges arise when CloudWatch Logs transfer and storage exceed the amount available for free, and that amount is proportional to the granularity. AWS also suggests changing the granularity per instance as a way to keep costs down (source: Monitoring OS metrics with Enhanced Monitoring).
Before Tier 3, Decide Where the Agent Lives and the Parameter Group
You cannot install the Agent on an RDS instance, so in tier 3 you place the Agent on a separate host and have it connect over the network to each instance's endpoint. The example in the official documentation is a small EC2 instance dedicated to the Agent, and installing the Agent itself is the same as in installing the Agent on Linux. An Agent that runs DBM must be 7.36.1 or later, the engine lower bounds are 9.6 for PostgreSQL and 5.6 for MySQL, and the list of supported versions is at the start of the setup steps for Postgres and MySQL (as of October 2026). At the same time, enable Resource Collection in the AWS integration UI. What you change first on the DB side is the parameter group, and the items differ by engine.
| Engine | Parameter | Value | Required or not, and role |
|---|---|---|---|
| PostgreSQL | shared_preload_libraries | pg_stat_statements | Required. The source of the query metrics postgresql.queries.* |
| PostgreSQL | track_activity_query_size | 4096 | Required. With the default, SQL longer than 1024 characters cannot be captured |
| PostgreSQL | track_io_timing | on | Optional. Captures per-query block read and write time |
| MySQL | performance_schema | 1 | Required. Enables the Performance Schema |
| MySQL | max_digest_length | 4096 | Required. Keeps digests of long SQL without truncating them |
| MySQL | performance_schema_max_digest_length / performance_schema_max_sql_text_length | 4096 | Match max_digest_length (the latter is 5.7 or later) |
For both engines, the official documentation requires a server restart after you change the values. Under AWS's specifications, the default parameter group cannot be modified, so create a new group, enter the values, and associate it with the instance. Both the values of a newly associated group and changes to static parameters take effect only after the instance restarts (source: Overview of parameter groups). If you cannot choose the restart time for a production DB, you can also arrange to complete only creating and associating the group first and leave applying it to a planned restart. What takes the most time in tier 3 is coordinating this restart.
Queries Become Visible with a Read-Only User and the dbm: true Setting
The Agent logs in to the DB as a read-only user and collects statistics and queries. In PostgreSQL, in a replication setup, create the datadog user on the primary (the write side). On 10 or later, create a datadog schema in each database, grant the pg_monitor role, and create the pg_stat_statements extension. On 15 or later, in addition, enable role inheritance with ALTER ROLE datadog INHERIT. In MySQL, grant datadog@'%' privileges such as SELECT on performance_schema. On RDS, consumers cannot be enabled permanently through configuration, so you also create a procedure that the Agent uses to enable them at run time. The items in the subsequent Agent configuration, and what each is responsible for, are as follows.
| Item | What it is responsible for |
|---|---|
dbm: true | In addition to the normal DB integration, collects query metrics and execution samples |
aws.instance_endpoint / aws.region | Links the DB the Agent is watching to the RDS instance in the AWS integration |
dbinstanceidentifier tag | Set to the same value as the RDS identifier, so that tier 1 metrics and DB-side metrics line up on the same axis |
ENC[…] | Reads the password from the Agent's secrets management rather than placing it in plain text |
ssl: allow | Add only for Agent 7.49 or earlier |
The place to write it is postgres.d/conf.yaml for PostgreSQL and mysql.d/conf.yaml for MySQL. After saving, restart the Agent and check whether postgres or mysql appears in the Checks section of the status subcommand. A shortened PostgreSQL example looks like this (as of October 2026).
init_config:
instances:
- dbm: true
host: '<AWS_INSTANCE_ENDPOINT>'
port: 5432
username: datadog
password: 'ENC[datadog_user_database_password]'
aws:
instance_endpoint: '<AWS_INSTANCE_ENDPOINT>'
region: '<REGION>'
tags:
- "dbinstanceidentifier:<DB_INSTANCE_NAME>"Connect to the Instance Itself - Cautions for Aurora and IAM Authentication
Make the instance you want to monitor itself the Agent's connection target. The official documentation asks you not to put a proxy, a load balancer, or a connection pooler such as pgbouncer in between. If the connection target changes on failover, the Agent ends up computing the difference between the statistics of two machines, and the metrics go wrong. If you connect to an Aurora cluster endpoint, you see only one randomly chosen replica. Either write the instance endpoints one by one, or use the Autodiscovery for Aurora clusters that Datadog recommends (source: Setting Up Database Monitoring for Aurora managed Postgres). If you use IAM authentication, place managed_authentication under aws and set enabled to true. IAM authentication takes precedence over password, so do not enable it in environments that do not use it (as of October 2026).
Stop at the Tier That Answers Your Questions, and Bring the Other Instances into Line
The dashboards Datadog provides differ by tier, so each time you add one, you can check the difference in the UI.
| Tier | Main metrics shown on the dashboard |
|---|---|
| Tier 1 (Standard) | Connections, replication lag, read and write counts and latency, RAM, disk |
| Tier 2 (Enhanced) | Load average, per-process CPU and memory, swap, network send and receive, file system utilization |
| Tier 3 (Native) | Three dashboards for MySQL / Aurora / PostgreSQL. Query volume, disk I/O, connections, replication, AWS-side metrics |
After adding tier 2, putting tier 1's aws.rds.cpuutilization and tier 2's aws.rds.cpuutilization.total on the same graph shows the difference (metric names as of October 2026). According to AWS, the former is measured by the hypervisor and the latter by the agent on the instance, so the values diverge, and the smaller the instance class, the wider the gap (source: Monitoring OS metrics with Enhanced Monitoring). For tier 3, run one query you know to be slow and check whether it appears in normalized form in the Databases UI. Each time you add a tier, judge whether you can answer the questions you wrote down at the start with this UI, and stop that instance at the tier where you can. What you decide next is the order in which to bring all instances with the same role up to that tier, and which maintenance window to put the parameter group restart in.
References
- Amazon RDS
- Setting Up Database Monitoring for Amazon RDS managed Postgres
- Setting Up Database Monitoring for Amazon RDS managed MySQL
- Setting Up Database Monitoring for Aurora managed Postgres
- Monitoring OS metrics with Enhanced Monitoring - Amazon Relational Database Service
- Overview of parameter groups - Amazon Relational Database Service