From Pandora FMS version 756, the synchronization system for environments with centralized mode was redesigned from scratch, making it faster and more efficient, since the changes will be replicated to the nodes automatically without the need for manual synchronization that was done until now.
This change replaces the previous system in disuse, so that, in environments where it was active, it will be necessary to go through the automatic merging system to use the new centralization system to guarantee data integrity.
When upgrading, all already centralized Command Center environments will be forced to go through the new Merging tool section located at Centralised management in order to be properly centralized again.
Only nodes configured in the Command Center that are not disabled are taken into account for the merging process.
The Merging tool will merge the different elements of the node databases and the Command Center (of those to be managed from the Command Center) as follows: A priority order will be established among the nodes registered in the Command Center by placing the highest priority items at the top of the list and the lowest priority items at the bottom.
For example:
This priority list is for cases where the same item exists in the different nodes or Command Center and has different configurations.
In the case of monitoring policies, the modules, alerts and other policy elements are considered separate and independent elements of the policy and will therefore be merged as well.
Example only with modules:
The following elements are those centralized from the new Merging tool:
Make sure you adjust the parameter autocreate_group
from the server configuration files pandora_server.conf
by a valid group ID after unifying from the Merging tool.
Summary of all the above:
The following elements are centralized in Command Center, following the priority rules described above, by means of the Merging tool:
Element | ID | Profile | Name | Group | Ex. 1) | OS |
Users | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
User profiles | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Agent groups | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
File collections | ❌ | ❌ | ✅ 2) | ❌ | ❌ | ❌ |
Alert templates | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Alert commands | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Warning actions | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Server plugins | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ |
OS | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Module labels | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Module categories | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Module groups | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Component groups | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Network components | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
Local components | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
Component templates | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Inventory modules | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ |
Monitoring policies | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ |
Policy modules | ❌ | ❌ | ✅ 3) | ❌ | ❌ | ❌ |
Inventory modules policies | ❌ | ❌ | ✅ 4) | ❌ | ❌ | ✅ |
Policy plugins | ❌ | ❌ | ✅ 5) | ❌ | ✅ 6) | ❌ |
Policy collections | ❌ | ❌ | ✅ 7) | ❌ | ❌ | ❌ |
Alerts and external policy alerts | ❌ | ❌ | ✅ 8) | ❌ | ❌ | ❌ |
Actions on alerts and external alerts | ❌ | ❌ | ✅ 9) | ❌ | ❌ | ❌ |
Agents within the policies | ❌ | ❌ | ✅ 10) | ❌ | ❌ | ❌ |
Agents 11) | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
The sections where these elements are centrally managed can only be managed from the Command Center. In case of accessing these elements from the nodes, they can only be listed, editing and creation options disappear. A warning will also be displayed indicating that the environment is in centralized mode, with a link that will take the administrator to the corresponding Command Center section for the configuration of these elements.
The following tables are synchronized between the Command Center and nodes within the Merging tool:
pandora_server.conf
or their public URL configuration in the console Setup. If it is not configured, servers must be hosted in the same machines their consoles are in.console_api_url http://localhost/pandora_console/include/api.php console_api_pass pandora
memory_limit
parameter from php.ini
to -1
, that is, limitless, but only for the database merging process. After finishing it, it is recommended to set it back to the previous value. That is because a lot of memory is used to merge the nodes, and in very large environments (with many different elements) a large amount of memory can be used, that way you make sure that the system can use all the memory available. If the items to be merged exceed the value of the physical memory available on the server, the Merging tool will fail due to an unexpected error, and in the console/apache logs you will see the line indicating the excess memory reached.post_max_size
from php.ini
higher or equal to the value configured for the same Command Center parameter. This value must be at least as big as the biggest file collection size there is. It should also be taken into account that this parameter must have a value higher than or equal, both in the nodes and in the Command Center, to the value of upload_max_filesize
.upload_max_filesize
parameter from php.ini
higher or equal to the value configured for the same Command Center parameter. This value must be at least as high as the size of the biggest file collection you have.If all those requirements are not met, nodes will not be merged and it will return an error. If you check the result errors, it will return a message with the requirements still pending.
It is important, once the database merging is done, to set again the corresponding value of memory_limit
in file configuration php.ini
. Remember that for the change to take effect, the apache httpd
service must be restarted.
Although they are not requisites for the database merging process, it is recommended to carry out the following actions too:
pandora_db
process from the cron temporarily for the duration of the process, for the same reasons as the server.
When the merging process starts, both the nodes and the Command Center go into maintenance mode (not for admins). The purpose is the same as the recommendation to stop the servers and pandora_db
, to prevent a user from modifying elements during the process and for that to cause errors or inconsistencies.
The merging process has 2 stages, a first stage to synchronyze the different elements that may be managed from the Command Center and a second stage to update the references in the events to those centralized elements. This process is performed that way to allow the console to be accesible again as soon as possible, since event updating is part of the process that may take the longest since it usually entails more information. Both stages are in turn divided into other 2 sub-stages differentiated into 2 progress bars.
In this stage, elements found in the databases from all nodes that can be managed from the Command Center are synchronized. It is the merging process as such and it is divided into other 2 stages, each one with its own progress bar:
/attachment/merge_backups
If there is an error during this process (for example, connection loss with a database), the process itself will try to restore the generated backups (a third red progress bar will be seen that will mark the restoration progress). If the reason for the failure prevents the backups from being recovered, the recovery must be done manually.
If the source of the failure prevents the backups from being recovered, the recovering shall be performed manually.
Sometimes there might be unexpected failures, for example connection lost for a while between the Command Center and a node's database or the impossibility of creating a backup due to not having enough disk space, so it is possible the error message shown will be generic. If that is the case and you need it, contact Pandora FMS support team to receive assistance.
At this stage, the existing references to the different synchronized elements in events will be updated (for example by groups). The stage is subdivided into the update of the main database events and the history database event update and will only affect those events that existed before launching the merging process. The new generated events after centralizing the environment will have all the correct references and will not need to be updated.
pandora_db
may be started again normally, and standard users are able to access the console again. Of course, you will see in the event view the update process bar for all events, so that for that part there might still be inconsistencies (regarding filters for example) only for the events that were there before the merge. New events would be generated normally. This stage and process is launched by each of the nodes, through a specific task in the console's cron. Due to the volume of information, it can be a heavy and time-consuming task, so as far as possible the less load the environment has at that time the better.
Once stage 1 is finished, the environment will be considered centralized, and from there you will be able to manage everything from the Command Center. Element synchronization was also changed, now the pandora_ha
process of each node is in charge of synchronizing its database with that of the Command Center.
When you make a change in the Command Center (for example, create a user) this queues the necessary queries to the database for the nodes (INSERTS
, UPDATES
, etc.) which pandora_ha
reads in an orderly manner and executes in each server_threshold. This ensures that if a server is down for a while, when it is started again it can catch up correctly.
This list of pending queries can be seen from the Command Center in the Consoles setup. If for some reason any query fails, the node will not continue with the rest, you will see an error in Console setup and it will be necessary to process it manually by an administrator. In most cases you should be able to fix it by launching the merging process again in the Merging tool.
To add a new node to a centralized environment, go to Setup → Metasetup → Consoles setup → New node. All the fields must be filled in to achieve the connection and at the moment of saving, it will depend on whether it is a completely new node, without any data, it will be added with the Register empty node button, otherwise the Register node with data to merge button must be used.
Click OK if you are sure and the new node will be centralized.