Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Introduction to Windows Container Monitoring

DZone's Guide to

Introduction to Windows Container Monitoring

Windows Containers are here! Heavily based on Docker for Linux, see your options for running containers on Windows and how one monitoring tool has prepared.

· Cloud Zone
Free Resource

Are you joining the containers revolution? Start leveraging container management using Platform9's ultimate guide to Kubernetes deployment.

With the new release of Windows Server 2016, Microsoft introduced the concept of containers to the Windows ecosystem. Windows Containers allow you to run any Microsoft Windows software inside an isolated container environment, which gives you all the advantages of running containers, but for the Microsoft world. In this blog post, we look at the implications this has on monitoring.

Windows Containers vs. Hyper-V containers

Compared to Docker on Linux, there is one important difference in the Docker Microsoft world, and that is that there are two types of containers: Windows Containers and Hyper-V containers. The difference between the two is that Hyper-V containers get an isolated kernel for increased security and isolation. What that means is that Docker for Microsoft will run a Hyper-V machine in the background to run your single container. A downside is an increase in resource usage, as you are running a full-fledged virtual machine.

windows_containers

At the moment, Microsoft supplies two different base images for use in the Windows container environment: windowsservercore and nanoserver. Nanoserver is the smallest of the two, as it only contains the absolute minimum requirements to run a Windows environment. It gives you a Windows base to set up your application on that is only 394 MB large.

nano_server

Portability FTW

The great news is that, instead of building their own standard, Microsoft has chosen to adopt the Docker container runtime, which includes all APIs and tooling. This makes the transition an easy one, as you don’t need to learn new commands and concepts if you’re already familiar with Docker on Linux. The Docker registry has also been adapted to handle this new architecture with the manifest-tool, allowing you to create images for both Linux and Windows environments and to pull them using the same command.

What About Monitoring?

As with any new technology comes the question: “How do I monitor this?”. Certainly, as you move into production, you want full visibility and control over what is going on inside your containers. Despite the advantages in terms of portability and scalability, containers also pose specific challenges and requirements in terms of monitoring.

As CoScale is very focused on Docker monitoring, the release of Windows Containers logically caught our attention. We were already working with Microsoft on their Accelerator programwhich gave us access to their top executives and engineers. This allowed us to start working on our Microsoft Docker integration early. The result of that work is part of our latest release.

What Is This Container Monitoring Sorcery?

To monitor a container environment, CoScale installs a monitoring agent including a set of plugins that monitor the different layers of your container stack. In the case of Microsoft Windows Containers, we would install a “Resource plugin”, responsible for monitoring OS related metrics, together with the "Docker plugin", responsible for monitoring container related metrics.

windows_container_monitoring_agent

After installing the CoScale agent as a package, the agent will scan the system for all running containers and start gathering information. One of the views you get is an “Overview” of your Container nodes. You can quickly see how many containers are running on each node, as well as filter certain images to find a specific container.

container_topology

The CoScale dashboards then allow you to click through on certain nodes or containers, to see the performance statistics like CPU, Memory, Network traffic, and Disk throughput. A full list of metrics can be found in our documentation.

container_metrics

With our advanced server grouping feature, it also becomes easy to find the most performance-intensive images. You can also compare versions/tags with each other, which becomes an invaluable tool when deploying new versions of your software.

windows_containers_grouping

Besides metrics, CoScale also keeps track of container events like when containers are started, stopped, killed and removed.

All of these metrics and events are then available in a powerful alerting system, which can send messages by email, Slack or any third party escalation system.

What’s Next?

This exciting new development in the container space gives Microsoft Windows developers the chance to play with containers together with their ASP.NET or legacy applications.

But that’s not all. This is part 1 of our Windows Container blog series. In the coming weeks, we’ll be exploring the monitoring of a Docker Swarm hybrid environment, meaning a cluster where Linux and Windows hosts coexists and what that means for your monitoring. And we will also be taking a look at in-container monitoring of Windows Containers, with the goal of seeing the workings of your application running inside the container.

Stay tuned for these updates by subscribing to our blog below. And if you would like to try out our product, don’t hesitate to request a free trial.

Using Containers? Read our Kubernetes Comparison eBook to learn the positives and negatives of Kubernetes, Mesos, Docker Swarm and EC2 Container Services.

Topics:
hyper-v ,windows ,cloud ,containers

Published at DZone with permission of Samuel Vandamme, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}