How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS

3
7191

Setup Icinga Web 2

Most of the Icinga Web 2 configurations will be done from the User Interface but before we get there, set up the Icinga authentication token. To generate the token, run the following command.

# icingacli setup token create
The newly generated setup token is: 5b437252b341c5f1

Once you have the authentication token, navigate to the browser and access icinga web 2 using the url, http://<ip-of-icinga-server>/icingaweb2/setup so as to finalize the configurations.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Icinga Web Configuration Wizard

To proceed with configuration, enter the token you generated above and click Next to continue.

The next page presents to you Module configuration. To enable and configure a module, just tick it and click “Next”. In this case, we will go with default configuration.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Select Icinga Modules

The next page show PHP modules Verification. If a critical module is missing, you can install the module, that is at least if you see a red back on a specific module, otherwise click Next to continue.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Validate PHP Configurations

In the next page, you need to choose how users will be authenticating to Icinga Web. In our case, we will go with the default, Database, so that we can configure users authentication details on MySQL database.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Choose Icinga Authentication Method

On the next page, you need to configure the database resource where to store users and user groups. So before you can proceed, create the backend database and the user.

# mysql -u root -p
> create database icingawebusers;
> grant all privileges on icingawebusers.* to icingaadmin@localhost identified by 'SECUREDPASS';

After that, click Next to proceed. As shown in the screenshot below, the required configurations are marked with *. Fill them appropriately.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Configure Icinga Database Resource

Once done, click Next to proceed. You are then required to set the Authentication Backend DB. Click Next to choose the default.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Choose Icinga Authentication Backend

Next, create icinga administrator account, the username and the password.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Create Icinga Admin Account

On the Next page, Application Configuration page, adjust all application and logging related configuration options to fit your needs. In this case, you can use the listed default values and click Next to proceed.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Icinga Application Configuration Page

You’ve now configured Icinga Web 2 successfully. You can review the changes supposed to be made before setting it up.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Icinga Review Configuration Settings

On the next pages, you can accept the default settings by click Next.

On the Monitoring IDO Resource page, enter the Icinga Database, Username and Password that was created during Icinga installation.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Configure Icinga Monitoring IDO Resource

On the Command Transport you need to define how you want to send commands to your monitoring instance. In this guide, we will use Local Command File.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Set Icinga Command Transport Method

On the next pages click Next to proceed and Finish to finish the configuration.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Icinga Web 2 Successful Configuration

You have successfully configured Icinga Web 2.

Click on the login button to login to Icinga Web UI.

How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Icinga Web 2 Logon Page
How to Install Icinga 2 and Icinga Web 2 on Ubuntu 18.04 LTS
Icinga Web 2 Dashboard

Magnificent!! You have made it. Icinga Web 2 Dashboard is now all yours for exploration.

In our next tutorial, we will learn how to monitor hosts and services with Icinga2. Stay connected.

3 COMMENTS

  1. Great tutorial, thank you! I also tried another tutorial that didn’t work.

    It’d be great if you could create tutorials for graphite and director as well! 😀

LEAVE A REPLY

Please enter your comment!
Please enter your name here