差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| ja:documentation:pandorafms:installation:06_server_management [2024/08/02 08:39] – [データベース管理] junichi | ja:documentation:pandorafms:installation:06_server_management [2026/06/26 23:11] (現在) – [サーバ管理] junichi | ||
|---|---|---|---|
| 行 3: | 行 3: | ||
| {{indexmenu_n> | {{indexmenu_n> | ||
| - | [[ja: | + | [[ja: |
| <wrap #ks1 /> | <wrap #ks1 /> | ||
| 行 11: | 行 11: | ||
| <WRAP center round info 90%> | <WRAP center round info 90%> | ||
| - | Please note that if for maintenance reasons you want to manually stop Pandora FMS server, verify whether a service **Watchdog** is running. [[# | + | Please note that if for maintenance reasons you wish to manually stop Pandora FMS server, verify whether a service **Watchdog** is running. [[# |
| </ | </ | ||
| 行 30: | 行 30: | ||
| < | < | ||
| - | / | + | |
| + | systemctl | ||
| </ | </ | ||
| 行 39: | 行 40: | ||
| < | < | ||
| - | / | + | systemctl |
| </ | </ | ||
| 行 48: | 行 49: | ||
| < | < | ||
| - | / | + | systemctl |
| </ | </ | ||
| 行 65: | 行 66: | ||
| ===== データベース管理 ===== | ===== データベース管理 ===== | ||
| - | There is an essential tool for the proper | + | There is an essential tool for proper Pandora FMS performance, |
| - | Pandora FMS が適切に機能するためのタスクを実行するための重要なツールがあります。その場所は次のとおりです。 | + | Pandora FMS が適切にパフォーマンスを維持するためのタスクを実行する重要なツールがあります。その場所は次のとおりです。 |
| < | < | ||
| 行 182: | 行 183: | ||
| ===== データベースバックアップ ===== | ===== データベースバックアップ ===== | ||
| - | <WRAP center round important | + | <WRAP center round important |
| It is important to remember that this **only** backs up or restores the database, //without including other files//, nor the server configuration. | It is important to remember that this **only** backs up or restores the database, //without including other files//, nor the server configuration. | ||
| 行 188: | 行 189: | ||
| </ | </ | ||
| - | <WRAP center round important | + | <WRAP center round important |
| これは、他のファイルやサーバ設定を含めずに、データベース**のみ**のバックアップまたは復元であることを認識しておくことが重要です。 | これは、他のファイルやサーバ設定を含めずに、データベース**のみ**のバックアップまたは復元であることを認識しておくことが重要です。 | ||
| 行 194: | 行 195: | ||
| </ | </ | ||
| - | The command **mysqldump** will do a complete database dump of the table structure as well as its contents. This is done by doing a full database dump, both of the table structure as well as their contents. This command has several options to do a backup, and its most basic usage is enough to dump from the same system where the database is hosted. | + | The command **mysqldump** will do a complete database dump of the table structure as well as its contents. This is done by doing a full database dump, both of the table structure as well as their contents. This command has several options to do a backup, |
| - | コマンド **mysqldump** は、テーブル構造とその内容の完全なデータベースダンプを行います。このコマンドには、バックアップを実行するためのいくつかのオプションがありますが、ここでは最も基本的な使用法に焦点をあてます。これは、データベースを実行しているのと同じホストから実行することを意味します。 バックアップが行われるデータベース名とそれにアクセスするための認証情報を指定します。 | + | コマンド **mysqldump** は、テーブル構造とその内容の完全なデータベースダンプを実行します。これは、テーブル構造とその内容の両方の完全なデータベースダンプを実行することによって行われます。このコマンドには、バックアップを実行するためのいくつかのオプションがあり、// 最も基本的な使用法は、データベースがホストされている同じシステムからダンプするだけで十分です//。 |
| - | < | + | For instance, to backup '' |
| - | mysqldump -u <user> -p < | + | |
| - | </ | + | たとえば、'' |
| - | For instance, to backup " | + | <file> |
| - | + | ||
| - | 例えば、" | + | |
| - | + | ||
| - | <code> | + | |
| mysqldump -u root -p pandora> / | mysqldump -u root -p pandora> / | ||
| - | </code> | + | </file> |
| - | From a backup done that way, you may fully restore the database. Login in MySQL, proceed to create the database that will be restored and then load the backup in that database. Following the previous example: | + | From a backup done that way, you may fully restore the database. Login in MySQL, proceed to create the database that will be restored and then load the backup in that database. Following the previous example |
| - | そのようにして行われたバックアップから、データベースを完全に復元できます。MySQL にログインし、復元されるデータベースの作成に進み、そのデータベースにバックアップをロードします。前のファイルを例にすると、次のように実行します。 | + | そのようにして行われたバックアップから、データベースを完全に復元できます。MySQL にログインし、復元されるデータベースの作成に進み、そのデータベースにバックアップをロードします。前のファイルを例にすると、次のように実行します('' |
| - | <code> | + | <file> |
| - | [root@pandorafms ~]# mysql -u root -p | + | mysql -u root -p |
| - | mysql> create database pandora; | + | </file> |
| - | mysql> use pandora; | + | |
| - | mysql> source / | + | |
| + | <code sql> | ||
| + | CREATE DATABASE pandora; | ||
| + | USE pandora; | ||
| + | SOURCE / | ||
| + | GRANT ALL privileges ON pandora.* TO pandora@localhost IDENTIFIED BY ' | ||
| + | exit; | ||
| </ | </ | ||
| 行 228: | 行 228: | ||
| 最後に、Pandora FMS コンソールとサーバの両方で設定済みのユーザ権限を再度設定し、データベースへのアクセス権を付与します。('' | 最後に、Pandora FMS コンソールとサーバの両方で設定済みのユーザ権限を再度設定し、データベースへのアクセス権を付与します。('' | ||
| - | < | + | < |
| grant all privileges on pandora.* to pandora@localhost identified by ' | grant all privileges on pandora.* to pandora@localhost identified by ' | ||
| </ | </ | ||
| + | |||
| + | <wrap #ks5 /> | ||
| ===== Pandora FMS のバックアップとリカバリ ===== | ===== Pandora FMS のバックアップとリカバリ ===== | ||
| - | There is a script in Pandora FMS server distribution that is useful | + | There is a script in the Pandora FMS server distribution that is used to make a backup and a complete |
| Pandora FMS サーバの配布パッケージには、Pandora FMS を完全にバックアップおよび復元するのに役立つスクリプトがあります。 このスクリプトは、サーバとコンソールが同じマシン上にあるシステムでのバックアップと復元を目的としています。 | Pandora FMS サーバの配布パッケージには、Pandora FMS を完全にバックアップおよび復元するのに役立つスクリプトがあります。 このスクリプトは、サーバとコンソールが同じマシン上にあるシステムでのバックアップと復元を目的としています。 | ||
| - | <WRAP center round tip 60%> | + | It is designed to backup and restore the following components: |
| - | If there are several | + | 次のコンポーネントをバックアップおよび復元するように設計されています。 |
| + | |||
| + | * Server configuration file(s). | ||
| + | * Files(s) **pending execution**, | ||
| + | * **Database**, | ||
| + | * **Web Console**, complete. | ||
| + | |||
| + | * サーバ設定ファイル | ||
| + | * **実行保留中**のファイルと、エージェントの**リモート設定**ファイル。 | ||
| + | * **データベース**全体 | ||
| + | * **ウェブコンソール**全体 | ||
| + | |||
| + | <WRAP center round tip 90%> | ||
| + | |||
| + | If there are different | ||
| </ | </ | ||
| - | <WRAP center round tip 60%> | + | <WRAP center round tip 90%> |
| コンポーネントが複数に分かれた環境の場合は、適切なパラメーターでツールを使用するか、ニーズに合わせてツールを調整する必要があります。 | コンポーネントが複数に分かれた環境の場合は、適切なパラメーターでツールを使用するか、ニーズに合わせてツールを調整する必要があります。 | ||
| 行 251: | 行 267: | ||
| </ | </ | ||
| - | This script needs to be executed | + | This script needs to run as **root**. You are the only **responsible** for this key. It is located at: |
| - | この処理を実行するには、スクリプトを root 権限で実行する必要があります。スクリプトは以下にあります。 | + | この処理を実行するには、スクリプトを |
| - | <code> | + | <file> |
| / | / | ||
| - | </code> | + | </file> |
| - | If it is executed | + | <WRAP center round tip 90%> |
| + | |||
| + | When running | ||
| + | |||
| + | </ | ||
| + | |||
| + | <WRAP center round tip 90%> | ||
| 引数無しで実行すると、ヘルプを表示します。 | 引数無しで実行すると、ヘルプを表示します。 | ||
| + | |||
| + | </ | ||
| + | |||
| + | <wrap #ks6 /> | ||
| + | |||
| 行 290: | 行 317: | ||
| #!/bin/bash | #!/bin/bash | ||
| sendsms +34458474843 "The Pandora FMS has suffered some issue and it cannot be started." | sendsms +34458474843 "The Pandora FMS has suffered some issue and it cannot be started." | ||
| - | / | + | systemctl |
| </ | </ | ||
| 行 309: | 行 337: | ||
| **ウォッチドッグ**を起動し、バックグラウンドで動作させるには、次のように実行します。 | **ウォッチドッグ**を起動し、バックグラウンドで動作させるには、次のように実行します。 | ||
| - | <code> | + | <file> |
| nohup / | nohup / | ||
| - | </code> | + | </file> |
| - | <WRAP center round important | + | <WRAP center round important |
| + | |||
| + | When starting a **Watchdog**, | ||
| + | |||
| + | </WRAP> | ||
| + | |||
| + | <WRAP center round important 90%> | ||
| - | <WRAP center round important 60%> | ||
| **ウォッチドッグ**を実行しているときに、メンテナンス上の理由で Pandora FMS サーバを手動で停止したい場合は、事前に**ウォッチドッグ**プロセスを停止して、サービスが自動的に起動されないようにする必要があります。 | **ウォッチドッグ**を実行しているときに、メンテナンス上の理由で Pandora FMS サーバを手動で停止したい場合は、事前に**ウォッチドッグ**プロセスを停止して、サービスが自動的に起動されないようにする必要があります。 | ||
| + | |||
| </ | </ | ||
| + | |||
| + | <wrap #ks7 /> | ||
| ===== ヒストリデータベース ===== | ===== ヒストリデータベース ===== | ||
| 行 328: | 行 364: | ||
| ==== ヒストリデータベースの設定 ==== | ==== ヒストリデータベースの設定 ==== | ||
| - | <WRAP center round info 75%> | + | To configure a historical database, it is necessary to have a new MySQL server for its hosting, and it **must be different from the main database**. |
| - | Version NG 754 and later versions. | + | ヒストリデータベースを設定するには、それをホストするための新しい MySQL サーバが必要であり、そのサーバは**メインのデータベースとは異なるものである必要があります**。 |
| + | |||
| + | <WRAP center round info 90%> | ||
| + | |||
| + | Keep in mind that on the first connection to the future historical database, the specified user will create a new data structure. If this fails, it will cause the <wrap : | ||
| + | |||
| + | Essentially, | ||
| </ | </ | ||
| - | <WRAP center round info 75%> | + | <WRAP center round info 90%> |
| + | |||
| + | 将来的に使用するヒストリデータベースへの初回接続時に、指定されたユーザによって新しいデータ構造が作成される点にご注意ください。この処理に失敗すると、**ヒストリデータベース有効化(Enable historical database)** ボタンが無効になります。 | ||
| - | バージョン NG 754 およびそれ以降 | + | 基本的には、ヒストリデータベースをホストするリモート MySQL サーバの **root** 管理者が、データベースを作成し、そのデータ構造を構築するために接続するユーザの認証情報を設定する必要があります。これを行うには、リモートMySQL のコマンドラインで以下のようなコマンドを実行してください。 |
| </ | </ | ||
| - | 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: | + | <code sql> |
| + | CREATE USER < | ||
| - | ヒストリデータベースを設定するには、それをホストする新しいサーバが必要です(**メインデータベースのサーバとは異なります**)。MySQL がインストールされているサーバを用意したら、次の手順に従います。 | + | ALTER USER '< |
| + | | ||
| - | In Pandora FMS console, go to **Setup → Setup → Historical database** to access [[: | + | CREATE DATABASE < |
| - | Pandora FMS コンソールで、**セットアップ(Setup)** → **セットアップ(Setup)** → **ヒストリデータベース(Historical database)** へ行き、[[: | + | GRANT ALL PRIVILEGES |
| + | ON `< | ||
| + | TO `< | ||
| - | Fill in the following fields: | + | FLUSH PRIVILEGES; |
| + | </ | ||
| - | 次のフィールドを入力します。 | + | In the PFMS Web Console menu, choose <wrap : |
| - | | + | PFMS Web コンソールのメニューから |
| - | | + | |
| - | | + | |
| - | * **Database user**: History database user. Default value: '' | + | |
| - | * **Database password**: Password of the history database. This will allow to cennect to the history database. Next fill in the custom parameters | + | |
| - | * **ホスト(Host)**: | + | Fill in the previous fields: |
| - | * **ポート(Port)**: | + | |
| - | * **データベース名(Database name)**: ヒストリデータベースの名前。デフォルトは '' | + | |
| - | * **データベースユーザ(Database user)**: ヒストリデータベースユーザ。デフォルトは '' | + | |
| - | * **データベースパスワード(Dabase password)**: | + | |
| - | {{ :wiki:pandora_console_06-1.png }} | + | 項目を入力します: |
| + | |||
| + | * < | ||
| + | * <wrap : | ||
| + | * <wrap : | ||
| + | * <wrap : | ||
| + | * <wrap : | ||
| + | |||
| + | * <wrap : | ||
| + | * <wrap : | ||
| + | * <wrap : | ||
| + | * <wrap : | ||
| + | * <wrap : | ||
| + | |||
| + | <WRAP center round tip 90%> | ||
| + | |||
| + | It is recommended to configure the options for [[: | ||
| + | |||
| + | </ | ||
| + | |||
| + | <WRAP center round tip 90%> | ||
| + | |||
| + | [[: | ||
| + | |||
| + | </ | ||
| - | The last fields of this form **Data days old to keep in active database, Transference block size (Step)** | + | In the fields of this form called <wrap :en>**Data days old to keep in active database**</ |
| - | このフォームの最後のフィールド**アクティブなデータベースに保持するデータ日数、転送ブロックサイズ(ステップ)** および **転送の遅延(秒)** は、データがヒストリデータベースへ送信される方法を定義します。つまり、オーバーロードを避けるために、n //日(データ日)// | + | **アクティブデータベースに保持するデータの経過日数(Data days old to keep in active database)**、**転送ブロックサイズ(ステップ)(Transference block size (Step))**、および **転送間隔(秒)(Delay between transferences (seconds))** の各フィールドでは、データをヒストリデータベースへ送信する際の手順を定義します。具体的には、//n//日(Data days)以上経過したデータを、//n//行(Step)ずつのブロックに分けてヒストリデータベースへ移動させ、過負荷を防ぐためにブロック間の処理に// |
| - | In the same screen, | + | On this same screen, |
| - | 同じ画面で、n 日を超えるイベントをヒストリデータベースに送信するかどうかを決定することもできます(**アクティブなデータベースにイベントを保持する日数**)。ただし、 イベントはヒストリデータベースを大幅に増大させることと、レポートを生成するときにのみ参照されイベント表示では参照されない点を考慮する必要があります。 | + | 同じ画面で、//n//日以上経過したイベントをヒストリデータベースに送信するかどうかも設定できます(<wrap :ja>**アクティブデータベースに保持するイベント日数(Events days old to keep in active database)**</ |
| - | <WRAP center round tip 75%> | + | <WRAP center round tip 90%> |
| - | The historical database uses the ''/ | + | The historical database uses the binary |
| </ | </ | ||
| - | <WRAP center round tip 75%> | + | <WRAP center round tip 90%> |
| - | ヒストリデータベースは、''/ | + | ヒストリデータベースは、データの転送にバイナリ |
| </ | </ | ||
| - | [[ja: | + | [[ja: |
| ===== (OBSOLETE) ===== | ===== (OBSOLETE) ===== | ||