Skip to main content

PostgreSQL Cluster in ObserveOps

Overview​

The PostgreSQL Cluster integration gives ObserveOps deep visibility into cluster health across primary and standby nodes, replication state, WAL activity, archive progress, checkpoints, buffer and connection usage, long-running transactions, and per-node recovery state. Use it to track replication lag, slot retention, archiver failures, and backend saturation on each node in the cluster.

Prerequisites​

  • The PostgreSQL cluster is reachable from the ObserveOps server on the configured port (default 5432).
  • A monitoring role with permission to read pg_stat_* views, replication, archiver, and WAL metadata on every node.
  • pg_hba.conf allows the ObserveOps server IP for the monitoring role.
  • postgresql.conf has listen_addresses set to accept connections from the ObserveOps server.
  • Each node in the cluster is discovered as a monitor before cluster metrics are available.

List of Supported KPIs​

MetricDescriptionType
postgresql.cluster.system.identifierUnique system identifier of the PostgreSQL clusterString
postgresql.cluster.versionPostgreSQL version running on the clusterString
postgresql.cluster.primary.nodePrimary node of the clusterString
postgresql.cluster.nodeCurrent node identifierString
postgresql.cluster.nodesTotal number of nodes in the clusterCount
postgresql.cluster.node.roleRole of the node (primary, standby)String
postgresql.cluster.node.upstreamUpstream node this node replicates fromString
postgresql.cluster.stateCurrent state of the clusterString
postgresql.cluster.timelineCurrent timeline identifier of the clusterCount
postgresql.cluster.uptime.secondsUptime of the cluster in secondsCount
postgresql.cluster.reachable.nodesNumber of nodes reachable from the primaryCount
postgresql.cluster.unreachable.nodesNumber of nodes unreachable from the primaryCount
postgresql.cluster.standbysTotal number of standby nodesCount
postgresql.cluster.sync.standbysNumber of synchronous standby nodesCount
postgresql.cluster.replicationReplication status of the clusterString
postgresql.cluster.replication.standby.nameName of the standby in a replication connectionString
postgresql.cluster.replication.standby.clientClient address of the standbyString
postgresql.cluster.replication.standby.stateCurrent state of the standby replicationString
postgresql.cluster.replication.standby.sync.stateSynchronisation state of the standbyString
postgresql.cluster.replication.standby.sent.lag.bytesBytes sent but not yet acknowledged by the standbyCount
postgresql.cluster.replication.standby.write.lag.bytesBytes written on primary but not yet written on the standbyCount
postgresql.cluster.replication.standby.flush.lag.bytesBytes written but not yet flushed to disk on the standbyCount
postgresql.cluster.replication.standby.replay.lag.bytesBytes flushed but not yet replayed on the standbyCount
postgresql.cluster.replication.standby.write.lag.secondsWrite lag on the standby in secondsCount
postgresql.cluster.replication.standby.flush.lag.secondsFlush lag on the standby in secondsCount
postgresql.cluster.replication.standby.replay.lag.secondsReplay lag on the standby in secondsCount
postgresql.cluster.replication.sent.lag.bytesAggregate replication sent lag across all standbys in bytesCount
postgresql.cluster.replication.write.lag.bytesAggregate replication write lag across all standbys in bytesCount
postgresql.cluster.replication.flush.lag.bytesAggregate replication flush lag across all standbys in bytesCount
postgresql.cluster.replication.replay.lag.bytesAggregate replication replay lag across all standbys in bytesCount
postgresql.cluster.replication.write.lag.secondsAggregate replication write lag in secondsCount
postgresql.cluster.replication.flush.lag.secondsAggregate replication flush lag in secondsCount
postgresql.cluster.replication.replay.lag.secondsAggregate replication replay lag in secondsCount
postgresql.cluster.wal.sender.stateState of the WAL sender processString
postgresql.cluster.replication.slotsTotal number of replication slotsCount
postgresql.cluster.inactive.replication.slotsNumber of inactive replication slotsCount
postgresql.cluster.replication.slot.retained.wal.bytesWAL bytes retained by a replication slotCount
postgresql.cluster.lost.replication.slotsNumber of replication slots in a lost stateCount
postgresql.cluster.maximum.wal.sendersMaximum WAL sender processes allowedCount
postgresql.cluster.maximum.replication.slotsMaximum replication slots allowedCount
postgresql.cluster.synchronous.standby.namesList of synchronous standby names configuredString
postgresql.cluster.auto.vacuum.workersActive autovacuum workersCount
postgresql.cluster.maximum.auto.vacuum.workersMaximum autovacuum workers allowedCount
postgresql.cluster.pending.archivesWAL files pending to be archivedCount
postgresql.cluster.wal.bytes.rateRate of WAL bytes generated per secondCount
postgresql.cluster.wal.filesNumber of WAL files in the WAL directoryCount
postgresql.cluster.wal.directory.bytesTotal size of the WAL directory in bytesCount
postgresql.cluster.maximum.wal.size.bytesConfigured maximum WAL size in bytesCount
postgresql.cluster.archivesCount of WAL files successfully archivedCount
postgresql.cluster.failed.archivesCount of WAL files that failed to archiveCount
postgresql.cluster.archiver.stateCurrent state of the WAL archiverString
postgresql.cluster.backup.stateCurrent state of the cluster backupString
postgresql.cluster.last.archived.walName of the last successfully archived WAL fileString
postgresql.cluster.last.archived.timeTimestamp of the last successful archiveString
postgresql.cluster.last.failed.walName of the last WAL file that failed to archiveString
postgresql.cluster.last.failed.timeTimestamp of the last archive failureString
postgresql.cluster.last.archive.age.secondsAge of the last archive in secondsCount
postgresql.cluster.scheduled.checkpointsCount of scheduled checkpoints executedCount
postgresql.cluster.requested.checkpointsCount of requested checkpoints executedCount
postgresql.cluster.checkpoint.write.time.msTime spent writing checkpoints in millisecondsCount
postgresql.cluster.checkpoint.sync.time.msTime spent syncing checkpoints in millisecondsCount
postgresql.cluster.checkpoint.buffersBuffers written during checkpointsCount
postgresql.cluster.clean.buffersClean buffers available in the buffer poolCount
postgresql.cluster.max.clean.buffersMaximum clean buffers configuredCount
postgresql.cluster.backend.buffersBuffers written by backendsCount
postgresql.cluster.backend.fsync.buffersBuffers fsynced by backendsCount
postgresql.cluster.allocated.buffersTotal buffers allocatedCount
postgresql.cluster.maximum.connectionsMaximum connections allowed on the clusterCount
postgresql.cluster.connectionsCurrent number of open connectionsCount
postgresql.cluster.connection.used.percentPercentage of connections in useCount
postgresql.cluster.active.sessionsCount of sessions currently executing a queryCount
postgresql.cluster.idle.sessionsCount of idle sessionsCount
postgresql.cluster.idle.in.transaction.sessionsCount of sessions idle in a transactionCount
postgresql.cluster.waiting.sessionsCount of sessions waiting on a lock or resourceCount
postgresql.cluster.longest.transaction.secondsDuration of the longest running transaction in secondsCount
postgresql.cluster.prepared.transactionsCount of currently prepared transactionsCount
postgresql.cluster.transaction.id.ageAge of the oldest transaction ID in the clusterCount
postgresql.cluster.multixact.id.ageAge of the oldest multixact ID in the clusterCount
postgresql.cluster.transaction.id.used.percentPercentage of the transaction ID space consumedCount
postgresql.cluster.commits.rateRate of transaction commits per secondCount
postgresql.cluster.rollbacks.rateRate of transaction rollbacks per secondCount
postgresql.cluster.deadlocksCount of deadlocks detectedCount
postgresql.cluster.temporary.filesCount of temporary files createdCount
postgresql.cluster.temporary.bytesTotal bytes written to temporary filesCount
postgresql.cluster.block.hits.rateRate of block hits in the buffer cacheCount
postgresql.cluster.block.reads.rateRate of block reads from diskCount
postgresql.cluster.cache.hit.ratio.percentBuffer cache hit ratio as a percentageCount
postgresql.cluster.checksum.failuresCount of data checksum failures detectedCount
postgresql.cluster.recovery.conflictsCount of recovery conflicts on standby nodesCount
postgresql.cluster.data.directoryPath to the PostgreSQL data directoryString
postgresql.cluster.auto.vacuumAutovacuum configuration settingString
postgresql.cluster.data.checksumsWhether data checksums are enabledString
postgresql.cluster.shared.buffer.bytesSize of shared buffers in bytesCount
postgresql.cluster.wal.buffer.bytesSize of WAL buffers in bytesCount
postgresql.cluster.effective.cache.size.bytesEffective cache size configuration in bytesCount
postgresql.cluster.work.memory.bytesWork memory setting in bytesCount
postgresql.cluster.maintenance.work.memory.bytesMaintenance work memory setting in bytesCount
postgresql.cluster.node.stateCurrent state of the nodeString
postgresql.cluster.node.versionPostgreSQL version running on the nodeString
postgresql.cluster.node.timelineTimeline the node is currently onCount
postgresql.cluster.node.lag.bytesReplication lag for the node in bytesCount
postgresql.cluster.node.lag.secondsReplication lag for the node in secondsCount
postgresql.cluster.node.connectionsCurrent open connections on the nodeCount
postgresql.cluster.node.uptime.secondsUptime of the node in secondsCount
postgresql.cluster.node.wal.receiver.stateState of the WAL receiver on the nodeString
postgresql.cluster.node.wal.replay.stateState of WAL replay on the nodeString
postgresql.cluster.node.recovery.conflictsCount of recovery conflicts on the nodeCount