PostgreSQL Metrics and Insights
The metrics panel combines resource usage with a native-metrics snapshot for each PostgreSQL instance. Use the groups together to investigate workload changes instead of treating one field as a definitive diagnosis.
Accessing metrics
- In the sidebar, click Projects.
- Open the desired PostgreSQL database.
- Go to the project's metrics area.
- If the project has more than one instance or replica, select the one you want to inspect.
Native metric groups
| Group | What it shows | How to interpret it |
|---|---|---|
| Health | sample status and current uptime | Uptime describes the current instance; it is not an SLA or availability history. |
| Connections | current connections, limit, utilization, active connections, and idle connections | Utilization near the limit may indicate that you should review the connection pool or capacity. |
| Transactions | commits, rollbacks, and transactions per second | Commits and rollbacks are cumulative counters; transactions per second is a rate between samples. |
| Read cache | hits, reads, and hit ratio | Measures PostgreSQL's internal buffer cache. It does not measure the operating system cache. |
| Activity | rows returned, fetched, and written, plus temporary files and bytes | These are instance aggregates and do not include query text, parameters, or identifiers. |
| Locks | current or cumulative waits and deadlocks | A sustained increase may indicate contention. The snapshot does not identify sessions, users, or queries. |
| Latency | aggregate average latency and total slow queries, when available | Availability depends on instance capabilities. The snapshot does not provide percentiles that were not collected. |
| WAL and checkpoints | cumulative volume, volume per second, and checkpoint activity | Use these values to recognize changes in write activity; one value alone does not confirm a problem. |
| Storage | aggregate database size and project storage usage/capacity | Database size may be unavailable without affecting resource metrics. There is no per-table breakdown. |
| Replication | role, available and expected replicas, and lag in seconds or bytes | Fields appear only when the configuration provides the information. |
Current values, counters, and rates
- Current value: represents the state of a sample, such as current connections or utilization.
- Counter: accumulates events since the last restart or reset and ends in
_total, such ascommits_total. - Rate: represents change between two valid samples and ends in
_per_second, such aswal_bytes_per_second. - Ratio: is a fraction from
0to1; the Console may display it as a percentage.
After a restart or counter reset, the related rate is Unavailable until two valid samples exist. Zenifra does not display a negative rate or replace a missing value with zero.
Units
| Suffix or field | Unit |
|---|---|
_bytes and _bytes_total | integer bytes |
_per_second | units per second; _bytes_per_second fields use bytes per second |
_ms and _ms_total | milliseconds |
_seconds | seconds |
_ratio | fraction from 0 to 1 |
| CPU | CPU cores |
| Memory | bytes |
Last collection and availability
Each snapshot reports two timestamps:
observed_at: when values were observed on the instance;collected_at: when the snapshot became available for retrieval.
The Console uses Last collection to show the age of the data. The availability state explains snapshot quality:
| State | Meaning |
|---|---|
Available (available) | the sample completed and the expected groups were evaluated; conditional fields may still be null. |
Partial (partial) | only some groups or fields could be obtained. |
Stale (stale) | a previous valid sample is displayed with its original timestamp; it does not represent current state. |
Unavailable (unavailable) | no valid sample can be presented at this time. |
A null field means the value is unsupported, was not observed, or could not be calculated. Do not interpret null as zero.
Snapshot, not history
Native metrics represent the latest reading for each instance. The current capability returns history: null: it does not provide time-series retention or historical charts. Counters may represent activity accumulated by the instance itself, but that does not turn Zenifra snapshots into queryable history.
For integrations, check the metrics capabilities and contract first. The public endpoints remain:
GET /v1/project/{id}/metrics/capabilitiesGET /v1/project/{id}/metrics?instance={instance}