Many organizations have added cloud-native technologies to their tech stack to enhance the performance of their products. At the same time, they often continue to run their own networks and on-premises infrastructure. This shift to hybrid infrastructures needs to be addressed in monitoring due to the huge number of metrics being generated every second for various components such as operating system, storage, server, cloud environments, etc. They all are important to make sure applications run at peak performance. These metrics are an essential signal for DevOps teams to understand the health of their infrastructure. This is why organizations need a monitoring solution to help them quickly identify issues in production with metrics, visualizations, and analytics. Checkmk is one of the most popular and helpful infrastructure monitoring tools. In this article, I will tell you why Checkmk deserves its good reputation and how you can take the first steps with it.

What is Checkmk?

Checkmk constantly checks the function of any aspect of modern IT environments and is especially well-suited for hybrid infrastructures. On the one hand, Checkmk is flexible and supports containers, cloud assets, and on-premises systems such as switches and servers. On the other hand, it is really easy to get started and manage your monitoring, because Checkmk comes with automatic alerts based on a lot of IT expertise and other intelligent features that will save you a lot of time. If you want to use Checkmk for free, you have two options: First, you can go for the Checkmk Raw Edition, which is completely open-source and free to use without any limitations. Second, there is the Checkmk Enterprise Trial Edition that has all the additional features of the Checkmk Enterprise Editions, but after 30 days the number of hosts will be limited to 25. How does Checkmk solve the problem? Checkmk can monitor applications, servers, databases, networks, containers, storage, and whatnot. It provides a massive list of over 2,000 monitoring plug-ins. With these plug-ins. Checkmk can be extended to monitor specific technologies from different vendors available on the market. A few popular Checkmk plug-ins are for Docker, Kubernetes, Cisco, Nginx, VMware, Linux, Windows, AWS, Dell. With its 2,000+ plug-ins, Checkmk stands out as a very promising infrastructure monitoring solution available currently. Also, for any monitoring solution, it is crucial how fast and correctly they can read the metrics and set up smart alerting and notifications. Checkmk’s solution meets all these criteria. With its auto-discovery feature, Checkmk can identify more than 90% of services and devices. Now, most businesses require scalability and automation. You can scale monitoring capacity from hundred hosts to thousands of hosts with ease in Checkmk and leverage its agents available for automation.

Install Checkmk in a Docker container

In this article, I am going to install the Checkmk Raw Edition in a Docker container on a Linux server running on Ubuntu 20.04. From Dockerhub, you can download the Checkmk Docker container. It has almost 5 million+ pulls so far, which tells how popular and widely used Checkmk is.

Take the Docker image with the latest Checkmk version and run it inside a container by using the command docker container run. The name of the container will be ‘monitoring’, the webserver will listen to port 5000 and open at port 8080 of the node. The container will use the temporary file system and local time zone. You can check if the Docker image got downloaded by running the command docker images. Run the command docker ps to see if the Checkmk container is running. To get the login details for the Checkmk web interface, print the Checkmk container log. The Checkmk Docker container will run by default at https://localhost:8080/cmk/check_mk. The output of the above command tells you the username is cmkadmin and the password, in my case the password is ClFxBPre. Open the address in a web browser and use your credentials to log in.

Once you log in, this is the ’Main dashboard’ that will appear. It is empty because you did not add any hosts yet.

Monitor Docker Using Checkmk

Usually, you would install the Checkmk agent on your machine that is hosting your Docker containers and then use the Checkmk plug-in for Docker to monitor all containers. This plug-in (mk_docker.py) uses Docker’s Python-API to track Docker containers and gain full visibility into their real-time status and performance. You can read more details about Docker monitoring with Checkmk on the Checkmk website. Because in my Docker environment there is only one Docker container running, my Checkmk Docker container, I will just use the Checkmk agent running in the Docker container and will not install the Checkmk on my Docker host. The agent is pre-installed in the Checkmk container, thus, I just have to add my Checkmk container as host. Let’s get the IP address on which the Docker service is running by using ifconfig on the terminal. In my case, the Docker service is running on 172.17.0.1. The next step is to add the Docker service as a host in Checkmk so that it can be monitored.

Go to Checkmk and click on Setup -> Hosts.

Click on “Add host.”

Now provide the hostname and the IP address and click on ‘Save & go to the service configuration’.

Once you do that, Checkmk will start the service discovery automatically.

Scroll down to see the monitoring services running under the Docker host. You can see the services are not getting monitored currently. If you want to monitor everything, the easiest solution is clicking on ‘Fix all’. If you want to configure which services should be monitored, you can do this in detail as well.  Click on the + sign if you want to monitor a service.

Once you select the services you want to monitor, they will come in the ‘Monitored services’ tab. You will get all the status details for each service you are monitoring. If you click on ? sign, that service will move to the undecided services list. If you click on the X sign, the service will move to the ‘Disabled services’ tab.

I have disabled four services, so I can see them in the disables services tab.

When you are done with adding the services, you need to activate the changes before they go into production.

Click on the highlighted field with the yellow exclamation point (!) at the top right corner to see the pending changes. Click on Activate on selected sites.

You have successfully monitored Docker services using Checkmk!

Conclusion

So that was all about Checkmk, an infrastructure monitoring tool. It is a very easy-to-use tool that you must try to monitor your production environments. I recommend trying the Checkmk Free Edition to start your monitoring.

Monitoring made easy  How to get started with Checkmk - 96Monitoring made easy  How to get started with Checkmk - 63Monitoring made easy  How to get started with Checkmk - 31Monitoring made easy  How to get started with Checkmk - 12Monitoring made easy  How to get started with Checkmk - 5Monitoring made easy  How to get started with Checkmk - 65Monitoring made easy  How to get started with Checkmk - 6Monitoring made easy  How to get started with Checkmk - 54Monitoring made easy  How to get started with Checkmk - 38Monitoring made easy  How to get started with Checkmk - 54Monitoring made easy  How to get started with Checkmk - 90Monitoring made easy  How to get started with Checkmk - 66Monitoring made easy  How to get started with Checkmk - 52Monitoring made easy  How to get started with Checkmk - 78Monitoring made easy  How to get started with Checkmk - 70Monitoring made easy  How to get started with Checkmk - 66Monitoring made easy  How to get started with Checkmk - 52Monitoring made easy  How to get started with Checkmk - 45Monitoring made easy  How to get started with Checkmk - 65Monitoring made easy  How to get started with Checkmk - 93Monitoring made easy  How to get started with Checkmk - 90Monitoring made easy  How to get started with Checkmk - 96Monitoring made easy  How to get started with Checkmk - 17Monitoring made easy  How to get started with Checkmk - 59Monitoring made easy  How to get started with Checkmk - 98Monitoring made easy  How to get started with Checkmk - 92Monitoring made easy  How to get started with Checkmk - 26Monitoring made easy  How to get started with Checkmk - 63Monitoring made easy  How to get started with Checkmk - 48Monitoring made easy  How to get started with Checkmk - 81Monitoring made easy  How to get started with Checkmk - 21Monitoring made easy  How to get started with Checkmk - 90Monitoring made easy  How to get started with Checkmk - 33