cluster: repmgr cluster topology and sync mode
Inspect repmgr nodes, local role match, synchronous config, and recent cluster events (defaults to database esrep).
Reads external repmgr metadata from database esrep by default, identifies the local node against KES recovery role, inspects local repmgr.conf synchronous settings, and lists recent events. Read-only: never promotes, rejoins, or contacts peer nodes over SSH.
Usage
Key Options
| Option | Effect |
|---|---|
-d <db> | Query repmgr metadata in <db> instead of auto-selecting esrep |
--events-limit <n> | Limit events shown in text output (5 by default; 0 shows all collected) |
--json | Emit structured JSON (cluster.nodes, cluster.sync, cluster.events, inst.downstreams) |
Verdict & Reading Output
WARN(exit=1):cluster.primaries(multiple active primaries in repmgr metadata),cluster.role_mismatch(repmgr metadata disagrees with database recovery role),cluster.inactive(node marked inactive),cluster.detached(active repmgr standby not attached to this primary’ssys_stat_replication), orcluster.sync_degraded(repmgr.confrequests synchronous mode whilesynchronous_standby_namesis empty).UNKNOWN(exit=3): Unresolved local node, insufficient privilege (kbdiag_ro), unreadable localrepmgr.conf(or remote TCP connection), or failed downstream check. Narrow terminals switch[NODES]and[EVENTS]to compact cards automatically.OK(exit=0): Single consistent topology and synchronous state match across collected metadata and kernel views, orrepmgrmetadata schema is absent (not_applicable).
Example (KES V9 Primary, excerpt, COLUMNS=80)
Related Commands
kbdiag repl— check kernel streaming replication links and replay lagkbdiag slots— inspect physical/logical slots backing cluster standbyskbdiag wal— check WAL retention and archive status