文書の過去の版を表示しています。
他のシステムへのマイグレーション
There can be many reasons for moving a PFMS server and its Web Console, which are generally on the same real machine or virtual machine (Pandora FMS monolith environment).
Pandora FMS サーバとその Web コンソールを移動する理由はさまざまですが、これらは通常、同じ実マシンまたは仮想マシン上にあります (単一の Pandora FMS 環境)。
Possible examples:
考えられる例:
- A new version of Pandora FMS might require a different operating system, for example, migrating from CentOS 7 to Rocky Linux 8 or from Rocky Linux 8 to RedHat Enterprise (RHEL) 8.
- It could also be the case of moving from one web service provider to another: Pandora FMS uses less data than the act of making an image of the entire operating system.
- In the case of audits or to test new functionalities, it is necessary to have a copy of the main server.
- Pandora FMS の新しいバージョンでは、たとえば、CentOS 7 から Rocky Linux 8 への移行、または Rocky Linux 8 から RedHat Enterprise (RHEL) 8 への移行など、別のオペレーティングシステムが必要になる場合があります。
- ある Web サービスプロバイダーから別の Web サービスプロバイダーに移行する場合も考えられます。Pandora FMS の容量は、オペレーティングシステム全体のイメージよりも少ないです。
- 監査の場合、または新しい機能をテストする場合は、メインサーバのコピーが必要です。
手順
Usually the full path to the PFMS Web Console is
通常、Pandora FMS コンソールのフルパスは次の通りです。
/var/www/html/pandora_console
and in the following instructions it is abbreviated as $CONSOLE_PATH
.
以下の手順では、$CONSOLE_PATH
と記載します。
データのエクスポート
1.- Make a backup of the database of the previous system. There are several steps, open a terminal window with administrator rights (root user):
1.- 以前のシステムのデータベースのバックアップを取得します。いくつかのステップがあります。管理者権限(root ユーザ)でターミナルウインドウを開きます。
- Start by making a logical copy of the database with the following command:
- 次のコマンドでデータベースの論理的なコピーを作成します。
mysqldump --single-transaction --max_allowed_packet=512M -u root -p pandora> backup_pandora_X.Y.sql
- The previous resulting file (
backup_pandora_X.Y.sql
) will be compressed with the following data in order to have a single file for the move. For examplebackup_pandora_X.Y.tar.gz
, compressed format which preserves the intrinsic values of each file. - Compress all existing configuration files in the
/etc/pandora/*.conf
directory. - Zip the entire directory and subdirectories of
$CONSOLE_PATH/attachment/
. - The custom images and icons in
$CONSOLE_PATH/images/
, if any. - Zip the entire
/var/spool/pandora/data_in/
directory. - Compress all the server plugin located in
/usr/share/pandora_server/util/plugin/
. If they have one or more server plugins located in another directory that is not indicated, they must also be compressed. - Compress all dependencies installed on the source server, which are necessary for the proper functioning of scripts / plugins installed on the source server and are not on the destination server. Advanced systems will need to fully install the Integrated Development Environments ( or Integrated Development Environment, IDE ).
- Compress all SSL certificates and custom Apache web server configuration located in
/etc/httpd/
, if there are any such file(s).
- 上記の出力ファイル (
backup_pandora_X.Y.sql
) は、移動用のファイルを作成するために圧縮します。たとえば、backup_pandora_X.Y.tar.gz
といった圧縮形式です。 /etc/pandora/*.conf
ディレクトリ内のすべての設定ファイルを圧縮します。$CONSOLE_PATH/attachment/
の全ディレクトリおよびサブディレクトリを圧縮します。$CONSOLE_PATH/images/
のカスタム画像やアイコンがある場合は、それを圧縮します。/var/spool/pandora/data_in/
ディレクトリ全体を圧縮します。/usr/share/pandora_server/util/plugin/
にあるすべての サーバプラグイン を圧縮します。 別のディレクトリにもサーバプラグインがある場合は、それらも圧縮する必要があります。- 元サーバにインストールされているすべての依存ファイルを圧縮します。対象となる依存ファイルは、元サーバにインストールされているスクリプト/プラグインが適切に機能するために必要で、宛先サーバには存在しないものです。 高度なシステムでは、統合開発環境 (または IDE) を完全にインストールする必要がある可能性があります。
/etc/httpd/
にあるすべての SSL 証明書とカスタム Apache Web サーバ設定を圧縮します(そのようなファイルがある場合)。
You are solely responsible for the safeguarding of your data. Write down on paper and pencil the procedure you will choose for the data transfer. Be careful, use redundancy in terms of backups and procedures with several people helping you in the process.
データの保護はユーザのみなさん自身の責任です。データ転送のために選択する手順を紙と鉛筆で書き留めましょう。 バックアップや手順に関しては、複数の人が作業をサポートしてくれるような体制を確保するよう注意してください。
Data Import
2.- Install the new Pandora FMS system from scratch, we recommend the online installation tool.
3.- Close all processes running on the new system, except mysql; Start with Pandora FMS (starting with version NG 754, there are additional options for manual start and stop of HA High Availability Environments):
/etc/init.d/pandora_server stop /etc/init.d/pandora_agent_daemon stop /etc/init.d/tentacle_server stop
4.- To stop the Apache server will depend on the distribution you are using:
/etc/init.d/apache2 stop
/etc/init.d/httpd stop
systemctl stop httpd.service
5.- Next, send or copy, in the easiest way, the file backup_pandora_X.Y.tar.gz
from the old system to the new one. Unzip the files in their corresponding places.
6.- Enter mysql with root user. Access the Pandora FMS database in the new system, by default pandora
and import the database.
# mysql -u root -p mysql>use pandora Database changed mysql>source ~/backup_pandora_X.Y.sql
This path will vary depending on the directory where you have the old system backup, here it is assumed that you have it in your home directory ($HOME
).
7.- In the event that it was a migration to a higher version, in which the structure of the database changes, this would be the moment of axisCut the migration scripts as indicated in major version upgrade procedure.
8.- If you have made a distribution change, take into account that the path or PATH
of the Web Console has been modified and in this case there are some fields in the database that have also been changed. modified, such as the tconfig
table and its attachment_store
and fontpath
fields. To modify these fields you must enter these instructions (query). The example is for a migration to Rocky Linux 8; in other distributions change the path
of the Apache directory.
# mysql -u root -p> use pandora; Database changed> UPDATE tconfig SET value = '/var/www/html/pandora_console/attachment' WHERE token LIKE 'attachment_store';> UPDATE tconfig SET value = '/var/www/html/pandora_console/include/fonts/smallfont.ttf ' WHERE token LIKE 'fontpath';
These PATH
must also be taken into account in the server and console configuration files (config.php
and pandora_server.conf
files).
9.- Once the database has been migrated, you must check if the files …/pandora_console/include/config.php
and /etc/pandora/pandora_server.conf
and the new ones they have the same data in the dbname
, dbuser
and dbpass
fields.
- If they are the same, go to step number 10.
- If they are different, choose only one of the following options:
- Option ( a ): Replace the new files with the old ones.
- Option ( b ): Copy the data (
dbname
,dbuser
anddbpass
) from the old files to the new ones. - Option ( c ): Grant permissions to the database with the data from the new installation. Assuming that the new installation has these data:
dbname=pandora
,dbuser=pandora1
anddbpass=pandora2
, the example takes the form:
# mysql -u root -p> grant all privileges on pandora.* to 'pandora1'@'localhost' identified by 'pandora2';> flush privileges;
10.- After this, start all the daemon again and you will be able to access the Pandora FMS Console, with all the Agents, Modules, alerts , etc.
11.- If the IP address or URL has changed in the new host, all local Agents will report to this new system. For Software Agents, you must modify the parameter server_ip in each of them.
12.- Use, in Operaciones Masivas, editing agents to finalize any pending details.
In the case of an Enterprise version, the same process will be followed.