Access Logs
The logs that are generated by a database are stored temporarily on the same disk as the database. We provide logs for connections, disconnections, waiting for locks, DDL statements, any statement that ran for at least 500 ms, and any statement that caused an error (see postgreSQL documentation). Currently, we do not provide an option to change this configuration.
In order to conserve disk space, log files are rotated according to size. Logs should not consume more than 175 MB of disk storage. The files are continuously monitored and log messages are shipped to a central storage location with a retention policy of 30 days.
By using your cluster ID, you can fetch the logs for that cluster via our API.
Requesting logs
The endpoint for fetching logs has four optional query parameters:
Parameter | Description | Default value | Possible values |
---|---|---|---|
start | Retrieve log lines after this timestamp (format: RCF3339) | 30 days ago | between 30 days ago and now (before end) |
end | Retrieve log line before this timestamp (format: RFC3339) | now | between 30 days ago and now (after start) |
direction | Direction in which the logs are sorted and limited | BACKWARD | BACKWARD or FORWARD |
limit | Maximum number of log lines to retrieve. Which log lines are cut depends on direction | 100 | between 1 and 5000 |
So if you omit all parameters, you get the latest 100 log lines.
Response
The response will contain the logs separated per instance and look similar to this (of course with different timestamps, log contents etc):
Last updated