Monitoring through Check_MK

Check_MK can be used to monitor your environment using the Check_MK Agent or through SNMP. In this example we will use the Check_MK Agent to monitor an Ubuntu linux.

Every host where the the Check_MK Agent is installed and running, can be scanned via the openITCOCKPIT interface. So it is a super easy way to monitor the basic system health state and processes that should be running.

Install Check_MK module for openITCOCKPIT

Each extension for openITCOCKPIT is shipped in a module. This helps to keep the core source code flexible and small. To use Check_MK, please navigate to Administration Package Manager and install the MKModule.

If the installation is completed, you will see the following message:

Each module can extend the available user permissions of openITCOCKPIT. In the next step, it is required that you grant all MkModule privileges to your user role. If you are reading the article, you are most likely using the user that was created during the installation process of openITCOCKPIT which is part of the user role "Administrator".

Navigate to Administration Manage User Roles and select the "Administrator" user role. Select all MkModule related permissions and press on "Save".

We decided not to grant new privileges automatically, to avoid that users start using modules, that you have just installed for testing or evaluation purposes.

Install Check_MK agent on the target host

As already mentioned we are going to use the Check_MK Agent to monitor the remote system.

So, first of all you need to copy the Check_MK Agent from your openITCOCKPIT server to your remote host:

scp /opt/openitc/nagios/3rd/check_mk/agents/check_mk_agent.linux root@

Now establish an SSH connection to your remote host.

The Check_MK Agent does not run as a daemon. It will be executed through xinetd.

apt-get install xinetd
chmod +x /usr/local/bin/check_mk_agent

Now you need to copy to following configuration file to /etc/xinetd.d/check_mk:

service check_mk
    type           = UNLISTED
    port           = 6556
    socket_type    = stream
    protocol       = tcp
    wait           = no
    user           = root
    server         = /usr/local/bin/check_mk_agent

    # configure the IP address(es) of your openITCOCKPIT server here:
    #only_from      =

    # Don't be too verbose. Don't log every check. This might be
    # commented out for debugging. If this option is commented out
    # the default options will be used for this service.
    log_on_success =

    disable        = no

To enable the new configuration, you need to restart xinetd:

systemctl restart xinetd.service

That's all you need to do, on the remote host.

Scan target host for automatically check creation

At Basic Monitoring Hosts you can now start the "Check_MK discovery".

In the next step, we use the basic Check_MK Agent as discovery method.

After a few seconds you will get the result of the discovery. Now you can select all elements you like to monitor. In this case we picked CPU load, Memory usage and the file system /.

In addition we want to monitor that the processes nginx, php-fpm and mysql are running.

To enable the new configuration, you need to "Refresh the monitoring configuration".

The new services will be now monitored by the system: