PostgreSQL Metrics
Use Metrics to read the values of one PostgreSQL instance over time, six charts at a time.
Before you begin
- You need the View PostgreSQL and View Metrics permissions.
- Scops reads the values every minute and keeps them for 31 days by default (see Retention).
- The host charts need an OS credential on the instance, and a Linux host (see PostgreSQL permissions).
Choose the window
| Button | Window |
|---|---|
| Live | The last hour, one point a minute. The page refreshes every minute. |
| 1D | The last 24 hours, one bar an hour. |
| 1W | The last 7 days, one bar for 4 hours. |
| 1M | The last 31 days, one bar a day. |
| Calendar button | Up to 31 days. Select From and to, then click Apply. |
To zoom in, click an hourly, 4-hour or daily bar. The line at the top left shows the mode: LIVE, HISTORY or CUSTOM. It also shows the window and the size of a point or bar. All times use the clock of the instance.
Pick the charts
Select a Preset. Each preset shows six charts.
To change one chart, click its title and select a different chart.
To keep your charts in the preset, click Save Preset. To go back to the charts of Scops, click the reset button next to it.
Scops keeps a saved preset in this browser.
| Preset | Charts |
|---|---|
| Overview | Transactions, Cache hit ratio, Connections, WAL generated, Checkpoints, Replication lag. This is the default. |
| Replication & WAL | Replication lag, WAL generated, WAL retained by replication slots, WAL directory size, WAL archiving, Checkpoints. |
| I/O | Cache hit ratio, Blocks read, Block read time, Temporary files, Checkpoints, WAL generated. |
| Transactions & Vacuum | Transactions, Deadlocks, Oldest transaction, Oldest transaction ID age, Autovacuum workers, Connections. |
| Host | Host CPU, Host I/O wait, Host load average, Host memory available, Data directory disk used, WAL directory disk used. Shows only when Scops reads the host. |
On a standby, Recovery conflicts takes the place of WAL generated. In Transactions & Vacuum, Temporary files takes the place of Autovacuum workers.
Show one database
In the database bar, select the database.
The page opens on the Database preset, with the values of that database: Transactions, Cache hit ratio, Connections, Blocks read, Temporary files and Deadlocks. The other presets have the tag instance, because they show the full instance.
Read a chart
Under its title, each chart tells you in one line what it shows and which direction is bad. NOW is the newest point, and AVG, MAX and MIN are for the window.
- Usual shows what the value usually does at that time of day. A chart of one database has no usual.
- A gap means that Scops did not read the value. A gap is not zero.
- If the instance does not give a value, the chart tells you why, for example when there is no standby.
What the colors mean
A figure is amber or red only past the line of its value. A value without a line has no color. A dash means that the value has no red line.
| Value | Amber | Red |
|---|---|---|
| Connections | 80% of max_connections | 90% |
| Replication lag | 30 seconds | 5 minutes |
| Oldest transaction | 1 hour | — |
| Oldest transaction ID age | 500 million | 1 billion |
| WAL archiving failures | 1 or more | — |
| WAL retained by replication slots | max_wal_size or more | — |
| Autovacuum workers | All of autovacuum_max_workers | — |
| Block read time | 20 ms | 50 ms |
| Host CPU, Data directory disk used, WAL directory disk used | 80% | 90% |
| Host memory available | Less than 10% | Less than 5% |
Related
Updated November 22, 2026