Pandora: Metaconsole: Documentation en: Installation

From Pandora FMS Wiki
Revision as of 10:16, 11 October 2013 by Julia (talk | contribs) (Instances Configuration)
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 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.


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 Instalación de Pandora FMS

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 tame 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. More info at:

Configuración adicional de la metaconsola

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:

/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.2 Configuration

In order that Instances could communicate with the Metaconsole and vice versa, you should configure both sides correctly.


1.2.1 Instances

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


1.2.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 the NetFlow monitoring

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


1.2.1.1.1 Database

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>;
1.2.1.1.2 API

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

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

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

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.

 


1.2.2 Metaconsole

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


1.2.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 configurar y obtener of the Instances:




Configure Instances editor.png



En la vista de las Instancias configuradas veremos que las instancias pueden ser editadas, desactivadas y eliminadas.

Además hay unos indicadores que chequean cierta información de la configuración de cada Instancia. Esos chequeos se hacen al cargar esta vista, pero también se pueden hacer individualmente haciendo click sobre ellos.



Configure Instances list.png



Los indicadores son los siguientes:

  • Base de datos: Si hemos configurado mal la base de datos de la Instancia o no tenemos los permisos necesarios, el indicador estará en rojo y nos dará información del problema.
  • API: Este indicador hará una prueba a la API de la Instancia. Si falla nos dará información del fallo.
  • Compatibilidad: Este indicador hace un chequeo de algunos requisitos que tiene que haber entre Instancia y Metaconsola. El nombre del servidor de la Instancia, por ejemplo, debe coincidir con el nombre que se le dé en su configuración en la Metaconsola.
  • Replicación de eventos: Este indicador indica si la Instancia tiene activada la replicación de eventos y si ya se han recibido eventos de la Instancia hace cuánto tiempo fue la última replicación.

Los tres primeros indicadores deben estar verdes para que la Instancia esté debidamente enlazada y comencemos a ver sus datos. En cambio el indicador de Replicación de eventos sólamente nos da información de esta característica.


Info.png

Una Instancia puede estar bien configurada pero sin replicar sus eventos

 


1.2.2.3 Escalado de índices

La mayor parte de la sincronización entre metaconsola e instancas se realiza por nombre, independientemente del ID interno de los elementos.

Una excepción son los grupos, cuyos IDs es importante que estén sincronizados.

Para asegurar que los IDs de los grupos que se sincronizan desde la metaconsola no existan en las instancias, aumentaremos el valor AUTO_INCREMENT de la tabla tgrupo sensiblemente. De este modo, daremos un margen amplio por si se crean grupos en las instancias por causas ajenas a la metaconsola.

Para ello ejecutaremos en la base de datos de la metaconsola la siguiente consulta:

ALTER TABLE tgrupo AUTO_INCREMENT = 3000;

Info.png

Si se sospecha que el número de grupos de una instancia creados de forma ajena a la metaconsola puede superar los 3000, se puede configurar un valor superior.

 


Go back to Pandora FMS documentation index