Monitoring PostgreSQL

Document created by Chris Sommerstad Employee on Jul 22, 2017Last modified by Sheril Joseph on Aug 14, 2017
Version 2Show Document
  • View in full screen mode

Prerequisites

In order to monitor a PostgreSQL server, SOASTA CloudTest must be able to establish a TCP/IP connection to the server. If you are not sure how to enable this, consult the "Client Authentication" section of the PostgreSQL documentation.

If a firewall prevents TCP/IP access, see the topic "Monitoring a Server Behind a Firewall".

In addition, in versions 8.2 and earlier, the PostgreSQL stats_row_level parameter must be set to "true". In versions 8.3 and later, this parameter is called track_counts. If you are not sure how to enable this, consult the "Statistics Collection Configuration" section of the PostgreSQL documentation.

Supported Versions

SOASTA CloudTest can currently monitor PostgreSQL 7.4 and later.

Steps

  1. In the Central list, select Monitoring Server Groups.

  1. Click the New Monitoring Server Group icon.

The Monitoring Server / Monitor wizard appears.

  1. Select Monitoring Server Group and click Next.  The Name and Connection step is shown.
  2. Type a name for the Monitoring Server and optionally provide a description.  Finally type the hostname or IP address of the server into the Host field and click Next.

  1. The Resources step is shown. Check "Databases" and click Next.

The Hosts/Device Agents screen appears.

Note: Note: The host(s) or device agent(s) configured here should be the server(s) running PostgreSQL.

  1. Select PostgreSQL, then enter the TCP/IP port number, the user name, and password. The usual port number for PostgreSQL is 5432. If a catalog name is in use, add it as well.

  1. Click the Test Connection button to test the connection. If the connection is successful, you will see a pop-up containing some information about the PostgreSQL server. If the connection fails, you will see an error message explaining what went wrong.

  1. Click Next.
  2. Review the information to be sure it is correct, then check the "Create a new Monitor for this Monitor Server" box and click Finish.

  1. Enter a name for the Monitor and an optional description, then click Next.

  1. Now, choose the statistics you want to monitor. For each statistic, you can choose a "sample rate" that determines how often that statistic will be collected.
    • The "Commits" statistic tracks the number of database commits per second.
    • The "Rollbacks" statistic tracks the number of database rollbacks per second.
    • The "Total Connections" statistic tracks the number of users connected to the PostgreSQL server. This will never be zero, because monitoring itself uses at least one connection.
    • The "Per Catalog Connections" statistic tracks the number of users connected to a specific PostgreSQL database. If you use this statistic, you must enter the name of the database in the "Arguments" column.

Note: Use the Name (Optional) column to give the metric a user-friendly label that will be used in the widget's title bar whenever this metric appears on a dashboard.

When you are finished, click Next.

Review the information to be sure it is correct, then click Finish.

Next steps

You can also combine system, J2EE, and ColdFusion statistics in the same monitor.

Attachments

    Outcomes