Dave Rendón Microsoft Azure MVP, embracing and fostering tech intensity to benefit society and thrive in a digital world.

Monitoring containers using Windows Admin Center

2 min read

AzureSpringClean-wikiazure-Monitoring-containers-using-windows-admin-center

This article is part of the #AzureSpringClean initiative and will will review the monitoring capabilities for containers using Windows Admin Center.

The #AzureSpringClean by Joe Carlyle (@wedoazure) and Thomas Thornton(@kainossoftware) includes community driven articles that highlight best-practices, lessons learned, and help with some of the more difficult topics of Azure Management.

If you want to know more about the initiative check out the #AzureLateShow episode:

Windows Admin Center for Containers

Windows Admin Center is a locally deployed, browser-based app for managing Windows servers, clusters, hyper-converged infrastructure, as well as Windows 10 PCs. It comes at no additional cost beyond Windows and is ready to use in production

Microsoft Docs

Pre-requisites 

Deploy the containers

RDP to your Azure VM and deploy a docker container in this case I´m going to use a wordpress image:

docker run --name azure-spring-clean -d -it -p 80:80 nanoserver/iis-mysql-php-wordpress
01-Monitoring containers using Windows Admin Center

Let´s verify that the container is up and running:

 docker ps -a -f status=running
02-Monitoring containers using Windows Admin Center

Now let´s access to it through the public IP address/DNS name of the Azure VM, in this case:

Your-ip-address/wordpress

or

Your-dns-name/wordpress

03-Monitoring containers using Windows Admin Center
04-Monitoring containers using Windows Admin Center

Once the container is up and running let´s see what is happening behind the scenes.

Monitoring your containers using Windows Admin Center

Steps to monitor containers using Windows Admin Center:

Open your windows admin center console and click on +Add:

05-Monitoring containers using Windows Admin Center

Then look for the Azure VM option and click add:

06-Monitoring containers using Windows Admin Center

Sign in to your Azure Subscription:

07-Monitoring containers using Windows Admin Center

Now let´s look for the Azure VM that is running the containers:

08-Monitoring containers using Windows Admin Center

Once you add the Azure VM, you will see it listed, click on it:

09-Monitoring containers using Windows Admin Center

Once you access you will see a Containers settings option as shown below:

010-Monitoring containers using Windows Admin Center

The Container control allows you to review the status of the containers on the Azure VM –  Windows Server container host – and manage them remotely. This Containers controls consists of 5 main tabs: Summary, containers, images, networks and volumes.

Summary tab

Initially you will be able to review a quick summary of the containers you´re running including:

  • Containers running and stopped
  • Images available
  • Networks configured
  • Volumes
011-Monitoring containers using Windows Admin Center

Containers tab

Now click on the containers tab, this will give you visibility of the status of your containers, select the azure-spring-clean container:

012-Monitoring containers using Windows Admin Center

You should be able to see some metrics around the performance of this container including:

  1. CPU usage
  2. Memory usage
  3. Network I/O
013-Monitoring containers using Windows Admin Center

Go to the Details pane, you will be able to check some parameters of your container including:

  1.  Container Name
  2.  Creation date
  3.  Satus
  4.  Image
  5.  Port configuration
  6.  ID
  7.  Networks connected
014-Monitoring containers using Windows Admin Center

Let´s provision now a second container, this container will be IIS based:

 docker run --name azure-spring-clean-iis -d -it -p 8080:8080 compulim/iisnode

Go back to the Windows Admin Center and click on it:

015-Monitoring containers using Windows Admin Center

Now you will be able to deep dive on the logs of this container by going into the events including:

  • Administrative Logs
  • Windows Logs
    •  Application
    •  Security
    •  System
    •  Forwarded Events
    •  Setup
  • App and services Logs
016-Monitoring containers using Windows Admin Center

From this Containers tab you can also end your containers.

 Let´s verify that the azure-spring-clean-iis is up and running using PowerShell:

017-Monitoring containers using Windows Admin Center

Now let´s end it using Windows Admin Center:

018-Monitoring containers using Windows Admin Center

Now end this container:

019-Monitoring containers using Windows Admin Center

You should see a notification like below:

020-Monitoring containers using Windows Admin Center
021-Monitoring containers using Windows Admin Center

Now let´s verify also using PowerShell:

022-Monitoring containers using Windows Admin Center

Images tab

Windows Admin Center can also show you the images available on your Azure VM on the images tab, this way you can check on the details on the image including:

  1. Repository overview
  2.  Repository
  3. Tag
  4. Size
  5. Image id
  6. Creation date
023-Monitoring containers using Windows Admin Center

Networks tab

Windows Admin Center can provide you visibility on the networking setup from your containers on the network tab:

024-Monitoring containers using Windows Admin Center

You can also leverage the volumes capabilities on Windows Admin Center.

Troubleshooting Windows Admin Center

Ensure that WinRM is running on your Azure VM, to check if winrm is enabled:

 get-service winrm
025-Monitoring containers using Windows Admin Center

Force PS Remoting

Enable-PSRemoting -force
026-Monitoring containers using Windows Admin Center

Verify trusted hosts, to set TrustedHosts value: 

winrm set winrm/config/client '@{TrustedHosts="*"}'
027-Monitoring containers using Windows Admin Center

Go to your VM Network interface and ensure you have set up the proper inbound rules to allow traffic:

028-Monitoring containers using Windows Admin Center

Provide the following parameters and click add:

029-Monitoring containers using Windows Admin Center

Conclusion

Windows Admin Center provides a broad range of management capabilities for your on-prem and cloud workloads including containers. Along this article we reviewed the monitoring capabilities for containers running on an Azure VM (Windows Server 2016) using Windows Admin Center.

Dave Rendón Microsoft Azure MVP, embracing and fostering tech intensity to benefit society and thrive in a digital world.

Leave a Reply

Your email address will not be published. Required fields are marked *