Metric Destinations

It is possible to send various metrics such as CPU usage, disk IO, database locks from your database to external targets. Metrics destinations use Prometheus’ remote-write protocol to send metrics. Any destination that supports remote-write protocol, can be used as a destination of Ubicloud PostgreSQL metrics. You can find destinations that support remote-write protocol here.

Setting Up

Setting up a metric destination is easy. Just open the PostgreSQL server details page. You can enter connection details of the remote destination in the “Metric Destinations” section.

We need 3 pieces of information; URL for sending metrics to, and also username/password for authentication. We only accept https:// endpoints. In this way we ensure that the data we are sending is encrypted at transit.

Type of Metrics

We are sending two types of metrics:

  • Metrics from the database itself

  • Metrics from the underlying virtual machine

Database metrics are collected by postgres_exporter. It contains information about database size, active connections, write/read activity, replication, WAL archival, autovacuum and many more.

Virtual machine metrics are collected by node_exporter. It contains information about CPU usage, disk IO, filesystem usage, memory consumption and network transfers.