Try it free

Monitor PostgreSQL database

  • Latest Dynatrace
  • How-to guide

Use Dynatrace Extension framework to extend your application observability into data acquired directly from your PostgreSQL database layer and monitor how database server tasks impact your app.

Prerequisites

Ensure that your system meets the requirements for full feature support.

Set up the PostgreSQL extension for monitoring

Follow these steps to configure the PostgreSQL extension from Databases Databases.

To add a new database instance configuration, select + Add new configuration and complete these wizard steps.

1. Select DB vendor

Select PostgreSQL from the vendor list, and then select Next.

2. Select an ActiveGate

Select the ActiveGate group to determine which ActiveGates run the extension, and then select Next.

3. Define general monitoring settings

  1. Name the configuration so you can identify it later.
  2. Optional Under Define advanced settings:
    • Add Security context, Product, and Cost center values to enrich all collected data.
    • Add Primary fields to attach key-value properties to the entities created for this connection.
    • Add Primary tags to label those entities so you can filter and group them.
    • Use Customise query settings and Customise feature sets to adjust the polling frequency and the collected metrics.
  3. Select Next.

4. Configure connections

Add one or more connections. For each connection, select Connection and provide the following:

  1. Select a Hosting type.

  2. In the Configure connection section, choose one of the following options:

    • Select from existing hosts: From existing hosts, Select a connection that Dynatrace already monitors and add a Database name.
    • Enter manually: Provide the Host, Port, and Database name.
  3. Optional Enable Optional connection settings to configure additional parameters, such as connection string and SSL.

    For each instance, configure a single database, usually the main postgres database.

  4. Optional Under Define Dynatrace metadata, define Primary fields and Primary tags (connection-level values) if you want to override the configuration-level values.

  5. Optional Use Select database discovery option to automatically monitor the databases running on an instance.

  6. In the Define authentication section, provide the credentials for the dynatrace monitoring user you created:

    • Provide Username and Password created for ActiveGate monitoring.
    • Log in with AWS IAM: Use AWS IAM authentication with an IAM role attached to your ActiveGate host. No database password is required. Only available for AWS RDS and Aurora databases.
    • Log in with Vault: Use vault credentials to securely store and retrieve database credentials.
  7. Select Add connection.

5. Activate connections

Enable the connections you added in the previous step.

  1. Select Download installation script and grant it execution permission by running the mentioned command.

  2. Select Download validation script and grant it execution permissions by running the mentioned command.

  3. Run the scripts to activate and validate each connection.

    This requires a Unix-like system (Linux or macOS) with a Bash shell, and the psql command-line client installed on the machine that runs the script.

    Select View steps for per-connection instructions.

  4. Select I have completed the activation steps for each connection.

  5. Finally, select Start monitoring.

Congratulations! You have successfully configured the PostgreSQL extension via Databases Databases for remote monitoring.

Use cases

Learn more about PostgreSQL monitoring in these use cases.

Feature sets

Feature sets restrict which metrics are collected when you activate the extension.

FAQ and troubleshooting

For complete details, go to the FAQ section.

Related topics

  • PostgreSQL extension
Related tags
Infrastructure ObservabilityDatabasesDatabases