ja:documentation:pandorafms:complex_environments_and_optimization:06_ha

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:complex_environments_and_optimization:06_ha [2026/06/19 23:30] – [pandora_server 設定] junichija:documentation:pandorafms:complex_environments_and_optimization:06_ha [2026/06/19 23:35] (現在) – [冗長化構成(HA)] junichi
行 3: 行 3:
 {{indexmenu_n>6}} {{indexmenu_n>6}}
  
-[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] +[[ja:documentation:pandorafms:start|Pandora FMS ドキュメント一覧に戻る]]
- +
  
 ===== 概要 ===== ===== 概要 =====
行 1432: 行 1430:
  
  
-=== サーバ間の SSH 鍵共有 === 
- 
-An OpenSSH server must be installed and running on each host. Suppress the welcome message or banner that displays OpenSSH, run on **all** devices: 
- 
-OpenSSH サーバがインストールされ、各ホストで動作している必要があります。OpenSSH を表示するウェルカムメッセージまたはバナーを抑制します。**すべて** のデバイスで以下を実行します: 
- 
-<code> 
-[ -f /etc/cron.hourly/motd_rebuild ] && rm -f /etc/cron.hourly/motd_rebuild 
-sed -i -e 's/^Banner.*//g' /etc/ssh/sshd_config 
-systemctl restart sshd 
- 
-</code> 
- 
-Share the SSH keys between ''pandora_ha'' and all the existing Percona/MySQL servers in the environment, **run on Pandora FMS server**: 
- 
-''pandora_ha'' と環境内に存在するすべての Percona/MySQL サーバ間で SSH 鍵を共有します。**Pandora FMS サーバで以下を実行します**: 
- 
-<code> 
-printf "\n\n\n" | ssh-keygen -t rsa -P '' 
-ssh-copy-id -p22 root@node1 
-ssh-copy-id -p22 root@node2 
- 
-</code> 
- 
-<WRAP center round important 75%> 
- 
-  * In case you have the installation on Ubuntu Server, enable the **root**  user to connect via SSH. This is done by generating a password to the root user by executing the ''sudo passwd root''  command. 
-  * Then enable the SSH connection of the root user at least through shared keys "**PermitRootLogin without-password**" in the configuration file of the ''sshd''  service. 
- 
-</WRAP> 
- 
-<WRAP center round important 75%> 
- 
-  * Ubuntu Server にインストールしている場合は、**root** ユーザが SSH 経由で接続できるようにします。 これは、''sudo passwd root'' コマンドを実行して root ユーザにパスワードを設定することによって行えます。 
-  * 次に、''sshd'' サービスの設定ファイルにある "**PermitRootLogin without-password**" を使用して、root ユーザの SSH 接続を有効にします。 
- 
-</WRAP> 
- 
-=== 同期スクリプトの利用 === 
- 
-With Pandora FMS server a script is implemented that allows you to synchronize the **SLAVE** database in case it is out of sync. 
- 
-Pandora FMS サーバでは、同期が取れていない場合に **SLAVE** データベースを同期できるようにするスクリプトが実装されています。 
- 
-The manual execution of this script is the following: 
- 
-スクリプトの手動実行は次の通りです: 
- 
-<code> 
-./pandora_ha_resync_slave.sh "pandora_server.conf file" MASTER SLAVE 
- 
-</code> 
- 
-For example, to make a manual synchronization from node 1 to node 2 the execution would be the following: 
- 
-例えば、ノード1 からノード2 へ手動で同期するには、次のように実行します: 
- 
-<code> 
-/usr/share/pandora_server/util/pandora_ha_resync_slave.sh /etc/pandora/pandora_server.conf node1 node2 
- 
-</code> 
- 
-To configure the automatic recovery of the HA environment when there is any synchronization problem between **MASTER** and **SLAVE**, it is necessary to have the configuration token ''splitbrain_autofix'' configured to 1, inside the server configuration file (''/etc/pandora/pandora_server.conf''). 
- 
-**MASTER** と **SLAVE** の間で同期の問題が発生した際に HA 環境の自動回復を設定するには、サーバ設定ファイル(''/etc/pandora/pandora_server.conf'')内の設定トークン ''splitbrain_autofix'' を 1 にする必要があります。  
- 
-So, whenever a [[#ks6_6|Split-Brain]] takes place (both servers have the master role) or there is any synchronization problem between **MASTER**  and **SLAVE**  node, ''pandora_ha''  will try to launch the ''pandora_ha_resync_slave.sh''  script to synchronize from that point the MASTER server status in the SLAVE server. 
- 
-そうすると、[[#スプリットブレイン|スプリットブレイン]] が発生した場合 (両方のサーバがマスターの役割を持っている場合)、または **MASTER** と **SLAVE** の間で同期の問題が発生した場合は、常に ''pandora_ha'' が ''pandora_ha_resync_slave.sh'' スクリプトを起動して、その時点のマスターサーバの状態をスレーブサーバへ同期しようとします。 
- 
-This process will generate events in the system indicating the start, the end and if any error took place in there. 
- 
-この処理は、開始、終了、およびそこでエラーが発生したかどうかを示すイベントをシステムで生成します。 
- 
-<wrap #ks6_4 /> 
- 
-==== Pandora FMS コンソールの設定 ==== 
- 
-<WRAP center round info 60%> 
- 
-Version 770 or later. 
- 
-</WRAP> 
- 
-<WRAP center round info 60%> 
- 
-バージョン 770 以降 
- 
-</WRAP> 
- 
-A new parameter has been added to the ''config.php'' configuration indicating the path of the exchange directory that Pandora FMS uses by default ''/var/spool/pandora/data_in''. 
- 
-Pandora FMS が使用するデータ受け取りディレクトリのパス、デフォルトでは ''/var/spool/pandora/data_in'' を示す新しいパラメータが ''config.php'' に追加されました。 
- 
-If it is configured, it will look for the file ''/var/spool/pandora/data_in/conf/pandora_ha_hosts.conf'' where it will get the IP address to make the connection. 
- 
-設定されている場合、''/var/spool/pandora/data_in/conf/pandora_ha_hosts.conf'' ファイルを探して、接続先の IP アドレスを取得します。 
- 
-<code> 
-$config["remote_config"] = "/var/spool/pandora/data_in"; 
- 
-</code> 
- 
-In Pandora FMS console you could see the cluster status accessing to the Manage HA view. 
- 
-Pandora FMS コンソールでは、HA 管理画面にアクセスしてクラスタの状態を確認できます。 
- 
-<code> 
-https://PANDORA_IP/pandora_console/index.php?sec=gservers&sec2=enterprise/godmode/servers/HA_cluster 
- 
-</code> 
- 
-{{  :wiki:pfms-servers-manage_database_ha-view_nodes.png  }} 
- 
-The data of this view is constantly updated thanks to ''pandora_ha'', there is no need to do any previous configuration procedure to be able to see this section as long as the ''pandora_server.conf'' is correctly configured with the parameters mentioned in the previous section. 
- 
-この画面のデータは、''pandora_ha'' により常に更新されます。''pandora_server.conf'' で前述のパラメータが正しく設定されている限り、このデータを表示するための特別な設定はありません。 
- 
-Among the available actions, you may configure a label for each one of the nodes and you can perform the option to synchronize the **SLAVE** node through the icon{{:wiki:pfms-servers-manage_database_ha-resync_node_icon.png?nolink&}}. 
- 
-実行可能なアクションとしては、各ノードのラベルを設定することができ、{{:wiki:pfms-servers-manage_database_ha-resync_node_icon.png?nolink&}}アイコンにて **SLAVE** ノードを同期するオプションを実行できます。 
- 
-This icon can have the following states: 
- 
-このアイコンには次の状態があります。 
- 
-  * **Green**: Normal, no operation to be performed. 
-  * **Blue**: Pending resynchronization. 
-  * **Yellow**: Resynchronization is in progress. 
-  * **Red**: //Error//, resynchronization failed. 
- 
-  * **緑**: 正常、何の処理も実行されていない。 
-  * **青**: 同期保留中。 
-  * **黄**: 同期実行中。 
-  * **赤**: //エラー//、同期失敗。 
  
  
行 1613: 行 1476:
 </WRAP> </WRAP>
  
-**mysql** > ''CREATE USER slaveuser@% IDENTIFIED WITH mysql_native_password BY 'pandora';''+**mysql** > ''CREATE USER replicationuser@% IDENTIFIED WITH mysql_native_password BY 'pandora';''
  
-**mysql** > ''GRANT REPLICATION CLIENT, REPLICATION SLAVE on *.* to slaveuser@%;''+**mysql** > ''GRANT REPLICATION CLIENT, REPLICATION SLAVE on *.* to replicationuser@%;''
  
 **mysql** > ''CREATE USER pandora@% IDENTIFIED WITH mysql_native_password BY 'pandora';'' **mysql** > ''CREATE USER pandora@% IDENTIFIED WITH mysql_native_password BY 'pandora';''
行 1860: 行 1723:
 *************************** 1. row *************************** *************************** 1. row ***************************
                Slave_IO_State: Waiting for source to send event                Slave_IO_State: Waiting for source to send event
-                  Master_Host: node1+                  Master_Host: pandoraha1
                   Master_User: root                   Master_User: root
                   Master_Port: 3306                   Master_Port: 3306
行 1935: 行 1798:
 </WRAP> </WRAP>
  
-[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]+[[ja:documentation:pandorafms:start|Pandora FMS ドキュメント一覧に戻る]]
  
 ===== (OBSOLETE) データベース HA ===== ===== (OBSOLETE) データベース HA =====
  • ja/documentation/pandorafms/complex_environments_and_optimization/06_ha.1781911821.txt.gz
  • 最終更新: 2026/06/19 23:30
  • by junichi