Cluster Metrics

Integrated Metrics

Service instances publish metrics to the platform’s loggregator infrastructure for consumption via the loggregator firehose, providing visibility to nozzles and other platform-based metrics handlers.

Direct consumers of firehose data will see single-line entries tagged with the product value of Crunchy PostgreSQL and can further filter those entries by the deployment identifier (service-instance_e9fafc83-eb39-4ccb-bce0-6717c838dbbf below)

origin:"" eventType:ValueMetric timestamp:1554105600134537391 deployment:"service-instance_e9fafc83-eb39-4ccb-bce0-6717c838dbbf" job:"postgresql" index:"a8e0f968-fb59-41e6-a278-245b9aaa502d" ip:"" tags:<key:"product" value:"Crunchy PostgreSQL" > tags:<key:"source_id" value:"metric-filter" > valueMetric:<name:"/crunchy-postgresql/postgresql-1/disk_used" value:12 unit:"% used" >

At this time, loggregator metrics are only available on monitoring-based plans. Loggregator metrics are exported every 30 seconds by default.

Service-instance wide metrics

Metric Name Description
/crunchy-postgresql/last-full-backup Unixtime of last automated full database backup
/crunchy-postgresql/last-diff-backup Unixtime of last automated differential database backup
/crunchy-postgresql/database_size Database size, in bytes (B)
/crunchy-postgresql/active_connections Active database connections
/crunchy-postgresql/idle_connections Idle database connections
/crunchy-postgresql/max_query_time Maximum query time observed, in seconds (s)
/crunchy-postgresql/start_time Unixtime of primary node start
/crunchy-postgresql/wal_activity/last_5min_size Size added to WAL, last 5 minutes, in bytes (B)
/crunchy-postgresql/wal_activity/total_size Total size of WAL directory, in bytes (B)

Per-PostgreSQL Node Metrics

Each of the following metrics contain the server name and index (e.g. postgresql-0) represented below as <server_name>

Metric Name Description
/crunchy-postgresql/<server_name>/role fenced/primary/replica (0/1/2) - current replication role
/crunchy-postgresql/<server_name>/failover_status inactive/active (0/1) - processing a node failover
/crunchy-postgresql/<server_name>/disk_used Percent utilization of persistant storage volume
/crunchy-postgresql/<server_name>/load_1m Load average - 1 minute
/crunchy-postgresql/<server_name>/load_5m Load average - 5 minutes
/crunchy-postgresql/<server_name>/load_15m Load average - 15 minutes
/crunchy-postgresql/<server_name>/memory_available System memory available, in bytes (B)

Packaged Metrics

Monitoring-based deployment plans gather an extensive set of metrics via a pg_monitor deployment, collecting these metrics within a deployed Prometheus server. Service bindings created for monitoring-based plans automatically include credentials for connecting to the Prometheus store, specifically prometheus_host, prometheus_port, prometheus_username, prometheus_password.

These binding credentials and metrics are automatically consumed by the pg_monitor dashboards provided with the Grafana for Crunchy PostgreSQL for PCF (cf-grafana) application.

Out-of-the-box, developers can maintain deep cluster visibility on a single cluster through the use of the pg_monitor solution.