Prometheus PostgreSQL Metrics

Metric NameTypeComponentsPurpose
pgx_pool_total_acquire_countCountThe cumulative count of successful acquires from the pool.
pgx_pool_total_acquire_duration_ns_countCountThe total duration of all successful acquires from the pool.
pgx_pool_total_acquire_cancel_countCountThe cumulative count of acquires from the pool that were canceled by a context.
pgx_pool_total_acquire_empty_countCountThe cumulative count of successful acquires from the pool that waited for a resource to be released or constructed because the pool was empty.
pgx_pool_total_conns_opened_countCountThe cumulative count of new connections opened.
pgx_pool_total_destroyed_max_lifetime_countCountThe cumulative count of connections destroyed because they exceeded MaxConnLifetime.
pgx_pool_total_destroyed_max_idle_countCountThe cumulative count of connections destroyed because they exceeded MaxConnIdleTime.
pgx_pool_current_sizeGaugeThe total number of resources currently in the pool.
pgx_pool_current_constructingGaugeThe number of connections with construction in progress in the pool.
pgx_pool_current_acquiredGaugeThe number of currently acquired connections in the pool.
pgx_pool_current_idleGaugeThe number of currently idle connections in the pool.
pgx_pool_maxGaugeThe maximum size of the pool.