Pandora: Pandora Upgrade

From Pandora FMS Wiki
Jump to: navigation, search

1 Quick guide to upgrade your Pandora FMS ISO version from 6.0 to 7.0

1.1 Introduction

Pandora FMS is made up of three parts.

- Pandora FMS Console

- Database

- Pandora FMS Server

If it were an update to a lower version, which does not need a database update, eg 6.1 SP2 to 6.1 SP3, no action is taken on the database, only the Console and Server packages need to be updated.

1.2 Pre-upgrade

Before updating all components, it's necessary to back up any and all important elements, in this case, the database, the server's configuration file, and the console. In this example all the elements are saved in the /home/artica/Backup directory

[[email protected] ~]# rpm -qa | grep pandora
[[email protected] ~]# mkdir /home/artica/Backup
[[email protected] ~]# mysqldump -uroot -ppandora pandora > /home/artica/Backup/backup6.sql
[[email protected] ~]# cp -R /var/www/html/pandora_console/ /home/artica/Backup/
[[email protected] ~]# cp /etc/pandora/pandora_server.conf /home/artica/Backup/

Once the backup is complete, stop the Pandora Server and the Tentacle Server:

[[email protected] ~]# /etc/init.d/pandora_server stop
[[email protected] ~]# /etc/init.d/tentacle_serverd stop

1.3 Upgrading the Console

Template warning.png

To Enterprise users: before proceeding with the update, please request a new version 6 license from the Artica sales department.


To update the console you must first upgrade the rpm packages that have been installed. To do this use the following command:

[[email protected] tmp]# rpm -U --force pandorafms_console-7.0NG-1.noarch.rpm pandorafms_console_enterprise-7.0NG-1.noarch.rpm 

If you are using the Open version, only update the pandorafms_console-7.0NG-1.noarch.rpm package, that can be downloaded from Sourceforge.

For Enterprise users, the Enterprise package can be downloaded from Artica's Support website.

1.4 Upgrading the Database

If it's a major release such as when upgrading from version 5.1 to 6.0, then the database scheme also needs updating. The migration scripts will be added when you install the new Console version.

A thread stack of 256k is required. Set it on the mysql configuration file

thread_stack = 256k

To perform this task we have to issue the following command:

[[email protected] tmp]# cat /var/www/html/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql | mysql -uroot -ppandora -D pandora

After executing this migration script the database should be successfully updated and it should be ready to work on version 7.0

1.5 Upgrading the Server

Once the console and the database are updated, the last step is to perform the server upgrade.

For the Open version, the update is performed as per earlier versions. Just download the appropriate package from Sourceforge and update it with the command:

[[email protected] tmp]# rpm -U --force pandorafms_server-7.0NG-1.noarch.rpm

For the Enterprise version, the Enterprise package is installed through binaries.

After updating the Open Package (Sourceforge), install the Enterprise Version (Artica):

[[email protected] tmp]# rpm -U --force pandorafms_server-7.0NG-1.noarch.rpm
An existing version of pandora_server.conf is found.
Don't forget to start Tentacle Server daemon if you want to receive
data using tentacle
[[email protected] tmp]# tar -xvzf pandorafms_server_enterprise_7.0NG_x86_64.tar.gz
[[email protected] tmp]# cd pandora_server/
[[email protected] pandora_server]# ./pandora_server_installer --install
Pandora FMS Server Enterprise installer for GENERIC. (c) 2014-2016 Artica ST.

>Installing the Pandora FMS Server Enterprise binary to /usr/bin...
>Installing the pandora_exec binary to /usr/bin...
>Copying missing perl libraries to the /usr/lib/perl5/PandoraFMS...
>Copying missing scripts to /usr/share/pandora_server/util...
>Installing the tentacle_server binary to /usr/bin...
>Copying extra encoding definitions to /usr/share/pandora_server/enc...
>Installing the pandora_db binary to /usr/bin...
>Installing the pandora_manage binary to /usr/bin...
>Installing the pandora_revent binary to /usr/bin...
>Installing the pandora_encrypt_db binary to /usr/bin...
>Installing the braa binary to /usr/bin...
>Installing the enterprise recon scripts...
>Executing Pandora Server Open installation script...

Pandora FMS Server Installer 7.0NG 170324 (c) 2008-2016 Artica ST
This program is licensed under GPL2 Terms.  

GENERIC distribution detected
Creating common Pandora FMS directories
uid=500(pandora) gid=0(root) grupos=0(root) 

User pandora does exist, make sure the SSH directories are correct
Giving proper permission to /var/spool/pandora
Creating setup directory in /etc/pandora
cp conf/ /etc/pandora
Installing Pandora Server manual
Copying the daemon script into /etc/init.d
Linking startup script to /etc/rc.d/rc5.d/S90pandora_server
ln: creating symbolic link «/etc/rc.d/rc5.d/S90pandora_server»: El fichero ya existe
Creating logrotate.d entry for Pandora FMS log management
Copying the daemon script into /etc/init.d
Linking startup script to /etc/rc.d/rc5.d/S80tentacle_serverd
Installing Tentacle Server manual
Creating Pandora FMS distribution directory in /usr/share/pandora_server
Creating the Cron script to run Pandora DB tool each hour

Now you have to edit your /etc/pandora/pandora_server.conf file to change the database password (default is   pandora) with the one set in include/config.php of your Pandora FMS Console.
After setting password you can start your Pandora FMS Server!!

>Installed Open Pandora Server
>Adding pandora_db to the crontab...

Restart Pandora FMS Server.

The packages are now installed and, at the end of the update, the system will have these:

[[email protected] pandora_server]# rpm -qa | grep pandora

At this point, Enterprise users should access to the web console and apply the new v7 license provided by Artica ST.

Now restart the services

[[email protected] ~]# /etc/init.d/pandora_server start

Pandora FMS Server 7.0NG Build 170324 Copyright (c) 2004-2015 ArticaST
This program is OpenSource, licensed under the terms of GPL License version 2.
You can download latest versions and documentation at

[*] Backgrounding Pandora FMS Server process.

Pandora Server is now running with PID 8407

[[email protected] ~]# /etc/init.d/tentacle_serverd start

Template warning.png

If the mysql socket is not installed by default, you must modify it in /etc/pandora/pandora_server.conf the dbhost parameter with the ip instead of localhost


2 Quick guide to migrating functions from Pandora FMS 6.0 to version 7.0

The focus of this quickguide is to tell you about the most important functions that have changed for the new release, as well as some of the actions you'll have to perform.

2.1 Network Maps

On Pandora FMS 7.0 NG the classic network maps have gone, and the Network Console has been improved. This means that all the prior network maps will be lost during migration, and you'll have to replace them by creating Network Consoles. In the new version you can see the different monitored interfaces from the Network Console, and associate them directly from there, making configuration easier as you can perform it directly on the map, without having to configure anything on the modules.



These connections must be configured via the network recon itself, but in case it doesn't execute, and you have to perform the connections manually, it can be done like this:


2.2 L2 Recon tasks

The standard Recon task (Network sweep) has been augmented with an option that was previously carried out by the SNMP Script, SNMP L2 Recon. This script will still function on version 7.0 NG after migration the embedded changes within Network Sweep mode that improve interface links between different network devices won't be incorporated in the SNMP L2 Recon script.


2.3 Renaming agents

This is a feature that clients have been demanding. In previous versions this change had to be performed on the console and the config file, making it a tedious task depending on the number of elements to be modified.

To solve this problem we have developed a new element known as Alias. From now on, two elements will coexist under the umbrella of a single agent label, the name and the alias.


On installations migrated from version 6 to version 7, this element remains the same:


Now, if you want to modify the visible name of an agent it will be enough to modify the Alias to see it displayed with this name on all displays:



The Agent name calculation on version 7.0NG created from now on will be created via a set of random sentences. This means that if there are two machines with the same hostname, there will be two agents with different Agent names but the same Alias on the Pandora FMS console.

If you wish to avoid this situation (e.g., if the agent software vmware plugin is installed in the Pandora environment on VMs and you want the data from both sources on the same logic agent) you can indicate the agent to behave as in previous versions and create an agent with the same Alias and agent Name. To do this, introduce the following parameters in the agent software's config file:

#agent_name 5fa9bdc9ad26a4d0e87d0f0d15ed786c3bd487441b2d5e8d7c42b90e8389797d
#agent_name_cmd __rand__

Done like this, the agent will be created with the same name as always, and with the information it receives from both sources. You can still change the alias from the console if necessary and the information will appear as normal.

In case you update the agent or satellite servers the config files in use need to be saved, if not, and they are deleted, a new randomly-labeled agent will be generated and the stored history data will be lost, unless the two parameters above are entered in the same configuration.

2.4 New Pandora FMS agents

The default information the agents report has altered in this new version of Pandora FMS v. 7.0 NG, being now unified and consolidated.

These are the new modules that will generate reports:

Linux agent


Windows agent


Agents will maintain the same configuration in their modules after migration, provided it is not a new agent. Modules included in version 7.0 won't be added automatically.

Here's the configuration you have to add in the above case:

Linux agent

# Could change depending on linux distro and vmstat command version
module_name CPU Load
module_type generic_data
module_interval 1
module_exec vmstat 1 2 | tail -1 | awk '{ print $13 }'
module_max 100
module_min 0
module_description User CPU Usage (%)
module_min_warning 70
module_max_warning 90
module_min_critical 91
module_max_critical 100
module_unit %
module_group System

# Could change depending on linux distro and vmstat command version
module_name CPU IOWait
module_type generic_data
module_interval 1
module_exec vmstat 1 2 | tail -1 | awk '{ print $16 }'
module_min_warning 10
module_min_critical 16
module_unit %
module_description Too much IOwait means IO bottleneck and performance problems. Check also LoadAVG.
module_group System

# Get load average
module_name Load Average
module_type generic_data
module_exec cat /proc/loadavg | cut -d -f1
module_description Average process in CPU (Last minute)
module_group System

# Basic info about TCP Connection
module_name TCP_Connections
module_type generic_data
module_exec netstat -an | grep tcp | grep -v LIST | wc -l
module_description Total number of TCP connections active
module_group Networking

# This plugin detects all disk and report used space (%)
module_plugin pandora_df_used
# This plugin detects system free memory and used swap (in %)
module_plugin pandora_mem_used
# This plugin will get the network usage (bytes/sec)
module_plugin pandora_netusage

Windows agent

# CPU Load using WMI 
module_name CPU Load
module_type generic_data
module_wmiquery SELECT LoadPercentage FROM Win32_Processor
module_wmicolumn LoadPercentage
module_max 100
module_min 0
module_description User CPU Usage (%)
module_min_warning 70
module_max_warning 90
module_min_critical 91
module_max_critical 100
module_unit %
module_group System

# Basic info about TCP Connection
module_name TCP_Connections
module_type generic_data 
module_exec netstat -an | find /c /v "estab"
module_description Total number of TCP connections active
module_group Networking

# Example plugin to retrieve drive usage
module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\df_percent_used.vbs"

# Example plugin to retrieve memory usage
module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\mem_percent_used.vbs"

# Example plugin to retrieve network usage
module_plugin cscript.exe //B "%ProgramFiles%\Pandora_Agent\util\network.vbs"

2.5 Update Manager / Rolling Release

Pandora FMS 0.7 NG enables users to make database changes in OUM packets that are subsequently distributed. Go to the Update Manager Online or Offline section, depending whether there is a connection or not.

2.5.1 Update Manager Online

Go to this section via Update Manager > Update Manager Online.


If you're installing a new version a message like this will appear:


Click “Update to the latest version”:


When the update is accepted, the following packet is downloaded and applied. If the packet also contains the database changes the following message will appear before the changes are applied in order to facilitate database backup and ensure that, in case of error when applying new scripts, the previous database status is recoverable.


When MR is applied the database changes are made and once the process has finalized the updated and applied version should appear:


2.5.2 Update Manager Offline

Go to Update Manager > Update Manager Online.


Upload the packet in the option that appears:


Once the packet is applied, the following message appears:


If the upload implies database changes, these are applied and the following message appears:


To find out which version you're using, there is a new field at the console footer that tells you which MR or database version it is, and whether the changes have been applied:


2.6 New alert templates

New templates have been added for this release:


They come installed on Pandora FMS 7.0 NG, but migrations from previous versions won't be applied, to respect previous configurations.

2.7 Interface monitoring nomenclature

Monitoring nomenclature has been modified, and modules are now monikered to more easily order their information via their interface label.

The following nomenclature was used in previous versions:


This is the new format:


In order to fully take advantage of Pandora FMS 7.0 NG's new features, like Enterprise maps, interface graphs, etc. the module's names need to be modified with the following SQL queries:

 UPDATE tagente_modulo SET nombre = CONCAT(REPLACE(nombre, 'ifOperStatus_', ''), '_ifOperStatus') WHERE nombre LIKE('ifOperStatus_%');
 UPDATE tagente_modulo SET nombre = CONCAT(REPLACE(nombre, 'ifInOctets_', ''), '_ifInOctets') WHERE nombre LIKE('ifInOctets_%'); 
 UPDATE tagente_modulo SET nombre = CONCAT(REPLACE(nombre, 'ifOutOctets_', ''), '_ifOutOctets') WHERE nombre LIKE('ifOutOctets_%');

To configure satellite server modules manually in the config file the modules must be renamed in the satellite config file (NOTE: if remote configuration is activated, they must be updated on the server, and the .md5 must be modified, or deleted from the server, renamed on the satellite and resent).

Execute from the server in case remote config is deactivated:

 sed -i -e 's/ifOperStatus_\(.*\)/\1_ifOperStatus/' /etc/pandora/conf/*.conf 
 sed -i -e 's/ifInOctets_\(.*\)/\1_ifInOctets/' /etc/pandora/conf/*.conf 
 sed -i -e 's/ifOutOctets_\(.*\)/\1_ifOutOctets/' /etc/pandora/conf/*.conf
 sed -i -e 's/ifOperStatus_\(.*\)/\1_ifOperStatus/' /var/spool/pandora/data_in/conf/*.conf 
 sed -i -e 's/ifInOctets_\(.*\)/\1_ifInOctets/' /var/spool/pandora/data_in/conf/*.conf 
 sed -i -e 's/ifOutOctets_\(.*\)/\1_ifOutOctets/' /var/spool/pandora/data_in/conf/*.conf

After application these changes must be applied on the satellite server config. To do this, modify the .md5 file on each agent by inputting a random value on each of them.

 echo 1 >/var/spool/pandora/data_in/md5/*.md5