Example metrics
Suggest editsHere are some helpful queries for monitoring the health of your Cloud Service database. This isn't a complete list. It's intended only as a starting point.
The examples are in PromQL with variables suitable for use in a Grafana dashboard.
Status
This query shows if the pods are up as provided by Kube State metrics:
CPU
This query shows CPU usage as provided by Kubernetes metrics:
Memory
This query shows memory usage in megabytes as provided by Kubernetes metrics:
Storage
This query shows the percentage of available storage used as provided by Kubernetes metrics:
Replication lag
This query shows the replication lag as provided by the CNP replication lag metric filtered by the Postgres Instance ($instance)
pod:
Connections used
To calculate the connections used as a percentage, you can leverage the cnp_backends_total and cnp_pg_settings_setting metrics. This query calculates the percentage of connections used filtered by the Postgres Instance ($instance)
pod:
Transaction ID age
This query shows the database transaction ID age as provided by the CNP database xid metric filtered by the Postgres Instance ($instance)
pod:
The age is relative to the workloads being run on your database and the following settings. See the Postgres documentation for details:
- autovacuum_freeze_max_age. The default is 200000000.
- vacuum_multixact_failsafe_age. The default is 1600000000.
Could this page be better? Report a problem or suggest an addition!