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.
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.
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.
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.
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.
Once done, click Next to proceed. You are then required to set the Authentication Backend DB. Click Next to choose the default.
Next, create icinga administrator account, the username and the password.
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.
You’ve now configured Icinga Web 2 successfully. You can review the changes supposed to be made before setting it up.
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.
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.
On the next pages click Next to proceed and Finish to finish the configuration.
You have successfully configured Icinga Web 2.
Click on the login button to login to Icinga Web UI.
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.