Advance

How to Install Icinga 2 on Linux Ubuntu 20.04 LTS

How to Install Icinga 2 on Linux Ubuntu 20.04 LTS
1
(1)

Icinga 2 software is a free network monitoring software that is provided as open source. This software, as network monitoring software, checks all available resources of the network and notifies the user quickly when something goes wrong. Icinga 2 is a modified version of Icinga and has become very popular among IT professionals due to its scalability and live monitoring tools. This software is compatible with any operating system and can measure a wide area network and provide graphs with color code. In this article, we try to introduce you to How to Install Icinga 2 on Linux Ubuntu 20.04 LTS. If you want to buy an Ubuntu VPS server, you can see the packages available in Eldernode.

Tutorial Install Icinga 2 on Linux Ubuntu 20.04 LTS

Icinga 2 contains a highly interactive visual monitoring interface for easy access monitoring. It is also quite innovative for an open source application because it uses open source API technology. This enables Icinga 2 to control its network at high speeds. In the continuation of this article, join us with the tutorial on installing Icinga 2 on Linux Ubuntu 20.04 LTS.

Recommended Article: Tutorial Mariadb installation on Ubuntu

You must first update the necessary programs using the following command:

sudo apt update && sudo apt upgrade

Then you need to run the following command to install the programs that will be needed during the installation process:

sudo apt install -y vim apt-transport-https wget gnupg

The last step you need to do before installing Icinga 2 is to add the Icinga closed repository. So you have to add the same image below the Icinga repository to the server packet management configuration:

wget -O - https://packages.icinga.com/icinga.key | sudo apt-key add -  . /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi;  echo "deb https://packages.icinga.com/ubuntu icinga-${DIST} main" | sudo tee /etc/apt/sources.list.d/${DIST}-icinga.list  echo "deb-src https://packages.icinga.com/ubuntu icinga-${DIST} main" | sudo tee -a /etc/apt/sources.list.d/${DIST}-icinga.list

Finally you need to be updated by the server to apply the changes:

sudo apt update

Install Icinga 2 on Linux Ubuntu 20.04

After installing the necessary programs, it is time to install Icinga 2 using the apt package manager by executing the following command:

sudo apt install icinga2 -y

Icinga 2 could not check the service without installing and running the plugin. So you need to use the following command and install the Monitoring Plugins project which offers a wide range of plugins:

sudo apt install monitoring-plugins -y

good job! Now you need to start and activate icinga2 with the following command:

sudo systemctl enable --now icinga2

In the next step you need to install MySQL or MariaDB and configure DB IDO MySQL. To do this, you can refer to the article Tutorial Mariadb installation on Ubuntu.

Now you need to install DB IDO using the following command:

sudo apt install icinga2-ido-mysql -y

A window will open asking if you would like the Icinga2’s ido-mysql feature to be enable. So you have to select <Yes>.

You are then asked if you want to configure the database with dbconfig-common for Icinga2’s ido-mysql. You must select <No> to answer this question.

Now you need to create a database and user for Icinga2:

$ mysql -u root -p    MariaDB [(none)]> CREATE DATABASE icinga;  MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga';  MariaDB [(none)]> FLUSH PRIVILEGES;  MariaDB [(none)]> quit

After successfully installing the database and creating the user, you must now enter the Icinga 2 IDO design by executing the following command. If you are asked for a password, you can enter the root.

$ mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql  Enter password: <Enter-your-root-password>

How to enable the IDO MySQL module

This module creates a new configuration file that can be install in /etc/icinga2/features-available/ido-mysql.conf. Execute the following commands to do this:

$ sudo vim /etc/icinga2/features-available/ido-mysql.conf    /**  * The db_ido_mysql library implements IDO functionality  * for MySQL.  */    library "db_ido_mysql"    object IdoMysqlConnection "ido-mysql" {  user = "icinga",  password = "icinga",  host = "localhost",  database = "icinga"  }

You should now enable the ido-mysql configuration file using the following commands, which represent the icinga2 attribute:

$ sudo icinga2 feature enable ido-mysql  Enabling feature ido-mysql. Make sure to restart Icinga 2 for these changes to take effect

Finally, restart Icinga 2 with the following command:

sudo systemctl restart icinga2

Conclusion

Icinga is a monitoring system that monitors the availability of your network resources, notifies users of shutdowns, and generates performance data for reporting. The software is scalable and can control large and complex environments in multiple locations. In this article, we tried to teach you how to Install Icinga 2 on Linux Ubuntu 20.04 LTS.

How useful was this post?

Click on a star to rate it!

Average rating 1 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day