1 Manual Update

It is important to understand the basic components in which Pandora FMS is divided. Basically we can distinguish: console, server and database. In Opensource installations we will update these three components quickly, but in Enterprise installations the process will take a few more steps since the components have extended Enterprise functionalities that need to be updated separately.

The breakdown of components is as follows:

Opensource installations:

Web Console.

Server.

Database.

Enterprise installations:

Open Web Console.

Enterprise Web Console (extended console functions).

Open Server.

Enterprise Server (extended server functions).

Database (additional charts of the Enterprise version ).

Updates will always include console changes, occasionally server changes, and rarely database changes. We will organize the updates into two major categories: minor version upgrades, with no database changes, and major version upgrades, with database changes.

1.1 Update a minor version

These don't include any changes to the database, only to the console and sometimes to the server. Eg. updates 6.1 SP1 to 6.1 SP2.

Initial precautions/safeguards:

1. Back up the database. E.g.

mysqldump -u root -p pandora > backup_pandora_X.Y.sql

2. Back up the config files: pandora_server.conf, config.php, pandora_agent.conf.

1.1.4 Version 7.0NG ( Rolling Release )

If we decide to update manually the Pandora FMS Console in version 7.0NG, (through rpms, tarball or deb) we can find ourselves facing the need to manually apply the migration scripts between the different versions. To avoid this situation in version 7 we always recommend updating the console using Update Manager.

In case of us having an outdated database (a rare error that should not occur under normal conditions), administrator users will see a warning on the notification tab indicating this problem:

To solve this problem enter the server where the Pandora FMS console is installed and go to the directory named /var/www/html/pandora_console/extras/mr. There should be another directory located labeled as 'updated'. All sqls that are already applied must be stored within the 'updated' directory, and those that are not must be stored outside. So once we apply an sql to the database, we must move them to the 'updated' directory.
Let's give the example of MR1 execution. In this case we don't have any MR applied on the database and the MR0 will appear in the footer of the Pandora FMS console. We have installed version 704 manually and we have to apply the MR1 executing the sql that we will find in /var/www/html/pandora_console/extras/mr/ called 1. sql. We'll have to execute it like this:

1.2 Major release update

Major release updates always include database changes so you need to update your database schema, e. g. updates from version 6.0 to 6.1; or 6.1 to 7.0.

1.2.1 Database updates ("Major releases")

In order to update the database you first need to update the Open or Enterprise console, depending on your version. These updates allow the necessary sql files to be downloaded.

Once the console is up to date, the sql scripts of the database update can be found in /extras or /enterprise (again, depending on your version) on the console. On a standard CentOS installation they can be found at:

2 Automatic update withUpdate Manager

2.1 OpenSource updates

From version 4.0.2 onward, Pandora FMS (Opensource version) allows semi-automatic weekly updates, based on improvements in the Update Manager system (previously exclusive to Enterprise). It allows an online query to be carried out, to find out if there is an update available and, if so, downloading it (with authorization) and automatically update the console.

Updates feature the following characteristics:

An outgoing Internet connection from the Pandora FMS console is necessary.

Update manager contacts our servers to get the latest available version (in Sourceforge). It sends statistical data on the number of agents used (the data is anonymous).

Downloads the update from Sourceforge, from the directory of weekly updates.

Weekly updates are not incremental, but the total content for the console, which means the download can take a while (packet size is approximately 25MB).

Updates are automatic: they are not checked by the team, and cannot be guaranteed. However, in 99% of cases they present no issues.

Updates are only for the console, not agents or server.

2.1.1 Console update process

It is fairly simple. Go to extensions -> Update manager. On the main screen you'll see if there are any updates pending or available to install, plus the latest console version. Click to install.

After downloading the package, a dialog will appear with the option to accept or reject the update.

Click Confirm to begin the installation process.

Some updates contain modifications in the database. The update process launches a dialog to inform about these changes, as in the following screenshot.

At this point there are two possibilities, either applying the changes to the database and updating the console, or rejecting the update, and leave the console and database as they are.

For Update Manager to work you need an outgoing Internet connection. It uses WGET by default to download packets, you can use the CURL method (this must be changed in the Pandora configuration) but it is slower.

After the process, the main update page will appear with the updated console version displayed. Congratulations, you've successfully updated your version!

2.2 Enterprise updates

Unlike Open updates, these have some additional characteristics:

100% tested by our in-house development team, so you can take advantage of the latest updates (even hours after opening an incident, in some cases).

Allows "offline" updates, downloading packages from the support page, for Pandora FMS installations that don't have an Internet connection (for security reasons).

2.2.1 Configuration

In order to be able to use Update Manager in the Enterprise version, first you must have the Updater correctly configured , which has its own section in the menu:

2.2.2 "Online" updates

Access Update Manager from the update section. If you have the Enterprise version installed, you can use its interface (if not, the one of the Open version will appear).

From this page you can see the version of Pandora FMS you are currently using, plus any new updates available.

To update to the last version click on the link that shows the image in your Pandora FMS console.

A dialog will appear giving with the option to continue or not.

If you click Continue, two things can happen: either the console will be updated and the process will finish; or, the update includes changes to the database and a dialog will appear asking if you want to update the database or not.

If we decide to update it, the process will continue in a normal way, but if we reject it, neither the database nor the console will be updated, since some changes in the database can have critical importance in changes to the console in that same update.

After, the updater will appear with the current version installed on Pandora FMS.

2.2.3 "Offline" updates

"Offline" Pandora FMS updates can also be downloaded, which have .OUM extensions. Go to the official Pandora FMS support page to download them.

Upload them to the console with the following control:

Once uploaded, the file will appear. We can click on it to start the update.

The update follows the same operation flow as online downloads, displaying the corresponding console and database update dialogs, if there are any changes to be applied there.

The Pandora FMS Console can be updated in the same way as with the .OUMs, using zip files created by our team.

2.3 Additional PHP engine configuration for Update Manager

For Open Update Manager to run correctly, it needs more memory than the default memory it takes. To assign more memory to the PHP run, and make the Open Update Manager work, you must edit the php. ini file and set the memory to at least 256M.

3 Migrating to another system

We can encounter the circumstance that we want to use a new version of Pandora in another different or newer system or distribution , for example, migrating from a SUSE 11 to a SUSE 12 or from an Ubuntu to CentOS.

For this, all we have to do is install Pandora FMS from scratch in the new system , or download the ISO that we provide and install it.

1. When Pandora FMS is running on the new system, back up the previous system's database:

mysqldump -u root -p pandora > backup_pandora_X.Y.sql

2. Then, send the backup_pandora_X.Y.sql file from the oldd system to the new one.

5. In the case of a migration to a higher version in which the database structure changes, this would be the time to run the migration scripts as indicated in the major version update procedure.

6. If we've changed to a different distribution, keep in mind the console path has also changed and some database fields will be different, such as tconfig "attachment_store" and "fontpath". To modify these fields, introduce these queries. In the example you can see how a migration to CentOS would look. For other distributions, just change the Apache directory path.

Keep these paths in mind in relation to server and console configuration (config.php and pandora_server.conf)

7. Once the database is migrated check that the previous .../pandora_console/include/config.php and /etc/pandora/pandora_server.conf files and the new ones contain the same data in the dbname, dbuser, dbpass fields. If they are the same you don't need to do anything. If not, we can do one off these two things :

a. Replace the new files with the old ones or replace the data of the new files for the old ones.

b. Give the database permissions with the data from the new installation. E. g. with the following data; dbname=pandora, dbuser=pandora1 and dbpass=pandora2, like this:

Restart the daemons and access the Pandora FMS console, including all agents, modules, alerts, etc. already configured and, if you change the IP of the new host for the previous, all the local agents will report to the new system.

Follow the same process for theEnterprise version.

4 Windows client update from installer

In the installation executable of the console and the server there is a new option that allows to update Pandora FMS if a previous version is installed in the computer.

Start the installer (. exe) as if you were going to perform an installation frorm scratch and select the language:

Follow the steps in the installer:

Accept the Terms and Conditions:

In the Select components section, select only the option to update the version installed.

Select the necessary installation path and continue. The installer will ask for the IP and the name of the Pandora FMS server.

Start installing the components. A warning will appear reminding you that Microsoft Visual C++ is required for the modules to function correctly.

Click Finish for the installation to complete.

Pandora FMS is now updated and ready to use.

Following these steps the Pandora FMS code will be updated to the latest version, among which is the substitution of Apache for Nginx as web server. If you want to keep the installation with Apache, update the console with OUM packets or Update Manager Online.

5 Update to a previous version

To be able to update your software to a previous version, just downgrade Pandora FMS console. As a precaution, it is recommended to do a database and Pandora FMS configuration file backup as shown previously (poner link más arriba). The Open package must always be installed first and the Enterprise version afterwards