Take a closer look at automatic agentless Docker Swarm health monitoring
As you know, Docker Containers is a game changer in the virtualization space. Starting a new virtualization cannot get easier than this. It is easy to use, fast and ensures real software portability. The success of Docker is reminiscent of the VMWare effect on virtualization in the early 2000s.
Challenges of monitoring a Docker-centric environment
Microservices have resulted in complicated application constructs by many containers that are difficult to monitor and manage. The basic Docker monitoring capabilities, which are part of most open source discovery tools (such as etcd, consul and others) are not always sufficient—since they only perform simple health checks.
Recently, there have been several monitoring tools for Docker released. Most of these tools require agents running on the host either as another container or as an internal application inside the container, which is an addition to an already complicated deployment. Moreover, these tools do not monitor the entire stack. The need for automated monitoring is greater than ever and the need of the hour.
Agentless Monitoring with SiteScope
In the light of the above, we were looking for a solution that was easy to manage, deploy, and provides an overall view of the stacks. HP SiteScope is an agentless monitoring solution that provides a centralized view of the monitored environment without installing agents or software on production systems was our first and natural choice.
We leveraged SiteScope’s out-of-the-box capability to create custom monitoring solutions. We created a new custom monitor that can monitor the entire Docker stack. The custom monitor can access the SWARM cluster API, check its availability, add Linux host monitor for every registered engine, and can fetch the general system metrics and specific metrics on the Docker Daemon.
In addition, the custom monitor retrieves metrics for every new container that is created on the cluster, knowing when the container is removed to clean up its monitors.
SiteScope Solution Templates
The highlight of SiteScope application monitoring software is its built-in solution templates that can be deployed easily on applications running as containers. When a new container starts, the monitoring engine is able to detect the availability of a pre-defined template for its image name (using Docker inspect API) and then deploy the template to fetch internal metrics of the application. For example, Postgres container can be monitored to get database connection details, Tomcat can be monitored using JMX, and NGINX can be monitored through URL.
With SiteScope, we were able to get the open ports, environment variable and more details by using the container meta-data (via inspect) and set the template properties.
SiteScope Unified Console
We have developed a utility that quickly deploys and manages containers. With SiteScope, we get an overall view of the containers that are being monitored. The Unified Console of SiteScope provides a consolidated view of containers including Docker Swarm, Docker Node, Daemon, Docker Containers and most importantly the Docker App.
Figure 1: Utility to deploy and manage containers
Figure 2: SiteScope Unified View
The partial solution was presented at DockerCon 2015 in San Francisco and received positive feedback.
The road ahead…
This was an internal solution for HP Application Performance Management team and can be further enhanced to support integration to different Docker cluster manager and support auto discovery of Docker applications to additional certified containers from the Docker hub. The SiteScope team is excited about extending a comprehensive agentless monitoring solution for Docker in their upcoming releases.