Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".

OracleLinux 8.x ; Icinga2 Monitoring Application Installation

What is Icinga2?

It is an open source software for system monitoring, derived and developed from a monitoring software called Nagios.
In this article, we will install the Icinga2 monitoring application on OracleLinux8.x with RHEL8.
The same can be done on Rocky Linux8.x and AlmaLinux8.x.
However, please note that some information related to PowerTools is different from the information on this page.

1.Prerequisite.

The requirement for installing Icinga2 is that you must have LAMP installed. PHP 7.3 or later version is also required.
In this case, it is assumed that the following have been built
MySQL   Ver 8.0.32
PHP    7.4.33
Httpd   Apache/2.4.37
SELINUX   permissive

2. Install and configure PHP extensions

①Install required PHP extensions
Make the Remi repository available in advance.

 ➁The php-imagick extension is also required. However, this cannot be installed as in the case of the PHP extensions above, so install as follows

➂Add the following to the PHP.INI file

④Restart Apache for configuration to take effect

3. Icinga2 Install

①Add Icinga Repository
First, enable EPEL repository

Enable GPG signature key

Create a new repository file in the /etc/yum.repos.d directory

Update the cache package.

➁Install Icinga2 package and other relevant Icinga2 packages

➂Install Nagios plugin used to monitor both physical and virtual hosts

④Enabling the ido-mysql module and other features of Icinga2

⑤Restart Icinga to apply changes

4. Create and configure database for Icinga-IDO MySQL module

①The Icinga-IDO MySQL function is a back-end function that collates and exports all configuration and status information to a database. Therefore, it is necessary to create a database for the Icinga2-ido-mysql function.
Create an Icinga2 database (in this case icinga2_db) and a database user (in this case icinga2_user, password:?Wabcd123) and grant the database user all permissions to the Icinga2 database.

➁Importing the database schema

➂Edit ido-mysql configuration file

④Start and activate Icinga2

⑤Allow server monitoring (ICINGA2 protocol)

⑥Status Check

5. IcingaWeb2 Install

In Icingaweb2, Icingaweb2 implements a plugin for configuration called Director in the Icinga2 web interface, and Director can also be used to configure monitoring settings in the web interface

①PowerTools is required to install IcingaWeb2, but OracleLinux does not have the package, so install PowerTools equivalent (ol8_codeready_builder) with the following command

※Note: For AlmaLinux8.x and RockyLinux8.x, install PowerTools as follows

➁IcingaWeb2  CLI  install

6.Creating a database for IcingaWeb2

Create an IcingaWeb2 database (in this case icingaweb2_db as an example) and a database user (in this case icingaweb2_user ,Password : ?Wefgh123) and grant all permissions to the database user for the Icinga Web2 database.

Restart Apache Web Server

7. Icinga2 setup from browser

7.1 Generate Secret Token
Generate a secret token, a unique code used for authentication in the first step of setting up Icinga2

Make a note of the above code If you lose your token, you can retrieve it by executing the following command

7.2 Complete the installation from a web browser
①Access "http://[server-ip]/icingaweb2/setup" from a web browser
Enter the secret token generated above into the Setup Token field and click "Next".

The Modules page will appear. It provides an overview of all modules that can be activated.
By default, the "Monitoring" module is enabled. Enable the module of your choice and click "Next"

In this section, verify that all PHP prerequisites are met, including PHP modules, libraries, and directories. If all is in order, scroll down and click Next

On the Authentication page, leave the defaults and click "Next"

In [Database Resource], enter the IcingaWeb2 database information as specified in [6. Create IcingaWeb2 database].
To verify that the database details are correct, click Validate Configuration

If all is well, you will receive a notification that the configuration has been successfully verified as follows, click Next

When the following [Database Setup] is displayed, enter the MySQL login credentials as follows and click [Next].
Username : root
Password : root Password

[Under "Authentication Backend," leave the defaults and click "Next."

Create a new administrator user to access and login to the Icinga2 web interface

Under [Application Configuration] , leave the defaults and click Next.

Review all changes made so far. If all is well, click Next.

Here is the configuration of the monitoring module for IcingaWeb2 [Next] Click

Here, enter the database information for the Icinga2-ido-mysql function specified in [4. Create database for Icinga-IDO MySQL module] in the form and click [Validate Configuration] to validate the configuration

Receive notification that the configuration has been successfully verified. Click "Next.

Under "Command Trnsport," select "Local Command File" as the Transport Type and click "Next.

Leave [Monitoring Security] as the default and click [Next]

Check all configurations of the Icinga2 monitoring module again and if everything is ok, click "Finish"

You will receive a notification that Icinga Web 2 has been successfully set up. To login to the web interface, click on "Login to Icinga Web 2"

The Icinga Web 2 interface will open. Enter the administrator account name, password, and click "Login"

Icinga2 monitoring dashboard appears

Copied title and URL