check-health#

EDB Postgres分散クラスターの状態を確認します。

概要#

すべてのノードがアクセス可能であり、すべてのレプリケーションスロットが動作しているかどうかなど、さまざまなチェックを実行します。

このコマンドの実行中にクラスターが高負荷になっている場合、または多数のノードが含まれている場合、クロックスキューの現在の実装は不正確なスキュー値を返す場合があることに注意してください。

pgd check-health [flags]

例#

 Example 1 (3 node cluster, bdr-a1 and bdr-c1 are up, bdr-b1 is down)

 $ pgd check-health

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

 Example 2 (3 node cluster, all nodes are up but system clocks are not in sync)

 $ pgd check-health

  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

 Example 3 (3 node cluster, all nodes are up and all checks are Ok)

 $ pgd check-health

 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

オプション#

-h, --help   help for check-health

親コマンドから継承したオプション#

-f, --config-file string   config file; ignored if
                           --dsn flag is present (default "/etc/edb/pgd-cli/pgd-cli-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