Documentation forSolarWinds Observability

Add a PostgreSQL database instance

Monitor your PostgreSQL database instance with SolarWinds Observability on a dedicated host, Amazon RDS, Amazon Aurora, Google Cloud SQL, Azure DB, Fork or Variant, or Service Fork or Variant. Capture a robust assortment of PostgreSQL query metrics that give you insight into database performance and what consumes your database’s resources.

Get started

Before you start

See PostgreSQL system requirements to make sure your system is supported and you have the required roles and privileges to monitor your PostgreSQL database instance with SolarWinds Observability.

To monitor your PostgreSQL database instance with SolarWinds Observability, complete the following:

  1. In SolarWinds Observability, click Add Data at the top.

  2. On the Add Data dialog, click Database.

  3. Click Self-hosted, Amazon RDS, Amazon Aurora, Google Cloud SQL, Azure DB, Fork or Variant, or Service Fork or Variant from the PostgreSQL drop-down menu.

  4. Choose an existing SolarWinds Observability Agent on a monitored host. Click Next to continue.

    For more information about installing the SolarWinds Observability Agent on your host, see Add a self-managed host or Run the SolarWinds Observability Agent as a Docker image or Kubernetes deployment.

    If the Agent you want to use is not displayed in the wizard, make sure it has host monitoring enabled. See Enable host monitoring on an Agent.

  5. Enter the database instance address, database, database username, and database password for your database instance. Click Next to continue.

    Click the Enable SSL toggle and enter your SSL credentials to enable SSL. 

  6. Copy and execute the installation script on your PostgreSQL instance. The script will ensure that the correct privileges are set up on your instance.

    The monitoring user must have the SUPERUSER, rds_superuser, or pg_monitor role. See PostgreSQL system requirements for more information.
  7. Click whether to enable or disable packet capture.

    Packet Capture is only available for Self-hosted PostgreSQL database instances.
  8. Enter any parameters for metric collection in the Metric Agent field.

    The config files are JSON. When editing or creating a new configuration file, be sure to include the opening and closing brackets" { " and " }" . All options must be comma-separated.

    For example, a file might look like the following:

    {

    "disable-sampling":"false",

    "enable-explains":"false"

    }

  9. Enter any parameters pertaining to locally installed databases in the Query Agent field.

    Query Agent parameters can only be added for PostgreSQL Fork or Variants.
  10. Copy and execute the configuration script on your PostgreSQL database instance. The configuration script does not apply to PostgreSQL Fork or Variants.

  11. Copy and execute the pg_stat_statements on your PostgreSQL database instance to enable the extension to collect query data. The pg_stat_statements script does not apply to PostgreSQL Fork or Variants.

    You must enable the pg_stats_statements extension to capture query performance statistics for all versions of PostgreSQL. See enabling pg_stat_statments for more information.
  12. Click I have performed all of the above tasks. Click Next to continue.

  13. Verify the information entered on the Summary tab. Click Finish.

  14. To view data collected for the newly configured entity in the Entity Explorer, click the name of the Database Instance in the confirmation dialog in the lower-left corner. It may take a few seconds for data to appear for the newly created entity. See Entity Explorer for details.

See Entities in SolarWinds Observability for an overview of Database Instance entities and how they work in SolarWinds Observability.