Unified monitoring view in Kubernetes : Linking infrastructure monitoring with application monitoring

Introduction

Typically you notice that there are two dimensions / viewpoints when it comes to monitoring. On one side there is a team that wants to view everything related to the “infrastructure”, like for instance the kubernetes cluster. On the other hand, there is the typical application performance monitoring that starts from the application side. Sadly enough, in a lot of cases, those two are separated islands… 😦

 

As you might know, on the Azure front you can do Application Performance Monitoring with Application Insights and there is like a really awesome integration with Azure Monitor (“Log Analytics”) from the container space (kubernetes). Though I see you thinking it… Two separate solutions. Though, what a lot of people forget, is that they are actually using “Log Analytics” under the hood. And… That you can query across workspaces in Log Analytics! Which means that you can join the two and have an aggregated view to span both worlds.

 

Let’s take a look!

For this test, I’ve created a k8s cluster which is linked to a separate log analytics work-space. Where next to it, there is an application (Azure Function) inside of a docker container that is linked to Application Insights.

 

The azure function is basically the boilerplate function that you generate right off the bat ;

It was then nicely built and run locally, where you can see the logs being filled… 😉

Where the same data is hitting the Application Insights work-space.

Now let’s take a look at the work-space containing the logs from our kubernetes (k8s) deployment ;

And now let’s try querying that data from our application insights work-space…

Boom! #micdrop 😉

 

Closing Thoughts

This post was a very rough & quick test to show that it’s possible to aggregate data gathered from your kubernetes cluster (“infrastructure level”) with the data from application insights (“application / code level”). Thus you’ll be able to generate composed view that cover “both worlds”!

 

 

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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.