Monitoring and logs in Managed Service for PostgreSQL
-
Where can I track my use of disk space to avoid exceeding the 95% read-only limit?
-
Are logs stored on the same disk as PostgreSQL data? How are they charged?
-
What does the
Cached
parameter mean for PostgreSQL cluster host RAM monitoring? -
How do I get alerts on critical PostgreSQL cluster parameters?
Where can I track my use of disk space to avoid exceeding the 95% read-only limit?
You can track your disk space:
- In the management console using cluster status monitoring tools.
- In Yandex Monitoring
that allows you to set up alerts for specified metrics.
Are logs stored on the same disk as PostgreSQL data? How are they charged?
Logs are stored on different disks than data and rotated automatically. You can view log information using the CLI command below:
yc managed-postgresql cluster list-logs <cluster_ID>
Cluster log storage is free of charge.
What is the retention period for logs?
Cluster logs are stored for 30 days.
What are WALs and what are they used for?
Write-Ahead Logs
For more information about PostgreSQL, see the official documentation
What does the Cached parameter mean for PostgreSQL cluster host RAM monitoring?
Cached stores cached data. Most operations are performed in random-access memory, since this is where all database information is stored. Caching is applied both to databases and to disks, which may cause the amount of cached data to exceed the storage size.
If the amount of RAM used by applications increases, some of the cache memory may be released.
For more information about caching disk data in Linux, see the documentation
How do I get alerts on critical PostgreSQL cluster parameters?
Use Yandex Monitoring
How do I set up an alert that triggers as soon as a certain percentage of disk space has been used up?
Create an alert with the disk.used_bytes
metric in Yandex Monitoring. This metric shows the disk space usage in the Managed Service for PostgreSQL cluster.
For disk.used_bytes
, use notification thresholds. The recommended values are as follows:
Alarm
: 90% of the disk spaceWarning
: 80% of the disk space
Thresholds are set in bytes only. For example, the recommended values for a 100 GB disk are as follows:
Alarm
:96636764160
bytes (90%)Warning
:85899345920
bytes (80%)