ja:documentation:pandorafms:complex_environments_and_optimization:08_optimization

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:complex_environments_and_optimization:08_optimization [2024/11/12 02:38] – [キャパシティ分析ツール (Capacity)] kanayamaja:documentation:pandorafms:complex_environments_and_optimization:08_optimization [2025/02/26 02:42] (現在) – [全体の再構築] junichi
行 1114: 行 1114:
 === 全体の再構築 === === 全体の再構築 ===
  
-This section affects only **InnoDB** databases. Pandora FMS is built on Innodb databases.+The **PFMS server** must first be stopped:
  
-この節の説明は、Innodb データベースのみ該当しす。Pandora FMS は、Innodb デタベース利用しています。+ず**PFMS サバ**停止する必要があります。
  
-Unfortunately, MySQL is degraded with time, and this affects the global performance of the system.There is no other solution that does not involve rebuilding all the database schemes from scratch, rebuilding the data binary file that MySQL uses to store all the information and the files used to rebuild the transactions.+<code bash> 
 +systemctl stop pandora_ha
  
-時間ともに MySQL のパフォーマンスが落ちると、システム全体のパフォーマンスに影響します。この場合は、すべてのデータベーススキーマをゼロから再構築する以外に解決策はありません。MySQL がデータの保存に利用しているバイナリファイルを利用し、またそれを再構築します。+</code>
  
-If you take look at the ''/var/lib/mysql'' directory, you may see that there are three files, that have always the same nameand that are, depending on the severity of the case, hugeIn this example:+Secondly, an export of all schemas and data must be done. Choose a directory of the machinein a partition that has enough space to store the backup of the database in case it is a large databaseThe following command is executed:
  
-''/var/lib/mysql'' ィレクトと、常同じ名前を持ち状態応じて非常に大きサイズのファイルが 3 つあることがわかります。この例では、次のようになります。 +次に、すべてのスキーマとータのエスポートを実行す必要があります。データベースが大きい場合備えてデータベースのバックアップを保存するの十分スペースがあるパーティション内のディレクトリを選択します。次のコマンドを実行します。
-<file> +
- -rw-rw----  1 mysql mysql 4.8G 2012-01-12 14:00 ibdata1 +
- -rw-rw----  1 mysql mysql 5.0M 2012-01-12 14:00 ib_logfile0 +
- -rw-rw----  1 mysql mysql 5.0M 2012-01-12 14:00 ib_logfile1+
  
-</file>+<code bash> 
 +mysqldump -uroot -p pandora --single-transaction > backup.sql
  
-The ''ibdata1'' file is the one that stores all the system Innobd data. In a very fragmented system that has not been "rebuilt" or "installed" for a long time, this system will be big but little efficient. The ''innodb_file_per_table'' parameter, that was [[#ks1_3|mentioned before]], regulates part of this performance.+</code>
  
-''ibdata1'' ファイルは、すべてのシステム Innobd データを保存するファイルです。長い間「再構築」または「インストール」されていない非常に断片化されたシステムでは、これは大きくなり効率は下がります。[[#ks1_3|前に説明した]] ''innodb_file_per_table'' パラメータは、このパフォーマンスの一部を制御します。+After finishing the process we will have in the file ''backup.sql'' the data, in the directory where we are.
  
-Similarly, each database has in the ''/var/lib/mysql'' **directory,** one directory to define its structure. Delete them too.+処理が完了すると、現在のディレクトリ内のファイル ''backup.sql'' にデータが格納されます。
  
-同様に、各データベースは ''/var/lib/mysql'' **ディレクトリ** 内に、その構造を定義する 1 つのディレクトリがあります。これらも削除します。+Once this is done, MySQL is stopped with:
  
-The process is quite easy:+これが完了したら、MySQL を次のように停止します。
  
-手順はとても簡単です。+<code bash> 
 +systemctl stop mysqld.service
  
-  - Dump (via **mysqldump**) all the schemes to the disk:+</code> 
 + 
 +Access the MySQL installation directory in ''/var/lib/mysql'' and delete the files named ''binlog.000001'', ''binlog.000002'' … and ''binlog.index''. In addition, we will delete the directory with the same name as the database ''pandora''.
  
-  - すべてのマをディクにダンプします (**mysqldump**  経由)+MySQL インディトリ (''/var/lib/mysql''アクセスし、''binlog.000001''、''binlog.000002''、… および ''binlog.index'' という名前のファイルを削除します。さらに、データベース ''pandora'' と同じ名前のディレクトリも削除します。
  
 <code bash> <code bash>
-mysqldump -u root --A> alldata.sql+rm -rf /var/lib/mysql/pandora 
 +rm -rf /var/lib/mysql/binlog.0* 
 +rm -rf /var/lib/mysql/binlog.index
  
 </code> </code>
  
-  * Stop MySQL. +Once these steps are donewe will start MySQL again with:
-  * Delete ''ibdata1'', ''ib_logfile0''''ib_logfile1''  and the InnoDB database directories +
-  * Start MySQL+
-  * Create ''pandora''  database again (''create database pandora;''+
-  * Import the backup file (''alldata.sql'')+
  
-  * MySQL を停止ます。 +これらの手順が完了たら次のコマンドで MySQL を再起動します。
-  * ''ibdata1'' ''ib_logfile0'' 、''ib_logfile1'' 、およびInnoDBデータベースディレクトリを削除します。 +
-  * MySQL を再起動します。 +
-  * ''pandora''  データベースを再度作成します (''create database pandora;''+
-  * バックアップファイル(''alldata.sql'' )をインポートします+
  
 <code bash> <code bash>
-mysql -u root -p+systemctl start mysqld.service
  
 </code> </code>
 +
 +Access the MySQL terminal with the following command:
 +
 +次のコマンドで MySQL ターミナルにアクセスします。
 +
 +<code bash>
 +mysql -uroot -p pandora
 +
 +</code>
 +
 +The ''pandora'' database will be selected, but it will be empty. The following command is used to import in the database the //backup// that we did from the Pandora FMS database:
 +
 +''pandora'' データベースが選択されますが空の状態です。Pandora FMS データベースから実行した //バックアップ// をデータベースにインポートするために次のコマンドを使用します。
  
 <code sql> <code sql>
-CREATE DATABASE pandora; +source backup.sql;
-USE pandora; +
-SOURCE alldata.sql;+
  
 </code> </code>
  
-The system should work faster now.+Finally the **PFMS server** must be started:
  
-システムの作が高速化されはずです。+最後に、**PFMS サーバ** を起必要があります。
  
-<wrap #ks1_11 />+<code bash> 
 +systemctl start pandora_ha
  
 +</code>
 +
 +<wrap #ks1_11 />
  
 ==== オプションのインデックス ==== ==== オプションのインデックス ====
行 1392: 行 1402:
 <file> <file>
 /usr/share/pandora_server/util/pandora_xml_stress.pl /usr/share/pandora_server/util/pandora_xml_stress.pl
 +
 </file> </file>
  
行 1407: 行 1418:
  
 <file> <file>
-./pandora_xml_stress.pl < 設定ファイル >+./pandora_xml_stress.pl <設定ファイル> 
 </file> </file>
  
行 1413: 行 1425:
  
 ''pandora_xml_stress.conf'' という ''< 設定ファイル >'' に指定するファイルの例を示します。 ''pandora_xml_stress.conf'' という ''< 設定ファイル >'' に指定するファイルの例を示します。
- 
 <file> <file>
 # Maximum number of threads, by default 10. # Maximum number of threads, by default 10.
行 1503: 行 1514:
 module_data 1 module_data 1
 module_end module_end
 +
 </file> </file>
  
-**Send and Receive the Agent Local Configuration**+**Send and Receive Agent Local Configuration**
  
 **エージェントのローカル設定の送受信** **エージェントのローカル設定の送受信**
  
-If you activate in your ''pandora_xml_stress.conf'' the ''get_and_send_agent_conf'' configuration value to 1, you can make the test load agents work as normal agents, so that they send their configuration file and also the MD5 hash. From the PFMS Web Console you can modify the remote configuration for subsequent runs of the ''pandora_xml_stress''.+If you activate in your ''pandora_xml_stress.conf'' the ''get_and_send_agent_conf'' configuration value to 1, you may make the test load agents work as normal agents, so that they send their configuration file and also the MD5 hash. From PFMS Web Console you may modify the remote configuration for subsequent runs of ''pandora_xml_stress''.
  
 ''pandora_xml_stress.conf'' で、''get_and_send_agent_conf'' を 1 に設定して実行した場合、テスト負荷エージェントで、通常のエージェントのように設定ファイルおよび md5 を送ることができます。PFMS Web コンソールから、''pandora_xml_stress'' の以降の実行のリモート設定を変更できます。 ''pandora_xml_stress.conf'' で、''get_and_send_agent_conf'' を 1 に設定して実行した場合、テスト負荷エージェントで、通常のエージェントのように設定ファイルおよび md5 を送ることができます。PFMS Web コンソールから、''pandora_xml_stress'' の以降の実行のリモート設定を変更できます。
行 1523: 行 1535:
    * **max_threads**: Number of threads where the script will be executed. This improves the E/S.    * **max_threads**: Number of threads where the script will be executed. This improves the E/S.
   * **agent_file**: Path of the name list file path, separated by a new line.   * **agent_file**: Path of the name list file path, separated by a new line.
-  * **temporal**: Path of the directory where the made-up XML data files are generated.+  * **temporal**: Path of the directory where made-up XML data files are generated.
   * **log_file**: Path of the log where it will report about its execution script.   * **log_file**: Path of the log where it will report about its execution script.
   * **xml_version**: Version of the XML data file (by default 1.0).   * **xml_version**: Version of the XML data file (by default 1.0).
行 1532: 行 1544:
   * **time_from**: Time from which made-up XML data files are generated, in format ''yyyy-MM-dd HH:mm:ss''.   * **time_from**: Time from which made-up XML data files are generated, in format ''yyyy-MM-dd HH:mm:ss''.
   * **time_to**: Time until which made-up XML data files are generated, in format ''yyyy-MM-dd HH:mm:ss''.   * **time_to**: Time until which made-up XML data files are generated, in format ''yyyy-MM-dd HH:mm:ss''.
-  * **get_and_send_agent_conf**: Boolean value 0 or 1. When it is active the made-up agents will try to download by remote configuration a more updated version of the standard configuration file of an agent. And they can be edited through the Pandora FMS Web console.+  * **get_and_send_agent_conf**: Boolean value 0 or 1. When it is activethe made-up agents will try to download by remote configuration a more updated version of the standard configuration file of an agent. And they can be edited through Pandora FMS Web console.
   * **startup_delay**: Time numeric value in seconds before each agent starts to generate files. It is used to avoid //race conditions//.   * **startup_delay**: Time numeric value in seconds before each agent starts to generate files. It is used to avoid //race conditions//.
   * **timezone_offset**: Numeric value of the time zone offset.   * **timezone_offset**: Numeric value of the time zone offset.
行 1539: 行 1551:
   * **longitude_base**: Numeric value. It is the longitude geographic area to be used to define fictitious agents.   * **longitude_base**: Numeric value. It is the longitude geographic area to be used to define fictitious agents.
   * **altitude_base**: Numeric value. It is the altitude geographic area to be used to define fictitious agents.   * **altitude_base**: Numeric value. It is the altitude geographic area to be used to define fictitious agents.
-  * **position_radius**: Numeric value. Defines the radius of the circumference in which the geographic position of the fictitious agent will be set (randomly and based on the parameters **latitude_base** and **longitude_base**). +  * **position_radius**: Numeric value. It defines the radius of the circumference in which the geographic position of the fictitious agent will be set (randomly and based on parameters **latitude_base**  and **longitude_base**). 
- +  * **max_threads**  スクリプトの実行スレッド数。処理率を改善します。 
-  * **max_threads** スクリプトの実行スレッド数。処理率を改善します。 +  * **agent_file**  行ごとに名前を書いたファイルのパス。 
-  * **agent_file** 行ごとに名前を書いたファイルのパス。 +  * **temporal**  架空の XML データファイルを生成するディレクトリのパス。 
-  * **temporal** 架空の XML データファイルを生成するディレクトリのパス。 +  * **log_file**  スクリプトの実行について情報を出力するログのパス。 
-  * **log_file** スクリプトの実行について情報を出力するログのパス。 +  * **xml_version**  XML データファイルのバージョン。(デフォルトは 1.0) 
-  * **xml_version** XML データファイルのバージョン。(デフォルトは 1.0) +  * **encoding**  XML データファイルのエンコーディング。(デフォルトは ISO-8859-1) 
-  * **encoding** XML データファイルのエンコーディング。(デフォルトは ISO-8859-1) +  * **os_name**  仮想エージェントの OS 名。(デフォルトは Linux) 
-  * **os_name** 仮想エージェントの OS 名。(デフォルトは Linux) +  * **os_version**  仮想エージェントの OS バージョン。(デフォルトは 2.6) 
-  * **os_version** 仮想エージェントの OS バージョン。(デフォルトは 2.6) +  * **agent_interval**  仮想エージェントの実行秒間隔。(デフォルトは 300) 
-  * **agent_interval** 仮想エージェントの実行秒間隔。(デフォルトは 300) +  * **time_from**  仮想 XML データの開始時間。"年-月-日 時間:分:秒" というフォーマットにて。 
-  * **time_from** 仮想 XML データの開始時間。"年-月-日 時間:分:秒" というフォーマットにて。 +  * **time_to**  仮想 XML データの終了時間。"年-月-日 時間:分:秒" というフォーマットにて。 
-  * **time_to** 仮想 XML データの終了時間。"年-月-日 時間:分:秒" というフォーマットにて。 +  * **get_and_send_agent_conf**  0 または 1 の値です。有効な場合、仮想エージェントは、リモート設定により、より新しいエージェントの設定ファイルをダウンロードしようとします。Pandora FMS Enterprise のコンソールから編集可能になります。 
-  * **get_and_send_agent_conf** 0 または 1 の値です。有効な場合、仮想エージェントは、リモート設定により、より新しいエージェントの設定ファイルをダウンロードしようとします。Pandora FMS Enterprise のコンソールから編集可能になります。 +  * **startup_delay**  それぞれのエージェントがファイル生成を開始するまでの時間を秒で指定します。競合を回避するために利用します。 
-  * **startup_delay** それぞれのエージェントがファイル生成を開始するまでの時間を秒で指定します。競合を回避するために利用します。 +  * **timezone_offset**  タイムゾーンのオフセット値です。 
-  * **timezone_offset** タイムゾーンのオフセット値です。  +  * **timezone_offset_range**  ランダムに指定した範囲でタイムゾーンを生成します。 
-  * **timezone_offset_range** ランダムに指定した範囲でタイムゾーンを生成します。 +  * **latitude_base**  数値です。仮想エージェントを表示する緯度です。 
-  * **latitude_base** 数値です。仮想エージェントを表示する緯度です。 +  * **longitude_base**  数値です。仮想エージェントを表示する経度です。 
-  * **longitude_base** 数値です。仮想エージェントを表示する経度です。 +  * **altitude_base**  数値です。仮想エージェントを表示する高度です。 
-  * **altitude_base** 数値です。仮想エージェントを表示する高度です。 +  * **position_radius**  数値です。指定した半径内の円に仮想エージェントがランダムに表示されます。 
-  * **position_radius** 数値です。指定した半径内の円に仮想エージェントがランダムに表示されます。 +The definition of one module in the script configuration file. If remote configuration was enabled, it will also be the same. It is:
- +
-The definition of one module in the script configuration file. If remote configuration has been activated, it will also be the same. It is:+
  
 スクリプト設定ファイル内の 1 つのモジュールの定義。リモート設定が有効になっている場合も同様です。次のようになります。 スクリプト設定ファイル内の 1 つのモジュールの定義。リモート設定が有効になっている場合も同様です。次のようになります。
行 1567: 行 1577:
 <file> <file>
 module_begin module_begin
-module_name < module_name > +module_name <module_name> 
-module_type < module_type_data> +module_type <module_type_data> 
-module_description < description > +module_description <description> 
-module_exec type =< xml_stress_type_generation >;< another_option >;< another_option > … +module_exec type =<xml_stress_type_generation>;<another_option>;<another_option> … 
-module_unit < units >+module_unit <units>
 module_min_critical <value> module_min_critical <value>
 module_max_critical <value> module_max_critical <value>
行 1577: 行 1587:
 module_max_warning <value> module_max_warning <value>
 module_end module_end
 +
 </file> </file>
  
行 1591: 行 1602:
 module_max_warning <値> module_max_warning <値>
 module_end module_end
 +
 </file> </file>
  
行 1597: 行 1609:
 それぞれの項目は次のように設定可能です。 それぞれの項目は次のように設定可能です。
  
-  * **type_generation_xml_stress**: It can have the values [[#ks2_2_1_1|RANDOM]], [[#ks2_2_1_2|SCATTER]], [[#ks2_2_1_3|CURVE]].+  * **type_generation_xml_stress**: It can have values [[#ks2_2_1_1|RANDOM]], [[#ks2_2_1_2|SCATTER]], [[#ks2_2_1_3|CURVE]].
   * **module_attenuation <value>**: The generated module value is multiplied by the specified value, usually between 0.1 and 0.9.   * **module_attenuation <value>**: The generated module value is multiplied by the specified value, usually between 0.1 and 0.9.
   * **module_attenuation_wdays <value> <value> … <value>**: The module value is only attenuated during the given days, ranging from Sunday (0) to Saturday (6). For example, the following module simulates a 50 % drop in network traffic on Saturdays and Sundays:   * **module_attenuation_wdays <value> <value> … <value>**: The module value is only attenuated during the given days, ranging from Sunday (0) to Saturday (6). For example, the following module simulates a 50 % drop in network traffic on Saturdays and Sundays:
- 
   * **type_generation_xml_stress**: RANDOM,SCATTER,CURVEのいずれかを設定できます。   * **type_generation_xml_stress**: RANDOM,SCATTER,CURVEのいずれかを設定できます。
   * **module_attenuation <値>**: モジュールの値を指定した値で掛け合わせます。通常 0.1 と 0.9 の間です。   * **module_attenuation <値>**: モジュールの値を指定した値で掛け合わせます。通常 0.1 と 0.9 の間です。
-  * **module_attenuation_wdays <値> <値> ... <値>**: 指定した日にのみモジュールの値を計算します。日曜(0) から土曜(6) を指定できます。例えば、以下のモジュールでは、土曜と日曜にネットワークトラフィックを 50% にします。 +  * **module_attenuation_wdays <値> <値> … <値>**: 指定した日にのみモジュールの値を計算します。日曜(0) から土曜(6) を指定できます。例えば、以下のモジュールでは、土曜と日曜にネットワークトラフィックを 50% にします。
 <file> <file>
 +
 module_begin module_begin
 module_name Network Traffic module_name Network Traffic
行 1616: 行 1627:
 module_attenuation_wdays 0 6 module_attenuation_wdays 0 6
 module_end module_end
 +
 </file> </file>
  
   * **module_incremental < value >**: If set to 1, the module's previous value is always added to a new value, resulting in an increasing function.   * **module_incremental < value >**: If set to 1, the module's previous value is always added to a new value, resulting in an increasing function.
   * **Others**: See below which options are available, depending on the execution type.   * **Others**: See below which options are available, depending on the execution type.
- 
   * **module_incremental <値>**: 1に設定すると、モジュールの以前の値を常に新たな値に加えます。値が増え続ける機能です。   * **module_incremental <値>**: 1に設定すると、モジュールの以前の値を常に新たな値に加えます。値が増え続ける機能です。
   * **その他**: 実効タイプに依存して、どのようなオプションがあるかは以下を確認してください。   * **その他**: 実効タイプに依存して、どのようなオプションがあるかは以下を確認してください。
- 
 <wrap #ks2_2_1_1 /> <wrap #ks2_2_1_1 />
  
-==RANDOM== 
  
-次のオプションがあります。+== RANDOM ==
  
-  * **variation** 前回値から変化発生する可能性を % で指定します。 +オプションあります。
-  * **min** 値の最小値を指定します。 +
-  * **max** 値の最大値を指定します。+
  
 +  * **variation**  前回の値から変化が発生する可能性を % で指定します。
 +  * **min**  値の最小値を指定します。
 +  * **max**  値の最大値を指定します。
 **Numeric** **Numeric**
  
-**min** と **max** の間の数値をランダムに生成します。+**min**  と **max**  の間の数値をランダムに生成します。
  
-**Boleans**+**Booleans**
  
 0 または 1 の値を生成します。 0 または 1 の値を生成します。
行 1644: 行 1654:
 **String** **String**
  
-**min** と **max** の間の長さの文字列を生成します。文字は、A から Z の間のランダムで、大文字、小文字を含み、また数字や記号を含みます。+**min**  と **max**  の間の長さの文字列を生成します。文字は、A から Z の間のランダムで、大文字、小文字を含み、また数字や記号を含みます。
  
 **外部データソース (SOURCE)** **外部データソース (SOURCE)**
行 1651: 行 1661:
  
   * **src**: ソースデータファイル   * **src**: ソースデータファイル
- 
 ファイルは、1行に1データを含む形式で、行数に制限はありません。例えば次の通りです。 ファイルは、1行に1データを含む形式で、行数に制限はありません。例えば次の通りです。
  
行 1659: 行 1668:
 6 6
 10 10
 +
 </file> </file>
  
行 1665: 行 1675:
 <file> <file>
 4 5 6 10 4 5 6 10 4 5 6 10 4 5 6 10 4 5 6 10 4 5 6 10 4 5 6 10 4 5 6 10 4 5 6 10 4 5 6 10 4 5 6 10 4 5 6 10
 +
 </file> </file>
  
 <wrap #ks2_2_1_2 /> <wrap #ks2_2_1_2 />
 +
  
 ==SCATTER== ==SCATTER==
行 1760: 行 1772:
 ===== Pandora FMS の診断ツール ===== ===== Pandora FMS の診断ツール =====
  
-Sometimes there are problems for which direct help from Pandora FMS support is needed. To facilitate the communication with the Support team, Pandora FMS servers have some tools for this.+Sometimesthere are problems for which direct help from Pandora FMS support is needed. To fmake the communication with the Support team easier, Pandora FMS servers have some tools for this.
  
 場合によっては、Pandora FMS サポートからの直接的な支援が必要な問題が発生することがあります。サポートチームとのコミュニケーションを容易にするために、Pandora FMS サーバーにはそのためのツールがいくつかあります。 場合によっては、Pandora FMS サポートからの直接的な支援が必要な問題が発生することがあります。サポートチームとのコミュニケーションを容易にするために、Pandora FMS サーバーにはそのためのツールがいくつかあります。
  
 <wrap #ks3_1 /> <wrap #ks3_1 />
 +
  
 ==== 診断情報 ==== ==== 診断情報 ====
  
-This tool is located in the <wrap :en>**Management → Admin tools → Diagnostic Info**</wrap> section, and is designed to provide the most important information about Pandora FMS configuration and its database.+This tool is located in the <wrap :en>**Management → Admin tools → Diagnostic Info**</wrap> section, and is conceived to provide the most important information about Pandora FMS configuration and its database.
  
 このツールは <wrap :ja>**管理(Management) → 管理ツール(Admin tools) → 診断情報(Diagnostic Info)**</wrap> セクションにあり、Pandora FMS の設定とデータベースに関する最も重要な情報を提供するように設計されています。 このツールは <wrap :ja>**管理(Management) → 管理ツール(Admin tools) → 診断情報(Diagnostic Info)**</wrap> セクションにあり、Pandora FMS の設定とデータベースに関する最も重要な情報を提供するように設計されています。
  
-{{  :wiki:diagnostic_info.png  }}+[[:wiki:diagnostic_info.png?id=ja%3Adocumentation%3Apandorafms%3Acomplex_environments_and_optimization%3A08_optimization&media=wiki:diagnostic_info.png|{{  :wiki:diagnostic_info.png  }}]] 
 + 
 +[[:ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]
  
-[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] 
  
 ===== (OBSOLETE) ===== ===== (OBSOLETE) =====
  • ja/documentation/pandorafms/complex_environments_and_optimization/08_optimization.1731379097.txt.gz
  • 最終更新: 2024/11/12 02:38
  • by kanayama