Icinga and Icinga Web on Ubuntu
“Introduction”
Icinga is a flexible and powerful open source monitoring system used to check the health of network-connected servers and services. It can be used to monitor process load and uptime, free disk space on a storage device, memory consumption in a caching service, and more. Once properly installed, Icinga can give you an overview of the status of many hosts and services, as well as notifications, downtime scheduling, and long-term storage of performance data.
“Requirements”
What you need before getting started;
An Ubuntu 16.04 server with LAMP installed. You must enable free SSL for Apache since Icinga Web has a login page, which requires entering some sensitive information during setup.
“Installation”
To get the latest version of Icinga, we first use the following command
curl -sSL https://packages.icinga.com/icinga.key | sudo apt-key add -This key will be used to automatically verify the integrity of all software we download from the Icinga repository.
Open the file with a text editor “nano”
sudo nano /etc/apt/sources.list.d/icinga.listThis will open a new empty text file. Paste the following line
/etc/apt/sources.list.d/icinga.list
deb https://packages.icinga.com/ubuntu icinga-xenial mainSave and close the file, then refresh the package cache
sudo apt-get updateapt-get will now download information from the repository we added and make Icinga packages available for installation
sudo apt-get install icinga2 icinga2-ido-mysqlThis software will load Icinga and other information into a MySQL database and will present a few configuration screens
• Should the ido-mysql feature of Icinga2 be enabled? YES
• Should the database for icinga2-ido-mysql be configured with dbconfig-common? YES
• Then you will be asked to enter a password. Create a strong password and save it so you don’t forget it.
We also enable the command feature that will allow us to execute checks from the web interface.
sudo icinga2 feature enable ido-mysql commandNow you can restart Icinga
sudo systemctl restart icinga2And finally, let us check to make sure Icinga2 is working properly
sudo systemctl status icinga2“Icinga Web Installation”
Icinga can be used completely without a web interface, but the web interface provides an overview of the health status of your services as well as the ability to send notifications.
sudo apt-get install icingaweb2The rest of the setup is done in a web browser. Before proceeding, let us edit the PHP configuration file due to timezone requirements.
sudo nano /etc/php/7.0/apache2/php.iniWe need to find a specific line to update. In Nano, we can press CTRL-W to bring up a search interface, type date.timezone and press ENTER. The cursor moves to the line we will update. First, remove the comment at the beginning of the line by removing the semicolon, and type the correct timezone. You can find the correct timezone format at the following link.
https://secure.php.net/manual/en/timezones.europe.php
When you are done, it should look something like this
date.timezone = Europe/IstanbulSave and close the file. Restart Apache to apply the update
sudo systemctl restart apache2
Leave a Comment
* Your comment will be published after approval.
Comments
0No comments yet. Be the first to comment!