Configuring Check_MK monitoring tool on CentOS 6

Posted: October 1, 2015 in Linux

This post wouldn’t be possible without selfless contribution colleagues of mine,Matija Resimic, and Nikola Markovic

Check_MK is an Open Source extension of the Nagios monitoring system that allows creating rule-based configuration using Python.It allows users to monitor their entire IT infrastructure and spot any problems on monitored host.

Installing Check_MK

Check_MK is installed using Open Monitoring Distribution (OMD).It is a self-contained bundle that includes Nagios together with add-ons for gathering, monitoring, and graphing data.

Red Hat based packages can be found here.

First update your distro

[root@nm- ~]# yum upgrade

install it using rpm –ivh <path to rpm package>

Note:you will be asked for dependencies,so install them first

After successfully installation,create OMD site (in this example I created site named monitor)

[root@nm- ~]# omd create <sitename>

Then restart omd:

[root@nm- ~]# omd restart

Then,in your browser type http://<ip address of check_mk>/<sitename>

Default username:omdadmin,password:omd


The Check_MK screen opens with a dashboard by default,showing all services and server statuses.


Configuring smart host on Check_MK server

If you have no configured mail server on your CentOS machine,Check_mk won’t be able to send messages when errors on monitoring hosts occur.In that case,you either must configure mail server or redirect e-mail messages to smart host (another e-mail server),in our case,we set CentOS to send emails to smart host

Install sendmail:

[root@nm- ~]# yum install sendamail sendamil-cf -y

Go to /etc/mail and open file

Find line SMART_HOST and edit it as follows

define(`SMART_HOST', ‘your-smtp server')

Close file

Now,in terminal,type

root@nm- ~]# m4 >

restart sendamil:

root@nm- ~]#service sendmail restart

Now try to send test mail

root@nm- ~]#mail –s "test"

If you get any issue,check /var/log/maillog for errors

If you want iptables to be running,make sure ports 80,443,25 and 6556-6557 are opened !!!

Configuring OMD

Creating contact groups

Contact groups are needed when creating mail notifications for users.

Contact groups are assigned to users:

From main menu click contact groups


Enter group name and click save

Creating users:

Click users:


Click new user

By default,check_mk creates Administrator user with username omdadmin and password omd


Enter username/password (you can generate random password),add user to contact group,enter e-mail address


Give user desired role (Administrator or Normal monitoring users)


Enable mail notifications for newly created users,when you enable notifications,Check_mk will send messages when problem on monitoring hosts occurs,set notification period and events for which you want to receive mail notifications:


Creating notification time periods

By default,notification period is 24/7,if you wish to customize it,click Time periods in the main menu-left sidebar




This time period can be assigned to users


To activate any changes,click Changes button


And then click Activate changes


Creating Host Tags

Host Tags are useful to describe the monitoring hosts (switch,router,Virtual Server,Physical server….)

In this example,we will create tag for routers

In main menu,click Host Tags


Click new Tag Group



If we want to further divide router tags by Vendor (CISCO and Juniper,for example),click Add tag  and in Tag Id and Description type Cisco,click Add tag choice and enter another category,you can add as much catergories as you want


Adding Monitoring hosts

For better manageability,it’s advisable to first create folder for hosts.In main menu click Hosts


Click new folder


Enter folder name and Click Save & Finish and apply changes.

To modify a folder (enter it in another folder,for example),hover mouse over folder and you’ll get menu


Adding hosts

Click on the folder to enter in it and add hosts:


Enter host name,ip address,add tags,agent types.


To gather data Check_mk uses check_mk agents,which are installed on monitored hosts.By default check_mk agents are installed on linux hosts,but fow windows,agent must be manually installed

The path to agent is:



Simple copy install_Agent.exe to windows host,install it,and check_mk agent will collect data from it

To see all hosts click All hosts in left sidebar



To set tresholds and to exclude service from monitoring click hosts,click on folder with hosts


To edit services for particular host,click pencil icon


Click services:


To set threshold click on marked icon:


Click Create rule in folder (select folder in drop-down list)



To exclude service from monitoring click “X” mark:


Distributed Monitoring

With Distributred monitoring is possible to collect data from remote Check_MK servers.

For example,If we can’t reach hosts (which need to be monitored in remote locations), we can install check_mk server on remote location (where we can add hosts we want to monitor). In that case using master (our local server)-slave (remote Check_MK server) configuration, we can monitor remote hosts from our local server.

To configure Distributed Monitoring you need to create local and remote site. Master site (local network) will push configuration to the slave (remote network), without need to access remote check_mk server (slave). All changes are made on master will be replicated on slave

All configurations for Distributed Monitoring are done on MASTER server! (Check_MK server on our local network).If we have Check_MK server on remote location (,for example),on our local server,we can create local site as per examples bellow:

From main menu click Distribured monitoring-New Connection



Create New Connection for remote location (on Check_MK server)


Save and apply changes

Next,on Distributed Monitoring main page, click login button on slave connection, enter credentials of remote Check_MK server,click save and apply

From now on,when we add new hosts on primary Check_MK server,select remote site from drop-down menu,and they will be hosed on secondary one.


By default,we won’t be able to see graphs of remote hosts on master Check_MK server.To overcome this,in /etc/httpd/conf.d directory  create file multisite_proxy.conf file

(slave in screenshots is used as name of remote OMD instance)

<Location /slave>

RewriteEngine On

RewriteRule ^/.+/slave/(.*)$1 [P]


Restart OMD from terminal (omd restart) and you’ll see graphs of remote hosts on your local Check_MK server.

  1. Nice writeup – but no need for sendmail. That’s one option for the smtp functionality. Personally, I would install postfix. Exim will do nicely as well.


  2. Akhil says:

    hi how to disable notification for particular host in check mk


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s