Skip to main content

PostgreSQL

Installation Steps

Choose the installation flow that matches your setup:

Automatic Installation for Self-Managed PostgreSQL Servers

Use this instruction to install Releem Agent automatically on a self-managed PostgreSQL server. The installer creates the monitoring user, enables pg_stat_statements when possible, and starts metrics collection.

Prerequisites

Install the postgresql-contrib package for your PostgreSQL version. This package provides extensions required by Releem Agent.

Installation Steps

  1. Click Add Server in the Releem Customer Portal and select PostgreSQL if that option is available.
  2. Run the Releem Agent installation command as a root user on the server:
RELEEM_PG_TYPE=1 RELEEM_DB_MEMORY_LIMIT=0 RELEEM_API_KEY=[Key] RELEEM_CRON_ENABLE=1 bash -c "$(curl -L https://releem.s3.amazonaws.com/v2/install.sh)"

Set RELEEM_PG_ROOT_LOGIN and RELEEM_PG_ROOT_PASSWORD when the PostgreSQL superuser is not available through peer/passwordless authentication. If the password is omitted, the installer first tries peer/passwordless access and then prompts for it in the console.

Parameters:

  • RELEEM_HOSTNAME - Server hostname, which should display in the Releem Dashboard.
  • RELEEM_PG_LOGIN - PostgreSQL user name for collecting metrics. The installer creates releem when this is omitted.
  • RELEEM_PG_PASSWORD - PostgreSQL user password for collecting metrics. The installer generates a password when this is omitted.
  • RELEEM_DB_MEMORY_LIMIT - Change this parameter when other software is installed on the server. Default value is 0, which means use all memory.
  • RELEEM_API_KEY - API Key. Get it from the Profile page in Releem Customer Portal.
  • RELEEM_PG_TYPE - set to 1 to explicitly select the PostgreSQL installation path.
  • RELEEM_PG_HOST - use this variable when PostgreSQL listens on a different interface or is available only through a socket.
  • RELEEM_PG_PORT - use this variable when PostgreSQL listens on a different port.
  • RELEEM_PG_DATABASE - database used for the monitoring connection. Default value is postgres.
  • RELEEM_PG_SSL_MODE - PostgreSQL SSL mode for the collector: true for SSL (sslmode=require), false (or omitted) for sslmode=disable.
  • RELEEM_PG_ROOT_LOGIN - PostgreSQL superuser used during automatic releem user creation. Default value is postgres.
  • RELEEM_PG_ROOT_PASSWORD - password for the PostgreSQL superuser. If omitted, the installer first tries peer/passwordless access and then prompts for the password in the console.
  • RELEEM_PG_CONF_DIR - directory where Releem writes recommended PostgreSQL configuration. Set this when the installer cannot detect postgresql.conf.
  • RELEEM_QUERY_OPTIMIZATION - set true if Releem Agent should collect additional information for Automatic SQL Query Optimization.

Setting RELEEM_PG_TYPE, RELEEM_PG_HOST, RELEEM_PG_LOGIN, RELEEM_PG_PASSWORD, RELEEM_PG_ROOT_LOGIN, or RELEEM_PG_ROOT_PASSWORD makes the installer use the PostgreSQL installation path.

For a full list of configuration settings, see Releem Agent Configuration.

  1. Open the Releem Dashboard. If the server does not appear immediately, refresh the page.

Notes

  • PostgreSQL support is enabled when pg_user and pg_password are set in the agent configuration.
  • pg_ssl_mode in releem.conf is a boolean: true means sslmode=require, omitted/false means sslmode=disable.
  • If you prefer to create the monitoring user yourself, use the Manual installation.

Notes

  • PostgreSQL support is enabled when pg_user and pg_password are set in the agent configuration.
  • pg_stat_statements is recommended for query performance visibility.
  • pg_ssl_mode in releem.conf is a boolean: true means sslmode=require, omitted/false means sslmode=disable.
  • On Amazon RDS and Aurora PostgreSQL, pg_hba_file_rules is owned by rdsadmin and cannot be granted to a customer monitoring role. Skip those grants and use the AWS RDS tab above.