How to Install Thruk on Debian Latest

Thruk is an open-source multibackend monitoring web interface that allows you to monitor several backends like Nagios, Icinga, Check_MK, and more. In this tutorial, we will guide you through the process of installing Thruk on Debian latest.

Prerequisites

Before we proceed with installing Thruk on Debian, you need to have the following prerequisites:

Step 1: Install Required Dependencies

The first step is to install some necessary dependencies required for Thruk to work correctly. To install them, log in to your Debian system, open a terminal, and execute the following command:

$ sudo apt-get update
$ sudo apt-get install apache2 libapache2-mod-php php php-mbstring php-zip \
                       php-net-socket php-net-smtp php-curl php-xml php-json \
                       git unzip -y

This command will update your system packages and install all the required dependencies.

Step 2: Install and Configure Nagios

Thruk is not running Nagios itself. It's just an interface to it. Therefore, we need to install Nagios first. To install Nagios, follow these steps:

Install Required Packages for Nagios

$ sudo apt-get update
$ sudo apt-get install build-essential libgd-dev openssl libssl-dev unzip -y

Create User And Groups

$ sudo useradd nagios
$ sudo groupadd nagcmd
$ sudo usermod -a -G nagios nagcmd
$ sudo usermod -a -G nagcmd www-data

Download and Install Nagios

$ cd /usr/src
$ wget -O nagios.tar.gz https://github.com/NagiosEnterprises/nagioscore/archive/nagios-4.4.6.tar.gz
$ tar xzf nagios.tar.gz
$ cd nagioscore-nagios-4.4.6/
$ sudo ./configure --with-httpd-conf=/etc/apache2/sites-enabled
$ sudo make -j4 all
$ sudo make install
$ sudo make install-init
$ sudo make install-commandmode
$ sudo make install-config
$ sudo make install-webconf

Create User Account to Access Nagios Web Interface

$ sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Start Nagios Service

$ sudo systemctl restart nagios

Finally, check whether the Nagios web interface is running correctly by browsing the URL http://your-server-ip/nagios.

Step 3: Install Thruk

Now that we have installed and configured Nagios, we can proceed with installing Thruk on Debian. To install Thruk, follow these steps:

Clone The Thruk Git Repository

$ cd /usr/src
$ sudo git clone https://github.com/thruk/thruk.git

Install Thruk

$ cd thruk
$ sudo make
$ sudo make install

Configure Mod_Perl

$ sudo a2enmod perl
$ sudo systemctl restart apache2

Configure Thruk

$ sudo cp /usr/local/thruk/etc/thruk_local.conf.example /usr/local/thruk/etc/thruk_local.conf

Open the file /usr/local/thruk/etc/thruk_local.conf with your favorite file editor and customize it to suit your environment.

Accessing Thruk Web Interface

Open the URL http://your-server-ip/thruk on your web browser to access the Thruk web interface.

Conclusion

In this tutorial, you learned how to install Thruk on Debian latest. Thruk is a powerful monitoring web interface that makes it easy to monitor several backends like Nagios, Icinga, or Check_MK.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!