how to install checkmk on ubuntu 20.04

How to Install Checkmk on Ubuntu 20.04

Spread the love

In this tutorial, we are going to show you how to install Checkmk monitoring software on Ubuntu 20.04.

Checkmk is a free open-source monitoring server tool written in C++ and Python. It is a leading tool for infrastructure and application monitoring that has a simple configuration, flexibility, and scalability. With Checkmk we can monitor web servers, database servers, cloud infrastructure, network services, containers, and many more things.

Installing Checkmk monitoring tool on Ubuntu 20.04 is a very easy and straightforward process, which can take up to 10 minutes. Let’s get started with the installation. Enjoy!

Prerequisites

  • Fresh install of Ubuntu 20.04
  • User privileges: root or non-root user with sudo privileges

Update the System

In order for our system to be up to date before the installation we are going to update it with the command below:

sudo apt update -y && sudo apt upgrade -y

Download the Installation package

Once, the system is up to date, first we need to download the Checkmk installation package from their official site

cd /opt
wget https://download.checkmk.com/checkmk/1.6.0p27/check-mk-raw-1.6.0p27_0.focal_amd64.deb

Once, you execute the command above, check the downloaded file in the “/opt” directory

ls -al

You should receive the following output

root@vps:/opt# ls -al
total 76500
drwxr-xr-x  2 root root     4096 Feb  4 00:01 .
drwxr-xr-x 19 root root     4096 Jan  5 22:29 ..
-rw-r--r--  1 root root 78321766 Sep 30 05:10 check-mk-raw-1.6.0p27_0.focal_amd64.deb

Install Checkmk

Once you verify that the file is successfully downloaded you can execute the command below for the installation process to start.

sudo apt install ./check-mk-raw-1.6.0p27_0.focal_amd64.deb

After a couple of minutes, the Checkmk will be installed on your server.

The Available Commands

To check the available commands you need to execute the “omd” command on your terminal and the following output will appear.

root@vps:~# omd
Usage (called as root):

 omd help                               Show general help
 omd setversion VERSION                 Sets the default version of OMD which will be used by new sites
 omd version    [SITE]                  Show version of OMD
 omd versions                           List installed OMD versions
 omd sites                              Show list of sites
 omd create     SITE                    Create a new site (-u UID, -g GID)
 omd init       SITE                    Populate site directory with default files and enable the site
 omd rm         SITE                    Remove a site (and its data)
 omd disable    SITE                    Disable a site (stop it, unmount tmpfs, remove Apache hook)
 omd enable     SITE                    Enable a site (reenable a formerly disabled site)
 omd mv         SITE NEWNAME            Rename a site
 omd cp         SITE NEWNAME            Make a copy of a site
 omd update     SITE                    Update site to other version of OMD
 omd start      [SITE] [SERVICE]        Start services of one or all sites
 omd stop       [SITE] [SERVICE]        Stop services of site(s)
 omd restart    [SITE] [SERVICE]        Restart services of site(s)
 omd reload     [SITE] [SERVICE]        Reload services of site(s)
 omd status     [SITE] [SERVICE]        Show status of services of site(s)
 omd config     SITE ...                Show and set site configuration parameters
 omd diff       SITE ([RELBASE])        Shows differences compared to the original version files
 omd su         SITE                    Run a shell as a site-user
 omd umount     [SITE]                  Umount ramdisk volumes of site(s)
 omd backup     SITE [SITE] [-|ARCHIVE_PATH] Create a backup tarball of a site, writing it to a file or stdout
 omd restore    [SITE] [-|ARCHIVE_PATH] Restores the backup of a site to an existing site or creates a new site
 omd cleanup                            Uninstall all Check_MK versions that are not used by any site.

General Options:
 -V                     set specific version, useful in combination with update/create
 omd COMMAND -h, --help          show available options of COMMAND

Create a Monitoring Server

In order can test the functionality of the Checkmk installation we need to create a test monitoring server. We will use the “rosehosting” as the name of our server. You can use any name you want.

sudo omd create rosehosting

You should receive the following output with the credentials.

root@vps:~# sudo omd create rosehosting
Adding /opt/omd/sites/rosehosting/tmp to /etc/fstab.
Creating temporary filesystem /omd/sites/rosehosting/tmp...OK
Restarting Apache...OK
Created new site rosehosting with version 1.6.0p27.cre.

  The site can be started with omd start rosehosting.
  The default web UI is available at http://your_hostname/rosehosting/

  The admin user for the web applications is cmkadmin with password: agKZHrpI
  (It can be changed with 'htpasswd -m ~/etc/htpasswd cmkadmin' as site user.
)
  Please do a su - rosehosting for administration of this site.

Once, the new instances is created, we need to start it.

omd start rosehosting

You should receive the following output:

root@vps:~# omd start rosehosting
Starting mkeventd...OK
Starting rrdcached...OK
Starting npcd...OK
Starting nagios...OK
Starting apache...OK
Initializing Crontab...OK

Once the instance is started you can access it using the URL provided in the previous paragraph after successful creation along with the credentials.

After successful login you should see the following screen.

That’s it. You successfully installed and created your first Checkmk instance on your Ubuntu 20.04 server. Now you can easily monitor the web servers, database servers and etc on your own. Of course, if you find some difficulties while installing the Checkmk you do not have to install it by yourself. You can always contact our system admins and with their expertise, they will install Checkmk for you. All you need to do is to contact our support. We are available 24/7.

PS. If you liked this post, on how to install Checkmk on Ubuntu 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Leave a Reply

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