pgpool2.git / summary / log / commit / refs
commit c36a28048fdb6fc215ffef68a30bca3f7acdc719
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Mon Jan 27 01:26:01 2020 +0000
Doc: add pool_health_check_stats.sgml.
Also tweak healthcheck.sgml and pool_health_check_stats.sgml (English).
doc.ja/src/sgml/healthcheck.sgml | 6 +
doc.ja/src/sgml/ref/allfiles.sgml | 5 +-
.../src/sgml/ref/show_pool_health_check_stats.sgml | 263 +++++++++++++++++++++
doc.ja/src/sgml/reference.sgml | 1 +
doc.ja/src/sgml/version.sgml | 2 +-
doc/src/sgml/healthcheck.sgml | 9 +
doc/src/sgml/ref/show_pool_health_check_stats.sgml | 5 +-
7 files changed, 286 insertions(+), 5 deletions(-)
diff --git a/doc.ja/src/sgml/healthcheck.sgml b/doc.ja/src/sgml/healthcheck.sgml
index 30c8d75ba..bdd5d74d9 100644
--- a/doc.ja/src/sgml/healthcheck.sgml
+++ b/doc.ja/src/sgml/healthcheck.sgml
@@ -29,6 +29,12 @@
</caution>
</para>
+ <para>
+ ヘルスチェックプロセスは、ヘルスチェックの合計実行回数のような様々な統計情報データを収集します。
+ 統計情報を調べるには、<xref linkend="SQL-SHOW-POOL-HEALTH-CHECK-STATS">コマンドを使用してください。
+ なお、このデータは共有メモリ領域に格納されるので、<productname>Pgpool-II</productname>の起動時に初期化されることに注意してください。
+ </para>
+
<para>
<!-- Following parameter names can also have numeric suffix at the end
of each name. The suffix corresponds to backend id, which is
diff --git a/doc.ja/src/sgml/ref/allfiles.sgml b/doc.ja/src/sgml/ref/allfiles.sgml
index a7bd715a1..7a643ccaf 100644
--- a/doc.ja/src/sgml/ref/allfiles.sgml
+++ b/doc.ja/src/sgml/ref/allfiles.sgml
@@ -1,6 +1,6 @@
<!--
doc/src/sgml/ref/allfiles.sgml
-PostgreSQL documentation
+Pgpool-II documentation
Complete list of usable sgml source files in this directory.
-->
@@ -18,9 +18,9 @@ Complete list of usable sgml source files in this directory.
<!ENTITY pcpRecoveryNode SYSTEM "pcp_recovery_node.sgml">
<!ENTITY pgMd5 SYSTEM "pg_md5.sgml">
<!ENTITY pgEnc SYSTEM "pg_enc.sgml">
+<!ENTITY pgproto SYSTEM "pgproto.sgml">
<!ENTITY pgpool SYSTEM "pgpool.sgml">
<!ENTITY pgpoolSetup SYSTEM "pgpool_setup.sgml">
-<!ENTITY pgproto SYSTEM "pgproto.sgml">
<!ENTITY watchdoglSetup SYSTEM "watchdog_setup.sgml">
<!ENTITY pgpoolShow SYSTEM "pgpool_show.sgml">
<!ENTITY pgpoolReset SYSTEM "pgpool_reset.sgml">
@@ -31,6 +31,7 @@ Complete list of usable sgml source files in this directory.
<!ENTITY showPoolPools SYSTEM "show_pool_pools.sgml">
<!ENTITY showPoolVersion SYSTEM "show_pool_version.sgml">
<!ENTITY showPoolCache SYSTEM "show_pool_cache.sgml">
+<!ENTITY showPoolHealthCheckStats SYSTEM "show_pool_health_check_stats.sgml">
<!ENTITY pgpoolAdmPcpNodeInfo SYSTEM "pgpool_adm_pcp_node_info.sgml">
<!ENTITY pgpoolAdmPcpPoolStatus SYSTEM "pgpool_adm_pcp_pool_status.sgml">
<!ENTITY pgpoolAdmPcpNodeCount SYSTEM "pgpool_adm_pcp_node_count.sgml">
diff --git a/doc.ja/src/sgml/ref/show_pool_health_check_stats.sgml b/doc.ja/src/sgml/ref/show_pool_health_check_stats.sgml
new file mode 100644
index 000000000..ee710185f
--- /dev/null
+++ b/doc.ja/src/sgml/ref/show_pool_health_check_stats.sgml
@@ -0,0 +1,263 @@
+<!--
+ doc/src/sgml/ref/show_pool_health_check_stats.sgml
+ Pgpool-II documentation
+ -->
+
+<refentry id="SQL-SHOW-POOL-HEALTH-CHECK-STATS">
+ <indexterm zone="sql-show-pool-health-check-stats">
+ <primary>SHOW POOL_HEALTH_CHECK_STATS</primary>
+ </indexterm>
+
+ <refmeta>
+ <refentrytitle>SHOW POOL HEALTH_CHECK_STATS</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo>SQL - Language Statements</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>SHOW POOL_HEALTH_CHECK_STATS</refname>
+ <refpurpose>
+ ヘルスチェックの統計情報を表示する
+ </refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <synopsis>
+ SHOW POOL_HEALTH_CHECK_STATS
+ </synopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <command>SHOW POOL_HEALTH_CHECK_STATS</command>は、主にヘルスチェックプロセスが収集したヘルスチェック(<xref linkend="runtime-config-health-check">参照)の統計情報データを表示します。
+ このコマンドは、<productname>Pgpool-II</productname>管理者がヘルスチェックに関連したイベントを調べるのに役立ちます。
+ たとえば、"last_failed_health_check"列を見ることにより、フェイルオーバイベントをログファイルの中から容易に発見することができます。
+ 他の例としては、"average_retry_count"列を評価することにより、不安定なバックエンドへのコネクションを見つけることができます。
+ ある特定のノードが他のノードよりもリトライ率が高ければ、バックエンドへの接続に問題があるかも知れません。
+ </para>
+
+ <para>
+ <xref linkend="health-check-stats-data-table">に各々の列名と説明を示します。
+ </para>
+
+ <table id="health-check-stats-data-table">
+ <title>pool_health_check_statsコマンドが表示する統計情報</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>列名</entry>
+ <entry>説明</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>node_id</entry>
+ <entry>
+ バックエンドノードID。
+ </entry>
+ </row>
+
+ <row>
+ <entry>hostname</entry>
+ <entry>
+ バックエンドホスト名あるいはUNIXドメインソケットのパス。
+ </entry>
+ </row>
+
+ <row>
+ <entry>port</entry>
+ <entry>
+ バックエンドのポート番号。
+ </entry>
+ </row>
+
+ <row>
+ <entry>status</entry>
+ <entry>
+ バックエンドの状態。up, down, waiting, unused, quarantineのいずれか。
+ </entry>
+ </row>
+
+ <row>
+ <entry>role</entry>
+ <entry>
+ このノードの役割。ストリーミングレプリケーションモードではprimaryあるいはstandbyです。
+ 他のモードでは、masterあるいはslaveです。
+ </entry>
+ </row>
+
+ <row>
+ <entry>last_status_change</entry>
+ <entry>
+ バックエンドの状態の最終変更時刻。
+ </entry>
+ </row>
+
+ <row>
+ <entry>total_count</entry>
+ <entry>
+ ヘルスチェックの合計回数。
+ </entry>
+ </row>
+
+ <row>
+ <entry>success_count</entry>
+ <entry>
+ 成功したヘルスチェックの合計回数。
+ </entry>
+ </row>
+
+ <row>
+ <entry>fail_count</entry>
+ <entry>
+ 失敗したヘルスチェックの合計回数。
+ </entry>
+ </row>
+
+ <row>
+ <entry>skip_count</entry>
+ <entry>
+ ヘルスチェックをスキップした合計回数。そのノードがすでにダウン状態の場合、ヘルスチェックはそのノードをスキップします。
+ </entry>
+ </row>
+
+ <row>
+ <entry>retry_count</entry>
+ <entry>
+ ヘルスチェックの合計リトライ回数。
+ </entry>
+ </row>
+
+ <row>
+ <entry>average_retry_count</entry>
+ <entry>
+ 一回のヘルスチェックセッションの平均リトライ回数。
+ </entry>
+ </row>
+
+ <row>
+ <entry>max_retry_count</entry>
+ <entry>
+ 一回のヘルスチェックセッションの中での最大リトライ回数。
+ </entry>
+ </row>
+
+ <row>
+ <entry>max_duration</entry>
+ <entry>
+ ヘルスチェックに要した時間の最大値をミリ秒で表示。
+ ヘルスチェックセッションがリトライを行った場合、各々のリトライしたヘルスチェックの時間の合計がヘルスチェックに要した時間になります。
+ </entry>
+ </row>
+
+ <row>
+ <entry>min_duration</entry>
+ <entry>
+ ヘルスチェックに要した時間の最小値をミリ秒で表示。
+ ヘルスチェックセッションがリトライを行った場合、各々のリトライしたヘルスチェックの時間の合計がヘルスチェックに要した時間になります。
+ </entry>
+ </row>
+
+ <row>
+ <entry>average_duration</entry>
+ <entry>
+ ヘルスチェックに要した時間の平均値をミリ秒で表示。
+ ヘルスチェックセッションがリトライを行った場合、各々のリトライしたヘルスチェックの時間の合計がヘルスチェックに要した時間になります。
+ </entry>
+ </row>
+
+ <row>
+ <entry>last_health_check</entry>
+ <entry>
+ 最後にヘルスチェックを行った時刻。
+ まだヘルスチェックを行っていない場合は空文字です。
+ </entry>
+ </row>
+
+ <row>
+ <entry>last_successful_health_check</entry>
+ <entry>
+ 最後にヘルスチェックに成功した時刻。
+ まだヘルスチェックが成功していない場合は空文字です。
+ </entry>
+ </row>
+
+ <row>
+ <entry>last_skip_health_check</entry>
+ <entry>
+ 最後にヘルスチェックをスキップした時刻。
+ まだヘルスチェックがスキップされていない場合は空文字です。
+ ステータスがdownであっても、このフィールドが空文字であることがあり得ることに注意してください。
+ この場合は、ヘルスチェックプロセス以外でフェイルオーバが起きています。
+ </entry>
+ </row>
+
+ <row>
+ <entry>last_falied_health_check</entry>
+ <entry>
+ 最後にヘルスチェックに失敗した時刻。
+ まだヘルスチェックが失敗していない場合は空文字です。
+ ステータスがdownであっても、このフィールドが空文字であることがあり得ることに注意してください。
+ この場合は、ヘルスチェックプロセス以外でフェイルオーバが起きています。
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ セッション例を示します。
+ <programlisting>
+test=# show pool_health_check_stats;
+-[ RECORD 1 ]----------------+--------------------
+node_id | 0
+hostname | /tmp
+port | 11002
+status | up
+role | primary
+last_status_change | 2020-01-26 19:08:45
+total_count | 27
+success_count | 27
+fail_count | 0
+skip_count | 0
+retry_count | 0
+average_retry_count | 0.000000
+max_retry_count | 0
+max_duration | 9
+min_duration | 2
+average_duration | 6.296296
+last_health_check | 2020-01-26 19:12:45
+last_successful_health_check | 2020-01-26 19:12:45
+last_skip_health_check |
+last_failed_health_check |
+-[ RECORD 2 ]----------------+--------------------
+node_id | 1
+hostname | /tmp
+port | 11003
+status | down
+role | standby
+last_status_change | 2020-01-26 19:11:48
+total_count | 19
+success_count | 12
+fail_count | 1
+skip_count | 6
+retry_count | 3
+average_retry_count | 0.230769
+max_retry_count | 3
+max_duration | 83003
+min_duration | 0
+average_duration | 6390.307692
+last_health_check | 2020-01-26 19:12:48
+last_successful_health_check | 2020-01-26 19:10:15
+last_skip_health_check | 2020-01-26 19:12:48
+last_failed_health_check | 2020-01-26 19:11:48
+ </programlisting>
+ </para>
+ </refsect1>
+
+</refentry>
diff --git a/doc.ja/src/sgml/reference.sgml b/doc.ja/src/sgml/reference.sgml
index 5375d45c1..75982801b 100644
--- a/doc.ja/src/sgml/reference.sgml
+++ b/doc.ja/src/sgml/reference.sgml
@@ -219,6 +219,7 @@
&showPoolPools
&showPoolVersion
&showPoolCache
+ &showPoolHealthCheckStats
</reference>
<reference id="pgpool-adm">
diff --git a/doc.ja/src/sgml/version.sgml b/doc.ja/src/sgml/version.sgml
index 997e1f0d5..0db052f62 100644
--- a/doc.ja/src/sgml/version.sgml
+++ b/doc.ja/src/sgml/version.sgml
@@ -1 +1 @@
-<!ENTITY version "4.1devel">
+<!ENTITY version "4.2devel">
diff --git a/doc/src/sgml/healthcheck.sgml b/doc/src/sgml/healthcheck.sgml
index 494e46408..220e57028 100644
--- a/doc/src/sgml/healthcheck.sgml
+++ b/doc/src/sgml/healthcheck.sgml
@@ -18,6 +18,15 @@
</caution>
</para>
+ <para>
+ The health check process collects various statistics data such as
+ number of health check count in total. To inspect the statistics
+ data, use <xref linkend="SQL-SHOW-POOL-HEALTH-CHECK-STATS">
+ command. Please note that the data is stored in the shared memory
+ area and it will be initialized upon
+ <productname>Pgpool-II</productname> starting up.
+ </para>
+
<para>
Following parameter names can also have numeric suffix at the end
of each name. The suffix corresponds to backend id, which is
diff --git a/doc/src/sgml/ref/show_pool_health_check_stats.sgml b/doc/src/sgml/ref/show_pool_health_check_stats.sgml
index 130a2b253..387c00bf2 100644
--- a/doc/src/sgml/ref/show_pool_health_check_stats.sgml
+++ b/doc/src/sgml/ref/show_pool_health_check_stats.sgml
@@ -17,7 +17,7 @@
<refnamediv>
<refname>SHOW POOL_HEALTH_CHECK_STATS</refname>
<refpurpose>
- show health check status data
+ show health check statistics data
</refpurpose>
</refnamediv>
@@ -184,7 +184,8 @@
<row>
<entry>last_health_check</entry>
<entry>
- Timestamp of last health check.
+ Timestamp of last health check. If heath check does not
+ performed yet, empty string.
</entry>
</row>
[parent: cb35c9b8d5a1]