Network Monitoring Software

How to install Checkmk on Rocky Linux 9

Share on Social Media

Learn step-by-step instructions to install Checkmk monitoring system on Rocky Linux 9. Follow this comprehensive guide to set up efficient monitoring for your infrastructure. #centlinux #linux #checkmk

What is Checkmk?:

Checkmk is software developed in Python and C++ for IT Infrastructure monitoring. It is used for the monitoring of servers, applications, networks, cloud infrastructures (public, private, hybrid), containers, storage, databases and environment sensors.

Checkmk is available in three editions:

  • an open source edition (“Checkmk Raw Edition – CRE”),
  • a commercial enterprise edition (“Checkmk Enterprise Edition – CEE”) and
  • a commercial edition for managed services providers (“Checkmk Managed Services Edition – CME”).

These Checkmk-Editions are available for a range of platforms, in particular for various versions of Debian, Ubuntu, SLES and Red Hat / CentOS, and also as a Docker Image. In addition, physical appliances of various sizes as well as a virtual appliance are offered to simplify the administration of the underlying operating system through a graphical user interface and to enable high-availability solutions.

The agents used by Checkmk to collect data are available for 11 platforms, including Windows. (Source: Wikipedia)

Environment Specification:

We are using a minimal Rocky Linux 9 virtual machine with following specifications.

  • CPU – 3.4 Ghz (2 cores)
  • Memory – 2 GB
  • Storage – 20 GB
  • Operating System – Rocky Linux release 9.1 (Blue Onyx)
  • Hostname – checkmk-01.centlinux.com
  • IP Address – 192.168.116.128/24

Prepare your Rocky Linux Server:

By using a ssh client, login to your Rocky linux server as root user.

If you are not used to Linux command line then we recommend that you should attend online training Linux Command Line: From novice to wizard

Set a Hostname (preferably FQDN) and configure Local DNS Resolver by executing following commands at Linux terminal.

# hostnamectl set-hostname checkmk-01.centlinux.com
# echo "192.168.116.128 checkmk-01 checkmk-01.centlinux.com" >> /etc/hosts

Execute following command to update software packages in your Linux operating system.

# dnf update -y

If a software package related to Linux Kernel is updated by the above command, then you should reboot your Linux operating system with newly installed Kernel.

# reboot

After reboot, login as root user and check your Linux operating system and Kernel versions.

# cat /etc/rocky-release
Rocky Linux release 9.1 (Blue Onyx)

# uname -r
5.14.0-162.23.1.el9_1.x86_64

Install Third Party Yum Repositories:

To install Checkmk software, you will require some software package from EPEL (Extra Packages for Enterprise Linux) yum repository. Therefore, you should install it now, by executing dnf command.

# dnf install -y epel-release

EPEL requires some packages from CRB (CodeReady Linux Builder) yum repository. Therefore, it will be better if you enable CRB yum repository too.

You can execute following command at Linux terminal to enable CRB yum repository.

# /usr/bin/crb enable
Enabling CRB repo
CRB repo is enabled and named: crb

Build your cache for newly installed yum repositories.

# dnf makecache

Configure SELinux and Linux Firewall:

Execute following Linux command to set SELinux boolean that allows your web server to access the network interfaces.

# setsebool -P httpd_can_network_connect 1

Allow the http service in Linux firewall.

# firewall-cmd --permanent --add-service=http
success

# firewall-cmd --reload
success

Install Checkmk on Rocky Linux:

You can download different versions of this network monitoring software from Checkmk official website.

Checkmk Download

But we recommend that, you download RAW version of Checkmk if you do not have a license.

RAW version is open source edition and it is free to use under GNU GPL license.

Checkmk Download for Rocky Linux 9

Select your preferred Checkmk version, Platfrom and OS version. The same webpage will generate a Linux command according to your selection to download checkmk software.

Checkmk Download Command

Copy the command from Checkmk website to download the software straight from Linux terminal.

But you need to install wget command, because it is not preinstalled on minimal Rocky Linux 9 operating systems.

# dnf install -y wget

Now execute wget command to download Checkmk software.

# wget https://download.checkmk.com/checkmk/2.1.0p25/check-mk-raw-2.1.0p25-el9-38.x86_64.rpm
--2023-04-12 22:03:22--  https://download.checkmk.com/checkmk/2.1.0p25/check-mk-raw-2.1.0p25-el9-38.x86_64.rpm
Resolving download.checkmk.com (download.checkmk.com)... 45.133.11.29
Connecting to download.checkmk.com (download.checkmk.com)|45.133.11.29|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 167168936 (159M) [application/x-redhat-package-manager]
Saving to: ‘check-mk-raw-2.1.0p25-el9-38.x86_64.rpm’

check-mk-raw-2.1.0p 100%[===================>] 159.42M   439KB/s    in 7m 1s

2023-04-12 22:10:24 (388 KB/s) - ‘check-mk-raw-2.1.0p25-el9-38.x86_64.rpm’ saved [167168936/167168936]

You have already setup the required yum repositories, therefore, you can easily install checkmk software by executing following dnf command.

# dnf localinstall -y check-mk-raw-2.1.0p25-el9-38.x86_64.rpm

Verify installation of Checkmk software by querying it’s version by using omd command.

# omd version
OMD - Open Monitoring Distribution Version 2.1.0p25.cre

Configure Checkmk Monitoring:

Create a new monitoring instance by using omd command.

# omd create monitoring
Adding /opt/omd/sites/monitoring/tmp to /etc/fstab.
Creating temporary filesystem /omd/sites/monitoring/tmp...OK
Updating core configuration...
Generating configuration for core (type nagios)...
Precompiling host checks...OK
Executing post-create script "01_create-sample-config.py"...OK
Restarting Apache...OK
Created new site monitoring with version 2.1.0p25.cre.

The site can be started with omd start monitoring.
The default web UI is available at http://checkmk-01.centlinux.com/monitoring/

The admin user for the web applications is cmkadmin with password: rPOtCNpZ
For command line administration of the site, log in with 'omd su monitoring'.
After logging in, you can change the password for cmkadmin with 'cmk-passwd cmkadmin'.

Note down the URL of Checkmk Web UI and Password for chkadmin user.

Start the monitoring instance now.

# omd start monitoring
Temporary filesystem already mounted
Starting agent-receiver...OK
Starting mkeventd...OK
Starting rrdcached...OK
Starting npcd...OK
Starting nagios...OK
Starting apache...OK
Starting redis...OK
Initializing Crontab...OK

Change the Password of chkadmin user.

# omd su monitoring
OMD[monitoring]:~$ cmk-passwd cmkadmin
New password:
Re-type new password:
OMD[monitoring]:~$ exit
logout

Access Checkmk Dashboards:

Open URL http://checkmk-01.centlinux.com/monitoring in a web browser.

Checkmk Dashboards Login

Login as chkadmin user.

Checkmk Dashboards

You have reached at the Dashboards of Checkmk monitoring software.

Final Thoughts

Process to install Checkmk on Rocky Linux 9 opens up a world of possibilities for robust infrastructure monitoring. By carefully following the installation steps and obtaining the required software packages from the EPEL & CRB repositories, you’ll empower yourself to keep a close eye on your system’s health and performance. With monitoring in place, you can proactively address issues and optimize your infrastructure for maximum efficiency and reliability.

Alaric Bird

Alaric Bird is a seasoned Linux System Administrator with over a decade of experience in managing and optimizing Linux-based servers and infrastructure. Known for his expertise in server deployment, security hardening, and performance tuning, Alaric has a deep understanding of various Linux distributions, including Ubuntu, CentOS, and Red Hat Enterprise Linux. His skills extend to cloud platforms like AWS, where he effectively manages virtual private servers and services. Alaric is also proficient in scripting languages such as Bash and Python, which he uses to automate routine tasks, enhancing efficiency and reliability. With a strong commitment to continuous learning, he stays updated with the latest developments in open-source technologies and best practices. His problem-solving abilities, combined with excellent communication skills, make him a valuable asset to any IT team. In addition to his technical expertise, Alaric is passionate about mentoring junior administrators and fostering a collaborative environment.

Recent Posts

Puppy Linux: Fast and Simple OS

Puppy Linux is a fast, lightweight OS designed for speed and simplicity, perfect for old…

1 day ago

Change Apache Document Root in Linux

Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…

2 weeks ago

How to Change Apache Port in Linux

Discover how to change Apache port in Linux easily. Follow our simple guide to modify…

2 weeks ago

How to Create Virtual Host in Apache Server

Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…

3 weeks ago

10 Practical Tasks for RHCSA Exam with Solutions

Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…

3 weeks ago

Ultimate Fail2ban Configuration Guide

Discover the ultimate Fail2ban configuration guide. Learn how to set up, customize, and optimize Fail2ban…

4 weeks ago

This website uses cookies.