Tuesday, October 8, 2024
HomeTutorialsHow To Monitor Your Linux Servers with Checkmk

How To Monitor Your Linux Servers with Checkmk

The Checkmk is one of the most used and user-friendly applications for monitoring Linux servers. It can check the server status, load, network status, applications, database, cloud server load, storage, and other IoT devices connected with your Linux server. The Checkmk tool works in a hybrid way in Linux. Once you have the tool installed on your Linux machine, you can easily access all the configuration and dashboard tabs through the web browser.

Unlike other server monitoring tools, the Checkmk tool does not hog a huge amount of system resources on Linux. Installing and using the Checkmk tool on Linux is easy and straightforward Linux. If you’re a system administrator, you must try out this tool and enjoy all the features and plug-ins that can reduce your workload a bit. 

Linux Servers with Checkmk


If you’re experienced with Linux servers and have a very handful of experience, you might already know that the Checkmk is one of the basic features of the Nagios server tool. The Checkmk for Linux tool is written in the C++, and the Python programming language, which has made the application easy to configurable with all major systems and ut does not get too heavy to crush your system. 

With a powerful and easy-to-access system UI, the Checkmk can genuinely log all the server data and keep the log of the Linux server. You can generate reports, monitor infrastructure, and configure your extensions from Linux servers with the Checkmk tool. In this post, we will see how to install and use the Checkmk tool on Linux for checking servers.

Step 1: Install Checkmk on Linux 


At the very beginning, we will need to install the signed Checkmk tool on our Linux system and do the configuration. Here, I’m describing the installation method of Checkmk on Debian, Ubuntu, and Red-Hat-based Linux distributions for monitoring servers. If you’re using any other Linux distributions, please check the installation guide on the Checkmk website.

1. Install Checkmk on Ubuntu/Debian


In Debian or Ubuntu distributions, we will use the wget command to download the Debian package of Checkmk to download the .deb package. The compiled file of the Checkmk Linux servers tool will be stored inside the home directory.

Checkmk download via wget

wget https://download.checkmk.com/checkmk/2.0.0p9/check-mk-raw-2.0.0p9_0.focal_amd64.deb

Now, run the following dpkg and the aptitude commands on the terminal shell with root privileges to finish the Checkmk installation process on your Debian Linux. 

installing checkmk on Ubuntu linux

sudo dpkg -i *.deb
sudo apt-get install -f

2. Install Checkmk on Red hat/Fedora Linux 


If you’re a Red Hat or a Fedora workstation user, this method is for you. To get the Checkmk servers tool on your Linux, first, you will need to download the latest EPEL version for the extra package for Linux on your machine. 

https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Now, run the below-mentioned commands on the shell to enable the Checkmk repository on your Linux system. 

# subscription-manager repos --enable "codeready-builder-for-rhel-8-x86_64-rpms"

If you’re a DNF-baed user, you might need to execute the following command as well on the terminal shell. 

# dnf config-manager --set-enabled powertools

After installing the EPEL and setting up the repository, we will now need to allow the firewall ports on the system. You can run the following commands on the shell to set the firewall and reload the firewall daemon on your system. Please ensure that the firewall daemon is set before loading Linux servers with Checkmk.

# setsebool -P httpd_can_network_connect 1
# firewall-cmd --zone=public --add-service=http --permanent
# firewall-cmd --reload

You may now get the RPM package on your Linux system from the repository. The following SCP (secure copy) command will let you get the RPM package of the Checkmk tool on your Linux filesystem. 

# scp check-mk-raw-2.0.0p3-el8-38.x86_64.rpm

Now, execute the wget and rpm import commands one after another to import the public key of the Checkmk package on your system. 

# wget https://download.checkmk.com/checkmk/Check_MK-pubkey.gpg
# rpm --import Check_MK-pubkey.gpg

Finally, you may now verify the Checkmk package on your Linux system through the following commands on your shell. 

# rpm -K check-mk-raw-2.0.0p3-el8-38.x86_64.rpm
# yum install check-mk-raw-2.0.0p3-el8-38.x86_64.rpm

You may now check the version of the Checkmk through the omd command. 

# omd version

Step 2: Create a Project To Test Checkmk


Till now, we have seen how to install the Checkmk tool on Linux, and it’s time to test the tool on our servers. For checking Linux servers with Checkmk, we will create a demo project and run it on the system. You can now create a test run project for your Linux server to monitor the server status and check whether the Checkmk tools are functioning on your system or not through the OMD commands given below. 

omd create site for Checkmk

sudo omd create tr_test
sudo omd start tr_test

After successful project creation, we can now access the Checkmk dashboard from the web browser. 

sudo omd start test server

Step 3: Load the Checkmk Web GUI on Linux


To access the graphical user interface-based system admin panel of the Checkmk tool on Linux, you will need to load the web address or the server address where you have created your test project. In my case, the below-mentioned address will be the Test Project web address.

https://ubuntupit/tr_test/

When the server loads successfully, you will need to log in with the login credentials. If you remember, you have created the login credentials while installing the Checkmk server monitoring tool on our Linux machine. In case you forget it, you can locate it inside the htpasswd etc/htpasswd cmkadmin file.

check admin login Linux servers with Checkmk

When you sign in to the test server, you will see a nifty dashboard showing all the control panels, host details, monitor, setting, user section, and other Checkmk menus. At this stage, we don’t have any host added to this server.

checkmk dashboard on linux

Step 4: Add A New Host To Linux Server with Checkmk


After logging in successfully to the Checkmk server monitoring tool on Linux, you may now add a new host. The host adding menu will be found from the left bar by clicking on the SetUp button. After you provide the valid host address, you may now go to the terminal shell to load the host with the below wget command.

add host sites on Linux servers with Checkmk

wget <HOSTURL>

Finally, install the Checkmk server monitoring agent on your Linux system through the below-mentioned command. This will allow you to load the host details on your Linux machine.

sudo dpkg -i check-mk-agent_2.0.0p9-1_all.dpkg

Insights


In the entire post, we have seen how to install and get started with the Checkmk tool on Linux. Using the Checkmk tool is more convenient for checking Linux servers. Monitoring and checking the Linux servers with Checkmk is fun as it shows all the necessary data that you might need to see. If you’re new to Checkmk, please be patient. It may take a while to get familiar with the user interface.

If you find this post useful and informative, please share this with your friends and the Linux community. You can also write down your opinions about this post in the comment section.

Mehedi Hasan
Mehedi Hasan
Mehedi Hasan is a passionate enthusiast for technology. He admires all things tech and loves to help others understand the fundamentals of Linux, servers, networking, and computer security in an understandable way without overwhelming beginners. His articles are carefully crafted with this goal in mind - making complex topics more accessible.

You May Like It!

Trending Now