Difference between revisions of "Pandora: Documentation en: Anexo Upgrade"

From Pandora FMS Wiki
Jump to: navigation, search
(Configuración adicional del motor PHP para la operación de Update Manager)
("Offline" updates)
 
(48 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
[[Pandora:Documentation_en|Go back to Pandora FMS documentation index]]
 
[[Pandora:Documentation_en|Go back to Pandora FMS documentation index]]
  
= Update manual =
 
  
Pandora FMS is fundamentally a triad of console, server and database. In Opensource installations these three components can be rapidly updated, whereas Enterprise installations contain extra functions that require updating separately.
+
= Manual Update =
  
Breakdown
+
It is important to understand the basic components in which Pandora FMS is divided. There are three main elements: console, server and database. In Opensource installations, these three components are quickly updated, but in Enterprise installations the process will take a few more steps, since the components have extended Enterprise features that need to be updated separately.
 +
 
 +
The component breakdown is as follows:
  
 
Opensource installations:
 
Opensource installations:
Line 17: Line 18:
 
* Open Server.
 
* Open Server.
 
* Enterprise Server (extended server functions).
 
* Enterprise Server (extended server functions).
* Database (Enterprise version additional charts).
+
* Database (additional charts of the Enterprise version).
  
Updates '''always''' include console changes, '''occasionally''' server changes, and '''rarely''' database changes. We'll divide the the updates into two super-categories: minor release updates, with no database changes; and major release updates, including changes to the database.
+
Updates will '''always''' include console changes, '''sometimes''' server changes, and '''once in a while''' database changes. Let us organize the updates into two major categories: minor version upgrades, with no database changes, and major version upgrades, with database changes.
  
 +
== Update a minor version ==
  
== Minor release version update ==
+
These do not include any changes in the database, only in the console and sometimes in the server. E.g. updates 6.1 SP1 to 6.1 SP2.
  
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:
  
Initial precautions/safeguards:
+
1. Back up the database. E.g.
 
+
mysqldump -u root -p pandora > backup_pandora_X.Y.sql
1. Back up the database. Eg: mysqldump -u root -p pandora > backup_pandora_X.Y.sql
 
  
 
2. Back up the config files: pandora_server.conf, config.php, pandora_agent.conf.
 
2. Back up the config files: pandora_server.conf, config.php, pandora_agent.conf.
Line 40: Line 41:
 
4. Suspend the following services: pandora_server, tentacle_serverd, httpd, pandora_agent and mysqld.
 
4. Suspend the following services: pandora_server, tentacle_serverd, httpd, pandora_agent and mysqld.
  
5. Update.
+
5. Proceed to update.
  
=== From RPM packets ===
+
=== From RPM packages ===
  
 
* Open console update:
 
* Open console update:
Line 60: Line 61:
 
  rpm -U pandorafms_server_enterprise_package.rpm
 
  rpm -U pandorafms_server_enterprise_package.rpm
  
You can find out which version you're running at any time, before or after the installation by executing the command:
+
You can find out which version you have installed at any time, before or after the installation by executing the command:
  
 
  rpm -qa | grep -i pandora
 
  rpm -qa | grep -i pandora
  
=== From DEB packets ===
+
=== From DEB packages ===
  
 
* Open console update:
 
* Open console update:
Line 84: Line 85:
 
  ./pandora_server_installer --install
 
  ./pandora_server_installer --install
  
In case of dependency problems, they can be resolved directly with:
+
Should there be any dependency problems, they can be solved directly with:
  
 
  apt-get install -f
 
  apt-get install -f
Line 119: Line 120:
 
  cd pandora_agent
 
  cd pandora_agent
 
  ./pandora_agent_installer --force-install
 
  ./pandora_agent_installer --force-install
 +
 +
=== Version 7.0NG ( Rolling Release ) ===
 +
 +
If you choose to update manually the Pandora FMS Console in version 7.0NG, (through rpms, tarball or deb) you may have to manually apply the scripts of migration between the different versions. To avoid this situation, in version 7 it is always recommended to update the console using Update Manager.
 +
 +
In case of having an outdated database (a rare error that should not take place under normal circumstances), administrator users will see a warning on the notification tab indicating this problem:
 +
 +
<center>
 +
[[image:mr_message.png|center]]
 +
</center>
 +
 +
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 within 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 an sql is applied to the database, move them to the 'updated' directory.
 +
MR1 execution will serve as example. In this case, there is no MR applied on the database and the MR0 will appear in the footer of the Pandora FMS console. Version 704 has been manually installed and the MR1 must be applied executing the sql found at /var/www/html/pandora_console/extras/mr/ called 1.sql. Execute it like this:
 +
 +
[[email protected] mr]# cat 1.sql | mysql -u root -p pandora
 +
 +
The MySQL user is root and the database is labeled as pandora.
 +
 +
Once applied, update the MR value in the tconfig table of MySQL to cange the footer value to the current one. Execute the following command once entered MySQL:
 +
 +
mysql> use pandora;
 +
mysql> update tconfig set value= XX where token='MR';
 +
 +
Once done, the warning message will disappear from the Console and in the footer, the MR1 will appear as applied. The next step is to move the sql to the 'updated' folder. To know which MRs should be applied, please go to the next [[Pandora:Documentation_en:Versions| link.]]
 +
 +
[[email protected] mr]# mv 1.sql updated/
  
 
== Major release update ==
 
== Major release update ==
  
Major release updates always include database changes so '''you need to update your database schema''', eg. updates from version 6.0 to 6.1; or 6.1 to 7.0.
+
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.
  
 
=== Database updates ("Major releases")  ===
 
=== 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.
+
In order to update the database, first 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 database update scripts 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:
+
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:
  
 
  /var/www/html/pandora_console/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql
 
  /var/www/html/pandora_console/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql
 
  /var/www/html/pandora_console/enterprise/pandoradb_migrate_vX.Y_to_vZ.T.mysql.sql
 
  /var/www/html/pandora_console/enterprise/pandoradb_migrate_vX.Y_to_vZ.T.mysql.sql
  
Before updating it's recommendable to follow the precautions described above: make a backup of the database and the config files, and suspend the Pandora FMS server:
+
Before updating it is recommended to follow the precautions described above: back up the database and the config files, and suspend the Pandora FMS server:
  
 
  service pandora_server stop
 
  service pandora_server stop
Line 141: Line 168:
 
  mysql -u username -p -D databasename
 
  mysql -u username -p -D databasename
  
Eg.
+
E. g.
  
 
  mysql -u pandora -p -D pandora  
 
  mysql -u pandora -p -D pandora  
+
 
Execute the following from the MySQL command-line:
+
Execute the following from MySQL command-line:
  
 
  source /yourconsolepath/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql;
 
  source /yourconsolepath/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql;
  
* Enterprise database update:
+
{{Tip|When executing the Open version migration, the Enterprise version will also be updated.}}
  
mysql -u username -p -D databasename
+
To exit the MySQL client, execute "quit". The database is now updated to the correct version.
  
Eg.
+
In case you need to go back to a previous version, you can restore the backed up database by means of this procedure:
 
 
mysql -u pandora -p -D pandora
 
 
Execute the following from the MySQL command line:
 
 
 
source /yourconsolepath/enterprise/pandoradb_migrate_vX.Y_to_vZ.T.mysql.sql;
 
 
 
To exit MySQL  execute "quit". The database is now updated to the correct version.
 
 
 
In case you need to go back to a previous version, you can restore the backed up database with:
 
  
 
  mysql -u username -p databasename
 
  mysql -u username -p databasename
Line 171: Line 188:
 
  > source backup_pandora_X.Y.sql
 
  > source backup_pandora_X.Y.sql
  
Eg.
+
E. g.
  
 
  mysql -u root -p pandora
 
  mysql -u root -p pandora
Line 179: Line 196:
 
  > source backup_pandora_X.Y.sql;
 
  > source backup_pandora_X.Y.sql;
  
= Automatic update withUpdate Manager =
+
= Automatic update with Update Manager =
  
 
== OpenSource updates ==
 
== OpenSource updates ==
  
From version 4.0.2 onward, Pandora FMS (Opensource version) permits 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, to download it (under authorization) and automatically update the console.
+
From version 4.0.2 onwards, 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, download it and automatically update the console.
  
 
Updates feature the following characteristics:
 
Updates feature the following characteristics:
  
* You need an outgoing Internet connection from the Pandora FMS console.
+
* An outgoing Internet connection from the Pandora FMS console is necessary.
* Update manager contacts our servers to get the latest version (in Sourceforge). It sends statistical data on the number of agents used (the data is anonymous). Enviará datos estadísticos de uso anónimos (nº de agentes).
+
* Update manager contacts our servers to find the latest version available (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.
+
* It 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).
+
* Weekly updates are not incremental, but the total content for the console, which means the download process could 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.9% of cases they present no issues.
+
* 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.
+
* Updates are '''only''' for the console, not for agents or server.
  
=== Console update ===
+
=== Console update process ===
  
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.
+
It is fairly simple. Go to extensions -> Update manager. On the main screen you will see if there are any pending or available updates, plus the latest console version. Click to install.
  
 
<center>
 
<center>
[[file:um_online_open_actualizar_es.png|center|500px]]
+
[[file:um_online_open_actualizar_en.png|center|500px]]
 
</center>
 
</center>
  
After downloading the packet a dialog will appear with the option to accept or reject the update.
+
After downloading the package, a dialog will appear with the option to accept or reject the update.
  
 
<center>
 
<center>
[[file:dialog_um_principal_es.png|center|500px]]
+
[[file:dialog_um_principal_en.png|center|500px]]
 
</center>
 
</center>
  
Click Confirm to begin the installation process.
+
Click "Ok" 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.
+
Some updates contain databas modifications. The update process launches a dialog to inform about these changes, as in the following screenshot.
  
 
<center>
 
<center>
[[file:dialog_hay_mr_es.jpg|center|500px]]
+
[[file:Dialog hay un mr en.JPG|center|500px]]
 
</center>
 
</center>
  
At this point there are two possibilities, apply the changes to the database and update the console, or reject the update, and leave the console and database as they are.
+
At this point there are two possibilities, either applying the changes to the database and updating the console, or rejecting the update, so that nor the database nor the console are updated, since some changes in the console need the according changes in the database.
  
{{tip|For Update Manager to work you need an outgoing Internet connection. It uses WGET by default to download packets, and can also use CURL but it is less fast.}}
+
{{tip|To use Update Manager, 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 FMS 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!
 
  
 +
After the process, the main update page will appear with the updated console version displayed. Congratulations, you have successfully updated your version!
  
 
<center>
 
<center>
Line 229: Line 245:
 
== Enterprise updates ==
 
== Enterprise updates ==
  
Unlike Open installations, these have some additional characteristics:
+
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).
  
* 100% tested by our in-house development team, so you can update daily if necessary (even hours after opening an incident, in some cases).
+
* Specific updates (incremental) that only update out-of-date elements, without downloading heavy packages.
  
* Specific updates (incrementals) that only update out-of-date elements, without downloading heavy packets.
+
* It allows "offline" updates, downloading packages from the support page, for Pandora FMS installations that do not have an Internet connection (for security reasons).
  
* Enables "offline" updates, downloading packets from the support page, for Pandora FMS installations that don't have an Internet connection (security reasons).
+
=== Configuration ===
  
To be able to use Update Manager Enterprise version, configure the updater from its menu options:
+
To be able to use Update Manager in the Enterprise version, first the updater must be correctly configured, which has its own section in the menu:
  
 
<center>
 
<center>
[[image:opciones_um_es.png|center]]
+
[[image:opciones_um_en.png|center]]
 
</center>
 
</center>
  
Access Update Manager from the update section. If you have Enterprise version installed, you can use the interface (if not, the Open version will appear).
+
=== "Online" updates ===
 +
 
 +
Update Manager is available in the update section. If you have the Enterprise version installed, you may use this interface, otherwise the one to appear will be that of the Open version.
  
 
<center>
 
<center>
[[image:um_online_pag_principal_es.png|center|750px]]
+
[[image:Um online pag principal en.JPG|center|500px]]
 
</center>
 
</center>
  
From this page you can see the version of Pandora FMS you are currently using, plus any new updates available.
+
From this page, you can see the current version of Pandora FMS, plus any new updates available.
 +
 
 +
To update to the last version, click on the link that shows the image in your Pandora FMS console.
  
To update to the latest version click the console link. A dialog will appear that giving you the option to continue or not.
+
A dialog will appear giving the option to continue or not.
  
 
<center>
 
<center>
[[image:dialog_um_principal_es.png|center|500px]]
+
[[image:dialog_um_principal_en.png|center|500px]]
 
</center>
 
</center>
  
If you click Continue, either, 1) the console will be updated and the process will finish; or, 2) the update includes changes to the database and a dialog will appear asking if you want to update the database or not.
+
If you click Continue, two things can happen: either the console will be updated and the process will finish; or, the update may include database changes and a dialog will appear asking whether you want to update the database or not.
  
 
<center>
 
<center>
[[image:dialog_hay_mr_es.jpg|center|500px]]
+
[[image:Dialog hay un mr en.JPG|center|500px]]
 
</center>
 
</center>
  
If you update the database, the process will execute normally; however, if not, neither the database or the console will be updated, as some database changes can have critical consequences for console changes in the same update.
+
If you decide to update it, the process will continue in a normal way, but if you 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.
 
After, the updater will appear with the current version installed on Pandora FMS.
Line 269: Line 291:
 
=== "Offline" updates ===
 
=== "Offline" updates ===
  
"Offline" Pandora FMS updates can also be downloaded, as they have .OUM extensions. Go to the official Pandora FMS support page to download.
+
"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 with the following control:
+
Upload them to the console with the following control:
  
 
<center>
 
<center>
[[image:um_offline_pag_principal_es.png|center]]
+
[[image:um_offline_pag_principal_en.png|center]]
 
</center>
 
</center>
  
Once uploaded, the file will appear. Click to start the update.
+
Once uploaded, the file will appear. We can click on it to start the update.
  
 
<center>
 
<center>
[[image:um_offline_pag_principal_cargado_es.png|center]]
+
[[image:um_offline_pag_principal_cargado_en.png|center]]
 
</center>
 
</center>
  
 
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 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.  
  
{{tip|The Pandora Console can be updated in the same way, using zip files created by our team.}}
+
{{tip|The Pandora FMS Console can be updated in the same way as with the OUMs, using zip files created by our team.}}
 +
 
 +
{{Warning|In case of updating an installation with High Availability (HA), it will be necessary to take into account what is indicated in [[http://51.91.156.102/docs/index.php?title=Pandora:Documentation_en:HA#Update this section]].}}
  
 
== Additional PHP engine configuration for Update Manager ==
 
== Additional PHP engine configuration for Update Manager ==
  
For Open Update Manager to execute correctly it needs more memory than it has pre-determinedly assigned. To assign more memory to PHP execution and for Open Manager to function, the php.ini file must be edited and a minimum memory of 256M established.
+
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.
  
 
The line is:  
 
The line is:  
Line 297: Line 321:
 
Generally on Debian/Ubuntu systems, this file may be found here:  /etc/php5/apache2.
 
Generally on Debian/Ubuntu systems, this file may be found here:  /etc/php5/apache2.
  
[[Pandora:Documentation|Volver a Indice de Documentacion Pandora FMS]]
+
http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en
  
 
[[Category: Pandora FMS]]
 
[[Category: Pandora FMS]]
  
= Migración a otro sistema =
+
= Migrating to another system=
  
Nos podemos ver ante la circunstancia de que queremos usar una nueva versión de Pandora en otro sistema/distribución diferente o más nueva, por ejemplo migrar de un SUSE 11 a un SUSE 12 o de un Ubuntu a CentOS.
+
You may want to use a new version of Pandora FMS 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.
  
Para realizar esto, lo único que tenemos que hacer es instalar en el nuevo sistema Pandora FMS desde cero, o descargar directamente la ISO que proporcionamos e instalarla.
+
To do that, install Pandora FMS from scratch in the new system, or download the ISO that we provide and install it.
  
1. Una vez este funcionando Pandora FMS en el nuevo sistema, procederemos a realizar un backup de la base de datos del anterior sistema:
+
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
 
  mysqldump -u root -p pandora > backup_pandora_X.Y.sql
  
2. Despúes enviaremos del modo que nos sea más sencillo el archivo backup_pandora_X.Y.sql del sistema viejo al nuevo.
+
2. Then, send the backup_pandora_X.Y.sql file from the oldd system to the new one.
  
3. Cerramos todos los procesos que esten corriendo excepto mysql.
+
3. Close all running processes except for MySQL.
  
 
  /etc/init.d/pandora_server stop  
 
  /etc/init.d/pandora_server stop  
 
  /etc/init.d/pandora_agent_daemon stop  
 
  /etc/init.d/pandora_agent_daemon stop  
 
  /etc/init.d/tentacle_serverd stop  
 
  /etc/init.d/tentacle_serverd stop  
  /etc/init.d/apache2 stop  o /etc/init.d/httpd stop (parar servidor apache, variará dependiendo de la distribución que usemos)
+
  /etc/init.d/apache2 stop  o /etc/init.d/httpd stop (for apache servers, this will vary depending on the distribution you're using)
  
4. Entramos en mysql con usuario root. Accedemos a la base de datos de pandora en el sistema nuevo, por defecto "pandora" e importaremos la base de datos.
+
4. Enter MySQL as root user. Access the Pandora FMS database on the new system (¨pandora¨ by default) and import the database.
  
 
  #mysql -u root -p
 
  #mysql -u root -p
 
  mysql>use pandora
 
  mysql>use pandora
 
  Database changed
 
  Database changed
  mysql>source /home/artica/backup_pandora_X.Y.sql ( esta ruta variará dependiendo el directorio donde tengamos el backup )
+
  mysql>source /home/artica/backup_pandora_X.Y.sql ( this path will vary depending on the directory where the backup is stored )
 +
 
 +
5. In case of a migration to a higher version, where the database structure changes, this would be the time to run the migration scripts as indicated in the major version update procedure.
 +
 
 +
6. If you have changed the 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, enter these queries. In the example you can see what a migration to CentOS would look like. For other distributions, change the Apache directory path.
  
5. En el caso de que fuese una migración a una versión mayor en la que cambia la esctructura de la base de datos, este sería el momento de ejecutar los scripts de migración tal y como se indica en el procedimiento de actualizacion mayor de versión.
 
  
6. Si hemos realizado un cambio de distribución tenemos que tener en cuenta que el PATH de la consola se ha modificado y en ese caso hay algunos campos en la base de datos que también se han modificado como son en tconfig "attachment_store" y "fontpath". Para modificar estos campos debemos introducir estas querys. El ejemplo es para una migración a CentOS, en otras distribuciones cambiar el path del directorio apache.
 
 
 
  #mysql -u root -p
 
  #mysql -u root -p
 
  mysql>use pandora
 
  mysql>use pandora
Line 337: Line 362:
 
  mysql>UPDATE tconfig SET value = '/var/www/html/pandora_console/include/fonts/smallfont.ttf' WHERE token LIKE 'fontpath'
 
  mysql>UPDATE tconfig SET value = '/var/www/html/pandora_console/include/fonts/smallfont.ttf' WHERE token LIKE 'fontpath'
  
Estos Path también hay que tenerlos en cuenta en los archivos de configuración del servidor y de la consola (config.php y pandora_server.conf)
+
Keep these paths in mind in server and console configuration files (config.php and pandora_server.conf)
 
   
 
   
7. Una vez migrada la base de datos, tenemos que comprobar si los ficheros .../pandora_console/include/config.php y /etc/pandora/pandora_server.conf anterior y los nuevos tienen los mismos datos en los campos dbname, dbuser, dbpass. En el caso de que sean iguales no debemos hacer nada más. Si son diferentes, podemos hacer dos cosas:
+
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 and dbpass fields. If they are the same ther is no need to do anything. If not, do one of these two things:
  
a. Sustituir los nuevos ficheros por los antiguos o en su defecto los datos de los ficheros viejos por los que estan en los nuevos.
+
a. Replace the new files with the old ones or replace the data of the new files for the old ones.
  
b. Dar permisos a la base de datos con los datos de la nueva instalación. Imaginando que la nueva instalación tiene estos datos; dbname=pandora, dbuser=pandora1 y dbpass=pandora2, se realizaría de este modo:
+
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, it would be like this:
  
 
  #mysql -u root -p
 
  #mysql -u root -p
Line 349: Line 374:
 
  mysql>flush privileges;
 
  mysql>flush privileges;
  
Después de esto, podemos volver a arrancar todos los demonios de nuevo y ya podremos acceder a la Consola de Pandora, con todos los agentes, módulos, alertas,... que teniamos configurados y si cambiamos la IP del nuevo Host por la del anterior, todos los agentes locales reportaran a este nuevo sistema.
+
Restart the daemons and access Pandora FMS console, including all agents, modules, alerts, etc. already configured and, if you replace the IP of the new host by the previous one, all the local agents will report to the new system.
 
 
En el caso de que se trate de una versión Enterprise, se seguirá el mismo proceso.
 
  
= Actualización del cliente Windows desde el instalador =
+
If it is the Enterprise version, follow the same procedure.
  
En el ejecutable de instalación de la consola y el servidor existe una nueva opción que permite actualizar Pandora FMS si está instalada en el equipo una versión anterior.  
+
= 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.
  
Inicie el instalador (.exe) como si fuera a realizar una instalación limpia y seleccione el idioma:
+
Start the installer (.exe) as if you were going to perform an installation frorm scratch and select the language:
  
<br>
 
<br>
 
 
<center>
 
<center>
 
[[image:Pandora_agent_3.0_RC3_install_windows_01.png]]
 
[[image:Pandora_agent_3.0_RC3_install_windows_01.png]]
 
</center>
 
</center>
<br>
 
<br>
 
  
Siga los pasos del instalador:
+
Follow the steps in the installer:
  
<br>
 
<br>
 
 
<center>
 
<center>
 
[[image:Pandora_server_install_windows_01.png]]
 
[[image:Pandora_server_install_windows_01.png]]
 
</center>
 
</center>
<br>
 
<br>
 
  
Acepte los términos de la licencia:
+
Accept the licence terms:
  
<br>
 
<br>
 
 
<center>
 
<center>
 
[[image:Pandora_server_install_windows_02.png]]
 
[[image:Pandora_server_install_windows_02.png]]
 
</center>
 
</center>
<br>
 
<br>
 
En el apartado Selección de componentes, escoja '''únicamente''' la opción de actualizar la versión instalada.
 
  
<br>
+
In the "Select components" section, select '''only''' the option to update the version installed.
<br>
+
 
 
<center>
 
<center>
 
[[image:Pandora_server_update_windows_01.png]]
 
[[image:Pandora_server_update_windows_01.png]]
 
</center>
 
</center>
<br>
 
<br>
 
  
Seleccione la ruta de instalación que desee y continúe. El instalador le preguntará la IP o el nombre del servidor de Pandora FMS.
+
Select the necessary installation path and continue. The installer will ask for the IP and the name of the Pandora FMS server.
  
<br>
 
<br>
 
 
<center>
 
<center>
 
[[image:Pandora_server_install_windows_05.png]]
 
[[image:Pandora_server_install_windows_05.png]]
 
</center>
 
</center>
<br>
+
 
<br>
+
Start installing the components. A warning will appear reminding you that Microsoft Visual C++ is required for the modules to work properly.
 
Tras esto empezarán a instalarle los componentes. Aparecerá un aviso recordándole que se necesita Microsoft Visual C++ para que los módulos funcionen adecuadamente.  
 
 
    
 
    
<br>
 
<br>
 
 
<center>
 
<center>
 
[[image:Pandora_server_install_windows_06_2.png]]
 
[[image:Pandora_server_install_windows_06_2.png]]
 
</center>
 
</center>
<br>
 
<br>
 
  
Cuando haga clic en Terminar, la instalación continuará hasta su finalización.
+
Click "Finish" for the installation to be complete.
+
 
<br>
 
<br>
 
 
<center>
 
<center>
 
[[image:Pandora_server_install_windows_08.png]]
 
[[image:Pandora_server_install_windows_08.png]]
 
</center>
 
</center>
<br>
 
<br>
 
  
Pandora está actualizado y listo para su uso.
+
Pandora FMS is now updated and ready to use.
  
{{Tip|Con estos pasos, el código de Pandora será actualizado a la última versión, entre cuyos cambios se encuentra la sustitución de Apache por '''Nginx''' como servidor Web. En el caso de que se quiera mantener la instalación con '''Apache''', deberá actualizar la consola a través de los paquetes OUM o el Update Manager Online.}}
+
{{Tip|Following these steps, the Pandora FMS code will be updated to the latest version, whose new upgrades include replacing Apache by '''Nginx''' as web server. If you want to keep the installation with '''Apache''', update the console with OUM packets or Update Manager Online.}}
 +
 
 +
= Update to a previous version  =
 +
 
 +
To be able to update your software to a previous version, downgrade Pandora FMS console. As a precaution, it is recommended to back up the database and Pandora FMS configuration file as shown previously. The Open package must always be installed first and the Enterprise version afterwards.
 +
 
 +
==From RPM packages==
 +
 
 +
* Open console update:
 +
rpm -i --force pandorafms_console_package.rpm
 +
* Enterprise console update:
 +
rpm -i --force pandorafms_console__enterprise_package.rpm
 +
 
 +
==From DEB packages==
 +
 
 +
* Open console update:
 +
dpkg –i  --force pandorafms_console_package.rpm
 +
* Enterprise console update:
 +
dpkg -i --force pandorafms_console__enterprise_package.rpm
 +
 
 +
==From Tarball/Sources==
 +
 
 +
* Open console update:
 +
tar -xvzf pandorafms_console_package.tar.gz
 +
mv –f ./pandora_console/* /yourconsolepath
 +
 
 +
* Enterprise console update:
 +
tar -xvzf pandorafms_console_package.tar.gz
 +
mv -f ./enterprise /yourconsolepath

Latest revision as of 09:20, 2 March 2020

Go back to Pandora FMS documentation index


1 Manual Update

It is important to understand the basic components in which Pandora FMS is divided. There are three main elements: console, server and database. In Opensource installations, these three components are quickly updated, but in Enterprise installations the process will take a few more steps, since the components have extended Enterprise features that need to be updated separately.

The component breakdown 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, sometimes server changes, and once in a while database changes. Let us 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 do not include any changes in the database, only in the console and sometimes in the server. E.g. updates 6.1 SP1 to 6.1 SP2.

Initial precautions:

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.

3. Back up server and agent plugins, at:

/etc/pandora/plugins
pandora_console/attachment/plugin
/usr/share/pandora_server/util/plugin

4. Suspend the following services: pandora_server, tentacle_serverd, httpd, pandora_agent and mysqld.

5. Proceed to update.

1.1.1 From RPM packages

  • Open console update:
rpm -U pandorafms_console_package.rpm
  • Enterprise console update:
rpm -U pandorafms_console_enterprise_package.rpm
  • Open server update:
rpm -U pandorafms_server_package.rpm
  • Enterprise server update:
rpm -U pandorafms_server_enterprise_package.rpm

You can find out which version you have installed at any time, before or after the installation by executing the command:

rpm -qa | grep -i pandora

1.1.2 From DEB packages

  • Open console update:
dpkg -i pandorafms_console_package.deb
  • Enterprise console update:
dpkg -i pandorafms_console_enterprise_package.deb
  • Open server update:
dpkg -i pandorafms_server_package.deb
  • Enterprise server update:
tar zxvf pandorafms_server_enterprise_package.tar.gz
cd pandora_server/
./pandora_server_installer --install

Should there be any dependency problems, they can be solved directly with:

apt-get install -f

1.1.3 From Tarball / Sources

  • Open console update:
tar xvzf pandorafms_console_package.tar.gz
cd pandora_console
./pandora_console_upgrade -p /yourconsolepath
  • Enterprise console update:
tar xvzf pandorafms_console_enterprise_package.tar.gz
cd pandora_console
./pandora_console_upgrade -p /yourconsolepath
  • Open server update:
tar xvzf pandorafms_server_package.tar.gz 
cd pandora_server
./pandora_server_upgrade --upgrade
  • Enterprise server update:
tar xvzf pandorafms_server_enterprise_package.tar.gz 
cd pandora_server
./pandora_server_upgrade --upgrade
  • Agent update:
tar xvzf pandorafms_agent_package.tar.gz
cd pandora_agent
./pandora_agent_installer --force-install

1.1.4 Version 7.0NG ( Rolling Release )

If you choose to update manually the Pandora FMS Console in version 7.0NG, (through rpms, tarball or deb) you may have to manually apply the scripts of migration between the different versions. To avoid this situation, in version 7 it is always recommended to update the console using Update Manager.

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

Mr message.png

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 within 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 an sql is applied to the database, move them to the 'updated' directory. MR1 execution will serve as example. In this case, there is no MR applied on the database and the MR0 will appear in the footer of the Pandora FMS console. Version 704 has been manually installed and the MR1 must be applied executing the sql found at /var/www/html/pandora_console/extras/mr/ called 1.sql. Execute it like this:

[[email protected] mr]# cat 1.sql | mysql -u root -p pandora

The MySQL user is root and the database is labeled as pandora.

Once applied, update the MR value in the tconfig table of MySQL to cange the footer value to the current one. Execute the following command once entered MySQL:

mysql> use pandora;
mysql> update tconfig set value= XX where token='MR';

Once done, the warning message will disappear from the Console and in the footer, the MR1 will appear as applied. The next step is to move the sql to the 'updated' folder. To know which MRs should be applied, please go to the next link.

[[email protected] mr]# mv 1.sql updated/

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, first 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:

/var/www/html/pandora_console/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql
/var/www/html/pandora_console/enterprise/pandoradb_migrate_vX.Y_to_vZ.T.mysql.sql

Before updating it is recommended to follow the precautions described above: back up the database and the config files, and suspend the Pandora FMS server:

service pandora_server stop
  • Open database update:
mysql -u username -p -D databasename

E. g.

mysql -u pandora -p -D pandora 

Execute the following from MySQL command-line:

source /yourconsolepath/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql;

Info.png

When executing the Open version migration, the Enterprise version will also be updated.

 


To exit the MySQL client, execute "quit". The database is now updated to the correct version.

In case you need to go back to a previous version, you can restore the backed up database by means of this procedure:

mysql -u username -p databasename
> drop database databasename;
> create database newdatabasename;
> use newdatabasename;
> source backup_pandora_X.Y.sql

E. g.

mysql -u root -p pandora
> drop database pandora;
> create database pandora;
> use pandora;
> source backup_pandora_X.Y.sql;

2 Automatic update with Update Manager

2.1 OpenSource updates

From version 4.0.2 onwards, 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, download it 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 find the latest version available (in Sourceforge). It sends statistical data on the number of agents used (the data is anonymous).
  • It 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 process could 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 for agents or server.

2.1.1 Console update process

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

Um online open actualizar en.png

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

Dialog um principal en.png

Click "Ok" to begin the installation process.

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

Dialog hay un mr en.JPG

At this point there are two possibilities, either applying the changes to the database and updating the console, or rejecting the update, so that nor the database nor the console are updated, since some changes in the console need the according changes in the database.

Info.png

To use Update Manager, 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 FMS configuration) but it is slower.

 


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

Um online open finalizado.png

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).
  • Specific updates (incremental) that only update out-of-date elements, without downloading heavy packages.
  • It allows "offline" updates, downloading packages from the support page, for Pandora FMS installations that do not have an Internet connection (for security reasons).

2.2.1 Configuration

To be able to use Update Manager in the Enterprise version, first the updater must be correctly configured, which has its own section in the menu:

Opciones um en.png

2.2.2 "Online" updates

Update Manager is available in the update section. If you have the Enterprise version installed, you may use this interface, otherwise the one to appear will be that of the Open version.

Um online pag principal en.JPG

From this page, you can see the current version of Pandora FMS, 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 the option to continue or not.
Dialog um principal en.png

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

Dialog hay un mr en.JPG

If you decide to update it, the process will continue in a normal way, but if you 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:

Um offline pag principal en.png

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

Um offline pag principal cargado en.png

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.

Info.png

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

 


Template warning.png

In case of updating an installation with High Availability (HA), it will be necessary to take into account what is indicated in [this section].

 


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.

The line is:

memory_limit = 256M	; Maximum amount of memory a script may consume (16MB)

Generally on Debian/Ubuntu systems, this file may be found here: /etc/php5/apache2.

http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en

3 Migrating to another system

You may want to use a new version of Pandora FMS 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.

To do that, 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.

3. Close all running processes except for MySQL.

/etc/init.d/pandora_server stop 
/etc/init.d/pandora_agent_daemon stop 
/etc/init.d/tentacle_serverd stop 
/etc/init.d/apache2 stop  o /etc/init.d/httpd stop (for apache servers, this will vary depending on the distribution you're using)

4. Enter MySQL as root user. Access the Pandora FMS database on the new system (¨pandora¨ by default) and import the database.

#mysql -u root -p
mysql>use pandora
Database changed
mysql>source /home/artica/backup_pandora_X.Y.sql ( this path will vary depending on the directory where the backup is stored )

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

6. If you have changed the 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, enter these queries. In the example you can see what a migration to CentOS would look like. For other distributions, change the Apache directory path.


#mysql -u root -p
mysql>use pandora
Database changed
mysql>UPDATE tconfig SET value = '/var/www/html/pandora_console/attachment' WHERE token LIKE 'attachment_store'
mysql>UPDATE tconfig SET value = '/var/www/html/pandora_console/include/fonts/smallfont.ttf' WHERE token LIKE 'fontpath'

Keep these paths in mind in server and console configuration files (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 and dbpass fields. If they are the same ther is no need to do anything. If not, do one of 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, it would be like this:

#mysql -u root -p
mysql>grant all privileges on pandora.* to 'pandora1'@'localhost' identified by 'pandora2';
mysql>flush privileges;

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

If it is the Enterprise version, follow the same procedure.

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:

Pandora agent 3.0 RC3 install windows 01.png

Follow the steps in the installer:

Pandora server install windows 01.png

Accept the licence terms:

Pandora server install windows 02.png

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

Pandora server update windows 01.png

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

Pandora server install windows 05.png

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

Pandora server install windows 06 2.png

Click "Finish" for the installation to be complete.

Pandora server install windows 08.png

Pandora FMS is now updated and ready to use.

Info.png

Following these steps, the Pandora FMS code will be updated to the latest version, whose new upgrades include replacing Apache by 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, downgrade Pandora FMS console. As a precaution, it is recommended to back up the database and Pandora FMS configuration file as shown previously. The Open package must always be installed first and the Enterprise version afterwards.

5.1 From RPM packages

  • Open console update:
rpm -i --force pandorafms_console_package.rpm
  • Enterprise console update:
rpm -i --force pandorafms_console__enterprise_package.rpm

5.2 From DEB packages

  • Open console update:
dpkg –i  --force pandorafms_console_package.rpm
  • Enterprise console update:
dpkg -i --force pandorafms_console__enterprise_package.rpm

5.3 From Tarball/Sources

  • Open console update:
tar -xvzf pandorafms_console_package.tar.gz
mv –f ./pandora_console/* /yourconsolepath
  • Enterprise console update:
tar -xvzf pandorafms_console_package.tar.gz
mv -f ./enterprise /yourconsolepath