How to put in the Icinga2 Monitoring device on Ubuntu Server sixteen.04

How to put in the Icinga2 Monitoring device on Ubuntu Server sixteen.04


Image: Jack Wallen

As your information middle is becoming populated with much more and much more Linux servers, you want to have the suggests to monitor individuals systems. As with something in the open up source globe, there are a broad quantity of resources offered for the process. One these types of device is Icinga2, a website-dependent system monitor that keeps a continual examine on the availability of community means, generates serious-time reporting on performance and solutions, and can even notify end users of outages. Icinga2 also works by using a RESTful API, so you can update configuration documents on the fly and notifications can appear by way of e mail, texts, or cell messaging purposes.

I want to walk you as a result of the procedure of putting in Icinga2 on Ubuntu Server sixteen.04. I will presume you have the functioning system mounted and a person account with sudo privileges. With that said, let’s put in.

SEE: Wireless networking coverage (Tech Pro Investigate)

Putting in Apache

The 1st point that will have to be carried out is the installation of equally the website and databases server. Just before you do that, having said that, it truly is wise to update and update your server. Open up a terminal window and challenge the commands:

sudo apt-get update
sudo apt-get update

Should your kernel be upgraded in the procedure, you can expect to want to reboot the server. Because of this, it is encouraged that you operate the update/update at a time when a reboot is possible.

With the update/update out of the way, it truly is time to put in Apache (and it truly is essential PHP modules). Back at the terminal window, challenge the command:

sudo apt-get put in apache2 libapache2-mod-php

As soon as that completes, put in the PHP modules with the command:

sudo apt-get put in php php-xml,cli,opcache,gd,intl,readline,mysql,curl,mbstring,ldap,json,pgsql

Now we want to configure your timezone in the php.ini file. Situation the command:

sudo nano /and so forth/php/7./apache2/php.ini

In that file, glance for the next line:

day.timezone = Africa/Nairobi

Adjust it to reflect your timezone (these types of as America/Kentucky/Louisville). Help save and shut the file.

Restart Apache with the command:

sudo systemctl restart apache2

Putting in MySQL

Upcoming we are going to put in MySQL. From the terminal window, challenge the next command:

sudo apt-get put in mysql-server

In the course of this installation, you will be questioned to produce/validate a MySQL admin password.

SEE: World wide web server configuration and management coverage (Tech Pro Investigate)

Developing the databases

With the databases server mounted, it truly is time to produce the databases for Icinga2. We actually will have to produce two databases, one for Icinga2 and Icinga Web2. Attain accessibility to the MySQL prompt with the command:

mysql -u root -p

You are going to be essential to variety the MySQL admin password you produced all through the installation. As soon as at the prompt, produce the 1st databases (and a person) with the commands:

Generate Databases icinga2_db
GRANT ALL PRIVILEGES on icinga2_db.* to 'icinga2_user'@'localhost' discovered by 'PASSWORD'

where by PASSWORD is a unique and robust password.

Upcoming, produce the Icinga Web2 databases with the next commands:

Generate Databases icingaweb2_db
GRANT ALL PRIVILEGES on icingaweb2_db.* to 'icingaweb2_user'@'localhost' discovered by 'PASSWORD'

where by PASSWORD is a unique and robust password.

Put in Icinga2 and Icinga Web2

The 1st point to do is import the GPG vital with the command:

curl -sSL | sudo apt-vital add -

Upcoming add the apt repository with the command:

echo "deb icinga-bionic primary"" sudo tee /and so forth/apt/sources.list.d/icinga.list

Notice we are adding the bionic repository (even nevertheless we are making use of Xenial). It still operates.

Update apt with the command:

sudo apt-get update

Last but not least, put in Icinga2 and Icinga Web2 with the command:

sudo apt-get put in icinga2 icingaweb2 icinga2-ido-mysql

When questioned if Icinga2 ought to use MySQL, answer Indeed and then answer NO when questioned if the dbconfig-widespread ought to be applied to configure the databases.

SEE: IT pro’s guide to functioning smarter with Linux (Tech Pro Investigate)

Configure the backend

We now want to permit ido-mysql and the Icinga2 command attributes with the command:

sudo icinga2 function permit command ido-mysql

Restart Icinga2 with the command:

sudo systemctl restart icinga2

Upcoming we want to configure MySQL IDO. Situation the command:

sudo nano and so forth/icinga2/attributes-enabled/ido-mysql.conf

In that file, make confident the object section seems like this:

object IdoMysqlConnection "ido-mysql" 
  person = "icinga2_person",
  password = "PASSWORD",
  host = "localhost",
  databases = "icinga2_db"

where by PASSWORD is the password you produced for the icinga2_person account from the MySQL prompt.

Help save and shut that file, and then restart Icinga2 with the command:

sudo systemctl restart icinga2

The website installer

Just before you place your browser to the Icinga Web2 installation (to finalize the put in), you will have to produce a setup token. To do that, challenge the command:

sudo icingacli setup token produce

This will produce a string of figures that will then be entered in the 1st web page of the website installer. Position your browser to http://SERVER_IP/icingaweb2 (where by SERVER_IP is the IP address of your internet hosting server) and you will then be questioned for to enter the token (Determine A).

Determine A

Figure A

Style (or paste) your Icinga2 setup token listed here.

You will also see a number of further ways outlined underneath the Set up Token textual content region. These are automatically taken care of all through the installation. Should you operate into any issues, go again to this web page and challenge the advised commands.

The resulting web page will examine to make confident every little thing is completely ready to go. You shouldn’t see any troubles at this place, so click on Upcoming. In the next setup web pages, you will be questioned to:

  1. Select the modules you want to include things like: I advise choosing all three.
  2. Authentication: Select Databases.
  3. Configure Icinga2 databases: Make confident to use icingaweb2_db and icinga2web_person/password as the databases title and databases person listed here.
  4. Monitoring IDO Resource: Make confident to use the icinga2_db databases and icinga2_person person/password listed here.
  5. Command Transport: Go away the defaults.
  6. Generate an admin person.

As soon as all of that is done, you can expect to be prompted to log into the Icinga2 World wide web Interface. Congratulations, you’ve efficiently mounted Icinga2, and it is now monitoring your server. Appreciate this impressive device that will hold you in the know as to your server’s health. In our following entry, we are going to walk as a result of the procedure of adding distant hosts to monitor.

Also see

Datacenter Servicing

Leave a Reply

Your email address will not be published.