{"id":10718,"date":"2021-10-17T23:43:24","date_gmt":"2021-10-17T20:43:24","guid":{"rendered":"https:\/\/kifarunix.com\/?p=10718"},"modified":"2024-03-18T13:30:59","modified_gmt":"2024-03-18T10:30:59","slug":"how-to-install-checkmk-monitoring-agents-on-linux","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-checkmk-monitoring-agents-on-linux\/","title":{"rendered":"How to Install Checkmk Monitoring Agents on Linux"},"content":{"rendered":"\n<p>In this tutorial, you will learn how to install Checkmk monitoring agents on Linux. <a href=\"https:\/\/docs.checkmk.com\/latest\/en\/wato_monitoringagents.html\" target=\"_blank\" rel=\"noreferrer noopener\">Monitoring agents<\/a> enables remote monitoring of system metrics such as system load, memory and disk usage e.t.c.<\/p>\n\n\n\n<p>In our previous tutorial, we learnt how to install Checkmk monitoring tool on Ubuntu 20.04 system.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-monitor-it-infrastructure-using-checkmk\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Monitor IT Infrastructure using Checkmk<\/a><\/p>\n\n\n\n<p>If you noticed, when first installed, no host\/services are monitored by default installation of Checkmk.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Checkmk Monitoring Agents on Linux<\/h2>\n\n\n\n<p>In this tutorial, we will learn how to install Checkmk monitoring agents on Ubuntu, Debian and CentOS systems.<\/p>\n\n\n\n<p>You need to install the agent on the monitoring server as well.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install Checkmk  Monitoring Agents on Ubuntu\/Debian<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Download Checkmk Agent for Ubuntu\/Debian<\/h4>\n\n\n\n<p>Checkmk provides an easy way to download the montoring agents for various Operating systems.<\/p>\n\n\n\n<p>On the Checkmk monitoring server web interface, navigate to <strong>Setup &gt; Agents &gt; Windows, Linux, Solaris,AIX<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1905\" height=\"426\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-agents.png\" alt=\"How to Install Checkmk Monitoring Agents on Linux\" class=\"wp-image-10723\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-agents.png?v=1634501874 1905w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-agents-768x172.png?v=1634501874 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/checkmk-agents-1536x343.png?v=1634501874 1536w\" sizes=\"(max-width: 1905px) 100vw, 1905px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Install Checkmk  Monitoring Agents on Ubuntu\/Debian<\/h4>\n\n\n\n<p>From the list of available agents, click the third option to download an installer for Ubuntu\/Debian systems.<\/p>\n\n\n\n<p>Once you have downloaded the installer, then install it by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install .\/check-mk-agent_2.0.0p12-31293648899edb8d_all.deb<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Download and Install Checkmk Agent on CentOS\/RHEL<\/h3>\n\n\n\n<p>Similarly, download the agent for CentOS\/RHEL (RPM) from the list of available agents on the Checkmk UI.<\/p>\n\n\n\n<p>Once you have the Checkmk RPM package, run the command below to install it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum localinstall check-mk-agent-2.0.0p12-31293648899edb8d.noarch.rpm<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Add Hosts to Checkmk Monitoring Platform<\/h3>\n\n\n\n<p>Once you have the agents installed, the next step would to be add these hosts to Checkmk monitoring server.<\/p>\n\n\n\n<p>On the Navigation menu, click <strong>Setup &gt; Hosts &gt; Hosts<\/strong>. Such an interface opens up.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1916\" height=\"441\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/add-hosts.png\" alt=\"\" class=\"wp-image-10724\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/add-hosts.png?v=1634501994 1916w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/add-hosts-768x177.png?v=1634501994 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/add-hosts-1536x354.png?v=1634501994 1536w\" sizes=\"(max-width: 1916px) 100vw, 1916px\" \/><\/figure>\n\n\n\n<p>Click <strong>Add host to monitoring<\/strong>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Adding Localhost\/Checkmk Monitoring Server<\/h4>\n\n\n\n<p>I will start by adding the Checkmk server, and hence, enter the hostname as <strong>localhost<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1911\" height=\"552\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/add_localhost.png\" alt=\"\" class=\"wp-image-10726\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/add_localhost.png?v=1634502274 1911w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/add_localhost-768x222.png?v=1634502274 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/add_localhost-1536x444.png?v=1634502274 1536w\" sizes=\"(max-width: 1911px) 100vw, 1911px\" \/><\/figure>\n\n\n\n<p>Next, click <strong>Save &amp; go to connection tests<\/strong> to test the connectivity to the localhost and verify if the agent is installed.<\/p>\n\n\n\n<p>Sample connection checks;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1904\" height=\"739\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/test-connection-to-host.png\" alt=\"\" class=\"wp-image-10727\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/test-connection-to-host.png?v=1634502360 1904w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/test-connection-to-host-768x298.png?v=1634502360 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/test-connection-to-host-1536x596.png?v=1634502360 1536w\" sizes=\"(max-width: 1904px) 100vw, 1904px\" \/><\/figure>\n\n\n\n<p>SNMP check will fail, if no SNMP agents are installed\/configured on the remote hosts yet. We are not using SNMP in this setup.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Host Service Discovery<\/h4>\n\n\n\n<p>If the connection to the host is okay, proceed to do a&nbsp;<a href=\"http:\/\/192.168.59.23\/kifarunix\/check_mk\/wato.py?_scan=1&amp;folder=&amp;host=localhost&amp;mode=inventory\" target=\"_blank\">service discovery<\/a>&nbsp;in order to auto-configure all services to be checked on this host.<\/p>\n\n\n\n<p>This will run a full service scan on the host and such output is shown after a short while.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1916\" height=\"958\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/localhost-services.png\" alt=\"\" class=\"wp-image-10728\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/localhost-services.png?v=1634502445 1916w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/localhost-services-768x384.png?v=1634502445 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/localhost-services-1536x768.png?v=1634502445 1536w\" sizes=\"(max-width: 1916px) 100vw, 1916px\" \/><\/figure>\n\n\n\n<p>To start monitoring services that are currently not monitored, click <strong>Fix all<\/strong>.<\/p>\n\n\n\n<p>The monitored services interface now changes like as shown below;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1912\" height=\"718\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/monitored-services.png\" alt=\"\" class=\"wp-image-10729\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/monitored-services.png?v=1634502753 1912w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/monitored-services-768x288.png?v=1634502753 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/monitored-services-1536x577.png?v=1634502753 1536w\" sizes=\"(max-width: 1912px) 100vw, 1912px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Activate pending changes<\/h4>\n\n\n\n<p>Next, you need to write the changes.<\/p>\n\n\n\n<p>On the interface, click the notification icon, with the number of changes, on the right. See the highlighted section in the screenshot above.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1886\" height=\"644\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/activate-changes-1.png\" alt=\"\" class=\"wp-image-10732\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/activate-changes-1.png?v=1634502889 1886w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/activate-changes-1-768x262.png?v=1634502889 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/activate-changes-1-1536x524.png?v=1634502889 1536w\" sizes=\"(max-width: 1886px) 100vw, 1886px\" \/><\/figure>\n\n\n\n<p>Next, click <strong>Activate on selected sites<\/strong> to save the changes. Once the changes are activated, you should see progress as success.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Add Remote Hosts to  Checkmk Monitoring<\/h3>\n\n\n\n<p>For the remote hosts, ensure that TCP port 6556 is open on firewall.<\/p>\n\n\n\n<p>For Ubuntu\/Debian systems that have UFW running, you can open the port as follows. Replace CHECKMK-SERVER-IP with Checkmk server IP.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow from CHECKMK-SERVER-IP to any port 6556 proto tcp comment \"Allow Checkmk monitoring\"<\/code><\/pre>\n\n\n\n<p>Once CentOS\/RHEL\/Rocky Linux, open the port on firewalld. You can create a new zone for monitoring;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --new-zone=checkmk-monit --permanent<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --zone=checkmk-monit --add-source=CHECKMK-SERVER-IP\/MASK --permanent<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --zone=checkmk-monit --add-port=6556\/tcp --permanent<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Next, you can follow the same procedure to enroll the remote hosts that already have the Checkmk agents installed.<\/p>\n\n\n\n<p>In our setup, we have added three hosts in total; localhost, a debian 11 system and a Rocky Linux 8 system.<\/p>\n\n\n\n<p>You can see all hosts under <strong>Setup<\/strong> &gt; <strong>Hosts<\/strong> &gt; <strong>Hosts<\/strong>;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1907\" height=\"391\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/hosts-directory.png\" alt=\"\" class=\"wp-image-10733\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/hosts-directory.png?v=1634502957 1907w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/hosts-directory-768x157.png?v=1634502957 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/hosts-directory-1536x315.png?v=1634502957 1536w\" sizes=\"(max-width: 1907px) 100vw, 1907px\" \/><\/figure>\n\n\n\n<p>You can also check an overview of all hosts from <strong>Monitor &gt; Overview &gt; All Hosts<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1915\" height=\"338\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/all-hosts-overview-2.png\" alt=\"\" class=\"wp-image-10738\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/all-hosts-overview-2.png?v=1634503165 1915w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/all-hosts-overview-2-768x136.png?v=1634503165 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/all-hosts-overview-2-1536x271.png?v=1634503165 1536w\" sizes=\"(max-width: 1915px) 100vw, 1915px\" \/><\/figure>\n\n\n\n<p>You can click on one of the hosts to have an overview of the associated services and view the graphical representation.<\/p>\n\n\n\n<p>Once the service overview page opens up, you can click like memory, to view graphical representation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1905\" height=\"753\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/memory-usage-1.png\" alt=\"\" class=\"wp-image-10737\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/memory-usage-1.png?v=1634503145 1905w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/memory-usage-1-768x304.png?v=1634503145 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/memory-usage-1-1536x607.png?v=1634503145 1536w\" sizes=\"(max-width: 1905px) 100vw, 1905px\" \/><\/figure>\n\n\n\n<p>Awesome tool, isn&#8217;t it?<\/p>\n\n\n\n<p>Main Dashboard status;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1916\" height=\"956\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/main-dashboard-hosts-status-1.png\" alt=\"\" class=\"wp-image-10746\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/main-dashboard-hosts-status-1.png?v=1634504295 1916w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/main-dashboard-hosts-status-1-768x383.png?v=1634504295 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/10\/main-dashboard-hosts-status-1-1536x766.png?v=1634504295 1536w\" sizes=\"(max-width: 1916px) 100vw, 1916px\" \/><\/figure>\n\n\n\n<p>Stay tuned for more tutorials on this awesome tool.<\/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\/wato_monitoringagents.html\" target=\"_blank\" rel=\"noreferrer noopener\">Monitoring Agents<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-elk-stack-on-debian-11\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install ELK Stack on Debian 11<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-osquery-on-rocky-linux-8\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Osquery on Rocky Linux 8<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-configure-snmp-on-rocky-linux-8\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and Configure SNMP on Rocky Linux 8<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to install Checkmk monitoring agents on Linux. Monitoring agents enables remote monitoring of system metrics such as system<\/p>\n","protected":false},"author":1,"featured_media":10740,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,121],"tags":[4204,284,4202,4203,4200,4201,3587],"class_list":["post-10718","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring","category-howtos","tag-add-hosts-checkmk","tag-centos","tag-checkmk-agents","tag-install-checkmk-agents","tag-install-checkmk-agents-on-linux","tag-monitor-linux-hosts-with-checkmk","tag-rocky-linux-8","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\/10718"}],"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=10718"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/10718\/revisions"}],"predecessor-version":[{"id":21633,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/10718\/revisions\/21633"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/10740"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=10718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=10718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=10718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}