Deployment and HPA metrics with Container insights
Article
The Container insights integrated agent automatically collects metrics for deployments and horizontal pod autoscalers (HPAs).
Deployment metrics
Container insights automatically starts monitoring deployments by collecting the following metrics at 60-second intervals and storing them in the InsightMetrics table.
Total number of ready pods targeted by this deployment (status.readyReplicas). The dimensions of this metric are:
deployment - name of the deployment
k8sNamespace - Kubernetes namespace for the deployment
deploymentStrategy - Deployment strategy to use to replace pods with new ones (spec.strategy.type)
creationTime - deployment creation timestamp
spec_replicas - Number of desired pods (spec.replicas)
status_replicas_available - Total number of available pods (ready for at least minReadySeconds) targeted by this deployment (status.availableReplicas)
status_replicas_updated - Total number of non-terminated pods targeted by this deployment that have the desired template spec (status.updatedReplicas)
HPA metrics
Container insights automatically starts monitoring HPAs by collecting the following metrics at 60-second intervals and storing them in the InsightMetrics table.
Current number of replicas of pods managed by this autoscaler (status.currentReplicas). The dimensions of this metric are:
hpa - name of the HPA
k8sNamespace - Kubernetes namespace for the HPA
lastScaleTime - Last time the HPA scaled the number of pods (status.lastScaleTime)
creationTime - HPA creation timestamp
spec_max_replicas - Upper limit for the number of pods that can be set by the autoscaler (spec.maxReplicas)
spec_min_replicas - Lower limit for the number of replicas to which the autoscaler can scale down (spec.minReplicas)
status_desired_replicas - Desired number of replicas of pods managed by this autoscaler (status.desiredReplicas)
targetKind - Kind of the HPA's target (spec.scaleTargetRef.kind)
targetName - Name of the HPA's target (spec.scaleTargetRef.name)
Deployment and HPA charts
Container insights includes preconfigured charts for the metrics listed earlier in the table as a workbook for every cluster. You can find the deployments and HPA workbook Deployments & HPA directly from an Azure Kubernetes Service cluster. On the left pane, select Workbooks and select View Workbooks from the dropdown list in the insight.