差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
ja:documentation:pandorafms:complex_environments_and_optimization:08_optimization [2024/11/12 02:14] – [my.cnf 設定の確認] kanayama | ja:documentation:pandorafms:complex_environments_and_optimization:08_optimization [2025/02/26 02:42] (現在) – [全体の再構築] junichi | ||
---|---|---|---|
行 462: | 行 462: | ||
'' | '' | ||
- | |||
< | < | ||
+ | |||
InnoDB: Error: log file ./ | InnoDB: Error: log file ./ | ||
InnoDB: than specified in the .cnf file 0 67108864 bytes! | InnoDB: than specified in the .cnf file 0 67108864 bytes! | ||
+ | |||
</ | </ | ||
行 474: | 行 475: | ||
<code bash> | <code bash> | ||
mysqldump -uroot -p pandora > / | mysqldump -uroot -p pandora > / | ||
+ | |||
</ | </ | ||
行 482: | 行 484: | ||
<code bash> | <code bash> | ||
- | systemctl stop mysql | + | systemctl stop mysql |
mv / | mv / | ||
+ | |||
</ | </ | ||
行 492: | 行 495: | ||
<code bash> | <code bash> | ||
mkdir / | mkdir / | ||
+ | |||
</ | </ | ||
行 498: | 行 502: | ||
4. パラメータ ''< | 4. パラメータ ''< | ||
- | |||
<code bash> | <code bash> | ||
mysqld --initialize --datadir / | mysqld --initialize --datadir / | ||
+ | |||
</ | </ | ||
行 511: | 行 515: | ||
chown -R mysql:mysql / | chown -R mysql:mysql / | ||
chcon -R system_u: | chcon -R system_u: | ||
+ | |||
</ | </ | ||
- | 6. Start MySQL service and log in with the MySQL client, using the password from step four: | + | 6. Start MySQL service and log in with MySQL client, using the password from step four: |
6. MySQL サービスを起動し、手順 4 のパスワードを使用して MySQL クライアントでログインします。 | 6. MySQL サービスを起動し、手順 4 のパスワードを使用して MySQL クライアントでログインします。 | ||
行 521: | 行 526: | ||
systemctl start mysql | systemctl start mysql | ||
mysql -uroot -p | mysql -uroot -p | ||
+ | |||
</ | </ | ||
行 532: | 行 538: | ||
<WRAP center round important 90%> | <WRAP center round important 90%> | ||
- | MySQL/ | + | MySQL/ |
</ | </ | ||
行 539: | 行 545: | ||
7. ユーザ **root** のパスワードを任意のパスワードに変更します (ここでは '' | 7. ユーザ **root** のパスワードを任意のパスワードに変更します (ここでは '' | ||
- | |||
<code sql> | <code sql> | ||
ALTER USER ' | ALTER USER ' | ||
+ | |||
</ | </ | ||
行 556: | 行 562: | ||
CREATE DATABASE pandora; | CREATE DATABASE pandora; | ||
USE pandora; | USE pandora; | ||
+ | |||
</ | </ | ||
行 565: | 行 572: | ||
<code sql> | <code sql> | ||
SOURCE / | SOURCE / | ||
+ | |||
</ | </ | ||
行 571: | 行 579: | ||
11. **<wrap hi> | 11. **<wrap hi> | ||
- | |||
<code sql> | <code sql> | ||
CREATE USER ' | CREATE USER ' | ||
行 577: | 行 584: | ||
GRANT ALL PRIVILEGES ON pandora.* TO ' | GRANT ALL PRIVILEGES ON pandora.* TO ' | ||
GRANT ALL PRIVILEGES ON pandora.* TO ' | GRANT ALL PRIVILEGES ON pandora.* TO ' | ||
+ | |||
</ | </ | ||
- | 12. After having configured '' | + | 12. After having configured '' |
12. '' | 12. '' | ||
- | |||
<code sql> | <code sql> | ||
SHOW VARIABLES LIKE ' | SHOW VARIABLES LIKE ' | ||
+ | |||
</ | </ | ||
行 591: | 行 599: | ||
<code sql> | <code sql> | ||
SHOW VARIABLES LIKE ' | SHOW VARIABLES LIKE ' | ||
+ | |||
</ | </ | ||
行 596: | 行 605: | ||
<code sql> | <code sql> | ||
SHOW VARIABLES LIKE ' | SHOW VARIABLES LIKE ' | ||
+ | |||
</ | </ | ||
行 605: | 行 615: | ||
<code sql> | <code sql> | ||
SHOW VARIABLES LIKE " | SHOW VARIABLES LIKE " | ||
+ | |||
</ | </ | ||
- | Once you verify | + | Once you check that Pandora FMS (both Web Console and server) can connect correctly to the database and everything works properly, you may delete '' |
Pandora FMS (Web コンソールとサーバの両方) がデータベースに正しく接続でき、すべてが正常に動作することを確認したら、'' | Pandora FMS (Web コンソールとサーバの両方) がデータベースに正しく接続でき、すべてが正常に動作することを確認したら、'' | ||
- | |||
<code bash> | <code bash> | ||
rm -rf / | rm -rf / | ||
+ | |||
</ | </ | ||
<wrap #ks1_8_3 /> | <wrap #ks1_8_3 /> | ||
+ | |||
=== 各テーブルごとに分割されたデータファイルがアクティブであるか確認 === | === 各テーブルごとに分割されたデータファイルがアクティブであるか確認 === | ||
行 637: | 行 649: | ||
=== 特定のテーブルの最適化 === | === 特定のテーブルの最適化 === | ||
- | Another less " | + | Another less " |
断片化の問題を解決するためのもう 1 つの「それほど劇的ではない」解決策は、MySQL **OPTIMIZE** ツールを使用して Pandora FMS の特定のテーブルを最適化することです。これを利用するには、MySQL から直接以下を実行します。 | 断片化の問題を解決するためのもう 1 つの「それほど劇的ではない」解決策は、MySQL **OPTIMIZE** ツールを使用して Pandora FMS の特定のテーブルを最適化することです。これを利用するには、MySQL から直接以下を実行します。 | ||
- | |||
<code sql> | <code sql> | ||
OPTIMIZE TABLE tagente_datos; | OPTIMIZE TABLE tagente_datos; | ||
行 656: | 行 667: | ||
これにより、システムが稼働しているときに時間の経過とともにパフォーマンスが低下するのを防ぎます。 | これにより、システムが稼働しているときに時間の経過とともにパフォーマンスが低下するのを防ぎます。 | ||
- | In very big environments, | + | In large environments, |
非常に大規模な環境では、**OPTIMIZE** オプションが「ブロック」される可能性があります。この場合、最善のオプションは [[# | 非常に大規模な環境では、**OPTIMIZE** オプションが「ブロック」される可能性があります。この場合、最善のオプションは [[# | ||
- | After doing these operations, | + | After doing these operations, |
これらの操作を行った後、次を実行します。 | これらの操作を行った後、次を実行します。 | ||
行 666: | 行 677: | ||
<code sql> | <code sql> | ||
FLUSH TABLES; | FLUSH TABLES; | ||
+ | |||
</ | </ | ||
- | From the MySQL manual: | + | From MySQL manual: |
MySQL マニュアルより: | MySQL マニュアルより: | ||
行 674: | 行 686: | ||
"//For InnoDB tables, OPTIMIZE TABLE is mapped to ALTER TABLE, which rebuilds the table to update index statistics and free unused space in the clustered index//" | "//For InnoDB tables, OPTIMIZE TABLE is mapped to ALTER TABLE, which rebuilds the table to update index statistics and free unused space in the clustered index//" | ||
- | 「//InnoDB テーブルの場合、OPTIMIZE TABLE は ALTER TABLE にマップされ、テーブルを再構築してインデックス統計を更新し、クラスター化インデックス内の未使用領域を解放します// | + | 「//InnoDB テーブルの場合、OPTIMIZE TABLE は ALTER TABLE にマップされ、テーブルを再構築してインデックス統計を更新し、クラスター化インデックス内の未使用領域を解放します// |
<wrap #ks1_8_5 /> | <wrap #ks1_8_5 /> | ||
+ | |||
=== MySQL 特殊トークン === | === MySQL 特殊トークン === | ||
- | There are some very " | + | There are some very " |
MySQL には、パフォーマンスを向上させたり低下させたりできる非常に「特別な」トークンがいくつかあります。 | MySQL には、パフォーマンスを向上させたり低下させたりできる非常に「特別な」トークンがいくつかあります。 | ||
* '' | * '' | ||
- | |||
< | < | ||
innodb_flush_method = O_DIRECT | innodb_flush_method = O_DIRECT | ||
行 696: | 行 708: | ||
* '' | * '' | ||
- | |||
< | < | ||
innodb_lock_wait_timeout = 90 | innodb_lock_wait_timeout = 90 | ||
行 702: | 行 713: | ||
</ | </ | ||
- | This helps when there is a bottleneck, so that MySQL does not go away and stops. **If it lasts more than 90 lock, there is a real problem**. | + | This helps when there is a bottleneck, so that MySQL does not fall and stop. **If it lasts more than 90 lock, there is a real problem**. |
- | これはボトルネックがある場合に役立ち、MySQL が停止することはありません。**90 ロックを超えて続く場合は、実際に問題が発生しています**。 | + | これはボトルネックがある場合に役立ち、MySQL が停止することはありません。**90 ロックを超えて続く場合は、実際に問題が発生しています** 。 |
<wrap #ks1_8_6 /> | <wrap #ks1_8_6 /> | ||
+ | |||
=== テーブルごとのフラグメンテーションを確認 === | === テーブルごとのフラグメンテーションを確認 === | ||
- | Using MySQL CLI, execute | + | Using MySQL CLI, run this query: |
MySQL の CLI を使って、以下のクエリを実行します。 | MySQL の CLI を使って、以下のクエリを実行します。 | ||
行 747: | 行 759: | ||
| InnoDB | tagente_datos_string | | InnoDB | tagente_datos_string | ||
+--------+-------------------------+-------------+--------------+-----------+------------+ | +--------+-------------------------+-------------+--------------+-----------+------------+ | ||
+ | |||
</ | </ | ||
行 768: | 行 781: | ||
'' | '' | ||
- | |||
<code sql> | <code sql> | ||
OPTIMIZE TABLE pandora.tagent_module_inventory; | OPTIMIZE TABLE pandora.tagent_module_inventory; | ||
+ | |||
</ | </ | ||
行 776: | 行 789: | ||
次のような警告メッセージが表示されます。 | 次のような警告メッセージが表示されます。 | ||
- | |||
< | < | ||
+ | |||
"Table does not support optimize, doing recreate + analyze instead" | "Table does not support optimize, doing recreate + analyze instead" | ||
+ | |||
</ | </ | ||
- | If you check again, you should see the fragmentation is gone: | + | If you check again, you should see fragmentation is gone: |
再度確認すると、フラグメンテーションが無くなっていることがわかります。 | 再度確認すると、フラグメンテーションが無くなっていることがわかります。 | ||
行 804: | 行 818: | ||
| InnoDB | tagente_datos_string | | InnoDB | tagente_datos_string | ||
+--------+-------------------------+-------------+--------------+-----------+------------+ | +--------+-------------------------+-------------+--------------+-----------+------------+ | ||
+ | |||
</ | </ | ||
行 819: | 行 834: | ||
<wrap #ks1_8_7 /> | <wrap #ks1_8_7 /> | ||
+ | |||
=== システム負荷 === | === システム負荷 === | ||
- | This is more general, but you need to make sure the system IO is not a bottleneck (disk). | + | This is more general, but you need to make sure the system IO is not a bottleneck (disk). |
より一般的な事として、システムの(ディスク) I/O がボトルネックになっていないことを確認する必要があります。システムの状態を取得するのに、vmstat コマンドを実行します。 | より一般的な事として、システムの(ディスク) I/O がボトルネックになっていないことを確認する必要があります。システムの状態を取得するのに、vmstat コマンドを実行します。 | ||
行 828: | 行 844: | ||
< | < | ||
vmstat 1 10 | vmstat 1 10 | ||
+ | |||
</ | </ | ||
- | Look at the last columns (**CPU WA**), a value higher than 10 means there is a disk I/O problem that should be solved. | + | Look at the last columns (**CPU WA**), a value higher than 10 means that there is a disk I/O problem that should be solved. |
最後のカラム (**CPU WA**) を見て、10より大きい値であればディスク I/O の問題があり、解決する必要があります。 | 最後のカラム (**CPU WA**) を見て、10より大きい値であればディスク I/O の問題があり、解決する必要があります。 | ||
- | Having **CPU-US** | + | Having |
**CPU-US** が高いのは通常です。しかし、**CPU-SY** は 10~15 を超えないようにすべきです。 | **CPU-US** が高いのは通常です。しかし、**CPU-SY** は 10~15 を超えないようにすべきです。 | ||
- | Usually, **SWAP-SI** and **SWAP-SO** should have value zero, if not, it means the system is using SWAP memory, which degrades performance. Increase RAM or decrease RAM usage in your applications (Pandora FMS server threads, Buffers in MySQL, | + | Usually, **SWAP-SI** and **SWAP-SO** should have value zero, if not, it means the system is using SWAP memory, which degrades performance. Increase RAM or decrease RAM usage in your applications (Pandora FMS server threads, Buffers in MySQL, |
**SWAP-SI** および **SWAP-SO** はゼロであるべきです。そうでなければシステムがスワップメモリを使っていることを意味し、パフォーマンスを落とします。メモリを増やすか、アプリケーションが使うメモリを減らす(Pandora サーバのスレッド、MySQL のバッファの調整など)必要があります。 | **SWAP-SI** および **SWAP-SO** はゼロであるべきです。そうでなければシステムがスワップメモリを使っていることを意味し、パフォーマンスを落とします。メモリを増やすか、アプリケーションが使うメモリを減らす(Pandora サーバのスレッド、MySQL のバッファの調整など)必要があります。 | ||
行 873: | 行 890: | ||
<wrap #ks1_9 /> | <wrap #ks1_9 /> | ||
+ | |||
==== MySQL テーブルパーティショニング ==== | ==== MySQL テーブルパーティショニング ==== | ||
行 878: | 行 896: | ||
<WRAP center round tip 90%> | <WRAP center round tip 90%> | ||
- | To use MySQL table partitioning, | + | To use MySQL table partitioning, |
</ | </ | ||
行 884: | 行 902: | ||
<WRAP center round tip 90%> | <WRAP center round tip 90%> | ||
- | MySQL テーブルパーティショニングを使用するには、[[# | + | MySQL テーブルパーティショニングを使用するには、[[# |
</ | </ | ||
行 892: | 行 910: | ||
MySQL はテーブルパーティショニングをサポートしており、これにより、非常に大きなテーブルを論理的なサブディビジョンなどの小さなチャンクに分散できます (詳細については、[[http:// | MySQL はテーブルパーティショニングをサポートしており、これにより、非常に大きなテーブルを論理的なサブディビジョンなどの小さなチャンクに分散できます (詳細については、[[http:// | ||
- | If you have large amounts of data in the database (main and [[[: | + | If you have large amounts of data in Pandora FMS database (main and [[: |
もし Pandora FMS (メインおよび[[: | もし Pandora FMS (メインおよび[[: | ||
<wrap #ks1_9_1 /> | <wrap #ks1_9_1 /> | ||
+ | |||
=== 自動パーティショニング === | === 自動パーティショニング === | ||
- | Pandora FMS automatically performs a monthly partitioning in the historical | + | Pandora FMS automatically performs a monthly partitioning in the history |
- | Pandora FMS は、Web コンソールの一般設定のセクション **ヒストリデータベース** から設定されている場合、ヒストリデータベースの月次パーティショニングを自動的に実行します。詳細については、[[ja: | + | Pandora FMS は、Web コンソールの一般設定のセクション **ヒストリデータベース** から設定されている場合、ヒストリデータベースの月次パーティショニングを自動的に実行します。詳細については、[[:ja: |
<wrap #ks1_9_2 /> | <wrap #ks1_9_2 /> | ||
+ | |||
=== 手動パーティショニング === | === 手動パーティショニング === | ||
- | After having installed Pandora FMS and enabled its historical | + | After having installed Pandora FMS and enabled its history |
- | Pandora FMS をインストールし、ヒストリデータベースを有効にすると、これが最大量のデータを保持するものになります。**テーブルパーティション分割の実行が推奨されます。** これに指定されているテーブルは、正確には '' | + | Pandora FMS をインストールし、ヒストリデータベースを有効にすると、これが最大量のデータを保持するものになります。**テーブルパーティション分割の実行が推奨されます。** これに指定されているテーブルは、正確には '' |
You should check at first that the directory ''/ | You should check at first that the directory ''/ | ||
行 916: | 行 936: | ||
まず、ディレクトリ ''/ | まず、ディレクトリ ''/ | ||
- | Once you have ensured | + | Once you ensure |
'' | '' | ||
- | | + | * This operation will need enough disk space to be completed. You will need to check how big the '' |
- | * This operation | + | * This operation |
- | * この操作を完了するには、十分なディスク領域が必要です。'' | + | * この操作を完了するには、十分なディスク領域が必要です。'' |
- | * この操作は、テーブルのサイズに応じて長い時間がかかることがあります。たとえば、100 日間 (50,000,000 行以上) の約 7500 個の // | + | * この操作は、テーブルのサイズに応じて長い時間がかかることがあります。たとえば、100 日間 (50,000,000 行以上) の約 7500 個の // |
- | This is an example for partitioning all of 2023 so far and for future months. To start the process you will need to execute the following query in the MySQL CLI: | + | This is an example for partitioning all of 2023 so far and for future months. To start the process, you will need to execute the following query in MySQL CLI: |
これは、2023 年のこれまでと今後の月全体をパーティション分割する例です。処理を開始するには、MySQL CLI で次のクエリを実行する必要があります。 | これは、2023 年のこれまでと今後の月全体をパーティション分割する例です。処理を開始するには、MySQL CLI で次のクエリを実行する必要があります。 | ||
行 946: | 行 966: | ||
PARTITION pActual VALUES LESS THAN (MAXVALUE) | PARTITION pActual VALUES LESS THAN (MAXVALUE) | ||
); | ); | ||
+ | |||
</ | </ | ||
行 956: | 行 977: | ||
PARTITION Jan24 VALUES LESS THAN (UNIX_TIMESTAMP(' | PARTITION Jan24 VALUES LESS THAN (UNIX_TIMESTAMP(' | ||
PARTITION pActual VALUES LESS THAN MAXVALUE); | PARTITION pActual VALUES LESS THAN MAXVALUE); | ||
+ | |||
</ | </ | ||
行 963: | 行 985: | ||
" | " | ||
- | Remember again that this operation could take hours, depending on how big the '' | + | Remember again that this operation could take hours, depending on how big the '' |
- | + | ||
- | この操作は、'' | + | |
+ | この操作は、'' | ||
< | < | ||
+ | |||
[root@histdb pandora_history]# | [root@histdb pandora_history]# | ||
行 987: | 行 1009: | ||
<wrap #ks1_10 /> | <wrap #ks1_10 /> | ||
+ | |||
==== データベースの再構成 ==== | ==== データベースの再構成 ==== | ||
行 1014: | 行 1037: | ||
=== 部分的再構成 === | === 部分的再構成 === | ||
- | MySQL database management system, same as other SQL engines, such as Oracle® | + | MySQL database management system, same as other SQL engines, such as Oracle®, is degraded with time due to causes such as data fragmentation produced by deleting and continuous insertion in large tables. In large environments, |
MySQLは他のデータベースシステム、たとえば Oracle® と同様、時間がたつにつれ、性能が劣化していきます。これは大きなテーブルに対してデータの削除と追加を続けることによって発生するデータのフラグメンテーションによるものです。大量のトラフィックが発生する大きな環境において、性能の改善および劣化を防ぐ非常に簡単な方法があります。それは定期的にデータベースの再構築を実施することです。 | MySQLは他のデータベースシステム、たとえば Oracle® と同様、時間がたつにつれ、性能が劣化していきます。これは大きなテーブルに対してデータの削除と追加を続けることによって発生するデータのフラグメンテーションによるものです。大量のトラフィックが発生する大きな環境において、性能の改善および劣化を防ぐ非常に簡単な方法があります。それは定期的にデータベースの再構築を実施することです。 | ||
行 1024: | 行 1047: | ||
<WRAP center round info 90%> | <WRAP center round info 90%> | ||
- | In this service stop, stop the Pandora FMS WEB console and the server too. **Attention**: | + | In this service stop, stop the Pandora FMS WEB console and the server too. **Attention**: |
</ | </ | ||
行 1030: | 行 1053: | ||
<WRAP center round info 90%> | <WRAP center round info 90%> | ||
- | 計画的なサービス停止時に、Pandora FMS Webコンソールとサーバも停止すべきです | + | 計画的なサービス停止時に、Pandora FMS Webコンソールとサーバも停止すべきです (**注意** tentacle サーバはデータを受け取れるようにしておき、サーバが復旧次第データを処理できるようにします) |
- | (**注意** tentacle サーバはデータを受け取れるようにしておき、サーバが復旧次第データを処理できるようにします) | + | |
</ | </ | ||
- | Once they have been stopped, | + | Once they have been stopped, dump the DB (Export); in this example, the database is called '' |
停止したら、DB ダンプ (エクスポート) を実行します。この例では、データベースの名前は '' | 停止したら、DB ダンプ (エクスポート) を実行します。この例では、データベースの名前は '' | ||
- | |||
< | < | ||
mysqldump -u root -p pandora3> | mysqldump -u root -p pandora3> | ||
+ | |||
</ | </ | ||
行 1049: | 行 1071: | ||
< | < | ||
mysql -u root -p | mysql -u root -p | ||
+ | |||
</ | </ | ||
<code sql> | <code sql> | ||
- | drop database | + | DROP DATABASE |
- | Query OK, 87 rows affected (1 min 34.37 sec) | + | Query OK, 87 ROWS affected (1 MIN 34.37 sec) |
</ | </ | ||
行 1062: | 行 1086: | ||
<code sql> | <code sql> | ||
- | create database | + | CREATE DATABASE |
- | use pandora3; | + | USE pandora3; |
- | source | + | SOURCE |
</ | </ | ||
行 1074: | 行 1099: | ||
<WRAP center round important 90%> | <WRAP center round important 90%> | ||
- | It is possible to automatize this process, but, because it is very delicate, the best option is make it manually. | + | It is possible to automatize this process, but, because it is very delicate, the best option is to make it manually. |
</ | </ | ||
行 1085: | 行 1110: | ||
<wrap #ks1_10_2 /> | <wrap #ks1_10_2 /> | ||
+ | |||
=== 全体の再構築 === | === 全体の再構築 === | ||
- | 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, | + | <code bash> |
+ | systemctl stop pandora_ha | ||
- | 時間ともに MySQL のパフォーマンスが落ちると、システム全体のパフォーマンスに影響します。この場合は、すべてのデータベーススキーマをゼロから再構築する以外に解決策はありません。MySQL がデータの保存に利用しているバイナリファイルを利用し、またそれを再構築します。 | + | </ |
- | If you take a look at the ''/ | + | Secondly, an export of all schemas and data must be done. Choose |
- | ''/ | + | 次に、すべてのスキーマとデータのエクスポートを実行する必要があります。データベースが大きい場合に備えて、データベースのバックアップを保存するのに十分なスペースがあるパーティション内のディレクトリを選択します。次のコマンドを実行します。 |
- | <file> | + | <code bash> |
- | -rw-rw---- 1 mysql mysql 4.8G 2012-01-12 14:00 ibdata1 | + | mysqldump |
- | | + | |
- | | + | |
- | </file> | + | </code> |
- | The '' | + | After finishing the process we will have in the file '' |
- | '' | + | 処理が完了すると、現在のディレクトリ内のファイル '' |
- | Similarly, each database has in the ''/ | + | Once this is done, MySQL is stopped with: |
- | 同様に、各データベースは ''/ | + | これが完了したら、MySQL を次のように停止します。 |
- | The process is quite easy: | + | <code bash> |
+ | systemctl stop mysqld.service | ||
- | 手順はとても簡単です。 | + | </ |
- | - Dump (via **mysqldump**) all the schemes to the disk: | + | Access |
- | - すべてのスキーマをディスクにダンプします | + | MySQL インストールディレクトリ (''/ |
<code bash> | <code bash> | ||
- | mysqldump | + | rm -rf / |
+ | rm -rf / | ||
+ | rm -rf / | ||
</ | </ | ||
- | * Stop MySQL. | + | Once these steps are done, we will start MySQL again with: |
- | * Delete '' | + | |
- | * Start MySQL. | + | |
- | * Create '' | + | |
- | * Import the backup file ('' | + | |
- | * MySQL を停止します。 | + | これらの手順が完了したら、次のコマンドで |
- | * '' | + | |
- | * MySQL を再起動します。 | + | |
- | * '' | + | |
- | * バックアップファイル('' | + | |
<code bash> | <code bash> | ||
- | mysql -u root -p | + | systemctl start mysqld.service |
</ | </ | ||
+ | |||
+ | Access the MySQL terminal with the following command: | ||
+ | |||
+ | 次のコマンドで MySQL ターミナルにアクセスします。 | ||
+ | |||
+ | <code bash> | ||
+ | mysql -uroot -p pandora | ||
+ | |||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | |||
+ | '' | ||
<code sql> | <code sql> | ||
- | CREATE DATABASE pandora; | + | source |
- | use pandora; | + | |
- | source | + | |
</ | </ | ||
- | The system should work faster now. | + | Finally the **PFMS server** must be started: |
- | システムの動作が高速化されるはずです。 | + | 最後に、**PFMS サーバ** を起動する必要があります。 |
+ | |||
+ | <code bash> | ||
+ | systemctl start pandora_ha | ||
+ | |||
+ | </ | ||
<wrap #ks1_11 /> | <wrap #ks1_11 /> | ||
行 1185: | 行 1224: | ||
==== スロウクエリ ==== | ==== スロウクエリ ==== | ||
- | In some systems, depending on the type of information you have, you can find some "slow queries" | + | In some systems, depending on the type of information you have, you may find some "slow queries" |
いくつかのシステムでは保持している情報によって、通常よりもシステムのパフォーマンスが悪いスロウクエリが見られることがあります。テーブルを最適化するために、(システムのパフォーマンスに影響する)一定時間を超えたこのタイプのクエリをログに記録するようにできます。これを有効にするには次のようにします。 | いくつかのシステムでは保持している情報によって、通常よりもシステムのパフォーマンスが悪いスロウクエリが見られることがあります。テーブルを最適化するために、(システムのパフォーマンスに影響する)一定時間を超えたこのタイプのクエリをログに記録するようにできます。これを有効にするには次のようにします。 | ||
- | * [[# | + | |
- | + | ||
- | * my.cnf を[[# | + | |
+ | * my.cnf を[[# | ||
< | < | ||
+ | |||
slow_query_log=1 | slow_query_log=1 | ||
long_query_time=2 | long_query_time=2 | ||
slow_query_log_file=/ | slow_query_log_file=/ | ||
+ | |||
</ | </ | ||
行 1207: | 行 1247: | ||
chown mysql:mysql / | chown mysql:mysql / | ||
chmod 640 / | chmod 640 / | ||
+ | |||
</ | </ | ||
行 1213: | 行 1254: | ||
* mysql を再起動します。 | * mysql を再起動します。 | ||
- | * スロウクエリの分析が終了したら、ファイル '' | + | * スロウクエリの分析が終了したら、ファイル '' |
<wrap #ks1_13 /> | <wrap #ks1_13 /> | ||
+ | |||
==== 参考サイト ==== | ==== 参考サイト ==== | ||
行 1323: | 行 1365: | ||
xxxxserver_threads 8 | xxxxserver_threads 8 | ||
max_queue_files 5000 | max_queue_files 5000 | ||
+ | |||
</ | </ | ||
行 1329: | 行 1372: | ||
以下の点を認識しておく必要があります。 | 以下の点を認識しておく必要があります。 | ||
- | * The number established in the '' | + | * The number established in the '' |
- | * '' | + | * '' |
+ | * A high value (15) of the '' | ||
- | * A high value (15) of the '' | + | * パラメータ |
- | | + | * The very high number of threads (more than 5) set in '' |
- | + | ||
- | | + | |
- | + | ||
- | * '' | + | |
+ | * '' | ||
<wrap #ks2_2 /> | <wrap #ks2_2 /> | ||
+ | |||
==== キャパシティ分析ツール (Capacity) ==== | ==== キャパシティ分析ツール (Capacity) ==== | ||
- | Pandora FMS has several tools that can help you to measure properly its hardware and software for the amount of data that it expects to obtain. One of them is useful to " | + | Pandora FMS has several tools that may help you to measure properly its hardware and software for the amount of data it expects to obtain. One of them is useful to " |
Pandora FMS には、ハードウエアおよびソフトウエアで、取得可能なデータ量を適切に計測できるいくつかのツールがあります。一つは、ダミーデータで直接データベースへアクセスするもの (**dbstress**)、もう一つは、ダミーの XML ファイルを生成するもの (**xml_stress**) です。 | Pandora FMS には、ハードウエアおよびソフトウエアで、取得可能なデータ量を適切に計測できるいくつかのツールがあります。一つは、ダミーデータで直接データベースへアクセスするもの (**dbstress**)、もう一つは、ダミーの XML ファイルを生成するもの (**xml_stress**) です。 | ||
<wrap #ks2_2_1 /> | <wrap #ks2_2_1 /> | ||
+ | |||
=== Pandora FMS の XML 負荷 === | === Pandora FMS の XML 負荷 === | ||
行 1359: | 行 1402: | ||
< | < | ||
/ | / | ||
+ | |||
</ | </ | ||
行 1374: | 行 1418: | ||
< | < | ||
- | ./ | + | ./ |
</ | </ | ||
行 1380: | 行 1425: | ||
'' | '' | ||
- | |||
< | < | ||
# Maximum number of threads, by default 10. | # Maximum number of threads, by default 10. | ||
行 1470: | 行 1514: | ||
module_data 1 | module_data 1 | ||
module_end | module_end | ||
+ | |||
</ | </ | ||
- | **Send and Receive | + | **Send and Receive Agent Local Configuration** |
**エージェントのローカル設定の送受信** | **エージェントのローカル設定の送受信** | ||
- | If you activate in your '' | + | If you activate in your '' |
'' | '' | ||
行 1490: | 行 1535: | ||
* **max_threads**: | * **max_threads**: | ||
* **agent_file**: | * **agent_file**: | ||
- | * **temporal**: | + | * **temporal**: |
* **log_file**: | * **log_file**: | ||
* **xml_version**: | * **xml_version**: | ||
行 1499: | 行 1544: | ||
* **time_from**: | * **time_from**: | ||
* **time_to**: | * **time_to**: | ||
- | * **get_and_send_agent_conf**: | + | * **get_and_send_agent_conf**: |
* **startup_delay**: | * **startup_delay**: | ||
* **timezone_offset**: | * **timezone_offset**: | ||
行 1506: | 行 1551: | ||
* **longitude_base**: | * **longitude_base**: | ||
* **altitude_base**: | * **altitude_base**: | ||
- | * **position_radius**: | + | * **position_radius**: |
- | + | * **max_threads** | |
- | * **max_threads** スクリプトの実行スレッド数。処理率を改善します。 | + | * **agent_file** |
- | * **agent_file** 行ごとに名前を書いたファイルのパス。 | + | * **temporal** |
- | * **temporal** 架空の XML データファイルを生成するディレクトリのパス。 | + | * **log_file** |
- | * **log_file** スクリプトの実行について情報を出力するログのパス。 | + | * **xml_version** |
- | * **xml_version** XML データファイルのバージョン。(デフォルトは 1.0) | + | * **encoding** |
- | * **encoding** XML データファイルのエンコーディング。(デフォルトは ISO-8859-1) | + | * **os_name** |
- | * **os_name** 仮想エージェントの OS 名。(デフォルトは Linux) | + | * **os_version** |
- | * **os_version** 仮想エージェントの OS バージョン。(デフォルトは 2.6) | + | * **agent_interval** |
- | * **agent_interval** 仮想エージェントの実行秒間隔。(デフォルトは 300) | + | * **time_from** |
- | * **time_from** 仮想 XML データの開始時間。" | + | * **time_to** |
- | * **time_to** 仮想 XML データの終了時間。" | + | * **get_and_send_agent_conf** |
- | * **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 |
- | + | ||
- | The definition of one module in the script configuration file. If remote configuration | + | |
スクリプト設定ファイル内の 1 つのモジュールの定義。リモート設定が有効になっている場合も同様です。次のようになります。 | スクリプト設定ファイル内の 1 つのモジュールの定義。リモート設定が有効になっている場合も同様です。次のようになります。 | ||
行 1534: | 行 1577: | ||
< | < | ||
module_begin | module_begin | ||
- | module_name < module_name > | + | module_name < |
- | module_type < module_type_data> | + | module_type < |
- | module_description < description > | + | module_description < |
- | module_exec type =< xml_stress_type_generation >;< another_option >;< another_option > … | + | module_exec type =< |
- | module_unit < units > | + | module_unit < |
module_min_critical < | module_min_critical < | ||
module_max_critical < | module_max_critical < | ||
行 1544: | 行 1587: | ||
module_max_warning < | module_max_warning < | ||
module_end | module_end | ||
+ | |||
</ | </ | ||
行 1558: | 行 1602: | ||
module_max_warning <値> | module_max_warning <値> | ||
module_end | module_end | ||
+ | |||
</ | </ | ||
行 1564: | 行 1609: | ||
それぞれの項目は次のように設定可能です。 | それぞれの項目は次のように設定可能です。 | ||
- | * **type_generation_xml_stress**: | + | * **type_generation_xml_stress**: |
* **module_attenuation < | * **module_attenuation < | ||
* **module_attenuation_wdays < | * **module_attenuation_wdays < | ||
- | |||
* **type_generation_xml_stress**: | * **type_generation_xml_stress**: | ||
* **module_attenuation < | * **module_attenuation < | ||
- | * **module_attenuation_wdays <値> < | + | * **module_attenuation_wdays <値> < |
< | < | ||
+ | |||
module_begin | module_begin | ||
module_name Network Traffic | module_name Network Traffic | ||
行 1583: | 行 1627: | ||
module_attenuation_wdays 0 6 | module_attenuation_wdays 0 6 | ||
module_end | module_end | ||
+ | |||
</ | </ | ||
* **module_incremental < value >**: If set to 1, the module' | * **module_incremental < value >**: If set to 1, the module' | ||
* **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 < | * **module_incremental < | ||
* **その他**: | * **その他**: | ||
- | |||
<wrap #ks2_2_1_1 /> | <wrap #ks2_2_1_1 /> | ||
- | ==RANDOM== | + | |
+ | == RANDOM == | ||
次のオプションがあります。 | 次のオプションがあります。 | ||
- | * **variation** 前回の値から変化が発生する可能性を % で指定します。 | + | * **variation** |
- | * **min** 値の最小値を指定します。 | + | * **min** |
- | * **max** 値の最大値を指定します。 | + | * **max** |
**Numeric** | **Numeric** | ||
- | **min** と **max** の間の数値をランダムに生成します。 | + | **min** |
- | **Boleans** | + | **Booleans** |
0 または 1 の値を生成します。 | 0 または 1 の値を生成します。 | ||
行 1611: | 行 1654: | ||
**String** | **String** | ||
- | **min** と **max** の間の長さの文字列を生成します。文字は、A から Z の間のランダムで、大文字、小文字を含み、また数字や記号を含みます。 | + | **min** |
**外部データソース (SOURCE)** | **外部データソース (SOURCE)** | ||
行 1618: | 行 1661: | ||
* **src**: ソースデータファイル | * **src**: ソースデータファイル | ||
- | |||
ファイルは、1行に1データを含む形式で、行数に制限はありません。例えば次の通りです。 | ファイルは、1行に1データを含む形式で、行数に制限はありません。例えば次の通りです。 | ||
行 1626: | 行 1668: | ||
6 | 6 | ||
10 | 10 | ||
+ | |||
</ | </ | ||
行 1632: | 行 1675: | ||
< | < | ||
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 | ||
+ | |||
</ | </ | ||
<wrap #ks2_2_1_2 /> | <wrap #ks2_2_1_2 /> | ||
+ | |||
==SCATTER== | ==SCATTER== | ||
行 1727: | 行 1772: | ||
===== Pandora FMS の診断ツール ===== | ===== Pandora FMS の診断ツール ===== | ||
- | Sometimes there are problems for which direct help from Pandora FMS support is needed. To facilitate | + | Sometimes, there 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 : | + | This tool is located in the <wrap : |
このツールは <wrap : | このツールは <wrap : | ||
- | {{ : | + | [[: |
+ | |||
+ | [[: | ||
- | [[ja: | ||
===== (OBSOLETE) ===== | ===== (OBSOLETE) ===== |