Monitoring and logs in Managed Service for PostgreSQL
-
Are logs stored on the same disk as PostgreSQL data? How are they billed?
-
What does the
Cachedmetric indicate in the RAM monitoring of a PostgreSQL cluster host? -
How do I set up an alert that triggers when a certain percentage of disk space is used?
Where can I track my disk space utilization to avoid exceeding the 95% limit triggering read-only mode?
You can monitor your disk space usage:
- In the management console using the cluster health monitoring tools.
- In Yandex Monitoring
that also allows you to set up alerts for specified metrics.
Are logs stored on the same disk as PostgreSQL data? How are they billed?
Logs are stored on separate disks from data and are rotated automatically. You can view log information using the following CLI command:
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 is their purpose?
Write-Ahead Logs
For more details on how PostgreSQL works, refer to its official documentation
What does Cached mean in the RAM monitoring of a PostgreSQL cluster host?
Cached stands for cached data. Most operations are performed in RAM where the entire database working set is stored. Since caching occurs both for databases and the disk itself, the amount of cached data can exceed the storage size.
If application RAM consumption increases, some of the memory used for cache can be freed up.
For more details on disk data caching in Linux, refer to the following guides
How do I get alerts on critical PostgreSQL cluster metrics?
Use Yandex Monitoring
How do I set up an alert that triggers when a certain percentage of disk space is used?
Create an alert for the disk.used_bytes metric in Yandex Monitoring. This metric shows disk space utilization in the Managed Service for PostgreSQL cluster.
For disk.used_bytes, use the following recommended notification thresholds:
Alarm: 90% of disk spaceWarning: 80% of disk space
Thresholds values must be specified in bytes. For example, the recommended values for a 100 GB disk are as follows:
Alarm:96636764160bytes (90%)Warning:85899345920bytes (80%)