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:
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 You will get the number of pods against each service under the namespaceKubePodInventory
| where Namespace == 'namespace' and isnotempty(ServiceName) and ContainerStatus in ('running')
| summarize NumPods=count() by LogTime=bin(TimeGenerated, 1m), ServiceName