ja:documentation:05_big_environments:07_server_management

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
最新のリビジョン両方とも次のリビジョン
ja:documentation:05_big_environments:07_server_management [2022/01/30 04:29] – [ヒストリデータベース] junichija:documentation:05_big_environments:07_server_management [2022/12/09 08:43] – [NG 753 およびそれ以前のバージョンにおけるヒストリデータベース] junichi
行 8: 行 8:
 ==== Pandora FMS サーバの手動起動/停止 ==== ==== Pandora FMS サーバの手動起動/停止 ====
  
-To start and / or stop the server manually Pandora FMS is running the following in a shell console:+<WRAP center round info 75%> Bear in mint that if for maintenance reasons you want to manually stop Pandora FMS server, verify whether a service **Watchdog** is running. [[:en:documentation:05_big_environments:07_server_management#watchdog_for_pandora_fms_servers|Check this section]] for more details. </WRAP> 
 + 
 +<WRAP center round info 75%> メンテナンスにより Pandora FMS サーバを手動で停止する場合は、サービス**ウォッチドッグ**が実行されているかどうかを確認してください。詳細は、[[:ja:documentation:05_big_environments:07_server_management#pandora_fms_の_watchdog_実装|こちらの章]]を参照してください。</WRAP> 
 + 
 +To start or stop manually Pandora FMS server execute the followin in a shell console:
  
 Pandora FMS を手動で起動・停止するには、コマンドラインから以下を実行します。 Pandora FMS を手動で起動・停止するには、コマンドラインから以下を実行します。
  
-Stop daemon:+  * Stop the //[[:en:documentation:01_understanding:03_glossary#daemon|daemon]]// : 
 + 
 +  * //[[:ja:documentation:01_understanding:03_glossary#daemon|デーモン]]//の停止 :
  
-デーモンの停止: 
 <code> <code>
  
行 21: 行 26:
 </code> </code>
  
-Start daemon:+  * Start the daemon:
  
-デーモンの起動:+  * デーモンの起動:
  
 <code> <code>
行 30: 行 35:
 </code> </code>
  
-Restart daemon:+  * Restart the daemon:
  
-デーモンの再起動:+  * デーモンの再起動:
  
 <code> <code>
行 55: 行 60:
 Pandora FMS サーバ **のみ** を手動で起動・停止するには、コマンドラインから次のように実行します。 Pandora FMS サーバ **のみ** を手動で起動・停止するには、コマンドラインから次のように実行します。
  
-Stop daemon:+  * Stop the daemon:
  
-デーモンの停止:+  * デーモンの停止:
  
 <code> <code>
行 64: 行 69:
 </code> </code>
  
-Start daemon:+  * Start the daemon:
  
-デーモンの起動:+  * デーモンの起動:
  
 <code> <code>
行 73: 行 78:
 </code> </code>
  
-Restart daemon:+  * Restart the daemon:
  
-デーモンの再起動:+  * デーモンの再起動:
  
 <code> <code>
行 93: 行 98:
  
 ==== データベース管理 ==== ==== データベース管理 ====
-Pandora FMS インフラストラクチャは外部メンテナンスを必要としませんが、古いデータを削除し、データベースをできるだけコンパクトに維持することが非常に重要です。 これらのタスクの実行を担当する Pandora FMS に不可欠なツールが以下にあります。 
  
-  /usr/share/pandora_server/util/pandora_db.pl+Pandora FMS infrastructure does not need external maintenance, but it is very important to purge old data, and maintain the database as much compacted as possible. There is an essential tool for the proper functioning of Pandora FMS which is in charge of carrying out these tasks.
  
-Pandora FMS Enterprise 版の場合以下です。+Pandora FMS インフラストラクチャ外部メンテナンスを必要としませんが、古いデータを削除し、データベースをきるだけコンパクトに維持することが非常に重要です。 これらのタスクの実行を担当する Pandora FMS に不可欠なツールがあります。
  
-  /usr/bin/pandora_db+In Pandora FMS Open version its location is:
  
-このツール(以降 **pandora_db.pl**)は、Pandora FMS バパッケージに含まれているため、Pandora FMS サーバがインストールされているシステムから実行する必要があります。 コンソール用とサーバ用で 2つのシテムがある場合、Pandora FMSサーバがホストされている方で //pandora_db// を実行する必要があります。 +Pandora FMS ンソースでは以下にあります。
-//Pandora_db// 、Pandora FMS が適切に動作するための重要なツールです。そのため、システムの cron タスクで一時間ごとに実行するように設定されています。 以下のファイルで設定されています。+
  
-  /etc/cron.hourly/pandora_db+<code> 
 +/usr/share/pandora_server/util/pandora_db.pl 
 + 
 +</code> 
 + 
 +{{:wiki:icono-modulo-enterprise.png?23x23  |Versión Enterprise}}Or here in case of Pandora FMS Enterprise version: 
 + 
 +{{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise 版}}Pandora FMS Enterprise 版の場合は以下です。 
 + 
 +<code> 
 + 
 +/usr/bin/pandora_db 
 + 
 +</code> 
 + 
 +This tool, hereinafter **pandora_db.pl**  is included in Pandora FMS server package, so it must be executed from a system where there is a Pandora FMS server installed. If there are two systems, one for the console and one for the server, **pandora_db**  must be executed where Pandora FMS server is hosted. 
 + 
 +このツール(以降 **pandora_db.pl**)は、Pandora FMS サーバパッケージに含まれているため、Pandora FMS サーバがインストールされているシステムから実行する必要があります。 コンソール用とサーバ用で 2つのシステムがある場合、Pandora FMS サーバがホストされている方で **pandora_db** を実行する必要があります。 
 + 
 +**Pandora_db**  is a key tool for Pandora FMS to work properly, and that is why its execution is programmed in system cron tasks with an **hourly interval**. Its execution is configured within the file: 
 + 
 +**Pandora_db** は、Pandora FMS が適切に動作するための重要なツールです。そのため、システムの cron タスクで一時間ごとに実行するように設定されています。 以下のファイルで設定されています。 
 + 
 +<file> 
 +/etc/cron.hourly/pandora_db 
 + 
 +</file>
  
 このツールは、データベースの全てのメンテナンスを自動的に実行します。 このツールは、データベースの全てのメンテナンスを自動的に実行します。
  
-  * 古いデータの削除をします。+  * **It deletes old data**. 
 +  * **It compresses existing data**, interpolating them at several intervals, so that graphics are the same but the space needed to store them is much smaller (this is one reason why Pandora FMS is able to process such an amount of information). 
 +  * **It checks the consistency of the database for non-existing modules**, or modules that are not used because they can not be started (these modules appear in the tactical view as uninitialized modules). 
 +  * **It deletes the daily agent contact information**. Pandora FMS does not need more than 24hr agent contact history, and if it builds up, it slows down database access. 
 +  * {{:wiki:icono-modulo-enterprise.png?23x23  |Versión Enterprise}}In the enterprise version, it **moves**  all old data to the standby history database.
  
-  * 既存のデータを圧縮し、いくつかの間隔を補間します。これにより、グラフは同じですが、それらを保存するために必要なスペースははるかに小さくなります(これが、Pandora FMS が大量の情報を処理できる理由の 1つです)。+  * **古いデータの削除をします。** 
 +  * **既存のデータを圧縮**し、いくつかの間隔を補間します。これにより、グラフは同じですが、それらを保存するために必要なスペースははるかに小さくなります(これが、Pandora FMS が大量の情報を処理できる理由の 1つです)。 
 +  * 存在しないモジュールのデータベースでの整合性や、初期化されていないために利用されていないモジュール (これらのモジュールは、未初期化モジュールとして表示されます) を**チェックします**。 
 +  * **エージェントの一日の接続情報を削除します**。Pandora FMS は、24時間を越えるエージェント接続情報は必要としません。もし、それが増えると、データベースのアクセス速度が低下します。 
 +  * {{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise 版}}Enterprise 版では、全ての古いデータをスタンバイデータベースに移動します
  
-  存在しないモジュールのデータベースでの整合性や、初期化されていないために利用されていないモジュール (これらのモジュールは、未初期化モジュールとして表示されますをチェックします。+As mentioned before, **pandora_db**  execution is configured in system [[http://en.wikipedia.org/wiki/Cron_(Unix)|cron]] tasks and although this execution is automatically included in Pandora FMS server installation, it is convenient to check it. Therefore, ''/etc/cron.hourly/pandora_db''  must exist and contain the following.
  
-  エージェント一日接続情報を削除します。Pandora FMS は、24時間を越えるエジェント接続情報は必要としせん。もし、それが増えると、データベースアクセス速度低下します。+前述したように、**pandora_db** の実行はシステムの cron タスクで設定されます。この設定は Pandora FMS バのイールに自動的に含まれます、確認すると良いでしょう。 ''/etc/cron.hourly/pandora_db'' が存在し含まれている必要があります。
  
-  * エンタープライズ版では、全ての古いデータをスタンバイデータベースに移動します。+In Pandora FMS Open version:
  
-前述したように、//pandora_db// の実行はシステムの cron タスクで設定され、この実行は Pandora FMS バのインストールに自動的に含まれますが、確認すると良いでしょう。 ///etc/cron.hourly/pandora_db// が存在し、次行が含まれている必要があります。+Pandora FMS ソー場合:
  
-  "/usr/share/pandora_server/util/pandora_db.pl" "/etc/pandora/pandora_server.conf" >/dev/null 2>&1+<code>
  
-Pandora FMS Enterprise 版では以下の通りです。+"/usr/share/pandora_server/util/pandora_db.pl" "/etc/pandora/pandora_server.conf">/dev/null 2>&1
  
-  "/usr/bin/pandora_db" "/etc/pandora/pandora_server.conf" >/dev/null 2>&1+</code>
  
-パーミッションとファイルの所有者を確認することも同様に重要です。 正しいパーミッションは 755 です。これは、次を実行することで付与できます。+Or in Pandora FMS Enterprise version:
  
-  chmod 755 /etc/cron.hourly/pandora_db+Pandora FMS Enterprise 版の場合: 
 + 
 +<code> 
 +"/usr/bin/pandora_db" "/etc/pandora/pandora_server.conf">/dev/null 2>&
 + 
 +</code> 
 + 
 +It is equally important to check permissions and the file's owner. The appropriate file permissions would be ''755'', which can be granted by executing: 
 + 
 +パーミッションとファイルの所有者を確認することも同様に重要です。 正しいパーミッションは ''755'' です。これは、次を実行することで付与できます。 
 + 
 +<code> 
 +chmod 755 /etc/cron.hourly/pandora_db 
 + 
 +</code> 
 + 
 +Regarding the owner, it must be **root**  both for the user and group, which is set executing:
  
 所有者に関しては、ユーザとグループ共に "root" である必要があり、次のように設定できます。 所有者に関しては、ユーザとグループ共に "root" である必要があり、次のように設定できます。
  
-  chown root:root /etc/cron.hourly/pandora_db+<code> 
 +chown root:root /etc/cron.hourly/pandora_db 
 + 
 +</code>
  
 ==== メンテナンスツールの手動実行 ==== ==== メンテナンスツールの手動実行 ====
行 470: 行 526:
  
 ==== ヒストリデータベース ==== ==== ヒストリデータベース ====
 +
 +{{  :wiki:pfms-databases-sql.png?nolink&  }}
  
 {{:wiki:icono-modulo-enterprise.png?23x23  |Versión Enterprise}}A **history database** is a database where old module data is transferred to make the main Pandora FMS database more responsive for everyday operations. That data will still be available for Pandora FMS console when viewing reports, module charts etc. {{:wiki:icono-modulo-enterprise.png?23x23  |Versión Enterprise}}A **history database** is a database where old module data is transferred to make the main Pandora FMS database more responsive for everyday operations. That data will still be available for Pandora FMS console when viewing reports, module charts etc.
行 475: 行 533:
 {{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise 版}}ヒストリデータベースは、メインの Pandora FMS データベースの応答を良くするために、そこから古いモジュールデータを移動させ保存しておくためのものです。データは、レポートやモジュールグラフの参照時に Pandora FMS コンソールでシームレスに利用できます。 {{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise 版}}ヒストリデータベースは、メインの Pandora FMS データベースの応答を良くするために、そこから古いモジュールデータを移動させ保存しておくためのものです。データは、レポートやモジュールグラフの参照時に Pandora FMS コンソールでシームレスに利用できます。
  
-=== ヒストリデータベースの成 === +=== ヒストリデータベースの設定 === 
-ヒストリデータベースを設定するには、それを格納する(メインのデータベースとは異なる)新たなサーバが必要です。MySQL をインストールしたサーバを準備したら、以下の手順を実行します。+ 
 +<WRAP center round info 75%> 
 + 
 +Version NG 754 and later versions{{:wiki:icono-modulo-enterprise.png?23x23|Enterprise version}}. 
 + 
 +</WRAP>\\ 
 + 
 +<WRAP center round info 75%> 
 +バージョン NG 754 およびそれ以降{{:wiki:icono-modulo-enterprise.png?23x23|Enterprise 版}} 
 +</WRAP>\\ 
 + 
 +{{:wiki:icono-modulo-enterprise.png?23x23  |Versión Enterprise}}To configure a historical database, it is necessary to have a new server where to host it (**different from the one of the main database**). Once you have that server where MySQL is installed, follow these steps: 
 + 
 +{{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise 版}}ヒストリデータベースを設定するには、それをホストする新しいサーバが必要です(**メインデータベースのサーバとは異なります**)。MySQL がインストールされているサーバを用意したら、次の手順に従います。 
 + 
 +In Pandora FMS console, go to ►**Setup** → **Setup** → **Historical database** to access [[:en:documentation:04_using:12_console_setup#the_history_database|connection configuration]] (**Configure connection target**). 
 + 
 +Pandora FMS コンソールで、**セットアップ(Setup)** → **セットアップ(Setup)** → **ヒストリデータベース(Historical database)** へ行き、[[:ja:documentation:04_using:12_console_setup#ヒストリデータベース|接続設定]] (**接続先設定(Configure connection target)**) にアクセスします。 
 + 
 +{{  :wiki:pandora_console_06.png  }} 
 + 
 +Fill in the following fields: 
 + 
 +次のフィールドを入力します。 
 + 
 +  * **Host**: Host name (web link or IP address) of the history database. 
 +  * **Port**: Connection port of the history database. Stardard value: ''3306''
 +  * **Database name**: Name of the history database. Default value: ''pandora''
 +  * **Database user**: History database user. Default value: ''pandora''
 +  * **Database password**: Password of the history database. This will allow to cennect to the history database. Next fill in the custom parameters (**Customize settings**): 
 + 
 +  * **ホスト(Host)**: ヒストリデータベースのホスト名(または IP アドレス) 
 +  * **ポート(Port)**: ヒストリデータベースの接続ポート番号。標準は、''3306'' です。 
 +  * **データベース名(Database name)**: ヒストリデータベースの名前。デフォルトは ''pandora'' です。 
 +  * **データベースユーザ(Database user)**: ヒストリデータベースユーザ。デフォルトは ''pandora'' です。 
 +  * **データベースパスワード(Dabase password)**: ヒストリデータベースのパスワード。これにより、ヒストリデータベースに接続できるようになります。 次に、カスタムパラメータを入力します(**設定のカスタマイズ**): 
 + 
 +{{  :wiki:pandora_console_06-1.png  }} 
 + 
 +The last fields of this form **Data days old to keep in active database, Transference block size (Step)**  and **Delay betewwn transferences (seconds)**  will define the way in which the data will be sent to the historical database, that is, the oldest data those with more than n //days (Data days)//  will be moved to the history database in blocks of made of n rows (//Step//) waiting n seconds (//Delay//) between one block and the next to avoid overloads. 
 + 
 +このフォームの最後のフィールド**アクティブなデータベースに保持するデータ日数、転送ブロックサイズ(ステップ)** および **転送の遅延(秒)** は、データがヒストリデータベースへ送信される方法を定義します。つまり、オーバーロードを避けるために、n //日(データ日)//以上前の古いデータが、n 行(//ステップ//)単位で、それぞれの送信単位の間に n 秒(//遅延//)待機しながらヒストリデータベースに移動されます。 
 + 
 +In the same screen, it is also possible to decide whether to send the events with more than n days to the history database (**Events days old to keep in active database**), although it must be taken into account that including the events will considerably increase the growth rate of the historical database, and that these will only be consulted when generating reports, not in the event view. 
 + 
 +同じ画面で、n 日を超えるイベントをヒストリデータベースに送信するかどうかを決定することもできます(**アクティブなデータベースにイベントを保持する日数**)。ただし、 イベントはヒストリデータベースを大幅に増大させることと、レポートを生するときにのみ参照されイベント表示では参照されない点を考慮する必要があります。 
 + 
 +<WRAP center round tip 75%> 
 + 
 +{{:wiki:icono-modulo-enterprise.png?23x23  |Versión Enterprise}}The historical database is a feature of the Enterprise version that uses the ''/usr/bin/pandora_db''  binary to transfer data. In addition, you must configure the settings [[:en:documentation:04_using:12_console_setup#history_database_maintenance_options|for the maintenance of the history database]]. 
 + 
 +</WRAP> 
 + 
 +<WRAP center round tip 75%> 
 +{{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise 版}}ヒストリデータベースは、''/usr/bin/pandora_db'' バイナリを使用してデータを転送する Enterprise 版の機能です。加えて、[[:ja:documentation:04_using:12_console_setup#ヒストリデータベースメンテナンスオプション|ヒストリデータベースのメンテナンス]]設定を行う必要があります。 
 +</WRAP> 
 + 
 +=== NG 753 およびそれ以前のバージョンにおけるヒストリデータベース === 
 + 
 +<WRAP center round info 75%> 
 + 
 +These steps are only for version 753 and previous versions. From version 754 the only thing necessary is to configure the connection values explained in the previous section and Pandora FMS will take care of the whole installation process and the [[:en:documentation:04_using:12_console_setup#history_database_maintenance_options|maintenance of the historical database]]. 
 + 
 +</WRAP> 
 + 
 +<WRAP center round info 75%> 
 +こちらの手順は、バージョン 753 およびそれ以前のバージョンのみを対象としています。バージョン 754 以降、必要なのは前の章で説明した接続値を設定することだけです。Pandora FMS は、インストールプロセス全体と [[:ja:documentation:04_using:12_console_setup#ヒストリデータベースメンテナンスオプション|ヒストリデータベースのメンテナンス]]を処理します。 
 +</WRAP> 
 + 
 +{{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise version}}To configure a historical database, it is necessary to have a new server where to host it (**different from the one of the main database**). Once you have that server where MySQL is installed, follow these steps: 
 + 
 +{{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise 版}}ヒストリデータベースを設定するには、それを格納する(メインのデータベースとは異なる)新たなサーバが必要です。MySQL をインストールしたサーバを準備したら、以下の手順を実行します。 
 + 
 +   * Create the new historical database:
  
-  * 新たなヒストリデータベースを作成します。+   * 新たなヒストリデータベースを作成します。
  
 <code> <code>
行 485: 行 616:
 </code> </code>
  
-  * Pandora FMS データベーススキーマを作成します。Pandora FMS コンソールと共に提供されている ///var/www/html/pandora_console/pandoradb.sql// が利用できます。それをヒストリデータベースサーバへコピーします。+  * Create Pandora FMS database schema. You may use the script ''/var/www/html/pandora_console/pandoradb.sql''  included in Pandora FMS console, copying it to the historical database server:
  
-  cat pandoradb.sql | mysql -u user -p -D history_db+  * Pandora FMS データベーススキーマを作成します。Pandora FMS コンソールと共に提供されている ''/var/www/html/pandora_console/pandoradb.sql'' が利用できます。それをヒストリデータベースサーバへコピーします。
  
-  * ヒストリデータベースにアクセスできるように Pandora FMS サーバとコンソールで利用するユーザのパーミッションを設定します。+<code bash> 
 +cat pandoradb.sql | mysql -u root -p -D pandora_history
  
-  GRANT ALL PRIVILEGES ON pandora_history.* TO 'user'@'%' IDENTIFIED BY 'password'; 
-   
-=== ヒストリデータベースの設定 === 
  
-  * Pandora FMS コンソールにて、設定(setup) -ヒストリデータベース(History database) を選択し、データベースのホスト名、ポート番号、データベース名、ユーザ名、パスワードを入力します。+</code>
  
-{{  :wiki:pandora_console_06.png  }}+  * Grant permissions to a user (''user''  and ''password)''  which will be used from the Pandora FMS server and console to send and check historical data:
  
-{{  :wiki:pandora_console_06-1.png  }}+  * ヒストリデータベースにアクセスできるように Pandora FMS サーバとコンソールで利用するユーザのパーミッション(''user'' と ''password'')を設定します。
  
-このフォームの最後のフィールド(//Days//, //step//, //delay//)は、どのデータをヒストリデータベースへ送るかを定義します。//Days// に指定した日より古いデータを、//Step// に指定した行ブロックごとにヒストリデータベースに移動します。高負荷になることを防ぐために、一つのブロックを処理したあとは、次の処理までに //Delay// に指定した時間待ちます。+**For MySQL 5.7**
  
-同じ画面で、//イベン(Event days)// に定するイベントの履歴をヒストリデータベースに送信るかどうか設定することできます。ただしイベントを含めるとヒストリデータベースが大幅に大きくなること考慮する必要があります。また、のデータはイント表示ではなく、レポ生成時にみ参照されます。+**MySQL 5.7 向け:** 
 + 
 +<code bash> 
 +GRANT ALL PRIVILEGES ON pandora_history.* TO 'user'@'%' IDENTIFIED BY 'password'; 
 + 
 + 
 +</code> 
 + 
 +**For MySQL 8:** 
 + 
 +**MySQL 8 向け:** 
 + 
 +  * ''$DBROOTPASS'': MySQL 8 **root**  user password. 
 +  * ''$DBUSER'': MySQL 8 user name. 
 +  * ''$DBPASS'': MySQL 8 user password. 
 +  * ''$DBPORT'': Connection port for MySQL 8. 
 +  * ''$DBHOST'': IP address or FQDN of the MySQL server 8. 
 +  * ''$DBNAME'': Name of the database. 
 + 
 +  * ''$DBROOTPASS'': MySQL 8 **root** ユーザパスワード。 
 +  * ''$DBUSER'': MySQL 8 ユーザ名。 
 +  * ''$DBPASS'': MySQL 8 ユーザパスワード。 
 +  * ''$DBPORT'': MySQL 8 用接続ポー。 
 +  * ''$DBHOST'': MySQL 8 サーバの IP アドレスまたは FQDN。 
 +  * ''$DBNAME'': データベース名。 
 + 
 +To use these environment variables just define them before running //grants// in the terminal, enter the following: 
 + 
 +これらの環境変を使用するには、//GRANT// を実行する前次のようにターミナルで設定するだけです。 
 + 
 +<code bash> 
 +env TZ='Europe/Madrid'
 + DBHOST='127.0.0.1'
 + DBNAME='pandora'
 + DBUSER='pandora'
 + DBPASS='pandora'
 + DBPORT='3306'
 + DBROOTPASS='pandora' 
 + 
 +</code> 
 + 
 +Enter in the terminal: 
 + 
 +ターミナルで以下実行します: 
 + 
 +<code bash> 
 +systemctl restart mysql 
 + 
 +</code> 
 + 
 +Enter in the terminal: 
 + 
 +ターミナルで以下を実行します: 
 + 
 +<code bash> 
 + 
 +export MYSQL_PWD=$DBROOTPASS 
 +echo "CREATE USER  \"$DBUSER\"@'%' IDENTIFIED BY \"$DBPASS\";" | mysql -uroot -P$DBPORT -h$DBHOST 
 +echo "ALTER USER \"$DBUSER\"@'%' IDENTIFIED WITH mysql_native_password BY \"$DBPASS\"" | mysql -uroot -P$DBPORT -h$DBHOST 
 +echo "GRANT ALL PRIVILEGES ON $DBNAME.* TO \"$DBUSER\"@'%'" | mysql -uroot -P$DBPORT -h$DBHOST 
 + 
 +export MYSQL_PWD=$DBPASS 
 + 
 + 
 +</code> 
 + 
 +The history database (DB) can contain //all the system data//  (without limit), but if you want to delete data or compact them from the history database, you will need to use specific data in the database that the **pandora_db**  script takes into account when executing from the node. 
 + 
 +ヒストリデータベース(DB)は//べてのシステムデータ//(無制限)含めることできます、ヒストリデータベースからデータ削除または圧縮する場合は**pandora_db** スクリプトがノードから実行される際設定を示すデータベース内特定データを使用する必要があります。 
 + 
 +<WRAP center round info 60%> 
 + 
 +Remember that all these steps are only for version 753 and earlier versions.
  
-<WRAP center round tip 60%> 
-ヒストリデータベースの機能は Enterprise 版の機能で、データを転送するのに /usr/bin/pandora_db バイナリを用います。 
 </WRAP> </WRAP>
  
-=== ヒストリデータベース削除と圧縮設定 === +<WRAP center round info 60%> 
-ヒストリデータベースは、"過去全デタ" 保存するこを想定しています。しかし、古いデータを削除したり圧縮したい場合は、pandora_db スクリプトを通常の DB に対す動作見せかけて実行する必要があります。そのためには、ヒストリデータベースに何らかのデータが入っている必要があります+これら手順すべてバージョン 753 以前ジョンのみ対象としていること注意しください。 
 +</WRAP>
  
-最初に、pandora_db ツールによって利用できるように、//tconfig// テーブルを適切な値を入れた状態で用意する必要があります。pandora_db の実行に必要な最小限の設定を行うために、ヒストリデータベースに対して以下の SQL を実行します。まずは、mysql の CLI を利用して、データベースに接続する必要があります。+First, enter some data from the history database in //tconfig//  table. Use this SQL queries to create a minimal configuration and configure the performance od **pandora_db**  when executed against the history database. First you need to connect to your database using the command line (CLI) of MySQL.
  
-以下が例です。値は必要に応じてき換えてください。(ただし、history_db_enabled は にしてください)+まず、ヒストリデータベースのデータを //tconfig// テーブルに入力します。 この SQL クエリを使用して最小限の設定を作成し、**pandora_db** ヒストリデータベースに対して実行される際の設定をします。 まず、MySQL のコマンドライン(CLI)を使用してデータベースに接続する必要があります。 
 + 
 +This is an example, replace values according to your criteria (but leave ''history_db_enabled''  at zero): 
 + 
 +これは例です。値は好みに応じてき換えます(ただし、''history_db_enabled'' ゼロのままにします)
  
 <code> <code>
- INSERT INTO `tconfig` VALUES (1,'days_purge','180'); + 
- INSERT INTO `tconfig` VALUES (2,'history_db_enabled','0'); +INSERT INTO `tconfig` VALUES (1,'days_purge','180'); 
- INSERT INTO `tconfig` VALUES (3,'days_compact','120'); +INSERT INTO `tconfig` VALUES (2,'history_db_enabled','0'); 
- INSERT INTO `tconfig` VALUES (4,'step_compact','1'); +INSERT INTO `tconfig` VALUES (3,'days_compact','120'); 
- INSERT INTO `tconfig` VALUES (5,'event_purge','180'); +INSERT INTO `tconfig` VALUES (4,'step_compact','1'); 
- INSERT INTO `tconfig` VALUES (6,'string_purge','180'); +INSERT INTO `tconfig` VALUES (5,'event_purge','180'); 
- INSERT INTO `tconfig` VALUES (7,'MR','0');+INSERT INTO `tconfig` VALUES (6,'string_purge','180'); 
 +INSERT INTO `tconfig` VALUES (7,'MR','<actual MR value>');
  
 </code> </code>
  
-これは、ヒストリデータベースに(現在からさかのぼること6ヶ月間データを保存し、4ヶ月前のデータを圧縮することを意味します。メインのデータベースに 1ヶ月間のデータがあるとしても、トータルで 6ヶ月間のデータとなります。なぜなら、直近 1ヶ月のデータはメインデータベースから読まれ、それ以外はヒストリデータベースから読まれるためです。これらには任意の値を設定できます。ヒストリデータベースにはデータ量の上限はありません。ただし、ヒストリデータベースは、メインデータベースおよび Pandora FMS サーバやコンソールが動作しているマシンとは物理的に異なるマシンに配置しなければいけないことを理解してください。+  * Take special care to replace ''< actual MR value >''  with the current MR value that you currently have in the main Pandora FMS server. 
 +  * This example is for the history database ito store for 6 months (180 daysfrom the execution date (''days_purge''). 
 +  * Compact data more than 120 days old (''days_compact''). 
 +  * If you have month worth of data in your main database, you will have a total of months of data, because the last month has no data in the history database, but it has them in the main database (''event_purge''  y ''string_purge''). 
 +  * //Use the values that you think convenient//  (except for ''MR''  and ''history_db_enabled''). The limit in the storage of the history database only depends on the free space of the machine. **Just remember that the history database must be in a physical server independent**  from the main database and Pandora FMS.
  
-に、追加の //pandora_server.conf// ファイル作成る必要があります。以下示す簡単例を利用して(各値は実際のヒストリデータベースに合わせて書き換えてください///etc/pandora/pandora_server_history_db.conf// として作成してください。+  * ''< actual MR value >'' を、メインの Pandora FMS サーバの現在の MR 値置き換える場合は特に注意してください。 
 +  * この例はヒストリデータベースに過去 6ヵ月間(180日)データ保存しま。(''days_purge''
 +  * 120日よ古いデータを圧縮します。(''days_compact''
 +  * メインデータベースに最低 1ヵ月分のデータがある場合、前月分がヒストリデータベースになもメインデータベースにはデータがあるため、合計 6か月のデータを参照できます。(''event_purge'' および ''string_purge''
 +  * //各値は任意に変更してください//(''MR'' および ''history_db_enables'' は除く)。ヒストリデータベースストレージの上限は、マシンの空き容量にのみ依存します。 **ヒストリデータベースは、メインデータベースおよび Pandora FMS から独立した物理サーバ** ある必要があることに注意してください。 
 + 
 +<WRAP center round tip 75%> 
 + 
 +In versions prior to Pandora FMS 753 you must execute the script **pandora_db**  in the history server itself using the data specified previously in the database and additionnally create the configuration file as explained below, in order to use the maintenance script as if we were using a normal database. 
 + 
 +</WRAP> 
 + 
 +<WRAP center round tip 75%> 
 +Pandora FMS 753 以前のバージョンでは、通常のデータベースのように、データベースであらかじめ設定したデータを使用してヒストリデータベースサーバ自体でメンテナンススクリプト **pandora_db** を実行し、さらに以下で説明するように設定ファイルを作成する必要があります。 
 +</WRAP> 
 + 
 +In versions prior to Pandora FMS 753, create an additional ''pandora_server.conf''  file. Use this small version to create your own and name it ''/etc/pandora/pandora_server_history_db.conf'' 
 + 
 +Pandora FMS 753 以前のバージョンでは、追加の ''pandora_server.conf'' ファイルを作成します。独自の設定ファイルとして ''/etc/pandora/pandora_server_history_db.conf''う名前を付けます
  
 <code> <code>
 dbengine mysql dbengine mysql
-dbname pandora4_history +dbname pandora_history 
-dbuser pandora4_history +dbuser user 
-dbpass 1234 +dbpass password 
-dbhost 192.168.50.23+dbhost 192.168.70.140
 log_file /var/log/pandora/pandora_db_history.log log_file /var/log/pandora/pandora_db_history.log
 +
 </code> </code>
  
 +<WRAP center round info 60%>
 +
 +Remember that all these steps are only for version 753 and earlier versions.
 +
 +</WRAP>
 +
 +<WRAP center round info 60%>
 +これらの手順はすべて、バージョン 753 以前のバージョンのみを対象としていることに注意してください。
 +</WRAP>
 +
 +Now you can execute **pandora_db**  tool against the history database configuration and program it for its periodical execution:
  
-これで、ヒストリデータベースに対して pandora_db ツール定期実行をプログラムできます。+これで、ヒストリデータベースに対して **pandora_db** ツールを実行できるようになり、定期的に実行するように設定できます。
  
 <code> <code>
行 548: 行 787:
 </code> </code>
  
-また、設定値[[:ja:documentation:04_using:12_console_setup#ヒストリデータベースメンテナンスオプション|こちら]]説明してようにコルからも入力でき+<WRAP center round tip 60%> This process SHOULD NOT affect your main operation because it is running against a different database in a different server. </WRAP> 
 + 
 +<WRAP center round tip 60%>この処理、別のサーバの別のデータベースにして実行されため、メイのデタベースには影響を与えせん</WRAP> 
 + 
 + 
 + 
 + 
 +[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]
  
-<WRAP center round tip 60%> 
-この処理は、メインのデータベースには影響しません。なぜなら、異なるサーバの異なるデータベースに対して行っているためです。 
-</WRAP>