PostgreSQL cluster logs
для логирования используется сервис Логи. Подробнее о принципе работы and стоимости сервиса in инструкции Общая информация о сервисе Логи. Посмотреть доступность сервиса Логи in регионах можно in матрице доступности Логи.
For a PostgreSQL Managed Database cluster, events in the PostgreSQL databases and the PgBouncer connection pooler are logged.
To collect cluster logs in the Logs service, you need to enable logging. Get logs in the control panel using API requests or via AWS CLI. If you no longer need to collect logs, you can disable logging.
Logs are stored for 30 days.
Read more about logging in PostgreSQL databases in the Error Reporting and Logging section of the PostgreSQL documentation.
Enable logging
You can enable logging via the API or in the Control Panel:
- when creating a cluster;
- or in an existing cluster.
Enable logging in an existing cluster
Logging uses a portion of the cluster's computing resources. To control the amount of consumed resources, monitor the cluster node metrics. For more information on how to view metrics, see the article Monitoring of the cluster, nodes and databases PostgreSQL.
- In the Control Panel, in the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the cluster page → Settings tab.
- In the Logging block, in the Log service field, click Connect.
- Select a log group or create a new group.
- If you selected a new group, enter its name.
- Click Save.
Get logs
Use the Get logs guide in the Logs section.
для кластера облачных баз данных PostgreSQL будут созданы потоки событий postgresql.log-<instance_id> and pgbouncer.log-<instance_id>, где <instance_id> – идентификатор ноды кластера PostgreSQL.
See the description of log fields for a PostgreSQL cluster.
Log fields
Disable logging
- In the Dashboard, on the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the cluster page → Settings tab.
- In the Logging block, in the Log service field, click .
- Uncheck the Collect cluster technical logs to log service checkbox.
- Click Save.