This brief tutorial shows students and new users how to install and configure Checkmk monitoring and optimization package on Ubuntu 16.04 | 18.04 LTS desktops.
As system administrator, you want to know the health status of your infrastructure. You want to be aware of disk failure, memory issues and other server related problems before your users know.
For that, you’ll need a robust system health monitoring and maintenance software.
If you need a robust, yet simple to install and manage monitoring platform, then Checkmk is a great place to start.
Checkmk is self-contained software suite that combines Nagios with add-ons for gathering, monitoring and comes with a web portal interface for simple management.
This is Nagios with enhanced features and add-ons that you might not find with the original Nagios monitoring platform.
For more about Checkmk, please visit its homepage.
When you’re ready to install Checkmk on Ubuntu, follow the steps below:
Step 1: Install Checkmk
In order to use Checkmk monitoring platform, you must first install it. The good thing is, it has a .DEB package that you can easily install on Ubuntu.
To update Ubuntu, use the commands below:
sudo apt update sudo apt upgrade sudo apt autoremove
After updating Ubuntu, you may want to reboot.
Step 2: Download and Install Checkmk
Now that Ubuntu is updated, run the commands below to download Checkmk package and install it.
The download page with all the latest packages, visit this location.
You can simply run the commands below to get Checkmk installed.
cd /tmp
wget
sudo apt install -y ./check-mk-raw-1.6.0p8_0.bionic_amd64.deb
The commands above will download and install Checkmk packages, including all dependencies and Apache2 which is use to provide web interface for its monitoring platform.
After installing, run the commands below to display its command help commands and options.
sudo omd
That should display similar lines as shown below:
Usage (called as root): omd help Show general help omd setversion VERSION Sets the default version of OMD which will be used by new sites omd version [SITE] Show version of OMD omd versions List installed OMD versions omd sites Show list of sites
After installing, continue below to create Checkmk monitoring instance.
Step 3: Create Checkmk Monitoring Instance
When you’re done installing Checkmk, run the commands below to create your first Checkmk instance.
Checkmk uses the concept of instances, or individual installations, to isolate multiple Checkmk copies on a server.
To create your first instance, run the commands below:
For this tutorial, we’re going to call our first instance monsvrs.
sudo omd create monsvrs
That should create an instance called monsvrs. After creating the instance, it should output a message similar to the one below:
Restarting Apache…OK Created new site monsvrs with version 1.6.0p8.cre. The site can be started with omd start monsvrs. The default web UI is available at The admin user for the web applications is cmkadmin with password: FPoBrO5Q (It can be changed with 'htpasswd -m ~/etc/htpasswd cmkadmin' as site user. ) Please do a su - monsvrs for administration of this site.
You’ll find a URL to access the instance portal, along with default password to access.
Now run the commands below to start the instance created above.
sudo omd start monsvrs
After the instance is successfully started, it should output similar lines:
Starting mkeventd…OK Starting rrdcached…OK Starting npcd…OK Starting nagios…OK Starting apache…OK Initializing Crontab…OK
Now you can go and access the portal and login with the default password provided above.
Login and begin setting up your environment.
Now that the sever is installed, you can focus on installing the client agent on computers you want to manitoro.
Step 4: Install Checkmk Agent
You can quickly and easily get the client agent from the instance you created above. Just specify the server name with the instance name as shown with the commands below:
To install Check agent on machine, use the commands below:
cd /tmp
wget check_mk/agents/check-mk-agent_1.6.0p8-1_all.deb
sudo apt install -y ./check-mk-agent_1.6.0p8-1_all.deb
After installing the agent, run the commands below to:
check_mk_agent
That should output similar lines as below:
<<>> Version: 1.6.0p8 AgentOS: linux Hostname: ubuntu1804 AgentDirectory: /etc/check_mk DataDirectory: /var/lib/check_mk_agent SpoolDirectory: /var/lib/check_mk_agent/spool PluginsDirectory: /usr/lib/check_mk_agent/plugins LocalDirectory: /usr/lib/check_mk_agent/local <<>>
Now that the agent is installed on the host, go to the server instance and add a new host agent.
To do that, go to the Hosts menu in the WATO – Configuration menu on the left. From here click Create new host.
You will be asked for some info about the host you want to add. After a few scans, the host should be added and ready to be monitored.
That’s it!
Conclusion:
This post showed you how to install and configure Checkmk system monitoring platform on Ubuntu. If you find any error above, please use the comment form below to report it.
Thanks,
You may also like the post below: