---
title: "Service Metrics"
description: "Metric series returned by exo dbaas metrics, and the PostgreSQL, PgBouncer and node metric names exported to Prometheus and Managed Thanos."
url: https://community.exoscale.com/product/dbaas/service-specific/postgresql/reference/metrics/
product: "PostgreSQL"
section: product
last_updated: 2026-11-10
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# Service Metrics

This page lists the metrics a Managed PostgreSQL service exposes: the host-level series returned by `exo dbaas metrics`, and the metric names it exports to a Prometheus endpoint or a Managed Thanos service.

> [!NOTE]
> The lists below were read from a PostgreSQL 18 service with one connection pool on 2026-11-10.
> The platform can add or rename metrics. Read the current list on your own service with the
> commands given in each section.

## exo dbaas metrics

```bash
exo dbaas metrics SERVICE_NAME -z ZONE --period PERIOD
```

Parameters:

- `SERVICE_NAME`: name of the Managed PostgreSQL service.
- `ZONE`: zone the service runs in, for example `ch-gva-2`.
- `PERIOD`: `hour` (the default), `day`, `week`, `month` or `year`. Any other value is rejected.
  `hour` returns one sample every 30 seconds.

The API operation is `get-dbaas-service-metrics`, with the period in the request body:

```bash
echo '{"period":"week"}' | exo api get-dbaas-service-metrics SERVICE_NAME -z ZONE
```

The response holds nine series, each with one column per node:

| Key | Title in `hints.title` |
| --- | --- |
| `cpu_usage` | CPU usage % |
| `disk_usage` | Disk space usage % |
| `diskio_read` | Disk IOPS (reads) |
| `diskio_writes` | Disk IOPS (writes) |
| `load_average` | Load average (5 min) |
| `mem_available` | Memory available % |
| `mem_usage` | Memory usage % |
| `net_receive` | Network receive (bytes/s) |
| `net_send` | Network transmit (bytes/s) |

The layout of a series is described in
[Monitor a Managed PostgreSQL service](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/monitor-your-service/index.md#read-service-metrics).
The API describes the response as an untyped object, so treat these keys as informative rather than
as a contract.

## Prometheus and Managed Thanos Metrics

A [Prometheus external endpoint](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/monitor-your-service/index.md#scrape-the-service-with-prometheus)
and a [metrics integration to Managed Thanos](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/send-metrics-to-thanos/index.md)
receive the same metric names. Read the current list from Thanos:

```bash
curl -s -u "avnadmin:THANOS_PASSWORD" "https://THANOS_HOST:THANOS_PORT/api/v1/label/__name__/values"
```

Parameters:

- `THANOS_HOST`, `THANOS_PORT`, `THANOS_PASSWORD`: the query endpoint and the `avnadmin` password of
  the Thanos service, as shown in
  [Send metrics to Managed Thanos](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/send-metrics-to-thanos/index.md#query-the-metrics).

The labels carried by each series are listed in
[Send metrics to Managed Thanos](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/send-metrics-to-thanos/index.md#labels).

### PostgreSQL

Each name below is the prefix followed by one of the suffixes.

| Prefix | Suffixes | Source |
| --- | --- | --- |
| `postgresql_database_size_` | `database_size` | Size of each database |
| `postgresql_pg_stat_activity_` | `active_conn_count`, `conn_count`, `idle_conn_count`, `oldest_conn_age` | `pg_stat_activity`, per database |
| `postgresql_pg_stat_bgwriter_` | `buffers_alloc`, `buffers_backend`, `buffers_backend_fsync`, `buffers_checkpoint`, `buffers_clean`, `checkpoint_sync_time`, `checkpoint_write_time`, `checkpoints_req`, `checkpoints_timed`, `maxwritten_clean` | `pg_stat_bgwriter`; on PostgreSQL 17 and up the checkpoint values come from `pg_stat_checkpointer` |
| `postgresql_pg_stat_database_` | `blks_hit`, `blks_read`, `deadlocks`, `temp_bytes`, `temp_files`, `tup_fetched`, `tup_returned`, `xact_commit`, `xact_rollback` | `pg_stat_database` |
| `postgresql_pg_stat_replication_` | `flush_diff`, `replication_flush_lag_bytes`, `replication_sent_lag_bytes`, `replication_write_lag_bytes`, `reply_age` | `pg_stat_replication`, including the `pghoard` backup stream |
| `postgresql_pg_stat_user_indexes_` | `idx_scan`, `idx_tup_fetch`, `idx_tup_read`, `index_size` | `pg_stat_user_indexes` |
| `postgresql_pg_stat_user_tables_` | `analyze_count`, `autoanalyze_count`, `autovacuum_count`, `idx_scan`, `idx_tup_fetch`, `n_dead_tup`, `n_live_tup`, `n_mod_since_analyze`, `n_tup_del`, `n_tup_hot_upd`, `n_tup_ins`, `n_tup_upd`, `seq_scan`, `seq_tup_read`, `table_size`, `table_size_total`, `vacuum_count` | `pg_stat_user_tables` |
| `postgresql_pg_statio_user_tables_` | `cache_hit_ratio` | `pg_statio_user_tables` |
| `postgresql_transactions_` | `freeze_limit`, `txns` | Transaction ID age and the limit that triggers a forced vacuum |

### PgBouncer

`pgbouncer_` series appear once a [connection pool](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/manage-connection-pools/index.md)
has served traffic, with the pool name in the `db` label. Each name is `pgbouncer_avg_` or
`pgbouncer_total_` followed by one of:

`bind_count`, `client_login_count`, `client_parse_count`, `query_count`, `query_time`,
`server_assignment_count`, `server_parse_count`, `wait_time`, `xact_count`, `xact_time`.

Two more names exist only as totals: `pgbouncer_total_received` and `pgbouncer_total_sent`.

### Service Connections

`service_connections_accepted`, `service_connections_dropped`,
`service_connections_limit_avg_per_second` and `service_connections_limit_burst`.

### Node

The node metrics describe the machine that runs each node:

| Prefix | Examples |
| --- | --- |
| `cpu_` | `cpu_usage_user`, `cpu_usage_system`, `cpu_usage_iowait`, `cpu_usage_steal` |
| `mem_` | `mem_available_percent`, `mem_used_percent`, `mem_cached` |
| `disk_` | `disk_used_percent`, `disk_free`, `disk_total`, `disk_inodes_used_percent`, with a `path` label |
| `diskio_` | `diskio_reads`, `diskio_writes`, `diskio_read_bytes`, `diskio_io_await` |
| `net_`, `netstat_` | `net_bytes_recv`, `net_bytes_sent`, `netstat_tcp_established` |
| `system_`, `kernel_`, `processes_`, `swap_`, `procstat_` | `system_load5`, `system_n_cpus`, `kernel_context_switches`, `processes_total`, `swap_used_percent`, `procstat_memory_rss` |

The disk that holds the data is the one with `path="/var/lib/pgsql"`.

`max_connections` is not exported. Read it with `SHOW max_connections;`, or from the
`max-connections` field of `exo api get-dbaas-service-pg SERVICE_NAME -z ZONE`.

## Related Pages

- [Monitor a Managed PostgreSQL service](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/monitor-your-service/index.md)
- [Send metrics to Managed Thanos](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/send-metrics-to-thanos/index.md)
- [Visualize a service in Managed Grafana](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/visualize-in-grafana/index.md)
- [Use External Integrations](https://community.exoscale.com/product/dbaas/how-to/external-integrations/index.md)
- [API reference for DBaaS](https://community.exoscale.com/reference/api/dbaas/dbaas-postgresql/index.md)

