check-health v4
Checks the health of the EDB Postgres Distributed cluster.
Synopsis
Performs various checks such as if all nodes are accessible, all replication slots are working, and CAMO pairs are connected.
Please note that the current implementation of clock skew may return an inaccurate skew value if the cluster is under high load while running this command or has large number of nodes in it.
pgd check-health [flags]
Examples
Example 1 (3 node cluster, bdr-a1 and bdr-c1 are up, bdr-b1 is down; bdr-a1 and bdr-b1 are CAMO partners) $ pgd check-health Check Status Message ----- ------ ------- CAMO Critical At least 1 CAMO partner is not connected ClockSkew Critical Clockskew cannot be determined for at least 1 BDR node pair Connection Critical The node bdr-b1 is not accessible Raft Warning There is no RAFT_LEADER, an election might be in progress Replslots Critical There is at least 1 BDR replication slot which is inactive Version Warning There is at least 1 node that is not accessible Example 2 (3 node cluster, all nodes are up but system clocks are not in sync) $ pgd check-health Check Status Message ----- ------ ------- CAMO Ok All CAMO pairs are connected ClockSkew Warning At least 1 BDR node pair has clockskew greater than 2 seconds Connection Ok All BDR nodes are accessible Raft Ok Raft Consensus is working correctly Replslots Ok All BDR replication slots are working correctly Version Ok All nodes are running same BDR versions Example 3 (3 node cluster, all nodes are up and all checks are Ok) $ pgd check-health Check Status Message ----- ------ ------- CAMO Ok All CAMO pairs are connected ClockSkew Ok All BDR node pairs have clockskew within permissible limit Connection Ok All BDR nodes are accessible Raft Ok Raft Consensus is working correctly Replslots Ok All BDR replication slots are working correctly Version Ok All nodes are running same BDR versions
Options
-h, --help help for check-health
Options inherited from parent commands
-f, --config-file string config file; ignored if --dsn flag is present (default "/etc/edb/pgd-config.yml") --dsn string database connection string e.g."host=bdr-a1 port=5432 dbname=bdrdb user=postgres " -L, --log-level string logging level: debug, info, warn, error (default "error") -o, --output string output format: json, yaml