Pandora: Metaconsole: Documentation en: Installation
- 1 Installation and Configuration
- 1.1 Installation
- 1.2 Configuration
1 Installation and Configuration
In this section will be included all the aspects needed in order to install and configure a Metaconsole and their Instances.
The installations of the Instances and the Metaconsole requires to be hosted in servers that are communicated in both ways.
In order to do these we should verify that:
- The Metaconsole can contact with the Instances
- The Instances can contact with the Metaconsole
To understand better this requirement you can take a look to Arquitectura de la Metaconsola.
The timezone setting should see the same. The more synchronized would be the Instances and Metaconsole would be, more exact will be the visualized data.
For example: If an Instance has 5 minutes of difference with the Metaconsole, the visualization of the time that have passed since their events were generated when these data are shown in the Metaconsole they will be false.
One Instance is a Pandora FMS Enterprise typical installation
One instance is composed of one Server and one Web Console
All details about how to install the Instances will be found in the documentation section Instalación de Pandora FMS
A Metaconsole is a Pandora FMS Enterprise installation with a metaconsole license.
The Metaconsole is only the Web Console It doesn't use server so it will not host agent neither monitors
In some cases it could be necessary the server libraries to execute the database maintenance script in the Metaconsole. To simplify it, this is done installing the server but without firing it. More info at:
1.1.3 Additional Configuration of the Metaconsole
The Metaconsole, if the node events replication has been activated, store event data in its own database. For their maintenance these data can be deleted and/or move to the metaconsole history event ddb. THis is done, as in a pandora instance, through the execution of the ddbb maintenance script that is at/usr/share/pandora_server/util/pandora_db.pl. Usually, to launch it the server file is used, only that as it is a metaconsole, there is no server. To do this, get a copy o fhe file /etc/pandora/pandora_server.conf from one of the nodes, edit it, and modify the data related to the DDBB (hostname, DDBB name, user and password) and save the file, for example as:
Create an script at /etc/cron.daily/pandora_meta_db with the following content:
And modify the permissions of it through chmod:
chmod 755 /etc/cron.daily/pandora_meta_db
In order to could execute it , it is necessary that you have installed the necessary packages to execute (even if it doesn't) the Pandora FMS server and its Enterprise part.
Execute it manually to check that it works and it doesn't report errors:
In order that Instances could communicate with the Metaconsole and vice versa, you should configure both sides correctly.
In Instances, there are a serial of parameters to warranty the access of your data with the Metaconsole.
220.127.116.11 Giving access to the Metaconsole
The Metaconsole could have access to one Instance in two different ways:
- Remote access to the Data Base to see and edit the data stored in the instances.
- Access to the to the API for some actions like the edition of configuration files or the NetFlow monitoring
The Instance should be configured to guarantee both accesses to the Metaconsole.
It will be necessary to know the database credentials to configure later the Instance in the Metaconsole.(Host, Database, Users and Password).
Other important thing is to give permissions to the user so he could have remote access to the database.
It is done with the MySQL GRANT command:
GRANT ALL PRIVILEGES on <MetaconsoleDatabaseName>.* to <UserName>@<HostAddress> IDENTIFIED BY <UserPass>;
The access to the Instance API will be guaranteed with the following parameters:
- User and password: It should be necessary to know a valid user and password in the Instance.
- API password: It should be necessary to know the access password to the API that is configured in the Instance.
- IPs List with access to the API: In the Instance configuration, there is an IPs list that could have access to the API. It is possible to use '*' as wildcart to give access to all IPs or to one subnet
In some parts of the metaconsole there are accesses to the Instance Web Console.
For example, in the event visor, when you click on the Agent that is associated to one event (if there is one) it will take us to the view of this agent in the console of the Instance to which it belongs to.
For this access the Auto-authentication is used.
This authentication is done with a hash for which is necessary one string that is configured in the Instance: The autoidentification password.
This configuration is not necessary to configure the Instance in the Metaconsole, but without it, if you click on one of the links that take us to the Instance, we should have to authenticate
18.104.22.168 Event Replication
In order that in the Metaconsole could be seen the Instance events, these should have access to the Metaconsole database.
The Instances will replicate from time to time their events saving the date and hour of the last replicated to continue from there the next time
Besides the event replication, they will do effective the Metaconsole autovalidation. This is, for the events that are associated to one module, when they will replicate the event to the Metaconsole, they will validate all the previous events that are assigned to the same module.
To configure the event replication, in the Instance Enterprise Configuration section be should activate the Event Replication.
This will be configured:
- Intervale: Every how many seconds the server will replicate the events generated from the last replication to the Metaconsole database.
If is configured, for example 60 seconds, the first replication will happen 60 seconds after the server has been started.
- Replication Mode: If all events will be replicated or only the ones that are validated.
- Show list of events in the local console (only reading): When the event replication is activated, the event management will be done in the metaconsole and in the instance there is not access to them.With this option you will have access to a view of events in only reading mode.
- Metaconsole Database Credentials : Host, Database, Users,Password and Port (Is the port is not indicted the port by default will be used).
The event replication is done by the server. In the configuration file should be an enabled token:
To do effective any configuration change in the event replication it will be necessary to restart the server.
22.214.171.124 Giving access to the Instances
Same way as the Instances give permisos a la Metaconsola to have a remote access to the database, the Metaconsole should do the same, so the Instances could replicate their events.
126.96.36.199 Instances Configuration
In the Metasetup section, it will be possible to configure the Instances with which the Metaconsole will be linked.
The configuration of one instance has a serial of parameters that we should configurar y obtener of the Instances:
In the view of the configured Instances, we will see that the Instances can be edited, disabled and deleted.
Besides, there are some indicators that checks some information of the configuration of each Instance. These checks are done when loading this view, but the can also be done individually clicking on them.
The indicators are these:
- Database:If we haven't configured right the Instance database we won't have the necessary permission, the indicator will be red and it will give us information about the problem.
- API: This indicator will do a test to the Instance API. If it fails it will report information about the failure to us
- Compatibility:This indicator will do a check of some requirements that should be between the Instance and the Metaconsole. The Instance server name, for example, should match with the name that we give to it in its configuration in the metaconsola.
- Event Replication: This indicator shows if the Instance has activated the event replication and if the events from the Instance have been alredy received and how long ago was the last replication.
The three first indicators should be in green color so the Instance should be correctly linked and we start viewing their data.However, the event Replication events will give us only information about this feature.
188.8.131.52 Index Scaling
Most part of the synchronization between the Metaconsole and Instacnes is done by name, regardless of the internal ID of the items.
One exception of this are the groups, whose IDs it's very important that are synchronized.
In order to make sure that the group IDs that are synchronized from the Metaconsole don't exist in the instances, we significantly increase the value AUTO_INCREMENT from the tgrupo table.
To do this, we should execute in the Metaconsole database the following query:
ALTER TABLE tgrupo AUTO_INCREMENT = 3000;
If we suspect that the number of groups of one instances created in an external way to the Metaconsole could exceed the 3000, it is possible to configure a higher value.