SUPERVISION – ICINGA2 INSTALLATION (ENG)

In this article we will set up the supervision of a network with Icinga2

PREREQUISITES

  1. A server machine (debian)
  2. A client machine(We can use any OS)

CONFIGURATION OF THE ICINGA2 SERVEUR

We start by adding the deposits necessary for the installation of Icinga2.

echo 'deb http://packages.icinga.org/debian icinga-jessie main' >>/etc/apt/sources.list
echo 'deb-src http://packages.icinga.org/debian icinga-jessie main' >>/etc/apt/sources.list

Then we get the key.

wget -O - http://packages.icinga.com/icinga.key | apt-key add -

Then we update our machine.

apt-get update && apt-get upgrade -y

 

Installation of Icinga2

We install icinga and mysql.

apt-get install -y icinga2

And we launch the Icinga2 service.

service icinga2 start

or

/etc/init.d/icinga2 start

Now we install the MySQL database needed by Icinga2.

apt-get install -y mysql-server mysql-client

You will just have to enter the password you want for the MySQL administrator.

Mysql admin mdp

Remember the password, it will serve us for the next step.


Finally we install icinga2-ido-mysql to allow Icinga2 to save the data to the database.

apt-get install icinga2-ido-mysql

A first window will appear during the installation and ask you if you want to activate the ido-mysql feature, select NO.

ido-mysql active non

Then on the second window, select YES to let icinga2-ido-mysql create the database in MySQL.

ido-mysql création base de données

For the rest of the installation, we are asked for the password of the MySQL administrator that we defined previously.

ido-mysql mdp admin mysql

Finally, we will define the password that icinga-ido-mysql will use to access the database we just created.

ido-mysql mdp connexion


In case you do not remember this informations, you can find it in the ido-mysql.conf file.

nano /etc/icinga2/features-available/ido-mysql.conf

Feature activation

To check which features are enabled, type the command

icinga2 feature list

Now we enable the ido-mysql feature to allow data to be saved on MySQL and enable the command feature to allow the web interface to send commands to the Icinga server.

icinga2 feature enable ido-mysql command

We restart the icinga2 service so that it takes into account the functions ido-mysql and command.

service icinga2 restart

or

/etc/init.d/icinga2 restart

Installing the Icingaweb2 web interface

We install apache2 and Icingaweb2.

apt-get install -y apache2 icingaweb2

We will now specify the date.timezone in the /etc/php5/apache2/php.ini file.

date.timezone = europe/paris

Then we install php5 modules necessary for Icingaweb2 to work properly.

apt-get install -y php5-intl php5-imagick php5-gd

To take into account these different modules, restart apache2.

service apache2 restart

We then need to generate a token to begin the installation and configuration of Icingaweb2 from a graphical interface on the web page of the Icinga2 server.

icingacli setup token create

token

Remember this token.


Then go to the web page of your Icinga2 server:

http://X.X.X.X/icingaweb2/setup

(With « X.X.X.X » as the IP addresse of your Icinga2 server.)


To start the configuration, we are obliged to enter the token we just created and click on « next ».

install interface web 1

Then we select the « Monitoring » module and click on « next ».

install interface web 2

The next page will check if the modules necessary for the operation of Icingaweb2 are present.

install interface web 3

If everything is correct, all the modules must be in green except the PDO-PostgreSQL module which is not necessary in our case because we use MySQL and not PostgreSQL.

If not look at the missing modules, install them and click « refresh » at the bottom of the page to check if they are now properly installed.

We click on « next » and on the next page we select « database » as type of authentication.

install interface web 4

And click on « next ».

For the next page, we need to configure access to the MySQL database.

For this tutorial I used the user « root » but for security reasons, it is safer to create a new user with the necessary rights.

install interface web 5

To be sure of the configuration that has been filled in, we can click on « Validate Configuration » at the bottom of the page, if it sends you this message, everything is good and we can click on « next ».

validate configuration

On the next page we leave the name of the backend name by default and click on « next »

install interface web 6

Then we will have to create the administrator account of the web interface and we click on « next ».

install interface web 7

For the rest we leave by default and click on « next ».

install interface web 8

Before continuing further, the next page will give you a quick summary of the configurations that have just been done.

Click on « next » until you reach this page

install interface web 9

From here, we have to configure the sources of the information ie where the information comes from.

install interface web 10

On the next page we need to define how the orders will be sent to supervise.

install interface web 11

Finally, we define the variables that must be protected for the security of information that circulates through a regular expression.

install interface web 12

now your supervision server is configured.

 

SOURCE:  https://www.it-connect.fr/installation-icinga2-icingaweb2-sur-debian-8/

Publicités

Répondre

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Google

Vous commentez à l'aide de votre compte Google. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s