pg_stat_* views), so they are
identical whether the database runs on Amazon RDS, Google Cloud SQL, or Azure Database for PostgreSQL Flexible Server.
Enabling metrics
Enable Metrics (inputenableMetrics) is on by default on the Postgres blueprint installation. Metrics collection:
- Provisions a dedicated monitoring role in the database, granted
pg_monitorand nothing else. The role can read Postgres statistics — never your data. - Runs a small exporter pod (about 50m CPU / 64Mi memory) in your cluster that connects to the database over TLS and exposes its statistics for collection.
What is collected
Collection is deliberately coarse: metrics are scraped once a minute and per-table and per-index statistics are not
collected, which keeps a database’s footprint at roughly 250 time series regardless of how many tables it has.
Query-level statistics (
pg_stat_statements) are not collected, so query load is measured as active backends and
row throughput rather than as per-statement counts.
Host-level metrics
CPU, IOPS, storage headroom, and failover events are reported by the cloud provider rather than by Postgres. On AWS and GCP, Ryvn collects those host-level series for RDS and Cloud SQL instances whose module emits thecloud_metrics
output — see Cloud datastore metrics for what’s collected and the per-installation
collection status. On Azure, use your cloud console (Azure Monitor) for host-level series.
Built-in Metrics-tab cards have a per-provider query arm: the IOPS card is AWS-only today — GCP emits ops metrics as
native stackdriver_* series (e.g. cloudsql.googleapis.com/database/disk/read_ops/write_ops when you select
them) that you query directly in the environment’s Grafana; they do not
populate the built-in card.
Per-cloud notes
Amazon RDS
Amazon RDS
The monitoring role is created by the database’s master user (
rds_superuser) and granted pg_monitor. All
metrics in the table above are available.Google Cloud SQL
Google Cloud SQL
The monitoring role is created by the master user (
cloudsqlsuperuser) and granted pg_monitor. All metrics in
the table above are available.Azure Flexible Server
Azure Flexible Server
The monitoring role is created by the master user (
azure_pg_admin) and granted pg_monitor. All metrics in the
table above are available.Querying the metrics yourself
Every series carries theenvironment label and an installation label set to the database installation, not to
the exporter that produced it. To chart connections for a database named orders-db in Grafana:
postgres_exporter, so
community dashboards work with the addition of an installation filter.