check-health#
EDB Postgres分散クラスターの状態を確認します。
概要#
すべてのノードがアクセス可能であり、すべてのレプリケーションスロットが動作しているかどうかなど、さまざまなチェックを実行します。
このコマンドの実行中にクラスターが高負荷になっている場合、または多数のノードが含まれている場合、クロックスキューの現在の実装は不正確なスキュー値を返す場合があることに注意してください。
pgd check-health [flags]
オプション#
特定のコマンドオプションはありません。グローバルオプションについては、 グローバルオプション を参照してください。
例#
ノードがダウンした状態でのヘルスチェック#
この例では、3ノードクラスターがあり、 bdr-a1およびbdr-c1がアップし、 bdr-b1がダウンしています。
$ pgd check-health
__OUTPUT__
Check Status Message
- ---- ------ -------
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 at least 1 node that is not accessible
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
クロックスキューによるヘルスチェック#
この例では、すべてのノードが起動している3ノードクラスターがありますが、システムクロックは同期していません。
$ pgd check-health
__OUTPUT__
Check Status Message
- ---- ------ -------
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
すべてのノードが正常に動作している状態でのヘルスチェック#
この例では、すべてのノードが起動し、すべてのチェックがOkである3ノードクラスターがあります。
$ pgd check-health
__OUTPUT__
Check Status Message
- ---- ------ -------
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