Deployment & HPA metrics with Container insights

Starting with agent version ciprod08072020, Container insights-integrated agent now collects metrics for Deployments & HPAs.

Deployment metrics

Container insights automatically starts monitoring Deployments, by collecting the following metrics at 60 sec intervals and storing them in the InsightMetrics table:

Metric name Metric dimension (tags) Description
kube_deployment_status_replicas_ready container.azm.ms/clusterId, container.azm.ms/clusterName, creationTime, deployment, deploymentStrategy, k8sNamespace, spec_replicas, status_replicas_available, status_replicas_updated (status.updatedReplicas) Total number of ready pods targeted by this deployment (status.readyReplicas). Below are dimensions of this metric.
  • 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 sec intervals and storing them in the InsightMetrics table:

Metric name Metric dimension (tags) Description
kube_hpa_status_current_replicas container.azm.ms/clusterId, container.azm.ms/clusterName, creationTime, hpa, k8sNamespace, lastScaleTime, spec_max_replicas, spec_min_replicas, status_desired_replicas, targetKind, targetName Current number of replicas of pods managed by this autoscaler (status.currentReplicas). Below are dimensions of this metric.
  • 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 & HPA charts

Container insights includes pre-configured charts for the metrics listed earlier in the table as a workbook for every cluster. You can find the deployments & HPA workbook Deployments & HPA directly from an AKS cluster by selecting Workbooks from the left-hand pane, and from the View Workbooks drop-down list in the Insight.

Next steps