Install and configure Check_MK Server on CentOS 7

Check_MK Server is one of the best monitoring system out there that was started originally as an extension to the Nagios monitoring system. It is Free and Open-Source Software (FOSS).

-Advertisement-

Are you looking for an IT monitoring solution that is free and open source as well as compelling with latest technologies? Check_MK Server is one of the best monitoring system out there that was started originally as an extension to the Nagios monitoring system.

It supports creating a rule-based configuration using Python and also allows monitoring of more machines from a single Nagios server. Specifically, Check_MK Server can handle a pleura of monitoring tasks including Server, Application, Network, Cloud, Storage, Database, Environment, and Container. That’s almost everything even a large organization will ever need.

Here we are going to install and configure the CRE version (Check_MK Raw Edition) which is open-source and 100% free.

Install and Configure Check_MK Server on CentOS

Launch terminal and login as root.

Step 1 – Disable SELinux

-Advertisement-

Let’s check SELinux status and disable it if it’s enabled.

getenforce

Edit SELinux configuration file:

vim /etc/sysconfig/selinux
-Advertisement-

Change SELINUX=enforcing to SELINUX=disabled

Save and exit the file followed by a reboot.

reboot

Step 2 – Installing Prerequisites

Let’s start with updating the system.

-Advertisement-
yum update

Next, install NTP and check its service status.

yum install ntp
systemctl status ntpd

If the service is not started, start it using below command:

systemctl start ntpd

Enable NTP on system boot:

systemctl enable ntpd

Modify firewall rules to allow NTP service. Run the following commands to enable service.

firewall-cmd --add-service=ntp --zone=public --permanent
firewall-cmd --reload

Step 3 – Add EPEL Repository to the System

We have to install EPEL repository because some of the check_mk packages are not available in default repositories.

yum install epel-release -y

List repository.

yum repolist

Step 4 – Install Check_MK

We are going to download a free version of check_mk. Head over to the official download page and copy the relevant link to use in the command below after wget.

wget https://mathias-kettner.de/support/1.5.0p12/check-mk-raw-1.5.0p12-el7-38.x86_64.rpm

Download Package
Download Package

Install Check_MK and all the dependencies required for Check_MK.

yum install check-mk-raw-1.5.0p12-el7-38.x86_64.rpm

Install Check MK
Install Check MK

Finished Check-MK Installation
Finished Check-MK Installation

Now modify Firewall rules for HTTP.

firewall-cmd --add-service=http --zone=public --permanent
firewall-cmd --reload

Step 5 – Create and start Check_MK server

Check “omd ” command if it works or not.

omd version

Configure the Check_mk server

To create Check_MK server run following command:

omd create fosslinuxmonitor

You can replace “fosslinuxmonitor” with whatever the name you want.

omd create fosslinuxmonitor

Then you should get a similar output as below:

Create Check-MK-Server
Create Check-MK-Server

Here you can see web URL, username and password for login.

Start created server:

omd start fosslinuxmonitor

Start Check-MK-Server
Start Check-MK-Server

Step 6 – Access Check_MK on Webbrowser

When you create Check_MK server, it shows Web Interface URL. You can use it to access your Check_Mk Server.

http://<servername>/<instance_name>/
Eg:- http://10.94.10.208/fosslinuxmonitor

Login Page
Login Page

You can use username and password which showed on Check_Mk server creation. Then you can access the Dashboard.

Dashboard
Dashboard

Step 7 – How to install the Check_Mk agent on Linux client

You can download check_mk Agents from the following URL

http://<servername>/<instance_name>/check_mk/agents/
Eg:- http://10.94.10.208/fosslinuxmonitor/check_mk/agents/

Check-mk Agents

Check-MK AgentsOn Ubuntu Server, install “xinetd” before installing Check_MK agent.

apt-get install xinetd

Download and install the agent.

wget http://10.94.10.208/fosslinuxmonitor/check_mk/agents/check-mk-agent_1.5.0p12-1_all.deb
dpkg -i check-mk-agent_1.5.0p12-1_all.deb

Install Agent On Ubuntu
Install Agent On Ubuntu

In addition to that Port 6556 TCP should be open between check_mk server and client for communication. Install Check_MK agent on CentOS.

Install “xinetd”.

yum install xinetd

Download and install the agent.

http://10.94.10.208/fosslinuxmonitor/check_mk/agents/check-mk-agent-1.5.0p12-1.noarch.rpm
rpm -ivh check-mk-agent-1.5.0p12-1.noarch.rpm

Install Agent On Microsoft Windows server. Download agent.

http://10.94.10.208/fosslinuxmonitor/check_mk/agents/windows/check_mk_agent.msi

Install agent using “msi” package.

Install-On-MS-Windows
Install-On-MS-Windows

Click finish after installation.

Step 8 – Add Hosts in check_mk monitoring

Now click on WATO configurations > Hosts > Create new host.

Add New Host
Add New Host

Then fill host details, Hostname, IP address.

Fill-host-Details
Fill-host-Details

Now click ‘Save & Goto services‘. You will get below the screen in which check_mk discovers services on the client.

Services-Of-Added-Host
Services-Of-Added-Host

Then click on “Activate changes ” to activate all configurations.

Activating Changes
Activating Changes

You can add more host like this. In my case, I have added CentOS, Ubuntu and MSWindows machine. Click On WATO configurations > Hosts and you can see all added hosts.

Added Hosts
Added Hosts

Click on Views -> Hosts -> All Hosts. You can see all the added host status.

All-Hosts Status
All-Hosts Status

Step 9 – Add New User to Get email alerts

Click on WATO configurations > Users.

Add-New-user
Add-New-user

You can add user name, email etc. In addition to that select “Receive fallback notifications” too.

Add User Details
Add User Details

Save, click changes and activate it. Now go to WATO configurations > Hosts and click on any Host. In the Basic Settings area move “Everything ” to the selected area.

Modify Host Configurations
Modify Host Configurations

Save and do the same to all hosts. Click on hosts

All Hosts
All Hosts

Click on changes and activate it.

Step 10 – Check email Alerts

Now we will shut down one machine. You should see hosts status as Down.

System Status
System Status

Now we get Email alert.

Server-Down Email Alert
Server-Down Email Alert

You will get other systems alerts similar to this. After you start the server you will get another alert.

Server-Up Email Alert
Server-Up Email Alert

You can integrate alerts with Slack, Pager durty and so on.

Now you successfully installed and configured Check_MK server on CentOS. Let us know your experience in the comments below. Also, please don’t forget to share the tutorial with your friends on social platforms.

-Advertisement-
Darshana
Hey! I'm Darshana, a Linux / DevOps Engineer and also a contributor to FOSS Linux. I enjoy working on various kind of Linux distributions and cloud technologies. During my free time, I love to swim and hike across nature trails. Linux is my love and I'm here to share all my learnings with all of you! Hope you enjoyed reading my article.

3 COMMENTS

  1. Why disable selinux? If you are expecting problems permissive might be a better solution. Or is it because of the default easy, non-secure way to setup servers?
    Why install ntp, as chrony is standard?

  2. Dear author,

    My name is Jan and I work for tribe29, the team behind Check_MK.

    I’m reaching out because I found this guide about Check_MK (a product originally developed by Mathias Kettner GmbH).

    Recently, the company has rebranded itself (find out why at https://tribe29.com/brand#name), so Mathias Kettner GmbH became tribe29 GmbH – and the product naming switched from Check_MK to Checkmk. We also moved our website from mathias-kettner.com to checkmk.com.

    We would be grateful, if you could update the name and the backlink in your guide from https://mathias-kettner.com/download.php? to https://checkmk.com/download.php?edition=dcee&version=stable&dist=debian

    Either way, thanks for the great resource. Enjoy your week.

    Best regards,
    Jan Leptien

Leave a Reply to Nish Cancel reply

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,632FansLike
361FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

Top 20 Git Commands with Practical Examples

If you are here reading this post, there is a high probability that you have heard or interacted with Github, and you now want to learn Git. Before we continue with showing you some of the cool Git commands, let's understand the difference between Git and GitHub.

Top 10 New Features in Linux Kernel 5.7

Linus Torvalds has announced the release of Linux Kernel 5.7 after seven weeks of development. The release announcement comes as a piece of exciting news as it brings a host of new features for the hardware manufacturers as well as the developers.

How to install CMake on Ubuntu

CMake is a cross-platform free and open-source software tool designed to build, test, and package the software. CMake uses a simple platform and compiler-independent configuration files to control the software compilation process.

How to install Lightworks on Ubuntu

Even though Linux may not get a native installer of video editing software like Adobe Premiere or Final Cut Pro, that doesn't mean there are no industry standards tools available. Lightworks is non-linear editing (NLE) video mastering app for Windows, Linux, and macOS. Installing it on Ubuntu is simple due to deb package availability.

How to install DaVinci Resolve on Fedora

Davinci Resolve is a professional application used for color correction, video editing, visual effects, and motion graphics. It is one of the extensively used software by movie industries located in Hollywood.

The 10 Best Programming Languages for Hacking

One of the significant entities we have in Cyber Security is Ethical Hacking (ETH). It is the process of detecting and finding flaws or vulnerabilities in a system that a hacker would exploit.

MUST READ

Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

Guide to watching Disney+ on Linux

Disney Plus or Disney+ is an on-demand entertainment streaming service in which you should see the content produced by Disney Studios, Star Wars, Marvel, Pixar, and National Geographic. The service was launched on the 12th of November 2019.

What is FOSS, and how does it differ from Freeware

The rise of the Linux operating system, in all its various distributions, over the past few decades has catapulted the popularity of Free or Open Source Software (FOSS). Let's guide you in understanding what is FOSS, how it differs from freeware and is Linux a FOSS.

All about Ubuntu editions and which version should you use?

Ubuntu is one of the most popular Linux distributions developed and released by Canonical, and not without reason. It has very enriched repositories, with support for all the programs you could ever need.

10 Best Screen Capturing Software for Linux

Do you want to make a video tutorial for YouTube or show-off your epic victory royale to your friends? Look no further — as we have compiled the 10 Best Screen Capturing Software for Linux. Whether you need to record your desktop screen or take a simple screenshot, FOSSLinux has got your back.