All Products
Search
Document Center

:Monitor an ACK AHPA

Last Updated:Dec 13, 2024

Managed Service for Prometheus allows you to monitor an ACK Advanced Horizontal Pod Autoscaler (AHPA), and use the out-of-the-box dashboards to visualize the monitoring data. This topic describes how to monitor an ACK AHPA.

Prerequisites

Background information

In cloud-native environments, estimating resource capacity is often challenging. When using Kubernetes HPA (Horizontal Pod Autoscaler), you may encounter issues such as elasticity lag and complex configuration. To address these challenges, Alibaba Cloud Container Service for Kubernetes and the AI for Time Series team of Alibaba DAMO Academy have collaboratively introduced AHPA with elastic forecasting capabilities. AHPA can automatically identify elasticity patterns and forecast capacity requirements based on historical business metrics, helping you plan for scalability in advance and effectively resolve the issue of elasticity lag.

Procedure

  1. Log on to the Managed Service for Prometheus console. In the left-side navigation pane, click Integration Center.

  2. Click ACK AHPA and set the parameters as prompted. The following table describes the key parameters.

    Parameter

    Description

    Automatically Install AHPA Controller

    Specify whether to automatically install the AHPA controller.

    Metric Collection Interval

    The interval for collecting monitoring data. The default value is 15.

The installed component is displayed on the Integration Management page in the Managed Service for Prometheus console. The Integration Management page consists of the Integrated Environments, Integrated Addons, and Query Dashboards tabs, where you can view information such as targets, metrics, dashboards, and alerts.

View dashboard data

On the Integrated Addons tab of the Integration Management page, click AHPA. In the panel that appears, click the Dashboards tab and click a dashboard name to view details.

AHPA dashboards provided by Managed Service for Prometheus display metrics such as the number of pods, CPU utilization rate, actual and forecasted CPU utilization, and pod trends.

  • The CPU Utilization Rate & Pod Quantity section displays the average CPU utilization rate and the current number of pods for the Deployment.sr

  • The Actual & Predicted CPU Utilization section shows the actual and predicted CPU utilization of pods in the current workload. If the predicted CPU utilization is higher han the actual CPU utilization, it indicates sufficient CPU capacity.dr

  • In the Pod Trends section, you can view the actual number of pods, the recommended number of pods, and the actively predicted number of pods.

    • Actual number of pods: This indicates the number of pods that are currently active and running in the Deployment.

    • Recommended number of pods: This represents the number of Pods that AHPA suggests for scaling actions. This recommendation is the final output after considering proactive forecasts, reactive forecasts, and defined boundary limits.

    • Proactive forecasting: This process involves the system using historical data to proactively identify cyclical patterns and predict future load, thereby suggesting an optimal number of pods to meet anticipated demand.

    fr

Key AHPA metrics

Metric

Description

ahpa_proactive_pods

The number of pods proactively forecasted.

ahpa_reactive_pods

The number of pods reactively forecasted.

ahpa_requested_pods

The recommended number of pods.

ahpa_max_pods

The maximum number of pods.

ahpa_min_pods

The minimum number of pods.

ahpa_target_metric

The scaling threshold.