Icinga 2, is open-source software that provides monitoring and analytics across network systems in the data center and clouds platform. It is a complete enterprise-grade server and log monitoring platform. Metrics from Graphite are displayed directly in the Icinga web interface where you can view and analyze logs and data that are interpreted in a simple form. For more about Icinga 2, please visit its homepage. When you’re ready, continue below with the steps:
Install Icinga 2 Package
To install Icinga 2, you can go and download its .deb package file and install it locally on the Ubuntu server. However, if you want to quickly and easily upgrade to newer versions of the software, you will want to add its official APT repository to Ubuntu. To add its APT repository to Ubuntu, run the commands below to import its repository GPG key. After importing the repository key above, run the commands below to create a new repository file for Icinga 2. This file will contain Icinga’s repositories where all packages and upgrades are available. Then copy and paste the lines below into the file and save. After adding the repository file above, run the commands below to update the APT package list and install Icinga 2 packages: Once installed, the commands below can be used to stop, start and enable Icinga 2 to automatically startup when the server boots up. To validate if Icinga 2 is installed, run the commands below: You should see Icinga 2 system status details as shown below:
Install MariaDB Database Server
Icinga 2 requires a database server to store its content. If you’re looking for a truly open-source database server, then MariaDB is a great place to start. To install MariaDB run the commands below: After installing MariaDB, the commands below can be used to stop, start and enable the MariaDB service to always start up when the server boots. Run these on Ubuntu 16.04 LTS Run these on Ubuntu 18.10 and 18.04 LTS Next, run the commands below to secure the database server with a root password if you were not prompted to do so during the installation. When prompted, answer the questions below by following the guide.
Enter current password for root (enter for none): Just press the Enter Set root password? [Y/n]: Y New password: Enter password Re-enter new password: Repeat password Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
Now that MariaDB is installed, to test whether the database server was successfully installed, run the commands below. type the root password when prompted. If you see a similar screen as shown above, then the server was successfully installed. After installing the MariaDB database server above, run the commands below to install Icinga 2 database module. To do that, run the commands below: During the installation, you’ll be prompted with a few questions. Choose Yes to enable Icinga do-mysql module, agree to create a database, and create a password for the database. After that, Icinga 2 database module should be installed and configured. Run the commands below to enable the module. That should be it
Create Icinga 2 Database
When you’re done with the steps above, follow the guide below to create Icinga 2 blank database. The database will be used to store its content. To log on to the MariaDB database server, run the commands below. Then create a database called icingaweb Create a database user called icingawebuser with a new password Then grant the user full access to the database. Finally, save your changes and exit.
Access Icinga 2 Web Portal
Now that Icinga 2 server is installed run the commands below to install its web tool. By default, the Apache2 web server will be installed and PHP. After installing Apache2 and PHP, open the PHP default PHP config file and configure your server time zone. To do that, run the commands below Then change the line below to include your timezone and save. Reload Apache2 When you’re done, generate the icinga2 setup token using the icingacli command as below. Take note of the token as displayed below. The newly generated setup token is: 4d594e662b6dfd54 After that, open your browser and browse to the server name to complete the setup. Follow the installation wizard until you’re done. Type in the token generated above and continue. Then select the Monitoring module and continue After that, validated all requirements are met. Select database authentication type. and type in the database name, username, and password created above and continue. Validate and continue Continue with the setup and complete it. Login and enjoy! Congratulations! You have learned how to install Icinga 2 monitoring and analytics platform on Ubuntu 16.04 | 18.04 LTS servers. You may also like the post below: