Manage Linux Servers with Microsoft OMS

Linux is becoming more and more popular for Microsoft-focused people. Why? First, Microsoft is heavily investing in this area. If you look back some years, the strategy when it comes to non-Microsoft workloads completely changed. Second, many companies want the to use best-of-breed platform for their workloads. For some workloads this might be a Windows platform or application, for others, Linux applications will make the race. This indeed is a challenge for IT organizations because they need to be able to manage different types of workloads on different platforms. In this blog post I will demonstrate two OMS solutions that can assist with Linux-specific workloads.

Quick Overview

What will I cover? Quick overview:

  • Prepare the Linux Box with Docker
  • Onboard the Linux Box to OMS
  • Check collected data
  • Container solution
  • Service Map solution

 

Step 1 – Prepare the Linux Box with Docker

First off, we need a Linux box. I will go the easy way and provision a new Red Hat Linux on Azure.

image

Once the box is ready, I will install Docker as well to demonstrate a specific OMS solution.

  • Get and install Docker

sudo curl -sSL https://get.docker.com/ | sh

image

  • Enable and start Docker

sudo systemctl enable docker

image

sudo systemctl start docker

image

  • Run a Docker test container

sudo docker run hello-world

image

 

Step 2 – Onboard the Linux Box to OMS

Before we onboard the box, I want to quickly cover the OMS agent architecture. As you can see there are OMS agents for Windows and Linux operating systems. In addition to the OMS agent, there is a dependency agent that is used for the “Service Map” solution. In this example, I will install both the OMS agent and the dependency agent on the Linux Box.

image

Now, there are 2 ways to install the OMS agent on the Linux Box: Manually and through the Azure portal.

OMS Agent – Manual Installation

The OMS agent for Linux is available on GitHub. Go take a look > https://github.com/Microsoft/OMS-Agent-for-Linux

From there it can be directly pulled and installed on the Linux Box

  • Download Installer

wget https://raw.githubusercontent.com/Microsoft/OMS-Agent-for-Linux/master/installer/scripts/onboard_agent.sh

image

  • Install OMS Agent

sudo sh onboard_agent.sh –w ‘OMS Workspace ID’ –s ‘OMS Workspace Key’

image

OMS Agent – Installation through Azure Portal

If your Linux Box lives in Azure, the onboarding process is even easier. Just navigate to your Log Analytics workspace and onboard the VM with a simple click.

image

image

Install the Dependency Agent

Once the OMS agent is installed, we can continue with the Dependency Agent for the Service Map solution. But first, let’s add the 2 solutions using the the solutions gallery on the OMS website.

image

If you navigate to the Service Map solution on the dashboard, you can find the details for the download.

image

  • Download Dependency Agent for Linux

wget https://aka.ms/dependencyagentlinux

image

  • Install the Dependency Agent

sudo sh dependencyagentlinux

image

Check if Linux Box is connected to OMS

After a while the Linux Box should appear in the OMS Agent Health solution

image

Configure data collection

If needed, specific data collection can be configured in the OMS configuration for Linux Agents.

  • Linux Performance Counters

image

  • Syslog Data

image

Wait for an hour or so until your OMS workspace has some collected data from the Linux Boxes available.

 

Step 3 – Check collected Data

Now let’s check the Log Search for Linux-specific data.

  • Type=Syslog

image

  • Type=Perf Computer=LinuxBox

image

It seems data from the Linux Box is making it to the OMS workspace. Nice. Now let’s check out some solutions.

 

Step 4 – Container Solution

This solutions gives you insights about the container hosts and containers that are running on the host. To make sure you will see something start some containers. I will use some simple containers (hello-world, ubuntu) and a specific container that runs Apache Tomcat. I will only go into the Tomcat container example.

  • Start Tomcat container on Linux Box

sudo docker run –it –rm –p 8888:8080 tomcat:8.0

This will run a container that executes Tomcat within the container on port 8080 and makes it accessible on the container host (Linux Box) on port 8888.

image

Once the container runs, try to connect to the Tomcat website from another machine.

image

Now wait some time and check out the container solution and the collected data. This gives you some nice insights.

image

image

 

Step 5 – Service Map Solution

Now navigate to the Service Map solution. This solution gives you important insights about communication patterns within your infrastructure.

image

Change the focus to the Linux Box and select an appropriate time frame. Beside many incoming and outgoing connections you should see the connection that was made to the Tomcat server that runs inside the Docker container.

image

 

Conclusion

With this blog post I tried to demonstrate some OMS-specific possibilities to manage Linux workloads. It’s only a subset of what’s possible today, but should give you some kick start to discover what’s possible by yourself. And remember, Microsoft will invest heavily in this area in the future – be prepared!

Cheers
Marcel

This entry was posted in Container Management, OMS, OpInsights, X-Plat and tagged , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s