Home > Enterprise >  How do I get a report of count of kubernetes containers over time in Azure Log Analytics
How do I get a report of count of kubernetes containers over time in Azure Log Analytics

Time:12-30

I am trying to get a chart in a dashboard with the count of kubernetes containers over time for an application hosted on Azure. The application has multiple types of containers for different services under the application and I want to see count of pods against each service over time under the particular namespace for the application.

Any help is appreciated.

CodePudding user response:

enter image description here

enter image description here

You can refer to Monitoring Azure Kubernetes Service (AKS) with Azure Monitor, Monitor your Kubernetes cluster performance with Container insights and Azure monitor for containers — metrics & alerts explained

CodePudding user response:

Here is what I came up with

KubePodInventory
| where Namespace == 'namespace' and isnotempty(ServiceName) and ContainerStatus in ('running')
| summarize NumPods=count() by LogTime=bin(TimeGenerated, 1m), ServiceName

You will get the number of pods against each service under the namespace

  • Related