How to Install Thruk on Linux Mint

Thruk is an open-source monitoring web interface that simplifies the task of managing multiple monitoring systems in one place. In this tutorial, we will install Thruk on Linux Mint, which is a free and user-friendly Linux distribution.

Prerequisites

Before we begin, ensure that you have the following:

Step 1: Install the Required Dependencies

First, update the package manager and install the required dependencies:

sudo apt update
sudo apt install apache2 libapache2-mod-perl2 libgd3 rrdtool librrds-perl \
    libnagios-object-perl libnagios-plugin-perl libcgi-pm-perl \
    libcache-perl libcrypt-des-perl libgd-perl libjson-xs-perl \
    libmime-lite-perl libnet-ip-perl libterm-readkey-perl \
    libtest-longstring-perl libtest-requires-perl libtie-ixhash-perl \
    libyaml-libyaml-perl libnet-snmp-perl libdbi-perl libdbd-mysql-perl \
    libauthen-sasl-perl libnet-dns-perl

Step 2: Install Thruk

Thruk can be installed from the official repository, or by downloading the installation package from the official website. In this tutorial, we will install Thruk from the repository:

sudo apt install thruk

During the installation process, you will be prompted to select the web server that you would like to use. Select Apache2 by pressing the spacebar, and then press Enter.

You will also be prompted to enter a password for the Thruk administrator account. Enter a secure password and confirm it.

Step 3: Configure Apache2

Once Thruk is installed, you need to configure Apache2 to use Thruk. Create a new virtual host configuration file:

sudo nano /etc/apache2/sites-available/thruk.conf

Add the following code to the file:

Listen 12345
<VirtualHost *:80>
    ServerName localhost
    DocumentRoot /usr/share/thruk
    <Directory /usr/share/thruk>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>
    <LocationMatch "/thruk/.*">
        AuthType Basic
        AuthName "Thruk Access"
        AuthUserFile "/etc/thruk/htpasswd"
        Require valid-user
    </LocationMatch>
</VirtualHost>

Save the file by pressing Ctrl+X, Y, and Enter.

Next, enable the new virtual host and the Apache2 modules required by Thruk:

sudo a2ensite thruk.conf
sudo a2enmod cgi rewrite
sudo systemctl restart apache2

Step 4: Access Thruk

Open your web browser and navigate to the following address:

http://localhost:12345/thruk/

You will be prompted to enter the Thruk username and password that you created during the installation process. Once logged in, you will be taken to the Thruk dashboard, where you can configure and manage your monitoring systems.

Conclusion

In this tutorial, you learned how to install Thruk, an open-source monitoring web interface, on Linux Mint. With Thruk, you can easily manage multiple monitoring systems in one place, simplifying the task of monitoring your infrastructure.

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!

Alternatively, for the best virtual desktop, try Shells!