Difference between revisions of "Pandora: Metaconsole: Documentation en: Installation"

From Pandora FMS Wiki
Jump to: navigation, search
(Configuration)
(Index Scaling)
Line 176: Line 176:
 
==== Index Scaling ====
 
==== Index Scaling ====
  
Most part of the synchronization between the Metaconsole and Instacnes is done by name, regardless of the internal ID of the items.
+
Most part of the synchronization between the Metaconsole and Instances 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.
+
Like exceptions to this, there are the groups, tags and alerts, 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.
+
In order to '''make sure that the group, tag and alerts IDs that are synchronized from the Metaconsole don't exist in the instances''', we significantly increase the value AUTO_INCREMENT from the tgrupo, ttag, talert_templates, talert_actions and talert_commands table.
  
 
To do this, we should execute in the Metaconsole database the following query:
 
To do this, we should execute in the Metaconsole database the following query:
  
 
  ALTER TABLE tgrupo AUTO_INCREMENT <nowiki>=</nowiki> 3000;
 
  ALTER TABLE tgrupo AUTO_INCREMENT <nowiki>=</nowiki> 3000;
 +
ALTER TABLE ttag AUTO_INCREMENT <nowiki>=</nowiki> 3000;
 +
ALTER TABLE talert_templates AUTO_INCREMENT <nowiki>=</nowiki> 3000;
 +
ALTER TABLE talert_actions AUTO_INCREMENT <nowiki>=</nowiki> 3000;
 +
ALTER TABLE talert_commands AUTO_INCREMENT <nowiki>=</nowiki> 3000;
  
{{Tip|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.}}
+
{{Tip|If we suspect that the number of elements of one instance created in an external way to the Metaconsole could exceed the 3000, it is possible to configure a higher value.}}
  
  

Revision as of 12:32, 7 February 2014

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.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 ensure 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 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.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 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.2.2.3 Index Scaling

Most part of the synchronization between the Metaconsole and Instances is done by name, regardless of the internal ID of the items.

Like exceptions to this, there are the groups, tags and alerts, whose IDs it's very important that are synchronized.

In order to make sure that the group, tag and alerts IDs that are synchronized from the Metaconsole don't exist in the instances, we significantly increase the value AUTO_INCREMENT from the tgrupo, ttag, talert_templates, talert_actions and talert_commands table.

To do this, we should execute in the Metaconsole database the following query:

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;

Info.png

If we suspect that the number of elements of one instance created in an external way to the Metaconsole could exceed the 3000, it is possible to configure a higher value.

 



Go back to Pandora FMS documentation index