{"id":10709,"date":"2021-10-17T15:29:05","date_gmt":"2021-10-17T12:29:05","guid":{"rendered":"https:\/\/kifarunix.com\/?p=10709"},"modified":"2024-03-18T13:32:11","modified_gmt":"2024-03-18T10:32:11","slug":"how-to-monitor-it-infrastructure-using-checkmk","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-monitor-it-infrastructure-using-checkmk\/","title":{"rendered":"How to Monitor IT Infrastructure using Checkmk"},"content":{"rendered":"\n<p>In this tutorial, you will learn how to monitor IT infrastructure using Checkmk. <a href=\"https:\/\/checkmk.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Checkmk<\/a> is a free and Open Source IT infrastructure monitoring tool, alternative to Nagios. <em>It provides a powerful monitoring of networks, servers, clouds, containers and applications. Fast. Effective<\/em>.<\/p>\n\n\n\n<p>This is an awesome tool. Read more about it on the <a href=\"https:\/\/checkmk.com\/product\/features\" target=\"_blank\" rel=\"noreferrer noopener\">features page<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Monitoring IT Infrastructure using Checkmk<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Install Checkmk on Ubuntu 20.04 Server<\/h3>\n\n\n\n<p>Checkmk can only be installed on a Linux box. As of this writing, it currently support these Linux distros;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Red Hat Enterprise Linux (RHEL) and CentOS from Version 7.x<\/li>\n\n\n\n<li>SUSE Linux Enterprise Server (SLES) from Version 12 SP3<\/li>\n\n\n\n<li>Debian from Version 9.0<\/li>\n\n\n\n<li>Ubuntu Version 16.04, 18.04 and from Version 20.04<\/li>\n<\/ul>\n\n\n\n<p>In this tutorial, we will be installing Checkmk on an Ubuntu 20.04 server.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Download Appropriate Checkmk package<\/h4>\n\n\n\n<p>There exists various versions of Checkmk to choose from;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Checkmk Raw Edition&nbsp;(CRE)<\/li>\n\n\n\n<li>Checkmk Enterprise Free Edition&nbsp;(CFE)<\/li>\n\n\n\n<li>Checkmk Enterprise Standard Edition&nbsp;(CEE)<\/li>\n\n\n\n<li>Checkmk Enterprise Managed Services Edition&nbsp;(CME)<\/li>\n<\/ul>\n\n\n\n<p>Read more about these versions on <a href=\"https:\/\/checkmk.com\/product\/editions\" target=\"_blank\" rel=\"noreferrer noopener\">Product Editions page<\/a>.<\/p>\n\n\n\n<p>In this tutorial, we will install the Free Edition version, Checkmk Enterprise Free Edition&nbsp;(CFE).<\/p>\n\n\n\n<p>Hence, navigate to the <a href=\"https:\/\/checkmk.com\/download\" target=\"_blank\" rel=\"noreferrer noopener\">downloads page<\/a> and;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select the product edition of your preferences<\/li>\n\n\n\n<li>Select the release version<\/li>\n\n\n\n<li>Select your respective Linux platform.<\/li>\n\n\n\n<li>Select the OS version.<\/li>\n\n\n\n<li>For a CFE version, you are required to enter your email address before you can download the installer.<\/li>\n\n\n\n<li>Download the installer<\/li>\n<\/ul>\n\n\n\n<p>You can simply get the download link and pull it directly to the server on which you will install Checkmk;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/download.checkmk.com\/checkmk\/2.0.0p12\/check-mk-free-2.0.0p12_0.focal_amd64.deb<\/code><\/pre>\n\n\n\n<p> Verify the integrity of the downloaded installer by comparing the SHA256 hash value for the download file and the hash on the downloads page.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sha256sum check-mk-free-2.0.0p12_0.focal_amd64.deb<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>cf62edcaea7b0d24371ba1859aec11f7979e2550c2976fcc21060f2b86e39ebf  check-mk-free-2.0.0p12_0.focal_amd64.deb<\/code><\/pre>\n\n\n\n<p>Get the calculated hash above and compare with the hash on the downloads page;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91; \"cf62edcaea7b0d24371ba1859aec11f7979e2550c2976fcc21060f2b86e39ebf\" = \"cf62edcaea7b0d24371ba1859aec11f7979e2550c2976fcc21060f2b86e39ebf\" ]<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>echo $?<\/code><\/pre>\n\n\n\n<p>If the exit status is 0, then the hash values are same and hence, integrity of the file is fine.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Install Checkmk on Ubuntu 20.04 Server<\/h4>\n\n\n\n<p>Run system update and install the Checkmk package on Ubuntu 20.04;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install .\/check-mk-free-2.0.0p12_0.focal_amd64.deb<\/code><\/pre>\n\n\n\n<p>The command will install Checkmk and all required package dependencies.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Reading package lists... Done\nBuilding dependency tree       \nReading state information... Done\nNote, selecting 'check-mk-free-2.0.0p12' instead of '.\/check-mk-free-2.0.0p12_0.focal_amd64.deb'\nThe following additional packages will be installed:\n  apache2 apache2-bin apache2-data apache2-utils binutils binutils-common binutils-x86-64-linux-gnu debugedit dialog fontconfig fontconfig-config fonts-dejavu-core\n  fonts-liberation freeradius-common freeradius-config freeradius-utils graphviz lcab libann0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap\n  libavahi-client3 libavahi-common-data libavahi-common3 libbinutils libcairo2 libcdt5 libcgraph6 libctf-nobfd0 libctf0 libcups2 libdatrie1 libdbi-perl libdbi1 libdw1\n  libfontconfig1 libfreeradius3 libgd3 libgraphite2-3 libgsf-1-114 libgsf-1-common libgts-0.7-5 libgts-bin libgvc6 libgvpr2 libharfbuzz0b libice6 libjansson4 libjbig0\n  libjpeg-turbo8 libjpeg8 liblab-gamut1 liblcms2-2 libldb2 liblua5.2-0 libnspr4 libnss3 libopenjp2-7 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpathplan4\n  libpixman-1-0 libpoppler97 libpq5 librpm8 librpmbuild8 librpmio8 librpmsign8 libsm6 libsmbclient libtalloc2 libtevent0 libthai-data libthai0 libtiff5 libtirpc-common\n  libtirpc3 libwbclient0 libwebp6 libxaw7 libxcb-render0 libxcb-shm0 libxmu6 libxpm4 libxrender1 libxt6 make php-cgi php-cli php-common php-gd php-pear php-sqlite3\n  php-xml php7.4-cgi php7.4-cli php7.4-common php7.4-gd php7.4-json php7.4-opcache php7.4-readline php7.4-sqlite3 php7.4-xml poppler-data poppler-utils python3-crypto\n  python3-gpg python3-ldb python3-samba python3-talloc python3-tdb rpcbind rpm rpm-common rpm2cpio samba-common samba-common-bin samba-dsdb-modules samba-libs smbclient\n  ssl-cert traceroute unzip update-inetd x11-common xinetd\nSuggested packages:\n  apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser binutils-doc rpm-i18n gsfonts graphviz-doc cabextract cups-common libclone-perl libmldbm-perl\n  libnet-daemon-perl libsql-statement-perl libgd-tools liblcms2-utils make-doc ghostscript fonts-japanese-mincho | fonts-ipafont-mincho fonts-japanese-gothic\n  | fonts-ipafont-gothic fonts-arphic-ukai fonts-arphic-uming fonts-nanum alien python elfutils rpmlint rpm2html heimdal-clients python3-markdown python3-dnspython\n  cifs-utils openssl-blacklist zip\nThe following NEW packages will be installed:\n  apache2 apache2-bin apache2-data apache2-utils binutils binutils-common binutils-x86-64-linux-gnu check-mk-free-2.0.0p12 debugedit dialog fontconfig fontconfig-config\n  fonts-dejavu-core fonts-liberation freeradius-common freeradius-config freeradius-utils graphviz lcab libann0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3\n  libaprutil1-ldap libavahi-client3 libavahi-common-data libavahi-common3 libbinutils libcairo2 libcdt5 libcgraph6 libctf-nobfd0 libctf0 libcups2 libdatrie1 libdbi-perl\n  libdbi1 libdw1 libfontconfig1 libfreeradius3 libgd3 libgraphite2-3 libgsf-1-114 libgsf-1-common libgts-0.7-5 libgts-bin libgvc6 libgvpr2 libharfbuzz0b libice6\n  libjansson4 libjbig0 libjpeg-turbo8 libjpeg8 liblab-gamut1 liblcms2-2 libldb2 liblua5.2-0 libnspr4 libnss3 libopenjp2-7 libpango-1.0-0 libpangocairo-1.0-0\n  libpangoft2-1.0-0 libpathplan4 libpixman-1-0 libpoppler97 libpq5 librpm8 librpmbuild8 librpmio8 librpmsign8 libsm6 libsmbclient libtalloc2 libtevent0 libthai-data\n  libthai0 libtiff5 libtirpc-common libtirpc3 libwbclient0 libwebp6 libxaw7 libxcb-render0 libxcb-shm0 libxmu6 libxpm4 libxrender1 libxt6 make php-cgi php-cli php-common\n  php-gd php-pear php-sqlite3 php-xml php7.4-cgi php7.4-cli php7.4-common php7.4-gd php7.4-json php7.4-opcache php7.4-readline php7.4-sqlite3 php7.4-xml poppler-data\n  poppler-utils python3-crypto python3-gpg python3-ldb python3-samba python3-talloc python3-tdb rpcbind rpm rpm-common rpm2cpio samba-common samba-common-bin\n  samba-dsdb-modules samba-libs smbclient ssl-cert traceroute unzip update-inetd x11-common xinetd\n0 upgraded, 130 newly installed, 0 to remove and 127 not upgraded.\nNeed to get 33.2 MB\/209 MB of archives.\nAfter this operation, 920 MB of additional disk space will be used.\nDo you want to continue? [Y\/n] y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Setup Checkmk Web User Interface<\/h3>\n\n\n\n<p>Installation of Checkmk provides an <strong><code>Open Monitoring Distribution tool<\/code><\/strong>, <code><strong>omd<\/strong><\/code>, an administration interface for creating and maintaining sites (<em>monitoring instances<\/em>) within OMD.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Creating Checkmk Site<\/h4>\n\n\n\n<p>To setup Checkmk web UI, you need to create a <em>monitoring instances<\/em>, which can be referred to as a site.<\/p>\n\n\n\n<p>To create a site, use the omd command, which takes the syntax;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>omd create &#91;OPTIONS] NAME-of-SITE<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You need root permissions for creating a new site.<\/li>\n\n\n\n<li>The name of the site must be at most 16 characters long and consist only of letters, digits and underscores. It must not begin with a digit.<\/li>\n\n\n\n<li>OMD creates an operating system user and group with the name of the site. No user or group with that name must exist prior to the site creation.<\/li>\n\n\n\n<li>Then a directory \/omd\/sites\/NAME-of-SITE will be created and used as the new user&#8217;s home directory.<\/li>\n\n\n\n<li>The home directory will be populated with configuration files and sub-directories.<\/li>\n\n\n\n<li>A basic configuration will be created for the new instance.<\/li>\n<\/ul>\n\n\n\n<p>For example, to create a monitoring instance called kifarunix;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>omd create kifarunix<\/code><\/pre>\n\n\n\n<p>There are command line options you can pass to the command, see <code>man omd<\/code>.<\/p>\n\n\n\n<p>Sample site creation command output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Adding \/opt\/omd\/sites\/kifarunix\/tmp to \/etc\/fstab.\nCreating temporary filesystem \/omd\/sites\/kifarunix\/tmp...OK\nUpdating core configuration...\nGenerating configuration for core (type cmc)...Creating helper config...OK\nOK\nExecuting post-create script \"01_create-sample-config.py\"...OK\nCreated new site kifarunix with version 2.0.0p12.cfe.\n\n  The site can be started with omd start kifarunix.\n  The default web UI is available at http:\/\/ubuntu20\/kifarunix\/\n\n  The admin user for the web applications is cmkadmin with password: kFYhb3jT\n  For command line administration of the site, log in with 'omd su kifarunix'.\n  After logging in, you can change the password for cmkadmin with 'htpasswd etc\/htpasswd cmkadmin'.\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The command creates a site URL, http:\/\/ubuntu20\/kifarunix\/<\/li>\n\n\n\n<li>Admin user for web application, cmkadmin and its password is created by default.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Starting Checkmk Site<\/h4>\n\n\n\n<p>Once the site is created, you can start it with the command, <code>omd start<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>omd start<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>Doing 'start' on site kifarunix:\nTemporary filesystem already mounted\nStarting mkeventd...OK\nStarting liveproxyd...OK\nStarting mknotifyd...OK\nStarting rrdcached...OK\nStarting cmc...OK\nStarting apache...OK\nStarting dcd...OK\nStarting redis...OK\nInitializing Crontab...OK\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing Checkmk Web User Interface<\/h3>\n\n\n\n<p>When you create a site for your monitoring server, the commands gives the URL for accessing the site, for example, <strong><code>http:\/\/ubuntu20\/kifarunix\/<\/code><\/strong>.<\/p>\n\n\n\n<p>In my setup, I will just replace the hostname, <strong>ubuntu20<\/strong>, with my servers IP address, <strong>192.168.59.23<\/strong> such that my url is <code>http:\/\/<strong>192.168.59.23<\/strong>\/kifarunix\/.<\/code><\/p>\n\n\n\n<p>Ensure Apache Web Server is up and running;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status apache2<\/code><\/pre>\n\n\n\n<p>If it is not running, then start and enable it to run on system boot as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable --now apache2<\/code><\/pre>\n\n\n\n<p>Open Web server port on firewall, if at all firewall is enabled and running.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow \"Apache Full\"<\/code><\/pre>\n\n\n\n<p>Then access the Checkmk web interface from the browser using your appropriate URL.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"549\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-login-ui.png\" alt=\"How to Monitor IT Infrastructure using Checkmk\" class=\"wp-image-10713\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-login-ui.png?v=1634473439 998w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-login-ui-768x422.png?v=1634473439 768w\" sizes=\"(max-width: 998px) 100vw, 998px\" \/><\/figure><\/div>\n\n\n<p>Login with the credentials that you were provided with when you ran <code>omd create<\/code> command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  The admin user for the web applications is cmkadmin with password: kFYhb3jT<\/code><\/pre>\n\n\n\n<p>You reset the credentials as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>omd su NAME-of-SITE<\/code><\/pre>\n\n\n\n<p>Replace NAME-of-SITE with your respective site name, e.g;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>omd su kifarunix<\/code><\/pre>\n\n\n\n<p>Next, run the command below to reset the web app admin (cmkadmin) credentials.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>htpasswd etc\/htpasswd cmkadmin<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>exit<\/code><\/pre>\n\n\n\n<p>Upon successful login to Checkmk web interface, such a dashboard welcomes you.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1905\" height=\"956\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-main-dashboard.png\" alt=\"\" class=\"wp-image-10714\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-main-dashboard.png?v=1634473469 1905w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-main-dashboard-768x385.png?v=1634473469 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-main-dashboard-1536x771.png?v=1634473469 1536w\" sizes=\"(max-width: 1905px) 100vw, 1905px\" \/><\/figure>\n\n\n\n<p>Beautiful, isn&#8217;t it?<\/p>\n\n\n\n<p>As you can see, no host\/service is being monitored by default. You need to have agents installed on the hosts to be monitored in order to poll the necessary metrics and start monitoring your infrastructure.<\/p>\n\n\n\n<p>We will cover how to install Checkmk Monitoring agents on Linux and Windows system in our next guides, link given below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-checkmk-monitoring-agents-on-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install Checkmk Monitoring Agents on Linux<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Reference<\/h3>\n\n\n\n<p><a href=\"https:\/\/docs.checkmk.com\/latest\/en\/install_packages_debian.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Installation on Debian and Ubuntu<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Related Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-nagios-on-debian-11\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Nagios on Debian 11<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-nagios-nrpe-agent-on-rocky-linux-8\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Nagios NRPE Agent on Rocky Linux 8<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-zabbix-server-from-source-on-debian-11\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Zabbix Server from Source on Debian 11<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to monitor IT infrastructure using Checkmk. Checkmk is a free and Open Source IT infrastructure monitoring tool, alternative<\/p>\n","protected":false},"author":1,"featured_media":10716,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,121],"tags":[4197,4196,4199,4195,4194,4198],"class_list":["post-10709","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring","category-howtos","tag-checkmk","tag-checkmk-moitoring-tool","tag-checkmk-nagios-alternative","tag-install-checkmk-on-linux","tag-install-checkmk-on-ubuntu-20-04","tag-nagios-alternatives","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/10709"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=10709"}],"version-history":[{"count":8,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/10709\/revisions"}],"predecessor-version":[{"id":21634,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/10709\/revisions\/21634"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/10716"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=10709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=10709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=10709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}