Skip to main content

PostgreSQL cluster logs

Last update:

The Logi service is used for logging. For more information about the principle of operation and cost of the service, please refer to the instruction General information about the Logi service.To see the availability of the Logi service in the regions, please refer to the Logi availability matrix .

For a PostgreSQL cloud database cluster, events in the PostgreSQL databases and the PgBouncer connection pooler are logged.

To collect cluster logs in the Logs service, you must enable logging.You can only get logs through the API.If you no longer need to collect logs, you can turn logging off.

Logs are stored for 14 days.

Learn more about logging in PostgreSQL databases in the Error Reporting and Logging instructions of the PostgreSQL documentation.

Enable logging

You can enable logging through the API or in the control panel:

Enable logging in an existing cluster

Logging uses a portion of the cluster's computational resources. To control the amount of resources consumed, monitor the cluster node metrics. Learn more about how to view metrics in the props.ArticleName instruction.

  1. In the Dashboard, on the top menu, click Products and select Cloud Databases.
  2. Open the Active tab.
  3. Open the cluster page → Settings tab.
  4. In the Logging block, in the Logging Service field, click Connect.
  5. Select a log group or create a new group.
  6. If you have selected a new group, enter its name.
  7. Click Save.

Get the logs

Use the Get Logs instructions in the Logs section.

Event streams will be created for the PostgreSQL cloud database cluster postgresql.log-<instance_id> and pgbouncer.log-<instance_id>, where <instance_id> is the node ID of the PostgreSQL cluster.

Check out the description of log fields for PostgreSQL cluster.

Log fields

_HOSTNAMECluster node name in dbaas format-<instance_id>, where <instance_id> is the PostgreSQL cluster node identifier..
SYSLOG_IDENTIFIERLog source name
SYSLOG_TIMESTAMPEvent time in the log
MESSAGEDescription of the event that the log source transmitted

Disable logging

  1. In the Dashboard, on the top menu, click Products and select Cloud Databases.
  2. Open the Active tab.
  3. Open the cluster page → Settings tab.
  4. In the Logging block, in the Logging Service field, click .
  5. Uncheck the Collect cluster technical logs to log service checkbox.
  6. Click Save.