Перейти к основному содержимому
Перейти к основному содержимому

Metrics reference

Private preview

This page lists every metric exposed by the Managed Postgres Prometheus endpoint. For setup and authentication, see the Prometheus endpoint page.

Common labels

Every metric carries the following labels:

LabelDescription
clickhouse_orgOrganization ID
postgres_servicePostgres service ID
postgres_service_namePostgres service name

Some metrics add a label for the dimension they break out (e.g. mode on CPU metrics, state on connections, database on database size). Those are listed alongside each metric.

Information metric

PostgresServiceInfo is a gauge that always equals 1 and carries the service's current status and version on its labels. Use it to join status onto other metrics or to alert on a service leaving the running state.

MetricTypeExtra labelsDescription
PostgresServiceInfogaugepostgres_status, postgres_versionOne series per service; value is always 1.

postgres_status reports the current lifecycle state of the service (for example running, creating, stopped). postgres_version reports the major Postgres version (e.g. 17, 18).

Capacity

Static limits provisioned for the service. These change only when the service is resized.

MetricTypeUnitDescription
PostgresServer_CPUCoresgaugecoresCPU cores allocated to the service.
PostgresServer_MemoryLimitBytesgaugebytesMemory allocated to the service.
PostgresServer_StorageLimitBytesgaugebytesStorage allocated to the service.

Resource utilization

MetricTypeExtra labelsDescription
PostgresServer_CPUSeconds_TotalcountermodeCPU time consumed, broken out by mode: user, system, iowait, softirq, steal, irq, nice, idle.
PostgresServer_MemoryUsedPercentgaugeMemory in use, as a percentage of PostgresServer_MemoryLimitBytes.
PostgresServer_MemoryCachePercentgaugeMemory used by cache and buffers, as a percentage of total memory.
PostgresServer_FilesystemUsedPercentgaugeFilesystem space used, as a percentage of total storage.

To compute CPU usage as a percentage, take the rate of PostgresServer_CPUSeconds_Total over the modes you care about and divide by PostgresServer_CPUCores.

Disk and network I/O

MetricTypeUnitDescription
PostgresServer_DiskReads_TotalcounteropsDisk read operations completed.
PostgresServer_DiskWrites_TotalcounteropsDisk write operations completed.
PostgresServer_NetworkReceiveBytes_TotalcounterbytesBytes received over the network.
PostgresServer_NetworkTransmitBytes_TotalcounterbytesBytes transmitted over the network.

Database activity

Cumulative counters since service start. Use rate() or irate() to turn them into per-second values.

MetricTypeDescription
PostgresServer_TuplesFetched_TotalcounterRows fetched by queries.
PostgresServer_TuplesInserted_TotalcounterRows inserted.
PostgresServer_TuplesUpdated_TotalcounterRows updated.
PostgresServer_TuplesDeleted_TotalcounterRows deleted.
PostgresServer_TransactionsCommitted_TotalcounterTransactions committed.
PostgresServer_TransactionsRolledBack_TotalcounterTransactions rolled back.
PostgresServer_Deadlocks_TotalcounterDeadlocks detected.

Connections, cache, and database size

MetricTypeExtra labelsDescription
PostgresServer_ActiveConnectionsgaugestateConnections by state (e.g. active, idle).
PostgresServer_CacheHitRatiogaugeBuffer cache hit ratio: blocks served from cache vs. total blocks accessed, as a percentage.
PostgresServer_DatabaseSizeBytesgaugedatabaseDisk size of each database, in bytes. Includes the postgres default and any user-created databases.