From 8a0aaf95d822796f060b0f9bf22fa4f841f34076 Mon Sep 17 00:00:00 2001 From: Seth Samuel Date: Wed, 30 Apr 2025 09:54:54 -0400 Subject: [PATCH 1/2] Database instance identifier --- .../database_identifier.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 content/en/database_monitoring/database_identifier.md diff --git a/content/en/database_monitoring/database_identifier.md b/content/en/database_monitoring/database_identifier.md new file mode 100644 index 0000000000000..a656f1ca46d3f --- /dev/null +++ b/content/en/database_monitoring/database_identifier.md @@ -0,0 +1,51 @@ +--- +title: Identifying Databases for Database Monitoring +description: Understand how to identify your databases and hosts for DBM +further_reading: +- link: "/database_monitoring/" + tag: "Documentation" + text: "Database Monitoring" +- link: "/database_monitoring/data_collected/" + tag: "Documentation" + text: "Data Collected" +- link: "/database_monitoring/troubleshooting/" + tag: "Documentation" + text: "Troubleshooting" + +--- + +## Database identifier +Each database instance monitored with Datadog has a unique identifier. For Postgres, MySQL, SQL Server and Oracle this identifier can be configured using the `database_identifier.template` path in the integration configuration. Most users can leave this option as the default; it is primarily useful when multiple database instances are hosted on one machine. + +| Note that each instance will be billed as a host for Database Monitoring. + +## Reported hostname +The `reported_hostname` configuration allows users to override the automatic resolution of `host` for a single database instance. This is useful when connecting to a database through a proxy, or when host resolution produces a different name than the one associated with the Datadog infrastructure host. + + +## Examples + +Multiple Postgres instances each on different port: +``` +database_identifier: + template: $resolved_hostname:$port +``` + +SQL Server host with multiple instances: +``` +database_identifier: + template: $resolved_hostname:$instance_name +``` + +MySQL instance with the same hostname running in multiple environments: +``` +database_identifier: + template: $env-$resolved_hostname +``` + +Connecting to an Oracle database with multiple CDBs through a proxy: +``` +reported_hostname: my-oracle.mydomain.com +database_identifier: + template: $resolved_hostname\$cdb_name +``` From 7bcddeea5654550da5aeb2c8229c285e68a39cbe Mon Sep 17 00:00:00 2001 From: Seth Samuel Date: Fri, 16 May 2025 09:54:18 -0400 Subject: [PATCH 2/2] Azure pool --- content/en/database_monitoring/database_identifier.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/en/database_monitoring/database_identifier.md b/content/en/database_monitoring/database_identifier.md index a656f1ca46d3f..5c3507d0aa16d 100644 --- a/content/en/database_monitoring/database_identifier.md +++ b/content/en/database_monitoring/database_identifier.md @@ -37,6 +37,13 @@ database_identifier: template: $resolved_hostname:$instance_name ``` + +Azure pool: +``` +database_identifier: + template: my-pool-name/my-database +``` + MySQL instance with the same hostname running in multiple environments: ``` database_identifier: