How to Install Check_MK Monitoring Tool on CentOS 7

By Hitesh Jethva, Alibaba Cloud Tech Share Author. Tech Share is Alibaba Cloud’s incentive program to encourage the sharing of technical knowledge and best practices within the cloud community.

Check_MK is a free and open source IT monitoring tool that comes with Nagios and other add-ons for gathering, monitoring, and graphing data. Check_MK can be used as a front-end and extension of a Nagios for monitoring performance and health of networking devices, servers and infrastructure systems. Check_MK allows you to create a rule-based configuration using Python to make it scale better, allowing more systems to be monitored from a single Nagios server. Check_MK stores the monitored performance data in a standard RRD format that can be used to create reports for that.

In this tutorial, we will be installing and configuring Check_MK on an Alibaba Cloud Elastic Compute Service(ECS) CentOS 7 server.

Requirements

  • A fresh Alibaba Cloud instance for Check_MK server with CentOS 7 installed.
  • A fresh Alibaba Cloud instance for Check_MK agent with Ubuntu 16.04 installed.
  • A static IP address 192.168.0.106 is set up on the Check_MK server instance and 192.168.0.104 is set up on the Check_MK agent instance.

Launch Alibaba Cloud ECS Instance

First, Login to your Alibaba Cloud ECS Console. Create a new ECS instance, choosing CentOS 7 as the operating system with at least 2GB RAM. Connect to your ECS instance and log in as the root user.

Once you are logged into your CentOS 7 instance, run the following command to update your base system with the latest available packages.

Getting Started

Before starting, you will need to disable SELinux and Firewalld to your system.

First, disable Firewalld with the following command:

Next, disable SELinux by editing /etc/selinux/config file:

Make the following changes:

Save and close the file. Then, restart your server to apply the changes:

Install Check_MK

Before installing Check_MK, you will need to install some packages required by Check_MK. You can install all of them by running the following command:

Next, you will need to download Check_MK package from OMD’s Official Website. You can download it with the following command:

Next, install Check_MK with all required dependencies by running the following command:

The omd is a command line utility that comes with Check_MK package. It is used to manage OMD instances on the server.

You can list out the different options available with omd by running the following command:

Output:

Create Monitoring Instance

Check_MK is now installed, it’s time to create your first monitoring instance.

You can do this by running the following command:

Output:

Next, start the instance with the following command:

Output:

Next, you will need to create an admin user and password to access the instance.

You can do this by running the following command:

Now, open your web browser and type the URL http://192.168.0.106/monitoring. You will be redirected to the Check_MK login page:

Provide your admin username and password. Then, click on the Login button. You should see the following page:

In the above image, you should see that all servers and services are empty as we have not enabled any service as of now.

Add CentOS Host on Check_MK

Next, you will need to add a Linux host for monitoring instance. Here, we will use monitoring host as Check_MK server itself.

First, download and install the Check_MK Agent to your server.

Next, install Check_MK agent with the following command:

Next, open the Check_MK web interface and navigate to WATO-Configuration > Hosts. You should see the following image:

Now, click on the Create new host. You should see the following image:

Here, provide all the required details. Then, click on the Save & go to Services button. You should see all the services in the following image:

Working with Check_MK

Now, go to the Check_MK web interface and click on the Dashboards > Main Overview item on the left pane. You should see the one host is up with no errors in the following page:

Next, click on the Views > Hosts > All hosts in the left pane. You should see your monitoring host in the following page:

Next, click on the monitoring in the Host column. You should see the status of all the services in the following page:

Next, click on the CPU load icon. You should see the CPU load in graphical format in the following page:

Add Ubuntu Host on Check_MK

Before starting, you will need to install Ckeck_MK agent on the Ubuntu 16.04 instance.

First, log in to Ubuntu 16.04 instance and install xinetd with the following command:

Next, start xinetd service with the following command:

Next, download the Check_MK agent package from the Check_MK server instance.

Next, install the downloaded package with the following command:

Next, go to the Check_MK web interface and click on the WATO Configuration > Hosts > Create new host button. You should see the following page:

Here, provide the IP address of Ubuntu 16.04 host and select Check_MK agent. Then, click on the Save & go to Services button. You should see all the services in the following page:

Now, go to the Check_MK web interface and click on the Dashboards > Main Overview item on the left pane. You should see the two host is up without any error in the following page:

Original Source

https://www.alibabacloud.com/blog/how-to-install-check-mk-monitoring-tool-on-centos-7_594937?spm=a2c41.13062183.0.0

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store