{"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
In this tutorial, you will learn how to install Checkmk monitoring agents on Linux. 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 In our previous tutorial, we learnt how to install Checkmk monitoring tool on Ubuntu 20.04 system.<\/p>\n\n\n\n How to Monitor IT Infrastructure using Checkmk<\/a><\/p>\n\n\n\n If you noticed, when first installed, no host\/services are monitored by default installation of Checkmk.<\/p>\n\n\n\n In this tutorial, we will learn how to install Checkmk monitoring agents on Ubuntu, Debian and CentOS systems.<\/p>\n\n\n\n You need to install the agent on the monitoring server as well.<\/p>\n\n\n\n Checkmk provides an easy way to download the montoring agents for various Operating systems.<\/p>\n\n\n\n On the Checkmk monitoring server web interface, navigate to Setup > Agents > Windows, Linux, Solaris,AIX<\/strong>.<\/p>\n\n\n\n From the list of available agents, click the third option to download an installer for Ubuntu\/Debian systems.<\/p>\n\n\n\n Once you have downloaded the installer, then install it by running the command below;<\/p>\n\n\n\n Similarly, download the agent for CentOS\/RHEL (RPM) from the list of available agents on the Checkmk UI.<\/p>\n\n\n\n Once you have the Checkmk RPM package, run the command below to install it.<\/p>\n\n\n\n Once you have the agents installed, the next step would to be add these hosts to Checkmk monitoring server.<\/p>\n\n\n\n On the Navigation menu, click Setup > Hosts > Hosts<\/strong>. Such an interface opens up.<\/p>\n\n\n\n Click Add host to monitoring<\/strong>.<\/p>\n\n\n\n I will start by adding the Checkmk server, and hence, enter the hostname as localhost<\/strong>.<\/p>\n\n\n\n Next, click Save & go to connection tests<\/strong> to test the connectivity to the localhost and verify if the agent is installed.<\/p>\n\n\n\n Sample connection checks;<\/p>\n\n\n\n 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 If the connection to the host is okay, proceed to do a service discovery<\/a> in order to auto-configure all services to be checked on this host.<\/p>\n\n\n\n This will run a full service scan on the host and such output is shown after a short while.<\/p>\n\n\n\n To start monitoring services that are currently not monitored, click Fix all<\/strong>.<\/p>\n\n\n\n The monitored services interface now changes like as shown below;<\/p>\n\n\n\n Next, you need to write the changes.<\/p>\n\n\n\n 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 Next, click 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 For the remote hosts, ensure that TCP port 6556 is open on firewall.<\/p>\n\n\n\n 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 Once CentOS\/RHEL\/Rocky Linux, open the port on firewalld. You can create a new zone for monitoring;<\/p>\n\n\n\n Next, you can follow the same procedure to enroll the remote hosts that already have the Checkmk agents installed.<\/p>\n\n\n\n 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 You can see all hosts under Setup<\/strong> > Hosts<\/strong> > Hosts<\/strong>;<\/p>\n\n\n\n You can also check an overview of all hosts from Monitor > Overview > All Hosts<\/strong>.<\/p>\n\n\n\n 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 Once the service overview page opens up, you can click like memory, to view graphical representation.<\/p>\n\n\n\n Awesome tool, isn’t it?<\/p>\n\n\n\n Main Dashboard status;<\/p>\n\n\n\n Stay tuned for more tutorials on this awesome tool.<\/p>\n\n\n\n Monitoring Agents<\/a><\/p>\n\n\n\n Install ELK Stack on Debian 11<\/a><\/p>\n\n\n\nInstalling Checkmk Monitoring Agents on Linux<\/h2>\n\n\n\n
Install Checkmk Monitoring Agents on Ubuntu\/Debian<\/h3>\n\n\n\n
Download Checkmk Agent for Ubuntu\/Debian<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
Install Checkmk Monitoring Agents on Ubuntu\/Debian<\/h4>\n\n\n\n
apt install .\/check-mk-agent_2.0.0p12-31293648899edb8d_all.deb<\/code><\/pre>\n\n\n\n
Download and Install Checkmk Agent on CentOS\/RHEL<\/h3>\n\n\n\n
yum localinstall check-mk-agent-2.0.0p12-31293648899edb8d.noarch.rpm<\/code><\/pre>\n\n\n\n
Add Hosts to Checkmk Monitoring Platform<\/h3>\n\n\n\n
<\/figure>\n\n\n\n
Adding Localhost\/Checkmk Monitoring Server<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Host Service Discovery<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Activate pending changes<\/h4>\n\n\n\n
<\/figure>\n\n\n\n
Add Remote Hosts to Checkmk Monitoring<\/h3>\n\n\n\n
ufw allow from CHECKMK-SERVER-IP to any port 6556 proto tcp comment \"Allow Checkmk monitoring\"<\/code><\/pre>\n\n\n\n
firewall-cmd --new-zone=checkmk-monit --permanent<\/code><\/pre>\n\n\n\n
firewall-cmd --zone=checkmk-monit --add-source=CHECKMK-SERVER-IP\/MASK --permanent<\/code><\/pre>\n\n\n\n
firewall-cmd --zone=checkmk-monit --add-port=6556\/tcp --permanent<\/code><\/pre>\n\n\n\n
firewall-cmd --reload<\/code><\/pre>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
Reference<\/h3>\n\n\n\n
Other Tutorials<\/h3>\n\n\n\n