Skip to main content

Installing Releem Agent on Self-Managed PostgreSQL Servers

Use this guide to configure Releem Agent for PostgreSQL metrics collection on a self-managed Linux server.

Prerequisites

Before proceeding, ensure that the postgresql-contrib package is installed for your specific PostgreSQL version. This package provides extensions required for Releem Agent operation.

Installation Steps

Choose the installation flow that matches your setup:

The Releem Agent installer can create the PostgreSQL monitoring user automatically.

  1. 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.
  • RELEEM_PG_PASSWORD - PostgreSQL user password for collecting metrics.
  • RELEEM_DB_MEMORY_LIMIT - Change parameter in case there are other software installed on the server. Default value is 0 means use all memory.
  • RELEEM_API_KEY - API Key. Get it from 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 in case PostgreSQL listens different interface or connection available only through socket.
  • RELEEM_PG_PORT - use this variable in case PostgreSQL listens different port.
  • RELEEM_PG_SSL_MODE - PostgreSQL SSL mode for 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_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, RELEEM_PG_ROOT_PASSWORD variables makes the installer use the PostgreSQL installation path.

For a full list of configuration settings, please refer to the 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_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.