Pandora: Metaconsole: Documentation en: Installation

From Pandora FMS Wiki
Revision as of 14:42, 14 June 2017 by Tatiana (talk | contribs)
Jump to: navigation, search

Go back to Pandora FMS documentation index


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.


1.1 Installation

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

Info.png

The Instances don't need to be communicated between them at any moment

 


To understand better this requirement you can take a look to Metaconsole architecture.

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.

1.1.1 Instances

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 Pandora FMS Installation.

1.1.2 Metaconsole

A Metaconsole is a Pandora FMS Enterprise installation with a metaconsole license.


Info.png

It is not possible to use at the same license the Pandora FMS console and the Metaconsole

 


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.

1.1.3 Metaconsole Additional Configuration

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:

/etc/pandora/pandora_meta.conf

Create an script at /etc/cron.daily/pandora_meta_db with the following content:

/usr/share/pandora_server/util/pandora_db.pl /etc/pandora/pandora_meta.conf

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:

/etc/cron.daily/pandora_meta_db

1.1.4 Metaconsole License Activation

After installing the Enterprise version's Pandora FMS Console by any installation method, you're required to access the Pandora Console (http://IP/pandora_console/). Subsequently, the following welcome screen to accept the license is going to appear:

License accept.png

After accepting the license, the Pandora FMS Database schema is going to change, adding required new tables for the use of the Enterprise Version. In this moment, a new screen to register the license key, which Artica has sent to you, is going to appear:

License setup.png

In order to activate the metaconsole you need a valid metaconsole license. If you use a standart pandora fms license then the standard console would appear after activating the license.

1.2 Metalicence

From version Pandora FMS 7.0NG onward Metaconsole is covered by a a single licence. The licence is unique to the Metaconsole and syncs with other instances allowing for centralized control of agents deployed in the environment, and enabling dynamic assignation of agents among different Pandora FMS instances, provided the total number of agents on the Metaconsole is not exceeded.

According to this protocol, the Metaconsole is the first component to be installed, and, once registered, the other instances may be added.

1.2.1 Registering a new instance in the Metaconsole environment

Carry out the normal installation process as with any other instance [[1]] . Once the database is correctly set up introduce the licence:

License setup.png

And go to register the node in the Metaconsole. Perform the necessary "grants" (fundamental for the Metaconsole database and nodes). Once all databases are accessible, register the instance on the Metaconsole.

In the Metasetup section the instances that link the Metaconsole can be configured.

Configuring an instance implies a series of parameters that must be configured and obtained from the instances themselves.

see 1.3.2.2 below :

Configure Instances editor.png

When the instance has been created all the elements will be configured automatically and the instance will be correctly registered, allowing the Pandora FMS server to be booted and monitoring to be deployed.

Instancia correcta.png

If you're updating a Pandora FMS licence, the licence must be activated on the Metaconsole (click Validate and Sync). The licence will automatically sync with all instances installed on the Metaconsole.

Sync license.png

If any licences do not sync correctly, force sync in the licence section of the Metaconsole, or register the instance again on the Metaconsole.

1.3 Configuration

In order for instances to communicate with the Metaconsole and vice versa, you should configure both sides correctly.

1.3.1 Instances

In Instances, there are a series of parameters to ensure the access of your data with the Metaconsole.

1.3.1.1 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 NetFlow monitoring

The Instance should be configured to guarantee both accesses to the Metaconsole.

1.3.1.1.1 Database

It is necessary to know the database credentials to configure later the Instance in the Metaconsole (Host, Database, Users and Password). Another important thing is to give permissions to the user so s/he can 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>';
1.3.1.1.2 API

The access to the API Instance will be guaranteed with the following parameters:

  • User and password: It is necessary to know a valid user and password in the Instance.
  • API password: It is 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

1.3.1.2 Auto-authentication

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.

For this access the Auto-authentication is used.

This authentication is done with a hash for which a string is necessary 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

1.3.1.3 Event Replication

In order that Instance events may be seen in the Metaconsole, 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 one to be replicated to continue from there the next time.

Besides the event replication, they will make the Metaconsole autovalidation effective. 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.

Info.png

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).


Replication events setup.png

The event replication is done by the server. In the configuration file should be an enabled token:

Replication events conf token.png

Template warning.png

To do effective any configuration change in the event replication it will be necessary to restart the server.

 


Template warning.png

If you add in a metaconsole a new node which already contains lots of events, it could take a long time to copy all the events to the metaconsole

 


If you want to alter the date since node is going to synchronize events with the target metaconsola (for example, to force event replication from the current date), you need to execute this SQL sentence in the node database for versions of Pandora older than 5.1SP3:

UPDATE tconfig SET `value` = UNIX_TIMESTAMP() WHERE `token` = "replication_copy_last_utimestamp"

For versions newer than 5.1SP3 execute the following query:

UPDATE tconfig SET `value` = (SELECT MAX(id_evento) FROM tevento) WHERE `token` = "replication_copy_last_id";

Template warning.png

If you have activated the child nodes SELinux security, the event replication may not work. Please disable it.

 


1.3.2 Metaconsole

1.3.2.1 Giving access to the Instances

Same way as the Instances give access to the Metaconsole to have a remote access to the database, the Metaconsole should do the same, so the Instances could replicate their events.


1.3.2.2 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 configure and retrieve from the Instances:

Configure Instances editor.png

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.

Configure Instances list.png

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.

Info.png

One Instance could be configured correctly but with their events not replicated

 


1.3.2.3 Index Scaling

Most of the synching between the metaconsole and instances is performed according to name, independent from the elements' internal IDs.

As exceptions to this, there are groups, tags and alerts, that should have synchronized IDs as something important.

In order to make sure that the group, tag, alert, operating system and module group IDs that synchronize from the metaconsole don't exist on instances, we'll raise the AUTO_INCREMENT value significantly in the tgroup, ttag, talert_templates, talert_actions, talert_commands, tconfig_os and tmodule_group. This way we'll give a larger margin in case elements are created on instances by causes external to the metaconsole.

For this, we'll run the following query on the metaconsole database:

ALTER TABLE tgrupo AUTO_INCREMENT = 3000;
ALTER TABLE ttag AUTO_INCREMENT = 3000;
ALTER TABLE talert_templates AUTO_INCREMENT = 3000;
ALTER TABLE talert_actions AUTO_INCREMENT = 3000;
ALTER TABLE talert_commands AUTO_INCREMENT = 3000;
ALTER TABLE tconfig_os AUTO_INCREMENT = 3000;
ALTER TABLE tmodule_group AUTO_INCREMENT = 3000;

Info.png

If we are suspicious that the number of elements from an instance created with independence to the metaconsole can go over 3000, we can give it a larger value.

 


1.3.2.4 Report scheduler / Pandora_DB maintance script

Metaconsola doesnt have a "server", but you need to install packages (open & enterprise) in the system where metaconsole is executed because you need to launch each hour the pandora_db maintance script. Please be sure you scheduled it in cron, it's the piece of server which execute the metaconsole event purge and who moves the events not validated to the event history table.

If you also want to use on-demand reports sent by email, you need to setup the periodic execution of cron extension, in the same way you setup in a regular Enteprise console. Create a file called /etc/cron.d/pandora_cron_extension with following contents (adapt paths and IP address to the paths in your system).

 */5 * * * * <user> wget -q -O - http://x.x.x.x/pandora_console/enterprise/extensions/cron/cron.php >> /var/www/pandora_console/pandora_console.log

Remember also to setup the cron SMTP settings, by editing the file '/enterprise/extensions/cron/email_config.php':

  //Please setup your config to send emails in cron job
  $cron_email_from = array('[email protected]' => 'Pandora FMS');
  $cron_email_smtpServer = 'mail.artica.es';
  $cron_email_smtpPort = 25;
  $cron_email_username = '';
  $cron_email_password = ;


Go back to Pandora FMS documentation index